pfc-r8a77970.c 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * R8A77970 processor support - PFC hardware block.
  4. *
  5. * Copyright (C) 2016 Renesas Electronics Corp.
  6. *
  7. * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c
  8. *
  9. * R-Car Gen3 processor support - PFC hardware block.
  10. *
  11. * Copyright (C) 2015 Renesas Electronics Corporation
  12. */
  13. #include <common.h>
  14. #include <dm.h>
  15. #include <errno.h>
  16. #include <dm/pinctrl.h>
  17. #include <linux/kernel.h>
  18. #include "sh_pfc.h"
  19. #define CPU_ALL_PORT(fn, sfx) \
  20. PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \
  21. PORT_GP_CFG_28(1, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \
  22. PORT_GP_CFG_17(2, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \
  23. PORT_GP_CFG_17(3, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \
  24. PORT_GP_CFG_6(4, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH), \
  25. PORT_GP_CFG_15(5, fn, sfx, SH_PFC_PIN_CFG_DRIVE_STRENGTH)
  26. /*
  27. * F_() : just information
  28. * FM() : macro for FN_xxx / xxx_MARK
  29. */
  30. /* GPSR0 */
  31. #define GPSR0_21 F_(DU_EXODDF_DU_ODDF_DISP_CDE, IP2_23_20)
  32. #define GPSR0_20 F_(DU_EXVSYNC_DU_VSYNC, IP2_19_16)
  33. #define GPSR0_19 F_(DU_EXHSYNC_DU_HSYNC, IP2_15_12)
  34. #define GPSR0_18 F_(DU_DOTCLKOUT, IP2_11_8)
  35. #define GPSR0_17 F_(DU_DB7, IP2_7_4)
  36. #define GPSR0_16 F_(DU_DB6, IP2_3_0)
  37. #define GPSR0_15 F_(DU_DB5, IP1_31_28)
  38. #define GPSR0_14 F_(DU_DB4, IP1_27_24)
  39. #define GPSR0_13 F_(DU_DB3, IP1_23_20)
  40. #define GPSR0_12 F_(DU_DB2, IP1_19_16)
  41. #define GPSR0_11 F_(DU_DG7, IP1_15_12)
  42. #define GPSR0_10 F_(DU_DG6, IP1_11_8)
  43. #define GPSR0_9 F_(DU_DG5, IP1_7_4)
  44. #define GPSR0_8 F_(DU_DG4, IP1_3_0)
  45. #define GPSR0_7 F_(DU_DG3, IP0_31_28)
  46. #define GPSR0_6 F_(DU_DG2, IP0_27_24)
  47. #define GPSR0_5 F_(DU_DR7, IP0_23_20)
  48. #define GPSR0_4 F_(DU_DR6, IP0_19_16)
  49. #define GPSR0_3 F_(DU_DR5, IP0_15_12)
  50. #define GPSR0_2 F_(DU_DR4, IP0_11_8)
  51. #define GPSR0_1 F_(DU_DR3, IP0_7_4)
  52. #define GPSR0_0 F_(DU_DR2, IP0_3_0)
  53. /* GPSR1 */
  54. #define GPSR1_27 F_(DIGRF_CLKOUT, IP8_27_24)
  55. #define GPSR1_26 F_(DIGRF_CLKIN, IP8_23_20)
  56. #define GPSR1_25 F_(CANFD_CLK_A, IP8_19_16)
  57. #define GPSR1_24 F_(CANFD1_RX, IP8_15_12)
  58. #define GPSR1_23 F_(CANFD1_TX, IP8_11_8)
  59. #define GPSR1_22 F_(CANFD0_RX_A, IP8_7_4)
  60. #define GPSR1_21 F_(CANFD0_TX_A, IP8_3_0)
  61. #define GPSR1_20 F_(AVB0_AVTP_CAPTURE, IP7_31_28)
  62. #define GPSR1_19 FM(AVB0_AVTP_MATCH)
  63. #define GPSR1_18 FM(AVB0_LINK)
  64. #define GPSR1_17 FM(AVB0_PHY_INT)
  65. #define GPSR1_16 FM(AVB0_MAGIC)
  66. #define GPSR1_15 FM(AVB0_MDC)
  67. #define GPSR1_14 FM(AVB0_MDIO)
  68. #define GPSR1_13 FM(AVB0_TXCREFCLK)
  69. #define GPSR1_12 FM(AVB0_TD3)
  70. #define GPSR1_11 FM(AVB0_TD2)
  71. #define GPSR1_10 FM(AVB0_TD1)
  72. #define GPSR1_9 FM(AVB0_TD0)
  73. #define GPSR1_8 FM(AVB0_TXC)
  74. #define GPSR1_7 FM(AVB0_TX_CTL)
  75. #define GPSR1_6 FM(AVB0_RD3)
  76. #define GPSR1_5 FM(AVB0_RD2)
  77. #define GPSR1_4 FM(AVB0_RD1)
  78. #define GPSR1_3 FM(AVB0_RD0)
  79. #define GPSR1_2 FM(AVB0_RXC)
  80. #define GPSR1_1 FM(AVB0_RX_CTL)
  81. #define GPSR1_0 F_(IRQ0, IP2_27_24)
  82. /* GPSR2 */
  83. #define GPSR2_16 F_(VI0_FIELD, IP4_31_28)
  84. #define GPSR2_15 F_(VI0_DATA11, IP4_27_24)
  85. #define GPSR2_14 F_(VI0_DATA10, IP4_23_20)
  86. #define GPSR2_13 F_(VI0_DATA9, IP4_19_16)
  87. #define GPSR2_12 F_(VI0_DATA8, IP4_15_12)
  88. #define GPSR2_11 F_(VI0_DATA7, IP4_11_8)
  89. #define GPSR2_10 F_(VI0_DATA6, IP4_7_4)
  90. #define GPSR2_9 F_(VI0_DATA5, IP4_3_0)
  91. #define GPSR2_8 F_(VI0_DATA4, IP3_31_28)
  92. #define GPSR2_7 F_(VI0_DATA3, IP3_27_24)
  93. #define GPSR2_6 F_(VI0_DATA2, IP3_23_20)
  94. #define GPSR2_5 F_(VI0_DATA1, IP3_19_16)
  95. #define GPSR2_4 F_(VI0_DATA0, IP3_15_12)
  96. #define GPSR2_3 F_(VI0_VSYNC_N, IP3_11_8)
  97. #define GPSR2_2 F_(VI0_HSYNC_N, IP3_7_4)
  98. #define GPSR2_1 F_(VI0_CLKENB, IP3_3_0)
  99. #define GPSR2_0 F_(VI0_CLK, IP2_31_28)
  100. /* GPSR3 */
  101. #define GPSR3_16 F_(VI1_FIELD, IP7_3_0)
  102. #define GPSR3_15 F_(VI1_DATA11, IP6_31_28)
  103. #define GPSR3_14 F_(VI1_DATA10, IP6_27_24)
  104. #define GPSR3_13 F_(VI1_DATA9, IP6_23_20)
  105. #define GPSR3_12 F_(VI1_DATA8, IP6_19_16)
  106. #define GPSR3_11 F_(VI1_DATA7, IP6_15_12)
  107. #define GPSR3_10 F_(VI1_DATA6, IP6_11_8)
  108. #define GPSR3_9 F_(VI1_DATA5, IP6_7_4)
  109. #define GPSR3_8 F_(VI1_DATA4, IP6_3_0)
  110. #define GPSR3_7 F_(VI1_DATA3, IP5_31_28)
  111. #define GPSR3_6 F_(VI1_DATA2, IP5_27_24)
  112. #define GPSR3_5 F_(VI1_DATA1, IP5_23_20)
  113. #define GPSR3_4 F_(VI1_DATA0, IP5_19_16)
  114. #define GPSR3_3 F_(VI1_VSYNC_N, IP5_15_12)
  115. #define GPSR3_2 F_(VI1_HSYNC_N, IP5_11_8)
  116. #define GPSR3_1 F_(VI1_CLKENB, IP5_7_4)
  117. #define GPSR3_0 F_(VI1_CLK, IP5_3_0)
  118. /* GPSR4 */
  119. #define GPSR4_5 F_(SDA2, IP7_27_24)
  120. #define GPSR4_4 F_(SCL2, IP7_23_20)
  121. #define GPSR4_3 F_(SDA1, IP7_19_16)
  122. #define GPSR4_2 F_(SCL1, IP7_15_12)
  123. #define GPSR4_1 F_(SDA0, IP7_11_8)
  124. #define GPSR4_0 F_(SCL0, IP7_7_4)
  125. /* GPSR5 */
  126. #define GPSR5_14 FM(RPC_INT_N)
  127. #define GPSR5_13 FM(RPC_WP_N)
  128. #define GPSR5_12 FM(RPC_RESET_N)
  129. #define GPSR5_11 FM(QSPI1_SSL)
  130. #define GPSR5_10 FM(QSPI1_IO3)
  131. #define GPSR5_9 FM(QSPI1_IO2)
  132. #define GPSR5_8 FM(QSPI1_MISO_IO1)
  133. #define GPSR5_7 FM(QSPI1_MOSI_IO0)
  134. #define GPSR5_6 FM(QSPI1_SPCLK)
  135. #define GPSR5_5 FM(QSPI0_SSL)
  136. #define GPSR5_4 FM(QSPI0_IO3)
  137. #define GPSR5_3 FM(QSPI0_IO2)
  138. #define GPSR5_2 FM(QSPI0_MISO_IO1)
  139. #define GPSR5_1 FM(QSPI0_MOSI_IO0)
  140. #define GPSR5_0 FM(QSPI0_SPCLK)
  141. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  142. #define IP0_3_0 FM(DU_DR2) FM(HSCK0) F_(0, 0) FM(A0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  143. #define IP0_7_4 FM(DU_DR3) FM(HRTS0_N) F_(0, 0) FM(A1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  144. #define IP0_11_8 FM(DU_DR4) FM(HCTS0_N) F_(0, 0) FM(A2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  145. #define IP0_15_12 FM(DU_DR5) FM(HTX0) F_(0, 0) FM(A3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  146. #define IP0_19_16 FM(DU_DR6) FM(MSIOF3_RXD) F_(0, 0) FM(A4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  147. #define IP0_23_20 FM(DU_DR7) FM(MSIOF3_TXD) F_(0, 0) FM(A5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  148. #define IP0_27_24 FM(DU_DG2) FM(MSIOF3_SS1) F_(0, 0) FM(A6) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  149. #define IP0_31_28 FM(DU_DG3) FM(MSIOF3_SS2) F_(0, 0) FM(A7) FM(PWMFSW0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  150. #define IP1_3_0 FM(DU_DG4) F_(0, 0) F_(0, 0) FM(A8) FM(FSO_CFE_0_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  151. #define IP1_7_4 FM(DU_DG5) F_(0, 0) F_(0, 0) FM(A9) FM(FSO_CFE_1_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  152. #define IP1_11_8 FM(DU_DG6) F_(0, 0) F_(0, 0) FM(A10) FM(FSO_TOE_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  153. #define IP1_15_12 FM(DU_DG7) F_(0, 0) F_(0, 0) FM(A11) FM(IRQ1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  154. #define IP1_19_16 FM(DU_DB2) F_(0, 0) F_(0, 0) FM(A12) FM(IRQ2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  155. #define IP1_23_20 FM(DU_DB3) F_(0, 0) F_(0, 0) FM(A13) FM(FXR_CLKOUT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  156. #define IP1_27_24 FM(DU_DB4) F_(0, 0) F_(0, 0) FM(A14) FM(FXR_CLKOUT2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  157. #define IP1_31_28 FM(DU_DB5) F_(0, 0) F_(0, 0) FM(A15) FM(FXR_TXENA_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  158. #define IP2_3_0 FM(DU_DB6) F_(0, 0) F_(0, 0) FM(A16) FM(FXR_TXENB_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  159. #define IP2_7_4 FM(DU_DB7) F_(0, 0) F_(0, 0) FM(A17) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  160. #define IP2_11_8 FM(DU_DOTCLKOUT) FM(SCIF_CLK_A) F_(0, 0) FM(A18) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  161. #define IP2_15_12 FM(DU_EXHSYNC_DU_HSYNC) FM(HRX0) F_(0, 0) FM(A19) FM(IRQ3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  162. #define IP2_19_16 FM(DU_EXVSYNC_DU_VSYNC) FM(MSIOF3_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  163. #define IP2_23_20 FM(DU_EXODDF_DU_ODDF_DISP_CDE) FM(MSIOF3_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  164. #define IP2_27_24 FM(IRQ0) FM(CC5_OSCOUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  165. #define IP2_31_28 FM(VI0_CLK) FM(MSIOF2_SCK) FM(SCK3) F_(0, 0) FM(HSCK3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  166. #define IP3_3_0 FM(VI0_CLKENB) FM(MSIOF2_RXD) FM(RX3) FM(RD_WR_N) FM(HCTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  167. #define IP3_7_4 FM(VI0_HSYNC_N) FM(MSIOF2_TXD) FM(TX3) F_(0, 0) FM(HRTS3_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  168. #define IP3_11_8 FM(VI0_VSYNC_N) FM(MSIOF2_SYNC) FM(CTS3_N) F_(0, 0) FM(HTX3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  169. #define IP3_15_12 FM(VI0_DATA0) FM(MSIOF2_SS1) FM(RTS3_N_TANS) F_(0, 0) FM(HRX3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  170. #define IP3_19_16 FM(VI0_DATA1) FM(MSIOF2_SS2) FM(SCK1) F_(0, 0) FM(SPEEDIN_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  171. #define IP3_23_20 FM(VI0_DATA2) FM(AVB0_AVTP_PPS) FM(SDA3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  172. #define IP3_27_24 FM(VI0_DATA3) FM(HSCK1) FM(SCL3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  173. #define IP3_31_28 FM(VI0_DATA4) FM(HRTS1_N) FM(RX1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  174. #define IP4_3_0 FM(VI0_DATA5) FM(HCTS1_N) FM(TX1_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  175. #define IP4_7_4 FM(VI0_DATA6) FM(HTX1) FM(CTS1_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  176. #define IP4_11_8 FM(VI0_DATA7) FM(HRX1) FM(RTS1_N_TANS) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  177. #define IP4_15_12 FM(VI0_DATA8) FM(HSCK2) FM(PWM0_A) FM(A22) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  178. #define IP4_19_16 FM(VI0_DATA9) FM(HCTS2_N) FM(PWM1_A) FM(A23) FM(FSO_CFE_0_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  179. #define IP4_23_20 FM(VI0_DATA10) FM(HRTS2_N) FM(PWM2_A) FM(A24) FM(FSO_CFE_1_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  180. #define IP4_27_24 FM(VI0_DATA11) FM(HTX2) FM(PWM3_A) FM(A25) FM(FSO_TOE_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  181. #define IP4_31_28 FM(VI0_FIELD) FM(HRX2) FM(PWM4_A) FM(CS1_N) FM(FSCLKST2_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  182. #define IP5_3_0 FM(VI1_CLK) FM(MSIOF1_RXD) F_(0, 0) FM(CS0_N) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  183. #define IP5_7_4 FM(VI1_CLKENB) FM(MSIOF1_TXD) F_(0, 0) FM(D0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  184. #define IP5_11_8 FM(VI1_HSYNC_N) FM(MSIOF1_SCK) F_(0, 0) FM(D1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  185. #define IP5_15_12 FM(VI1_VSYNC_N) FM(MSIOF1_SYNC) F_(0, 0) FM(D2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  186. #define IP5_19_16 FM(VI1_DATA0) FM(MSIOF1_SS1) F_(0, 0) FM(D3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  187. #define IP5_23_20 FM(VI1_DATA1) FM(MSIOF1_SS2) F_(0, 0) FM(D4) FM(MMC_CMD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  188. #define IP5_27_24 FM(VI1_DATA2) FM(CANFD0_TX_B) F_(0, 0) FM(D5) FM(MMC_D0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  189. #define IP5_31_28 FM(VI1_DATA3) FM(CANFD0_RX_B) F_(0, 0) FM(D6) FM(MMC_D1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  190. #define IP6_3_0 FM(VI1_DATA4) FM(CANFD_CLK_B) F_(0, 0) FM(D7) FM(MMC_D2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  191. #define IP6_7_4 FM(VI1_DATA5) F_(0,0) FM(SCK4) FM(D8) FM(MMC_D3) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  192. #define IP6_11_8 FM(VI1_DATA6) F_(0,0) FM(RX4) FM(D9) FM(MMC_CLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  193. #define IP6_15_12 FM(VI1_DATA7) F_(0,0) FM(TX4) FM(D10) FM(MMC_D4) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  194. #define IP6_19_16 FM(VI1_DATA8) F_(0,0) FM(CTS4_N) FM(D11) FM(MMC_D5) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  195. #define IP6_23_20 FM(VI1_DATA9) F_(0,0) FM(RTS4_N_TANS) FM(D12) FM(MMC_D6) FM(SCL3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  196. #define IP6_27_24 FM(VI1_DATA10) F_(0,0) F_(0, 0) FM(D13) FM(MMC_D7) FM(SDA3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  197. #define IP6_31_28 FM(VI1_DATA11) FM(SCL4) FM(IRQ4) FM(D14) FM(MMC_WP) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  198. #define IP7_3_0 FM(VI1_FIELD) FM(SDA4) FM(IRQ5) FM(D15) FM(MMC_CD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  199. #define IP7_7_4 FM(SCL0) FM(DU_DR0) FM(TPU0TO0) FM(CLKOUT) F_(0, 0) FM(MSIOF0_RXD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  200. #define IP7_11_8 FM(SDA0) FM(DU_DR1) FM(TPU0TO1) FM(BS_N) FM(SCK0) FM(MSIOF0_TXD) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  201. #define IP7_15_12 FM(SCL1) FM(DU_DG0) FM(TPU0TO2) FM(RD_N) FM(CTS0_N) FM(MSIOF0_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  202. #define IP7_19_16 FM(SDA1) FM(DU_DG1) FM(TPU0TO3) FM(WE0_N) FM(RTS0_N_TANS) FM(MSIOF0_SYNC) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  203. #define IP7_23_20 FM(SCL2) FM(DU_DB0) FM(TCLK1_A) FM(WE1_N) FM(RX0) FM(MSIOF0_SS1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  204. #define IP7_27_24 FM(SDA2) FM(DU_DB1) FM(TCLK2_A) FM(EX_WAIT0) FM(TX0) FM(MSIOF0_SS2) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  205. #define IP7_31_28 FM(AVB0_AVTP_CAPTURE) F_(0, 0) F_(0, 0) F_(0, 0) FM(FSCLKST2_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  206. #define IP8_3_0 FM(CANFD0_TX_A) FM(FXR_TXDA) FM(PWM0_B) FM(DU_DISP) FM(FSCLKST2_N_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  207. #define IP8_7_4 FM(CANFD0_RX_A) FM(RXDA_EXTFXR) FM(PWM1_B) FM(DU_CDE) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  208. #define IP8_11_8 FM(CANFD1_TX) FM(FXR_TXDB) FM(PWM2_B) FM(TCLK1_B) FM(TX1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  209. #define IP8_15_12 FM(CANFD1_RX) FM(RXDB_EXTFXR) FM(PWM3_B) FM(TCLK2_B) FM(RX1_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  210. #define IP8_19_16 FM(CANFD_CLK_A) FM(CLK_EXTFXR) FM(PWM4_B) FM(SPEEDIN_B) FM(SCIF_CLK_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  211. #define IP8_23_20 FM(DIGRF_CLKIN) FM(DIGRF_CLKEN_IN) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  212. #define IP8_27_24 FM(DIGRF_CLKOUT) FM(DIGRF_CLKEN_OUT) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  213. #define IP8_31_28 F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  214. #define PINMUX_GPSR \
  215. \
  216. GPSR1_27 \
  217. GPSR1_26 \
  218. GPSR1_25 \
  219. GPSR1_24 \
  220. GPSR1_23 \
  221. GPSR1_22 \
  222. GPSR0_21 GPSR1_21 \
  223. GPSR0_20 GPSR1_20 \
  224. GPSR0_19 GPSR1_19 \
  225. GPSR0_18 GPSR1_18 \
  226. GPSR0_17 GPSR1_17 \
  227. GPSR0_16 GPSR1_16 GPSR2_16 GPSR3_16 \
  228. GPSR0_15 GPSR1_15 GPSR2_15 GPSR3_15 \
  229. GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR5_14 \
  230. GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR5_13 \
  231. GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR5_12 \
  232. GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR5_11 \
  233. GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR5_10 \
  234. GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR5_9 \
  235. GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR5_8 \
  236. GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR5_7 \
  237. GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR5_6 \
  238. GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 \
  239. GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 \
  240. GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 \
  241. GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 \
  242. GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 \
  243. GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0
  244. #define PINMUX_IPSR \
  245. \
  246. FM(IP0_3_0) IP0_3_0 FM(IP1_3_0) IP1_3_0 FM(IP2_3_0) IP2_3_0 FM(IP3_3_0) IP3_3_0 \
  247. FM(IP0_7_4) IP0_7_4 FM(IP1_7_4) IP1_7_4 FM(IP2_7_4) IP2_7_4 FM(IP3_7_4) IP3_7_4 \
  248. FM(IP0_11_8) IP0_11_8 FM(IP1_11_8) IP1_11_8 FM(IP2_11_8) IP2_11_8 FM(IP3_11_8) IP3_11_8 \
  249. FM(IP0_15_12) IP0_15_12 FM(IP1_15_12) IP1_15_12 FM(IP2_15_12) IP2_15_12 FM(IP3_15_12) IP3_15_12 \
  250. FM(IP0_19_16) IP0_19_16 FM(IP1_19_16) IP1_19_16 FM(IP2_19_16) IP2_19_16 FM(IP3_19_16) IP3_19_16 \
  251. FM(IP0_23_20) IP0_23_20 FM(IP1_23_20) IP1_23_20 FM(IP2_23_20) IP2_23_20 FM(IP3_23_20) IP3_23_20 \
  252. FM(IP0_27_24) IP0_27_24 FM(IP1_27_24) IP1_27_24 FM(IP2_27_24) IP2_27_24 FM(IP3_27_24) IP3_27_24 \
  253. FM(IP0_31_28) IP0_31_28 FM(IP1_31_28) IP1_31_28 FM(IP2_31_28) IP2_31_28 FM(IP3_31_28) IP3_31_28 \
  254. \
  255. FM(IP4_3_0) IP4_3_0 FM(IP5_3_0) IP5_3_0 FM(IP6_3_0) IP6_3_0 FM(IP7_3_0) IP7_3_0 \
  256. FM(IP4_7_4) IP4_7_4 FM(IP5_7_4) IP5_7_4 FM(IP6_7_4) IP6_7_4 FM(IP7_7_4) IP7_7_4 \
  257. FM(IP4_11_8) IP4_11_8 FM(IP5_11_8) IP5_11_8 FM(IP6_11_8) IP6_11_8 FM(IP7_11_8) IP7_11_8 \
  258. FM(IP4_15_12) IP4_15_12 FM(IP5_15_12) IP5_15_12 FM(IP6_15_12) IP6_15_12 FM(IP7_15_12) IP7_15_12 \
  259. FM(IP4_19_16) IP4_19_16 FM(IP5_19_16) IP5_19_16 FM(IP6_19_16) IP6_19_16 FM(IP7_19_16) IP7_19_16 \
  260. FM(IP4_23_20) IP4_23_20 FM(IP5_23_20) IP5_23_20 FM(IP6_23_20) IP6_23_20 FM(IP7_23_20) IP7_23_20 \
  261. FM(IP4_27_24) IP4_27_24 FM(IP5_27_24) IP5_27_24 FM(IP6_27_24) IP6_27_24 FM(IP7_27_24) IP7_27_24 \
  262. FM(IP4_31_28) IP4_31_28 FM(IP5_31_28) IP5_31_28 FM(IP6_31_28) IP6_31_28 FM(IP7_31_28) IP7_31_28 \
  263. \
  264. FM(IP8_3_0) IP8_3_0 \
  265. FM(IP8_7_4) IP8_7_4 \
  266. FM(IP8_11_8) IP8_11_8 \
  267. FM(IP8_15_12) IP8_15_12 \
  268. FM(IP8_19_16) IP8_19_16 \
  269. FM(IP8_23_20) IP8_23_20 \
  270. FM(IP8_27_24) IP8_27_24 \
  271. FM(IP8_31_28) IP8_31_28
  272. /* MOD_SEL0 */ /* 0 */ /* 1 */
  273. #define MOD_SEL0_11 FM(SEL_I2C3_0) FM(SEL_I2C3_1)
  274. #define MOD_SEL0_10 FM(SEL_HSCIF0_0) FM(SEL_HSCIF0_1)
  275. #define MOD_SEL0_9 FM(SEL_SCIF1_0) FM(SEL_SCIF1_1)
  276. #define MOD_SEL0_8 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1)
  277. #define MOD_SEL0_7 FM(SEL_PWM4_0) FM(SEL_PWM4_1)
  278. #define MOD_SEL0_6 FM(SEL_PWM3_0) FM(SEL_PWM3_1)
  279. #define MOD_SEL0_5 FM(SEL_PWM2_0) FM(SEL_PWM2_1)
  280. #define MOD_SEL0_4 FM(SEL_PWM1_0) FM(SEL_PWM1_1)
  281. #define MOD_SEL0_3 FM(SEL_PWM0_0) FM(SEL_PWM0_1)
  282. #define MOD_SEL0_2 FM(SEL_RFSO_0) FM(SEL_RFSO_1)
  283. #define MOD_SEL0_1 FM(SEL_RSP_0) FM(SEL_RSP_1)
  284. #define MOD_SEL0_0 FM(SEL_TMU_0) FM(SEL_TMU_1)
  285. #define PINMUX_MOD_SELS \
  286. \
  287. MOD_SEL0_11 \
  288. MOD_SEL0_10 \
  289. MOD_SEL0_9 \
  290. MOD_SEL0_8 \
  291. MOD_SEL0_7 \
  292. MOD_SEL0_6 \
  293. MOD_SEL0_5 \
  294. MOD_SEL0_4 \
  295. MOD_SEL0_3 \
  296. MOD_SEL0_2 \
  297. MOD_SEL0_1 \
  298. MOD_SEL0_0
  299. enum {
  300. PINMUX_RESERVED = 0,
  301. PINMUX_DATA_BEGIN,
  302. GP_ALL(DATA),
  303. PINMUX_DATA_END,
  304. #define F_(x, y)
  305. #define FM(x) FN_##x,
  306. PINMUX_FUNCTION_BEGIN,
  307. GP_ALL(FN),
  308. PINMUX_GPSR
  309. PINMUX_IPSR
  310. PINMUX_MOD_SELS
  311. PINMUX_FUNCTION_END,
  312. #undef F_
  313. #undef FM
  314. #define F_(x, y)
  315. #define FM(x) x##_MARK,
  316. PINMUX_MARK_BEGIN,
  317. PINMUX_GPSR
  318. PINMUX_IPSR
  319. PINMUX_MOD_SELS
  320. PINMUX_MARK_END,
  321. #undef F_
  322. #undef FM
  323. };
  324. static const u16 pinmux_data[] = {
  325. PINMUX_DATA_GP_ALL(),
  326. PINMUX_SINGLE(AVB0_RX_CTL),
  327. PINMUX_SINGLE(AVB0_RXC),
  328. PINMUX_SINGLE(AVB0_RD0),
  329. PINMUX_SINGLE(AVB0_RD1),
  330. PINMUX_SINGLE(AVB0_RD2),
  331. PINMUX_SINGLE(AVB0_RD3),
  332. PINMUX_SINGLE(AVB0_TX_CTL),
  333. PINMUX_SINGLE(AVB0_TXC),
  334. PINMUX_SINGLE(AVB0_TD0),
  335. PINMUX_SINGLE(AVB0_TD1),
  336. PINMUX_SINGLE(AVB0_TD2),
  337. PINMUX_SINGLE(AVB0_TD3),
  338. PINMUX_SINGLE(AVB0_TXCREFCLK),
  339. PINMUX_SINGLE(AVB0_MDIO),
  340. PINMUX_SINGLE(AVB0_MDC),
  341. PINMUX_SINGLE(AVB0_MAGIC),
  342. PINMUX_SINGLE(AVB0_PHY_INT),
  343. PINMUX_SINGLE(AVB0_LINK),
  344. PINMUX_SINGLE(AVB0_AVTP_MATCH),
  345. PINMUX_SINGLE(QSPI0_SPCLK),
  346. PINMUX_SINGLE(QSPI0_MOSI_IO0),
  347. PINMUX_SINGLE(QSPI0_MISO_IO1),
  348. PINMUX_SINGLE(QSPI0_IO2),
  349. PINMUX_SINGLE(QSPI0_IO3),
  350. PINMUX_SINGLE(QSPI0_SSL),
  351. PINMUX_SINGLE(QSPI1_SPCLK),
  352. PINMUX_SINGLE(QSPI1_MOSI_IO0),
  353. PINMUX_SINGLE(QSPI1_MISO_IO1),
  354. PINMUX_SINGLE(QSPI1_IO2),
  355. PINMUX_SINGLE(QSPI1_IO3),
  356. PINMUX_SINGLE(QSPI1_SSL),
  357. PINMUX_SINGLE(RPC_RESET_N),
  358. PINMUX_SINGLE(RPC_WP_N),
  359. PINMUX_SINGLE(RPC_INT_N),
  360. /* IPSR0 */
  361. PINMUX_IPSR_GPSR(IP0_3_0, DU_DR2),
  362. PINMUX_IPSR_GPSR(IP0_3_0, HSCK0),
  363. PINMUX_IPSR_GPSR(IP0_3_0, A0),
  364. PINMUX_IPSR_GPSR(IP0_7_4, DU_DR3),
  365. PINMUX_IPSR_GPSR(IP0_7_4, HRTS0_N),
  366. PINMUX_IPSR_GPSR(IP0_7_4, A1),
  367. PINMUX_IPSR_GPSR(IP0_11_8, DU_DR4),
  368. PINMUX_IPSR_GPSR(IP0_11_8, HCTS0_N),
  369. PINMUX_IPSR_GPSR(IP0_11_8, A2),
  370. PINMUX_IPSR_GPSR(IP0_15_12, DU_DR5),
  371. PINMUX_IPSR_GPSR(IP0_15_12, HTX0),
  372. PINMUX_IPSR_GPSR(IP0_15_12, A3),
  373. PINMUX_IPSR_GPSR(IP0_19_16, DU_DR6),
  374. PINMUX_IPSR_GPSR(IP0_19_16, MSIOF3_RXD),
  375. PINMUX_IPSR_GPSR(IP0_19_16, A4),
  376. PINMUX_IPSR_GPSR(IP0_23_20, DU_DR7),
  377. PINMUX_IPSR_GPSR(IP0_23_20, MSIOF3_TXD),
  378. PINMUX_IPSR_GPSR(IP0_23_20, A5),
  379. PINMUX_IPSR_GPSR(IP0_27_24, DU_DG2),
  380. PINMUX_IPSR_GPSR(IP0_27_24, MSIOF3_SS1),
  381. PINMUX_IPSR_GPSR(IP0_27_24, A6),
  382. PINMUX_IPSR_GPSR(IP0_31_28, DU_DG3),
  383. PINMUX_IPSR_GPSR(IP0_31_28, MSIOF3_SS2),
  384. PINMUX_IPSR_GPSR(IP0_31_28, A7),
  385. PINMUX_IPSR_GPSR(IP0_31_28, PWMFSW0),
  386. /* IPSR1 */
  387. PINMUX_IPSR_GPSR(IP1_3_0, DU_DG4),
  388. PINMUX_IPSR_GPSR(IP1_3_0, A8),
  389. PINMUX_IPSR_MSEL(IP1_3_0, FSO_CFE_0_N_A, SEL_RFSO_0),
  390. PINMUX_IPSR_GPSR(IP1_7_4, DU_DG5),
  391. PINMUX_IPSR_GPSR(IP1_7_4, A9),
  392. PINMUX_IPSR_MSEL(IP1_7_4, FSO_CFE_1_N_A, SEL_RFSO_0),
  393. PINMUX_IPSR_GPSR(IP1_11_8, DU_DG6),
  394. PINMUX_IPSR_GPSR(IP1_11_8, A10),
  395. PINMUX_IPSR_MSEL(IP1_11_8, FSO_TOE_N_A, SEL_RFSO_0),
  396. PINMUX_IPSR_GPSR(IP1_15_12, DU_DG7),
  397. PINMUX_IPSR_GPSR(IP1_15_12, A11),
  398. PINMUX_IPSR_GPSR(IP1_15_12, IRQ1),
  399. PINMUX_IPSR_GPSR(IP1_19_16, DU_DB2),
  400. PINMUX_IPSR_GPSR(IP1_19_16, A12),
  401. PINMUX_IPSR_GPSR(IP1_19_16, IRQ2),
  402. PINMUX_IPSR_GPSR(IP1_23_20, DU_DB3),
  403. PINMUX_IPSR_GPSR(IP1_23_20, A13),
  404. PINMUX_IPSR_GPSR(IP1_23_20, FXR_CLKOUT1),
  405. PINMUX_IPSR_GPSR(IP1_27_24, DU_DB4),
  406. PINMUX_IPSR_GPSR(IP1_27_24, A14),
  407. PINMUX_IPSR_GPSR(IP1_27_24, FXR_CLKOUT2),
  408. PINMUX_IPSR_GPSR(IP1_31_28, DU_DB5),
  409. PINMUX_IPSR_GPSR(IP1_31_28, A15),
  410. PINMUX_IPSR_GPSR(IP1_31_28, FXR_TXENA_N),
  411. /* IPSR2 */
  412. PINMUX_IPSR_GPSR(IP2_3_0, DU_DB6),
  413. PINMUX_IPSR_GPSR(IP2_3_0, A16),
  414. PINMUX_IPSR_GPSR(IP2_3_0, FXR_TXENB_N),
  415. PINMUX_IPSR_GPSR(IP2_7_4, DU_DB7),
  416. PINMUX_IPSR_GPSR(IP2_7_4, A17),
  417. PINMUX_IPSR_GPSR(IP2_11_8, DU_DOTCLKOUT),
  418. PINMUX_IPSR_MSEL(IP2_11_8, SCIF_CLK_A, SEL_HSCIF0_0),
  419. PINMUX_IPSR_GPSR(IP2_11_8, A18),
  420. PINMUX_IPSR_GPSR(IP2_15_12, DU_EXHSYNC_DU_HSYNC),
  421. PINMUX_IPSR_GPSR(IP2_15_12, HRX0),
  422. PINMUX_IPSR_GPSR(IP2_15_12, A19),
  423. PINMUX_IPSR_GPSR(IP2_15_12, IRQ3),
  424. PINMUX_IPSR_GPSR(IP2_19_16, DU_EXVSYNC_DU_VSYNC),
  425. PINMUX_IPSR_GPSR(IP2_19_16, MSIOF3_SCK),
  426. PINMUX_IPSR_GPSR(IP2_23_20, DU_EXODDF_DU_ODDF_DISP_CDE),
  427. PINMUX_IPSR_GPSR(IP2_23_20, MSIOF3_SYNC),
  428. PINMUX_IPSR_GPSR(IP2_27_24, IRQ0),
  429. PINMUX_IPSR_GPSR(IP2_27_24, CC5_OSCOUT),
  430. PINMUX_IPSR_GPSR(IP2_31_28, VI0_CLK),
  431. PINMUX_IPSR_GPSR(IP2_31_28, MSIOF2_SCK),
  432. PINMUX_IPSR_GPSR(IP2_31_28, SCK3),
  433. PINMUX_IPSR_GPSR(IP2_31_28, HSCK3),
  434. /* IPSR3 */
  435. PINMUX_IPSR_GPSR(IP3_3_0, VI0_CLKENB),
  436. PINMUX_IPSR_GPSR(IP3_3_0, MSIOF2_RXD),
  437. PINMUX_IPSR_GPSR(IP3_3_0, RX3),
  438. PINMUX_IPSR_GPSR(IP3_3_0, RD_WR_N),
  439. PINMUX_IPSR_GPSR(IP3_3_0, HCTS3_N),
  440. PINMUX_IPSR_GPSR(IP3_7_4, VI0_HSYNC_N),
  441. PINMUX_IPSR_GPSR(IP3_7_4, MSIOF2_TXD),
  442. PINMUX_IPSR_GPSR(IP3_7_4, TX3),
  443. PINMUX_IPSR_GPSR(IP3_7_4, HRTS3_N),
  444. PINMUX_IPSR_GPSR(IP3_11_8, VI0_VSYNC_N),
  445. PINMUX_IPSR_GPSR(IP3_11_8, MSIOF2_SYNC),
  446. PINMUX_IPSR_GPSR(IP3_11_8, CTS3_N),
  447. PINMUX_IPSR_GPSR(IP3_11_8, HTX3),
  448. PINMUX_IPSR_GPSR(IP3_15_12, VI0_DATA0),
  449. PINMUX_IPSR_GPSR(IP3_15_12, MSIOF2_SS1),
  450. PINMUX_IPSR_GPSR(IP3_15_12, RTS3_N_TANS),
  451. PINMUX_IPSR_GPSR(IP3_15_12, HRX3),
  452. PINMUX_IPSR_GPSR(IP3_19_16, VI0_DATA1),
  453. PINMUX_IPSR_GPSR(IP3_19_16, MSIOF2_SS2),
  454. PINMUX_IPSR_GPSR(IP3_19_16, SCK1),
  455. PINMUX_IPSR_MSEL(IP3_19_16, SPEEDIN_A, SEL_RSP_0),
  456. PINMUX_IPSR_GPSR(IP3_23_20, VI0_DATA2),
  457. PINMUX_IPSR_GPSR(IP3_23_20, AVB0_AVTP_PPS),
  458. PINMUX_IPSR_MSEL(IP3_23_20, SDA3_A, SEL_I2C3_0),
  459. PINMUX_IPSR_GPSR(IP3_27_24, VI0_DATA3),
  460. PINMUX_IPSR_GPSR(IP3_27_24, HSCK1),
  461. PINMUX_IPSR_MSEL(IP3_27_24, SCL3_A, SEL_I2C3_0),
  462. PINMUX_IPSR_GPSR(IP3_31_28, VI0_DATA4),
  463. PINMUX_IPSR_GPSR(IP3_31_28, HRTS1_N),
  464. PINMUX_IPSR_MSEL(IP3_31_28, RX1_A, SEL_SCIF1_0),
  465. /* IPSR4 */
  466. PINMUX_IPSR_GPSR(IP4_3_0, VI0_DATA5),
  467. PINMUX_IPSR_GPSR(IP4_3_0, HCTS1_N),
  468. PINMUX_IPSR_MSEL(IP4_3_0, TX1_A, SEL_SCIF1_0),
  469. PINMUX_IPSR_GPSR(IP4_7_4, VI0_DATA6),
  470. PINMUX_IPSR_GPSR(IP4_7_4, HTX1),
  471. PINMUX_IPSR_GPSR(IP4_7_4, CTS1_N),
  472. PINMUX_IPSR_GPSR(IP4_11_8, VI0_DATA7),
  473. PINMUX_IPSR_GPSR(IP4_11_8, HRX1),
  474. PINMUX_IPSR_GPSR(IP4_11_8, RTS1_N_TANS),
  475. PINMUX_IPSR_GPSR(IP4_15_12, VI0_DATA8),
  476. PINMUX_IPSR_GPSR(IP4_15_12, HSCK2),
  477. PINMUX_IPSR_MSEL(IP4_15_12, PWM0_A, SEL_PWM0_0),
  478. PINMUX_IPSR_GPSR(IP4_19_16, VI0_DATA9),
  479. PINMUX_IPSR_GPSR(IP4_19_16, HCTS2_N),
  480. PINMUX_IPSR_MSEL(IP4_19_16, PWM1_A, SEL_PWM1_0),
  481. PINMUX_IPSR_MSEL(IP4_19_16, FSO_CFE_0_N_B, SEL_RFSO_1),
  482. PINMUX_IPSR_GPSR(IP4_23_20, VI0_DATA10),
  483. PINMUX_IPSR_GPSR(IP4_23_20, HRTS2_N),
  484. PINMUX_IPSR_MSEL(IP4_23_20, PWM2_A, SEL_PWM2_0),
  485. PINMUX_IPSR_MSEL(IP4_23_20, FSO_CFE_1_N_B, SEL_RFSO_1),
  486. PINMUX_IPSR_GPSR(IP4_27_24, VI0_DATA11),
  487. PINMUX_IPSR_GPSR(IP4_27_24, HTX2),
  488. PINMUX_IPSR_MSEL(IP4_27_24, PWM3_A, SEL_PWM3_0),
  489. PINMUX_IPSR_MSEL(IP4_27_24, FSO_TOE_N_B, SEL_RFSO_1),
  490. PINMUX_IPSR_GPSR(IP4_31_28, VI0_FIELD),
  491. PINMUX_IPSR_GPSR(IP4_31_28, HRX2),
  492. PINMUX_IPSR_MSEL(IP4_31_28, PWM4_A, SEL_PWM4_0),
  493. PINMUX_IPSR_GPSR(IP4_31_28, CS1_N),
  494. PINMUX_IPSR_GPSR(IP4_31_28, FSCLKST2_N_A),
  495. /* IPSR5 */
  496. PINMUX_IPSR_GPSR(IP5_3_0, VI1_CLK),
  497. PINMUX_IPSR_GPSR(IP5_3_0, MSIOF1_RXD),
  498. PINMUX_IPSR_GPSR(IP5_3_0, CS0_N),
  499. PINMUX_IPSR_GPSR(IP5_7_4, VI1_CLKENB),
  500. PINMUX_IPSR_GPSR(IP5_7_4, MSIOF1_TXD),
  501. PINMUX_IPSR_GPSR(IP5_7_4, D0),
  502. PINMUX_IPSR_GPSR(IP5_11_8, VI1_HSYNC_N),
  503. PINMUX_IPSR_GPSR(IP5_11_8, MSIOF1_SCK),
  504. PINMUX_IPSR_GPSR(IP5_11_8, D1),
  505. PINMUX_IPSR_GPSR(IP5_15_12, VI1_VSYNC_N),
  506. PINMUX_IPSR_GPSR(IP5_15_12, MSIOF1_SYNC),
  507. PINMUX_IPSR_GPSR(IP5_15_12, D2),
  508. PINMUX_IPSR_GPSR(IP5_19_16, VI1_DATA0),
  509. PINMUX_IPSR_GPSR(IP5_19_16, MSIOF1_SS1),
  510. PINMUX_IPSR_GPSR(IP5_19_16, D3),
  511. PINMUX_IPSR_GPSR(IP5_23_20, VI1_DATA1),
  512. PINMUX_IPSR_GPSR(IP5_23_20, MSIOF1_SS2),
  513. PINMUX_IPSR_GPSR(IP5_23_20, D4),
  514. PINMUX_IPSR_GPSR(IP5_23_20, MMC_CMD),
  515. PINMUX_IPSR_GPSR(IP5_27_24, VI1_DATA2),
  516. PINMUX_IPSR_MSEL(IP5_27_24, CANFD0_TX_B, SEL_CANFD0_1),
  517. PINMUX_IPSR_GPSR(IP5_27_24, D5),
  518. PINMUX_IPSR_GPSR(IP5_27_24, MMC_D0),
  519. PINMUX_IPSR_GPSR(IP5_31_28, VI1_DATA3),
  520. PINMUX_IPSR_MSEL(IP5_31_28, CANFD0_RX_B, SEL_CANFD0_1),
  521. PINMUX_IPSR_GPSR(IP5_31_28, D6),
  522. PINMUX_IPSR_GPSR(IP5_31_28, MMC_D1),
  523. /* IPSR6 */
  524. PINMUX_IPSR_GPSR(IP6_3_0, VI1_DATA4),
  525. PINMUX_IPSR_MSEL(IP6_3_0, CANFD_CLK_B, SEL_CANFD0_1),
  526. PINMUX_IPSR_GPSR(IP6_3_0, D7),
  527. PINMUX_IPSR_GPSR(IP6_3_0, MMC_D2),
  528. PINMUX_IPSR_GPSR(IP6_7_4, VI1_DATA5),
  529. PINMUX_IPSR_GPSR(IP6_7_4, SCK4),
  530. PINMUX_IPSR_GPSR(IP6_7_4, D8),
  531. PINMUX_IPSR_GPSR(IP6_7_4, MMC_D3),
  532. PINMUX_IPSR_GPSR(IP6_11_8, VI1_DATA6),
  533. PINMUX_IPSR_GPSR(IP6_11_8, RX4),
  534. PINMUX_IPSR_GPSR(IP6_11_8, D9),
  535. PINMUX_IPSR_GPSR(IP6_11_8, MMC_CLK),
  536. PINMUX_IPSR_GPSR(IP6_15_12, VI1_DATA7),
  537. PINMUX_IPSR_GPSR(IP6_15_12, TX4),
  538. PINMUX_IPSR_GPSR(IP6_15_12, D10),
  539. PINMUX_IPSR_GPSR(IP6_15_12, MMC_D4),
  540. PINMUX_IPSR_GPSR(IP6_19_16, VI1_DATA8),
  541. PINMUX_IPSR_GPSR(IP6_19_16, CTS4_N),
  542. PINMUX_IPSR_GPSR(IP6_19_16, D11),
  543. PINMUX_IPSR_GPSR(IP6_19_16, MMC_D5),
  544. PINMUX_IPSR_GPSR(IP6_23_20, VI1_DATA9),
  545. PINMUX_IPSR_GPSR(IP6_23_20, RTS4_N_TANS),
  546. PINMUX_IPSR_GPSR(IP6_23_20, D12),
  547. PINMUX_IPSR_GPSR(IP6_23_20, MMC_D6),
  548. PINMUX_IPSR_MSEL(IP6_23_20, SCL3_B, SEL_I2C3_1),
  549. PINMUX_IPSR_GPSR(IP6_27_24, VI1_DATA10),
  550. PINMUX_IPSR_GPSR(IP6_27_24, D13),
  551. PINMUX_IPSR_GPSR(IP6_27_24, MMC_D7),
  552. PINMUX_IPSR_MSEL(IP6_27_24, SDA3_B, SEL_I2C3_1),
  553. PINMUX_IPSR_GPSR(IP6_31_28, VI1_DATA11),
  554. PINMUX_IPSR_GPSR(IP6_31_28, SCL4),
  555. PINMUX_IPSR_GPSR(IP6_31_28, IRQ4),
  556. PINMUX_IPSR_GPSR(IP6_31_28, D14),
  557. PINMUX_IPSR_GPSR(IP6_31_28, MMC_WP),
  558. /* IPSR7 */
  559. PINMUX_IPSR_GPSR(IP7_3_0, VI1_FIELD),
  560. PINMUX_IPSR_GPSR(IP7_3_0, SDA4),
  561. PINMUX_IPSR_GPSR(IP7_3_0, IRQ5),
  562. PINMUX_IPSR_GPSR(IP7_3_0, D15),
  563. PINMUX_IPSR_GPSR(IP7_3_0, MMC_CD),
  564. PINMUX_IPSR_GPSR(IP7_7_4, SCL0),
  565. PINMUX_IPSR_GPSR(IP7_7_4, DU_DR0),
  566. PINMUX_IPSR_GPSR(IP7_7_4, TPU0TO0),
  567. PINMUX_IPSR_GPSR(IP7_7_4, CLKOUT),
  568. PINMUX_IPSR_GPSR(IP7_7_4, MSIOF0_RXD),
  569. PINMUX_IPSR_GPSR(IP7_11_8, SDA0),
  570. PINMUX_IPSR_GPSR(IP7_11_8, DU_DR1),
  571. PINMUX_IPSR_GPSR(IP7_11_8, TPU0TO1),
  572. PINMUX_IPSR_GPSR(IP7_11_8, BS_N),
  573. PINMUX_IPSR_GPSR(IP7_11_8, SCK0),
  574. PINMUX_IPSR_GPSR(IP7_11_8, MSIOF0_TXD),
  575. PINMUX_IPSR_GPSR(IP7_15_12, SCL1),
  576. PINMUX_IPSR_GPSR(IP7_15_12, DU_DG0),
  577. PINMUX_IPSR_GPSR(IP7_15_12, TPU0TO2),
  578. PINMUX_IPSR_GPSR(IP7_15_12, RD_N),
  579. PINMUX_IPSR_GPSR(IP7_15_12, CTS0_N),
  580. PINMUX_IPSR_GPSR(IP7_15_12, MSIOF0_SCK),
  581. PINMUX_IPSR_GPSR(IP7_19_16, SDA1),
  582. PINMUX_IPSR_GPSR(IP7_19_16, DU_DG1),
  583. PINMUX_IPSR_GPSR(IP7_19_16, TPU0TO3),
  584. PINMUX_IPSR_GPSR(IP7_19_16, WE0_N),
  585. PINMUX_IPSR_GPSR(IP7_19_16, RTS0_N_TANS),
  586. PINMUX_IPSR_GPSR(IP7_19_16, MSIOF0_SYNC),
  587. PINMUX_IPSR_GPSR(IP7_23_20, SCL2),
  588. PINMUX_IPSR_GPSR(IP7_23_20, DU_DB0),
  589. PINMUX_IPSR_MSEL(IP7_23_20, TCLK1_A, SEL_TMU_0),
  590. PINMUX_IPSR_GPSR(IP7_23_20, WE1_N),
  591. PINMUX_IPSR_GPSR(IP7_23_20, RX0),
  592. PINMUX_IPSR_GPSR(IP7_23_20, MSIOF0_SS1),
  593. PINMUX_IPSR_GPSR(IP7_27_24, SDA2),
  594. PINMUX_IPSR_GPSR(IP7_27_24, DU_DB1),
  595. PINMUX_IPSR_MSEL(IP7_27_24, TCLK2_A, SEL_TMU_0),
  596. PINMUX_IPSR_GPSR(IP7_27_24, EX_WAIT0),
  597. PINMUX_IPSR_GPSR(IP7_27_24, TX0),
  598. PINMUX_IPSR_GPSR(IP7_27_24, MSIOF0_SS2),
  599. PINMUX_IPSR_GPSR(IP7_31_28, AVB0_AVTP_CAPTURE),
  600. PINMUX_IPSR_GPSR(IP7_31_28, FSCLKST2_N_B),
  601. /* IPSR8 */
  602. PINMUX_IPSR_MSEL(IP8_3_0, CANFD0_TX_A, SEL_CANFD0_0),
  603. PINMUX_IPSR_GPSR(IP8_3_0, FXR_TXDA),
  604. PINMUX_IPSR_MSEL(IP8_3_0, PWM0_B, SEL_PWM0_1),
  605. PINMUX_IPSR_GPSR(IP8_3_0, DU_DISP),
  606. PINMUX_IPSR_GPSR(IP8_3_0, FSCLKST2_N_C),
  607. PINMUX_IPSR_MSEL(IP8_7_4, CANFD0_RX_A, SEL_CANFD0_0),
  608. PINMUX_IPSR_GPSR(IP8_7_4, RXDA_EXTFXR),
  609. PINMUX_IPSR_MSEL(IP8_7_4, PWM1_B, SEL_PWM1_1),
  610. PINMUX_IPSR_GPSR(IP8_7_4, DU_CDE),
  611. PINMUX_IPSR_GPSR(IP8_11_8, CANFD1_TX),
  612. PINMUX_IPSR_GPSR(IP8_11_8, FXR_TXDB),
  613. PINMUX_IPSR_MSEL(IP8_11_8, PWM2_B, SEL_PWM2_1),
  614. PINMUX_IPSR_MSEL(IP8_11_8, TCLK1_B, SEL_TMU_1),
  615. PINMUX_IPSR_MSEL(IP8_11_8, TX1_B, SEL_SCIF1_1),
  616. PINMUX_IPSR_GPSR(IP8_15_12, CANFD1_RX),
  617. PINMUX_IPSR_GPSR(IP8_15_12, RXDB_EXTFXR),
  618. PINMUX_IPSR_MSEL(IP8_15_12, PWM3_B, SEL_PWM3_1),
  619. PINMUX_IPSR_MSEL(IP8_15_12, TCLK2_B, SEL_TMU_1),
  620. PINMUX_IPSR_MSEL(IP8_15_12, RX1_B, SEL_SCIF1_1),
  621. PINMUX_IPSR_MSEL(IP8_19_16, CANFD_CLK_A, SEL_CANFD0_0),
  622. PINMUX_IPSR_GPSR(IP8_19_16, CLK_EXTFXR),
  623. PINMUX_IPSR_MSEL(IP8_19_16, PWM4_B, SEL_PWM4_1),
  624. PINMUX_IPSR_MSEL(IP8_19_16, SPEEDIN_B, SEL_RSP_1),
  625. PINMUX_IPSR_MSEL(IP8_19_16, SCIF_CLK_B, SEL_HSCIF0_1),
  626. PINMUX_IPSR_GPSR(IP8_23_20, DIGRF_CLKIN),
  627. PINMUX_IPSR_GPSR(IP8_23_20, DIGRF_CLKEN_IN),
  628. PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKOUT),
  629. PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKEN_OUT),
  630. };
  631. static const struct sh_pfc_pin pinmux_pins[] = {
  632. PINMUX_GPIO_GP_ALL(),
  633. };
  634. /* - AVB0 ------------------------------------------------------------------- */
  635. static const unsigned int avb0_link_pins[] = {
  636. /* AVB0_LINK */
  637. RCAR_GP_PIN(1, 18),
  638. };
  639. static const unsigned int avb0_link_mux[] = {
  640. AVB0_LINK_MARK,
  641. };
  642. static const unsigned int avb0_magic_pins[] = {
  643. /* AVB0_MAGIC */
  644. RCAR_GP_PIN(1, 16),
  645. };
  646. static const unsigned int avb0_magic_mux[] = {
  647. AVB0_MAGIC_MARK,
  648. };
  649. static const unsigned int avb0_phy_int_pins[] = {
  650. /* AVB0_PHY_INT */
  651. RCAR_GP_PIN(1, 17),
  652. };
  653. static const unsigned int avb0_phy_int_mux[] = {
  654. AVB0_PHY_INT_MARK,
  655. };
  656. static const unsigned int avb0_mdio_pins[] = {
  657. /* AVB0_MDC, AVB0_MDIO */
  658. RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14),
  659. };
  660. static const unsigned int avb0_mdio_mux[] = {
  661. AVB0_MDC_MARK, AVB0_MDIO_MARK,
  662. };
  663. static const unsigned int avb0_rgmii_pins[] = {
  664. /*
  665. * AVB0_TX_CTL, AVB0_TXC, AVB0_TD0, AVB0_TD1, AVB0_TD2, AVB0_TD3,
  666. * AVB0_RX_CTL, AVB0_RXC, AVB0_RD0, AVB0_RD1, AVB0_RD2, AVB0_RD3
  667. */
  668. RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8),
  669. RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 10),
  670. RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 12),
  671. RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 2),
  672. RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 4),
  673. RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
  674. };
  675. static const unsigned int avb0_rgmii_mux[] = {
  676. AVB0_TX_CTL_MARK, AVB0_TXC_MARK,
  677. AVB0_TD0_MARK, AVB0_TD1_MARK, AVB0_TD2_MARK, AVB0_TD3_MARK,
  678. AVB0_RX_CTL_MARK, AVB0_RXC_MARK,
  679. AVB0_RD0_MARK, AVB0_RD1_MARK, AVB0_RD2_MARK, AVB0_RD3_MARK,
  680. };
  681. static const unsigned int avb0_txcrefclk_pins[] = {
  682. /* AVB0_TXCREFCLK */
  683. RCAR_GP_PIN(1, 13),
  684. };
  685. static const unsigned int avb0_txcrefclk_mux[] = {
  686. AVB0_TXCREFCLK_MARK,
  687. };
  688. static const unsigned int avb0_avtp_pps_pins[] = {
  689. /* AVB0_AVTP_PPS */
  690. RCAR_GP_PIN(2, 6),
  691. };
  692. static const unsigned int avb0_avtp_pps_mux[] = {
  693. AVB0_AVTP_PPS_MARK,
  694. };
  695. static const unsigned int avb0_avtp_capture_pins[] = {
  696. /* AVB0_AVTP_CAPTURE */
  697. RCAR_GP_PIN(1, 20),
  698. };
  699. static const unsigned int avb0_avtp_capture_mux[] = {
  700. AVB0_AVTP_CAPTURE_MARK,
  701. };
  702. static const unsigned int avb0_avtp_match_pins[] = {
  703. /* AVB0_AVTP_MATCH */
  704. RCAR_GP_PIN(1, 19),
  705. };
  706. static const unsigned int avb0_avtp_match_mux[] = {
  707. AVB0_AVTP_MATCH_MARK,
  708. };
  709. /* - CANFD Clock ------------------------------------------------------------ */
  710. static const unsigned int canfd_clk_a_pins[] = {
  711. /* CANFD_CLK */
  712. RCAR_GP_PIN(1, 25),
  713. };
  714. static const unsigned int canfd_clk_a_mux[] = {
  715. CANFD_CLK_A_MARK,
  716. };
  717. static const unsigned int canfd_clk_b_pins[] = {
  718. /* CANFD_CLK */
  719. RCAR_GP_PIN(3, 8),
  720. };
  721. static const unsigned int canfd_clk_b_mux[] = {
  722. CANFD_CLK_B_MARK,
  723. };
  724. /* - CANFD0 ----------------------------------------------------------------- */
  725. static const unsigned int canfd0_data_a_pins[] = {
  726. /* TX, RX */
  727. RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
  728. };
  729. static const unsigned int canfd0_data_a_mux[] = {
  730. CANFD0_TX_A_MARK, CANFD0_RX_A_MARK,
  731. };
  732. static const unsigned int canfd0_data_b_pins[] = {
  733. /* TX, RX */
  734. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  735. };
  736. static const unsigned int canfd0_data_b_mux[] = {
  737. CANFD0_TX_B_MARK, CANFD0_RX_B_MARK,
  738. };
  739. /* - CANFD1 ----------------------------------------------------------------- */
  740. static const unsigned int canfd1_data_pins[] = {
  741. /* TX, RX */
  742. RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
  743. };
  744. static const unsigned int canfd1_data_mux[] = {
  745. CANFD1_TX_MARK, CANFD1_RX_MARK,
  746. };
  747. /* - DU --------------------------------------------------------------------- */
  748. static const unsigned int du_rgb666_pins[] = {
  749. /* R[7:2], G[7:2], B[7:2] */
  750. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3),
  751. RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0),
  752. RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
  753. RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6),
  754. RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 15),
  755. RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12),
  756. };
  757. static const unsigned int du_rgb666_mux[] = {
  758. DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK,
  759. DU_DR4_MARK, DU_DR3_MARK, DU_DR2_MARK,
  760. DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK,
  761. DU_DG4_MARK, DU_DG3_MARK, DU_DG2_MARK,
  762. DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK,
  763. DU_DB4_MARK, DU_DB3_MARK, DU_DB2_MARK,
  764. };
  765. static const unsigned int du_clk_out_pins[] = {
  766. /* DOTCLKOUT */
  767. RCAR_GP_PIN(0, 18),
  768. };
  769. static const unsigned int du_clk_out_mux[] = {
  770. DU_DOTCLKOUT_MARK,
  771. };
  772. static const unsigned int du_sync_pins[] = {
  773. /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */
  774. RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19),
  775. };
  776. static const unsigned int du_sync_mux[] = {
  777. DU_EXVSYNC_DU_VSYNC_MARK, DU_EXHSYNC_DU_HSYNC_MARK
  778. };
  779. static const unsigned int du_oddf_pins[] = {
  780. /* EXODDF/ODDF/DISP/CDE */
  781. RCAR_GP_PIN(0, 21),
  782. };
  783. static const unsigned int du_oddf_mux[] = {
  784. DU_EXODDF_DU_ODDF_DISP_CDE_MARK,
  785. };
  786. static const unsigned int du_cde_pins[] = {
  787. /* CDE */
  788. RCAR_GP_PIN(1, 22),
  789. };
  790. static const unsigned int du_cde_mux[] = {
  791. DU_CDE_MARK,
  792. };
  793. static const unsigned int du_disp_pins[] = {
  794. /* DISP */
  795. RCAR_GP_PIN(1, 21),
  796. };
  797. static const unsigned int du_disp_mux[] = {
  798. DU_DISP_MARK,
  799. };
  800. /* - HSCIF0 ----------------------------------------------------------------- */
  801. static const unsigned int hscif0_data_pins[] = {
  802. /* HRX, HTX */
  803. RCAR_GP_PIN(0, 19), RCAR_GP_PIN(0, 3),
  804. };
  805. static const unsigned int hscif0_data_mux[] = {
  806. HRX0_MARK, HTX0_MARK,
  807. };
  808. static const unsigned int hscif0_clk_pins[] = {
  809. /* HSCK */
  810. RCAR_GP_PIN(0, 0),
  811. };
  812. static const unsigned int hscif0_clk_mux[] = {
  813. HSCK0_MARK,
  814. };
  815. static const unsigned int hscif0_ctrl_pins[] = {
  816. /* HRTS#, HCTS# */
  817. RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 2),
  818. };
  819. static const unsigned int hscif0_ctrl_mux[] = {
  820. HRTS0_N_MARK, HCTS0_N_MARK,
  821. };
  822. /* - HSCIF1 ----------------------------------------------------------------- */
  823. static const unsigned int hscif1_data_pins[] = {
  824. /* HRX, HTX */
  825. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
  826. };
  827. static const unsigned int hscif1_data_mux[] = {
  828. HRX1_MARK, HTX1_MARK,
  829. };
  830. static const unsigned int hscif1_clk_pins[] = {
  831. /* HSCK */
  832. RCAR_GP_PIN(2, 7),
  833. };
  834. static const unsigned int hscif1_clk_mux[] = {
  835. HSCK1_MARK,
  836. };
  837. static const unsigned int hscif1_ctrl_pins[] = {
  838. /* HRTS#, HCTS# */
  839. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  840. };
  841. static const unsigned int hscif1_ctrl_mux[] = {
  842. HRTS1_N_MARK, HCTS1_N_MARK,
  843. };
  844. /* - HSCIF2 ----------------------------------------------------------------- */
  845. static const unsigned int hscif2_data_pins[] = {
  846. /* HRX, HTX */
  847. RCAR_GP_PIN(2, 16), RCAR_GP_PIN(2, 15),
  848. };
  849. static const unsigned int hscif2_data_mux[] = {
  850. HRX2_MARK, HTX2_MARK,
  851. };
  852. static const unsigned int hscif2_clk_pins[] = {
  853. /* HSCK */
  854. RCAR_GP_PIN(2, 12),
  855. };
  856. static const unsigned int hscif2_clk_mux[] = {
  857. HSCK2_MARK,
  858. };
  859. static const unsigned int hscif2_ctrl_pins[] = {
  860. /* HRTS#, HCTS# */
  861. RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13),
  862. };
  863. static const unsigned int hscif2_ctrl_mux[] = {
  864. HRTS2_N_MARK, HCTS2_N_MARK,
  865. };
  866. /* - HSCIF3 ----------------------------------------------------------------- */
  867. static const unsigned int hscif3_data_pins[] = {
  868. /* HRX, HTX */
  869. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
  870. };
  871. static const unsigned int hscif3_data_mux[] = {
  872. HRX3_MARK, HTX3_MARK,
  873. };
  874. static const unsigned int hscif3_clk_pins[] = {
  875. /* HSCK */
  876. RCAR_GP_PIN(2, 0),
  877. };
  878. static const unsigned int hscif3_clk_mux[] = {
  879. HSCK3_MARK,
  880. };
  881. static const unsigned int hscif3_ctrl_pins[] = {
  882. /* HRTS#, HCTS# */
  883. RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 1),
  884. };
  885. static const unsigned int hscif3_ctrl_mux[] = {
  886. HRTS3_N_MARK, HCTS3_N_MARK,
  887. };
  888. /* - I2C0 ------------------------------------------------------------------- */
  889. static const unsigned int i2c0_pins[] = {
  890. /* SDA, SCL */
  891. RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 0),
  892. };
  893. static const unsigned int i2c0_mux[] = {
  894. SDA0_MARK, SCL0_MARK,
  895. };
  896. /* - I2C1 ------------------------------------------------------------------- */
  897. static const unsigned int i2c1_pins[] = {
  898. /* SDA, SCL */
  899. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
  900. };
  901. static const unsigned int i2c1_mux[] = {
  902. SDA1_MARK, SCL1_MARK,
  903. };
  904. /* - I2C2 ------------------------------------------------------------------- */
  905. static const unsigned int i2c2_pins[] = {
  906. /* SDA, SCL */
  907. RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 4),
  908. };
  909. static const unsigned int i2c2_mux[] = {
  910. SDA2_MARK, SCL2_MARK,
  911. };
  912. /* - I2C3 ------------------------------------------------------------------- */
  913. static const unsigned int i2c3_a_pins[] = {
  914. /* SDA, SCL */
  915. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  916. };
  917. static const unsigned int i2c3_a_mux[] = {
  918. SDA3_A_MARK, SCL3_A_MARK,
  919. };
  920. static const unsigned int i2c3_b_pins[] = {
  921. /* SDA, SCL */
  922. RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 13),
  923. };
  924. static const unsigned int i2c3_b_mux[] = {
  925. SDA3_B_MARK, SCL3_B_MARK,
  926. };
  927. /* - I2C4 ------------------------------------------------------------------- */
  928. static const unsigned int i2c4_pins[] = {
  929. /* SDA, SCL */
  930. RCAR_GP_PIN(3, 16), RCAR_GP_PIN(3, 15),
  931. };
  932. static const unsigned int i2c4_mux[] = {
  933. SDA4_MARK, SCL4_MARK,
  934. };
  935. /* - INTC-EX ---------------------------------------------------------------- */
  936. static const unsigned int intc_ex_irq0_pins[] = {
  937. /* IRQ0 */
  938. RCAR_GP_PIN(1, 0),
  939. };
  940. static const unsigned int intc_ex_irq0_mux[] = {
  941. IRQ0_MARK,
  942. };
  943. static const unsigned int intc_ex_irq1_pins[] = {
  944. /* IRQ1 */
  945. RCAR_GP_PIN(0, 11),
  946. };
  947. static const unsigned int intc_ex_irq1_mux[] = {
  948. IRQ1_MARK,
  949. };
  950. static const unsigned int intc_ex_irq2_pins[] = {
  951. /* IRQ2 */
  952. RCAR_GP_PIN(0, 12),
  953. };
  954. static const unsigned int intc_ex_irq2_mux[] = {
  955. IRQ2_MARK,
  956. };
  957. static const unsigned int intc_ex_irq3_pins[] = {
  958. /* IRQ3 */
  959. RCAR_GP_PIN(0, 19),
  960. };
  961. static const unsigned int intc_ex_irq3_mux[] = {
  962. IRQ3_MARK,
  963. };
  964. static const unsigned int intc_ex_irq4_pins[] = {
  965. /* IRQ4 */
  966. RCAR_GP_PIN(3, 15),
  967. };
  968. static const unsigned int intc_ex_irq4_mux[] = {
  969. IRQ4_MARK,
  970. };
  971. static const unsigned int intc_ex_irq5_pins[] = {
  972. /* IRQ5 */
  973. RCAR_GP_PIN(3, 16),
  974. };
  975. static const unsigned int intc_ex_irq5_mux[] = {
  976. IRQ5_MARK,
  977. };
  978. /* - MMC -------------------------------------------------------------------- */
  979. static const unsigned int mmc_data1_pins[] = {
  980. /* D0 */
  981. RCAR_GP_PIN(3, 6),
  982. };
  983. static const unsigned int mmc_data1_mux[] = {
  984. MMC_D0_MARK,
  985. };
  986. static const unsigned int mmc_data4_pins[] = {
  987. /* D[0:3] */
  988. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  989. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  990. };
  991. static const unsigned int mmc_data4_mux[] = {
  992. MMC_D0_MARK, MMC_D1_MARK,
  993. MMC_D2_MARK, MMC_D3_MARK,
  994. };
  995. static const unsigned int mmc_data8_pins[] = {
  996. /* D[0:7] */
  997. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  998. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  999. RCAR_GP_PIN(3, 11), RCAR_GP_PIN(3, 12),
  1000. RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
  1001. };
  1002. static const unsigned int mmc_data8_mux[] = {
  1003. MMC_D0_MARK, MMC_D1_MARK,
  1004. MMC_D2_MARK, MMC_D3_MARK,
  1005. MMC_D4_MARK, MMC_D5_MARK,
  1006. MMC_D6_MARK, MMC_D7_MARK,
  1007. };
  1008. static const unsigned int mmc_ctrl_pins[] = {
  1009. /* CLK, CMD */
  1010. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 5),
  1011. };
  1012. static const unsigned int mmc_ctrl_mux[] = {
  1013. MMC_CLK_MARK, MMC_CMD_MARK,
  1014. };
  1015. static const unsigned int mmc_cd_pins[] = {
  1016. /* CD */
  1017. RCAR_GP_PIN(3, 16),
  1018. };
  1019. static const unsigned int mmc_cd_mux[] = {
  1020. MMC_CD_MARK,
  1021. };
  1022. static const unsigned int mmc_wp_pins[] = {
  1023. /* WP */
  1024. RCAR_GP_PIN(3, 15),
  1025. };
  1026. static const unsigned int mmc_wp_mux[] = {
  1027. MMC_WP_MARK,
  1028. };
  1029. /* - MSIOF0 ----------------------------------------------------------------- */
  1030. static const unsigned int msiof0_clk_pins[] = {
  1031. /* SCK */
  1032. RCAR_GP_PIN(4, 2),
  1033. };
  1034. static const unsigned int msiof0_clk_mux[] = {
  1035. MSIOF0_SCK_MARK,
  1036. };
  1037. static const unsigned int msiof0_sync_pins[] = {
  1038. /* SYNC */
  1039. RCAR_GP_PIN(4, 3),
  1040. };
  1041. static const unsigned int msiof0_sync_mux[] = {
  1042. MSIOF0_SYNC_MARK,
  1043. };
  1044. static const unsigned int msiof0_ss1_pins[] = {
  1045. /* SS1 */
  1046. RCAR_GP_PIN(4, 4),
  1047. };
  1048. static const unsigned int msiof0_ss1_mux[] = {
  1049. MSIOF0_SS1_MARK,
  1050. };
  1051. static const unsigned int msiof0_ss2_pins[] = {
  1052. /* SS2 */
  1053. RCAR_GP_PIN(4, 5),
  1054. };
  1055. static const unsigned int msiof0_ss2_mux[] = {
  1056. MSIOF0_SS2_MARK,
  1057. };
  1058. static const unsigned int msiof0_txd_pins[] = {
  1059. /* TXD */
  1060. RCAR_GP_PIN(4, 1),
  1061. };
  1062. static const unsigned int msiof0_txd_mux[] = {
  1063. MSIOF0_TXD_MARK,
  1064. };
  1065. static const unsigned int msiof0_rxd_pins[] = {
  1066. /* RXD */
  1067. RCAR_GP_PIN(4, 0),
  1068. };
  1069. static const unsigned int msiof0_rxd_mux[] = {
  1070. MSIOF0_RXD_MARK,
  1071. };
  1072. /* - MSIOF1 ----------------------------------------------------------------- */
  1073. static const unsigned int msiof1_clk_pins[] = {
  1074. /* SCK */
  1075. RCAR_GP_PIN(3, 2),
  1076. };
  1077. static const unsigned int msiof1_clk_mux[] = {
  1078. MSIOF1_SCK_MARK,
  1079. };
  1080. static const unsigned int msiof1_sync_pins[] = {
  1081. /* SYNC */
  1082. RCAR_GP_PIN(3, 3),
  1083. };
  1084. static const unsigned int msiof1_sync_mux[] = {
  1085. MSIOF1_SYNC_MARK,
  1086. };
  1087. static const unsigned int msiof1_ss1_pins[] = {
  1088. /* SS1 */
  1089. RCAR_GP_PIN(3, 4),
  1090. };
  1091. static const unsigned int msiof1_ss1_mux[] = {
  1092. MSIOF1_SS1_MARK,
  1093. };
  1094. static const unsigned int msiof1_ss2_pins[] = {
  1095. /* SS2 */
  1096. RCAR_GP_PIN(3, 5),
  1097. };
  1098. static const unsigned int msiof1_ss2_mux[] = {
  1099. MSIOF1_SS2_MARK,
  1100. };
  1101. static const unsigned int msiof1_txd_pins[] = {
  1102. /* TXD */
  1103. RCAR_GP_PIN(3, 1),
  1104. };
  1105. static const unsigned int msiof1_txd_mux[] = {
  1106. MSIOF1_TXD_MARK,
  1107. };
  1108. static const unsigned int msiof1_rxd_pins[] = {
  1109. /* RXD */
  1110. RCAR_GP_PIN(3, 0),
  1111. };
  1112. static const unsigned int msiof1_rxd_mux[] = {
  1113. MSIOF1_RXD_MARK,
  1114. };
  1115. /* - MSIOF2 ----------------------------------------------------------------- */
  1116. static const unsigned int msiof2_clk_pins[] = {
  1117. /* SCK */
  1118. RCAR_GP_PIN(2, 0),
  1119. };
  1120. static const unsigned int msiof2_clk_mux[] = {
  1121. MSIOF2_SCK_MARK,
  1122. };
  1123. static const unsigned int msiof2_sync_pins[] = {
  1124. /* SYNC */
  1125. RCAR_GP_PIN(2, 3),
  1126. };
  1127. static const unsigned int msiof2_sync_mux[] = {
  1128. MSIOF2_SYNC_MARK,
  1129. };
  1130. static const unsigned int msiof2_ss1_pins[] = {
  1131. /* SS1 */
  1132. RCAR_GP_PIN(2, 4),
  1133. };
  1134. static const unsigned int msiof2_ss1_mux[] = {
  1135. MSIOF2_SS1_MARK,
  1136. };
  1137. static const unsigned int msiof2_ss2_pins[] = {
  1138. /* SS2 */
  1139. RCAR_GP_PIN(2, 5),
  1140. };
  1141. static const unsigned int msiof2_ss2_mux[] = {
  1142. MSIOF2_SS2_MARK,
  1143. };
  1144. static const unsigned int msiof2_txd_pins[] = {
  1145. /* TXD */
  1146. RCAR_GP_PIN(2, 2),
  1147. };
  1148. static const unsigned int msiof2_txd_mux[] = {
  1149. MSIOF2_TXD_MARK,
  1150. };
  1151. static const unsigned int msiof2_rxd_pins[] = {
  1152. /* RXD */
  1153. RCAR_GP_PIN(2, 1),
  1154. };
  1155. static const unsigned int msiof2_rxd_mux[] = {
  1156. MSIOF2_RXD_MARK,
  1157. };
  1158. /* - MSIOF3 ----------------------------------------------------------------- */
  1159. static const unsigned int msiof3_clk_pins[] = {
  1160. /* SCK */
  1161. RCAR_GP_PIN(0, 20),
  1162. };
  1163. static const unsigned int msiof3_clk_mux[] = {
  1164. MSIOF3_SCK_MARK,
  1165. };
  1166. static const unsigned int msiof3_sync_pins[] = {
  1167. /* SYNC */
  1168. RCAR_GP_PIN(0, 21),
  1169. };
  1170. static const unsigned int msiof3_sync_mux[] = {
  1171. MSIOF3_SYNC_MARK,
  1172. };
  1173. static const unsigned int msiof3_ss1_pins[] = {
  1174. /* SS1 */
  1175. RCAR_GP_PIN(0, 6),
  1176. };
  1177. static const unsigned int msiof3_ss1_mux[] = {
  1178. MSIOF3_SS1_MARK,
  1179. };
  1180. static const unsigned int msiof3_ss2_pins[] = {
  1181. /* SS2 */
  1182. RCAR_GP_PIN(0, 7),
  1183. };
  1184. static const unsigned int msiof3_ss2_mux[] = {
  1185. MSIOF3_SS2_MARK,
  1186. };
  1187. static const unsigned int msiof3_txd_pins[] = {
  1188. /* TXD */
  1189. RCAR_GP_PIN(0, 5),
  1190. };
  1191. static const unsigned int msiof3_txd_mux[] = {
  1192. MSIOF3_TXD_MARK,
  1193. };
  1194. static const unsigned int msiof3_rxd_pins[] = {
  1195. /* RXD */
  1196. RCAR_GP_PIN(0, 4),
  1197. };
  1198. static const unsigned int msiof3_rxd_mux[] = {
  1199. MSIOF3_RXD_MARK,
  1200. };
  1201. /* - PWM0 ------------------------------------------------------------------- */
  1202. static const unsigned int pwm0_a_pins[] = {
  1203. RCAR_GP_PIN(2, 12),
  1204. };
  1205. static const unsigned int pwm0_a_mux[] = {
  1206. PWM0_A_MARK,
  1207. };
  1208. static const unsigned int pwm0_b_pins[] = {
  1209. RCAR_GP_PIN(1, 21),
  1210. };
  1211. static const unsigned int pwm0_b_mux[] = {
  1212. PWM0_B_MARK,
  1213. };
  1214. /* - PWM1 ------------------------------------------------------------------- */
  1215. static const unsigned int pwm1_a_pins[] = {
  1216. RCAR_GP_PIN(2, 13),
  1217. };
  1218. static const unsigned int pwm1_a_mux[] = {
  1219. PWM1_A_MARK,
  1220. };
  1221. static const unsigned int pwm1_b_pins[] = {
  1222. RCAR_GP_PIN(1, 22),
  1223. };
  1224. static const unsigned int pwm1_b_mux[] = {
  1225. PWM1_B_MARK,
  1226. };
  1227. /* - PWM2 ------------------------------------------------------------------- */
  1228. static const unsigned int pwm2_a_pins[] = {
  1229. RCAR_GP_PIN(2, 14),
  1230. };
  1231. static const unsigned int pwm2_a_mux[] = {
  1232. PWM2_A_MARK,
  1233. };
  1234. static const unsigned int pwm2_b_pins[] = {
  1235. RCAR_GP_PIN(1, 23),
  1236. };
  1237. static const unsigned int pwm2_b_mux[] = {
  1238. PWM2_B_MARK,
  1239. };
  1240. /* - PWM3 ------------------------------------------------------------------- */
  1241. static const unsigned int pwm3_a_pins[] = {
  1242. RCAR_GP_PIN(2, 15),
  1243. };
  1244. static const unsigned int pwm3_a_mux[] = {
  1245. PWM3_A_MARK,
  1246. };
  1247. static const unsigned int pwm3_b_pins[] = {
  1248. RCAR_GP_PIN(1, 24),
  1249. };
  1250. static const unsigned int pwm3_b_mux[] = {
  1251. PWM3_B_MARK,
  1252. };
  1253. /* - PWM4 ------------------------------------------------------------------- */
  1254. static const unsigned int pwm4_a_pins[] = {
  1255. RCAR_GP_PIN(2, 16),
  1256. };
  1257. static const unsigned int pwm4_a_mux[] = {
  1258. PWM4_A_MARK,
  1259. };
  1260. static const unsigned int pwm4_b_pins[] = {
  1261. RCAR_GP_PIN(1, 25),
  1262. };
  1263. static const unsigned int pwm4_b_mux[] = {
  1264. PWM4_B_MARK,
  1265. };
  1266. /* - SCIF Clock ------------------------------------------------------------- */
  1267. static const unsigned int scif_clk_a_pins[] = {
  1268. /* SCIF_CLK */
  1269. RCAR_GP_PIN(0, 18),
  1270. };
  1271. static const unsigned int scif_clk_a_mux[] = {
  1272. SCIF_CLK_A_MARK,
  1273. };
  1274. static const unsigned int scif_clk_b_pins[] = {
  1275. /* SCIF_CLK */
  1276. RCAR_GP_PIN(1, 25),
  1277. };
  1278. static const unsigned int scif_clk_b_mux[] = {
  1279. SCIF_CLK_B_MARK,
  1280. };
  1281. /* - SCIF0 ------------------------------------------------------------------ */
  1282. static const unsigned int scif0_data_pins[] = {
  1283. /* RX, TX */
  1284. RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
  1285. };
  1286. static const unsigned int scif0_data_mux[] = {
  1287. RX0_MARK, TX0_MARK,
  1288. };
  1289. static const unsigned int scif0_clk_pins[] = {
  1290. /* SCK */
  1291. RCAR_GP_PIN(4, 1),
  1292. };
  1293. static const unsigned int scif0_clk_mux[] = {
  1294. SCK0_MARK,
  1295. };
  1296. static const unsigned int scif0_ctrl_pins[] = {
  1297. /* RTS#, CTS# */
  1298. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
  1299. };
  1300. static const unsigned int scif0_ctrl_mux[] = {
  1301. RTS0_N_TANS_MARK, CTS0_N_MARK,
  1302. };
  1303. /* - SCIF1 ------------------------------------------------------------------ */
  1304. static const unsigned int scif1_data_a_pins[] = {
  1305. /* RX, TX */
  1306. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1307. };
  1308. static const unsigned int scif1_data_a_mux[] = {
  1309. RX1_A_MARK, TX1_A_MARK,
  1310. };
  1311. static const unsigned int scif1_clk_pins[] = {
  1312. /* SCK */
  1313. RCAR_GP_PIN(2, 5),
  1314. };
  1315. static const unsigned int scif1_clk_mux[] = {
  1316. SCK1_MARK,
  1317. };
  1318. static const unsigned int scif1_ctrl_pins[] = {
  1319. /* RTS#, CTS# */
  1320. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
  1321. };
  1322. static const unsigned int scif1_ctrl_mux[] = {
  1323. RTS1_N_TANS_MARK, CTS1_N_MARK,
  1324. };
  1325. static const unsigned int scif1_data_b_pins[] = {
  1326. /* RX, TX */
  1327. RCAR_GP_PIN(1, 24), RCAR_GP_PIN(1, 23),
  1328. };
  1329. static const unsigned int scif1_data_b_mux[] = {
  1330. RX1_B_MARK, TX1_B_MARK,
  1331. };
  1332. /* - SCIF3 ------------------------------------------------------------------ */
  1333. static const unsigned int scif3_data_pins[] = {
  1334. /* RX, TX */
  1335. RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2),
  1336. };
  1337. static const unsigned int scif3_data_mux[] = {
  1338. RX3_MARK, TX3_MARK,
  1339. };
  1340. static const unsigned int scif3_clk_pins[] = {
  1341. /* SCK */
  1342. RCAR_GP_PIN(2, 0),
  1343. };
  1344. static const unsigned int scif3_clk_mux[] = {
  1345. SCK3_MARK,
  1346. };
  1347. static const unsigned int scif3_ctrl_pins[] = {
  1348. /* RTS#, CTS# */
  1349. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
  1350. };
  1351. static const unsigned int scif3_ctrl_mux[] = {
  1352. RTS3_N_TANS_MARK, CTS3_N_MARK,
  1353. };
  1354. /* - SCIF4 ------------------------------------------------------------------ */
  1355. static const unsigned int scif4_data_pins[] = {
  1356. /* RX, TX */
  1357. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1358. };
  1359. static const unsigned int scif4_data_mux[] = {
  1360. RX4_MARK, TX4_MARK,
  1361. };
  1362. static const unsigned int scif4_clk_pins[] = {
  1363. /* SCK */
  1364. RCAR_GP_PIN(3, 9),
  1365. };
  1366. static const unsigned int scif4_clk_mux[] = {
  1367. SCK4_MARK,
  1368. };
  1369. static const unsigned int scif4_ctrl_pins[] = {
  1370. /* RTS#, CTS# */
  1371. RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 12),
  1372. };
  1373. static const unsigned int scif4_ctrl_mux[] = {
  1374. RTS4_N_TANS_MARK, CTS4_N_MARK,
  1375. };
  1376. /* - TMU -------------------------------------------------------------------- */
  1377. static const unsigned int tmu_tclk1_a_pins[] = {
  1378. /* TCLK1 */
  1379. RCAR_GP_PIN(4, 4),
  1380. };
  1381. static const unsigned int tmu_tclk1_a_mux[] = {
  1382. TCLK1_A_MARK,
  1383. };
  1384. static const unsigned int tmu_tclk1_b_pins[] = {
  1385. /* TCLK1 */
  1386. RCAR_GP_PIN(1, 23),
  1387. };
  1388. static const unsigned int tmu_tclk1_b_mux[] = {
  1389. TCLK1_B_MARK,
  1390. };
  1391. static const unsigned int tmu_tclk2_a_pins[] = {
  1392. /* TCLK2 */
  1393. RCAR_GP_PIN(4, 5),
  1394. };
  1395. static const unsigned int tmu_tclk2_a_mux[] = {
  1396. TCLK2_A_MARK,
  1397. };
  1398. static const unsigned int tmu_tclk2_b_pins[] = {
  1399. /* TCLK2 */
  1400. RCAR_GP_PIN(1, 24),
  1401. };
  1402. static const unsigned int tmu_tclk2_b_mux[] = {
  1403. TCLK2_B_MARK,
  1404. };
  1405. /* - VIN0 ------------------------------------------------------------------- */
  1406. static const unsigned int vin0_data8_pins[] = {
  1407. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
  1408. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  1409. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1410. RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
  1411. };
  1412. static const unsigned int vin0_data8_mux[] = {
  1413. VI0_DATA0_MARK, VI0_DATA1_MARK,
  1414. VI0_DATA2_MARK, VI0_DATA3_MARK,
  1415. VI0_DATA4_MARK, VI0_DATA5_MARK,
  1416. VI0_DATA6_MARK, VI0_DATA7_MARK,
  1417. };
  1418. static const unsigned int vin0_data10_pins[] = {
  1419. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
  1420. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  1421. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1422. RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
  1423. RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
  1424. };
  1425. static const unsigned int vin0_data10_mux[] = {
  1426. VI0_DATA0_MARK, VI0_DATA1_MARK,
  1427. VI0_DATA2_MARK, VI0_DATA3_MARK,
  1428. VI0_DATA4_MARK, VI0_DATA5_MARK,
  1429. VI0_DATA6_MARK, VI0_DATA7_MARK,
  1430. VI0_DATA8_MARK, VI0_DATA9_MARK,
  1431. };
  1432. static const unsigned int vin0_data12_pins[] = {
  1433. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
  1434. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  1435. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1436. RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
  1437. RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
  1438. RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15),
  1439. };
  1440. static const unsigned int vin0_data12_mux[] = {
  1441. VI0_DATA0_MARK, VI0_DATA1_MARK,
  1442. VI0_DATA2_MARK, VI0_DATA3_MARK,
  1443. VI0_DATA4_MARK, VI0_DATA5_MARK,
  1444. VI0_DATA6_MARK, VI0_DATA7_MARK,
  1445. VI0_DATA8_MARK, VI0_DATA9_MARK,
  1446. VI0_DATA10_MARK, VI0_DATA11_MARK,
  1447. };
  1448. static const unsigned int vin0_sync_pins[] = {
  1449. /* HSYNC#, VSYNC# */
  1450. RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3),
  1451. };
  1452. static const unsigned int vin0_sync_mux[] = {
  1453. VI0_HSYNC_N_MARK, VI0_VSYNC_N_MARK,
  1454. };
  1455. static const unsigned int vin0_field_pins[] = {
  1456. /* FIELD */
  1457. RCAR_GP_PIN(2, 16),
  1458. };
  1459. static const unsigned int vin0_field_mux[] = {
  1460. VI0_FIELD_MARK,
  1461. };
  1462. static const unsigned int vin0_clkenb_pins[] = {
  1463. /* CLKENB */
  1464. RCAR_GP_PIN(2, 1),
  1465. };
  1466. static const unsigned int vin0_clkenb_mux[] = {
  1467. VI0_CLKENB_MARK,
  1468. };
  1469. static const unsigned int vin0_clk_pins[] = {
  1470. /* CLK */
  1471. RCAR_GP_PIN(2, 0),
  1472. };
  1473. static const unsigned int vin0_clk_mux[] = {
  1474. VI0_CLK_MARK,
  1475. };
  1476. /* - VIN1 ------------------------------------------------------------------- */
  1477. static const unsigned int vin1_data8_pins[] = {
  1478. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1479. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1480. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1481. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1482. };
  1483. static const unsigned int vin1_data8_mux[] = {
  1484. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1485. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1486. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1487. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1488. };
  1489. static const unsigned int vin1_data10_pins[] = {
  1490. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1491. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1492. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1493. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1494. RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
  1495. };
  1496. static const unsigned int vin1_data10_mux[] = {
  1497. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1498. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1499. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1500. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1501. VI1_DATA8_MARK, VI1_DATA9_MARK,
  1502. };
  1503. static const unsigned int vin1_data12_pins[] = {
  1504. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1505. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1506. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1507. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1508. RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
  1509. RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
  1510. };
  1511. static const unsigned int vin1_data12_mux[] = {
  1512. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1513. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1514. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1515. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1516. VI1_DATA8_MARK, VI1_DATA9_MARK,
  1517. VI1_DATA10_MARK, VI1_DATA11_MARK,
  1518. };
  1519. static const unsigned int vin1_sync_pins[] = {
  1520. /* HSYNC#, VSYNC# */
  1521. RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
  1522. };
  1523. static const unsigned int vin1_sync_mux[] = {
  1524. VI1_HSYNC_N_MARK, VI1_VSYNC_N_MARK,
  1525. };
  1526. static const unsigned int vin1_field_pins[] = {
  1527. RCAR_GP_PIN(3, 16),
  1528. };
  1529. static const unsigned int vin1_field_mux[] = {
  1530. /* FIELD */
  1531. VI1_FIELD_MARK,
  1532. };
  1533. static const unsigned int vin1_clkenb_pins[] = {
  1534. RCAR_GP_PIN(3, 1),
  1535. };
  1536. static const unsigned int vin1_clkenb_mux[] = {
  1537. /* CLKENB */
  1538. VI1_CLKENB_MARK,
  1539. };
  1540. static const unsigned int vin1_clk_pins[] = {
  1541. RCAR_GP_PIN(3, 0),
  1542. };
  1543. static const unsigned int vin1_clk_mux[] = {
  1544. /* CLK */
  1545. VI1_CLK_MARK,
  1546. };
  1547. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1548. SH_PFC_PIN_GROUP(avb0_link),
  1549. SH_PFC_PIN_GROUP(avb0_magic),
  1550. SH_PFC_PIN_GROUP(avb0_phy_int),
  1551. SH_PFC_PIN_GROUP(avb0_mdio),
  1552. SH_PFC_PIN_GROUP(avb0_rgmii),
  1553. SH_PFC_PIN_GROUP(avb0_txcrefclk),
  1554. SH_PFC_PIN_GROUP(avb0_avtp_pps),
  1555. SH_PFC_PIN_GROUP(avb0_avtp_capture),
  1556. SH_PFC_PIN_GROUP(avb0_avtp_match),
  1557. SH_PFC_PIN_GROUP(canfd_clk_a),
  1558. SH_PFC_PIN_GROUP(canfd_clk_b),
  1559. SH_PFC_PIN_GROUP(canfd0_data_a),
  1560. SH_PFC_PIN_GROUP(canfd0_data_b),
  1561. SH_PFC_PIN_GROUP(canfd1_data),
  1562. SH_PFC_PIN_GROUP(du_rgb666),
  1563. SH_PFC_PIN_GROUP(du_clk_out),
  1564. SH_PFC_PIN_GROUP(du_sync),
  1565. SH_PFC_PIN_GROUP(du_oddf),
  1566. SH_PFC_PIN_GROUP(du_cde),
  1567. SH_PFC_PIN_GROUP(du_disp),
  1568. SH_PFC_PIN_GROUP(hscif0_data),
  1569. SH_PFC_PIN_GROUP(hscif0_clk),
  1570. SH_PFC_PIN_GROUP(hscif0_ctrl),
  1571. SH_PFC_PIN_GROUP(hscif1_data),
  1572. SH_PFC_PIN_GROUP(hscif1_clk),
  1573. SH_PFC_PIN_GROUP(hscif1_ctrl),
  1574. SH_PFC_PIN_GROUP(hscif2_data),
  1575. SH_PFC_PIN_GROUP(hscif2_clk),
  1576. SH_PFC_PIN_GROUP(hscif2_ctrl),
  1577. SH_PFC_PIN_GROUP(hscif3_data),
  1578. SH_PFC_PIN_GROUP(hscif3_clk),
  1579. SH_PFC_PIN_GROUP(hscif3_ctrl),
  1580. SH_PFC_PIN_GROUP(i2c0),
  1581. SH_PFC_PIN_GROUP(i2c1),
  1582. SH_PFC_PIN_GROUP(i2c2),
  1583. SH_PFC_PIN_GROUP(i2c3_a),
  1584. SH_PFC_PIN_GROUP(i2c3_b),
  1585. SH_PFC_PIN_GROUP(i2c4),
  1586. SH_PFC_PIN_GROUP(intc_ex_irq0),
  1587. SH_PFC_PIN_GROUP(intc_ex_irq1),
  1588. SH_PFC_PIN_GROUP(intc_ex_irq2),
  1589. SH_PFC_PIN_GROUP(intc_ex_irq3),
  1590. SH_PFC_PIN_GROUP(intc_ex_irq4),
  1591. SH_PFC_PIN_GROUP(intc_ex_irq5),
  1592. SH_PFC_PIN_GROUP(mmc_data1),
  1593. SH_PFC_PIN_GROUP(mmc_data4),
  1594. SH_PFC_PIN_GROUP(mmc_data8),
  1595. SH_PFC_PIN_GROUP(mmc_ctrl),
  1596. SH_PFC_PIN_GROUP(mmc_cd),
  1597. SH_PFC_PIN_GROUP(mmc_wp),
  1598. SH_PFC_PIN_GROUP(msiof0_clk),
  1599. SH_PFC_PIN_GROUP(msiof0_sync),
  1600. SH_PFC_PIN_GROUP(msiof0_ss1),
  1601. SH_PFC_PIN_GROUP(msiof0_ss2),
  1602. SH_PFC_PIN_GROUP(msiof0_txd),
  1603. SH_PFC_PIN_GROUP(msiof0_rxd),
  1604. SH_PFC_PIN_GROUP(msiof1_clk),
  1605. SH_PFC_PIN_GROUP(msiof1_sync),
  1606. SH_PFC_PIN_GROUP(msiof1_ss1),
  1607. SH_PFC_PIN_GROUP(msiof1_ss2),
  1608. SH_PFC_PIN_GROUP(msiof1_txd),
  1609. SH_PFC_PIN_GROUP(msiof1_rxd),
  1610. SH_PFC_PIN_GROUP(msiof2_clk),
  1611. SH_PFC_PIN_GROUP(msiof2_sync),
  1612. SH_PFC_PIN_GROUP(msiof2_ss1),
  1613. SH_PFC_PIN_GROUP(msiof2_ss2),
  1614. SH_PFC_PIN_GROUP(msiof2_txd),
  1615. SH_PFC_PIN_GROUP(msiof2_rxd),
  1616. SH_PFC_PIN_GROUP(msiof3_clk),
  1617. SH_PFC_PIN_GROUP(msiof3_sync),
  1618. SH_PFC_PIN_GROUP(msiof3_ss1),
  1619. SH_PFC_PIN_GROUP(msiof3_ss2),
  1620. SH_PFC_PIN_GROUP(msiof3_txd),
  1621. SH_PFC_PIN_GROUP(msiof3_rxd),
  1622. SH_PFC_PIN_GROUP(pwm0_a),
  1623. SH_PFC_PIN_GROUP(pwm0_b),
  1624. SH_PFC_PIN_GROUP(pwm1_a),
  1625. SH_PFC_PIN_GROUP(pwm1_b),
  1626. SH_PFC_PIN_GROUP(pwm2_a),
  1627. SH_PFC_PIN_GROUP(pwm2_b),
  1628. SH_PFC_PIN_GROUP(pwm3_a),
  1629. SH_PFC_PIN_GROUP(pwm3_b),
  1630. SH_PFC_PIN_GROUP(pwm4_a),
  1631. SH_PFC_PIN_GROUP(pwm4_b),
  1632. SH_PFC_PIN_GROUP(scif_clk_a),
  1633. SH_PFC_PIN_GROUP(scif_clk_b),
  1634. SH_PFC_PIN_GROUP(scif0_data),
  1635. SH_PFC_PIN_GROUP(scif0_clk),
  1636. SH_PFC_PIN_GROUP(scif0_ctrl),
  1637. SH_PFC_PIN_GROUP(scif1_data_a),
  1638. SH_PFC_PIN_GROUP(scif1_clk),
  1639. SH_PFC_PIN_GROUP(scif1_ctrl),
  1640. SH_PFC_PIN_GROUP(scif1_data_b),
  1641. SH_PFC_PIN_GROUP(scif3_data),
  1642. SH_PFC_PIN_GROUP(scif3_clk),
  1643. SH_PFC_PIN_GROUP(scif3_ctrl),
  1644. SH_PFC_PIN_GROUP(scif4_data),
  1645. SH_PFC_PIN_GROUP(scif4_clk),
  1646. SH_PFC_PIN_GROUP(scif4_ctrl),
  1647. SH_PFC_PIN_GROUP(tmu_tclk1_a),
  1648. SH_PFC_PIN_GROUP(tmu_tclk1_b),
  1649. SH_PFC_PIN_GROUP(tmu_tclk2_a),
  1650. SH_PFC_PIN_GROUP(tmu_tclk2_b),
  1651. SH_PFC_PIN_GROUP(vin0_data8),
  1652. SH_PFC_PIN_GROUP(vin0_data10),
  1653. SH_PFC_PIN_GROUP(vin0_data12),
  1654. SH_PFC_PIN_GROUP(vin0_sync),
  1655. SH_PFC_PIN_GROUP(vin0_field),
  1656. SH_PFC_PIN_GROUP(vin0_clkenb),
  1657. SH_PFC_PIN_GROUP(vin0_clk),
  1658. SH_PFC_PIN_GROUP(vin1_data8),
  1659. SH_PFC_PIN_GROUP(vin1_data10),
  1660. SH_PFC_PIN_GROUP(vin1_data12),
  1661. SH_PFC_PIN_GROUP(vin1_sync),
  1662. SH_PFC_PIN_GROUP(vin1_field),
  1663. SH_PFC_PIN_GROUP(vin1_clkenb),
  1664. SH_PFC_PIN_GROUP(vin1_clk),
  1665. };
  1666. static const char * const avb0_groups[] = {
  1667. "avb0_link",
  1668. "avb0_magic",
  1669. "avb0_phy_int",
  1670. "avb0_mdio",
  1671. "avb0_rgmii",
  1672. "avb0_txcrefclk",
  1673. "avb0_avtp_pps",
  1674. "avb0_avtp_capture",
  1675. "avb0_avtp_match",
  1676. };
  1677. static const char * const canfd_clk_groups[] = {
  1678. "canfd_clk_a",
  1679. "canfd_clk_b",
  1680. };
  1681. static const char * const canfd0_groups[] = {
  1682. "canfd0_data_a",
  1683. "canfd0_data_b",
  1684. };
  1685. static const char * const canfd1_groups[] = {
  1686. "canfd1_data",
  1687. };
  1688. static const char * const du_groups[] = {
  1689. "du_rgb666",
  1690. "du_clk_out",
  1691. "du_sync",
  1692. "du_oddf",
  1693. "du_cde",
  1694. "du_disp",
  1695. };
  1696. static const char * const hscif0_groups[] = {
  1697. "hscif0_data",
  1698. "hscif0_clk",
  1699. "hscif0_ctrl",
  1700. };
  1701. static const char * const hscif1_groups[] = {
  1702. "hscif1_data",
  1703. "hscif1_clk",
  1704. "hscif1_ctrl",
  1705. };
  1706. static const char * const hscif2_groups[] = {
  1707. "hscif2_data",
  1708. "hscif2_clk",
  1709. "hscif2_ctrl",
  1710. };
  1711. static const char * const hscif3_groups[] = {
  1712. "hscif3_data",
  1713. "hscif3_clk",
  1714. "hscif3_ctrl",
  1715. };
  1716. static const char * const i2c0_groups[] = {
  1717. "i2c0",
  1718. };
  1719. static const char * const i2c1_groups[] = {
  1720. "i2c1",
  1721. };
  1722. static const char * const i2c2_groups[] = {
  1723. "i2c2",
  1724. };
  1725. static const char * const i2c3_groups[] = {
  1726. "i2c3_a",
  1727. "i2c3_b",
  1728. };
  1729. static const char * const i2c4_groups[] = {
  1730. "i2c4",
  1731. };
  1732. static const char * const intc_ex_groups[] = {
  1733. "intc_ex_irq0",
  1734. "intc_ex_irq1",
  1735. "intc_ex_irq2",
  1736. "intc_ex_irq3",
  1737. "intc_ex_irq4",
  1738. "intc_ex_irq5",
  1739. };
  1740. static const char * const mmc_groups[] = {
  1741. "mmc_data1",
  1742. "mmc_data4",
  1743. "mmc_data8",
  1744. "mmc_ctrl",
  1745. "mmc_cd",
  1746. "mmc_wp",
  1747. };
  1748. static const char * const msiof0_groups[] = {
  1749. "msiof0_clk",
  1750. "msiof0_sync",
  1751. "msiof0_ss1",
  1752. "msiof0_ss2",
  1753. "msiof0_txd",
  1754. "msiof0_rxd",
  1755. };
  1756. static const char * const msiof1_groups[] = {
  1757. "msiof1_clk",
  1758. "msiof1_sync",
  1759. "msiof1_ss1",
  1760. "msiof1_ss2",
  1761. "msiof1_txd",
  1762. "msiof1_rxd",
  1763. };
  1764. static const char * const msiof2_groups[] = {
  1765. "msiof2_clk",
  1766. "msiof2_sync",
  1767. "msiof2_ss1",
  1768. "msiof2_ss2",
  1769. "msiof2_txd",
  1770. "msiof2_rxd",
  1771. };
  1772. static const char * const msiof3_groups[] = {
  1773. "msiof3_clk",
  1774. "msiof3_sync",
  1775. "msiof3_ss1",
  1776. "msiof3_ss2",
  1777. "msiof3_txd",
  1778. "msiof3_rxd",
  1779. };
  1780. static const char * const pwm0_groups[] = {
  1781. "pwm0_a",
  1782. "pwm0_b",
  1783. };
  1784. static const char * const pwm1_groups[] = {
  1785. "pwm1_a",
  1786. "pwm1_b",
  1787. };
  1788. static const char * const pwm2_groups[] = {
  1789. "pwm2_a",
  1790. "pwm2_b",
  1791. };
  1792. static const char * const pwm3_groups[] = {
  1793. "pwm3_a",
  1794. "pwm3_b",
  1795. };
  1796. static const char * const pwm4_groups[] = {
  1797. "pwm4_a",
  1798. "pwm4_b",
  1799. };
  1800. static const char * const scif_clk_groups[] = {
  1801. "scif_clk_a",
  1802. "scif_clk_b",
  1803. };
  1804. static const char * const scif0_groups[] = {
  1805. "scif0_data",
  1806. "scif0_clk",
  1807. "scif0_ctrl",
  1808. };
  1809. static const char * const scif1_groups[] = {
  1810. "scif1_data_a",
  1811. "scif1_clk",
  1812. "scif1_ctrl",
  1813. "scif1_data_b",
  1814. };
  1815. static const char * const scif3_groups[] = {
  1816. "scif3_data",
  1817. "scif3_clk",
  1818. "scif3_ctrl",
  1819. };
  1820. static const char * const scif4_groups[] = {
  1821. "scif4_data",
  1822. "scif4_clk",
  1823. "scif4_ctrl",
  1824. };
  1825. static const char * const tmu_groups[] = {
  1826. "tmu_tclk1_a",
  1827. "tmu_tclk1_b",
  1828. "tmu_tclk2_a",
  1829. "tmu_tclk2_b",
  1830. };
  1831. static const char * const vin0_groups[] = {
  1832. "vin0_data8",
  1833. "vin0_data10",
  1834. "vin0_data12",
  1835. "vin0_sync",
  1836. "vin0_field",
  1837. "vin0_clkenb",
  1838. "vin0_clk",
  1839. };
  1840. static const char * const vin1_groups[] = {
  1841. "vin1_data8",
  1842. "vin1_data10",
  1843. "vin1_data12",
  1844. "vin1_sync",
  1845. "vin1_field",
  1846. "vin1_clkenb",
  1847. "vin1_clk",
  1848. };
  1849. static const struct sh_pfc_function pinmux_functions[] = {
  1850. SH_PFC_FUNCTION(avb0),
  1851. SH_PFC_FUNCTION(canfd_clk),
  1852. SH_PFC_FUNCTION(canfd0),
  1853. SH_PFC_FUNCTION(canfd1),
  1854. SH_PFC_FUNCTION(du),
  1855. SH_PFC_FUNCTION(hscif0),
  1856. SH_PFC_FUNCTION(hscif1),
  1857. SH_PFC_FUNCTION(hscif2),
  1858. SH_PFC_FUNCTION(hscif3),
  1859. SH_PFC_FUNCTION(i2c0),
  1860. SH_PFC_FUNCTION(i2c1),
  1861. SH_PFC_FUNCTION(i2c2),
  1862. SH_PFC_FUNCTION(i2c3),
  1863. SH_PFC_FUNCTION(i2c4),
  1864. SH_PFC_FUNCTION(intc_ex),
  1865. SH_PFC_FUNCTION(mmc),
  1866. SH_PFC_FUNCTION(msiof0),
  1867. SH_PFC_FUNCTION(msiof1),
  1868. SH_PFC_FUNCTION(msiof2),
  1869. SH_PFC_FUNCTION(msiof3),
  1870. SH_PFC_FUNCTION(pwm0),
  1871. SH_PFC_FUNCTION(pwm1),
  1872. SH_PFC_FUNCTION(pwm2),
  1873. SH_PFC_FUNCTION(pwm3),
  1874. SH_PFC_FUNCTION(pwm4),
  1875. SH_PFC_FUNCTION(scif_clk),
  1876. SH_PFC_FUNCTION(scif0),
  1877. SH_PFC_FUNCTION(scif1),
  1878. SH_PFC_FUNCTION(scif3),
  1879. SH_PFC_FUNCTION(scif4),
  1880. SH_PFC_FUNCTION(tmu),
  1881. SH_PFC_FUNCTION(vin0),
  1882. SH_PFC_FUNCTION(vin1),
  1883. };
  1884. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  1885. #define F_(x, y) FN_##y
  1886. #define FM(x) FN_##x
  1887. { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) {
  1888. 0, 0,
  1889. 0, 0,
  1890. 0, 0,
  1891. 0, 0,
  1892. 0, 0,
  1893. 0, 0,
  1894. 0, 0,
  1895. 0, 0,
  1896. 0, 0,
  1897. 0, 0,
  1898. GP_0_21_FN, GPSR0_21,
  1899. GP_0_20_FN, GPSR0_20,
  1900. GP_0_19_FN, GPSR0_19,
  1901. GP_0_18_FN, GPSR0_18,
  1902. GP_0_17_FN, GPSR0_17,
  1903. GP_0_16_FN, GPSR0_16,
  1904. GP_0_15_FN, GPSR0_15,
  1905. GP_0_14_FN, GPSR0_14,
  1906. GP_0_13_FN, GPSR0_13,
  1907. GP_0_12_FN, GPSR0_12,
  1908. GP_0_11_FN, GPSR0_11,
  1909. GP_0_10_FN, GPSR0_10,
  1910. GP_0_9_FN, GPSR0_9,
  1911. GP_0_8_FN, GPSR0_8,
  1912. GP_0_7_FN, GPSR0_7,
  1913. GP_0_6_FN, GPSR0_6,
  1914. GP_0_5_FN, GPSR0_5,
  1915. GP_0_4_FN, GPSR0_4,
  1916. GP_0_3_FN, GPSR0_3,
  1917. GP_0_2_FN, GPSR0_2,
  1918. GP_0_1_FN, GPSR0_1,
  1919. GP_0_0_FN, GPSR0_0, }
  1920. },
  1921. { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) {
  1922. 0, 0,
  1923. 0, 0,
  1924. 0, 0,
  1925. 0, 0,
  1926. GP_1_27_FN, GPSR1_27,
  1927. GP_1_26_FN, GPSR1_26,
  1928. GP_1_25_FN, GPSR1_25,
  1929. GP_1_24_FN, GPSR1_24,
  1930. GP_1_23_FN, GPSR1_23,
  1931. GP_1_22_FN, GPSR1_22,
  1932. GP_1_21_FN, GPSR1_21,
  1933. GP_1_20_FN, GPSR1_20,
  1934. GP_1_19_FN, GPSR1_19,
  1935. GP_1_18_FN, GPSR1_18,
  1936. GP_1_17_FN, GPSR1_17,
  1937. GP_1_16_FN, GPSR1_16,
  1938. GP_1_15_FN, GPSR1_15,
  1939. GP_1_14_FN, GPSR1_14,
  1940. GP_1_13_FN, GPSR1_13,
  1941. GP_1_12_FN, GPSR1_12,
  1942. GP_1_11_FN, GPSR1_11,
  1943. GP_1_10_FN, GPSR1_10,
  1944. GP_1_9_FN, GPSR1_9,
  1945. GP_1_8_FN, GPSR1_8,
  1946. GP_1_7_FN, GPSR1_7,
  1947. GP_1_6_FN, GPSR1_6,
  1948. GP_1_5_FN, GPSR1_5,
  1949. GP_1_4_FN, GPSR1_4,
  1950. GP_1_3_FN, GPSR1_3,
  1951. GP_1_2_FN, GPSR1_2,
  1952. GP_1_1_FN, GPSR1_1,
  1953. GP_1_0_FN, GPSR1_0, }
  1954. },
  1955. { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) {
  1956. 0, 0,
  1957. 0, 0,
  1958. 0, 0,
  1959. 0, 0,
  1960. 0, 0,
  1961. 0, 0,
  1962. 0, 0,
  1963. 0, 0,
  1964. 0, 0,
  1965. 0, 0,
  1966. 0, 0,
  1967. 0, 0,
  1968. 0, 0,
  1969. 0, 0,
  1970. 0, 0,
  1971. GP_2_16_FN, GPSR2_16,
  1972. GP_2_15_FN, GPSR2_15,
  1973. GP_2_14_FN, GPSR2_14,
  1974. GP_2_13_FN, GPSR2_13,
  1975. GP_2_12_FN, GPSR2_12,
  1976. GP_2_11_FN, GPSR2_11,
  1977. GP_2_10_FN, GPSR2_10,
  1978. GP_2_9_FN, GPSR2_9,
  1979. GP_2_8_FN, GPSR2_8,
  1980. GP_2_7_FN, GPSR2_7,
  1981. GP_2_6_FN, GPSR2_6,
  1982. GP_2_5_FN, GPSR2_5,
  1983. GP_2_4_FN, GPSR2_4,
  1984. GP_2_3_FN, GPSR2_3,
  1985. GP_2_2_FN, GPSR2_2,
  1986. GP_2_1_FN, GPSR2_1,
  1987. GP_2_0_FN, GPSR2_0, }
  1988. },
  1989. { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) {
  1990. 0, 0,
  1991. 0, 0,
  1992. 0, 0,
  1993. 0, 0,
  1994. 0, 0,
  1995. 0, 0,
  1996. 0, 0,
  1997. 0, 0,
  1998. 0, 0,
  1999. 0, 0,
  2000. 0, 0,
  2001. 0, 0,
  2002. 0, 0,
  2003. 0, 0,
  2004. 0, 0,
  2005. GP_3_16_FN, GPSR3_16,
  2006. GP_3_15_FN, GPSR3_15,
  2007. GP_3_14_FN, GPSR3_14,
  2008. GP_3_13_FN, GPSR3_13,
  2009. GP_3_12_FN, GPSR3_12,
  2010. GP_3_11_FN, GPSR3_11,
  2011. GP_3_10_FN, GPSR3_10,
  2012. GP_3_9_FN, GPSR3_9,
  2013. GP_3_8_FN, GPSR3_8,
  2014. GP_3_7_FN, GPSR3_7,
  2015. GP_3_6_FN, GPSR3_6,
  2016. GP_3_5_FN, GPSR3_5,
  2017. GP_3_4_FN, GPSR3_4,
  2018. GP_3_3_FN, GPSR3_3,
  2019. GP_3_2_FN, GPSR3_2,
  2020. GP_3_1_FN, GPSR3_1,
  2021. GP_3_0_FN, GPSR3_0, }
  2022. },
  2023. { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) {
  2024. 0, 0,
  2025. 0, 0,
  2026. 0, 0,
  2027. 0, 0,
  2028. 0, 0,
  2029. 0, 0,
  2030. 0, 0,
  2031. 0, 0,
  2032. 0, 0,
  2033. 0, 0,
  2034. 0, 0,
  2035. 0, 0,
  2036. 0, 0,
  2037. 0, 0,
  2038. 0, 0,
  2039. 0, 0,
  2040. 0, 0,
  2041. 0, 0,
  2042. 0, 0,
  2043. 0, 0,
  2044. 0, 0,
  2045. 0, 0,
  2046. 0, 0,
  2047. 0, 0,
  2048. 0, 0,
  2049. 0, 0,
  2050. GP_4_5_FN, GPSR4_5,
  2051. GP_4_4_FN, GPSR4_4,
  2052. GP_4_3_FN, GPSR4_3,
  2053. GP_4_2_FN, GPSR4_2,
  2054. GP_4_1_FN, GPSR4_1,
  2055. GP_4_0_FN, GPSR4_0, }
  2056. },
  2057. { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) {
  2058. 0, 0,
  2059. 0, 0,
  2060. 0, 0,
  2061. 0, 0,
  2062. 0, 0,
  2063. 0, 0,
  2064. 0, 0,
  2065. 0, 0,
  2066. 0, 0,
  2067. 0, 0,
  2068. 0, 0,
  2069. 0, 0,
  2070. 0, 0,
  2071. 0, 0,
  2072. 0, 0,
  2073. 0, 0,
  2074. 0, 0,
  2075. GP_5_14_FN, GPSR5_14,
  2076. GP_5_13_FN, GPSR5_13,
  2077. GP_5_12_FN, GPSR5_12,
  2078. GP_5_11_FN, GPSR5_11,
  2079. GP_5_10_FN, GPSR5_10,
  2080. GP_5_9_FN, GPSR5_9,
  2081. GP_5_8_FN, GPSR5_8,
  2082. GP_5_7_FN, GPSR5_7,
  2083. GP_5_6_FN, GPSR5_6,
  2084. GP_5_5_FN, GPSR5_5,
  2085. GP_5_4_FN, GPSR5_4,
  2086. GP_5_3_FN, GPSR5_3,
  2087. GP_5_2_FN, GPSR5_2,
  2088. GP_5_1_FN, GPSR5_1,
  2089. GP_5_0_FN, GPSR5_0, }
  2090. },
  2091. #undef F_
  2092. #undef FM
  2093. #define F_(x, y) x,
  2094. #define FM(x) FN_##x,
  2095. { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) {
  2096. IP0_31_28
  2097. IP0_27_24
  2098. IP0_23_20
  2099. IP0_19_16
  2100. IP0_15_12
  2101. IP0_11_8
  2102. IP0_7_4
  2103. IP0_3_0 }
  2104. },
  2105. { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) {
  2106. IP1_31_28
  2107. IP1_27_24
  2108. IP1_23_20
  2109. IP1_19_16
  2110. IP1_15_12
  2111. IP1_11_8
  2112. IP1_7_4
  2113. IP1_3_0 }
  2114. },
  2115. { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) {
  2116. IP2_31_28
  2117. IP2_27_24
  2118. IP2_23_20
  2119. IP2_19_16
  2120. IP2_15_12
  2121. IP2_11_8
  2122. IP2_7_4
  2123. IP2_3_0 }
  2124. },
  2125. { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) {
  2126. IP3_31_28
  2127. IP3_27_24
  2128. IP3_23_20
  2129. IP3_19_16
  2130. IP3_15_12
  2131. IP3_11_8
  2132. IP3_7_4
  2133. IP3_3_0 }
  2134. },
  2135. { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) {
  2136. IP4_31_28
  2137. IP4_27_24
  2138. IP4_23_20
  2139. IP4_19_16
  2140. IP4_15_12
  2141. IP4_11_8
  2142. IP4_7_4
  2143. IP4_3_0 }
  2144. },
  2145. { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) {
  2146. IP5_31_28
  2147. IP5_27_24
  2148. IP5_23_20
  2149. IP5_19_16
  2150. IP5_15_12
  2151. IP5_11_8
  2152. IP5_7_4
  2153. IP5_3_0 }
  2154. },
  2155. { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) {
  2156. IP6_31_28
  2157. IP6_27_24
  2158. IP6_23_20
  2159. IP6_19_16
  2160. IP6_15_12
  2161. IP6_11_8
  2162. IP6_7_4
  2163. IP6_3_0 }
  2164. },
  2165. { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) {
  2166. IP7_31_28
  2167. IP7_27_24
  2168. IP7_23_20
  2169. IP7_19_16
  2170. IP7_15_12
  2171. IP7_11_8
  2172. IP7_7_4
  2173. IP7_3_0 }
  2174. },
  2175. { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) {
  2176. IP8_31_28
  2177. IP8_27_24
  2178. IP8_23_20
  2179. IP8_19_16
  2180. IP8_15_12
  2181. IP8_11_8
  2182. IP8_7_4
  2183. IP8_3_0 }
  2184. },
  2185. #undef F_
  2186. #undef FM
  2187. #define F_(x, y) x,
  2188. #define FM(x) FN_##x,
  2189. { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
  2190. 4, 4, 4, 4,
  2191. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) {
  2192. /* RESERVED 31, 30, 29, 28 */
  2193. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2194. /* RESERVED 27, 26, 25, 24 */
  2195. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2196. /* RESERVED 23, 22, 21, 20 */
  2197. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2198. /* RESERVED 19, 18, 17, 16 */
  2199. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2200. /* RESERVED 15, 14, 13, 12 */
  2201. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2202. MOD_SEL0_11
  2203. MOD_SEL0_10
  2204. MOD_SEL0_9
  2205. MOD_SEL0_8
  2206. MOD_SEL0_7
  2207. MOD_SEL0_6
  2208. MOD_SEL0_5
  2209. MOD_SEL0_4
  2210. MOD_SEL0_3
  2211. MOD_SEL0_2
  2212. MOD_SEL0_1
  2213. MOD_SEL0_0 }
  2214. },
  2215. { },
  2216. };
  2217. static int r8a77970_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,
  2218. u32 *pocctrl)
  2219. {
  2220. int bit = pin & 0x1f;
  2221. *pocctrl = 0xe6060380;
  2222. if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 21))
  2223. return bit;
  2224. if (pin >= RCAR_GP_PIN(2, 0) && pin <= RCAR_GP_PIN(2, 9))
  2225. return bit + 22;
  2226. *pocctrl += 4;
  2227. if (pin >= RCAR_GP_PIN(2, 10) && pin <= RCAR_GP_PIN(2, 16))
  2228. return bit - 10;
  2229. if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 16))
  2230. return bit + 7;
  2231. return -EINVAL;
  2232. }
  2233. static const struct sh_pfc_soc_operations pinmux_ops = {
  2234. .pin_to_pocctrl = r8a77970_pin_to_pocctrl,
  2235. };
  2236. const struct sh_pfc_soc_info r8a77970_pinmux_info = {
  2237. .name = "r8a77970_pfc",
  2238. .ops = &pinmux_ops,
  2239. .unlock_reg = 0xe6060000, /* PMMR */
  2240. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  2241. .pins = pinmux_pins,
  2242. .nr_pins = ARRAY_SIZE(pinmux_pins),
  2243. .groups = pinmux_groups,
  2244. .nr_groups = ARRAY_SIZE(pinmux_groups),
  2245. .functions = pinmux_functions,
  2246. .nr_functions = ARRAY_SIZE(pinmux_functions),
  2247. .cfg_regs = pinmux_config_regs,
  2248. .pinmux_data = pinmux_data,
  2249. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  2250. };