pfc-r8a77980.c 86 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845
  1. // SPDX-Lincense-Identifier: GPL 2.0
  2. /*
  3. * R8A77980 processor support - PFC hardware block.
  4. *
  5. * Copyright (C) 2018 Renesas Electronics Corp.
  6. * Copyright (C) 2018 Cogent Embedded, Inc.
  7. *
  8. * This file is based on the drivers/pinctrl/sh-pfc/pfc-r8a7795.c
  9. *
  10. * R-Car Gen3 processor support - PFC hardware block.
  11. *
  12. * Copyright (C) 2015 Renesas Electronics Corporation
  13. */
  14. #include <linux/io.h>
  15. #include <linux/kernel.h>
  16. #include "core.h"
  17. #include "sh_pfc.h"
  18. #define CPU_ALL_PORT(fn, sfx) \
  19. PORT_GP_CFG_22(0, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
  20. PORT_GP_28(1, fn, sfx), \
  21. PORT_GP_CFG_30(2, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
  22. PORT_GP_CFG_17(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE), \
  23. PORT_GP_25(4, fn, sfx), \
  24. PORT_GP_15(5, fn, sfx)
  25. /*
  26. * F_() : just information
  27. * FM() : macro for FN_xxx / xxx_MARK
  28. */
  29. /* GPSR0 */
  30. #define GPSR0_21 F_(DU_EXODDF_DU_ODDF_DISP_CDE, IP2_23_20)
  31. #define GPSR0_20 F_(DU_EXVSYNC_DU_VSYNC, IP2_19_16)
  32. #define GPSR0_19 F_(DU_EXHSYNC_DU_HSYNC, IP2_15_12)
  33. #define GPSR0_18 F_(DU_DOTCLKOUT, IP2_11_8)
  34. #define GPSR0_17 F_(DU_DB7, IP2_7_4)
  35. #define GPSR0_16 F_(DU_DB6, IP2_3_0)
  36. #define GPSR0_15 F_(DU_DB5, IP1_31_28)
  37. #define GPSR0_14 F_(DU_DB4, IP1_27_24)
  38. #define GPSR0_13 F_(DU_DB3, IP1_23_20)
  39. #define GPSR0_12 F_(DU_DB2, IP1_19_16)
  40. #define GPSR0_11 F_(DU_DG7, IP1_15_12)
  41. #define GPSR0_10 F_(DU_DG6, IP1_11_8)
  42. #define GPSR0_9 F_(DU_DG5, IP1_7_4)
  43. #define GPSR0_8 F_(DU_DG4, IP1_3_0)
  44. #define GPSR0_7 F_(DU_DG3, IP0_31_28)
  45. #define GPSR0_6 F_(DU_DG2, IP0_27_24)
  46. #define GPSR0_5 F_(DU_DR7, IP0_23_20)
  47. #define GPSR0_4 F_(DU_DR6, IP0_19_16)
  48. #define GPSR0_3 F_(DU_DR5, IP0_15_12)
  49. #define GPSR0_2 F_(DU_DR4, IP0_11_8)
  50. #define GPSR0_1 F_(DU_DR3, IP0_7_4)
  51. #define GPSR0_0 F_(DU_DR2, IP0_3_0)
  52. /* GPSR1 */
  53. #define GPSR1_27 F_(DIGRF_CLKOUT, IP8_31_28)
  54. #define GPSR1_26 F_(DIGRF_CLKIN, IP8_27_24)
  55. #define GPSR1_25 F_(CANFD_CLK_A, IP8_23_20)
  56. #define GPSR1_24 F_(CANFD1_RX, IP8_19_16)
  57. #define GPSR1_23 F_(CANFD1_TX, IP8_15_12)
  58. #define GPSR1_22 F_(CANFD0_RX_A, IP8_11_8)
  59. #define GPSR1_21 F_(CANFD0_TX_A, IP8_7_4)
  60. #define GPSR1_20 F_(AVB_AVTP_CAPTURE, IP8_3_0)
  61. #define GPSR1_19 F_(AVB_AVTP_MATCH, IP7_31_28)
  62. #define GPSR1_18 FM(AVB_LINK)
  63. #define GPSR1_17 FM(AVB_PHY_INT)
  64. #define GPSR1_16 FM(AVB_MAGIC)
  65. #define GPSR1_15 FM(AVB_MDC)
  66. #define GPSR1_14 FM(AVB_MDIO)
  67. #define GPSR1_13 FM(AVB_TXCREFCLK)
  68. #define GPSR1_12 FM(AVB_TD3)
  69. #define GPSR1_11 FM(AVB_TD2)
  70. #define GPSR1_10 FM(AVB_TD1)
  71. #define GPSR1_9 FM(AVB_TD0)
  72. #define GPSR1_8 FM(AVB_TXC)
  73. #define GPSR1_7 FM(AVB_TX_CTL)
  74. #define GPSR1_6 FM(AVB_RD3)
  75. #define GPSR1_5 FM(AVB_RD2)
  76. #define GPSR1_4 FM(AVB_RD1)
  77. #define GPSR1_3 FM(AVB_RD0)
  78. #define GPSR1_2 FM(AVB_RXC)
  79. #define GPSR1_1 FM(AVB_RX_CTL)
  80. #define GPSR1_0 F_(IRQ0, IP2_27_24)
  81. /* GPSR2 */
  82. #define GPSR2_29 F_(FSO_TOE_N, IP10_19_16)
  83. #define GPSR2_28 F_(FSO_CFE_1_N, IP10_15_12)
  84. #define GPSR2_27 F_(FSO_CFE_0_N, IP10_11_8)
  85. #define GPSR2_26 F_(SDA3, IP10_7_4)
  86. #define GPSR2_25 F_(SCL3, IP10_3_0)
  87. #define GPSR2_24 F_(MSIOF0_SS2, IP9_31_28)
  88. #define GPSR2_23 F_(MSIOF0_SS1, IP9_27_24)
  89. #define GPSR2_22 F_(MSIOF0_SYNC, IP9_23_20)
  90. #define GPSR2_21 F_(MSIOF0_SCK, IP9_19_16)
  91. #define GPSR2_20 F_(MSIOF0_TXD, IP9_15_12)
  92. #define GPSR2_19 F_(MSIOF0_RXD, IP9_11_8)
  93. #define GPSR2_18 F_(IRQ5, IP9_7_4)
  94. #define GPSR2_17 F_(IRQ4, IP9_3_0)
  95. #define GPSR2_16 F_(VI0_FIELD, IP4_31_28)
  96. #define GPSR2_15 F_(VI0_DATA11, IP4_27_24)
  97. #define GPSR2_14 F_(VI0_DATA10, IP4_23_20)
  98. #define GPSR2_13 F_(VI0_DATA9, IP4_19_16)
  99. #define GPSR2_12 F_(VI0_DATA8, IP4_15_12)
  100. #define GPSR2_11 F_(VI0_DATA7, IP4_11_8)
  101. #define GPSR2_10 F_(VI0_DATA6, IP4_7_4)
  102. #define GPSR2_9 F_(VI0_DATA5, IP4_3_0)
  103. #define GPSR2_8 F_(VI0_DATA4, IP3_31_28)
  104. #define GPSR2_7 F_(VI0_DATA3, IP3_27_24)
  105. #define GPSR2_6 F_(VI0_DATA2, IP3_23_20)
  106. #define GPSR2_5 F_(VI0_DATA1, IP3_19_16)
  107. #define GPSR2_4 F_(VI0_DATA0, IP3_15_12)
  108. #define GPSR2_3 F_(VI0_VSYNC_N, IP3_11_8)
  109. #define GPSR2_2 F_(VI0_HSYNC_N, IP3_7_4)
  110. #define GPSR2_1 F_(VI0_CLKENB, IP3_3_0)
  111. #define GPSR2_0 F_(VI0_CLK, IP2_31_28)
  112. /* GPSR3 */
  113. #define GPSR3_16 F_(VI1_FIELD, IP7_3_0)
  114. #define GPSR3_15 F_(VI1_DATA11, IP6_31_28)
  115. #define GPSR3_14 F_(VI1_DATA10, IP6_27_24)
  116. #define GPSR3_13 F_(VI1_DATA9, IP6_23_20)
  117. #define GPSR3_12 F_(VI1_DATA8, IP6_19_16)
  118. #define GPSR3_11 F_(VI1_DATA7, IP6_15_12)
  119. #define GPSR3_10 F_(VI1_DATA6, IP6_11_8)
  120. #define GPSR3_9 F_(VI1_DATA5, IP6_7_4)
  121. #define GPSR3_8 F_(VI1_DATA4, IP6_3_0)
  122. #define GPSR3_7 F_(VI1_DATA3, IP5_31_28)
  123. #define GPSR3_6 F_(VI1_DATA2, IP5_27_24)
  124. #define GPSR3_5 F_(VI1_DATA1, IP5_23_20)
  125. #define GPSR3_4 F_(VI1_DATA0, IP5_19_16)
  126. #define GPSR3_3 F_(VI1_VSYNC_N, IP5_15_12)
  127. #define GPSR3_2 F_(VI1_HSYNC_N, IP5_11_8)
  128. #define GPSR3_1 F_(VI1_CLKENB, IP5_7_4)
  129. #define GPSR3_0 F_(VI1_CLK, IP5_3_0)
  130. /* GPSR4 */
  131. #define GPSR4_24 FM(GETHER_LINK_A)
  132. #define GPSR4_23 FM(GETHER_PHY_INT_A)
  133. #define GPSR4_22 FM(GETHER_MAGIC)
  134. #define GPSR4_21 FM(GETHER_MDC_A)
  135. #define GPSR4_20 FM(GETHER_MDIO_A)
  136. #define GPSR4_19 FM(GETHER_TXCREFCLK_MEGA)
  137. #define GPSR4_18 FM(GETHER_TXCREFCLK)
  138. #define GPSR4_17 FM(GETHER_TD3)
  139. #define GPSR4_16 FM(GETHER_TD2)
  140. #define GPSR4_15 FM(GETHER_TD1)
  141. #define GPSR4_14 FM(GETHER_TD0)
  142. #define GPSR4_13 FM(GETHER_TXC)
  143. #define GPSR4_12 FM(GETHER_TX_CTL)
  144. #define GPSR4_11 FM(GETHER_RD3)
  145. #define GPSR4_10 FM(GETHER_RD2)
  146. #define GPSR4_9 FM(GETHER_RD1)
  147. #define GPSR4_8 FM(GETHER_RD0)
  148. #define GPSR4_7 FM(GETHER_RXC)
  149. #define GPSR4_6 FM(GETHER_RX_CTL)
  150. #define GPSR4_5 F_(SDA2, IP7_27_24)
  151. #define GPSR4_4 F_(SCL2, IP7_23_20)
  152. #define GPSR4_3 F_(SDA1, IP7_19_16)
  153. #define GPSR4_2 F_(SCL1, IP7_15_12)
  154. #define GPSR4_1 F_(SDA0, IP7_11_8)
  155. #define GPSR4_0 F_(SCL0, IP7_7_4)
  156. /* GPSR5 */
  157. #define GPSR5_14 FM(RPC_INT_N)
  158. #define GPSR5_13 FM(RPC_WP_N)
  159. #define GPSR5_12 FM(RPC_RESET_N)
  160. #define GPSR5_11 FM(QSPI1_SSL)
  161. #define GPSR5_10 FM(QSPI1_IO3)
  162. #define GPSR5_9 FM(QSPI1_IO2)
  163. #define GPSR5_8 FM(QSPI1_MISO_IO1)
  164. #define GPSR5_7 FM(QSPI1_MOSI_IO0)
  165. #define GPSR5_6 FM(QSPI1_SPCLK)
  166. #define GPSR5_5 FM(QSPI0_SSL)
  167. #define GPSR5_4 FM(QSPI0_IO3)
  168. #define GPSR5_3 FM(QSPI0_IO2)
  169. #define GPSR5_2 FM(QSPI0_MISO_IO1)
  170. #define GPSR5_1 FM(QSPI0_MOSI_IO0)
  171. #define GPSR5_0 FM(QSPI0_SPCLK)
  172. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  173. #define IP0_3_0 FM(DU_DR2) FM(SCK4) FM(GETHER_RMII_CRS_DV) 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)
  174. #define IP0_7_4 FM(DU_DR3) FM(RX4) FM(GETHER_RMII_RX_ER) 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)
  175. #define IP0_11_8 FM(DU_DR4) FM(TX4) FM(GETHER_RMII_RXD0) 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)
  176. #define IP0_15_12 FM(DU_DR5) FM(CTS4_N) FM(GETHER_RMII_RXD1) 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)
  177. #define IP0_19_16 FM(DU_DR6) FM(RTS4_N_TANS) FM(GETHER_RMII_TXD_EN) 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)
  178. #define IP0_23_20 FM(DU_DR7) F_(0, 0) FM(GETHER_RMII_TXD0) 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)
  179. #define IP0_27_24 FM(DU_DG2) F_(0, 0) FM(GETHER_RMII_TXD1) 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)
  180. #define IP0_31_28 FM(DU_DG3) FM(CPG_CPCKOUT) FM(GETHER_RMII_REFCLK) 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)
  181. #define IP1_3_0 FM(DU_DG4) FM(SCL5) F_(0, 0) FM(A8) 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)
  182. #define IP1_7_4 FM(DU_DG5) FM(SDA5) FM(GETHER_MDC_B) FM(A9) 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 IP1_11_8 FM(DU_DG6) FM(SCIF_CLK_A) FM(GETHER_MDIO_B) FM(A10) 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 IP1_15_12 FM(DU_DG7) FM(HRX0_A) F_(0, 0) FM(A11) 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 IP1_19_16 FM(DU_DB2) FM(HSCK0_A) F_(0, 0) FM(A12) 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)
  186. #define IP1_23_20 FM(DU_DB3) FM(HRTS0_N_A) F_(0, 0) FM(A13) 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)
  187. #define IP1_27_24 FM(DU_DB4) FM(HCTS0_N_A) F_(0, 0) FM(A14) 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)
  188. #define IP1_31_28 FM(DU_DB5) FM(HTX0_A) FM(PWM0_A) FM(A15) 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)
  189. #define IP2_3_0 FM(DU_DB6) FM(MSIOF3_RXD) F_(0, 0) FM(A16) 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)
  190. #define IP2_7_4 FM(DU_DB7) FM(MSIOF3_TXD) 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)
  191. #define IP2_11_8 FM(DU_DOTCLKOUT) FM(MSIOF3_SS1) FM(GETHER_LINK_B) 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)
  192. #define IP2_15_12 FM(DU_EXHSYNC_DU_HSYNC) FM(MSIOF3_SS2) FM(GETHER_PHY_INT_B) FM(A19) 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)
  193. #define IP2_19_16 FM(DU_EXVSYNC_DU_VSYNC) FM(MSIOF3_SCK) F_(0, 0) F_(0, 0) 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)
  194. #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)
  195. #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)
  196. #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)
  197. #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)
  198. #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)
  199. #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)
  200. #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)
  201. #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)
  202. #define IP3_23_20 FM(VI0_DATA2) FM(AVB_AVTP_PPS) 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)
  203. #define IP3_27_24 FM(VI0_DATA3) FM(HSCK1) 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)
  204. #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)
  205. #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)
  206. #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)
  207. #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)
  208. #define IP4_15_12 FM(VI0_DATA8) FM(HSCK2) 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)
  209. #define IP4_19_16 FM(VI0_DATA9) FM(HCTS2_N) FM(PWM1_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)
  210. #define IP4_23_20 FM(VI0_DATA10) FM(HRTS2_N) FM(PWM2_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)
  211. #define IP4_27_24 FM(VI0_DATA11) FM(HTX2) FM(PWM3_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)
  212. #define IP4_31_28 FM(VI0_FIELD) FM(HRX2) FM(PWM4_A) FM(CS1_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)
  213. #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)
  214. #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)
  215. #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)
  216. #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)
  217. #define IP5_19_16 FM(VI1_DATA0) FM(MSIOF1_SS1) F_(0, 0) FM(D3) 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)
  218. #define IP5_23_20 FM(VI1_DATA1) FM(MSIOF1_SS2) F_(0, 0) FM(D4) 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)
  219. #define IP5_27_24 FM(VI1_DATA2) FM(CANFD0_TX_B) F_(0, 0) FM(D5) FM(MMC_DS) 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)
  220. #define IP5_31_28 FM(VI1_DATA3) FM(CANFD0_RX_B) F_(0, 0) FM(D6) 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)
  221. #define IP6_3_0 FM(VI1_DATA4) FM(CANFD_CLK_B) F_(0, 0) FM(D7) 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)
  222. #define IP6_7_4 FM(VI1_DATA5) F_(0, 0) F_(0, 0) FM(D8) 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)
  223. #define IP6_11_8 FM(VI1_DATA6) F_(0, 0) F_(0, 0) FM(D9) 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)
  224. #define IP6_15_12 FM(VI1_DATA7) F_(0, 0) F_(0, 0) FM(D10) 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)
  225. #define IP6_19_16 FM(VI1_DATA8) F_(0, 0) F_(0, 0) FM(D11) 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)
  226. #define IP6_23_20 FM(VI1_DATA9) FM(TCLK1_A) F_(0, 0) FM(D12) 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)
  227. #define IP6_27_24 FM(VI1_DATA10) FM(TCLK2_A) F_(0, 0) FM(D13) 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)
  228. #define IP6_31_28 FM(VI1_DATA11) FM(SCL4) F_(0, 0) FM(D14) FM(MMC_D6) 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)
  229. #define IP7_3_0 FM(VI1_FIELD) FM(SDA4) F_(0, 0) FM(D15) FM(MMC_D7) 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)
  230. #define IP7_7_4 FM(SCL0) F_(0, 0) F_(0, 0) FM(CLKOUT) 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)
  231. #define IP7_11_8 FM(SDA0) F_(0, 0) F_(0, 0) FM(BS_N) FM(SCK0) FM(HSCK0_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)
  232. #define IP7_15_12 FM(SCL1) F_(0, 0) FM(TPU0TO2) FM(RD_N) FM(CTS0_N) FM(HCTS0_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)
  233. #define IP7_19_16 FM(SDA1) F_(0, 0) FM(TPU0TO3) FM(WE0_N) FM(RTS0_N_TANS) FM(HRTS0_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)
  234. #define IP7_23_20 FM(SCL2) F_(0, 0) F_(0, 0) FM(WE1_N) FM(RX0) FM(HRX0_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)
  235. #define IP7_27_24 FM(SDA2) F_(0, 0) F_(0, 0) FM(EX_WAIT0) FM(TX0) FM(HTX0_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)
  236. #define IP7_31_28 FM(AVB_AVTP_MATCH) FM(TPU0TO0) 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)
  237. #define IP8_3_0 FM(AVB_AVTP_CAPTURE) FM(TPU0TO1) 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)
  238. #define IP8_7_4 FM(CANFD0_TX_A) FM(FXR_TXDA) FM(PWM0_B) FM(DU_DISP) 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)
  239. #define IP8_11_8 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)
  240. #define IP8_15_12 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)
  241. #define IP8_19_16 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)
  242. #define IP8_23_20 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)
  243. #define IP8_27_24 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)
  244. #define IP8_31_28 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)
  245. #define IP9_3_0 FM(IRQ4) F_(0, 0) F_(0, 0) FM(VI0_DATA12) 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)
  246. #define IP9_7_4 FM(IRQ5) F_(0, 0) F_(0, 0) FM(VI0_DATA13) 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)
  247. #define IP9_11_8 FM(MSIOF0_RXD) FM(DU_DR0) F_(0, 0) FM(VI0_DATA14) 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)
  248. #define IP9_15_12 FM(MSIOF0_TXD) FM(DU_DR1) F_(0, 0) FM(VI0_DATA15) 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)
  249. #define IP9_19_16 FM(MSIOF0_SCK) FM(DU_DG0) F_(0, 0) FM(VI0_DATA16) 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)
  250. #define IP9_23_20 FM(MSIOF0_SYNC) FM(DU_DG1) F_(0, 0) FM(VI0_DATA17) 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)
  251. #define IP9_27_24 FM(MSIOF0_SS1) FM(DU_DB0) FM(TCLK3) FM(VI0_DATA18) 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)
  252. #define IP9_31_28 FM(MSIOF0_SS2) FM(DU_DB1) FM(TCLK4) FM(VI0_DATA19) 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)
  253. #define IP10_3_0 FM(SCL3) F_(0, 0) F_(0, 0) FM(VI0_DATA20) 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)
  254. #define IP10_7_4 FM(SDA3) F_(0, 0) F_(0, 0) FM(VI0_DATA21) 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)
  255. #define IP10_11_8 FM(FSO_CFE_0_N) F_(0, 0) F_(0, 0) FM(VI0_DATA22) 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)
  256. #define IP10_15_12 FM(FSO_CFE_1_N) F_(0, 0) F_(0, 0) FM(VI0_DATA23) 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)
  257. #define IP10_19_16 FM(FSO_TOE_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) F_(0, 0) F_(0, 0)
  258. #define IP10_23_20 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)
  259. #define IP10_27_24 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)
  260. #define IP10_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)
  261. #define PINMUX_GPSR \
  262. \
  263. GPSR2_29 \
  264. GPSR2_28 \
  265. GPSR1_27 GPSR2_27 \
  266. GPSR1_26 GPSR2_26 \
  267. GPSR1_25 GPSR2_25 \
  268. GPSR1_24 GPSR2_24 GPSR4_24 \
  269. GPSR1_23 GPSR2_23 GPSR4_23 \
  270. GPSR1_22 GPSR2_22 GPSR4_22 \
  271. GPSR0_21 GPSR1_21 GPSR2_21 GPSR4_21 \
  272. GPSR0_20 GPSR1_20 GPSR2_20 GPSR4_20 \
  273. GPSR0_19 GPSR1_19 GPSR2_19 GPSR4_19 \
  274. GPSR0_18 GPSR1_18 GPSR2_18 GPSR4_18 \
  275. GPSR0_17 GPSR1_17 GPSR2_17 GPSR4_17 \
  276. GPSR0_16 GPSR1_16 GPSR2_16 GPSR3_16 GPSR4_16 \
  277. GPSR0_15 GPSR1_15 GPSR2_15 GPSR3_15 GPSR4_15 \
  278. GPSR0_14 GPSR1_14 GPSR2_14 GPSR3_14 GPSR4_14 GPSR5_14 \
  279. GPSR0_13 GPSR1_13 GPSR2_13 GPSR3_13 GPSR4_13 GPSR5_13 \
  280. GPSR0_12 GPSR1_12 GPSR2_12 GPSR3_12 GPSR4_12 GPSR5_12 \
  281. GPSR0_11 GPSR1_11 GPSR2_11 GPSR3_11 GPSR4_11 GPSR5_11 \
  282. GPSR0_10 GPSR1_10 GPSR2_10 GPSR3_10 GPSR4_10 GPSR5_10 \
  283. GPSR0_9 GPSR1_9 GPSR2_9 GPSR3_9 GPSR4_9 GPSR5_9 \
  284. GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR4_8 GPSR5_8 \
  285. GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR4_7 GPSR5_7 \
  286. GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR4_6 GPSR5_6 \
  287. GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 \
  288. GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 \
  289. GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 \
  290. GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 \
  291. GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 \
  292. GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0
  293. #define PINMUX_IPSR \
  294. \
  295. 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 \
  296. 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 \
  297. 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 \
  298. 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 \
  299. 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 \
  300. 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 \
  301. 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 \
  302. 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 \
  303. \
  304. 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 \
  305. 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 \
  306. 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 \
  307. 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 \
  308. 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 \
  309. 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 \
  310. 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 \
  311. 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 \
  312. \
  313. FM(IP8_3_0) IP8_3_0 FM(IP9_3_0) IP9_3_0 FM(IP10_3_0) IP10_3_0 \
  314. FM(IP8_7_4) IP8_7_4 FM(IP9_7_4) IP9_7_4 FM(IP10_7_4) IP10_7_4 \
  315. FM(IP8_11_8) IP8_11_8 FM(IP9_11_8) IP9_11_8 FM(IP10_11_8) IP10_11_8 \
  316. FM(IP8_15_12) IP8_15_12 FM(IP9_15_12) IP9_15_12 FM(IP10_15_12) IP10_15_12 \
  317. FM(IP8_19_16) IP8_19_16 FM(IP9_19_16) IP9_19_16 FM(IP10_19_16) IP10_19_16 \
  318. FM(IP8_23_20) IP8_23_20 FM(IP9_23_20) IP9_23_20 FM(IP10_23_20) IP10_23_20 \
  319. FM(IP8_27_24) IP8_27_24 FM(IP9_27_24) IP9_27_24 FM(IP10_27_24) IP10_27_24 \
  320. FM(IP8_31_28) IP8_31_28 FM(IP9_31_28) IP9_31_28 FM(IP10_31_28) IP10_31_28
  321. /* MOD_SEL0 */ /* 0 */ /* 1 */
  322. #define MOD_SEL0_11 FM(SEL_CANFD0_0) FM(SEL_CANFD0_1)
  323. #define MOD_SEL0_10 FM(SEL_GETHER_0) FM(SEL_GETHER_1)
  324. #define MOD_SEL0_9 FM(SEL_HSCIF0_0) FM(SEL_HSCIF0_1)
  325. #define MOD_SEL0_8 FM(SEL_PWM0_0) FM(SEL_PWM0_1)
  326. #define MOD_SEL0_7 FM(SEL_PWM1_0) FM(SEL_PWM1_1)
  327. #define MOD_SEL0_6 FM(SEL_PWM2_0) FM(SEL_PWM2_1)
  328. #define MOD_SEL0_5 FM(SEL_PWM3_0) FM(SEL_PWM3_1)
  329. #define MOD_SEL0_4 FM(SEL_PWM4_0) FM(SEL_PWM4_1)
  330. #define MOD_SEL0_2 FM(SEL_RSP_0) FM(SEL_RSP_1)
  331. #define MOD_SEL0_1 FM(SEL_SCIF1_0) FM(SEL_SCIF1_1)
  332. #define MOD_SEL0_0 FM(SEL_TMU_0) FM(SEL_TMU_1)
  333. #define PINMUX_MOD_SELS \
  334. \
  335. MOD_SEL0_11 \
  336. MOD_SEL0_10 \
  337. MOD_SEL0_9 \
  338. MOD_SEL0_8 \
  339. MOD_SEL0_7 \
  340. MOD_SEL0_6 \
  341. MOD_SEL0_5 \
  342. MOD_SEL0_4 \
  343. MOD_SEL0_2 \
  344. MOD_SEL0_1 \
  345. MOD_SEL0_0
  346. enum {
  347. PINMUX_RESERVED = 0,
  348. PINMUX_DATA_BEGIN,
  349. GP_ALL(DATA),
  350. PINMUX_DATA_END,
  351. #define F_(x, y)
  352. #define FM(x) FN_##x,
  353. PINMUX_FUNCTION_BEGIN,
  354. GP_ALL(FN),
  355. PINMUX_GPSR
  356. PINMUX_IPSR
  357. PINMUX_MOD_SELS
  358. PINMUX_FUNCTION_END,
  359. #undef F_
  360. #undef FM
  361. #define F_(x, y)
  362. #define FM(x) x##_MARK,
  363. PINMUX_MARK_BEGIN,
  364. PINMUX_GPSR
  365. PINMUX_IPSR
  366. PINMUX_MOD_SELS
  367. PINMUX_MARK_END,
  368. #undef F_
  369. #undef FM
  370. };
  371. static const u16 pinmux_data[] = {
  372. PINMUX_DATA_GP_ALL(),
  373. PINMUX_SINGLE(AVB_RX_CTL),
  374. PINMUX_SINGLE(AVB_RXC),
  375. PINMUX_SINGLE(AVB_RD0),
  376. PINMUX_SINGLE(AVB_RD1),
  377. PINMUX_SINGLE(AVB_RD2),
  378. PINMUX_SINGLE(AVB_RD3),
  379. PINMUX_SINGLE(AVB_TX_CTL),
  380. PINMUX_SINGLE(AVB_TXC),
  381. PINMUX_SINGLE(AVB_TD0),
  382. PINMUX_SINGLE(AVB_TD1),
  383. PINMUX_SINGLE(AVB_TD2),
  384. PINMUX_SINGLE(AVB_TD3),
  385. PINMUX_SINGLE(AVB_TXCREFCLK),
  386. PINMUX_SINGLE(AVB_MDIO),
  387. PINMUX_SINGLE(AVB_MDC),
  388. PINMUX_SINGLE(AVB_MAGIC),
  389. PINMUX_SINGLE(AVB_PHY_INT),
  390. PINMUX_SINGLE(AVB_LINK),
  391. PINMUX_SINGLE(GETHER_RX_CTL),
  392. PINMUX_SINGLE(GETHER_RXC),
  393. PINMUX_SINGLE(GETHER_RD0),
  394. PINMUX_SINGLE(GETHER_RD1),
  395. PINMUX_SINGLE(GETHER_RD2),
  396. PINMUX_SINGLE(GETHER_RD3),
  397. PINMUX_SINGLE(GETHER_TX_CTL),
  398. PINMUX_SINGLE(GETHER_TXC),
  399. PINMUX_SINGLE(GETHER_TD0),
  400. PINMUX_SINGLE(GETHER_TD1),
  401. PINMUX_SINGLE(GETHER_TD2),
  402. PINMUX_SINGLE(GETHER_TD3),
  403. PINMUX_SINGLE(GETHER_TXCREFCLK),
  404. PINMUX_SINGLE(GETHER_TXCREFCLK_MEGA),
  405. PINMUX_SINGLE(GETHER_MDIO_A),
  406. PINMUX_SINGLE(GETHER_MDC_A),
  407. PINMUX_SINGLE(GETHER_MAGIC),
  408. PINMUX_SINGLE(GETHER_PHY_INT_A),
  409. PINMUX_SINGLE(GETHER_LINK_A),
  410. PINMUX_SINGLE(QSPI0_SPCLK),
  411. PINMUX_SINGLE(QSPI0_MOSI_IO0),
  412. PINMUX_SINGLE(QSPI0_MISO_IO1),
  413. PINMUX_SINGLE(QSPI0_IO2),
  414. PINMUX_SINGLE(QSPI0_IO3),
  415. PINMUX_SINGLE(QSPI0_SSL),
  416. PINMUX_SINGLE(QSPI1_SPCLK),
  417. PINMUX_SINGLE(QSPI1_MOSI_IO0),
  418. PINMUX_SINGLE(QSPI1_MISO_IO1),
  419. PINMUX_SINGLE(QSPI1_IO2),
  420. PINMUX_SINGLE(QSPI1_IO3),
  421. PINMUX_SINGLE(QSPI1_SSL),
  422. PINMUX_SINGLE(RPC_RESET_N),
  423. PINMUX_SINGLE(RPC_WP_N),
  424. PINMUX_SINGLE(RPC_INT_N),
  425. /* IPSR0 */
  426. PINMUX_IPSR_GPSR(IP0_3_0, DU_DR2),
  427. PINMUX_IPSR_GPSR(IP0_3_0, SCK4),
  428. PINMUX_IPSR_GPSR(IP0_3_0, GETHER_RMII_CRS_DV),
  429. PINMUX_IPSR_GPSR(IP0_3_0, A0),
  430. PINMUX_IPSR_GPSR(IP0_7_4, DU_DR3),
  431. PINMUX_IPSR_GPSR(IP0_7_4, RX4),
  432. PINMUX_IPSR_GPSR(IP0_7_4, GETHER_RMII_RX_ER),
  433. PINMUX_IPSR_GPSR(IP0_7_4, A1),
  434. PINMUX_IPSR_GPSR(IP0_11_8, DU_DR4),
  435. PINMUX_IPSR_GPSR(IP0_11_8, TX4),
  436. PINMUX_IPSR_GPSR(IP0_11_8, GETHER_RMII_RXD0),
  437. PINMUX_IPSR_GPSR(IP0_11_8, A2),
  438. PINMUX_IPSR_GPSR(IP0_15_12, DU_DR5),
  439. PINMUX_IPSR_GPSR(IP0_15_12, CTS4_N),
  440. PINMUX_IPSR_GPSR(IP0_15_12, GETHER_RMII_RXD1),
  441. PINMUX_IPSR_GPSR(IP0_15_12, A3),
  442. PINMUX_IPSR_GPSR(IP0_19_16, DU_DR6),
  443. PINMUX_IPSR_GPSR(IP0_19_16, RTS4_N_TANS),
  444. PINMUX_IPSR_GPSR(IP0_19_16, GETHER_RMII_TXD_EN),
  445. PINMUX_IPSR_GPSR(IP0_19_16, A4),
  446. PINMUX_IPSR_GPSR(IP0_23_20, DU_DR7),
  447. PINMUX_IPSR_GPSR(IP0_23_20, GETHER_RMII_TXD0),
  448. PINMUX_IPSR_GPSR(IP0_23_20, A5),
  449. PINMUX_IPSR_GPSR(IP0_27_24, DU_DG2),
  450. PINMUX_IPSR_GPSR(IP0_27_24, GETHER_RMII_TXD1),
  451. PINMUX_IPSR_GPSR(IP0_27_24, A6),
  452. PINMUX_IPSR_GPSR(IP0_31_28, DU_DG3),
  453. PINMUX_IPSR_GPSR(IP0_31_28, CPG_CPCKOUT),
  454. PINMUX_IPSR_GPSR(IP0_31_28, GETHER_RMII_REFCLK),
  455. PINMUX_IPSR_GPSR(IP0_31_28, A7),
  456. PINMUX_IPSR_GPSR(IP0_31_28, PWMFSW0),
  457. /* IPSR1 */
  458. PINMUX_IPSR_GPSR(IP1_3_0, DU_DG4),
  459. PINMUX_IPSR_GPSR(IP1_3_0, SCL5),
  460. PINMUX_IPSR_GPSR(IP1_3_0, A8),
  461. PINMUX_IPSR_GPSR(IP1_7_4, DU_DG5),
  462. PINMUX_IPSR_GPSR(IP1_7_4, SDA5),
  463. PINMUX_IPSR_MSEL(IP1_7_4, GETHER_MDC_B, SEL_GETHER_1),
  464. PINMUX_IPSR_GPSR(IP1_7_4, A9),
  465. PINMUX_IPSR_GPSR(IP1_11_8, DU_DG6),
  466. PINMUX_IPSR_MSEL(IP1_11_8, SCIF_CLK_A, SEL_HSCIF0_0),
  467. PINMUX_IPSR_MSEL(IP1_11_8, GETHER_MDIO_B, SEL_GETHER_1),
  468. PINMUX_IPSR_GPSR(IP1_11_8, A10),
  469. PINMUX_IPSR_GPSR(IP1_15_12, DU_DG7),
  470. PINMUX_IPSR_MSEL(IP1_15_12, HRX0_A, SEL_HSCIF0_0),
  471. PINMUX_IPSR_GPSR(IP1_15_12, A11),
  472. PINMUX_IPSR_GPSR(IP1_19_16, DU_DB2),
  473. PINMUX_IPSR_MSEL(IP1_19_16, HSCK0_A, SEL_HSCIF0_0),
  474. PINMUX_IPSR_GPSR(IP1_19_16, A12),
  475. PINMUX_IPSR_GPSR(IP1_19_16, IRQ1),
  476. PINMUX_IPSR_GPSR(IP1_23_20, DU_DB3),
  477. PINMUX_IPSR_MSEL(IP1_23_20, HRTS0_N_A, SEL_HSCIF0_0),
  478. PINMUX_IPSR_GPSR(IP1_23_20, A13),
  479. PINMUX_IPSR_GPSR(IP1_23_20, IRQ2),
  480. PINMUX_IPSR_GPSR(IP1_27_24, DU_DB4),
  481. PINMUX_IPSR_MSEL(IP1_27_24, HCTS0_N_A, SEL_HSCIF0_0),
  482. PINMUX_IPSR_GPSR(IP1_27_24, A14),
  483. PINMUX_IPSR_GPSR(IP1_27_24, IRQ3),
  484. PINMUX_IPSR_GPSR(IP1_31_28, DU_DB5),
  485. PINMUX_IPSR_MSEL(IP1_31_28, HTX0_A, SEL_HSCIF0_0),
  486. PINMUX_IPSR_MSEL(IP1_31_28, PWM0_A, SEL_PWM0_0),
  487. PINMUX_IPSR_GPSR(IP1_31_28, A15),
  488. /* IPSR2 */
  489. PINMUX_IPSR_GPSR(IP2_3_0, DU_DB6),
  490. PINMUX_IPSR_GPSR(IP2_3_0, MSIOF3_RXD),
  491. PINMUX_IPSR_GPSR(IP2_3_0, A16),
  492. PINMUX_IPSR_GPSR(IP2_7_4, DU_DB7),
  493. PINMUX_IPSR_GPSR(IP2_7_4, MSIOF3_TXD),
  494. PINMUX_IPSR_GPSR(IP2_7_4, A17),
  495. PINMUX_IPSR_GPSR(IP2_11_8, DU_DOTCLKOUT),
  496. PINMUX_IPSR_GPSR(IP2_11_8, MSIOF3_SS1),
  497. PINMUX_IPSR_MSEL(IP2_11_8, GETHER_LINK_B, SEL_GETHER_1),
  498. PINMUX_IPSR_GPSR(IP2_11_8, A18),
  499. PINMUX_IPSR_GPSR(IP2_15_12, DU_EXHSYNC_DU_HSYNC),
  500. PINMUX_IPSR_GPSR(IP2_15_12, MSIOF3_SS2),
  501. PINMUX_IPSR_MSEL(IP2_15_12, GETHER_PHY_INT_B, SEL_GETHER_1),
  502. PINMUX_IPSR_GPSR(IP2_15_12, A19),
  503. PINMUX_IPSR_GPSR(IP2_15_12, FXR_TXENA_N),
  504. PINMUX_IPSR_GPSR(IP2_19_16, DU_EXVSYNC_DU_VSYNC),
  505. PINMUX_IPSR_GPSR(IP2_19_16, MSIOF3_SCK),
  506. PINMUX_IPSR_GPSR(IP2_19_16, FXR_TXENB_N),
  507. PINMUX_IPSR_GPSR(IP2_23_20, DU_EXODDF_DU_ODDF_DISP_CDE),
  508. PINMUX_IPSR_GPSR(IP2_23_20, MSIOF3_SYNC),
  509. PINMUX_IPSR_GPSR(IP2_27_24, IRQ0),
  510. PINMUX_IPSR_GPSR(IP2_27_24, CC5_OSCOUT),
  511. PINMUX_IPSR_GPSR(IP2_31_28, VI0_CLK),
  512. PINMUX_IPSR_GPSR(IP2_31_28, MSIOF2_SCK),
  513. PINMUX_IPSR_GPSR(IP2_31_28, SCK3),
  514. PINMUX_IPSR_GPSR(IP2_31_28, HSCK3),
  515. /* IPSR3 */
  516. PINMUX_IPSR_GPSR(IP3_3_0, VI0_CLKENB),
  517. PINMUX_IPSR_GPSR(IP3_3_0, MSIOF2_RXD),
  518. PINMUX_IPSR_GPSR(IP3_3_0, RX3),
  519. PINMUX_IPSR_GPSR(IP3_3_0, RD_WR_N),
  520. PINMUX_IPSR_GPSR(IP3_3_0, HCTS3_N),
  521. PINMUX_IPSR_GPSR(IP3_7_4, VI0_HSYNC_N),
  522. PINMUX_IPSR_GPSR(IP3_7_4, MSIOF2_TXD),
  523. PINMUX_IPSR_GPSR(IP3_7_4, TX3),
  524. PINMUX_IPSR_GPSR(IP3_7_4, HRTS3_N),
  525. PINMUX_IPSR_GPSR(IP3_11_8, VI0_VSYNC_N),
  526. PINMUX_IPSR_GPSR(IP3_11_8, MSIOF2_SYNC),
  527. PINMUX_IPSR_GPSR(IP3_11_8, CTS3_N),
  528. PINMUX_IPSR_GPSR(IP3_11_8, HTX3),
  529. PINMUX_IPSR_GPSR(IP3_15_12, VI0_DATA0),
  530. PINMUX_IPSR_GPSR(IP3_15_12, MSIOF2_SS1),
  531. PINMUX_IPSR_GPSR(IP3_15_12, RTS3_N_TANS),
  532. PINMUX_IPSR_GPSR(IP3_15_12, HRX3),
  533. PINMUX_IPSR_GPSR(IP3_19_16, VI0_DATA1),
  534. PINMUX_IPSR_GPSR(IP3_19_16, MSIOF2_SS2),
  535. PINMUX_IPSR_GPSR(IP3_19_16, SCK1),
  536. PINMUX_IPSR_MSEL(IP3_19_16, SPEEDIN_A, SEL_RSP_0),
  537. PINMUX_IPSR_GPSR(IP3_23_20, VI0_DATA2),
  538. PINMUX_IPSR_GPSR(IP3_23_20, AVB_AVTP_PPS),
  539. PINMUX_IPSR_GPSR(IP3_27_24, VI0_DATA3),
  540. PINMUX_IPSR_GPSR(IP3_27_24, HSCK1),
  541. PINMUX_IPSR_GPSR(IP3_31_28, VI0_DATA4),
  542. PINMUX_IPSR_GPSR(IP3_31_28, HRTS1_N),
  543. PINMUX_IPSR_MSEL(IP3_31_28, RX1_A, SEL_SCIF1_0),
  544. /* IPSR4 */
  545. PINMUX_IPSR_GPSR(IP4_3_0, VI0_DATA5),
  546. PINMUX_IPSR_GPSR(IP4_3_0, HCTS1_N),
  547. PINMUX_IPSR_MSEL(IP4_3_0, TX1_A, SEL_SCIF1_0),
  548. PINMUX_IPSR_GPSR(IP4_7_4, VI0_DATA6),
  549. PINMUX_IPSR_GPSR(IP4_7_4, HTX1),
  550. PINMUX_IPSR_GPSR(IP4_7_4, CTS1_N),
  551. PINMUX_IPSR_GPSR(IP4_11_8, VI0_DATA7),
  552. PINMUX_IPSR_GPSR(IP4_11_8, HRX1),
  553. PINMUX_IPSR_GPSR(IP4_11_8, RTS1_N_TANS),
  554. PINMUX_IPSR_GPSR(IP4_15_12, VI0_DATA8),
  555. PINMUX_IPSR_GPSR(IP4_15_12, HSCK2),
  556. PINMUX_IPSR_GPSR(IP4_19_16, VI0_DATA9),
  557. PINMUX_IPSR_GPSR(IP4_19_16, HCTS2_N),
  558. PINMUX_IPSR_MSEL(IP4_19_16, PWM1_A, SEL_PWM1_0),
  559. PINMUX_IPSR_GPSR(IP4_23_20, VI0_DATA10),
  560. PINMUX_IPSR_GPSR(IP4_23_20, HRTS2_N),
  561. PINMUX_IPSR_MSEL(IP4_23_20, PWM2_A, SEL_PWM2_0),
  562. PINMUX_IPSR_GPSR(IP4_27_24, VI0_DATA11),
  563. PINMUX_IPSR_GPSR(IP4_27_24, HTX2),
  564. PINMUX_IPSR_MSEL(IP4_27_24, PWM3_A, SEL_PWM3_0),
  565. PINMUX_IPSR_GPSR(IP4_31_28, VI0_FIELD),
  566. PINMUX_IPSR_GPSR(IP4_31_28, HRX2),
  567. PINMUX_IPSR_MSEL(IP4_31_28, PWM4_A, SEL_PWM4_0),
  568. PINMUX_IPSR_GPSR(IP4_31_28, CS1_N),
  569. /* IPSR5 */
  570. PINMUX_IPSR_GPSR(IP5_3_0, VI1_CLK),
  571. PINMUX_IPSR_GPSR(IP5_3_0, MSIOF1_RXD),
  572. PINMUX_IPSR_GPSR(IP5_3_0, CS0_N),
  573. PINMUX_IPSR_GPSR(IP5_7_4, VI1_CLKENB),
  574. PINMUX_IPSR_GPSR(IP5_7_4, MSIOF1_TXD),
  575. PINMUX_IPSR_GPSR(IP5_7_4, D0),
  576. PINMUX_IPSR_GPSR(IP5_11_8, VI1_HSYNC_N),
  577. PINMUX_IPSR_GPSR(IP5_11_8, MSIOF1_SCK),
  578. PINMUX_IPSR_GPSR(IP5_11_8, D1),
  579. PINMUX_IPSR_GPSR(IP5_15_12, VI1_VSYNC_N),
  580. PINMUX_IPSR_GPSR(IP5_15_12, MSIOF1_SYNC),
  581. PINMUX_IPSR_GPSR(IP5_15_12, D2),
  582. PINMUX_IPSR_GPSR(IP5_19_16, VI1_DATA0),
  583. PINMUX_IPSR_GPSR(IP5_19_16, MSIOF1_SS1),
  584. PINMUX_IPSR_GPSR(IP5_19_16, D3),
  585. PINMUX_IPSR_GPSR(IP5_19_16, MMC_WP),
  586. PINMUX_IPSR_GPSR(IP5_23_20, VI1_DATA1),
  587. PINMUX_IPSR_GPSR(IP5_23_20, MSIOF1_SS2),
  588. PINMUX_IPSR_GPSR(IP5_23_20, D4),
  589. PINMUX_IPSR_GPSR(IP5_23_20, MMC_CD),
  590. PINMUX_IPSR_GPSR(IP5_27_24, VI1_DATA2),
  591. PINMUX_IPSR_MSEL(IP5_27_24, CANFD0_TX_B, SEL_CANFD0_1),
  592. PINMUX_IPSR_GPSR(IP5_27_24, D5),
  593. PINMUX_IPSR_GPSR(IP5_27_24, MMC_DS),
  594. PINMUX_IPSR_GPSR(IP5_31_28, VI1_DATA3),
  595. PINMUX_IPSR_MSEL(IP5_31_28, CANFD0_RX_B, SEL_CANFD0_1),
  596. PINMUX_IPSR_GPSR(IP5_31_28, D6),
  597. PINMUX_IPSR_GPSR(IP5_31_28, MMC_CMD),
  598. /* IPSR6 */
  599. PINMUX_IPSR_GPSR(IP6_3_0, VI1_DATA4),
  600. PINMUX_IPSR_MSEL(IP6_3_0, CANFD_CLK_B, SEL_CANFD0_1),
  601. PINMUX_IPSR_GPSR(IP6_3_0, D7),
  602. PINMUX_IPSR_GPSR(IP6_3_0, MMC_D0),
  603. PINMUX_IPSR_GPSR(IP6_7_4, VI1_DATA5),
  604. PINMUX_IPSR_GPSR(IP6_7_4, D8),
  605. PINMUX_IPSR_GPSR(IP6_7_4, MMC_D1),
  606. PINMUX_IPSR_GPSR(IP6_11_8, VI1_DATA6),
  607. PINMUX_IPSR_GPSR(IP6_11_8, D9),
  608. PINMUX_IPSR_GPSR(IP6_11_8, MMC_D2),
  609. PINMUX_IPSR_GPSR(IP6_15_12, VI1_DATA7),
  610. PINMUX_IPSR_GPSR(IP6_15_12, D10),
  611. PINMUX_IPSR_GPSR(IP6_15_12, MMC_D3),
  612. PINMUX_IPSR_GPSR(IP6_19_16, VI1_DATA8),
  613. PINMUX_IPSR_GPSR(IP6_19_16, D11),
  614. PINMUX_IPSR_GPSR(IP6_19_16, MMC_CLK),
  615. PINMUX_IPSR_GPSR(IP6_23_20, VI1_DATA9),
  616. PINMUX_IPSR_MSEL(IP6_23_20, TCLK1_A, SEL_TMU_0),
  617. PINMUX_IPSR_GPSR(IP6_23_20, D12),
  618. PINMUX_IPSR_GPSR(IP6_23_20, MMC_D4),
  619. PINMUX_IPSR_GPSR(IP6_27_24, VI1_DATA10),
  620. PINMUX_IPSR_MSEL(IP6_27_24, TCLK2_A, SEL_TMU_0),
  621. PINMUX_IPSR_GPSR(IP6_27_24, D13),
  622. PINMUX_IPSR_GPSR(IP6_27_24, MMC_D5),
  623. PINMUX_IPSR_GPSR(IP6_31_28, VI1_DATA11),
  624. PINMUX_IPSR_GPSR(IP6_31_28, SCL4),
  625. PINMUX_IPSR_GPSR(IP6_31_28, D14),
  626. PINMUX_IPSR_GPSR(IP6_31_28, MMC_D6),
  627. /* IPSR7 */
  628. PINMUX_IPSR_GPSR(IP7_3_0, VI1_FIELD),
  629. PINMUX_IPSR_GPSR(IP7_3_0, SDA4),
  630. PINMUX_IPSR_GPSR(IP7_3_0, D15),
  631. PINMUX_IPSR_GPSR(IP7_3_0, MMC_D7),
  632. PINMUX_IPSR_GPSR(IP7_7_4, SCL0),
  633. PINMUX_IPSR_GPSR(IP7_7_4, CLKOUT),
  634. PINMUX_IPSR_GPSR(IP7_11_8, SDA0),
  635. PINMUX_IPSR_GPSR(IP7_11_8, BS_N),
  636. PINMUX_IPSR_GPSR(IP7_11_8, SCK0),
  637. PINMUX_IPSR_MSEL(IP7_11_8, HSCK0_B, SEL_HSCIF0_1),
  638. PINMUX_IPSR_GPSR(IP7_15_12, SCL1),
  639. PINMUX_IPSR_GPSR(IP7_15_12, TPU0TO2),
  640. PINMUX_IPSR_GPSR(IP7_15_12, RD_N),
  641. PINMUX_IPSR_GPSR(IP7_15_12, CTS0_N),
  642. PINMUX_IPSR_GPSR(IP7_15_12, HCTS0_N_B),
  643. PINMUX_IPSR_GPSR(IP7_19_16, SDA1),
  644. PINMUX_IPSR_GPSR(IP7_19_16, TPU0TO3),
  645. PINMUX_IPSR_GPSR(IP7_19_16, WE0_N),
  646. PINMUX_IPSR_GPSR(IP7_19_16, RTS0_N_TANS),
  647. PINMUX_IPSR_MSEL(IP1_23_20, HRTS0_N_B, SEL_HSCIF0_1),
  648. PINMUX_IPSR_GPSR(IP7_23_20, SCL2),
  649. PINMUX_IPSR_GPSR(IP7_23_20, WE1_N),
  650. PINMUX_IPSR_GPSR(IP7_23_20, RX0),
  651. PINMUX_IPSR_MSEL(IP7_23_20, HRX0_B, SEL_HSCIF0_1),
  652. PINMUX_IPSR_GPSR(IP7_27_24, SDA2),
  653. PINMUX_IPSR_GPSR(IP7_27_24, EX_WAIT0),
  654. PINMUX_IPSR_GPSR(IP7_27_24, TX0),
  655. PINMUX_IPSR_MSEL(IP7_27_24, HTX0_B, SEL_HSCIF0_1),
  656. PINMUX_IPSR_GPSR(IP7_31_28, AVB_AVTP_MATCH),
  657. PINMUX_IPSR_GPSR(IP7_31_28, TPU0TO0),
  658. /* IPSR8 */
  659. PINMUX_IPSR_GPSR(IP8_3_0, AVB_AVTP_CAPTURE),
  660. PINMUX_IPSR_GPSR(IP8_3_0, TPU0TO1),
  661. PINMUX_IPSR_MSEL(IP8_7_4, CANFD0_TX_A, SEL_CANFD0_0),
  662. PINMUX_IPSR_GPSR(IP8_7_4, FXR_TXDA),
  663. PINMUX_IPSR_MSEL(IP8_7_4, PWM0_B, SEL_PWM0_1),
  664. PINMUX_IPSR_GPSR(IP8_7_4, DU_DISP),
  665. PINMUX_IPSR_MSEL(IP8_11_8, CANFD0_RX_A, SEL_CANFD0_0),
  666. PINMUX_IPSR_GPSR(IP8_11_8, RXDA_EXTFXR),
  667. PINMUX_IPSR_MSEL(IP8_11_8, PWM1_B, SEL_PWM1_1),
  668. PINMUX_IPSR_GPSR(IP8_11_8, DU_CDE),
  669. PINMUX_IPSR_GPSR(IP8_15_12, CANFD1_TX),
  670. PINMUX_IPSR_GPSR(IP8_15_12, FXR_TXDB),
  671. PINMUX_IPSR_MSEL(IP8_15_12, PWM2_B, SEL_PWM2_1),
  672. PINMUX_IPSR_MSEL(IP8_15_12, TCLK1_B, SEL_TMU_1),
  673. PINMUX_IPSR_MSEL(IP8_15_12, TX1_B, SEL_SCIF1_1),
  674. PINMUX_IPSR_GPSR(IP8_19_16, CANFD1_RX),
  675. PINMUX_IPSR_GPSR(IP8_19_16, RXDB_EXTFXR),
  676. PINMUX_IPSR_MSEL(IP8_19_16, PWM3_B, SEL_PWM3_1),
  677. PINMUX_IPSR_MSEL(IP8_19_16, TCLK2_B, SEL_TMU_1),
  678. PINMUX_IPSR_MSEL(IP8_19_16, RX1_B, SEL_SCIF1_1),
  679. PINMUX_IPSR_MSEL(IP8_23_20, CANFD_CLK_A, SEL_CANFD0_0),
  680. PINMUX_IPSR_GPSR(IP8_23_20, CLK_EXTFXR),
  681. PINMUX_IPSR_MSEL(IP8_23_20, PWM4_B, SEL_PWM4_1),
  682. PINMUX_IPSR_MSEL(IP8_23_20, SPEEDIN_B, SEL_RSP_1),
  683. PINMUX_IPSR_MSEL(IP8_23_20, SCIF_CLK_B, SEL_HSCIF0_1),
  684. PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKIN),
  685. PINMUX_IPSR_GPSR(IP8_27_24, DIGRF_CLKEN_IN),
  686. PINMUX_IPSR_GPSR(IP8_31_28, DIGRF_CLKOUT),
  687. PINMUX_IPSR_GPSR(IP8_31_28, DIGRF_CLKEN_OUT),
  688. /* IPSR9 */
  689. PINMUX_IPSR_GPSR(IP9_3_0, IRQ4),
  690. PINMUX_IPSR_GPSR(IP9_3_0, VI0_DATA12),
  691. PINMUX_IPSR_GPSR(IP9_7_4, IRQ5),
  692. PINMUX_IPSR_GPSR(IP9_7_4, VI0_DATA13),
  693. PINMUX_IPSR_GPSR(IP9_11_8, MSIOF0_RXD),
  694. PINMUX_IPSR_GPSR(IP9_11_8, DU_DR0),
  695. PINMUX_IPSR_GPSR(IP9_11_8, VI0_DATA14),
  696. PINMUX_IPSR_GPSR(IP9_15_12, MSIOF0_TXD),
  697. PINMUX_IPSR_GPSR(IP9_15_12, DU_DR1),
  698. PINMUX_IPSR_GPSR(IP9_15_12, VI0_DATA15),
  699. PINMUX_IPSR_GPSR(IP9_19_16, MSIOF0_SCK),
  700. PINMUX_IPSR_GPSR(IP9_19_16, DU_DG0),
  701. PINMUX_IPSR_GPSR(IP9_19_16, VI0_DATA16),
  702. PINMUX_IPSR_GPSR(IP9_23_20, MSIOF0_SYNC),
  703. PINMUX_IPSR_GPSR(IP9_23_20, DU_DG1),
  704. PINMUX_IPSR_GPSR(IP9_23_20, VI0_DATA17),
  705. PINMUX_IPSR_GPSR(IP9_27_24, MSIOF0_SS1),
  706. PINMUX_IPSR_GPSR(IP9_27_24, DU_DB0),
  707. PINMUX_IPSR_GPSR(IP9_27_24, TCLK3),
  708. PINMUX_IPSR_GPSR(IP9_27_24, VI0_DATA18),
  709. PINMUX_IPSR_GPSR(IP9_31_28, MSIOF0_SS2),
  710. PINMUX_IPSR_GPSR(IP9_31_28, DU_DB1),
  711. PINMUX_IPSR_GPSR(IP9_31_28, TCLK4),
  712. PINMUX_IPSR_GPSR(IP9_31_28, VI0_DATA19),
  713. /* IPSR10 */
  714. PINMUX_IPSR_GPSR(IP10_3_0, SCL3),
  715. PINMUX_IPSR_GPSR(IP10_3_0, VI0_DATA20),
  716. PINMUX_IPSR_GPSR(IP10_7_4, SDA3),
  717. PINMUX_IPSR_GPSR(IP10_7_4, VI0_DATA21),
  718. PINMUX_IPSR_GPSR(IP10_11_8, FSO_CFE_0_N),
  719. PINMUX_IPSR_GPSR(IP10_11_8, VI0_DATA22),
  720. PINMUX_IPSR_GPSR(IP10_15_12, FSO_CFE_1_N),
  721. PINMUX_IPSR_GPSR(IP10_15_12, VI0_DATA23),
  722. PINMUX_IPSR_GPSR(IP10_19_16, FSO_TOE_N),
  723. };
  724. static const struct sh_pfc_pin pinmux_pins[] = {
  725. PINMUX_GPIO_GP_ALL(),
  726. };
  727. /* - AVB -------------------------------------------------------------------- */
  728. static const unsigned int avb_link_pins[] = {
  729. /* AVB_LINK */
  730. RCAR_GP_PIN(1, 18),
  731. };
  732. static const unsigned int avb_link_mux[] = {
  733. AVB_LINK_MARK,
  734. };
  735. static const unsigned int avb_magic_pins[] = {
  736. /* AVB_MAGIC */
  737. RCAR_GP_PIN(1, 16),
  738. };
  739. static const unsigned int avb_magic_mux[] = {
  740. AVB_MAGIC_MARK,
  741. };
  742. static const unsigned int avb_phy_int_pins[] = {
  743. /* AVB_PHY_INT */
  744. RCAR_GP_PIN(1, 17),
  745. };
  746. static const unsigned int avb_phy_int_mux[] = {
  747. AVB_PHY_INT_MARK,
  748. };
  749. static const unsigned int avb_mdio_pins[] = {
  750. /* AVB_MDC, AVB_MDIO */
  751. RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14),
  752. };
  753. static const unsigned int avb_mdio_mux[] = {
  754. AVB_MDC_MARK, AVB_MDIO_MARK,
  755. };
  756. static const unsigned int avb_rgmii_pins[] = {
  757. /*
  758. * AVB_TX_CTL, AVB_TXC, AVB_TD0, AVB_TD1, AVB_TD2, AVB_TD3,
  759. * AVB_RX_CTL, AVB_RXC, AVB_RD0, AVB_RD1, AVB_RD2, AVB_RD3,
  760. */
  761. RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 8),
  762. RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 10),
  763. RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 12),
  764. RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 2),
  765. RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 4),
  766. RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
  767. };
  768. static const unsigned int avb_rgmii_mux[] = {
  769. AVB_TX_CTL_MARK, AVB_TXC_MARK,
  770. AVB_TD0_MARK, AVB_TD1_MARK, AVB_TD2_MARK, AVB_TD3_MARK,
  771. AVB_RX_CTL_MARK, AVB_RXC_MARK,
  772. AVB_RD0_MARK, AVB_RD1_MARK, AVB_RD2_MARK, AVB_RD3_MARK,
  773. };
  774. static const unsigned int avb_txcrefclk_pins[] = {
  775. /* AVB_TXCREFCLK */
  776. RCAR_GP_PIN(1, 13),
  777. };
  778. static const unsigned int avb_txcrefclk_mux[] = {
  779. AVB_TXCREFCLK_MARK,
  780. };
  781. static const unsigned int avb_avtp_pps_pins[] = {
  782. /* AVB_AVTP_PPS */
  783. RCAR_GP_PIN(2, 6),
  784. };
  785. static const unsigned int avb_avtp_pps_mux[] = {
  786. AVB_AVTP_PPS_MARK,
  787. };
  788. static const unsigned int avb_avtp_capture_pins[] = {
  789. /* AVB_AVTP_CAPTURE */
  790. RCAR_GP_PIN(1, 20),
  791. };
  792. static const unsigned int avb_avtp_capture_mux[] = {
  793. AVB_AVTP_CAPTURE_MARK,
  794. };
  795. static const unsigned int avb_avtp_match_pins[] = {
  796. /* AVB_AVTP_MATCH */
  797. RCAR_GP_PIN(1, 19),
  798. };
  799. static const unsigned int avb_avtp_match_mux[] = {
  800. AVB_AVTP_MATCH_MARK,
  801. };
  802. /* - CANFD0 ----------------------------------------------------------------- */
  803. static const unsigned int canfd0_data_a_pins[] = {
  804. /* CANFD0_TX, CANFD0_RX */
  805. RCAR_GP_PIN(1, 21), RCAR_GP_PIN(1, 22),
  806. };
  807. static const unsigned int canfd0_data_a_mux[] = {
  808. CANFD0_TX_A_MARK, CANFD0_RX_A_MARK,
  809. };
  810. static const unsigned int canfd0_data_b_pins[] = {
  811. /* CANFD0_TX, CANFD0_RX */
  812. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  813. };
  814. static const unsigned int canfd0_data_b_mux[] = {
  815. CANFD0_TX_B_MARK, CANFD0_RX_B_MARK,
  816. };
  817. /* - CANFD1 ----------------------------------------------------------------- */
  818. static const unsigned int canfd1_data_pins[] = {
  819. /* CANFD1_TX, CANFD1_RX */
  820. RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 24),
  821. };
  822. static const unsigned int canfd1_data_mux[] = {
  823. CANFD1_TX_MARK, CANFD1_RX_MARK,
  824. };
  825. /* - CANFD Clock ------------------------------------------------------------ */
  826. static const unsigned int canfd_clk_a_pins[] = {
  827. /* CANFD_CLK */
  828. RCAR_GP_PIN(1, 25),
  829. };
  830. static const unsigned int canfd_clk_a_mux[] = {
  831. CANFD_CLK_A_MARK,
  832. };
  833. static const unsigned int canfd_clk_b_pins[] = {
  834. /* CANFD_CLK */
  835. RCAR_GP_PIN(3, 8),
  836. };
  837. static const unsigned int canfd_clk_b_mux[] = {
  838. CANFD_CLK_B_MARK,
  839. };
  840. /* - DU --------------------------------------------------------------------- */
  841. static const unsigned int du_rgb666_pins[] = {
  842. /* DU_DR[7:2], DU_DG[7:2], DU_DB[7:2] */
  843. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3),
  844. RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0),
  845. RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
  846. RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6),
  847. RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 15),
  848. RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12),
  849. };
  850. static const unsigned int du_rgb666_mux[] = {
  851. DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK,
  852. DU_DR4_MARK, DU_DR3_MARK, DU_DR2_MARK,
  853. DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK,
  854. DU_DG4_MARK, DU_DG3_MARK, DU_DG2_MARK,
  855. DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK,
  856. DU_DB4_MARK, DU_DB3_MARK, DU_DB2_MARK,
  857. };
  858. static const unsigned int du_rgb888_pins[] = {
  859. /* DU_DR[7:0], DU_DG[7:0], DU_DB[7:0] */
  860. RCAR_GP_PIN(0, 5), RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3),
  861. RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 0),
  862. RCAR_GP_PIN(2, 20), RCAR_GP_PIN(2, 19),
  863. RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 10), RCAR_GP_PIN(0, 9),
  864. RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 6),
  865. RCAR_GP_PIN(2, 22), RCAR_GP_PIN(2, 21),
  866. RCAR_GP_PIN(0, 17), RCAR_GP_PIN(0, 16), RCAR_GP_PIN(0, 15),
  867. RCAR_GP_PIN(0, 14), RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 12),
  868. RCAR_GP_PIN(2, 24), RCAR_GP_PIN(2, 23),
  869. };
  870. static const unsigned int du_rgb888_mux[] = {
  871. DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK,
  872. DU_DR4_MARK, DU_DR3_MARK, DU_DR2_MARK,
  873. DU_DR1_MARK, DU_DR0_MARK,
  874. DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK,
  875. DU_DG4_MARK, DU_DG3_MARK, DU_DG2_MARK,
  876. DU_DG1_MARK, DU_DG0_MARK,
  877. DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK,
  878. DU_DB4_MARK, DU_DB3_MARK, DU_DB2_MARK,
  879. DU_DB1_MARK, DU_DB0_MARK,
  880. };
  881. static const unsigned int du_clk_out_pins[] = {
  882. /* DU_DOTCLKOUT */
  883. RCAR_GP_PIN(0, 18),
  884. };
  885. static const unsigned int du_clk_out_mux[] = {
  886. DU_DOTCLKOUT_MARK,
  887. };
  888. static const unsigned int du_sync_pins[] = {
  889. /* DU_EXVSYNC/DU_VSYNC, DU_EXHSYNC/DU_HSYNC */
  890. RCAR_GP_PIN(0, 20), RCAR_GP_PIN(0, 19),
  891. };
  892. static const unsigned int du_sync_mux[] = {
  893. DU_EXVSYNC_DU_VSYNC_MARK, DU_EXHSYNC_DU_HSYNC_MARK,
  894. };
  895. static const unsigned int du_oddf_pins[] = {
  896. /* DU_EXODDF/DU_ODDF/DISP/CDE */
  897. RCAR_GP_PIN(0, 21),
  898. };
  899. static const unsigned int du_oddf_mux[] = {
  900. DU_EXODDF_DU_ODDF_DISP_CDE_MARK,
  901. };
  902. static const unsigned int du_cde_pins[] = {
  903. /* DU_CDE */
  904. RCAR_GP_PIN(1, 22),
  905. };
  906. static const unsigned int du_cde_mux[] = {
  907. DU_CDE_MARK,
  908. };
  909. static const unsigned int du_disp_pins[] = {
  910. /* DU_DISP */
  911. RCAR_GP_PIN(1, 21),
  912. };
  913. static const unsigned int du_disp_mux[] = {
  914. DU_DISP_MARK,
  915. };
  916. /* - GETHER ----------------------------------------------------------------- */
  917. static const unsigned int gether_link_a_pins[] = {
  918. /* GETHER_LINK */
  919. RCAR_GP_PIN(4, 24),
  920. };
  921. static const unsigned int gether_link_a_mux[] = {
  922. GETHER_LINK_A_MARK,
  923. };
  924. static const unsigned int gether_phy_int_a_pins[] = {
  925. /* GETHER_PHY_INT */
  926. RCAR_GP_PIN(4, 23),
  927. };
  928. static const unsigned int gether_phy_int_a_mux[] = {
  929. GETHER_PHY_INT_A_MARK,
  930. };
  931. static const unsigned int gether_mdio_a_pins[] = {
  932. /* GETHER_MDC, GETHER_MDIO */
  933. RCAR_GP_PIN(4, 21), RCAR_GP_PIN(4, 20),
  934. };
  935. static const unsigned int gether_mdio_a_mux[] = {
  936. GETHER_MDC_A_MARK, GETHER_MDIO_A_MARK,
  937. };
  938. static const unsigned int gether_link_b_pins[] = {
  939. /* GETHER_LINK */
  940. RCAR_GP_PIN(0, 18),
  941. };
  942. static const unsigned int gether_link_b_mux[] = {
  943. GETHER_LINK_B_MARK,
  944. };
  945. static const unsigned int gether_phy_int_b_pins[] = {
  946. /* GETHER_PHY_INT */
  947. RCAR_GP_PIN(0, 19),
  948. };
  949. static const unsigned int gether_phy_int_b_mux[] = {
  950. GETHER_PHY_INT_B_MARK,
  951. };
  952. static const unsigned int gether_mdio_b_mux[] = {
  953. GETHER_MDC_B_MARK, GETHER_MDIO_B_MARK,
  954. };
  955. static const unsigned int gether_mdio_b_pins[] = {
  956. /* GETHER_MDC, GETHER_MDIO */
  957. RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 10),
  958. };
  959. static const unsigned int gether_magic_pins[] = {
  960. /* GETHER_MAGIC */
  961. RCAR_GP_PIN(4, 22),
  962. };
  963. static const unsigned int gether_magic_mux[] = {
  964. GETHER_MAGIC_MARK,
  965. };
  966. static const unsigned int gether_rgmii_pins[] = {
  967. /*
  968. * GETHER_TX_CTL, GETHER_TXC,
  969. * GETHER_TD0, GETHER_TD1, GETHER_TD2, GETHER_TD3,
  970. * GETHER_RX_CTL, GETHER_RXC,
  971. * GETHER_RD0, GETHER_RD1, GETHER_RD2, GETHER_RD3,
  972. */
  973. RCAR_GP_PIN(4, 12), RCAR_GP_PIN(4, 13),
  974. RCAR_GP_PIN(4, 14), RCAR_GP_PIN(4, 15),
  975. RCAR_GP_PIN(4, 16), RCAR_GP_PIN(4, 17),
  976. RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7),
  977. RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9),
  978. RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11),
  979. };
  980. static const unsigned int gether_rgmii_mux[] = {
  981. GETHER_TX_CTL_MARK, GETHER_TXC_MARK,
  982. GETHER_TD0_MARK, GETHER_TD1_MARK,
  983. GETHER_TD2_MARK, GETHER_TD3_MARK,
  984. GETHER_RX_CTL_MARK, GETHER_RXC_MARK,
  985. GETHER_RD0_MARK, AVB_RD1_MARK,
  986. GETHER_RD2_MARK, AVB_RD3_MARK,
  987. };
  988. static const unsigned int gether_txcrefclk_pins[] = {
  989. /* GETHER_TXCREFCLK */
  990. RCAR_GP_PIN(4, 18),
  991. };
  992. static const unsigned int gether_txcrefclk_mux[] = {
  993. GETHER_TXCREFCLK_MARK,
  994. };
  995. static const unsigned int gether_txcrefclk_mega_pins[] = {
  996. /* GETHER_TXCREFCLK_MEGA */
  997. RCAR_GP_PIN(4, 19),
  998. };
  999. static const unsigned int gether_txcrefclk_mega_mux[] = {
  1000. GETHER_TXCREFCLK_MEGA_MARK,
  1001. };
  1002. static const unsigned int gether_rmii_pins[] = {
  1003. /*
  1004. * GETHER_RMII_CRS_DV, GETHER_RMII_RX_ER,
  1005. * GETHER_RMII_RXD0, GETHER_RMII_RXD1,
  1006. * GETHER_RMII_TXD_EN, GETHER_RMII_TXD0,
  1007. * GETHER_RMII_TXD1, GETHER_RMII_REFCLK
  1008. */
  1009. RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
  1010. RCAR_GP_PIN(0, 2), RCAR_GP_PIN(0, 3),
  1011. RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
  1012. RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
  1013. };
  1014. static const unsigned int gether_rmii_mux[] = {
  1015. GETHER_RMII_CRS_DV_MARK, GETHER_RMII_RX_ER_MARK,
  1016. GETHER_RMII_RXD0_MARK, GETHER_RMII_RXD1_MARK,
  1017. GETHER_RMII_TXD_EN_MARK, GETHER_RMII_TXD0_MARK,
  1018. GETHER_RMII_TXD1_MARK, GETHER_RMII_REFCLK_MARK,
  1019. };
  1020. /* - HSCIF0 ----------------------------------------------------------------- */
  1021. static const unsigned int hscif0_data_a_pins[] = {
  1022. /* HRX0, HTX0 */
  1023. RCAR_GP_PIN(0, 11), RCAR_GP_PIN(0, 15),
  1024. };
  1025. static const unsigned int hscif0_data_a_mux[] = {
  1026. HRX0_A_MARK, HTX0_A_MARK,
  1027. };
  1028. static const unsigned int hscif0_clk_a_pins[] = {
  1029. /* HSCK0 */
  1030. RCAR_GP_PIN(0, 12),
  1031. };
  1032. static const unsigned int hscif0_clk_a_mux[] = {
  1033. HSCK0_A_MARK,
  1034. };
  1035. static const unsigned int hscif0_ctrl_a_pins[] = {
  1036. /* HRTS0#, HCTS0# */
  1037. RCAR_GP_PIN(0, 13), RCAR_GP_PIN(0, 14),
  1038. };
  1039. static const unsigned int hscif0_ctrl_a_mux[] = {
  1040. HRTS0_N_A_MARK, HCTS0_N_A_MARK,
  1041. };
  1042. static const unsigned int hscif0_data_b_pins[] = {
  1043. /* HRX0, HTX0 */
  1044. RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
  1045. };
  1046. static const unsigned int hscif0_data_b_mux[] = {
  1047. HRX0_B_MARK, HTX0_B_MARK,
  1048. };
  1049. static const unsigned int hscif0_clk_b_pins[] = {
  1050. /* HSCK0 */
  1051. RCAR_GP_PIN(4, 1),
  1052. };
  1053. static const unsigned int hscif0_clk_b_mux[] = {
  1054. HSCK0_B_MARK,
  1055. };
  1056. static const unsigned int hscif0_ctrl_b_pins[] = {
  1057. /* HRTS0#, HCTS0# */
  1058. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
  1059. };
  1060. static const unsigned int hscif0_ctrl_b_mux[] = {
  1061. HRTS0_N_B_MARK, HCTS0_N_B_MARK,
  1062. };
  1063. /* - HSCIF1 ----------------------------------------------------------------- */
  1064. static const unsigned int hscif1_data_pins[] = {
  1065. /* HRX1, HTX1 */
  1066. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
  1067. };
  1068. static const unsigned int hscif1_data_mux[] = {
  1069. HRX1_MARK, HTX1_MARK,
  1070. };
  1071. static const unsigned int hscif1_clk_pins[] = {
  1072. /* HSCK1 */
  1073. RCAR_GP_PIN(2, 7),
  1074. };
  1075. static const unsigned int hscif1_clk_mux[] = {
  1076. HSCK1_MARK,
  1077. };
  1078. static const unsigned int hscif1_ctrl_pins[] = {
  1079. /* HRTS1#, HCTS1# */
  1080. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1081. };
  1082. static const unsigned int hscif1_ctrl_mux[] = {
  1083. HRTS1_N_MARK, HCTS1_N_MARK,
  1084. };
  1085. /* - HSCIF2 ----------------------------------------------------------------- */
  1086. static const unsigned int hscif2_data_pins[] = {
  1087. /* HRX2, HTX2 */
  1088. RCAR_GP_PIN(2, 16), RCAR_GP_PIN(2, 15),
  1089. };
  1090. static const unsigned int hscif2_data_mux[] = {
  1091. HRX2_MARK, HTX2_MARK,
  1092. };
  1093. static const unsigned int hscif2_clk_pins[] = {
  1094. /* HSCK2 */
  1095. RCAR_GP_PIN(2, 12),
  1096. };
  1097. static const unsigned int hscif2_clk_mux[] = {
  1098. HSCK2_MARK,
  1099. };
  1100. static const unsigned int hscif2_ctrl_pins[] = {
  1101. /* HRTS2#, HCTS2# */
  1102. RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 13),
  1103. };
  1104. static const unsigned int hscif2_ctrl_mux[] = {
  1105. HRTS2_N_MARK, HCTS2_N_MARK,
  1106. };
  1107. /* - HSCIF3 ----------------------------------------------------------------- */
  1108. static const unsigned int hscif3_data_pins[] = {
  1109. /* HRX3, HTX3 */
  1110. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
  1111. };
  1112. static const unsigned int hscif3_data_mux[] = {
  1113. HRX3_MARK, HTX3_MARK,
  1114. };
  1115. static const unsigned int hscif3_clk_pins[] = {
  1116. /* HSCK3 */
  1117. RCAR_GP_PIN(2, 0),
  1118. };
  1119. static const unsigned int hscif3_clk_mux[] = {
  1120. HSCK3_MARK,
  1121. };
  1122. static const unsigned int hscif3_ctrl_pins[] = {
  1123. /* HRTS3#, HCTS3# */
  1124. RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 1),
  1125. };
  1126. static const unsigned int hscif3_ctrl_mux[] = {
  1127. HRTS3_N_MARK, HCTS3_N_MARK,
  1128. };
  1129. /* - I2C0 ------------------------------------------------------------------- */
  1130. static const unsigned int i2c0_pins[] = {
  1131. /* SDA0, SCL0 */
  1132. RCAR_GP_PIN(4, 1), RCAR_GP_PIN(4, 0),
  1133. };
  1134. static const unsigned int i2c0_mux[] = {
  1135. SDA0_MARK, SCL0_MARK,
  1136. };
  1137. /* - I2C1 ------------------------------------------------------------------- */
  1138. static const unsigned int i2c1_pins[] = {
  1139. /* SDA1, SCL1 */
  1140. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
  1141. };
  1142. static const unsigned int i2c1_mux[] = {
  1143. SDA1_MARK, SCL1_MARK,
  1144. };
  1145. /* - I2C2 ------------------------------------------------------------------- */
  1146. static const unsigned int i2c2_pins[] = {
  1147. /* SDA2, SCL2 */
  1148. RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 4),
  1149. };
  1150. static const unsigned int i2c2_mux[] = {
  1151. SDA2_MARK, SCL2_MARK,
  1152. };
  1153. /* - I2C3 ------------------------------------------------------------------- */
  1154. static const unsigned int i2c3_pins[] = {
  1155. /* SDA3, SCL3 */
  1156. RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 25),
  1157. };
  1158. static const unsigned int i2c3_mux[] = {
  1159. SDA3_MARK, SCL3_MARK,
  1160. };
  1161. /* - I2C4 ------------------------------------------------------------------- */
  1162. static const unsigned int i2c4_pins[] = {
  1163. /* SDA4, SCL4 */
  1164. RCAR_GP_PIN(3, 16), RCAR_GP_PIN(3, 15),
  1165. };
  1166. static const unsigned int i2c4_mux[] = {
  1167. SDA4_MARK, SCL4_MARK,
  1168. };
  1169. /* - I2C5 ------------------------------------------------------------------- */
  1170. static const unsigned int i2c5_pins[] = {
  1171. /* SDA5, SCL5 */
  1172. RCAR_GP_PIN(0, 9), RCAR_GP_PIN(0, 8),
  1173. };
  1174. static const unsigned int i2c5_mux[] = {
  1175. SDA5_MARK, SCL5_MARK,
  1176. };
  1177. /* - INTC-EX ---------------------------------------------------------------- */
  1178. static const unsigned int intc_ex_irq0_pins[] = {
  1179. /* IRQ0 */
  1180. RCAR_GP_PIN(1, 0),
  1181. };
  1182. static const unsigned int intc_ex_irq0_mux[] = {
  1183. IRQ0_MARK,
  1184. };
  1185. static const unsigned int intc_ex_irq1_pins[] = {
  1186. /* IRQ1 */
  1187. RCAR_GP_PIN(0, 12),
  1188. };
  1189. static const unsigned int intc_ex_irq1_mux[] = {
  1190. IRQ1_MARK,
  1191. };
  1192. static const unsigned int intc_ex_irq2_pins[] = {
  1193. /* IRQ2 */
  1194. RCAR_GP_PIN(0, 13),
  1195. };
  1196. static const unsigned int intc_ex_irq2_mux[] = {
  1197. IRQ2_MARK,
  1198. };
  1199. static const unsigned int intc_ex_irq3_pins[] = {
  1200. /* IRQ3 */
  1201. RCAR_GP_PIN(0, 14),
  1202. };
  1203. static const unsigned int intc_ex_irq3_mux[] = {
  1204. IRQ3_MARK,
  1205. };
  1206. static const unsigned int intc_ex_irq4_pins[] = {
  1207. /* IRQ4 */
  1208. RCAR_GP_PIN(2, 17),
  1209. };
  1210. static const unsigned int intc_ex_irq4_mux[] = {
  1211. IRQ4_MARK,
  1212. };
  1213. static const unsigned int intc_ex_irq5_pins[] = {
  1214. /* IRQ5 */
  1215. RCAR_GP_PIN(2, 18),
  1216. };
  1217. static const unsigned int intc_ex_irq5_mux[] = {
  1218. IRQ5_MARK,
  1219. };
  1220. /* - MMC -------------------------------------------------------------------- */
  1221. static const unsigned int mmc_data1_pins[] = {
  1222. /* MMC_D0 */
  1223. RCAR_GP_PIN(3, 8),
  1224. };
  1225. static const unsigned int mmc_data1_mux[] = {
  1226. MMC_D0_MARK,
  1227. };
  1228. static const unsigned int mmc_data4_pins[] = {
  1229. /* MMC_D[0:3] */
  1230. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1231. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1232. };
  1233. static const unsigned int mmc_data4_mux[] = {
  1234. MMC_D0_MARK, MMC_D1_MARK,
  1235. MMC_D2_MARK, MMC_D3_MARK,
  1236. };
  1237. static const unsigned int mmc_data8_pins[] = {
  1238. /* MMC_D[0:7] */
  1239. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1240. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1241. RCAR_GP_PIN(3, 13), RCAR_GP_PIN(3, 14),
  1242. RCAR_GP_PIN(3, 15), RCAR_GP_PIN(3, 16),
  1243. };
  1244. static const unsigned int mmc_data8_mux[] = {
  1245. MMC_D0_MARK, MMC_D1_MARK,
  1246. MMC_D2_MARK, MMC_D3_MARK,
  1247. MMC_D4_MARK, MMC_D5_MARK,
  1248. MMC_D6_MARK, MMC_D7_MARK,
  1249. };
  1250. static const unsigned int mmc_ctrl_pins[] = {
  1251. /* MMC_CLK, MMC_CMD */
  1252. RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 7),
  1253. };
  1254. static const unsigned int mmc_ctrl_mux[] = {
  1255. MMC_CLK_MARK, MMC_CMD_MARK,
  1256. };
  1257. static const unsigned int mmc_cd_pins[] = {
  1258. /* MMC_CD */
  1259. RCAR_GP_PIN(3, 5),
  1260. };
  1261. static const unsigned int mmc_cd_mux[] = {
  1262. MMC_CD_MARK,
  1263. };
  1264. static const unsigned int mmc_wp_pins[] = {
  1265. /* MMC_WP */
  1266. RCAR_GP_PIN(3, 4),
  1267. };
  1268. static const unsigned int mmc_wp_mux[] = {
  1269. MMC_WP_MARK,
  1270. };
  1271. static const unsigned int mmc_ds_pins[] = {
  1272. /* MMC_DS */
  1273. RCAR_GP_PIN(3, 6),
  1274. };
  1275. static const unsigned int mmc_ds_mux[] = {
  1276. MMC_DS_MARK,
  1277. };
  1278. /* - MSIOF0 ----------------------------------------------------------------- */
  1279. static const unsigned int msiof0_clk_pins[] = {
  1280. /* MSIOF0_SCK */
  1281. RCAR_GP_PIN(2, 21),
  1282. };
  1283. static const unsigned int msiof0_clk_mux[] = {
  1284. MSIOF0_SCK_MARK,
  1285. };
  1286. static const unsigned int msiof0_sync_pins[] = {
  1287. /* MSIOF0_SYNC */
  1288. RCAR_GP_PIN(2, 22),
  1289. };
  1290. static const unsigned int msiof0_sync_mux[] = {
  1291. MSIOF0_SYNC_MARK,
  1292. };
  1293. static const unsigned int msiof0_ss1_pins[] = {
  1294. /* MSIOF0_SS1 */
  1295. RCAR_GP_PIN(2, 23),
  1296. };
  1297. static const unsigned int msiof0_ss1_mux[] = {
  1298. MSIOF0_SS1_MARK,
  1299. };
  1300. static const unsigned int msiof0_ss2_pins[] = {
  1301. /* MSIOF0_SS2 */
  1302. RCAR_GP_PIN(2, 24),
  1303. };
  1304. static const unsigned int msiof0_ss2_mux[] = {
  1305. MSIOF0_SS2_MARK,
  1306. };
  1307. static const unsigned int msiof0_txd_pins[] = {
  1308. /* MSIOF0_TXD */
  1309. RCAR_GP_PIN(2, 20),
  1310. };
  1311. static const unsigned int msiof0_txd_mux[] = {
  1312. MSIOF0_TXD_MARK,
  1313. };
  1314. static const unsigned int msiof0_rxd_pins[] = {
  1315. /* MSIOF0_RXD */
  1316. RCAR_GP_PIN(2, 19),
  1317. };
  1318. static const unsigned int msiof0_rxd_mux[] = {
  1319. MSIOF0_RXD_MARK,
  1320. };
  1321. /* - MSIOF1 ----------------------------------------------------------------- */
  1322. static const unsigned int msiof1_clk_pins[] = {
  1323. /* MSIOF1_SCK */
  1324. RCAR_GP_PIN(3, 2),
  1325. };
  1326. static const unsigned int msiof1_clk_mux[] = {
  1327. MSIOF1_SCK_MARK,
  1328. };
  1329. static const unsigned int msiof1_sync_pins[] = {
  1330. /* MSIOF1_SYNC */
  1331. RCAR_GP_PIN(3, 3),
  1332. };
  1333. static const unsigned int msiof1_sync_mux[] = {
  1334. MSIOF1_SYNC_MARK,
  1335. };
  1336. static const unsigned int msiof1_ss1_pins[] = {
  1337. /* MSIOF1_SS1 */
  1338. RCAR_GP_PIN(3, 4),
  1339. };
  1340. static const unsigned int msiof1_ss1_mux[] = {
  1341. MSIOF1_SS1_MARK,
  1342. };
  1343. static const unsigned int msiof1_ss2_pins[] = {
  1344. /* MSIOF1_SS2 */
  1345. RCAR_GP_PIN(3, 5),
  1346. };
  1347. static const unsigned int msiof1_ss2_mux[] = {
  1348. MSIOF1_SS2_MARK,
  1349. };
  1350. static const unsigned int msiof1_txd_pins[] = {
  1351. /* MSIOF1_TXD */
  1352. RCAR_GP_PIN(3, 1),
  1353. };
  1354. static const unsigned int msiof1_txd_mux[] = {
  1355. MSIOF1_TXD_MARK,
  1356. };
  1357. static const unsigned int msiof1_rxd_pins[] = {
  1358. /* MSIOF1_RXD */
  1359. RCAR_GP_PIN(3, 0),
  1360. };
  1361. static const unsigned int msiof1_rxd_mux[] = {
  1362. MSIOF1_RXD_MARK,
  1363. };
  1364. /* - MSIOF2 ----------------------------------------------------------------- */
  1365. static const unsigned int msiof2_clk_pins[] = {
  1366. /* MSIOF2_SCK */
  1367. RCAR_GP_PIN(2, 0),
  1368. };
  1369. static const unsigned int msiof2_clk_mux[] = {
  1370. MSIOF2_SCK_MARK,
  1371. };
  1372. static const unsigned int msiof2_sync_pins[] = {
  1373. /* MSIOF2_SYNC */
  1374. RCAR_GP_PIN(2, 3),
  1375. };
  1376. static const unsigned int msiof2_sync_mux[] = {
  1377. MSIOF2_SYNC_MARK,
  1378. };
  1379. static const unsigned int msiof2_ss1_pins[] = {
  1380. /* MSIOF2_SS1 */
  1381. RCAR_GP_PIN(2, 4),
  1382. };
  1383. static const unsigned int msiof2_ss1_mux[] = {
  1384. MSIOF2_SS1_MARK,
  1385. };
  1386. static const unsigned int msiof2_ss2_pins[] = {
  1387. /* MSIOF2_SS2 */
  1388. RCAR_GP_PIN(2, 5),
  1389. };
  1390. static const unsigned int msiof2_ss2_mux[] = {
  1391. MSIOF2_SS2_MARK,
  1392. };
  1393. static const unsigned int msiof2_txd_pins[] = {
  1394. /* MSIOF2_TXD */
  1395. RCAR_GP_PIN(2, 2),
  1396. };
  1397. static const unsigned int msiof2_txd_mux[] = {
  1398. MSIOF2_TXD_MARK,
  1399. };
  1400. static const unsigned int msiof2_rxd_pins[] = {
  1401. /* MSIOF2_RXD */
  1402. RCAR_GP_PIN(2, 1),
  1403. };
  1404. static const unsigned int msiof2_rxd_mux[] = {
  1405. MSIOF2_RXD_MARK,
  1406. };
  1407. /* - MSIOF3 ----------------------------------------------------------------- */
  1408. static const unsigned int msiof3_clk_pins[] = {
  1409. /* MSIOF3_SCK */
  1410. RCAR_GP_PIN(0, 20),
  1411. };
  1412. static const unsigned int msiof3_clk_mux[] = {
  1413. MSIOF3_SCK_MARK,
  1414. };
  1415. static const unsigned int msiof3_sync_pins[] = {
  1416. /* MSIOF3_SYNC */
  1417. RCAR_GP_PIN(0, 21),
  1418. };
  1419. static const unsigned int msiof3_sync_mux[] = {
  1420. MSIOF3_SYNC_MARK,
  1421. };
  1422. static const unsigned int msiof3_ss1_pins[] = {
  1423. /* MSIOF3_SS1 */
  1424. RCAR_GP_PIN(0, 18),
  1425. };
  1426. static const unsigned int msiof3_ss1_mux[] = {
  1427. MSIOF3_SS1_MARK,
  1428. };
  1429. static const unsigned int msiof3_ss2_pins[] = {
  1430. /* MSIOF3_SS2 */
  1431. RCAR_GP_PIN(0, 19),
  1432. };
  1433. static const unsigned int msiof3_ss2_mux[] = {
  1434. MSIOF3_SS2_MARK,
  1435. };
  1436. static const unsigned int msiof3_txd_pins[] = {
  1437. /* MSIOF3_TXD */
  1438. RCAR_GP_PIN(0, 17),
  1439. };
  1440. static const unsigned int msiof3_txd_mux[] = {
  1441. MSIOF3_TXD_MARK,
  1442. };
  1443. static const unsigned int msiof3_rxd_pins[] = {
  1444. /* MSIOF3_RXD */
  1445. RCAR_GP_PIN(0, 16),
  1446. };
  1447. static const unsigned int msiof3_rxd_mux[] = {
  1448. MSIOF3_RXD_MARK,
  1449. };
  1450. /* - PWM0 ------------------------------------------------------------------- */
  1451. static const unsigned int pwm0_a_pins[] = {
  1452. /* PWM0 */
  1453. RCAR_GP_PIN(0, 15),
  1454. };
  1455. static const unsigned int pwm0_a_mux[] = {
  1456. PWM0_A_MARK,
  1457. };
  1458. static const unsigned int pwm0_b_pins[] = {
  1459. /* PWM0 */
  1460. RCAR_GP_PIN(1, 21),
  1461. };
  1462. static const unsigned int pwm0_b_mux[] = {
  1463. PWM0_B_MARK,
  1464. };
  1465. /* - PWM1 ------------------------------------------------------------------- */
  1466. static const unsigned int pwm1_a_pins[] = {
  1467. /* PWM1 */
  1468. RCAR_GP_PIN(2, 13),
  1469. };
  1470. static const unsigned int pwm1_a_mux[] = {
  1471. PWM1_A_MARK,
  1472. };
  1473. static const unsigned int pwm1_b_pins[] = {
  1474. /* PWM1 */
  1475. RCAR_GP_PIN(1, 22),
  1476. };
  1477. static const unsigned int pwm1_b_mux[] = {
  1478. PWM1_B_MARK,
  1479. };
  1480. /* - PWM2 ------------------------------------------------------------------- */
  1481. static const unsigned int pwm2_a_pins[] = {
  1482. /* PWM2 */
  1483. RCAR_GP_PIN(2, 14),
  1484. };
  1485. static const unsigned int pwm2_a_mux[] = {
  1486. PWM2_A_MARK,
  1487. };
  1488. static const unsigned int pwm2_b_pins[] = {
  1489. /* PWM2 */
  1490. RCAR_GP_PIN(1, 23),
  1491. };
  1492. static const unsigned int pwm2_b_mux[] = {
  1493. PWM2_B_MARK,
  1494. };
  1495. /* - PWM3 ------------------------------------------------------------------- */
  1496. static const unsigned int pwm3_a_pins[] = {
  1497. /* PWM3 */
  1498. RCAR_GP_PIN(2, 15),
  1499. };
  1500. static const unsigned int pwm3_a_mux[] = {
  1501. PWM3_A_MARK,
  1502. };
  1503. static const unsigned int pwm3_b_pins[] = {
  1504. /* PWM3 */
  1505. RCAR_GP_PIN(1, 24),
  1506. };
  1507. static const unsigned int pwm3_b_mux[] = {
  1508. PWM3_B_MARK,
  1509. };
  1510. /* - PWM4 ------------------------------------------------------------------- */
  1511. static const unsigned int pwm4_a_pins[] = {
  1512. /* PWM4 */
  1513. RCAR_GP_PIN(2, 16),
  1514. };
  1515. static const unsigned int pwm4_a_mux[] = {
  1516. PWM4_A_MARK,
  1517. };
  1518. static const unsigned int pwm4_b_pins[] = {
  1519. /* PWM4 */
  1520. RCAR_GP_PIN(1, 25),
  1521. };
  1522. static const unsigned int pwm4_b_mux[] = {
  1523. PWM4_B_MARK,
  1524. };
  1525. /* - SCIF0 ------------------------------------------------------------------ */
  1526. static const unsigned int scif0_data_pins[] = {
  1527. /* RX0, TX0 */
  1528. RCAR_GP_PIN(4, 4), RCAR_GP_PIN(4, 5),
  1529. };
  1530. static const unsigned int scif0_data_mux[] = {
  1531. RX0_MARK, TX0_MARK,
  1532. };
  1533. static const unsigned int scif0_clk_pins[] = {
  1534. /* SCK0 */
  1535. RCAR_GP_PIN(4, 1),
  1536. };
  1537. static const unsigned int scif0_clk_mux[] = {
  1538. SCK0_MARK,
  1539. };
  1540. static const unsigned int scif0_ctrl_pins[] = {
  1541. /* RTS0#/TANS, CTS0# */
  1542. RCAR_GP_PIN(4, 3), RCAR_GP_PIN(4, 2),
  1543. };
  1544. static const unsigned int scif0_ctrl_mux[] = {
  1545. RTS0_N_TANS_MARK, CTS0_N_MARK,
  1546. };
  1547. /* - SCIF1 ------------------------------------------------------------------ */
  1548. static const unsigned int scif1_data_a_pins[] = {
  1549. /* RX1, TX1 */
  1550. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1551. };
  1552. static const unsigned int scif1_data_a_mux[] = {
  1553. RX1_A_MARK, TX1_A_MARK,
  1554. };
  1555. static const unsigned int scif1_clk_pins[] = {
  1556. /* SCK1 */
  1557. RCAR_GP_PIN(2, 5),
  1558. };
  1559. static const unsigned int scif1_clk_mux[] = {
  1560. SCK1_MARK,
  1561. };
  1562. static const unsigned int scif1_ctrl_pins[] = {
  1563. /* RTS1#/TANS, CTS1# */
  1564. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 10),
  1565. };
  1566. static const unsigned int scif1_ctrl_mux[] = {
  1567. RTS1_N_TANS_MARK, CTS1_N_MARK,
  1568. };
  1569. static const unsigned int scif1_data_b_pins[] = {
  1570. /* RX1, TX1 */
  1571. RCAR_GP_PIN(1, 24), RCAR_GP_PIN(1, 23),
  1572. };
  1573. static const unsigned int scif1_data_b_mux[] = {
  1574. RX1_B_MARK, TX1_B_MARK,
  1575. };
  1576. /* - SCIF3 ------------------------------------------------------------------ */
  1577. static const unsigned int scif3_data_pins[] = {
  1578. /* RX3, TX3 */
  1579. RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2),
  1580. };
  1581. static const unsigned int scif3_data_mux[] = {
  1582. RX3_MARK, TX3_MARK,
  1583. };
  1584. static const unsigned int scif3_clk_pins[] = {
  1585. /* SCK3 */
  1586. RCAR_GP_PIN(2, 0),
  1587. };
  1588. static const unsigned int scif3_clk_mux[] = {
  1589. SCK3_MARK,
  1590. };
  1591. static const unsigned int scif3_ctrl_pins[] = {
  1592. /* RTS3#/TANS, CTS3# */
  1593. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 3),
  1594. };
  1595. static const unsigned int scif3_ctrl_mux[] = {
  1596. RTS3_N_TANS_MARK, CTS3_N_MARK,
  1597. };
  1598. /* - SCIF4 ------------------------------------------------------------------ */
  1599. static const unsigned int scif4_data_pins[] = {
  1600. /* RX4, TX4 */
  1601. RCAR_GP_PIN(0, 1), RCAR_GP_PIN(0, 2),
  1602. };
  1603. static const unsigned int scif4_data_mux[] = {
  1604. RX4_MARK, TX4_MARK,
  1605. };
  1606. static const unsigned int scif4_clk_pins[] = {
  1607. /* SCK4 */
  1608. RCAR_GP_PIN(0, 0),
  1609. };
  1610. static const unsigned int scif4_clk_mux[] = {
  1611. SCK4_MARK,
  1612. };
  1613. static const unsigned int scif4_ctrl_pins[] = {
  1614. /* RTS4#/TANS, CTS4# */
  1615. RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 3),
  1616. };
  1617. static const unsigned int scif4_ctrl_mux[] = {
  1618. RTS4_N_TANS_MARK, CTS4_N_MARK,
  1619. };
  1620. /* - SCIF Clock ------------------------------------------------------------- */
  1621. static const unsigned int scif_clk_a_pins[] = {
  1622. /* SCIF_CLK */
  1623. RCAR_GP_PIN(0, 10),
  1624. };
  1625. static const unsigned int scif_clk_a_mux[] = {
  1626. SCIF_CLK_A_MARK,
  1627. };
  1628. static const unsigned int scif_clk_b_pins[] = {
  1629. /* SCIF_CLK */
  1630. RCAR_GP_PIN(1, 25),
  1631. };
  1632. static const unsigned int scif_clk_b_mux[] = {
  1633. SCIF_CLK_B_MARK,
  1634. };
  1635. /* - TMU -------------------------------------------------------------------- */
  1636. static const unsigned int tmu_tclk1_a_pins[] = {
  1637. /* TCLK1 */
  1638. RCAR_GP_PIN(3, 13),
  1639. };
  1640. static const unsigned int tmu_tclk1_a_mux[] = {
  1641. TCLK1_A_MARK,
  1642. };
  1643. static const unsigned int tmu_tclk1_b_pins[] = {
  1644. /* TCLK1 */
  1645. RCAR_GP_PIN(1, 23),
  1646. };
  1647. static const unsigned int tmu_tclk1_b_mux[] = {
  1648. TCLK1_B_MARK,
  1649. };
  1650. static const unsigned int tmu_tclk2_a_pins[] = {
  1651. /* TCLK2 */
  1652. RCAR_GP_PIN(3, 14),
  1653. };
  1654. static const unsigned int tmu_tclk2_a_mux[] = {
  1655. TCLK2_A_MARK,
  1656. };
  1657. static const unsigned int tmu_tclk2_b_pins[] = {
  1658. /* TCLK2 */
  1659. RCAR_GP_PIN(1, 24),
  1660. };
  1661. static const unsigned int tmu_tclk2_b_mux[] = {
  1662. TCLK2_B_MARK,
  1663. };
  1664. /* - TPU ------------------------------------------------------------------- */
  1665. static const unsigned int tpu_to0_pins[] = {
  1666. /* TPU0TO0 */
  1667. RCAR_GP_PIN(1, 19),
  1668. };
  1669. static const unsigned int tpu_to0_mux[] = {
  1670. TPU0TO0_MARK,
  1671. };
  1672. static const unsigned int tpu_to1_pins[] = {
  1673. /* TPU0TO1 */
  1674. RCAR_GP_PIN(1, 20),
  1675. };
  1676. static const unsigned int tpu_to1_mux[] = {
  1677. TPU0TO1_MARK,
  1678. };
  1679. static const unsigned int tpu_to2_pins[] = {
  1680. /* TPU0TO2 */
  1681. RCAR_GP_PIN(4, 2),
  1682. };
  1683. static const unsigned int tpu_to2_mux[] = {
  1684. TPU0TO2_MARK,
  1685. };
  1686. static const unsigned int tpu_to3_pins[] = {
  1687. /* TPU0TO3 */
  1688. RCAR_GP_PIN(4, 3),
  1689. };
  1690. static const unsigned int tpu_to3_mux[] = {
  1691. TPU0TO3_MARK,
  1692. };
  1693. /* - VIN0 ------------------------------------------------------------------- */
  1694. static const union vin_data vin0_data_pins = {
  1695. .data24 = {
  1696. RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
  1697. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  1698. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1699. RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
  1700. RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
  1701. RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15),
  1702. RCAR_GP_PIN(2, 17), RCAR_GP_PIN(2, 18),
  1703. RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20),
  1704. RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
  1705. RCAR_GP_PIN(2, 23), RCAR_GP_PIN(2, 24),
  1706. RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
  1707. RCAR_GP_PIN(2, 27), RCAR_GP_PIN(2, 28),
  1708. },
  1709. };
  1710. static const union vin_data vin0_data_mux = {
  1711. .data24 = {
  1712. VI0_DATA0_MARK, VI0_DATA1_MARK,
  1713. VI0_DATA2_MARK, VI0_DATA3_MARK,
  1714. VI0_DATA4_MARK, VI0_DATA5_MARK,
  1715. VI0_DATA6_MARK, VI0_DATA7_MARK,
  1716. VI0_DATA8_MARK, VI0_DATA9_MARK,
  1717. VI0_DATA10_MARK, VI0_DATA11_MARK,
  1718. VI0_DATA12_MARK, VI0_DATA13_MARK,
  1719. VI0_DATA14_MARK, VI0_DATA15_MARK,
  1720. VI0_DATA16_MARK, VI0_DATA17_MARK,
  1721. VI0_DATA18_MARK, VI0_DATA19_MARK,
  1722. VI0_DATA20_MARK, VI0_DATA21_MARK,
  1723. VI0_DATA22_MARK, VI0_DATA23_MARK,
  1724. },
  1725. };
  1726. static const unsigned int vin0_data18_pins[] = {
  1727. RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
  1728. RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 9),
  1729. RCAR_GP_PIN(2, 10), RCAR_GP_PIN(2, 11),
  1730. RCAR_GP_PIN(2, 14), RCAR_GP_PIN(2, 15),
  1731. RCAR_GP_PIN(2, 17), RCAR_GP_PIN(2, 18),
  1732. RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20),
  1733. RCAR_GP_PIN(2, 23), RCAR_GP_PIN(2, 24),
  1734. RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
  1735. RCAR_GP_PIN(2, 27), RCAR_GP_PIN(2, 28),
  1736. };
  1737. static const unsigned int vin0_data18_mux[] = {
  1738. VI0_DATA2_MARK, VI0_DATA3_MARK,
  1739. VI0_DATA4_MARK, VI0_DATA5_MARK,
  1740. VI0_DATA6_MARK, VI0_DATA7_MARK,
  1741. VI0_DATA10_MARK, VI0_DATA11_MARK,
  1742. VI0_DATA12_MARK, VI0_DATA13_MARK,
  1743. VI0_DATA14_MARK, VI0_DATA15_MARK,
  1744. VI0_DATA18_MARK, VI0_DATA19_MARK,
  1745. VI0_DATA20_MARK, VI0_DATA21_MARK,
  1746. VI0_DATA22_MARK, VI0_DATA23_MARK,
  1747. };
  1748. static const unsigned int vin0_sync_pins[] = {
  1749. /* VI0_VSYNC#, VI0_HSYNC# */
  1750. RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 2),
  1751. };
  1752. static const unsigned int vin0_sync_mux[] = {
  1753. VI0_VSYNC_N_MARK, VI0_HSYNC_N_MARK,
  1754. };
  1755. static const unsigned int vin0_field_pins[] = {
  1756. /* VI0_FIELD */
  1757. RCAR_GP_PIN(2, 16),
  1758. };
  1759. static const unsigned int vin0_field_mux[] = {
  1760. VI0_FIELD_MARK,
  1761. };
  1762. static const unsigned int vin0_clkenb_pins[] = {
  1763. /* VI0_CLKENB */
  1764. RCAR_GP_PIN(2, 1),
  1765. };
  1766. static const unsigned int vin0_clkenb_mux[] = {
  1767. VI0_CLKENB_MARK,
  1768. };
  1769. static const unsigned int vin0_clk_pins[] = {
  1770. /* VI0_CLK */
  1771. RCAR_GP_PIN(2, 0),
  1772. };
  1773. static const unsigned int vin0_clk_mux[] = {
  1774. VI0_CLK_MARK,
  1775. };
  1776. /* - VIN1 ------------------------------------------------------------------- */
  1777. static const unsigned int vin1_data8_pins[] = {
  1778. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1779. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1780. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1781. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1782. };
  1783. static const unsigned int vin1_data8_mux[] = {
  1784. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1785. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1786. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1787. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1788. };
  1789. static const unsigned int vin1_data10_pins[] = {
  1790. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1791. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1792. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1793. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1794. RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
  1795. };
  1796. static const unsigned int vin1_data10_mux[] = {
  1797. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1798. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1799. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1800. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1801. VI1_DATA8_MARK, VI1_DATA9_MARK,
  1802. };
  1803. static const unsigned int vin1_data12_pins[] = {
  1804. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1805. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1806. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1807. RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
  1808. RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 13),
  1809. RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
  1810. };
  1811. static const unsigned int vin1_data12_mux[] = {
  1812. VI1_DATA0_MARK, VI1_DATA1_MARK,
  1813. VI1_DATA2_MARK, VI1_DATA3_MARK,
  1814. VI1_DATA4_MARK, VI1_DATA5_MARK,
  1815. VI1_DATA6_MARK, VI1_DATA7_MARK,
  1816. VI1_DATA8_MARK, VI1_DATA9_MARK,
  1817. VI1_DATA10_MARK, VI1_DATA11_MARK,
  1818. };
  1819. static const unsigned int vin1_sync_pins[] = {
  1820. /* VI1_VSYNC#, VI1_HSYNC# */
  1821. RCAR_GP_PIN(3, 3), RCAR_GP_PIN(3, 2),
  1822. };
  1823. static const unsigned int vin1_sync_mux[] = {
  1824. VI1_VSYNC_N_MARK, VI1_HSYNC_N_MARK,
  1825. };
  1826. static const unsigned int vin1_field_pins[] = {
  1827. /* VI1_FIELD */
  1828. RCAR_GP_PIN(3, 16),
  1829. };
  1830. static const unsigned int vin1_field_mux[] = {
  1831. VI1_FIELD_MARK,
  1832. };
  1833. static const unsigned int vin1_clkenb_pins[] = {
  1834. /* VI1_CLKENB */
  1835. RCAR_GP_PIN(3, 1),
  1836. };
  1837. static const unsigned int vin1_clkenb_mux[] = {
  1838. VI1_CLKENB_MARK,
  1839. };
  1840. static const unsigned int vin1_clk_pins[] = {
  1841. /* VI1_CLK */
  1842. RCAR_GP_PIN(3, 0),
  1843. };
  1844. static const unsigned int vin1_clk_mux[] = {
  1845. VI1_CLK_MARK,
  1846. };
  1847. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1848. SH_PFC_PIN_GROUP(avb_link),
  1849. SH_PFC_PIN_GROUP(avb_magic),
  1850. SH_PFC_PIN_GROUP(avb_phy_int),
  1851. SH_PFC_PIN_GROUP(avb_mdio),
  1852. SH_PFC_PIN_GROUP(avb_rgmii),
  1853. SH_PFC_PIN_GROUP(avb_txcrefclk),
  1854. SH_PFC_PIN_GROUP(avb_avtp_pps),
  1855. SH_PFC_PIN_GROUP(avb_avtp_capture),
  1856. SH_PFC_PIN_GROUP(avb_avtp_match),
  1857. SH_PFC_PIN_GROUP(canfd0_data_a),
  1858. SH_PFC_PIN_GROUP(canfd0_data_b),
  1859. SH_PFC_PIN_GROUP(canfd1_data),
  1860. SH_PFC_PIN_GROUP(canfd_clk_a),
  1861. SH_PFC_PIN_GROUP(canfd_clk_b),
  1862. SH_PFC_PIN_GROUP(du_rgb666),
  1863. SH_PFC_PIN_GROUP(du_rgb888),
  1864. SH_PFC_PIN_GROUP(du_clk_out),
  1865. SH_PFC_PIN_GROUP(du_sync),
  1866. SH_PFC_PIN_GROUP(du_oddf),
  1867. SH_PFC_PIN_GROUP(du_cde),
  1868. SH_PFC_PIN_GROUP(du_disp),
  1869. SH_PFC_PIN_GROUP(gether_link_a),
  1870. SH_PFC_PIN_GROUP(gether_phy_int_a),
  1871. SH_PFC_PIN_GROUP(gether_mdio_a),
  1872. SH_PFC_PIN_GROUP(gether_link_b),
  1873. SH_PFC_PIN_GROUP(gether_phy_int_b),
  1874. SH_PFC_PIN_GROUP(gether_mdio_b),
  1875. SH_PFC_PIN_GROUP(gether_magic),
  1876. SH_PFC_PIN_GROUP(gether_rgmii),
  1877. SH_PFC_PIN_GROUP(gether_txcrefclk),
  1878. SH_PFC_PIN_GROUP(gether_txcrefclk_mega),
  1879. SH_PFC_PIN_GROUP(gether_rmii),
  1880. SH_PFC_PIN_GROUP(hscif0_data_a),
  1881. SH_PFC_PIN_GROUP(hscif0_clk_a),
  1882. SH_PFC_PIN_GROUP(hscif0_ctrl_a),
  1883. SH_PFC_PIN_GROUP(hscif0_data_b),
  1884. SH_PFC_PIN_GROUP(hscif0_clk_b),
  1885. SH_PFC_PIN_GROUP(hscif0_ctrl_b),
  1886. SH_PFC_PIN_GROUP(hscif1_data),
  1887. SH_PFC_PIN_GROUP(hscif1_clk),
  1888. SH_PFC_PIN_GROUP(hscif1_ctrl),
  1889. SH_PFC_PIN_GROUP(hscif2_data),
  1890. SH_PFC_PIN_GROUP(hscif2_clk),
  1891. SH_PFC_PIN_GROUP(hscif2_ctrl),
  1892. SH_PFC_PIN_GROUP(hscif3_data),
  1893. SH_PFC_PIN_GROUP(hscif3_clk),
  1894. SH_PFC_PIN_GROUP(hscif3_ctrl),
  1895. SH_PFC_PIN_GROUP(i2c0),
  1896. SH_PFC_PIN_GROUP(i2c1),
  1897. SH_PFC_PIN_GROUP(i2c2),
  1898. SH_PFC_PIN_GROUP(i2c3),
  1899. SH_PFC_PIN_GROUP(i2c4),
  1900. SH_PFC_PIN_GROUP(i2c5),
  1901. SH_PFC_PIN_GROUP(intc_ex_irq0),
  1902. SH_PFC_PIN_GROUP(intc_ex_irq1),
  1903. SH_PFC_PIN_GROUP(intc_ex_irq2),
  1904. SH_PFC_PIN_GROUP(intc_ex_irq3),
  1905. SH_PFC_PIN_GROUP(intc_ex_irq4),
  1906. SH_PFC_PIN_GROUP(intc_ex_irq5),
  1907. SH_PFC_PIN_GROUP(mmc_data1),
  1908. SH_PFC_PIN_GROUP(mmc_data4),
  1909. SH_PFC_PIN_GROUP(mmc_data8),
  1910. SH_PFC_PIN_GROUP(mmc_ctrl),
  1911. SH_PFC_PIN_GROUP(mmc_cd),
  1912. SH_PFC_PIN_GROUP(mmc_wp),
  1913. SH_PFC_PIN_GROUP(mmc_ds),
  1914. SH_PFC_PIN_GROUP(msiof0_clk),
  1915. SH_PFC_PIN_GROUP(msiof0_sync),
  1916. SH_PFC_PIN_GROUP(msiof0_ss1),
  1917. SH_PFC_PIN_GROUP(msiof0_ss2),
  1918. SH_PFC_PIN_GROUP(msiof0_txd),
  1919. SH_PFC_PIN_GROUP(msiof0_rxd),
  1920. SH_PFC_PIN_GROUP(msiof1_clk),
  1921. SH_PFC_PIN_GROUP(msiof1_sync),
  1922. SH_PFC_PIN_GROUP(msiof1_ss1),
  1923. SH_PFC_PIN_GROUP(msiof1_ss2),
  1924. SH_PFC_PIN_GROUP(msiof1_txd),
  1925. SH_PFC_PIN_GROUP(msiof1_rxd),
  1926. SH_PFC_PIN_GROUP(msiof2_clk),
  1927. SH_PFC_PIN_GROUP(msiof2_sync),
  1928. SH_PFC_PIN_GROUP(msiof2_ss1),
  1929. SH_PFC_PIN_GROUP(msiof2_ss2),
  1930. SH_PFC_PIN_GROUP(msiof2_txd),
  1931. SH_PFC_PIN_GROUP(msiof2_rxd),
  1932. SH_PFC_PIN_GROUP(msiof3_clk),
  1933. SH_PFC_PIN_GROUP(msiof3_sync),
  1934. SH_PFC_PIN_GROUP(msiof3_ss1),
  1935. SH_PFC_PIN_GROUP(msiof3_ss2),
  1936. SH_PFC_PIN_GROUP(msiof3_txd),
  1937. SH_PFC_PIN_GROUP(msiof3_rxd),
  1938. SH_PFC_PIN_GROUP(pwm0_a),
  1939. SH_PFC_PIN_GROUP(pwm0_b),
  1940. SH_PFC_PIN_GROUP(pwm1_a),
  1941. SH_PFC_PIN_GROUP(pwm1_b),
  1942. SH_PFC_PIN_GROUP(pwm2_a),
  1943. SH_PFC_PIN_GROUP(pwm2_b),
  1944. SH_PFC_PIN_GROUP(pwm3_a),
  1945. SH_PFC_PIN_GROUP(pwm3_b),
  1946. SH_PFC_PIN_GROUP(pwm4_a),
  1947. SH_PFC_PIN_GROUP(pwm4_b),
  1948. SH_PFC_PIN_GROUP(scif0_data),
  1949. SH_PFC_PIN_GROUP(scif0_clk),
  1950. SH_PFC_PIN_GROUP(scif0_ctrl),
  1951. SH_PFC_PIN_GROUP(scif1_data_a),
  1952. SH_PFC_PIN_GROUP(scif1_clk),
  1953. SH_PFC_PIN_GROUP(scif1_ctrl),
  1954. SH_PFC_PIN_GROUP(scif1_data_b),
  1955. SH_PFC_PIN_GROUP(scif3_data),
  1956. SH_PFC_PIN_GROUP(scif3_clk),
  1957. SH_PFC_PIN_GROUP(scif3_ctrl),
  1958. SH_PFC_PIN_GROUP(scif4_data),
  1959. SH_PFC_PIN_GROUP(scif4_clk),
  1960. SH_PFC_PIN_GROUP(scif4_ctrl),
  1961. SH_PFC_PIN_GROUP(scif_clk_a),
  1962. SH_PFC_PIN_GROUP(scif_clk_b),
  1963. SH_PFC_PIN_GROUP(tmu_tclk1_a),
  1964. SH_PFC_PIN_GROUP(tmu_tclk1_b),
  1965. SH_PFC_PIN_GROUP(tmu_tclk2_a),
  1966. SH_PFC_PIN_GROUP(tmu_tclk2_b),
  1967. SH_PFC_PIN_GROUP(tpu_to0),
  1968. SH_PFC_PIN_GROUP(tpu_to1),
  1969. SH_PFC_PIN_GROUP(tpu_to2),
  1970. SH_PFC_PIN_GROUP(tpu_to3),
  1971. VIN_DATA_PIN_GROUP(vin0_data, 8),
  1972. VIN_DATA_PIN_GROUP(vin0_data, 10),
  1973. VIN_DATA_PIN_GROUP(vin0_data, 12),
  1974. VIN_DATA_PIN_GROUP(vin0_data, 16),
  1975. SH_PFC_PIN_GROUP(vin0_data18),
  1976. VIN_DATA_PIN_GROUP(vin0_data, 20),
  1977. VIN_DATA_PIN_GROUP(vin0_data, 24),
  1978. SH_PFC_PIN_GROUP(vin0_sync),
  1979. SH_PFC_PIN_GROUP(vin0_field),
  1980. SH_PFC_PIN_GROUP(vin0_clkenb),
  1981. SH_PFC_PIN_GROUP(vin0_clk),
  1982. SH_PFC_PIN_GROUP(vin1_data8),
  1983. SH_PFC_PIN_GROUP(vin1_data10),
  1984. SH_PFC_PIN_GROUP(vin1_data12),
  1985. SH_PFC_PIN_GROUP(vin1_sync),
  1986. SH_PFC_PIN_GROUP(vin1_field),
  1987. SH_PFC_PIN_GROUP(vin1_clkenb),
  1988. SH_PFC_PIN_GROUP(vin1_clk),
  1989. };
  1990. static const char * const avb_groups[] = {
  1991. "avb_link",
  1992. "avb_magic",
  1993. "avb_phy_int",
  1994. "avb_mdio",
  1995. "avb_rgmii",
  1996. "avb_txcrefclk",
  1997. "avb_avtp_pps",
  1998. "avb_avtp_capture",
  1999. "avb_avtp_match",
  2000. };
  2001. static const char * const canfd0_groups[] = {
  2002. "canfd0_data_a",
  2003. "canfd0_data_b",
  2004. };
  2005. static const char * const canfd1_groups[] = {
  2006. "canfd1_data",
  2007. };
  2008. static const char * const canfd_clk_groups[] = {
  2009. "canfd_clk_a",
  2010. "canfd_clk_b",
  2011. };
  2012. static const char * const du_groups[] = {
  2013. "du_rgb666",
  2014. "du_rgb888",
  2015. "du_clk_out",
  2016. "du_sync",
  2017. "du_oddf",
  2018. "du_cde",
  2019. "du_disp",
  2020. };
  2021. static const char * const gether_groups[] = {
  2022. "gether_link_a",
  2023. "gether_phy_int_a",
  2024. "gether_mdio_a",
  2025. "gether_link_b",
  2026. "gether_phy_int_b",
  2027. "gether_mdio_b",
  2028. "gether_magic",
  2029. "gether_rgmii",
  2030. "gether_txcrefclk",
  2031. "gether_txcrefclk_mega",
  2032. "gether_rmii",
  2033. };
  2034. static const char * const hscif0_groups[] = {
  2035. "hscif0_data_a",
  2036. "hscif0_clk_a",
  2037. "hscif0_ctrl_a",
  2038. "hscif0_data_b",
  2039. "hscif0_clk_b",
  2040. "hscif0_ctrl_b",
  2041. };
  2042. static const char * const hscif1_groups[] = {
  2043. "hscif1_data",
  2044. "hscif1_clk",
  2045. "hscif1_ctrl",
  2046. };
  2047. static const char * const hscif2_groups[] = {
  2048. "hscif2_data",
  2049. "hscif2_clk",
  2050. "hscif2_ctrl",
  2051. };
  2052. static const char * const hscif3_groups[] = {
  2053. "hscif3_data",
  2054. "hscif3_clk",
  2055. "hscif3_ctrl",
  2056. };
  2057. static const char * const i2c0_groups[] = {
  2058. "i2c0",
  2059. };
  2060. static const char * const i2c1_groups[] = {
  2061. "i2c1",
  2062. };
  2063. static const char * const i2c2_groups[] = {
  2064. "i2c2",
  2065. };
  2066. static const char * const i2c3_groups[] = {
  2067. "i2c3",
  2068. };
  2069. static const char * const i2c4_groups[] = {
  2070. "i2c4",
  2071. };
  2072. static const char * const i2c5_groups[] = {
  2073. "i2c5",
  2074. };
  2075. static const char * const intc_ex_groups[] = {
  2076. "intc_ex_irq0",
  2077. "intc_ex_irq1",
  2078. "intc_ex_irq2",
  2079. "intc_ex_irq3",
  2080. "intc_ex_irq4",
  2081. "intc_ex_irq5",
  2082. };
  2083. static const char * const mmc_groups[] = {
  2084. "mmc_data1",
  2085. "mmc_data4",
  2086. "mmc_data8",
  2087. "mmc_ctrl",
  2088. "mmc_cd",
  2089. "mmc_wp",
  2090. "mmc_ds",
  2091. };
  2092. static const char * const msiof0_groups[] = {
  2093. "msiof0_clk",
  2094. "msiof0_sync",
  2095. "msiof0_ss1",
  2096. "msiof0_ss2",
  2097. "msiof0_txd",
  2098. "msiof0_rxd",
  2099. };
  2100. static const char * const msiof1_groups[] = {
  2101. "msiof1_clk",
  2102. "msiof1_sync",
  2103. "msiof1_ss1",
  2104. "msiof1_ss2",
  2105. "msiof1_txd",
  2106. "msiof1_rxd",
  2107. };
  2108. static const char * const msiof2_groups[] = {
  2109. "msiof2_clk",
  2110. "msiof2_sync",
  2111. "msiof2_ss1",
  2112. "msiof2_ss2",
  2113. "msiof2_txd",
  2114. "msiof2_rxd",
  2115. };
  2116. static const char * const msiof3_groups[] = {
  2117. "msiof3_clk",
  2118. "msiof3_sync",
  2119. "msiof3_ss1",
  2120. "msiof3_ss2",
  2121. "msiof3_txd",
  2122. "msiof3_rxd",
  2123. };
  2124. static const char * const pwm0_groups[] = {
  2125. "pwm0_a",
  2126. "pwm0_b",
  2127. };
  2128. static const char * const pwm1_groups[] = {
  2129. "pwm1_a",
  2130. "pwm1_b",
  2131. };
  2132. static const char * const pwm2_groups[] = {
  2133. "pwm2_a",
  2134. "pwm2_b",
  2135. };
  2136. static const char * const pwm3_groups[] = {
  2137. "pwm3_a",
  2138. "pwm3_b",
  2139. };
  2140. static const char * const pwm4_groups[] = {
  2141. "pwm4_a",
  2142. "pwm4_b",
  2143. };
  2144. static const char * const scif0_groups[] = {
  2145. "scif0_data",
  2146. "scif0_clk",
  2147. "scif0_ctrl",
  2148. };
  2149. static const char * const scif1_groups[] = {
  2150. "scif1_data_a",
  2151. "scif1_clk",
  2152. "scif1_ctrl",
  2153. "scif1_data_b",
  2154. };
  2155. static const char * const scif3_groups[] = {
  2156. "scif3_data",
  2157. "scif3_clk",
  2158. "scif3_ctrl",
  2159. };
  2160. static const char * const scif4_groups[] = {
  2161. "scif4_data",
  2162. "scif4_clk",
  2163. "scif4_ctrl",
  2164. };
  2165. static const char * const scif_clk_groups[] = {
  2166. "scif_clk_a",
  2167. "scif_clk_b",
  2168. };
  2169. static const char * const tmu_groups[] = {
  2170. "tmu_tclk1_a",
  2171. "tmu_tclk1_b",
  2172. "tmu_tclk2_a",
  2173. "tmu_tclk2_b",
  2174. };
  2175. static const char * const tpu_groups[] = {
  2176. "tpu_to0",
  2177. "tpu_to1",
  2178. "tpu_to2",
  2179. "tpu_to3",
  2180. };
  2181. static const char * const vin0_groups[] = {
  2182. "vin0_data8",
  2183. "vin0_data10",
  2184. "vin0_data12",
  2185. "vin0_data16",
  2186. "vin0_data18",
  2187. "vin0_data20",
  2188. "vin0_data24",
  2189. "vin0_sync",
  2190. "vin0_field",
  2191. "vin0_clkenb",
  2192. "vin0_clk",
  2193. };
  2194. static const char * const vin1_groups[] = {
  2195. "vin1_data8",
  2196. "vin1_data10",
  2197. "vin1_data12",
  2198. "vin1_sync",
  2199. "vin1_field",
  2200. "vin1_clkenb",
  2201. "vin1_clk",
  2202. };
  2203. static const struct sh_pfc_function pinmux_functions[] = {
  2204. SH_PFC_FUNCTION(avb),
  2205. SH_PFC_FUNCTION(canfd0),
  2206. SH_PFC_FUNCTION(canfd1),
  2207. SH_PFC_FUNCTION(canfd_clk),
  2208. SH_PFC_FUNCTION(du),
  2209. SH_PFC_FUNCTION(gether),
  2210. SH_PFC_FUNCTION(hscif0),
  2211. SH_PFC_FUNCTION(hscif1),
  2212. SH_PFC_FUNCTION(hscif2),
  2213. SH_PFC_FUNCTION(hscif3),
  2214. SH_PFC_FUNCTION(i2c0),
  2215. SH_PFC_FUNCTION(i2c1),
  2216. SH_PFC_FUNCTION(i2c2),
  2217. SH_PFC_FUNCTION(i2c3),
  2218. SH_PFC_FUNCTION(i2c4),
  2219. SH_PFC_FUNCTION(i2c5),
  2220. SH_PFC_FUNCTION(intc_ex),
  2221. SH_PFC_FUNCTION(mmc),
  2222. SH_PFC_FUNCTION(msiof0),
  2223. SH_PFC_FUNCTION(msiof1),
  2224. SH_PFC_FUNCTION(msiof2),
  2225. SH_PFC_FUNCTION(msiof3),
  2226. SH_PFC_FUNCTION(pwm0),
  2227. SH_PFC_FUNCTION(pwm1),
  2228. SH_PFC_FUNCTION(pwm2),
  2229. SH_PFC_FUNCTION(pwm3),
  2230. SH_PFC_FUNCTION(pwm4),
  2231. SH_PFC_FUNCTION(scif0),
  2232. SH_PFC_FUNCTION(scif1),
  2233. SH_PFC_FUNCTION(scif3),
  2234. SH_PFC_FUNCTION(scif4),
  2235. SH_PFC_FUNCTION(scif_clk),
  2236. SH_PFC_FUNCTION(tmu),
  2237. SH_PFC_FUNCTION(tpu),
  2238. SH_PFC_FUNCTION(vin0),
  2239. SH_PFC_FUNCTION(vin1),
  2240. };
  2241. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  2242. #define F_(x, y) FN_##y
  2243. #define FM(x) FN_##x
  2244. { PINMUX_CFG_REG("GPSR0", 0xe6060100, 32, 1) {
  2245. 0, 0,
  2246. 0, 0,
  2247. 0, 0,
  2248. 0, 0,
  2249. 0, 0,
  2250. 0, 0,
  2251. 0, 0,
  2252. 0, 0,
  2253. 0, 0,
  2254. 0, 0,
  2255. GP_0_21_FN, GPSR0_21,
  2256. GP_0_20_FN, GPSR0_20,
  2257. GP_0_19_FN, GPSR0_19,
  2258. GP_0_18_FN, GPSR0_18,
  2259. GP_0_17_FN, GPSR0_17,
  2260. GP_0_16_FN, GPSR0_16,
  2261. GP_0_15_FN, GPSR0_15,
  2262. GP_0_14_FN, GPSR0_14,
  2263. GP_0_13_FN, GPSR0_13,
  2264. GP_0_12_FN, GPSR0_12,
  2265. GP_0_11_FN, GPSR0_11,
  2266. GP_0_10_FN, GPSR0_10,
  2267. GP_0_9_FN, GPSR0_9,
  2268. GP_0_8_FN, GPSR0_8,
  2269. GP_0_7_FN, GPSR0_7,
  2270. GP_0_6_FN, GPSR0_6,
  2271. GP_0_5_FN, GPSR0_5,
  2272. GP_0_4_FN, GPSR0_4,
  2273. GP_0_3_FN, GPSR0_3,
  2274. GP_0_2_FN, GPSR0_2,
  2275. GP_0_1_FN, GPSR0_1,
  2276. GP_0_0_FN, GPSR0_0, }
  2277. },
  2278. { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1) {
  2279. 0, 0,
  2280. 0, 0,
  2281. 0, 0,
  2282. 0, 0,
  2283. GP_1_27_FN, GPSR1_27,
  2284. GP_1_26_FN, GPSR1_26,
  2285. GP_1_25_FN, GPSR1_25,
  2286. GP_1_24_FN, GPSR1_24,
  2287. GP_1_23_FN, GPSR1_23,
  2288. GP_1_22_FN, GPSR1_22,
  2289. GP_1_21_FN, GPSR1_21,
  2290. GP_1_20_FN, GPSR1_20,
  2291. GP_1_19_FN, GPSR1_19,
  2292. GP_1_18_FN, GPSR1_18,
  2293. GP_1_17_FN, GPSR1_17,
  2294. GP_1_16_FN, GPSR1_16,
  2295. GP_1_15_FN, GPSR1_15,
  2296. GP_1_14_FN, GPSR1_14,
  2297. GP_1_13_FN, GPSR1_13,
  2298. GP_1_12_FN, GPSR1_12,
  2299. GP_1_11_FN, GPSR1_11,
  2300. GP_1_10_FN, GPSR1_10,
  2301. GP_1_9_FN, GPSR1_9,
  2302. GP_1_8_FN, GPSR1_8,
  2303. GP_1_7_FN, GPSR1_7,
  2304. GP_1_6_FN, GPSR1_6,
  2305. GP_1_5_FN, GPSR1_5,
  2306. GP_1_4_FN, GPSR1_4,
  2307. GP_1_3_FN, GPSR1_3,
  2308. GP_1_2_FN, GPSR1_2,
  2309. GP_1_1_FN, GPSR1_1,
  2310. GP_1_0_FN, GPSR1_0, }
  2311. },
  2312. { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1) {
  2313. 0, 0,
  2314. 0, 0,
  2315. GP_2_29_FN, GPSR2_29,
  2316. GP_2_28_FN, GPSR2_28,
  2317. GP_2_27_FN, GPSR2_27,
  2318. GP_2_26_FN, GPSR2_26,
  2319. GP_2_25_FN, GPSR2_25,
  2320. GP_2_24_FN, GPSR2_24,
  2321. GP_2_23_FN, GPSR2_23,
  2322. GP_2_22_FN, GPSR2_22,
  2323. GP_2_21_FN, GPSR2_21,
  2324. GP_2_20_FN, GPSR2_20,
  2325. GP_2_19_FN, GPSR2_19,
  2326. GP_2_18_FN, GPSR2_18,
  2327. GP_2_17_FN, GPSR2_17,
  2328. GP_2_16_FN, GPSR2_16,
  2329. GP_2_15_FN, GPSR2_15,
  2330. GP_2_14_FN, GPSR2_14,
  2331. GP_2_13_FN, GPSR2_13,
  2332. GP_2_12_FN, GPSR2_12,
  2333. GP_2_11_FN, GPSR2_11,
  2334. GP_2_10_FN, GPSR2_10,
  2335. GP_2_9_FN, GPSR2_9,
  2336. GP_2_8_FN, GPSR2_8,
  2337. GP_2_7_FN, GPSR2_7,
  2338. GP_2_6_FN, GPSR2_6,
  2339. GP_2_5_FN, GPSR2_5,
  2340. GP_2_4_FN, GPSR2_4,
  2341. GP_2_3_FN, GPSR2_3,
  2342. GP_2_2_FN, GPSR2_2,
  2343. GP_2_1_FN, GPSR2_1,
  2344. GP_2_0_FN, GPSR2_0, }
  2345. },
  2346. { PINMUX_CFG_REG("GPSR3", 0xe606010c, 32, 1) {
  2347. 0, 0,
  2348. 0, 0,
  2349. 0, 0,
  2350. 0, 0,
  2351. 0, 0,
  2352. 0, 0,
  2353. 0, 0,
  2354. 0, 0,
  2355. 0, 0,
  2356. 0, 0,
  2357. 0, 0,
  2358. 0, 0,
  2359. 0, 0,
  2360. 0, 0,
  2361. 0, 0,
  2362. GP_3_16_FN, GPSR3_16,
  2363. GP_3_15_FN, GPSR3_15,
  2364. GP_3_14_FN, GPSR3_14,
  2365. GP_3_13_FN, GPSR3_13,
  2366. GP_3_12_FN, GPSR3_12,
  2367. GP_3_11_FN, GPSR3_11,
  2368. GP_3_10_FN, GPSR3_10,
  2369. GP_3_9_FN, GPSR3_9,
  2370. GP_3_8_FN, GPSR3_8,
  2371. GP_3_7_FN, GPSR3_7,
  2372. GP_3_6_FN, GPSR3_6,
  2373. GP_3_5_FN, GPSR3_5,
  2374. GP_3_4_FN, GPSR3_4,
  2375. GP_3_3_FN, GPSR3_3,
  2376. GP_3_2_FN, GPSR3_2,
  2377. GP_3_1_FN, GPSR3_1,
  2378. GP_3_0_FN, GPSR3_0, }
  2379. },
  2380. { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1) {
  2381. 0, 0,
  2382. 0, 0,
  2383. 0, 0,
  2384. 0, 0,
  2385. 0, 0,
  2386. 0, 0,
  2387. 0, 0,
  2388. GP_4_24_FN, GPSR4_24,
  2389. GP_4_23_FN, GPSR4_23,
  2390. GP_4_22_FN, GPSR4_22,
  2391. GP_4_21_FN, GPSR4_21,
  2392. GP_4_20_FN, GPSR4_20,
  2393. GP_4_19_FN, GPSR4_19,
  2394. GP_4_18_FN, GPSR4_18,
  2395. GP_4_17_FN, GPSR4_17,
  2396. GP_4_16_FN, GPSR4_16,
  2397. GP_4_15_FN, GPSR4_15,
  2398. GP_4_14_FN, GPSR4_14,
  2399. GP_4_13_FN, GPSR4_13,
  2400. GP_4_12_FN, GPSR4_12,
  2401. GP_4_11_FN, GPSR4_11,
  2402. GP_4_10_FN, GPSR4_10,
  2403. GP_4_9_FN, GPSR4_9,
  2404. GP_4_8_FN, GPSR4_8,
  2405. GP_4_7_FN, GPSR4_7,
  2406. GP_4_6_FN, GPSR4_6,
  2407. GP_4_5_FN, GPSR4_5,
  2408. GP_4_4_FN, GPSR4_4,
  2409. GP_4_3_FN, GPSR4_3,
  2410. GP_4_2_FN, GPSR4_2,
  2411. GP_4_1_FN, GPSR4_1,
  2412. GP_4_0_FN, GPSR4_0, }
  2413. },
  2414. { PINMUX_CFG_REG("GPSR5", 0xe6060114, 32, 1) {
  2415. 0, 0,
  2416. 0, 0,
  2417. 0, 0,
  2418. 0, 0,
  2419. 0, 0,
  2420. 0, 0,
  2421. 0, 0,
  2422. 0, 0,
  2423. 0, 0,
  2424. 0, 0,
  2425. 0, 0,
  2426. 0, 0,
  2427. 0, 0,
  2428. 0, 0,
  2429. 0, 0,
  2430. 0, 0,
  2431. 0, 0,
  2432. GP_5_14_FN, GPSR5_14,
  2433. GP_5_13_FN, GPSR5_13,
  2434. GP_5_12_FN, GPSR5_12,
  2435. GP_5_11_FN, GPSR5_11,
  2436. GP_5_10_FN, GPSR5_10,
  2437. GP_5_9_FN, GPSR5_9,
  2438. GP_5_8_FN, GPSR5_8,
  2439. GP_5_7_FN, GPSR5_7,
  2440. GP_5_6_FN, GPSR5_6,
  2441. GP_5_5_FN, GPSR5_5,
  2442. GP_5_4_FN, GPSR5_4,
  2443. GP_5_3_FN, GPSR5_3,
  2444. GP_5_2_FN, GPSR5_2,
  2445. GP_5_1_FN, GPSR5_1,
  2446. GP_5_0_FN, GPSR5_0, }
  2447. },
  2448. #undef F_
  2449. #undef FM
  2450. #define F_(x, y) x,
  2451. #define FM(x) FN_##x,
  2452. { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4) {
  2453. IP0_31_28
  2454. IP0_27_24
  2455. IP0_23_20
  2456. IP0_19_16
  2457. IP0_15_12
  2458. IP0_11_8
  2459. IP0_7_4
  2460. IP0_3_0 }
  2461. },
  2462. { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4) {
  2463. IP1_31_28
  2464. IP1_27_24
  2465. IP1_23_20
  2466. IP1_19_16
  2467. IP1_15_12
  2468. IP1_11_8
  2469. IP1_7_4
  2470. IP1_3_0 }
  2471. },
  2472. { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4) {
  2473. IP2_31_28
  2474. IP2_27_24
  2475. IP2_23_20
  2476. IP2_19_16
  2477. IP2_15_12
  2478. IP2_11_8
  2479. IP2_7_4
  2480. IP2_3_0 }
  2481. },
  2482. { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4) {
  2483. IP3_31_28
  2484. IP3_27_24
  2485. IP3_23_20
  2486. IP3_19_16
  2487. IP3_15_12
  2488. IP3_11_8
  2489. IP3_7_4
  2490. IP3_3_0 }
  2491. },
  2492. { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4) {
  2493. IP4_31_28
  2494. IP4_27_24
  2495. IP4_23_20
  2496. IP4_19_16
  2497. IP4_15_12
  2498. IP4_11_8
  2499. IP4_7_4
  2500. IP4_3_0 }
  2501. },
  2502. { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4) {
  2503. IP5_31_28
  2504. IP5_27_24
  2505. IP5_23_20
  2506. IP5_19_16
  2507. IP5_15_12
  2508. IP5_11_8
  2509. IP5_7_4
  2510. IP5_3_0 }
  2511. },
  2512. { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4) {
  2513. IP6_31_28
  2514. IP6_27_24
  2515. IP6_23_20
  2516. IP6_19_16
  2517. IP6_15_12
  2518. IP6_11_8
  2519. IP6_7_4
  2520. IP6_3_0 }
  2521. },
  2522. { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4) {
  2523. IP7_31_28
  2524. IP7_27_24
  2525. IP7_23_20
  2526. IP7_19_16
  2527. IP7_15_12
  2528. IP7_11_8
  2529. IP7_7_4
  2530. IP7_3_0 }
  2531. },
  2532. { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4) {
  2533. IP8_31_28
  2534. IP8_27_24
  2535. IP8_23_20
  2536. IP8_19_16
  2537. IP8_15_12
  2538. IP8_11_8
  2539. IP8_7_4
  2540. IP8_3_0 }
  2541. },
  2542. { PINMUX_CFG_REG("IPSR9", 0xe6060224, 32, 4) {
  2543. IP9_31_28
  2544. IP9_27_24
  2545. IP9_23_20
  2546. IP9_19_16
  2547. IP9_15_12
  2548. IP9_11_8
  2549. IP9_7_4
  2550. IP9_3_0 }
  2551. },
  2552. { PINMUX_CFG_REG("IPSR10", 0xe6060228, 32, 4) {
  2553. IP10_31_28
  2554. IP10_27_24
  2555. IP10_23_20
  2556. IP10_19_16
  2557. IP10_15_12
  2558. IP10_11_8
  2559. IP10_7_4
  2560. IP10_3_0 }
  2561. },
  2562. #undef F_
  2563. #undef FM
  2564. #define F_(x, y) x,
  2565. #define FM(x) FN_##x,
  2566. { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
  2567. 4, 4, 4, 4, 4,
  2568. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) {
  2569. /* RESERVED 31, 30, 29, 28 */
  2570. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2571. /* RESERVED 27, 26, 25, 24 */
  2572. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2573. /* RESERVED 23, 22, 21, 20 */
  2574. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2575. /* RESERVED 19, 18, 17, 16 */
  2576. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2577. /* RESERVED 15, 14, 13, 12 */
  2578. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2579. MOD_SEL0_11
  2580. MOD_SEL0_10
  2581. MOD_SEL0_9
  2582. MOD_SEL0_8
  2583. MOD_SEL0_7
  2584. MOD_SEL0_6
  2585. MOD_SEL0_5
  2586. MOD_SEL0_4
  2587. 0, 0,
  2588. MOD_SEL0_2
  2589. MOD_SEL0_1
  2590. MOD_SEL0_0 }
  2591. },
  2592. { },
  2593. };
  2594. enum ioctrl_regs {
  2595. IOCTRL30,
  2596. IOCTRL31,
  2597. IOCTRL32,
  2598. IOCTRL33,
  2599. };
  2600. static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = {
  2601. [IOCTRL30] = { 0xe6060380, },
  2602. [IOCTRL31] = { 0xe6060384, },
  2603. [IOCTRL32] = { 0xe6060388, },
  2604. [IOCTRL33] = { 0xe606038c, },
  2605. { /* sentinel */ },
  2606. };
  2607. static int r8a77980_pin_to_pocctrl(struct sh_pfc *pfc, unsigned int pin,
  2608. u32 *pocctrl)
  2609. {
  2610. int bit = pin & 0x1f;
  2611. *pocctrl = pinmux_ioctrl_regs[IOCTRL30].reg;
  2612. if (pin >= RCAR_GP_PIN(0, 0) && pin <= RCAR_GP_PIN(0, 21))
  2613. return bit;
  2614. else if (pin >= RCAR_GP_PIN(2, 0) && pin <= RCAR_GP_PIN(2, 9))
  2615. return bit + 22;
  2616. *pocctrl = pinmux_ioctrl_regs[IOCTRL31].reg;
  2617. if (pin >= RCAR_GP_PIN(2, 10) && pin <= RCAR_GP_PIN(2, 16))
  2618. return bit - 10;
  2619. if ((pin >= RCAR_GP_PIN(2, 17) && pin <= RCAR_GP_PIN(2, 24)) ||
  2620. (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 16)))
  2621. return bit + 7;
  2622. *pocctrl = pinmux_ioctrl_regs[IOCTRL32].reg;
  2623. if (pin >= RCAR_GP_PIN(2, 25) && pin <= RCAR_GP_PIN(2, 29))
  2624. return pin - 25;
  2625. return -EINVAL;
  2626. }
  2627. static const struct sh_pfc_soc_operations pinmux_ops = {
  2628. .pin_to_pocctrl = r8a77980_pin_to_pocctrl,
  2629. };
  2630. const struct sh_pfc_soc_info r8a77980_pinmux_info = {
  2631. .name = "r8a77980_pfc",
  2632. .ops = &pinmux_ops,
  2633. .unlock_reg = 0xe6060000, /* PMMR */
  2634. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  2635. .pins = pinmux_pins,
  2636. .nr_pins = ARRAY_SIZE(pinmux_pins),
  2637. .groups = pinmux_groups,
  2638. .nr_groups = ARRAY_SIZE(pinmux_groups),
  2639. .functions = pinmux_functions,
  2640. .nr_functions = ARRAY_SIZE(pinmux_functions),
  2641. .cfg_regs = pinmux_config_regs,
  2642. .ioctrl_regs = pinmux_ioctrl_regs,
  2643. .pinmux_data = pinmux_data,
  2644. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  2645. };