pfc-r8a77995.c 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * R8A77995 processor support - PFC hardware block.
  4. *
  5. * Copyright (C) 2017 Renesas Electronics Corp.
  6. *
  7. * This file is based on the drivers/pinctrl/renesas/pfc-r8a7796.c
  8. *
  9. * R-Car Gen3 processor support - PFC hardware block.
  10. *
  11. * Copyright (C) 2015 Renesas Electronics Corporation
  12. */
  13. #include <linux/errno.h>
  14. #include <linux/kernel.h>
  15. #include "core.h"
  16. #include "sh_pfc.h"
  17. #define CPU_ALL_GP(fn, sfx) \
  18. PORT_GP_CFG_9(0, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  19. PORT_GP_CFG_32(1, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  20. PORT_GP_CFG_32(2, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  21. PORT_GP_CFG_10(3, fn, sfx, SH_PFC_PIN_CFG_IO_VOLTAGE | SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  22. PORT_GP_CFG_32(4, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  23. PORT_GP_CFG_21(5, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  24. PORT_GP_CFG_14(6, fn, sfx, SH_PFC_PIN_CFG_PULL_UP_DOWN)
  25. #define CPU_ALL_NOGP(fn) \
  26. PIN_NOGP_CFG(DU_DOTCLKIN0, "DU_DOTCLKIN0", fn, SH_PFC_PIN_CFG_PULL_DOWN), \
  27. PIN_NOGP_CFG(FSCLKST_N, "FSCLKST#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  28. PIN_NOGP_CFG(MLB_REF, "MLB_REF", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  29. PIN_NOGP_CFG(PRESETOUT_N, "PRESETOUT#", fn, SH_PFC_PIN_CFG_PULL_UP_DOWN), \
  30. PIN_NOGP_CFG(TCK, "TCK", fn, SH_PFC_PIN_CFG_PULL_UP), \
  31. PIN_NOGP_CFG(TDI, "TDI", fn, SH_PFC_PIN_CFG_PULL_UP), \
  32. PIN_NOGP_CFG(TMS, "TMS", fn, SH_PFC_PIN_CFG_PULL_UP), \
  33. PIN_NOGP_CFG(TRST_N, "TRST#", fn, SH_PFC_PIN_CFG_PULL_UP)
  34. /*
  35. * F_() : just information
  36. * FM() : macro for FN_xxx / xxx_MARK
  37. */
  38. /* GPSR0 */
  39. #define GPSR0_8 F_(MLB_SIG, IP0_27_24)
  40. #define GPSR0_7 F_(MLB_DAT, IP0_23_20)
  41. #define GPSR0_6 F_(MLB_CLK, IP0_19_16)
  42. #define GPSR0_5 F_(MSIOF2_RXD, IP0_15_12)
  43. #define GPSR0_4 F_(MSIOF2_TXD, IP0_11_8)
  44. #define GPSR0_3 F_(MSIOF2_SCK, IP0_7_4)
  45. #define GPSR0_2 F_(IRQ0_A, IP0_3_0)
  46. #define GPSR0_1 FM(USB0_OVC)
  47. #define GPSR0_0 FM(USB0_PWEN)
  48. /* GPSR1 */
  49. #define GPSR1_31 F_(QPOLB, IP4_27_24)
  50. #define GPSR1_30 F_(QPOLA, IP4_23_20)
  51. #define GPSR1_29 F_(DU_CDE, IP4_19_16)
  52. #define GPSR1_28 F_(DU_DISP_CDE, IP4_15_12)
  53. #define GPSR1_27 F_(DU_DISP, IP4_11_8)
  54. #define GPSR1_26 F_(DU_VSYNC, IP4_7_4)
  55. #define GPSR1_25 F_(DU_HSYNC, IP4_3_0)
  56. #define GPSR1_24 F_(DU_DOTCLKOUT0, IP3_31_28)
  57. #define GPSR1_23 F_(DU_DR7, IP3_27_24)
  58. #define GPSR1_22 F_(DU_DR6, IP3_23_20)
  59. #define GPSR1_21 F_(DU_DR5, IP3_19_16)
  60. #define GPSR1_20 F_(DU_DR4, IP3_15_12)
  61. #define GPSR1_19 F_(DU_DR3, IP3_11_8)
  62. #define GPSR1_18 F_(DU_DR2, IP3_7_4)
  63. #define GPSR1_17 F_(DU_DR1, IP3_3_0)
  64. #define GPSR1_16 F_(DU_DR0, IP2_31_28)
  65. #define GPSR1_15 F_(DU_DG7, IP2_27_24)
  66. #define GPSR1_14 F_(DU_DG6, IP2_23_20)
  67. #define GPSR1_13 F_(DU_DG5, IP2_19_16)
  68. #define GPSR1_12 F_(DU_DG4, IP2_15_12)
  69. #define GPSR1_11 F_(DU_DG3, IP2_11_8)
  70. #define GPSR1_10 F_(DU_DG2, IP2_7_4)
  71. #define GPSR1_9 F_(DU_DG1, IP2_3_0)
  72. #define GPSR1_8 F_(DU_DG0, IP1_31_28)
  73. #define GPSR1_7 F_(DU_DB7, IP1_27_24)
  74. #define GPSR1_6 F_(DU_DB6, IP1_23_20)
  75. #define GPSR1_5 F_(DU_DB5, IP1_19_16)
  76. #define GPSR1_4 F_(DU_DB4, IP1_15_12)
  77. #define GPSR1_3 F_(DU_DB3, IP1_11_8)
  78. #define GPSR1_2 F_(DU_DB2, IP1_7_4)
  79. #define GPSR1_1 F_(DU_DB1, IP1_3_0)
  80. #define GPSR1_0 F_(DU_DB0, IP0_31_28)
  81. /* GPSR2 */
  82. #define GPSR2_31 F_(NFCE_N, IP8_19_16)
  83. #define GPSR2_30 F_(NFCLE, IP8_15_12)
  84. #define GPSR2_29 F_(NFALE, IP8_11_8)
  85. #define GPSR2_28 F_(VI4_CLKENB, IP8_7_4)
  86. #define GPSR2_27 F_(VI4_FIELD, IP8_3_0)
  87. #define GPSR2_26 F_(VI4_HSYNC_N, IP7_31_28)
  88. #define GPSR2_25 F_(VI4_VSYNC_N, IP7_27_24)
  89. #define GPSR2_24 F_(VI4_DATA23, IP7_23_20)
  90. #define GPSR2_23 F_(VI4_DATA22, IP7_19_16)
  91. #define GPSR2_22 F_(VI4_DATA21, IP7_15_12)
  92. #define GPSR2_21 F_(VI4_DATA20, IP7_11_8)
  93. #define GPSR2_20 F_(VI4_DATA19, IP7_7_4)
  94. #define GPSR2_19 F_(VI4_DATA18, IP7_3_0)
  95. #define GPSR2_18 F_(VI4_DATA17, IP6_31_28)
  96. #define GPSR2_17 F_(VI4_DATA16, IP6_27_24)
  97. #define GPSR2_16 F_(VI4_DATA15, IP6_23_20)
  98. #define GPSR2_15 F_(VI4_DATA14, IP6_19_16)
  99. #define GPSR2_14 F_(VI4_DATA13, IP6_15_12)
  100. #define GPSR2_13 F_(VI4_DATA12, IP6_11_8)
  101. #define GPSR2_12 F_(VI4_DATA11, IP6_7_4)
  102. #define GPSR2_11 F_(VI4_DATA10, IP6_3_0)
  103. #define GPSR2_10 F_(VI4_DATA9, IP5_31_28)
  104. #define GPSR2_9 F_(VI4_DATA8, IP5_27_24)
  105. #define GPSR2_8 F_(VI4_DATA7, IP5_23_20)
  106. #define GPSR2_7 F_(VI4_DATA6, IP5_19_16)
  107. #define GPSR2_6 F_(VI4_DATA5, IP5_15_12)
  108. #define GPSR2_5 FM(VI4_DATA4)
  109. #define GPSR2_4 F_(VI4_DATA3, IP5_11_8)
  110. #define GPSR2_3 F_(VI4_DATA2, IP5_7_4)
  111. #define GPSR2_2 F_(VI4_DATA1, IP5_3_0)
  112. #define GPSR2_1 F_(VI4_DATA0, IP4_31_28)
  113. #define GPSR2_0 FM(VI4_CLK)
  114. /* GPSR3 */
  115. #define GPSR3_9 F_(NFDATA7, IP9_31_28)
  116. #define GPSR3_8 F_(NFDATA6, IP9_27_24)
  117. #define GPSR3_7 F_(NFDATA5, IP9_23_20)
  118. #define GPSR3_6 F_(NFDATA4, IP9_19_16)
  119. #define GPSR3_5 F_(NFDATA3, IP9_15_12)
  120. #define GPSR3_4 F_(NFDATA2, IP9_11_8)
  121. #define GPSR3_3 F_(NFDATA1, IP9_7_4)
  122. #define GPSR3_2 F_(NFDATA0, IP9_3_0)
  123. #define GPSR3_1 F_(NFWE_N, IP8_31_28)
  124. #define GPSR3_0 F_(NFRE_N, IP8_27_24)
  125. /* GPSR4 */
  126. #define GPSR4_31 F_(CAN0_RX_A, IP12_27_24)
  127. #define GPSR4_30 F_(CAN1_TX_A, IP13_7_4)
  128. #define GPSR4_29 F_(CAN1_RX_A, IP13_3_0)
  129. #define GPSR4_28 F_(CAN0_TX_A, IP12_31_28)
  130. #define GPSR4_27 FM(TX2)
  131. #define GPSR4_26 FM(RX2)
  132. #define GPSR4_25 F_(SCK2, IP12_11_8)
  133. #define GPSR4_24 F_(TX1_A, IP12_7_4)
  134. #define GPSR4_23 F_(RX1_A, IP12_3_0)
  135. #define GPSR4_22 F_(SCK1_A, IP11_31_28)
  136. #define GPSR4_21 F_(TX0_A, IP11_27_24)
  137. #define GPSR4_20 F_(RX0_A, IP11_23_20)
  138. #define GPSR4_19 F_(SCK0_A, IP11_19_16)
  139. #define GPSR4_18 F_(MSIOF1_RXD, IP11_15_12)
  140. #define GPSR4_17 F_(MSIOF1_TXD, IP11_11_8)
  141. #define GPSR4_16 F_(MSIOF1_SCK, IP11_7_4)
  142. #define GPSR4_15 FM(MSIOF0_RXD)
  143. #define GPSR4_14 FM(MSIOF0_TXD)
  144. #define GPSR4_13 FM(MSIOF0_SYNC)
  145. #define GPSR4_12 FM(MSIOF0_SCK)
  146. #define GPSR4_11 F_(SDA1, IP11_3_0)
  147. #define GPSR4_10 F_(SCL1, IP10_31_28)
  148. #define GPSR4_9 FM(SDA0)
  149. #define GPSR4_8 FM(SCL0)
  150. #define GPSR4_7 F_(SSI_WS4_A, IP10_27_24)
  151. #define GPSR4_6 F_(SSI_SDATA4_A, IP10_23_20)
  152. #define GPSR4_5 F_(SSI_SCK4_A, IP10_19_16)
  153. #define GPSR4_4 F_(SSI_WS34, IP10_15_12)
  154. #define GPSR4_3 F_(SSI_SDATA3, IP10_11_8)
  155. #define GPSR4_2 F_(SSI_SCK34, IP10_7_4)
  156. #define GPSR4_1 F_(AUDIO_CLKA, IP10_3_0)
  157. #define GPSR4_0 F_(NFRB_N, IP8_23_20)
  158. /* GPSR5 */
  159. #define GPSR5_20 FM(AVB0_LINK)
  160. #define GPSR5_19 FM(AVB0_PHY_INT)
  161. #define GPSR5_18 FM(AVB0_MAGIC)
  162. #define GPSR5_17 FM(AVB0_MDC)
  163. #define GPSR5_16 FM(AVB0_MDIO)
  164. #define GPSR5_15 FM(AVB0_TXCREFCLK)
  165. #define GPSR5_14 FM(AVB0_TD3)
  166. #define GPSR5_13 FM(AVB0_TD2)
  167. #define GPSR5_12 FM(AVB0_TD1)
  168. #define GPSR5_11 FM(AVB0_TD0)
  169. #define GPSR5_10 FM(AVB0_TXC)
  170. #define GPSR5_9 FM(AVB0_TX_CTL)
  171. #define GPSR5_8 FM(AVB0_RD3)
  172. #define GPSR5_7 FM(AVB0_RD2)
  173. #define GPSR5_6 FM(AVB0_RD1)
  174. #define GPSR5_5 FM(AVB0_RD0)
  175. #define GPSR5_4 FM(AVB0_RXC)
  176. #define GPSR5_3 FM(AVB0_RX_CTL)
  177. #define GPSR5_2 F_(CAN_CLK, IP12_23_20)
  178. #define GPSR5_1 F_(TPU0TO1_A, IP12_19_16)
  179. #define GPSR5_0 F_(TPU0TO0_A, IP12_15_12)
  180. /* GPSR6 */
  181. #define GPSR6_13 FM(RPC_INT_N)
  182. #define GPSR6_12 FM(RPC_RESET_N)
  183. #define GPSR6_11 FM(QSPI1_SSL)
  184. #define GPSR6_10 FM(QSPI1_IO3)
  185. #define GPSR6_9 FM(QSPI1_IO2)
  186. #define GPSR6_8 FM(QSPI1_MISO_IO1)
  187. #define GPSR6_7 FM(QSPI1_MOSI_IO0)
  188. #define GPSR6_6 FM(QSPI1_SPCLK)
  189. #define GPSR6_5 FM(QSPI0_SSL)
  190. #define GPSR6_4 FM(QSPI0_IO3)
  191. #define GPSR6_3 FM(QSPI0_IO2)
  192. #define GPSR6_2 FM(QSPI0_MISO_IO1)
  193. #define GPSR6_1 FM(QSPI0_MOSI_IO0)
  194. #define GPSR6_0 FM(QSPI0_SPCLK)
  195. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  196. #define IP0_3_0 FM(IRQ0_A) FM(MSIOF2_SYNC_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) F_(0, 0) F_(0, 0) F_(0, 0)
  197. #define IP0_7_4 FM(MSIOF2_SCK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  198. #define IP0_11_8 FM(MSIOF2_TXD) FM(SCL3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  199. #define IP0_15_12 FM(MSIOF2_RXD) FM(SDA3_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  200. #define IP0_19_16 FM(MLB_CLK) FM(MSIOF2_SYNC_A) FM(SCK5_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)
  201. #define IP0_23_20 FM(MLB_DAT) FM(MSIOF2_SS1) FM(RX5_A) FM(SCL3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  202. #define IP0_27_24 FM(MLB_SIG) FM(MSIOF2_SS2) FM(TX5_A) FM(SDA3_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  203. #define IP0_31_28 FM(DU_DB0) FM(LCDOUT0) FM(MSIOF3_TXD_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) F_(0, 0) F_(0, 0)
  204. #define IP1_3_0 FM(DU_DB1) FM(LCDOUT1) FM(MSIOF3_RXD_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) F_(0, 0) F_(0, 0)
  205. #define IP1_7_4 FM(DU_DB2) FM(LCDOUT2) FM(IRQ0_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) F_(0, 0) F_(0, 0)
  206. #define IP1_11_8 FM(DU_DB3) FM(LCDOUT3) FM(SCK5_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) F_(0, 0) F_(0, 0)
  207. #define IP1_15_12 FM(DU_DB4) FM(LCDOUT4) FM(RX5_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) F_(0, 0) F_(0, 0)
  208. #define IP1_19_16 FM(DU_DB5) FM(LCDOUT5) FM(TX5_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) F_(0, 0) F_(0, 0)
  209. #define IP1_23_20 FM(DU_DB6) FM(LCDOUT6) FM(MSIOF3_SS1_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) F_(0, 0) F_(0, 0)
  210. #define IP1_27_24 FM(DU_DB7) FM(LCDOUT7) FM(MSIOF3_SS2_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) F_(0, 0) F_(0, 0)
  211. #define IP1_31_28 FM(DU_DG0) FM(LCDOUT8) FM(MSIOF3_SCK_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) F_(0, 0) F_(0, 0)
  212. #define IP2_3_0 FM(DU_DG1) FM(LCDOUT9) FM(MSIOF3_SYNC_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) F_(0, 0) F_(0, 0)
  213. #define IP2_7_4 FM(DU_DG2) FM(LCDOUT10) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP2_11_8 FM(DU_DG3) FM(LCDOUT11) FM(IRQ1_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)
  215. #define IP2_15_12 FM(DU_DG4) FM(LCDOUT12) FM(HSCK3_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) F_(0, 0) F_(0, 0)
  216. #define IP2_19_16 FM(DU_DG5) FM(LCDOUT13) FM(HTX3_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) F_(0, 0) F_(0, 0)
  217. #define IP2_23_20 FM(DU_DG6) FM(LCDOUT14) FM(HRX3_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) F_(0, 0) F_(0, 0)
  218. #define IP2_27_24 FM(DU_DG7) FM(LCDOUT15) FM(SCK4_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) F_(0, 0) F_(0, 0)
  219. #define IP2_31_28 FM(DU_DR0) FM(LCDOUT16) FM(RX4_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) F_(0, 0) F_(0, 0)
  220. #define IP3_3_0 FM(DU_DR1) FM(LCDOUT17) FM(TX4_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) F_(0, 0) F_(0, 0)
  221. #define IP3_7_4 FM(DU_DR2) FM(LCDOUT18) FM(PWM0_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) F_(0, 0) F_(0, 0)
  222. #define IP3_11_8 FM(DU_DR3) FM(LCDOUT19) FM(PWM1_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) F_(0, 0) F_(0, 0)
  223. #define IP3_15_12 FM(DU_DR4) FM(LCDOUT20) FM(TCLK2_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) F_(0, 0) F_(0, 0)
  224. #define IP3_19_16 FM(DU_DR5) FM(LCDOUT21) FM(NMI) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP3_23_20 FM(DU_DR6) FM(LCDOUT22) FM(PWM2_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) F_(0, 0) F_(0, 0)
  226. #define IP3_27_24 FM(DU_DR7) FM(LCDOUT23) FM(TCLK1_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) F_(0, 0) F_(0, 0)
  227. #define IP3_31_28 FM(DU_DOTCLKOUT0) FM(QCLK) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  229. #define IP4_3_0 FM(DU_HSYNC) FM(QSTH_QHS) FM(IRQ3_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)
  230. #define IP4_7_4 FM(DU_VSYNC) FM(QSTVA_QVS) FM(IRQ4_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)
  231. #define IP4_11_8 FM(DU_DISP) FM(QSTVB_QVE) FM(PWM3_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) F_(0, 0) F_(0, 0)
  232. #define IP4_15_12 FM(DU_DISP_CDE) FM(QCPV_QDE) FM(IRQ2_B) FM(DU_DOTCLKIN1)F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP4_19_16 FM(DU_CDE) FM(QSTB_QHE) FM(SCK3_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) F_(0, 0) F_(0, 0)
  234. #define IP4_23_20 FM(QPOLA) F_(0, 0) FM(RX3_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) F_(0, 0) F_(0, 0)
  235. #define IP4_27_24 FM(QPOLB) F_(0, 0) FM(TX3_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) F_(0, 0) F_(0, 0)
  236. #define IP4_31_28 FM(VI4_DATA0) FM(PWM0_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) F_(0, 0)
  237. #define IP5_3_0 FM(VI4_DATA1) 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) F_(0, 0)
  238. #define IP5_7_4 FM(VI4_DATA2) 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) F_(0, 0)
  239. #define IP5_11_8 FM(VI4_DATA3) 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) F_(0, 0)
  240. #define IP5_15_12 FM(VI4_DATA5) FM(SCK4_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) F_(0, 0)
  241. #define IP5_19_16 FM(VI4_DATA6) FM(IRQ2_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) F_(0, 0)
  242. #define IP5_23_20 FM(VI4_DATA7) FM(TCLK2_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) F_(0, 0)
  243. #define IP5_27_24 FM(VI4_DATA8) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP5_31_28 FM(VI4_DATA9) FM(MSIOF3_SS2_A) FM(IRQ1_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) F_(0, 0) F_(0, 0)
  245. #define IP6_3_0 FM(VI4_DATA10) FM(RX4_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) F_(0, 0)
  246. #define IP6_7_4 FM(VI4_DATA11) FM(TX4_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) F_(0, 0)
  247. #define IP6_11_8 FM(VI4_DATA12) FM(TCLK1_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) F_(0, 0)
  248. #define IP6_15_12 FM(VI4_DATA13) FM(MSIOF3_SS1_A) 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) F_(0, 0) F_(0, 0)
  249. #define IP6_19_16 FM(VI4_DATA14) FM(SSI_SCK4_B) 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) F_(0, 0) F_(0, 0)
  250. #define IP6_23_20 FM(VI4_DATA15) FM(SSI_SDATA4_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) F_(0, 0) F_(0, 0) F_(0, 0)
  251. #define IP6_27_24 FM(VI4_DATA16) FM(HRX3_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) F_(0, 0)
  252. #define IP6_31_28 FM(VI4_DATA17) FM(HTX3_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) F_(0, 0)
  253. #define IP7_3_0 FM(VI4_DATA18) FM(HSCK3_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) F_(0, 0)
  254. #define IP7_7_4 FM(VI4_DATA19) FM(SSI_WS4_B) F_(0, 0) F_(0, 0) FM(NFDATA15) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_11_8 FM(VI4_DATA20) FM(MSIOF3_SYNC_A) F_(0, 0) F_(0, 0) FM(NFDATA14) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_15_12 FM(VI4_DATA21) FM(MSIOF3_TXD_A) F_(0, 0) F_(0, 0) FM(NFDATA13) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_19_16 FM(VI4_DATA22) FM(MSIOF3_RXD_A) F_(0, 0) F_(0, 0) FM(NFDATA12) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_23_20 FM(VI4_DATA23) FM(MSIOF3_SCK_A) F_(0, 0) F_(0, 0) FM(NFDATA11) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_27_24 FM(VI4_VSYNC_N) FM(SCK1_B) F_(0, 0) F_(0, 0) FM(NFDATA10) F_(0, 0) F_(0, 0) F_(0, 0) 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 IP7_31_28 FM(VI4_HSYNC_N) FM(RX1_B) F_(0, 0) F_(0, 0) FM(NFDATA9) F_(0, 0) F_(0, 0) F_(0, 0) 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. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  262. #define IP8_3_0 FM(VI4_FIELD) FM(AUDIO_CLKB) FM(IRQ5_A) FM(SCIF_CLK) FM(NFDATA8) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  263. #define IP8_7_4 FM(VI4_CLKENB) FM(TX1_B) F_(0, 0) F_(0, 0) FM(NFWP_N) FM(DVC_MUTE_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)
  264. #define IP8_11_8 FM(NFALE) FM(SCL2_B) FM(IRQ3_B) FM(PWM0_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  265. #define IP8_15_12 FM(NFCLE) FM(SDA2_B) FM(SCK3_A) FM(PWM1_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  266. #define IP8_19_16 FM(NFCE_N) F_(0, 0) FM(RX3_A) FM(PWM2_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  267. #define IP8_23_20 FM(NFRB_N) F_(0, 0) FM(TX3_A) FM(PWM3_C) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  268. #define IP8_27_24 FM(NFRE_N) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  269. #define IP8_31_28 FM(NFWE_N) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  270. #define IP9_3_0 FM(NFDATA0) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  271. #define IP9_7_4 FM(NFDATA1) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  272. #define IP9_11_8 FM(NFDATA2) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  273. #define IP9_15_12 FM(NFDATA3) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  274. #define IP9_19_16 FM(NFDATA4) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  275. #define IP9_23_20 FM(NFDATA5) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  276. #define IP9_27_24 FM(NFDATA6) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  277. #define IP9_31_28 FM(NFDATA7) 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) F_(0, 0) F_(0, 0) F_(0, 0)
  278. #define IP10_3_0 FM(AUDIO_CLKA) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) FM(DVC_MUTE_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)
  279. #define IP10_7_4 FM(SSI_SCK34) FM(FSO_CFE_0_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  280. #define IP10_11_8 FM(SSI_SDATA3) FM(FSO_CFE_1_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  281. #define IP10_15_12 FM(SSI_WS34) FM(FSO_TOE_N_A) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  282. #define IP10_19_16 FM(SSI_SCK4_A) FM(HSCK0) FM(AUDIO_CLKOUT) FM(CAN0_RX_B) FM(IRQ4_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)
  283. #define IP10_23_20 FM(SSI_SDATA4_A) FM(HTX0) FM(SCL2_A) FM(CAN1_RX_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) F_(0, 0)
  284. #define IP10_27_24 FM(SSI_WS4_A) FM(HRX0) FM(SDA2_A) FM(CAN1_TX_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) F_(0, 0)
  285. #define IP10_31_28 FM(SCL1) 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) F_(0, 0)
  286. #define IP11_3_0 FM(SDA1) FM(RTS1_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)
  287. #define IP11_7_4 FM(MSIOF1_SCK) FM(AVB0_AVTP_PPS_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) F_(0, 0) F_(0, 0) F_(0, 0)
  288. #define IP11_11_8 FM(MSIOF1_TXD) FM(AVB0_AVTP_CAPTURE_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) F_(0, 0) F_(0, 0) F_(0, 0)
  289. #define IP11_15_12 FM(MSIOF1_RXD) FM(AVB0_AVTP_MATCH_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) F_(0, 0) F_(0, 0) F_(0, 0)
  290. #define IP11_19_16 FM(SCK0_A) FM(MSIOF1_SYNC) FM(FSO_CFE_0_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  291. #define IP11_23_20 FM(RX0_A) FM(MSIOF0_SS1) FM(FSO_CFE_1_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  292. #define IP11_27_24 FM(TX0_A) FM(MSIOF0_SS2) FM(FSO_TOE_N_B) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  293. #define IP11_31_28 FM(SCK1_A) FM(MSIOF1_SS2) FM(TPU0TO2_B) FM(CAN0_TX_B) FM(AUDIO_CLKOUT1) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0) F_(0, 0)
  294. /* IPSRx */ /* 0 */ /* 1 */ /* 2 */ /* 3 */ /* 4 */ /* 5 */ /* 6 - F */
  295. #define IP12_3_0 FM(RX1_A) FM(CTS0_N) FM(TPU0TO0_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) F_(0, 0) F_(0, 0)
  296. #define IP12_7_4 FM(TX1_A) FM(RTS0_N) FM(TPU0TO1_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) F_(0, 0) F_(0, 0)
  297. #define IP12_11_8 FM(SCK2) FM(MSIOF1_SS1) FM(TPU0TO3_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) F_(0, 0) F_(0, 0)
  298. #define IP12_15_12 FM(TPU0TO0_A) FM(AVB0_AVTP_CAPTURE_A) FM(HCTS0_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)
  299. #define IP12_19_16 FM(TPU0TO1_A) FM(AVB0_AVTP_MATCH_A) FM(HRTS0_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)
  300. #define IP12_23_20 FM(CAN_CLK) FM(AVB0_AVTP_PPS_A) FM(SCK0_B) FM(IRQ5_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) F_(0, 0)
  301. #define IP12_27_24 FM(CAN0_RX_A) FM(CANFD0_RX) FM(RX0_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) F_(0, 0) F_(0, 0)
  302. #define IP12_31_28 FM(CAN0_TX_A) FM(CANFD0_TX) FM(TX0_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) F_(0, 0) F_(0, 0)
  303. #define IP13_3_0 FM(CAN1_RX_A) FM(CANFD1_RX) FM(TPU0TO2_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)
  304. #define IP13_7_4 FM(CAN1_TX_A) FM(CANFD1_TX) FM(TPU0TO3_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)
  305. #define PINMUX_GPSR \
  306. \
  307. GPSR1_31 GPSR2_31 GPSR4_31 \
  308. GPSR1_30 GPSR2_30 GPSR4_30 \
  309. GPSR1_29 GPSR2_29 GPSR4_29 \
  310. GPSR1_28 GPSR2_28 GPSR4_28 \
  311. GPSR1_27 GPSR2_27 GPSR4_27 \
  312. GPSR1_26 GPSR2_26 GPSR4_26 \
  313. GPSR1_25 GPSR2_25 GPSR4_25 \
  314. GPSR1_24 GPSR2_24 GPSR4_24 \
  315. GPSR1_23 GPSR2_23 GPSR4_23 \
  316. GPSR1_22 GPSR2_22 GPSR4_22 \
  317. GPSR1_21 GPSR2_21 GPSR4_21 \
  318. GPSR1_20 GPSR2_20 GPSR4_20 GPSR5_20 \
  319. GPSR1_19 GPSR2_19 GPSR4_19 GPSR5_19 \
  320. GPSR1_18 GPSR2_18 GPSR4_18 GPSR5_18 \
  321. GPSR1_17 GPSR2_17 GPSR4_17 GPSR5_17 \
  322. GPSR1_16 GPSR2_16 GPSR4_16 GPSR5_16 \
  323. GPSR1_15 GPSR2_15 GPSR4_15 GPSR5_15 \
  324. GPSR1_14 GPSR2_14 GPSR4_14 GPSR5_14 \
  325. GPSR1_13 GPSR2_13 GPSR4_13 GPSR5_13 GPSR6_13 \
  326. GPSR1_12 GPSR2_12 GPSR4_12 GPSR5_12 GPSR6_12 \
  327. GPSR1_11 GPSR2_11 GPSR4_11 GPSR5_11 GPSR6_11 \
  328. GPSR1_10 GPSR2_10 GPSR4_10 GPSR5_10 GPSR6_10 \
  329. GPSR1_9 GPSR2_9 GPSR3_9 GPSR4_9 GPSR5_9 GPSR6_9 \
  330. GPSR0_8 GPSR1_8 GPSR2_8 GPSR3_8 GPSR4_8 GPSR5_8 GPSR6_8 \
  331. GPSR0_7 GPSR1_7 GPSR2_7 GPSR3_7 GPSR4_7 GPSR5_7 GPSR6_7 \
  332. GPSR0_6 GPSR1_6 GPSR2_6 GPSR3_6 GPSR4_6 GPSR5_6 GPSR6_6 \
  333. GPSR0_5 GPSR1_5 GPSR2_5 GPSR3_5 GPSR4_5 GPSR5_5 GPSR6_5 \
  334. GPSR0_4 GPSR1_4 GPSR2_4 GPSR3_4 GPSR4_4 GPSR5_4 GPSR6_4 \
  335. GPSR0_3 GPSR1_3 GPSR2_3 GPSR3_3 GPSR4_3 GPSR5_3 GPSR6_3 \
  336. GPSR0_2 GPSR1_2 GPSR2_2 GPSR3_2 GPSR4_2 GPSR5_2 GPSR6_2 \
  337. GPSR0_1 GPSR1_1 GPSR2_1 GPSR3_1 GPSR4_1 GPSR5_1 GPSR6_1 \
  338. GPSR0_0 GPSR1_0 GPSR2_0 GPSR3_0 GPSR4_0 GPSR5_0 GPSR6_0
  339. #define PINMUX_IPSR \
  340. \
  341. 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 \
  342. 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 \
  343. 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 \
  344. 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 \
  345. 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 \
  346. 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 \
  347. 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 \
  348. 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 \
  349. \
  350. 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 \
  351. 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 \
  352. 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 \
  353. 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 \
  354. 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 \
  355. 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 \
  356. 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 \
  357. 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 \
  358. \
  359. FM(IP8_3_0) IP8_3_0 FM(IP9_3_0) IP9_3_0 FM(IP10_3_0) IP10_3_0 FM(IP11_3_0) IP11_3_0 \
  360. FM(IP8_7_4) IP8_7_4 FM(IP9_7_4) IP9_7_4 FM(IP10_7_4) IP10_7_4 FM(IP11_7_4) IP11_7_4 \
  361. FM(IP8_11_8) IP8_11_8 FM(IP9_11_8) IP9_11_8 FM(IP10_11_8) IP10_11_8 FM(IP11_11_8) IP11_11_8 \
  362. FM(IP8_15_12) IP8_15_12 FM(IP9_15_12) IP9_15_12 FM(IP10_15_12) IP10_15_12 FM(IP11_15_12) IP11_15_12 \
  363. FM(IP8_19_16) IP8_19_16 FM(IP9_19_16) IP9_19_16 FM(IP10_19_16) IP10_19_16 FM(IP11_19_16) IP11_19_16 \
  364. FM(IP8_23_20) IP8_23_20 FM(IP9_23_20) IP9_23_20 FM(IP10_23_20) IP10_23_20 FM(IP11_23_20) IP11_23_20 \
  365. FM(IP8_27_24) IP8_27_24 FM(IP9_27_24) IP9_27_24 FM(IP10_27_24) IP10_27_24 FM(IP11_27_24) IP11_27_24 \
  366. FM(IP8_31_28) IP8_31_28 FM(IP9_31_28) IP9_31_28 FM(IP10_31_28) IP10_31_28 FM(IP11_31_28) IP11_31_28 \
  367. \
  368. FM(IP12_3_0) IP12_3_0 FM(IP13_3_0) IP13_3_0 \
  369. FM(IP12_7_4) IP12_7_4 FM(IP13_7_4) IP13_7_4 \
  370. FM(IP12_11_8) IP12_11_8 \
  371. FM(IP12_15_12) IP12_15_12 \
  372. FM(IP12_19_16) IP12_19_16 \
  373. FM(IP12_23_20) IP12_23_20 \
  374. FM(IP12_27_24) IP12_27_24 \
  375. FM(IP12_31_28) IP12_31_28 \
  376. /* The bit numbering in MOD_SEL fields is reversed */
  377. #define REV4(f0, f1, f2, f3) f0 f2 f1 f3
  378. /* MOD_SEL0 */ /* 0 */ /* 1 */ /* 2 */ /* 3 */
  379. #define MOD_SEL0_30 FM(SEL_MSIOF2_0) FM(SEL_MSIOF2_1)
  380. #define MOD_SEL0_29 FM(SEL_I2C3_0) FM(SEL_I2C3_1)
  381. #define MOD_SEL0_28 FM(SEL_SCIF5_0) FM(SEL_SCIF5_1)
  382. #define MOD_SEL0_27 FM(SEL_MSIOF3_0) FM(SEL_MSIOF3_1)
  383. #define MOD_SEL0_26 FM(SEL_HSCIF3_0) FM(SEL_HSCIF3_1)
  384. #define MOD_SEL0_25 FM(SEL_SCIF4_0) FM(SEL_SCIF4_1)
  385. #define MOD_SEL0_24_23 REV4(FM(SEL_PWM0_0), FM(SEL_PWM0_1), FM(SEL_PWM0_2), F_(0, 0))
  386. #define MOD_SEL0_22_21 REV4(FM(SEL_PWM1_0), FM(SEL_PWM1_1), FM(SEL_PWM1_2), F_(0, 0))
  387. #define MOD_SEL0_20_19 REV4(FM(SEL_PWM2_0), FM(SEL_PWM2_1), FM(SEL_PWM2_2), F_(0, 0))
  388. #define MOD_SEL0_18_17 REV4(FM(SEL_PWM3_0), FM(SEL_PWM3_1), FM(SEL_PWM3_2), F_(0, 0))
  389. #define MOD_SEL0_15 FM(SEL_IRQ_0_0) FM(SEL_IRQ_0_1)
  390. #define MOD_SEL0_14 FM(SEL_IRQ_1_0) FM(SEL_IRQ_1_1)
  391. #define MOD_SEL0_13 FM(SEL_IRQ_2_0) FM(SEL_IRQ_2_1)
  392. #define MOD_SEL0_12 FM(SEL_IRQ_3_0) FM(SEL_IRQ_3_1)
  393. #define MOD_SEL0_11 FM(SEL_IRQ_4_0) FM(SEL_IRQ_4_1)
  394. #define MOD_SEL0_10 FM(SEL_IRQ_5_0) FM(SEL_IRQ_5_1)
  395. #define MOD_SEL0_5 FM(SEL_TMU_0_0) FM(SEL_TMU_0_1)
  396. #define MOD_SEL0_4 FM(SEL_TMU_1_0) FM(SEL_TMU_1_1)
  397. #define MOD_SEL0_3 FM(SEL_SCIF3_0) FM(SEL_SCIF3_1)
  398. #define MOD_SEL0_2 FM(SEL_SCIF1_0) FM(SEL_SCIF1_1)
  399. #define MOD_SEL0_1 FM(SEL_SCU_0) FM(SEL_SCU_1)
  400. #define MOD_SEL0_0 FM(SEL_RFSO_0) FM(SEL_RFSO_1)
  401. #define MOD_SEL1_31 FM(SEL_CAN0_0) FM(SEL_CAN0_1)
  402. #define MOD_SEL1_30 FM(SEL_CAN1_0) FM(SEL_CAN1_1)
  403. #define MOD_SEL1_29 FM(SEL_I2C2_0) FM(SEL_I2C2_1)
  404. #define MOD_SEL1_28 FM(SEL_ETHERAVB_0) FM(SEL_ETHERAVB_1)
  405. #define MOD_SEL1_27 FM(SEL_SCIF0_0) FM(SEL_SCIF0_1)
  406. #define MOD_SEL1_26 FM(SEL_SSIF4_0) FM(SEL_SSIF4_1)
  407. #define PINMUX_MOD_SELS \
  408. \
  409. MOD_SEL1_31 \
  410. MOD_SEL0_30 MOD_SEL1_30 \
  411. MOD_SEL0_29 MOD_SEL1_29 \
  412. MOD_SEL0_28 MOD_SEL1_28 \
  413. MOD_SEL0_27 MOD_SEL1_27 \
  414. MOD_SEL0_26 MOD_SEL1_26 \
  415. MOD_SEL0_25 \
  416. MOD_SEL0_24_23 \
  417. MOD_SEL0_22_21 \
  418. MOD_SEL0_20_19 \
  419. MOD_SEL0_18_17 \
  420. MOD_SEL0_15 \
  421. MOD_SEL0_14 \
  422. MOD_SEL0_13 \
  423. MOD_SEL0_12 \
  424. MOD_SEL0_11 \
  425. MOD_SEL0_10 \
  426. MOD_SEL0_5 \
  427. MOD_SEL0_4 \
  428. MOD_SEL0_3 \
  429. MOD_SEL0_2 \
  430. MOD_SEL0_1 \
  431. MOD_SEL0_0
  432. enum {
  433. PINMUX_RESERVED = 0,
  434. PINMUX_DATA_BEGIN,
  435. GP_ALL(DATA),
  436. PINMUX_DATA_END,
  437. #define F_(x, y)
  438. #define FM(x) FN_##x,
  439. PINMUX_FUNCTION_BEGIN,
  440. GP_ALL(FN),
  441. PINMUX_GPSR
  442. PINMUX_IPSR
  443. PINMUX_MOD_SELS
  444. PINMUX_FUNCTION_END,
  445. #undef F_
  446. #undef FM
  447. #define F_(x, y)
  448. #define FM(x) x##_MARK,
  449. PINMUX_MARK_BEGIN,
  450. PINMUX_GPSR
  451. PINMUX_IPSR
  452. PINMUX_MOD_SELS
  453. PINMUX_MARK_END,
  454. #undef F_
  455. #undef FM
  456. };
  457. static const u16 pinmux_data[] = {
  458. PINMUX_DATA_GP_ALL(),
  459. PINMUX_SINGLE(USB0_OVC),
  460. PINMUX_SINGLE(USB0_PWEN),
  461. PINMUX_SINGLE(VI4_DATA4),
  462. PINMUX_SINGLE(VI4_CLK),
  463. PINMUX_SINGLE(TX2),
  464. PINMUX_SINGLE(RX2),
  465. PINMUX_SINGLE(AVB0_LINK),
  466. PINMUX_SINGLE(AVB0_PHY_INT),
  467. PINMUX_SINGLE(AVB0_MAGIC),
  468. PINMUX_SINGLE(AVB0_MDC),
  469. PINMUX_SINGLE(AVB0_MDIO),
  470. PINMUX_SINGLE(AVB0_TXCREFCLK),
  471. PINMUX_SINGLE(AVB0_TD3),
  472. PINMUX_SINGLE(AVB0_TD2),
  473. PINMUX_SINGLE(AVB0_TD1),
  474. PINMUX_SINGLE(AVB0_TD0),
  475. PINMUX_SINGLE(AVB0_TXC),
  476. PINMUX_SINGLE(AVB0_TX_CTL),
  477. PINMUX_SINGLE(AVB0_RD3),
  478. PINMUX_SINGLE(AVB0_RD2),
  479. PINMUX_SINGLE(AVB0_RD1),
  480. PINMUX_SINGLE(AVB0_RD0),
  481. PINMUX_SINGLE(AVB0_RXC),
  482. PINMUX_SINGLE(AVB0_RX_CTL),
  483. PINMUX_SINGLE(RPC_INT_N),
  484. PINMUX_SINGLE(RPC_RESET_N),
  485. PINMUX_SINGLE(QSPI1_SSL),
  486. PINMUX_SINGLE(QSPI1_IO3),
  487. PINMUX_SINGLE(QSPI1_IO2),
  488. PINMUX_SINGLE(QSPI1_MISO_IO1),
  489. PINMUX_SINGLE(QSPI1_MOSI_IO0),
  490. PINMUX_SINGLE(QSPI1_SPCLK),
  491. PINMUX_SINGLE(QSPI0_SSL),
  492. PINMUX_SINGLE(QSPI0_IO3),
  493. PINMUX_SINGLE(QSPI0_IO2),
  494. PINMUX_SINGLE(QSPI0_MISO_IO1),
  495. PINMUX_SINGLE(QSPI0_MOSI_IO0),
  496. PINMUX_SINGLE(QSPI0_SPCLK),
  497. PINMUX_SINGLE(SCL0),
  498. PINMUX_SINGLE(SDA0),
  499. PINMUX_SINGLE(MSIOF0_RXD),
  500. PINMUX_SINGLE(MSIOF0_TXD),
  501. PINMUX_SINGLE(MSIOF0_SYNC),
  502. PINMUX_SINGLE(MSIOF0_SCK),
  503. /* IPSR0 */
  504. PINMUX_IPSR_MSEL(IP0_3_0, IRQ0_A, SEL_IRQ_0_0),
  505. PINMUX_IPSR_MSEL(IP0_3_0, MSIOF2_SYNC_B, SEL_MSIOF2_1),
  506. PINMUX_IPSR_GPSR(IP0_7_4, MSIOF2_SCK),
  507. PINMUX_IPSR_GPSR(IP0_11_8, MSIOF2_TXD),
  508. PINMUX_IPSR_MSEL(IP0_11_8, SCL3_A, SEL_I2C3_0),
  509. PINMUX_IPSR_GPSR(IP0_15_12, MSIOF2_RXD),
  510. PINMUX_IPSR_MSEL(IP0_15_12, SDA3_A, SEL_I2C3_0),
  511. PINMUX_IPSR_GPSR(IP0_19_16, MLB_CLK),
  512. PINMUX_IPSR_MSEL(IP0_19_16, MSIOF2_SYNC_A, SEL_MSIOF2_0),
  513. PINMUX_IPSR_MSEL(IP0_19_16, SCK5_A, SEL_SCIF5_0),
  514. PINMUX_IPSR_GPSR(IP0_23_20, MLB_DAT),
  515. PINMUX_IPSR_GPSR(IP0_23_20, MSIOF2_SS1),
  516. PINMUX_IPSR_MSEL(IP0_23_20, RX5_A, SEL_SCIF5_0),
  517. PINMUX_IPSR_MSEL(IP0_23_20, SCL3_B, SEL_I2C3_1),
  518. PINMUX_IPSR_GPSR(IP0_27_24, MLB_SIG),
  519. PINMUX_IPSR_GPSR(IP0_27_24, MSIOF2_SS2),
  520. PINMUX_IPSR_MSEL(IP0_27_24, TX5_A, SEL_SCIF5_0),
  521. PINMUX_IPSR_MSEL(IP0_27_24, SDA3_B, SEL_I2C3_1),
  522. PINMUX_IPSR_GPSR(IP0_31_28, DU_DB0),
  523. PINMUX_IPSR_GPSR(IP0_31_28, LCDOUT0),
  524. PINMUX_IPSR_MSEL(IP0_31_28, MSIOF3_TXD_B, SEL_MSIOF3_1),
  525. /* IPSR1 */
  526. PINMUX_IPSR_GPSR(IP1_3_0, DU_DB1),
  527. PINMUX_IPSR_GPSR(IP1_3_0, LCDOUT1),
  528. PINMUX_IPSR_MSEL(IP1_3_0, MSIOF3_RXD_B, SEL_MSIOF3_1),
  529. PINMUX_IPSR_GPSR(IP1_7_4, DU_DB2),
  530. PINMUX_IPSR_GPSR(IP1_7_4, LCDOUT2),
  531. PINMUX_IPSR_MSEL(IP1_7_4, IRQ0_B, SEL_IRQ_0_1),
  532. PINMUX_IPSR_GPSR(IP1_11_8, DU_DB3),
  533. PINMUX_IPSR_GPSR(IP1_11_8, LCDOUT3),
  534. PINMUX_IPSR_MSEL(IP1_11_8, SCK5_B, SEL_SCIF5_1),
  535. PINMUX_IPSR_GPSR(IP1_15_12, DU_DB4),
  536. PINMUX_IPSR_GPSR(IP1_15_12, LCDOUT4),
  537. PINMUX_IPSR_MSEL(IP1_15_12, RX5_B, SEL_SCIF5_1),
  538. PINMUX_IPSR_GPSR(IP1_19_16, DU_DB5),
  539. PINMUX_IPSR_GPSR(IP1_19_16, LCDOUT5),
  540. PINMUX_IPSR_MSEL(IP1_19_16, TX5_B, SEL_SCIF5_1),
  541. PINMUX_IPSR_GPSR(IP1_23_20, DU_DB6),
  542. PINMUX_IPSR_GPSR(IP1_23_20, LCDOUT6),
  543. PINMUX_IPSR_MSEL(IP1_23_20, MSIOF3_SS1_B, SEL_MSIOF3_1),
  544. PINMUX_IPSR_GPSR(IP1_27_24, DU_DB7),
  545. PINMUX_IPSR_GPSR(IP1_27_24, LCDOUT7),
  546. PINMUX_IPSR_MSEL(IP1_27_24, MSIOF3_SS2_B, SEL_MSIOF3_1),
  547. PINMUX_IPSR_GPSR(IP1_31_28, DU_DG0),
  548. PINMUX_IPSR_GPSR(IP1_31_28, LCDOUT8),
  549. PINMUX_IPSR_MSEL(IP1_31_28, MSIOF3_SCK_B, SEL_MSIOF3_1),
  550. /* IPSR2 */
  551. PINMUX_IPSR_GPSR(IP2_3_0, DU_DG1),
  552. PINMUX_IPSR_GPSR(IP2_3_0, LCDOUT9),
  553. PINMUX_IPSR_MSEL(IP2_3_0, MSIOF3_SYNC_B, SEL_MSIOF3_1),
  554. PINMUX_IPSR_GPSR(IP2_7_4, DU_DG2),
  555. PINMUX_IPSR_GPSR(IP2_7_4, LCDOUT10),
  556. PINMUX_IPSR_GPSR(IP2_11_8, DU_DG3),
  557. PINMUX_IPSR_GPSR(IP2_11_8, LCDOUT11),
  558. PINMUX_IPSR_MSEL(IP2_11_8, IRQ1_A, SEL_IRQ_1_0),
  559. PINMUX_IPSR_GPSR(IP2_15_12, DU_DG4),
  560. PINMUX_IPSR_GPSR(IP2_15_12, LCDOUT12),
  561. PINMUX_IPSR_MSEL(IP2_15_12, HSCK3_B, SEL_HSCIF3_1),
  562. PINMUX_IPSR_GPSR(IP2_19_16, DU_DG5),
  563. PINMUX_IPSR_GPSR(IP2_19_16, LCDOUT13),
  564. PINMUX_IPSR_MSEL(IP2_19_16, HTX3_B, SEL_HSCIF3_1),
  565. PINMUX_IPSR_GPSR(IP2_23_20, DU_DG6),
  566. PINMUX_IPSR_GPSR(IP2_23_20, LCDOUT14),
  567. PINMUX_IPSR_MSEL(IP2_23_20, HRX3_B, SEL_HSCIF3_1),
  568. PINMUX_IPSR_GPSR(IP2_27_24, DU_DG7),
  569. PINMUX_IPSR_GPSR(IP2_27_24, LCDOUT15),
  570. PINMUX_IPSR_MSEL(IP2_27_24, SCK4_B, SEL_SCIF4_1),
  571. PINMUX_IPSR_GPSR(IP2_31_28, DU_DR0),
  572. PINMUX_IPSR_GPSR(IP2_31_28, LCDOUT16),
  573. PINMUX_IPSR_MSEL(IP2_31_28, RX4_B, SEL_SCIF4_1),
  574. /* IPSR3 */
  575. PINMUX_IPSR_GPSR(IP3_3_0, DU_DR1),
  576. PINMUX_IPSR_GPSR(IP3_3_0, LCDOUT17),
  577. PINMUX_IPSR_MSEL(IP3_3_0, TX4_B, SEL_SCIF4_1),
  578. PINMUX_IPSR_GPSR(IP3_7_4, DU_DR2),
  579. PINMUX_IPSR_GPSR(IP3_7_4, LCDOUT18),
  580. PINMUX_IPSR_MSEL(IP3_7_4, PWM0_B, SEL_PWM0_2),
  581. PINMUX_IPSR_GPSR(IP3_11_8, DU_DR3),
  582. PINMUX_IPSR_GPSR(IP3_11_8, LCDOUT19),
  583. PINMUX_IPSR_MSEL(IP3_11_8, PWM1_B, SEL_PWM1_2),
  584. PINMUX_IPSR_GPSR(IP3_15_12, DU_DR4),
  585. PINMUX_IPSR_GPSR(IP3_15_12, LCDOUT20),
  586. PINMUX_IPSR_MSEL(IP3_15_12, TCLK2_B, SEL_TMU_0_1),
  587. PINMUX_IPSR_GPSR(IP3_19_16, DU_DR5),
  588. PINMUX_IPSR_GPSR(IP3_19_16, LCDOUT21),
  589. PINMUX_IPSR_GPSR(IP3_19_16, NMI),
  590. PINMUX_IPSR_GPSR(IP3_23_20, DU_DR6),
  591. PINMUX_IPSR_GPSR(IP3_23_20, LCDOUT22),
  592. PINMUX_IPSR_MSEL(IP3_23_20, PWM2_B, SEL_PWM2_2),
  593. PINMUX_IPSR_GPSR(IP3_27_24, DU_DR7),
  594. PINMUX_IPSR_GPSR(IP3_27_24, LCDOUT23),
  595. PINMUX_IPSR_MSEL(IP3_27_24, TCLK1_B, SEL_TMU_1_1),
  596. PINMUX_IPSR_GPSR(IP3_31_28, DU_DOTCLKOUT0),
  597. PINMUX_IPSR_GPSR(IP3_31_28, QCLK),
  598. /* IPSR4 */
  599. PINMUX_IPSR_GPSR(IP4_3_0, DU_HSYNC),
  600. PINMUX_IPSR_GPSR(IP4_3_0, QSTH_QHS),
  601. PINMUX_IPSR_MSEL(IP4_3_0, IRQ3_A, SEL_IRQ_3_0),
  602. PINMUX_IPSR_GPSR(IP4_7_4, DU_VSYNC),
  603. PINMUX_IPSR_GPSR(IP4_7_4, QSTVA_QVS),
  604. PINMUX_IPSR_MSEL(IP4_7_4, IRQ4_A, SEL_IRQ_4_0),
  605. PINMUX_IPSR_GPSR(IP4_11_8, DU_DISP),
  606. PINMUX_IPSR_GPSR(IP4_11_8, QSTVB_QVE),
  607. PINMUX_IPSR_MSEL(IP4_11_8, PWM3_B, SEL_PWM3_2),
  608. PINMUX_IPSR_GPSR(IP4_15_12, DU_DISP_CDE),
  609. PINMUX_IPSR_GPSR(IP4_15_12, QCPV_QDE),
  610. PINMUX_IPSR_MSEL(IP4_15_12, IRQ2_B, SEL_IRQ_2_1),
  611. PINMUX_IPSR_GPSR(IP4_15_12, DU_DOTCLKIN1),
  612. PINMUX_IPSR_GPSR(IP4_19_16, DU_CDE),
  613. PINMUX_IPSR_GPSR(IP4_19_16, QSTB_QHE),
  614. PINMUX_IPSR_MSEL(IP4_19_16, SCK3_B, SEL_SCIF3_1),
  615. PINMUX_IPSR_GPSR(IP4_23_20, QPOLA),
  616. PINMUX_IPSR_MSEL(IP4_23_20, RX3_B, SEL_SCIF3_1),
  617. PINMUX_IPSR_GPSR(IP4_27_24, QPOLB),
  618. PINMUX_IPSR_MSEL(IP4_27_24, TX3_B, SEL_SCIF3_1),
  619. PINMUX_IPSR_GPSR(IP4_31_28, VI4_DATA0),
  620. PINMUX_IPSR_MSEL(IP4_31_28, PWM0_A, SEL_PWM0_0),
  621. /* IPSR5 */
  622. PINMUX_IPSR_GPSR(IP5_3_0, VI4_DATA1),
  623. PINMUX_IPSR_MSEL(IP5_3_0, PWM1_A, SEL_PWM1_0),
  624. PINMUX_IPSR_GPSR(IP5_7_4, VI4_DATA2),
  625. PINMUX_IPSR_MSEL(IP5_7_4, PWM2_A, SEL_PWM2_0),
  626. PINMUX_IPSR_GPSR(IP5_11_8, VI4_DATA3),
  627. PINMUX_IPSR_MSEL(IP5_11_8, PWM3_A, SEL_PWM3_0),
  628. PINMUX_IPSR_GPSR(IP5_15_12, VI4_DATA5),
  629. PINMUX_IPSR_MSEL(IP5_15_12, SCK4_A, SEL_SCIF4_0),
  630. PINMUX_IPSR_GPSR(IP5_19_16, VI4_DATA6),
  631. PINMUX_IPSR_MSEL(IP5_19_16, IRQ2_A, SEL_IRQ_2_0),
  632. PINMUX_IPSR_GPSR(IP5_23_20, VI4_DATA7),
  633. PINMUX_IPSR_MSEL(IP5_23_20, TCLK2_A, SEL_TMU_0_0),
  634. PINMUX_IPSR_GPSR(IP5_27_24, VI4_DATA8),
  635. PINMUX_IPSR_GPSR(IP5_31_28, VI4_DATA9),
  636. PINMUX_IPSR_MSEL(IP5_31_28, MSIOF3_SS2_A, SEL_MSIOF3_0),
  637. PINMUX_IPSR_MSEL(IP5_31_28, IRQ1_B, SEL_IRQ_1_1),
  638. /* IPSR6 */
  639. PINMUX_IPSR_GPSR(IP6_3_0, VI4_DATA10),
  640. PINMUX_IPSR_MSEL(IP6_3_0, RX4_A, SEL_SCIF4_0),
  641. PINMUX_IPSR_GPSR(IP6_7_4, VI4_DATA11),
  642. PINMUX_IPSR_MSEL(IP6_7_4, TX4_A, SEL_SCIF4_0),
  643. PINMUX_IPSR_GPSR(IP6_11_8, VI4_DATA12),
  644. PINMUX_IPSR_MSEL(IP6_11_8, TCLK1_A, SEL_TMU_1_0),
  645. PINMUX_IPSR_GPSR(IP6_15_12, VI4_DATA13),
  646. PINMUX_IPSR_MSEL(IP6_15_12, MSIOF3_SS1_A, SEL_MSIOF3_0),
  647. PINMUX_IPSR_GPSR(IP6_15_12, HCTS3_N),
  648. PINMUX_IPSR_GPSR(IP6_19_16, VI4_DATA14),
  649. PINMUX_IPSR_MSEL(IP6_19_16, SSI_SCK4_B, SEL_SSIF4_1),
  650. PINMUX_IPSR_GPSR(IP6_19_16, HRTS3_N),
  651. PINMUX_IPSR_GPSR(IP6_23_20, VI4_DATA15),
  652. PINMUX_IPSR_MSEL(IP6_23_20, SSI_SDATA4_B, SEL_SSIF4_1),
  653. PINMUX_IPSR_GPSR(IP6_27_24, VI4_DATA16),
  654. PINMUX_IPSR_MSEL(IP6_27_24, HRX3_A, SEL_HSCIF3_0),
  655. PINMUX_IPSR_GPSR(IP6_31_28, VI4_DATA17),
  656. PINMUX_IPSR_MSEL(IP6_31_28, HTX3_A, SEL_HSCIF3_0),
  657. /* IPSR7 */
  658. PINMUX_IPSR_GPSR(IP7_3_0, VI4_DATA18),
  659. PINMUX_IPSR_MSEL(IP7_3_0, HSCK3_A, SEL_HSCIF3_0),
  660. PINMUX_IPSR_GPSR(IP7_7_4, VI4_DATA19),
  661. PINMUX_IPSR_MSEL(IP7_7_4, SSI_WS4_B, SEL_SSIF4_1),
  662. PINMUX_IPSR_GPSR(IP7_7_4, NFDATA15),
  663. PINMUX_IPSR_GPSR(IP7_11_8, VI4_DATA20),
  664. PINMUX_IPSR_MSEL(IP7_11_8, MSIOF3_SYNC_A, SEL_MSIOF3_0),
  665. PINMUX_IPSR_GPSR(IP7_11_8, NFDATA14),
  666. PINMUX_IPSR_GPSR(IP7_15_12, VI4_DATA21),
  667. PINMUX_IPSR_MSEL(IP7_15_12, MSIOF3_TXD_A, SEL_MSIOF3_0),
  668. PINMUX_IPSR_GPSR(IP7_15_12, NFDATA13),
  669. PINMUX_IPSR_GPSR(IP7_19_16, VI4_DATA22),
  670. PINMUX_IPSR_MSEL(IP7_19_16, MSIOF3_RXD_A, SEL_MSIOF3_0),
  671. PINMUX_IPSR_GPSR(IP7_19_16, NFDATA12),
  672. PINMUX_IPSR_GPSR(IP7_23_20, VI4_DATA23),
  673. PINMUX_IPSR_MSEL(IP7_23_20, MSIOF3_SCK_A, SEL_MSIOF3_0),
  674. PINMUX_IPSR_GPSR(IP7_23_20, NFDATA11),
  675. PINMUX_IPSR_GPSR(IP7_27_24, VI4_VSYNC_N),
  676. PINMUX_IPSR_MSEL(IP7_27_24, SCK1_B, SEL_SCIF1_1),
  677. PINMUX_IPSR_GPSR(IP7_27_24, NFDATA10),
  678. PINMUX_IPSR_GPSR(IP7_31_28, VI4_HSYNC_N),
  679. PINMUX_IPSR_MSEL(IP7_31_28, RX1_B, SEL_SCIF1_1),
  680. PINMUX_IPSR_GPSR(IP7_31_28, NFDATA9),
  681. /* IPSR8 */
  682. PINMUX_IPSR_GPSR(IP8_3_0, VI4_FIELD),
  683. PINMUX_IPSR_GPSR(IP8_3_0, AUDIO_CLKB),
  684. PINMUX_IPSR_MSEL(IP8_3_0, IRQ5_A, SEL_IRQ_5_0),
  685. PINMUX_IPSR_GPSR(IP8_3_0, SCIF_CLK),
  686. PINMUX_IPSR_GPSR(IP8_3_0, NFDATA8),
  687. PINMUX_IPSR_GPSR(IP8_7_4, VI4_CLKENB),
  688. PINMUX_IPSR_MSEL(IP8_7_4, TX1_B, SEL_SCIF1_1),
  689. PINMUX_IPSR_GPSR(IP8_7_4, NFWP_N),
  690. PINMUX_IPSR_MSEL(IP8_7_4, DVC_MUTE_A, SEL_SCU_0),
  691. PINMUX_IPSR_GPSR(IP8_11_8, NFALE),
  692. PINMUX_IPSR_MSEL(IP8_11_8, SCL2_B, SEL_I2C2_1),
  693. PINMUX_IPSR_MSEL(IP8_11_8, IRQ3_B, SEL_IRQ_3_1),
  694. PINMUX_IPSR_MSEL(IP8_11_8, PWM0_C, SEL_PWM0_1),
  695. PINMUX_IPSR_GPSR(IP8_15_12, NFCLE),
  696. PINMUX_IPSR_MSEL(IP8_15_12, SDA2_B, SEL_I2C2_1),
  697. PINMUX_IPSR_MSEL(IP8_15_12, SCK3_A, SEL_SCIF3_0),
  698. PINMUX_IPSR_MSEL(IP8_15_12, PWM1_C, SEL_PWM1_1),
  699. PINMUX_IPSR_GPSR(IP8_19_16, NFCE_N),
  700. PINMUX_IPSR_MSEL(IP8_19_16, RX3_A, SEL_SCIF3_0),
  701. PINMUX_IPSR_MSEL(IP8_19_16, PWM2_C, SEL_PWM2_1),
  702. PINMUX_IPSR_GPSR(IP8_23_20, NFRB_N),
  703. PINMUX_IPSR_MSEL(IP8_23_20, TX3_A, SEL_SCIF3_0),
  704. PINMUX_IPSR_MSEL(IP8_23_20, PWM3_C, SEL_PWM3_1),
  705. PINMUX_IPSR_GPSR(IP8_27_24, NFRE_N),
  706. PINMUX_IPSR_GPSR(IP8_27_24, MMC_CMD),
  707. PINMUX_IPSR_GPSR(IP8_31_28, NFWE_N),
  708. PINMUX_IPSR_GPSR(IP8_31_28, MMC_CLK),
  709. /* IPSR9 */
  710. PINMUX_IPSR_GPSR(IP9_3_0, NFDATA0),
  711. PINMUX_IPSR_GPSR(IP9_3_0, MMC_D0),
  712. PINMUX_IPSR_GPSR(IP9_7_4, NFDATA1),
  713. PINMUX_IPSR_GPSR(IP9_7_4, MMC_D1),
  714. PINMUX_IPSR_GPSR(IP9_11_8, NFDATA2),
  715. PINMUX_IPSR_GPSR(IP9_11_8, MMC_D2),
  716. PINMUX_IPSR_GPSR(IP9_15_12, NFDATA3),
  717. PINMUX_IPSR_GPSR(IP9_15_12, MMC_D3),
  718. PINMUX_IPSR_GPSR(IP9_19_16, NFDATA4),
  719. PINMUX_IPSR_GPSR(IP9_19_16, MMC_D4),
  720. PINMUX_IPSR_GPSR(IP9_23_20, NFDATA5),
  721. PINMUX_IPSR_GPSR(IP9_23_20, MMC_D5),
  722. PINMUX_IPSR_GPSR(IP9_27_24, NFDATA6),
  723. PINMUX_IPSR_GPSR(IP9_27_24, MMC_D6),
  724. PINMUX_IPSR_GPSR(IP9_31_28, NFDATA7),
  725. PINMUX_IPSR_GPSR(IP9_31_28, MMC_D7),
  726. /* IPSR10 */
  727. PINMUX_IPSR_GPSR(IP10_3_0, AUDIO_CLKA),
  728. PINMUX_IPSR_MSEL(IP10_3_0, DVC_MUTE_B, SEL_SCU_1),
  729. PINMUX_IPSR_GPSR(IP10_7_4, SSI_SCK34),
  730. PINMUX_IPSR_MSEL(IP10_7_4, FSO_CFE_0_N_A, SEL_RFSO_0),
  731. PINMUX_IPSR_GPSR(IP10_11_8, SSI_SDATA3),
  732. PINMUX_IPSR_MSEL(IP10_11_8, FSO_CFE_1_N_A, SEL_RFSO_0),
  733. PINMUX_IPSR_GPSR(IP10_15_12, SSI_WS34),
  734. PINMUX_IPSR_MSEL(IP10_15_12, FSO_TOE_N_A, SEL_RFSO_0),
  735. PINMUX_IPSR_MSEL(IP10_19_16, SSI_SCK4_A, SEL_SSIF4_0),
  736. PINMUX_IPSR_GPSR(IP10_19_16, HSCK0),
  737. PINMUX_IPSR_GPSR(IP10_19_16, AUDIO_CLKOUT),
  738. PINMUX_IPSR_MSEL(IP10_19_16, CAN0_RX_B, SEL_CAN0_1),
  739. PINMUX_IPSR_MSEL(IP10_19_16, IRQ4_B, SEL_IRQ_4_1),
  740. PINMUX_IPSR_MSEL(IP10_23_20, SSI_SDATA4_A, SEL_SSIF4_0),
  741. PINMUX_IPSR_GPSR(IP10_23_20, HTX0),
  742. PINMUX_IPSR_MSEL(IP10_23_20, SCL2_A, SEL_I2C2_0),
  743. PINMUX_IPSR_MSEL(IP10_23_20, CAN1_RX_B, SEL_CAN1_1),
  744. PINMUX_IPSR_MSEL(IP10_27_24, SSI_WS4_A, SEL_SSIF4_0),
  745. PINMUX_IPSR_GPSR(IP10_27_24, HRX0),
  746. PINMUX_IPSR_MSEL(IP10_27_24, SDA2_A, SEL_I2C2_0),
  747. PINMUX_IPSR_MSEL(IP10_27_24, CAN1_TX_B, SEL_CAN1_1),
  748. PINMUX_IPSR_GPSR(IP10_31_28, SCL1),
  749. PINMUX_IPSR_GPSR(IP10_31_28, CTS1_N),
  750. /* IPSR11 */
  751. PINMUX_IPSR_GPSR(IP11_3_0, SDA1),
  752. PINMUX_IPSR_GPSR(IP11_3_0, RTS1_N),
  753. PINMUX_IPSR_GPSR(IP11_7_4, MSIOF1_SCK),
  754. PINMUX_IPSR_MSEL(IP11_7_4, AVB0_AVTP_PPS_B, SEL_ETHERAVB_1),
  755. PINMUX_IPSR_GPSR(IP11_11_8, MSIOF1_TXD),
  756. PINMUX_IPSR_MSEL(IP11_11_8, AVB0_AVTP_CAPTURE_B, SEL_ETHERAVB_1),
  757. PINMUX_IPSR_GPSR(IP11_15_12, MSIOF1_RXD),
  758. PINMUX_IPSR_MSEL(IP11_15_12, AVB0_AVTP_MATCH_B, SEL_ETHERAVB_1),
  759. PINMUX_IPSR_MSEL(IP11_19_16, SCK0_A, SEL_SCIF0_0),
  760. PINMUX_IPSR_GPSR(IP11_19_16, MSIOF1_SYNC),
  761. PINMUX_IPSR_MSEL(IP11_19_16, FSO_CFE_0_N_B, SEL_RFSO_1),
  762. PINMUX_IPSR_MSEL(IP11_23_20, RX0_A, SEL_SCIF0_0),
  763. PINMUX_IPSR_GPSR(IP11_23_20, MSIOF0_SS1),
  764. PINMUX_IPSR_MSEL(IP11_23_20, FSO_CFE_1_N_B, SEL_RFSO_1),
  765. PINMUX_IPSR_MSEL(IP11_27_24, TX0_A, SEL_SCIF0_0),
  766. PINMUX_IPSR_GPSR(IP11_27_24, MSIOF0_SS2),
  767. PINMUX_IPSR_MSEL(IP11_27_24, FSO_TOE_N_B, SEL_RFSO_1),
  768. PINMUX_IPSR_MSEL(IP11_31_28, SCK1_A, SEL_SCIF1_0),
  769. PINMUX_IPSR_GPSR(IP11_31_28, MSIOF1_SS2),
  770. PINMUX_IPSR_GPSR(IP11_31_28, TPU0TO2_B),
  771. PINMUX_IPSR_MSEL(IP11_31_28, CAN0_TX_B, SEL_CAN0_1),
  772. PINMUX_IPSR_GPSR(IP11_31_28, AUDIO_CLKOUT1),
  773. /* IPSR12 */
  774. PINMUX_IPSR_MSEL(IP12_3_0, RX1_A, SEL_SCIF1_0),
  775. PINMUX_IPSR_GPSR(IP12_3_0, CTS0_N),
  776. PINMUX_IPSR_GPSR(IP12_3_0, TPU0TO0_B),
  777. PINMUX_IPSR_MSEL(IP12_7_4, TX1_A, SEL_SCIF1_0),
  778. PINMUX_IPSR_GPSR(IP12_7_4, RTS0_N),
  779. PINMUX_IPSR_GPSR(IP12_7_4, TPU0TO1_B),
  780. PINMUX_IPSR_GPSR(IP12_11_8, SCK2),
  781. PINMUX_IPSR_GPSR(IP12_11_8, MSIOF1_SS1),
  782. PINMUX_IPSR_GPSR(IP12_11_8, TPU0TO3_B),
  783. PINMUX_IPSR_GPSR(IP12_15_12, TPU0TO0_A),
  784. PINMUX_IPSR_MSEL(IP12_15_12, AVB0_AVTP_CAPTURE_A, SEL_ETHERAVB_0),
  785. PINMUX_IPSR_GPSR(IP12_15_12, HCTS0_N),
  786. PINMUX_IPSR_GPSR(IP12_19_16, TPU0TO1_A),
  787. PINMUX_IPSR_MSEL(IP12_19_16, AVB0_AVTP_MATCH_A, SEL_ETHERAVB_0),
  788. PINMUX_IPSR_GPSR(IP12_19_16, HRTS0_N),
  789. PINMUX_IPSR_GPSR(IP12_23_20, CAN_CLK),
  790. PINMUX_IPSR_MSEL(IP12_23_20, AVB0_AVTP_PPS_A, SEL_ETHERAVB_0),
  791. PINMUX_IPSR_MSEL(IP12_23_20, SCK0_B, SEL_SCIF0_1),
  792. PINMUX_IPSR_MSEL(IP12_23_20, IRQ5_B, SEL_IRQ_5_1),
  793. PINMUX_IPSR_MSEL(IP12_27_24, CAN0_RX_A, SEL_CAN0_0),
  794. PINMUX_IPSR_GPSR(IP12_27_24, CANFD0_RX),
  795. PINMUX_IPSR_MSEL(IP12_27_24, RX0_B, SEL_SCIF0_1),
  796. PINMUX_IPSR_MSEL(IP12_31_28, CAN0_TX_A, SEL_CAN0_0),
  797. PINMUX_IPSR_GPSR(IP12_31_28, CANFD0_TX),
  798. PINMUX_IPSR_MSEL(IP12_31_28, TX0_B, SEL_SCIF0_1),
  799. /* IPSR13 */
  800. PINMUX_IPSR_MSEL(IP13_3_0, CAN1_RX_A, SEL_CAN1_0),
  801. PINMUX_IPSR_GPSR(IP13_3_0, CANFD1_RX),
  802. PINMUX_IPSR_GPSR(IP13_3_0, TPU0TO2_A),
  803. PINMUX_IPSR_MSEL(IP13_7_4, CAN1_TX_A, SEL_CAN1_0),
  804. PINMUX_IPSR_GPSR(IP13_7_4, CANFD1_TX),
  805. PINMUX_IPSR_GPSR(IP13_7_4, TPU0TO3_A),
  806. };
  807. /*
  808. * Pins not associated with a GPIO port.
  809. */
  810. enum {
  811. GP_ASSIGN_LAST(),
  812. NOGP_ALL(),
  813. };
  814. static const struct sh_pfc_pin pinmux_pins[] = {
  815. PINMUX_GPIO_GP_ALL(),
  816. PINMUX_NOGP_ALL(),
  817. };
  818. /* - AUDIO CLOCK ------------------------------------------------------------- */
  819. static const unsigned int audio_clk_a_pins[] = {
  820. /* CLK A */
  821. RCAR_GP_PIN(4, 1),
  822. };
  823. static const unsigned int audio_clk_a_mux[] = {
  824. AUDIO_CLKA_MARK,
  825. };
  826. static const unsigned int audio_clk_b_pins[] = {
  827. /* CLK B */
  828. RCAR_GP_PIN(2, 27),
  829. };
  830. static const unsigned int audio_clk_b_mux[] = {
  831. AUDIO_CLKB_MARK,
  832. };
  833. static const unsigned int audio_clkout_pins[] = {
  834. /* CLKOUT */
  835. RCAR_GP_PIN(4, 5),
  836. };
  837. static const unsigned int audio_clkout_mux[] = {
  838. AUDIO_CLKOUT_MARK,
  839. };
  840. static const unsigned int audio_clkout1_pins[] = {
  841. /* CLKOUT1 */
  842. RCAR_GP_PIN(4, 22),
  843. };
  844. static const unsigned int audio_clkout1_mux[] = {
  845. AUDIO_CLKOUT1_MARK,
  846. };
  847. /* - EtherAVB --------------------------------------------------------------- */
  848. static const unsigned int avb0_link_pins[] = {
  849. /* AVB0_LINK */
  850. RCAR_GP_PIN(5, 20),
  851. };
  852. static const unsigned int avb0_link_mux[] = {
  853. AVB0_LINK_MARK,
  854. };
  855. static const unsigned int avb0_magic_pins[] = {
  856. /* AVB0_MAGIC */
  857. RCAR_GP_PIN(5, 18),
  858. };
  859. static const unsigned int avb0_magic_mux[] = {
  860. AVB0_MAGIC_MARK,
  861. };
  862. static const unsigned int avb0_phy_int_pins[] = {
  863. /* AVB0_PHY_INT */
  864. RCAR_GP_PIN(5, 19),
  865. };
  866. static const unsigned int avb0_phy_int_mux[] = {
  867. AVB0_PHY_INT_MARK,
  868. };
  869. static const unsigned int avb0_mdio_pins[] = {
  870. /* AVB0_MDC, AVB0_MDIO */
  871. RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 16),
  872. };
  873. static const unsigned int avb0_mdio_mux[] = {
  874. AVB0_MDC_MARK, AVB0_MDIO_MARK,
  875. };
  876. static const unsigned int avb0_mii_pins[] = {
  877. /*
  878. * AVB0_TX_CTL, AVB0_TXC, AVB0_TD0,
  879. * AVB0_TD1, AVB0_TD2, AVB0_TD3,
  880. * AVB0_RX_CTL, AVB0_RXC, AVB0_RD0,
  881. * AVB0_RD1, AVB0_RD2, AVB0_RD3,
  882. * AVB0_TXCREFCLK
  883. */
  884. RCAR_GP_PIN(5, 9), RCAR_GP_PIN(5, 10), RCAR_GP_PIN(5, 11),
  885. RCAR_GP_PIN(5, 12), RCAR_GP_PIN(5, 13), RCAR_GP_PIN(5, 14),
  886. RCAR_GP_PIN(5, 3), RCAR_GP_PIN(5, 4), RCAR_GP_PIN(5, 5),
  887. RCAR_GP_PIN(5, 6), RCAR_GP_PIN(5, 7), RCAR_GP_PIN(5, 8),
  888. RCAR_GP_PIN(5, 15),
  889. };
  890. static const unsigned int avb0_mii_mux[] = {
  891. AVB0_TX_CTL_MARK, AVB0_TXC_MARK, AVB0_TD0_MARK,
  892. AVB0_TD1_MARK, AVB0_TD2_MARK, AVB0_TD3_MARK,
  893. AVB0_RX_CTL_MARK, AVB0_RXC_MARK, AVB0_RD0_MARK,
  894. AVB0_RD1_MARK, AVB0_RD2_MARK, AVB0_RD3_MARK,
  895. AVB0_TXCREFCLK_MARK,
  896. };
  897. static const unsigned int avb0_avtp_pps_a_pins[] = {
  898. /* AVB0_AVTP_PPS_A */
  899. RCAR_GP_PIN(5, 2),
  900. };
  901. static const unsigned int avb0_avtp_pps_a_mux[] = {
  902. AVB0_AVTP_PPS_A_MARK,
  903. };
  904. static const unsigned int avb0_avtp_match_a_pins[] = {
  905. /* AVB0_AVTP_MATCH_A */
  906. RCAR_GP_PIN(5, 1),
  907. };
  908. static const unsigned int avb0_avtp_match_a_mux[] = {
  909. AVB0_AVTP_MATCH_A_MARK,
  910. };
  911. static const unsigned int avb0_avtp_capture_a_pins[] = {
  912. /* AVB0_AVTP_CAPTURE_A */
  913. RCAR_GP_PIN(5, 0),
  914. };
  915. static const unsigned int avb0_avtp_capture_a_mux[] = {
  916. AVB0_AVTP_CAPTURE_A_MARK,
  917. };
  918. static const unsigned int avb0_avtp_pps_b_pins[] = {
  919. /* AVB0_AVTP_PPS_B */
  920. RCAR_GP_PIN(4, 16),
  921. };
  922. static const unsigned int avb0_avtp_pps_b_mux[] = {
  923. AVB0_AVTP_PPS_B_MARK,
  924. };
  925. static const unsigned int avb0_avtp_match_b_pins[] = {
  926. /* AVB0_AVTP_MATCH_B */
  927. RCAR_GP_PIN(4, 18),
  928. };
  929. static const unsigned int avb0_avtp_match_b_mux[] = {
  930. AVB0_AVTP_MATCH_B_MARK,
  931. };
  932. static const unsigned int avb0_avtp_capture_b_pins[] = {
  933. /* AVB0_AVTP_CAPTURE_B */
  934. RCAR_GP_PIN(4, 17),
  935. };
  936. static const unsigned int avb0_avtp_capture_b_mux[] = {
  937. AVB0_AVTP_CAPTURE_B_MARK,
  938. };
  939. /* - CAN ------------------------------------------------------------------ */
  940. static const unsigned int can0_data_a_pins[] = {
  941. /* TX, RX */
  942. RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 31),
  943. };
  944. static const unsigned int can0_data_a_mux[] = {
  945. CAN0_TX_A_MARK, CAN0_RX_A_MARK,
  946. };
  947. static const unsigned int can0_data_b_pins[] = {
  948. /* TX, RX */
  949. RCAR_GP_PIN(4, 22), RCAR_GP_PIN(4, 5),
  950. };
  951. static const unsigned int can0_data_b_mux[] = {
  952. CAN0_TX_B_MARK, CAN0_RX_B_MARK,
  953. };
  954. static const unsigned int can1_data_a_pins[] = {
  955. /* TX, RX */
  956. RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 29),
  957. };
  958. static const unsigned int can1_data_a_mux[] = {
  959. CAN1_TX_A_MARK, CAN1_RX_A_MARK,
  960. };
  961. static const unsigned int can1_data_b_pins[] = {
  962. /* TX, RX */
  963. RCAR_GP_PIN(4, 7), RCAR_GP_PIN(4, 6),
  964. };
  965. static const unsigned int can1_data_b_mux[] = {
  966. CAN1_TX_B_MARK, CAN1_RX_B_MARK,
  967. };
  968. /* - CAN Clock -------------------------------------------------------------- */
  969. static const unsigned int can_clk_pins[] = {
  970. /* CLK */
  971. RCAR_GP_PIN(5, 2),
  972. };
  973. static const unsigned int can_clk_mux[] = {
  974. CAN_CLK_MARK,
  975. };
  976. /* - CAN FD ----------------------------------------------------------------- */
  977. static const unsigned int canfd0_data_pins[] = {
  978. /* TX, RX */
  979. RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 31),
  980. };
  981. static const unsigned int canfd0_data_mux[] = {
  982. CANFD0_TX_MARK, CANFD0_RX_MARK,
  983. };
  984. static const unsigned int canfd1_data_pins[] = {
  985. /* TX, RX */
  986. RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 29),
  987. };
  988. static const unsigned int canfd1_data_mux[] = {
  989. CANFD1_TX_MARK, CANFD1_RX_MARK,
  990. };
  991. /* - DU --------------------------------------------------------------------- */
  992. static const unsigned int du_rgb666_pins[] = {
  993. /* R[7:2], G[7:2], B[7:2] */
  994. RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 21),
  995. RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18),
  996. RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
  997. RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10),
  998. RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5),
  999. RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2),
  1000. };
  1001. static const unsigned int du_rgb666_mux[] = {
  1002. DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK,
  1003. DU_DR3_MARK, DU_DR2_MARK,
  1004. DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK,
  1005. DU_DG3_MARK, DU_DG2_MARK,
  1006. DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK,
  1007. DU_DB3_MARK, DU_DB2_MARK,
  1008. };
  1009. static const unsigned int du_rgb888_pins[] = {
  1010. /* R[7:0], G[7:0], B[7:0] */
  1011. RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 22), RCAR_GP_PIN(1, 21),
  1012. RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 19), RCAR_GP_PIN(1, 18),
  1013. RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 16),
  1014. RCAR_GP_PIN(1, 15), RCAR_GP_PIN(1, 14), RCAR_GP_PIN(1, 13),
  1015. RCAR_GP_PIN(1, 12), RCAR_GP_PIN(1, 11), RCAR_GP_PIN(1, 10),
  1016. RCAR_GP_PIN(1, 9), RCAR_GP_PIN(1, 8),
  1017. RCAR_GP_PIN(1, 7), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 5),
  1018. RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 3), RCAR_GP_PIN(1, 2),
  1019. RCAR_GP_PIN(1, 1), RCAR_GP_PIN(1, 0),
  1020. };
  1021. static const unsigned int du_rgb888_mux[] = {
  1022. DU_DR7_MARK, DU_DR6_MARK, DU_DR5_MARK, DU_DR4_MARK,
  1023. DU_DR3_MARK, DU_DR2_MARK, DU_DR1_MARK, DU_DR0_MARK,
  1024. DU_DG7_MARK, DU_DG6_MARK, DU_DG5_MARK, DU_DG4_MARK,
  1025. DU_DG3_MARK, DU_DG2_MARK, DU_DG1_MARK, DU_DG0_MARK,
  1026. DU_DB7_MARK, DU_DB6_MARK, DU_DB5_MARK, DU_DB4_MARK,
  1027. DU_DB3_MARK, DU_DB2_MARK, DU_DB1_MARK, DU_DB0_MARK,
  1028. };
  1029. static const unsigned int du_clk_in_1_pins[] = {
  1030. /* CLKIN */
  1031. RCAR_GP_PIN(1, 28),
  1032. };
  1033. static const unsigned int du_clk_in_1_mux[] = {
  1034. DU_DOTCLKIN1_MARK
  1035. };
  1036. static const unsigned int du_clk_out_0_pins[] = {
  1037. /* CLKOUT */
  1038. RCAR_GP_PIN(1, 24),
  1039. };
  1040. static const unsigned int du_clk_out_0_mux[] = {
  1041. DU_DOTCLKOUT0_MARK
  1042. };
  1043. static const unsigned int du_sync_pins[] = {
  1044. /* VSYNC, HSYNC */
  1045. RCAR_GP_PIN(1, 26), RCAR_GP_PIN(1, 25),
  1046. };
  1047. static const unsigned int du_sync_mux[] = {
  1048. DU_VSYNC_MARK, DU_HSYNC_MARK
  1049. };
  1050. static const unsigned int du_disp_cde_pins[] = {
  1051. /* DISP_CDE */
  1052. RCAR_GP_PIN(1, 28),
  1053. };
  1054. static const unsigned int du_disp_cde_mux[] = {
  1055. DU_DISP_CDE_MARK,
  1056. };
  1057. static const unsigned int du_cde_pins[] = {
  1058. /* CDE */
  1059. RCAR_GP_PIN(1, 29),
  1060. };
  1061. static const unsigned int du_cde_mux[] = {
  1062. DU_CDE_MARK,
  1063. };
  1064. static const unsigned int du_disp_pins[] = {
  1065. /* DISP */
  1066. RCAR_GP_PIN(1, 27),
  1067. };
  1068. static const unsigned int du_disp_mux[] = {
  1069. DU_DISP_MARK,
  1070. };
  1071. /* - I2C -------------------------------------------------------------------- */
  1072. static const unsigned int i2c0_pins[] = {
  1073. /* SCL, SDA */
  1074. RCAR_GP_PIN(4, 8), RCAR_GP_PIN(4, 9),
  1075. };
  1076. static const unsigned int i2c0_mux[] = {
  1077. SCL0_MARK, SDA0_MARK,
  1078. };
  1079. static const unsigned int i2c1_pins[] = {
  1080. /* SCL, SDA */
  1081. RCAR_GP_PIN(4, 10), RCAR_GP_PIN(4, 11),
  1082. };
  1083. static const unsigned int i2c1_mux[] = {
  1084. SCL1_MARK, SDA1_MARK,
  1085. };
  1086. static const unsigned int i2c2_a_pins[] = {
  1087. /* SCL, SDA */
  1088. RCAR_GP_PIN(4, 6), RCAR_GP_PIN(4, 7),
  1089. };
  1090. static const unsigned int i2c2_a_mux[] = {
  1091. SCL2_A_MARK, SDA2_A_MARK,
  1092. };
  1093. static const unsigned int i2c2_b_pins[] = {
  1094. /* SCL, SDA */
  1095. RCAR_GP_PIN(2, 29), RCAR_GP_PIN(2, 30),
  1096. };
  1097. static const unsigned int i2c2_b_mux[] = {
  1098. SCL2_B_MARK, SDA2_B_MARK,
  1099. };
  1100. static const unsigned int i2c3_a_pins[] = {
  1101. /* SCL, SDA */
  1102. RCAR_GP_PIN(0, 4), RCAR_GP_PIN(0, 5),
  1103. };
  1104. static const unsigned int i2c3_a_mux[] = {
  1105. SCL3_A_MARK, SDA3_A_MARK,
  1106. };
  1107. static const unsigned int i2c3_b_pins[] = {
  1108. /* SCL, SDA */
  1109. RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 8),
  1110. };
  1111. static const unsigned int i2c3_b_mux[] = {
  1112. SCL3_B_MARK, SDA3_B_MARK,
  1113. };
  1114. /* - MLB+ ------------------------------------------------------------------- */
  1115. static const unsigned int mlb_3pin_pins[] = {
  1116. RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 8), RCAR_GP_PIN(0, 7),
  1117. };
  1118. static const unsigned int mlb_3pin_mux[] = {
  1119. MLB_CLK_MARK, MLB_SIG_MARK, MLB_DAT_MARK,
  1120. };
  1121. /* - MMC ------------------------------------------------------------------- */
  1122. static const unsigned int mmc_data_pins[] = {
  1123. /* D[0:7] */
  1124. RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
  1125. RCAR_GP_PIN(3, 4), RCAR_GP_PIN(3, 5),
  1126. RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
  1127. RCAR_GP_PIN(3, 8), RCAR_GP_PIN(3, 9),
  1128. };
  1129. static const unsigned int mmc_data_mux[] = {
  1130. MMC_D0_MARK, MMC_D1_MARK,
  1131. MMC_D2_MARK, MMC_D3_MARK,
  1132. MMC_D4_MARK, MMC_D5_MARK,
  1133. MMC_D6_MARK, MMC_D7_MARK,
  1134. };
  1135. static const unsigned int mmc_ctrl_pins[] = {
  1136. /* CLK, CMD */
  1137. RCAR_GP_PIN(3, 1), RCAR_GP_PIN(3, 0),
  1138. };
  1139. static const unsigned int mmc_ctrl_mux[] = {
  1140. MMC_CLK_MARK, MMC_CMD_MARK,
  1141. };
  1142. /* - MSIOF0 ----------------------------------------------------------------- */
  1143. static const unsigned int msiof0_clk_pins[] = {
  1144. /* SCK */
  1145. RCAR_GP_PIN(4, 12),
  1146. };
  1147. static const unsigned int msiof0_clk_mux[] = {
  1148. MSIOF0_SCK_MARK,
  1149. };
  1150. static const unsigned int msiof0_sync_pins[] = {
  1151. /* SYNC */
  1152. RCAR_GP_PIN(4, 13),
  1153. };
  1154. static const unsigned int msiof0_sync_mux[] = {
  1155. MSIOF0_SYNC_MARK,
  1156. };
  1157. static const unsigned int msiof0_ss1_pins[] = {
  1158. /* SS1 */
  1159. RCAR_GP_PIN(4, 20),
  1160. };
  1161. static const unsigned int msiof0_ss1_mux[] = {
  1162. MSIOF0_SS1_MARK,
  1163. };
  1164. static const unsigned int msiof0_ss2_pins[] = {
  1165. /* SS2 */
  1166. RCAR_GP_PIN(4, 21),
  1167. };
  1168. static const unsigned int msiof0_ss2_mux[] = {
  1169. MSIOF0_SS2_MARK,
  1170. };
  1171. static const unsigned int msiof0_txd_pins[] = {
  1172. /* TXD */
  1173. RCAR_GP_PIN(4, 14),
  1174. };
  1175. static const unsigned int msiof0_txd_mux[] = {
  1176. MSIOF0_TXD_MARK,
  1177. };
  1178. static const unsigned int msiof0_rxd_pins[] = {
  1179. /* RXD */
  1180. RCAR_GP_PIN(4, 15),
  1181. };
  1182. static const unsigned int msiof0_rxd_mux[] = {
  1183. MSIOF0_RXD_MARK,
  1184. };
  1185. /* - MSIOF1 ----------------------------------------------------------------- */
  1186. static const unsigned int msiof1_clk_pins[] = {
  1187. /* SCK */
  1188. RCAR_GP_PIN(4, 16),
  1189. };
  1190. static const unsigned int msiof1_clk_mux[] = {
  1191. MSIOF1_SCK_MARK,
  1192. };
  1193. static const unsigned int msiof1_sync_pins[] = {
  1194. /* SYNC */
  1195. RCAR_GP_PIN(4, 19),
  1196. };
  1197. static const unsigned int msiof1_sync_mux[] = {
  1198. MSIOF1_SYNC_MARK,
  1199. };
  1200. static const unsigned int msiof1_ss1_pins[] = {
  1201. /* SS1 */
  1202. RCAR_GP_PIN(4, 25),
  1203. };
  1204. static const unsigned int msiof1_ss1_mux[] = {
  1205. MSIOF1_SS1_MARK,
  1206. };
  1207. static const unsigned int msiof1_ss2_pins[] = {
  1208. /* SS2 */
  1209. RCAR_GP_PIN(4, 22),
  1210. };
  1211. static const unsigned int msiof1_ss2_mux[] = {
  1212. MSIOF1_SS2_MARK,
  1213. };
  1214. static const unsigned int msiof1_txd_pins[] = {
  1215. /* TXD */
  1216. RCAR_GP_PIN(4, 17),
  1217. };
  1218. static const unsigned int msiof1_txd_mux[] = {
  1219. MSIOF1_TXD_MARK,
  1220. };
  1221. static const unsigned int msiof1_rxd_pins[] = {
  1222. /* RXD */
  1223. RCAR_GP_PIN(4, 18),
  1224. };
  1225. static const unsigned int msiof1_rxd_mux[] = {
  1226. MSIOF1_RXD_MARK,
  1227. };
  1228. /* - MSIOF2 ----------------------------------------------------------------- */
  1229. static const unsigned int msiof2_clk_pins[] = {
  1230. /* SCK */
  1231. RCAR_GP_PIN(0, 3),
  1232. };
  1233. static const unsigned int msiof2_clk_mux[] = {
  1234. MSIOF2_SCK_MARK,
  1235. };
  1236. static const unsigned int msiof2_sync_a_pins[] = {
  1237. /* SYNC */
  1238. RCAR_GP_PIN(0, 6),
  1239. };
  1240. static const unsigned int msiof2_sync_a_mux[] = {
  1241. MSIOF2_SYNC_A_MARK,
  1242. };
  1243. static const unsigned int msiof2_sync_b_pins[] = {
  1244. /* SYNC */
  1245. RCAR_GP_PIN(0, 2),
  1246. };
  1247. static const unsigned int msiof2_sync_b_mux[] = {
  1248. MSIOF2_SYNC_B_MARK,
  1249. };
  1250. static const unsigned int msiof2_ss1_pins[] = {
  1251. /* SS1 */
  1252. RCAR_GP_PIN(0, 7),
  1253. };
  1254. static const unsigned int msiof2_ss1_mux[] = {
  1255. MSIOF2_SS1_MARK,
  1256. };
  1257. static const unsigned int msiof2_ss2_pins[] = {
  1258. /* SS2 */
  1259. RCAR_GP_PIN(0, 8),
  1260. };
  1261. static const unsigned int msiof2_ss2_mux[] = {
  1262. MSIOF2_SS2_MARK,
  1263. };
  1264. static const unsigned int msiof2_txd_pins[] = {
  1265. /* TXD */
  1266. RCAR_GP_PIN(0, 4),
  1267. };
  1268. static const unsigned int msiof2_txd_mux[] = {
  1269. MSIOF2_TXD_MARK,
  1270. };
  1271. static const unsigned int msiof2_rxd_pins[] = {
  1272. /* RXD */
  1273. RCAR_GP_PIN(0, 5),
  1274. };
  1275. static const unsigned int msiof2_rxd_mux[] = {
  1276. MSIOF2_RXD_MARK,
  1277. };
  1278. /* - MSIOF3 ----------------------------------------------------------------- */
  1279. static const unsigned int msiof3_clk_a_pins[] = {
  1280. /* SCK */
  1281. RCAR_GP_PIN(2, 24),
  1282. };
  1283. static const unsigned int msiof3_clk_a_mux[] = {
  1284. MSIOF3_SCK_A_MARK,
  1285. };
  1286. static const unsigned int msiof3_sync_a_pins[] = {
  1287. /* SYNC */
  1288. RCAR_GP_PIN(2, 21),
  1289. };
  1290. static const unsigned int msiof3_sync_a_mux[] = {
  1291. MSIOF3_SYNC_A_MARK,
  1292. };
  1293. static const unsigned int msiof3_ss1_a_pins[] = {
  1294. /* SS1 */
  1295. RCAR_GP_PIN(2, 14),
  1296. };
  1297. static const unsigned int msiof3_ss1_a_mux[] = {
  1298. MSIOF3_SS1_A_MARK,
  1299. };
  1300. static const unsigned int msiof3_ss2_a_pins[] = {
  1301. /* SS2 */
  1302. RCAR_GP_PIN(2, 10),
  1303. };
  1304. static const unsigned int msiof3_ss2_a_mux[] = {
  1305. MSIOF3_SS2_A_MARK,
  1306. };
  1307. static const unsigned int msiof3_txd_a_pins[] = {
  1308. /* TXD */
  1309. RCAR_GP_PIN(2, 22),
  1310. };
  1311. static const unsigned int msiof3_txd_a_mux[] = {
  1312. MSIOF3_TXD_A_MARK,
  1313. };
  1314. static const unsigned int msiof3_rxd_a_pins[] = {
  1315. /* RXD */
  1316. RCAR_GP_PIN(2, 23),
  1317. };
  1318. static const unsigned int msiof3_rxd_a_mux[] = {
  1319. MSIOF3_RXD_A_MARK,
  1320. };
  1321. static const unsigned int msiof3_clk_b_pins[] = {
  1322. /* SCK */
  1323. RCAR_GP_PIN(1, 8),
  1324. };
  1325. static const unsigned int msiof3_clk_b_mux[] = {
  1326. MSIOF3_SCK_B_MARK,
  1327. };
  1328. static const unsigned int msiof3_sync_b_pins[] = {
  1329. /* SYNC */
  1330. RCAR_GP_PIN(1, 9),
  1331. };
  1332. static const unsigned int msiof3_sync_b_mux[] = {
  1333. MSIOF3_SYNC_B_MARK,
  1334. };
  1335. static const unsigned int msiof3_ss1_b_pins[] = {
  1336. /* SS1 */
  1337. RCAR_GP_PIN(1, 6),
  1338. };
  1339. static const unsigned int msiof3_ss1_b_mux[] = {
  1340. MSIOF3_SS1_B_MARK,
  1341. };
  1342. static const unsigned int msiof3_ss2_b_pins[] = {
  1343. /* SS2 */
  1344. RCAR_GP_PIN(1, 7),
  1345. };
  1346. static const unsigned int msiof3_ss2_b_mux[] = {
  1347. MSIOF3_SS2_B_MARK,
  1348. };
  1349. static const unsigned int msiof3_txd_b_pins[] = {
  1350. /* TXD */
  1351. RCAR_GP_PIN(1, 0),
  1352. };
  1353. static const unsigned int msiof3_txd_b_mux[] = {
  1354. MSIOF3_TXD_B_MARK,
  1355. };
  1356. static const unsigned int msiof3_rxd_b_pins[] = {
  1357. /* RXD */
  1358. RCAR_GP_PIN(1, 1),
  1359. };
  1360. static const unsigned int msiof3_rxd_b_mux[] = {
  1361. MSIOF3_RXD_B_MARK,
  1362. };
  1363. /* - PWM0 ------------------------------------------------------------------ */
  1364. static const unsigned int pwm0_a_pins[] = {
  1365. /* PWM */
  1366. RCAR_GP_PIN(2, 1),
  1367. };
  1368. static const unsigned int pwm0_a_mux[] = {
  1369. PWM0_A_MARK,
  1370. };
  1371. static const unsigned int pwm0_b_pins[] = {
  1372. /* PWM */
  1373. RCAR_GP_PIN(1, 18),
  1374. };
  1375. static const unsigned int pwm0_b_mux[] = {
  1376. PWM0_B_MARK,
  1377. };
  1378. static const unsigned int pwm0_c_pins[] = {
  1379. /* PWM */
  1380. RCAR_GP_PIN(2, 29),
  1381. };
  1382. static const unsigned int pwm0_c_mux[] = {
  1383. PWM0_C_MARK,
  1384. };
  1385. /* - PWM1 ------------------------------------------------------------------ */
  1386. static const unsigned int pwm1_a_pins[] = {
  1387. /* PWM */
  1388. RCAR_GP_PIN(2, 2),
  1389. };
  1390. static const unsigned int pwm1_a_mux[] = {
  1391. PWM1_A_MARK,
  1392. };
  1393. static const unsigned int pwm1_b_pins[] = {
  1394. /* PWM */
  1395. RCAR_GP_PIN(1, 19),
  1396. };
  1397. static const unsigned int pwm1_b_mux[] = {
  1398. PWM1_B_MARK,
  1399. };
  1400. static const unsigned int pwm1_c_pins[] = {
  1401. /* PWM */
  1402. RCAR_GP_PIN(2, 30),
  1403. };
  1404. static const unsigned int pwm1_c_mux[] = {
  1405. PWM1_C_MARK,
  1406. };
  1407. /* - PWM2 ------------------------------------------------------------------ */
  1408. static const unsigned int pwm2_a_pins[] = {
  1409. /* PWM */
  1410. RCAR_GP_PIN(2, 3),
  1411. };
  1412. static const unsigned int pwm2_a_mux[] = {
  1413. PWM2_A_MARK,
  1414. };
  1415. static const unsigned int pwm2_b_pins[] = {
  1416. /* PWM */
  1417. RCAR_GP_PIN(1, 22),
  1418. };
  1419. static const unsigned int pwm2_b_mux[] = {
  1420. PWM2_B_MARK,
  1421. };
  1422. static const unsigned int pwm2_c_pins[] = {
  1423. /* PWM */
  1424. RCAR_GP_PIN(2, 31),
  1425. };
  1426. static const unsigned int pwm2_c_mux[] = {
  1427. PWM2_C_MARK,
  1428. };
  1429. /* - PWM3 ------------------------------------------------------------------ */
  1430. static const unsigned int pwm3_a_pins[] = {
  1431. /* PWM */
  1432. RCAR_GP_PIN(2, 4),
  1433. };
  1434. static const unsigned int pwm3_a_mux[] = {
  1435. PWM3_A_MARK,
  1436. };
  1437. static const unsigned int pwm3_b_pins[] = {
  1438. /* PWM */
  1439. RCAR_GP_PIN(1, 27),
  1440. };
  1441. static const unsigned int pwm3_b_mux[] = {
  1442. PWM3_B_MARK,
  1443. };
  1444. static const unsigned int pwm3_c_pins[] = {
  1445. /* PWM */
  1446. RCAR_GP_PIN(4, 0),
  1447. };
  1448. static const unsigned int pwm3_c_mux[] = {
  1449. PWM3_C_MARK,
  1450. };
  1451. /* - QSPI0 ------------------------------------------------------------------ */
  1452. static const unsigned int qspi0_ctrl_pins[] = {
  1453. /* QSPI0_SPCLK, QSPI0_SSL */
  1454. RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 5),
  1455. };
  1456. static const unsigned int qspi0_ctrl_mux[] = {
  1457. QSPI0_SPCLK_MARK, QSPI0_SSL_MARK,
  1458. };
  1459. /* - QSPI1 ------------------------------------------------------------------ */
  1460. static const unsigned int qspi1_ctrl_pins[] = {
  1461. /* QSPI1_SPCLK, QSPI1_SSL */
  1462. RCAR_GP_PIN(6, 6), RCAR_GP_PIN(6, 11),
  1463. };
  1464. static const unsigned int qspi1_ctrl_mux[] = {
  1465. QSPI1_SPCLK_MARK, QSPI1_SSL_MARK,
  1466. };
  1467. /* - RPC -------------------------------------------------------------------- */
  1468. static const unsigned int rpc_clk_pins[] = {
  1469. /* Octal-SPI flash: C/SCLK */
  1470. /* HyperFlash: CK, CK# */
  1471. RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 6),
  1472. };
  1473. static const unsigned int rpc_clk_mux[] = {
  1474. QSPI0_SPCLK_MARK, QSPI1_SPCLK_MARK,
  1475. };
  1476. static const unsigned int rpc_ctrl_pins[] = {
  1477. /* Octal-SPI flash: S#/CS, DQS */
  1478. /* HyperFlash: CS#, RDS */
  1479. RCAR_GP_PIN(6, 5), RCAR_GP_PIN(6, 11),
  1480. };
  1481. static const unsigned int rpc_ctrl_mux[] = {
  1482. QSPI0_SSL_MARK, QSPI1_SSL_MARK,
  1483. };
  1484. static const unsigned int rpc_data_pins[] = {
  1485. /* DQ[0:7] */
  1486. RCAR_GP_PIN(6, 1), RCAR_GP_PIN(6, 2),
  1487. RCAR_GP_PIN(6, 3), RCAR_GP_PIN(6, 4),
  1488. RCAR_GP_PIN(6, 7), RCAR_GP_PIN(6, 8),
  1489. RCAR_GP_PIN(6, 9), RCAR_GP_PIN(6, 10),
  1490. };
  1491. static const unsigned int rpc_data_mux[] = {
  1492. QSPI0_MOSI_IO0_MARK, QSPI0_MISO_IO1_MARK,
  1493. QSPI0_IO2_MARK, QSPI0_IO3_MARK,
  1494. QSPI1_MOSI_IO0_MARK, QSPI1_MISO_IO1_MARK,
  1495. QSPI1_IO2_MARK, QSPI1_IO3_MARK,
  1496. };
  1497. static const unsigned int rpc_reset_pins[] = {
  1498. /* RPC_RESET# */
  1499. RCAR_GP_PIN(6, 12),
  1500. };
  1501. static const unsigned int rpc_reset_mux[] = {
  1502. RPC_RESET_N_MARK,
  1503. };
  1504. static const unsigned int rpc_int_pins[] = {
  1505. /* RPC_INT# */
  1506. RCAR_GP_PIN(6, 13),
  1507. };
  1508. static const unsigned int rpc_int_mux[] = {
  1509. RPC_INT_N_MARK,
  1510. };
  1511. /* - SCIF0 ------------------------------------------------------------------ */
  1512. static const unsigned int scif0_data_a_pins[] = {
  1513. /* RX, TX */
  1514. RCAR_GP_PIN(4, 20), RCAR_GP_PIN(4, 21),
  1515. };
  1516. static const unsigned int scif0_data_a_mux[] = {
  1517. RX0_A_MARK, TX0_A_MARK,
  1518. };
  1519. static const unsigned int scif0_clk_a_pins[] = {
  1520. /* SCK */
  1521. RCAR_GP_PIN(4, 19),
  1522. };
  1523. static const unsigned int scif0_clk_a_mux[] = {
  1524. SCK0_A_MARK,
  1525. };
  1526. static const unsigned int scif0_data_b_pins[] = {
  1527. /* RX, TX */
  1528. RCAR_GP_PIN(4, 31), RCAR_GP_PIN(4, 28),
  1529. };
  1530. static const unsigned int scif0_data_b_mux[] = {
  1531. RX0_B_MARK, TX0_B_MARK,
  1532. };
  1533. static const unsigned int scif0_clk_b_pins[] = {
  1534. /* SCK */
  1535. RCAR_GP_PIN(5, 2),
  1536. };
  1537. static const unsigned int scif0_clk_b_mux[] = {
  1538. SCK0_B_MARK,
  1539. };
  1540. static const unsigned int scif0_ctrl_pins[] = {
  1541. /* RTS, CTS */
  1542. RCAR_GP_PIN(4, 24), RCAR_GP_PIN(4, 23),
  1543. };
  1544. static const unsigned int scif0_ctrl_mux[] = {
  1545. RTS0_N_MARK, CTS0_N_MARK,
  1546. };
  1547. /* - SCIF1 ------------------------------------------------------------------ */
  1548. static const unsigned int scif1_data_a_pins[] = {
  1549. /* RX, TX */
  1550. RCAR_GP_PIN(4, 23), RCAR_GP_PIN(4, 24),
  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_a_pins[] = {
  1556. /* SCK */
  1557. RCAR_GP_PIN(4, 22),
  1558. };
  1559. static const unsigned int scif1_clk_a_mux[] = {
  1560. SCK1_A_MARK,
  1561. };
  1562. static const unsigned int scif1_data_b_pins[] = {
  1563. /* RX, TX */
  1564. RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 28),
  1565. };
  1566. static const unsigned int scif1_data_b_mux[] = {
  1567. RX1_B_MARK, TX1_B_MARK,
  1568. };
  1569. static const unsigned int scif1_clk_b_pins[] = {
  1570. /* SCK */
  1571. RCAR_GP_PIN(2, 25),
  1572. };
  1573. static const unsigned int scif1_clk_b_mux[] = {
  1574. SCK1_B_MARK,
  1575. };
  1576. static const unsigned int scif1_ctrl_pins[] = {
  1577. /* RTS, CTS */
  1578. RCAR_GP_PIN(4, 11), RCAR_GP_PIN(4, 10),
  1579. };
  1580. static const unsigned int scif1_ctrl_mux[] = {
  1581. RTS1_N_MARK, CTS1_N_MARK,
  1582. };
  1583. /* - SCIF2 ------------------------------------------------------------------ */
  1584. static const unsigned int scif2_data_pins[] = {
  1585. /* RX, TX */
  1586. RCAR_GP_PIN(4, 26), RCAR_GP_PIN(4, 27),
  1587. };
  1588. static const unsigned int scif2_data_mux[] = {
  1589. RX2_MARK, TX2_MARK,
  1590. };
  1591. static const unsigned int scif2_clk_pins[] = {
  1592. /* SCK */
  1593. RCAR_GP_PIN(4, 25),
  1594. };
  1595. static const unsigned int scif2_clk_mux[] = {
  1596. SCK2_MARK,
  1597. };
  1598. /* - SCIF3 ------------------------------------------------------------------ */
  1599. static const unsigned int scif3_data_a_pins[] = {
  1600. /* RX, TX */
  1601. RCAR_GP_PIN(2, 31), RCAR_GP_PIN(4, 00),
  1602. };
  1603. static const unsigned int scif3_data_a_mux[] = {
  1604. RX3_A_MARK, TX3_A_MARK,
  1605. };
  1606. static const unsigned int scif3_clk_a_pins[] = {
  1607. /* SCK */
  1608. RCAR_GP_PIN(2, 30),
  1609. };
  1610. static const unsigned int scif3_clk_a_mux[] = {
  1611. SCK3_A_MARK,
  1612. };
  1613. static const unsigned int scif3_data_b_pins[] = {
  1614. /* RX, TX */
  1615. RCAR_GP_PIN(1, 30), RCAR_GP_PIN(1, 31),
  1616. };
  1617. static const unsigned int scif3_data_b_mux[] = {
  1618. RX3_B_MARK, TX3_B_MARK,
  1619. };
  1620. static const unsigned int scif3_clk_b_pins[] = {
  1621. /* SCK */
  1622. RCAR_GP_PIN(1, 29),
  1623. };
  1624. static const unsigned int scif3_clk_b_mux[] = {
  1625. SCK3_B_MARK,
  1626. };
  1627. /* - SCIF4 ------------------------------------------------------------------ */
  1628. static const unsigned int scif4_data_a_pins[] = {
  1629. /* RX, TX */
  1630. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12),
  1631. };
  1632. static const unsigned int scif4_data_a_mux[] = {
  1633. RX4_A_MARK, TX4_A_MARK,
  1634. };
  1635. static const unsigned int scif4_clk_a_pins[] = {
  1636. /* SCK */
  1637. RCAR_GP_PIN(2, 6),
  1638. };
  1639. static const unsigned int scif4_clk_a_mux[] = {
  1640. SCK4_A_MARK,
  1641. };
  1642. static const unsigned int scif4_data_b_pins[] = {
  1643. /* RX, TX */
  1644. RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17),
  1645. };
  1646. static const unsigned int scif4_data_b_mux[] = {
  1647. RX4_B_MARK, TX4_B_MARK,
  1648. };
  1649. static const unsigned int scif4_clk_b_pins[] = {
  1650. /* SCK */
  1651. RCAR_GP_PIN(1, 15),
  1652. };
  1653. static const unsigned int scif4_clk_b_mux[] = {
  1654. SCK4_B_MARK,
  1655. };
  1656. /* - SCIF5 ------------------------------------------------------------------ */
  1657. static const unsigned int scif5_data_a_pins[] = {
  1658. /* RX, TX */
  1659. RCAR_GP_PIN(0, 7), RCAR_GP_PIN(0, 8),
  1660. };
  1661. static const unsigned int scif5_data_a_mux[] = {
  1662. RX5_A_MARK, TX5_A_MARK,
  1663. };
  1664. static const unsigned int scif5_clk_a_pins[] = {
  1665. /* SCK */
  1666. RCAR_GP_PIN(0, 6),
  1667. };
  1668. static const unsigned int scif5_clk_a_mux[] = {
  1669. SCK5_A_MARK,
  1670. };
  1671. static const unsigned int scif5_data_b_pins[] = {
  1672. /* RX, TX */
  1673. RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 5),
  1674. };
  1675. static const unsigned int scif5_data_b_mux[] = {
  1676. RX5_B_MARK, TX5_B_MARK,
  1677. };
  1678. static const unsigned int scif5_clk_b_pins[] = {
  1679. /* SCK */
  1680. RCAR_GP_PIN(1, 3),
  1681. };
  1682. static const unsigned int scif5_clk_b_mux[] = {
  1683. SCK5_B_MARK,
  1684. };
  1685. /* - SCIF Clock ------------------------------------------------------------- */
  1686. static const unsigned int scif_clk_pins[] = {
  1687. /* SCIF_CLK */
  1688. RCAR_GP_PIN(2, 27),
  1689. };
  1690. static const unsigned int scif_clk_mux[] = {
  1691. SCIF_CLK_MARK,
  1692. };
  1693. /* - SSI ---------------------------------------------------------------*/
  1694. static const unsigned int ssi3_data_pins[] = {
  1695. /* SDATA */
  1696. RCAR_GP_PIN(4, 3),
  1697. };
  1698. static const unsigned int ssi3_data_mux[] = {
  1699. SSI_SDATA3_MARK,
  1700. };
  1701. static const unsigned int ssi34_ctrl_pins[] = {
  1702. /* SCK, WS */
  1703. RCAR_GP_PIN(4, 2), RCAR_GP_PIN(4, 4),
  1704. };
  1705. static const unsigned int ssi34_ctrl_mux[] = {
  1706. SSI_SCK34_MARK, SSI_WS34_MARK,
  1707. };
  1708. static const unsigned int ssi4_ctrl_a_pins[] = {
  1709. /* SCK, WS */
  1710. RCAR_GP_PIN(4, 5), RCAR_GP_PIN(4, 7),
  1711. };
  1712. static const unsigned int ssi4_ctrl_a_mux[] = {
  1713. SSI_SCK4_A_MARK, SSI_WS4_A_MARK,
  1714. };
  1715. static const unsigned int ssi4_data_a_pins[] = {
  1716. /* SDATA */
  1717. RCAR_GP_PIN(4, 6),
  1718. };
  1719. static const unsigned int ssi4_data_a_mux[] = {
  1720. SSI_SDATA4_A_MARK,
  1721. };
  1722. static const unsigned int ssi4_ctrl_b_pins[] = {
  1723. /* SCK, WS */
  1724. RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 20),
  1725. };
  1726. static const unsigned int ssi4_ctrl_b_mux[] = {
  1727. SSI_SCK4_B_MARK, SSI_WS4_B_MARK,
  1728. };
  1729. static const unsigned int ssi4_data_b_pins[] = {
  1730. /* SDATA */
  1731. RCAR_GP_PIN(2, 16),
  1732. };
  1733. static const unsigned int ssi4_data_b_mux[] = {
  1734. SSI_SDATA4_B_MARK,
  1735. };
  1736. /* - USB0 ------------------------------------------------------------------- */
  1737. static const unsigned int usb0_pins[] = {
  1738. /* PWEN, OVC */
  1739. RCAR_GP_PIN(0, 0), RCAR_GP_PIN(0, 1),
  1740. };
  1741. static const unsigned int usb0_mux[] = {
  1742. USB0_PWEN_MARK, USB0_OVC_MARK,
  1743. };
  1744. /* - VIN4 ------------------------------------------------------------------- */
  1745. static const unsigned int vin4_data18_pins[] = {
  1746. RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
  1747. RCAR_GP_PIN(2, 5), RCAR_GP_PIN(2, 6),
  1748. RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8),
  1749. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12),
  1750. RCAR_GP_PIN(2, 13), RCAR_GP_PIN(2, 14),
  1751. RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
  1752. RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20),
  1753. RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
  1754. RCAR_GP_PIN(2, 23), RCAR_GP_PIN(2, 24),
  1755. };
  1756. static const unsigned int vin4_data18_mux[] = {
  1757. VI4_DATA2_MARK, VI4_DATA3_MARK,
  1758. VI4_DATA4_MARK, VI4_DATA5_MARK,
  1759. VI4_DATA6_MARK, VI4_DATA7_MARK,
  1760. VI4_DATA10_MARK, VI4_DATA11_MARK,
  1761. VI4_DATA12_MARK, VI4_DATA13_MARK,
  1762. VI4_DATA14_MARK, VI4_DATA15_MARK,
  1763. VI4_DATA18_MARK, VI4_DATA19_MARK,
  1764. VI4_DATA20_MARK, VI4_DATA21_MARK,
  1765. VI4_DATA22_MARK, VI4_DATA23_MARK,
  1766. };
  1767. static const unsigned int vin4_data_pins[] = {
  1768. RCAR_GP_PIN(2, 1), RCAR_GP_PIN(2, 2),
  1769. RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
  1770. RCAR_GP_PIN(2, 5), RCAR_GP_PIN(2, 6),
  1771. RCAR_GP_PIN(2, 7), RCAR_GP_PIN(2, 8),
  1772. RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 10),
  1773. RCAR_GP_PIN(2, 11), RCAR_GP_PIN(2, 12),
  1774. RCAR_GP_PIN(2, 13), RCAR_GP_PIN(2, 14),
  1775. RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
  1776. RCAR_GP_PIN(2, 17), RCAR_GP_PIN(2, 18),
  1777. RCAR_GP_PIN(2, 19), RCAR_GP_PIN(2, 20),
  1778. RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
  1779. RCAR_GP_PIN(2, 23), RCAR_GP_PIN(2, 24),
  1780. };
  1781. static const unsigned int vin4_data_mux[] = {
  1782. VI4_DATA0_MARK, VI4_DATA1_MARK,
  1783. VI4_DATA2_MARK, VI4_DATA3_MARK,
  1784. VI4_DATA4_MARK, VI4_DATA5_MARK,
  1785. VI4_DATA6_MARK, VI4_DATA7_MARK,
  1786. VI4_DATA8_MARK, VI4_DATA9_MARK,
  1787. VI4_DATA10_MARK, VI4_DATA11_MARK,
  1788. VI4_DATA12_MARK, VI4_DATA13_MARK,
  1789. VI4_DATA14_MARK, VI4_DATA15_MARK,
  1790. VI4_DATA16_MARK, VI4_DATA17_MARK,
  1791. VI4_DATA18_MARK, VI4_DATA19_MARK,
  1792. VI4_DATA20_MARK, VI4_DATA21_MARK,
  1793. VI4_DATA22_MARK, VI4_DATA23_MARK,
  1794. };
  1795. static const unsigned int vin4_sync_pins[] = {
  1796. /* HSYNC#, VSYNC# */
  1797. RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 25),
  1798. };
  1799. static const unsigned int vin4_sync_mux[] = {
  1800. VI4_HSYNC_N_MARK, VI4_VSYNC_N_MARK,
  1801. };
  1802. static const unsigned int vin4_field_pins[] = {
  1803. /* FIELD */
  1804. RCAR_GP_PIN(2, 27),
  1805. };
  1806. static const unsigned int vin4_field_mux[] = {
  1807. VI4_FIELD_MARK,
  1808. };
  1809. static const unsigned int vin4_clkenb_pins[] = {
  1810. /* CLKENB */
  1811. RCAR_GP_PIN(2, 28),
  1812. };
  1813. static const unsigned int vin4_clkenb_mux[] = {
  1814. VI4_CLKENB_MARK,
  1815. };
  1816. static const unsigned int vin4_clk_pins[] = {
  1817. /* CLK */
  1818. RCAR_GP_PIN(2, 0),
  1819. };
  1820. static const unsigned int vin4_clk_mux[] = {
  1821. VI4_CLK_MARK,
  1822. };
  1823. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1824. SH_PFC_PIN_GROUP(audio_clk_a),
  1825. SH_PFC_PIN_GROUP(audio_clk_b),
  1826. SH_PFC_PIN_GROUP(audio_clkout),
  1827. SH_PFC_PIN_GROUP(audio_clkout1),
  1828. SH_PFC_PIN_GROUP(avb0_link),
  1829. SH_PFC_PIN_GROUP(avb0_magic),
  1830. SH_PFC_PIN_GROUP(avb0_phy_int),
  1831. SH_PFC_PIN_GROUP_ALIAS(avb0_mdc, avb0_mdio), /* Deprecated */
  1832. SH_PFC_PIN_GROUP(avb0_mdio),
  1833. SH_PFC_PIN_GROUP(avb0_mii),
  1834. SH_PFC_PIN_GROUP(avb0_avtp_pps_a),
  1835. SH_PFC_PIN_GROUP(avb0_avtp_match_a),
  1836. SH_PFC_PIN_GROUP(avb0_avtp_capture_a),
  1837. SH_PFC_PIN_GROUP(avb0_avtp_pps_b),
  1838. SH_PFC_PIN_GROUP(avb0_avtp_match_b),
  1839. SH_PFC_PIN_GROUP(avb0_avtp_capture_b),
  1840. SH_PFC_PIN_GROUP(can0_data_a),
  1841. SH_PFC_PIN_GROUP(can0_data_b),
  1842. SH_PFC_PIN_GROUP(can1_data_a),
  1843. SH_PFC_PIN_GROUP(can1_data_b),
  1844. SH_PFC_PIN_GROUP(can_clk),
  1845. SH_PFC_PIN_GROUP(canfd0_data),
  1846. SH_PFC_PIN_GROUP(canfd1_data),
  1847. SH_PFC_PIN_GROUP(du_rgb666),
  1848. SH_PFC_PIN_GROUP(du_rgb888),
  1849. SH_PFC_PIN_GROUP(du_clk_in_1),
  1850. SH_PFC_PIN_GROUP(du_clk_out_0),
  1851. SH_PFC_PIN_GROUP(du_sync),
  1852. SH_PFC_PIN_GROUP(du_disp_cde),
  1853. SH_PFC_PIN_GROUP(du_cde),
  1854. SH_PFC_PIN_GROUP(du_disp),
  1855. SH_PFC_PIN_GROUP(i2c0),
  1856. SH_PFC_PIN_GROUP(i2c1),
  1857. SH_PFC_PIN_GROUP(i2c2_a),
  1858. SH_PFC_PIN_GROUP(i2c2_b),
  1859. SH_PFC_PIN_GROUP(i2c3_a),
  1860. SH_PFC_PIN_GROUP(i2c3_b),
  1861. SH_PFC_PIN_GROUP(mlb_3pin),
  1862. BUS_DATA_PIN_GROUP(mmc_data, 1),
  1863. BUS_DATA_PIN_GROUP(mmc_data, 4),
  1864. BUS_DATA_PIN_GROUP(mmc_data, 8),
  1865. SH_PFC_PIN_GROUP(mmc_ctrl),
  1866. SH_PFC_PIN_GROUP(msiof0_clk),
  1867. SH_PFC_PIN_GROUP(msiof0_sync),
  1868. SH_PFC_PIN_GROUP(msiof0_ss1),
  1869. SH_PFC_PIN_GROUP(msiof0_ss2),
  1870. SH_PFC_PIN_GROUP(msiof0_txd),
  1871. SH_PFC_PIN_GROUP(msiof0_rxd),
  1872. SH_PFC_PIN_GROUP(msiof1_clk),
  1873. SH_PFC_PIN_GROUP(msiof1_sync),
  1874. SH_PFC_PIN_GROUP(msiof1_ss1),
  1875. SH_PFC_PIN_GROUP(msiof1_ss2),
  1876. SH_PFC_PIN_GROUP(msiof1_txd),
  1877. SH_PFC_PIN_GROUP(msiof1_rxd),
  1878. SH_PFC_PIN_GROUP(msiof2_clk),
  1879. SH_PFC_PIN_GROUP(msiof2_sync_a),
  1880. SH_PFC_PIN_GROUP(msiof2_sync_b),
  1881. SH_PFC_PIN_GROUP(msiof2_ss1),
  1882. SH_PFC_PIN_GROUP(msiof2_ss2),
  1883. SH_PFC_PIN_GROUP(msiof2_txd),
  1884. SH_PFC_PIN_GROUP(msiof2_rxd),
  1885. SH_PFC_PIN_GROUP(msiof3_clk_a),
  1886. SH_PFC_PIN_GROUP(msiof3_sync_a),
  1887. SH_PFC_PIN_GROUP(msiof3_ss1_a),
  1888. SH_PFC_PIN_GROUP(msiof3_ss2_a),
  1889. SH_PFC_PIN_GROUP(msiof3_txd_a),
  1890. SH_PFC_PIN_GROUP(msiof3_rxd_a),
  1891. SH_PFC_PIN_GROUP(msiof3_clk_b),
  1892. SH_PFC_PIN_GROUP(msiof3_sync_b),
  1893. SH_PFC_PIN_GROUP(msiof3_ss1_b),
  1894. SH_PFC_PIN_GROUP(msiof3_ss2_b),
  1895. SH_PFC_PIN_GROUP(msiof3_txd_b),
  1896. SH_PFC_PIN_GROUP(msiof3_rxd_b),
  1897. SH_PFC_PIN_GROUP(pwm0_a),
  1898. SH_PFC_PIN_GROUP(pwm0_b),
  1899. SH_PFC_PIN_GROUP(pwm0_c),
  1900. SH_PFC_PIN_GROUP(pwm1_a),
  1901. SH_PFC_PIN_GROUP(pwm1_b),
  1902. SH_PFC_PIN_GROUP(pwm1_c),
  1903. SH_PFC_PIN_GROUP(pwm2_a),
  1904. SH_PFC_PIN_GROUP(pwm2_b),
  1905. SH_PFC_PIN_GROUP(pwm2_c),
  1906. SH_PFC_PIN_GROUP(pwm3_a),
  1907. SH_PFC_PIN_GROUP(pwm3_b),
  1908. SH_PFC_PIN_GROUP(pwm3_c),
  1909. SH_PFC_PIN_GROUP(qspi0_ctrl),
  1910. SH_PFC_PIN_GROUP_SUBSET(qspi0_data2, rpc_data, 0, 2),
  1911. SH_PFC_PIN_GROUP_SUBSET(qspi0_data4, rpc_data, 0, 4),
  1912. SH_PFC_PIN_GROUP(qspi1_ctrl),
  1913. SH_PFC_PIN_GROUP_SUBSET(qspi1_data2, rpc_data, 4, 2),
  1914. SH_PFC_PIN_GROUP_SUBSET(qspi1_data4, rpc_data, 4, 4),
  1915. BUS_DATA_PIN_GROUP(rpc_clk, 1),
  1916. BUS_DATA_PIN_GROUP(rpc_clk, 2),
  1917. SH_PFC_PIN_GROUP(rpc_ctrl),
  1918. SH_PFC_PIN_GROUP(rpc_data),
  1919. SH_PFC_PIN_GROUP(rpc_reset),
  1920. SH_PFC_PIN_GROUP(rpc_int),
  1921. SH_PFC_PIN_GROUP(scif0_data_a),
  1922. SH_PFC_PIN_GROUP(scif0_clk_a),
  1923. SH_PFC_PIN_GROUP(scif0_data_b),
  1924. SH_PFC_PIN_GROUP(scif0_clk_b),
  1925. SH_PFC_PIN_GROUP(scif0_ctrl),
  1926. SH_PFC_PIN_GROUP(scif1_data_a),
  1927. SH_PFC_PIN_GROUP(scif1_clk_a),
  1928. SH_PFC_PIN_GROUP(scif1_data_b),
  1929. SH_PFC_PIN_GROUP(scif1_clk_b),
  1930. SH_PFC_PIN_GROUP(scif1_ctrl),
  1931. SH_PFC_PIN_GROUP(scif2_data),
  1932. SH_PFC_PIN_GROUP(scif2_clk),
  1933. SH_PFC_PIN_GROUP(scif3_data_a),
  1934. SH_PFC_PIN_GROUP(scif3_clk_a),
  1935. SH_PFC_PIN_GROUP(scif3_data_b),
  1936. SH_PFC_PIN_GROUP(scif3_clk_b),
  1937. SH_PFC_PIN_GROUP(scif4_data_a),
  1938. SH_PFC_PIN_GROUP(scif4_clk_a),
  1939. SH_PFC_PIN_GROUP(scif4_data_b),
  1940. SH_PFC_PIN_GROUP(scif4_clk_b),
  1941. SH_PFC_PIN_GROUP(scif5_data_a),
  1942. SH_PFC_PIN_GROUP(scif5_clk_a),
  1943. SH_PFC_PIN_GROUP(scif5_data_b),
  1944. SH_PFC_PIN_GROUP(scif5_clk_b),
  1945. SH_PFC_PIN_GROUP(scif_clk),
  1946. SH_PFC_PIN_GROUP(ssi3_data),
  1947. SH_PFC_PIN_GROUP(ssi34_ctrl),
  1948. SH_PFC_PIN_GROUP(ssi4_ctrl_a),
  1949. SH_PFC_PIN_GROUP(ssi4_data_a),
  1950. SH_PFC_PIN_GROUP(ssi4_ctrl_b),
  1951. SH_PFC_PIN_GROUP(ssi4_data_b),
  1952. SH_PFC_PIN_GROUP(usb0),
  1953. BUS_DATA_PIN_GROUP(vin4_data, 8),
  1954. BUS_DATA_PIN_GROUP(vin4_data, 10),
  1955. BUS_DATA_PIN_GROUP(vin4_data, 12),
  1956. BUS_DATA_PIN_GROUP(vin4_data, 16),
  1957. SH_PFC_PIN_GROUP(vin4_data18),
  1958. BUS_DATA_PIN_GROUP(vin4_data, 20),
  1959. BUS_DATA_PIN_GROUP(vin4_data, 24),
  1960. SH_PFC_PIN_GROUP(vin4_sync),
  1961. SH_PFC_PIN_GROUP(vin4_field),
  1962. SH_PFC_PIN_GROUP(vin4_clkenb),
  1963. SH_PFC_PIN_GROUP(vin4_clk),
  1964. };
  1965. static const char * const audio_clk_groups[] = {
  1966. "audio_clk_a",
  1967. "audio_clk_b",
  1968. "audio_clkout",
  1969. "audio_clkout1",
  1970. };
  1971. static const char * const avb0_groups[] = {
  1972. "avb0_link",
  1973. "avb0_magic",
  1974. "avb0_phy_int",
  1975. "avb0_mdc", /* Deprecated, please use "avb0_mdio" instead */
  1976. "avb0_mdio",
  1977. "avb0_mii",
  1978. "avb0_avtp_pps_a",
  1979. "avb0_avtp_match_a",
  1980. "avb0_avtp_capture_a",
  1981. "avb0_avtp_pps_b",
  1982. "avb0_avtp_match_b",
  1983. "avb0_avtp_capture_b",
  1984. };
  1985. static const char * const can0_groups[] = {
  1986. "can0_data_a",
  1987. "can0_data_b",
  1988. };
  1989. static const char * const can1_groups[] = {
  1990. "can1_data_a",
  1991. "can1_data_b",
  1992. };
  1993. static const char * const can_clk_groups[] = {
  1994. "can_clk",
  1995. };
  1996. static const char * const canfd0_groups[] = {
  1997. "canfd0_data",
  1998. };
  1999. static const char * const canfd1_groups[] = {
  2000. "canfd1_data",
  2001. };
  2002. static const char * const du_groups[] = {
  2003. "du_rgb666",
  2004. "du_rgb888",
  2005. "du_clk_in_1",
  2006. "du_clk_out_0",
  2007. "du_sync",
  2008. "du_disp_cde",
  2009. "du_cde",
  2010. "du_disp",
  2011. };
  2012. static const char * const i2c0_groups[] = {
  2013. "i2c0",
  2014. };
  2015. static const char * const i2c1_groups[] = {
  2016. "i2c1",
  2017. };
  2018. static const char * const i2c2_groups[] = {
  2019. "i2c2_a",
  2020. "i2c2_b",
  2021. };
  2022. static const char * const i2c3_groups[] = {
  2023. "i2c3_a",
  2024. "i2c3_b",
  2025. };
  2026. static const char * const mlb_3pin_groups[] = {
  2027. "mlb_3pin",
  2028. };
  2029. static const char * const mmc_groups[] = {
  2030. "mmc_data1",
  2031. "mmc_data4",
  2032. "mmc_data8",
  2033. "mmc_ctrl",
  2034. };
  2035. static const char * const msiof0_groups[] = {
  2036. "msiof0_clk",
  2037. "msiof0_sync",
  2038. "msiof0_ss1",
  2039. "msiof0_ss2",
  2040. "msiof0_txd",
  2041. "msiof0_rxd",
  2042. };
  2043. static const char * const msiof1_groups[] = {
  2044. "msiof1_clk",
  2045. "msiof1_sync",
  2046. "msiof1_ss1",
  2047. "msiof1_ss2",
  2048. "msiof1_txd",
  2049. "msiof1_rxd",
  2050. };
  2051. static const char * const msiof2_groups[] = {
  2052. "msiof2_clk",
  2053. "msiof2_sync_a",
  2054. "msiof2_sync_b",
  2055. "msiof2_ss1",
  2056. "msiof2_ss2",
  2057. "msiof2_txd",
  2058. "msiof2_rxd",
  2059. };
  2060. static const char * const msiof3_groups[] = {
  2061. "msiof3_clk_a",
  2062. "msiof3_sync_a",
  2063. "msiof3_ss1_a",
  2064. "msiof3_ss2_a",
  2065. "msiof3_txd_a",
  2066. "msiof3_rxd_a",
  2067. "msiof3_clk_b",
  2068. "msiof3_sync_b",
  2069. "msiof3_ss1_b",
  2070. "msiof3_ss2_b",
  2071. "msiof3_txd_b",
  2072. "msiof3_rxd_b",
  2073. };
  2074. static const char * const pwm0_groups[] = {
  2075. "pwm0_a",
  2076. "pwm0_b",
  2077. "pwm0_c",
  2078. };
  2079. static const char * const pwm1_groups[] = {
  2080. "pwm1_a",
  2081. "pwm1_b",
  2082. "pwm1_c",
  2083. };
  2084. static const char * const pwm2_groups[] = {
  2085. "pwm2_a",
  2086. "pwm2_b",
  2087. "pwm2_c",
  2088. };
  2089. static const char * const pwm3_groups[] = {
  2090. "pwm3_a",
  2091. "pwm3_b",
  2092. "pwm3_c",
  2093. };
  2094. static const char * const qspi0_groups[] = {
  2095. "qspi0_ctrl",
  2096. "qspi0_data2",
  2097. "qspi0_data4",
  2098. };
  2099. static const char * const qspi1_groups[] = {
  2100. "qspi1_ctrl",
  2101. "qspi1_data2",
  2102. "qspi1_data4",
  2103. };
  2104. static const char * const rpc_groups[] = {
  2105. "rpc_clk1",
  2106. "rpc_clk2",
  2107. "rpc_ctrl",
  2108. "rpc_data",
  2109. "rpc_reset",
  2110. "rpc_int",
  2111. };
  2112. static const char * const scif0_groups[] = {
  2113. "scif0_data_a",
  2114. "scif0_clk_a",
  2115. "scif0_data_b",
  2116. "scif0_clk_b",
  2117. "scif0_ctrl",
  2118. };
  2119. static const char * const scif1_groups[] = {
  2120. "scif1_data_a",
  2121. "scif1_clk_a",
  2122. "scif1_data_b",
  2123. "scif1_clk_b",
  2124. "scif1_ctrl",
  2125. };
  2126. static const char * const scif2_groups[] = {
  2127. "scif2_data",
  2128. "scif2_clk",
  2129. };
  2130. static const char * const scif3_groups[] = {
  2131. "scif3_data_a",
  2132. "scif3_clk_a",
  2133. "scif3_data_b",
  2134. "scif3_clk_b",
  2135. };
  2136. static const char * const scif4_groups[] = {
  2137. "scif4_data_a",
  2138. "scif4_clk_a",
  2139. "scif4_data_b",
  2140. "scif4_clk_b",
  2141. };
  2142. static const char * const scif5_groups[] = {
  2143. "scif5_data_a",
  2144. "scif5_clk_a",
  2145. "scif5_data_b",
  2146. "scif5_clk_b",
  2147. };
  2148. static const char * const scif_clk_groups[] = {
  2149. "scif_clk",
  2150. };
  2151. static const char * const ssi_groups[] = {
  2152. "ssi3_data",
  2153. "ssi34_ctrl",
  2154. "ssi4_ctrl_a",
  2155. "ssi4_data_a",
  2156. "ssi4_ctrl_b",
  2157. "ssi4_data_b",
  2158. };
  2159. static const char * const usb0_groups[] = {
  2160. "usb0",
  2161. };
  2162. static const char * const vin4_groups[] = {
  2163. "vin4_data8",
  2164. "vin4_data10",
  2165. "vin4_data12",
  2166. "vin4_data16",
  2167. "vin4_data18",
  2168. "vin4_data20",
  2169. "vin4_data24",
  2170. "vin4_sync",
  2171. "vin4_field",
  2172. "vin4_clkenb",
  2173. "vin4_clk",
  2174. };
  2175. static const struct sh_pfc_function pinmux_functions[] = {
  2176. SH_PFC_FUNCTION(audio_clk),
  2177. SH_PFC_FUNCTION(avb0),
  2178. SH_PFC_FUNCTION(can0),
  2179. SH_PFC_FUNCTION(can1),
  2180. SH_PFC_FUNCTION(can_clk),
  2181. SH_PFC_FUNCTION(canfd0),
  2182. SH_PFC_FUNCTION(canfd1),
  2183. SH_PFC_FUNCTION(du),
  2184. SH_PFC_FUNCTION(i2c0),
  2185. SH_PFC_FUNCTION(i2c1),
  2186. SH_PFC_FUNCTION(i2c2),
  2187. SH_PFC_FUNCTION(i2c3),
  2188. SH_PFC_FUNCTION(mlb_3pin),
  2189. SH_PFC_FUNCTION(mmc),
  2190. SH_PFC_FUNCTION(msiof0),
  2191. SH_PFC_FUNCTION(msiof1),
  2192. SH_PFC_FUNCTION(msiof2),
  2193. SH_PFC_FUNCTION(msiof3),
  2194. SH_PFC_FUNCTION(pwm0),
  2195. SH_PFC_FUNCTION(pwm1),
  2196. SH_PFC_FUNCTION(pwm2),
  2197. SH_PFC_FUNCTION(pwm3),
  2198. SH_PFC_FUNCTION(qspi0),
  2199. SH_PFC_FUNCTION(qspi1),
  2200. SH_PFC_FUNCTION(rpc),
  2201. SH_PFC_FUNCTION(scif0),
  2202. SH_PFC_FUNCTION(scif1),
  2203. SH_PFC_FUNCTION(scif2),
  2204. SH_PFC_FUNCTION(scif3),
  2205. SH_PFC_FUNCTION(scif4),
  2206. SH_PFC_FUNCTION(scif5),
  2207. SH_PFC_FUNCTION(scif_clk),
  2208. SH_PFC_FUNCTION(ssi),
  2209. SH_PFC_FUNCTION(usb0),
  2210. SH_PFC_FUNCTION(vin4),
  2211. };
  2212. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  2213. #define F_(x, y) FN_##y
  2214. #define FM(x) FN_##x
  2215. { PINMUX_CFG_REG_VAR("GPSR0", 0xe6060100, 32,
  2216. GROUP(-23, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  2217. GROUP(
  2218. /* GP0_31_9 RESERVED */
  2219. GP_0_8_FN, GPSR0_8,
  2220. GP_0_7_FN, GPSR0_7,
  2221. GP_0_6_FN, GPSR0_6,
  2222. GP_0_5_FN, GPSR0_5,
  2223. GP_0_4_FN, GPSR0_4,
  2224. GP_0_3_FN, GPSR0_3,
  2225. GP_0_2_FN, GPSR0_2,
  2226. GP_0_1_FN, GPSR0_1,
  2227. GP_0_0_FN, GPSR0_0, ))
  2228. },
  2229. { PINMUX_CFG_REG("GPSR1", 0xe6060104, 32, 1, GROUP(
  2230. GP_1_31_FN, GPSR1_31,
  2231. GP_1_30_FN, GPSR1_30,
  2232. GP_1_29_FN, GPSR1_29,
  2233. GP_1_28_FN, GPSR1_28,
  2234. GP_1_27_FN, GPSR1_27,
  2235. GP_1_26_FN, GPSR1_26,
  2236. GP_1_25_FN, GPSR1_25,
  2237. GP_1_24_FN, GPSR1_24,
  2238. GP_1_23_FN, GPSR1_23,
  2239. GP_1_22_FN, GPSR1_22,
  2240. GP_1_21_FN, GPSR1_21,
  2241. GP_1_20_FN, GPSR1_20,
  2242. GP_1_19_FN, GPSR1_19,
  2243. GP_1_18_FN, GPSR1_18,
  2244. GP_1_17_FN, GPSR1_17,
  2245. GP_1_16_FN, GPSR1_16,
  2246. GP_1_15_FN, GPSR1_15,
  2247. GP_1_14_FN, GPSR1_14,
  2248. GP_1_13_FN, GPSR1_13,
  2249. GP_1_12_FN, GPSR1_12,
  2250. GP_1_11_FN, GPSR1_11,
  2251. GP_1_10_FN, GPSR1_10,
  2252. GP_1_9_FN, GPSR1_9,
  2253. GP_1_8_FN, GPSR1_8,
  2254. GP_1_7_FN, GPSR1_7,
  2255. GP_1_6_FN, GPSR1_6,
  2256. GP_1_5_FN, GPSR1_5,
  2257. GP_1_4_FN, GPSR1_4,
  2258. GP_1_3_FN, GPSR1_3,
  2259. GP_1_2_FN, GPSR1_2,
  2260. GP_1_1_FN, GPSR1_1,
  2261. GP_1_0_FN, GPSR1_0, ))
  2262. },
  2263. { PINMUX_CFG_REG("GPSR2", 0xe6060108, 32, 1, GROUP(
  2264. GP_2_31_FN, GPSR2_31,
  2265. GP_2_30_FN, GPSR2_30,
  2266. GP_2_29_FN, GPSR2_29,
  2267. GP_2_28_FN, GPSR2_28,
  2268. GP_2_27_FN, GPSR2_27,
  2269. GP_2_26_FN, GPSR2_26,
  2270. GP_2_25_FN, GPSR2_25,
  2271. GP_2_24_FN, GPSR2_24,
  2272. GP_2_23_FN, GPSR2_23,
  2273. GP_2_22_FN, GPSR2_22,
  2274. GP_2_21_FN, GPSR2_21,
  2275. GP_2_20_FN, GPSR2_20,
  2276. GP_2_19_FN, GPSR2_19,
  2277. GP_2_18_FN, GPSR2_18,
  2278. GP_2_17_FN, GPSR2_17,
  2279. GP_2_16_FN, GPSR2_16,
  2280. GP_2_15_FN, GPSR2_15,
  2281. GP_2_14_FN, GPSR2_14,
  2282. GP_2_13_FN, GPSR2_13,
  2283. GP_2_12_FN, GPSR2_12,
  2284. GP_2_11_FN, GPSR2_11,
  2285. GP_2_10_FN, GPSR2_10,
  2286. GP_2_9_FN, GPSR2_9,
  2287. GP_2_8_FN, GPSR2_8,
  2288. GP_2_7_FN, GPSR2_7,
  2289. GP_2_6_FN, GPSR2_6,
  2290. GP_2_5_FN, GPSR2_5,
  2291. GP_2_4_FN, GPSR2_4,
  2292. GP_2_3_FN, GPSR2_3,
  2293. GP_2_2_FN, GPSR2_2,
  2294. GP_2_1_FN, GPSR2_1,
  2295. GP_2_0_FN, GPSR2_0, ))
  2296. },
  2297. { PINMUX_CFG_REG_VAR("GPSR3", 0xe606010c, 32,
  2298. GROUP(-22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  2299. GROUP(
  2300. /* GP3_31_10 RESERVED */
  2301. GP_3_9_FN, GPSR3_9,
  2302. GP_3_8_FN, GPSR3_8,
  2303. GP_3_7_FN, GPSR3_7,
  2304. GP_3_6_FN, GPSR3_6,
  2305. GP_3_5_FN, GPSR3_5,
  2306. GP_3_4_FN, GPSR3_4,
  2307. GP_3_3_FN, GPSR3_3,
  2308. GP_3_2_FN, GPSR3_2,
  2309. GP_3_1_FN, GPSR3_1,
  2310. GP_3_0_FN, GPSR3_0, ))
  2311. },
  2312. { PINMUX_CFG_REG("GPSR4", 0xe6060110, 32, 1, GROUP(
  2313. GP_4_31_FN, GPSR4_31,
  2314. GP_4_30_FN, GPSR4_30,
  2315. GP_4_29_FN, GPSR4_29,
  2316. GP_4_28_FN, GPSR4_28,
  2317. GP_4_27_FN, GPSR4_27,
  2318. GP_4_26_FN, GPSR4_26,
  2319. GP_4_25_FN, GPSR4_25,
  2320. GP_4_24_FN, GPSR4_24,
  2321. GP_4_23_FN, GPSR4_23,
  2322. GP_4_22_FN, GPSR4_22,
  2323. GP_4_21_FN, GPSR4_21,
  2324. GP_4_20_FN, GPSR4_20,
  2325. GP_4_19_FN, GPSR4_19,
  2326. GP_4_18_FN, GPSR4_18,
  2327. GP_4_17_FN, GPSR4_17,
  2328. GP_4_16_FN, GPSR4_16,
  2329. GP_4_15_FN, GPSR4_15,
  2330. GP_4_14_FN, GPSR4_14,
  2331. GP_4_13_FN, GPSR4_13,
  2332. GP_4_12_FN, GPSR4_12,
  2333. GP_4_11_FN, GPSR4_11,
  2334. GP_4_10_FN, GPSR4_10,
  2335. GP_4_9_FN, GPSR4_9,
  2336. GP_4_8_FN, GPSR4_8,
  2337. GP_4_7_FN, GPSR4_7,
  2338. GP_4_6_FN, GPSR4_6,
  2339. GP_4_5_FN, GPSR4_5,
  2340. GP_4_4_FN, GPSR4_4,
  2341. GP_4_3_FN, GPSR4_3,
  2342. GP_4_2_FN, GPSR4_2,
  2343. GP_4_1_FN, GPSR4_1,
  2344. GP_4_0_FN, GPSR4_0, ))
  2345. },
  2346. { PINMUX_CFG_REG_VAR("GPSR5", 0xe6060114, 32,
  2347. GROUP(-11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2348. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  2349. GROUP(
  2350. /* GP5_31_21 RESERVED */
  2351. GP_5_20_FN, GPSR5_20,
  2352. GP_5_19_FN, GPSR5_19,
  2353. GP_5_18_FN, GPSR5_18,
  2354. GP_5_17_FN, GPSR5_17,
  2355. GP_5_16_FN, GPSR5_16,
  2356. GP_5_15_FN, GPSR5_15,
  2357. GP_5_14_FN, GPSR5_14,
  2358. GP_5_13_FN, GPSR5_13,
  2359. GP_5_12_FN, GPSR5_12,
  2360. GP_5_11_FN, GPSR5_11,
  2361. GP_5_10_FN, GPSR5_10,
  2362. GP_5_9_FN, GPSR5_9,
  2363. GP_5_8_FN, GPSR5_8,
  2364. GP_5_7_FN, GPSR5_7,
  2365. GP_5_6_FN, GPSR5_6,
  2366. GP_5_5_FN, GPSR5_5,
  2367. GP_5_4_FN, GPSR5_4,
  2368. GP_5_3_FN, GPSR5_3,
  2369. GP_5_2_FN, GPSR5_2,
  2370. GP_5_1_FN, GPSR5_1,
  2371. GP_5_0_FN, GPSR5_0, ))
  2372. },
  2373. { PINMUX_CFG_REG_VAR("GPSR6", 0xe6060118, 32,
  2374. GROUP(-18, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  2375. 1, 1, 1),
  2376. GROUP(
  2377. /* GP6_31_14 RESERVED */
  2378. GP_6_13_FN, GPSR6_13,
  2379. GP_6_12_FN, GPSR6_12,
  2380. GP_6_11_FN, GPSR6_11,
  2381. GP_6_10_FN, GPSR6_10,
  2382. GP_6_9_FN, GPSR6_9,
  2383. GP_6_8_FN, GPSR6_8,
  2384. GP_6_7_FN, GPSR6_7,
  2385. GP_6_6_FN, GPSR6_6,
  2386. GP_6_5_FN, GPSR6_5,
  2387. GP_6_4_FN, GPSR6_4,
  2388. GP_6_3_FN, GPSR6_3,
  2389. GP_6_2_FN, GPSR6_2,
  2390. GP_6_1_FN, GPSR6_1,
  2391. GP_6_0_FN, GPSR6_0, ))
  2392. },
  2393. #undef F_
  2394. #undef FM
  2395. #define F_(x, y) x,
  2396. #define FM(x) FN_##x,
  2397. { PINMUX_CFG_REG("IPSR0", 0xe6060200, 32, 4, GROUP(
  2398. IP0_31_28
  2399. IP0_27_24
  2400. IP0_23_20
  2401. IP0_19_16
  2402. IP0_15_12
  2403. IP0_11_8
  2404. IP0_7_4
  2405. IP0_3_0 ))
  2406. },
  2407. { PINMUX_CFG_REG("IPSR1", 0xe6060204, 32, 4, GROUP(
  2408. IP1_31_28
  2409. IP1_27_24
  2410. IP1_23_20
  2411. IP1_19_16
  2412. IP1_15_12
  2413. IP1_11_8
  2414. IP1_7_4
  2415. IP1_3_0 ))
  2416. },
  2417. { PINMUX_CFG_REG("IPSR2", 0xe6060208, 32, 4, GROUP(
  2418. IP2_31_28
  2419. IP2_27_24
  2420. IP2_23_20
  2421. IP2_19_16
  2422. IP2_15_12
  2423. IP2_11_8
  2424. IP2_7_4
  2425. IP2_3_0 ))
  2426. },
  2427. { PINMUX_CFG_REG("IPSR3", 0xe606020c, 32, 4, GROUP(
  2428. IP3_31_28
  2429. IP3_27_24
  2430. IP3_23_20
  2431. IP3_19_16
  2432. IP3_15_12
  2433. IP3_11_8
  2434. IP3_7_4
  2435. IP3_3_0 ))
  2436. },
  2437. { PINMUX_CFG_REG("IPSR4", 0xe6060210, 32, 4, GROUP(
  2438. IP4_31_28
  2439. IP4_27_24
  2440. IP4_23_20
  2441. IP4_19_16
  2442. IP4_15_12
  2443. IP4_11_8
  2444. IP4_7_4
  2445. IP4_3_0 ))
  2446. },
  2447. { PINMUX_CFG_REG("IPSR5", 0xe6060214, 32, 4, GROUP(
  2448. IP5_31_28
  2449. IP5_27_24
  2450. IP5_23_20
  2451. IP5_19_16
  2452. IP5_15_12
  2453. IP5_11_8
  2454. IP5_7_4
  2455. IP5_3_0 ))
  2456. },
  2457. { PINMUX_CFG_REG("IPSR6", 0xe6060218, 32, 4, GROUP(
  2458. IP6_31_28
  2459. IP6_27_24
  2460. IP6_23_20
  2461. IP6_19_16
  2462. IP6_15_12
  2463. IP6_11_8
  2464. IP6_7_4
  2465. IP6_3_0 ))
  2466. },
  2467. { PINMUX_CFG_REG("IPSR7", 0xe606021c, 32, 4, GROUP(
  2468. IP7_31_28
  2469. IP7_27_24
  2470. IP7_23_20
  2471. IP7_19_16
  2472. IP7_15_12
  2473. IP7_11_8
  2474. IP7_7_4
  2475. IP7_3_0 ))
  2476. },
  2477. { PINMUX_CFG_REG("IPSR8", 0xe6060220, 32, 4, GROUP(
  2478. IP8_31_28
  2479. IP8_27_24
  2480. IP8_23_20
  2481. IP8_19_16
  2482. IP8_15_12
  2483. IP8_11_8
  2484. IP8_7_4
  2485. IP8_3_0 ))
  2486. },
  2487. { PINMUX_CFG_REG("IPSR9", 0xe6060224, 32, 4, GROUP(
  2488. IP9_31_28
  2489. IP9_27_24
  2490. IP9_23_20
  2491. IP9_19_16
  2492. IP9_15_12
  2493. IP9_11_8
  2494. IP9_7_4
  2495. IP9_3_0 ))
  2496. },
  2497. { PINMUX_CFG_REG("IPSR10", 0xe6060228, 32, 4, GROUP(
  2498. IP10_31_28
  2499. IP10_27_24
  2500. IP10_23_20
  2501. IP10_19_16
  2502. IP10_15_12
  2503. IP10_11_8
  2504. IP10_7_4
  2505. IP10_3_0 ))
  2506. },
  2507. { PINMUX_CFG_REG("IPSR11", 0xe606022c, 32, 4, GROUP(
  2508. IP11_31_28
  2509. IP11_27_24
  2510. IP11_23_20
  2511. IP11_19_16
  2512. IP11_15_12
  2513. IP11_11_8
  2514. IP11_7_4
  2515. IP11_3_0 ))
  2516. },
  2517. { PINMUX_CFG_REG("IPSR12", 0xe6060230, 32, 4, GROUP(
  2518. IP12_31_28
  2519. IP12_27_24
  2520. IP12_23_20
  2521. IP12_19_16
  2522. IP12_15_12
  2523. IP12_11_8
  2524. IP12_7_4
  2525. IP12_3_0 ))
  2526. },
  2527. { PINMUX_CFG_REG_VAR("IPSR13", 0xe6060234, 32,
  2528. GROUP(-24, 4, 4),
  2529. GROUP(
  2530. /* IP13_31_8 RESERVED */
  2531. IP13_7_4
  2532. IP13_3_0 ))
  2533. },
  2534. #undef F_
  2535. #undef FM
  2536. #define F_(x, y) x,
  2537. #define FM(x) FN_##x,
  2538. { PINMUX_CFG_REG_VAR("MOD_SEL0", 0xe6060500, 32,
  2539. GROUP(-1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, -1,
  2540. 1, 1, 1, 1, 1, 1, -4, 1, 1, 1, 1, 1, 1),
  2541. GROUP(
  2542. /* RESERVED 31 */
  2543. MOD_SEL0_30
  2544. MOD_SEL0_29
  2545. MOD_SEL0_28
  2546. MOD_SEL0_27
  2547. MOD_SEL0_26
  2548. MOD_SEL0_25
  2549. MOD_SEL0_24_23
  2550. MOD_SEL0_22_21
  2551. MOD_SEL0_20_19
  2552. MOD_SEL0_18_17
  2553. /* RESERVED 16 */
  2554. MOD_SEL0_15
  2555. MOD_SEL0_14
  2556. MOD_SEL0_13
  2557. MOD_SEL0_12
  2558. MOD_SEL0_11
  2559. MOD_SEL0_10
  2560. /* RESERVED 9, 8, 7, 6 */
  2561. MOD_SEL0_5
  2562. MOD_SEL0_4
  2563. MOD_SEL0_3
  2564. MOD_SEL0_2
  2565. MOD_SEL0_1
  2566. MOD_SEL0_0 ))
  2567. },
  2568. { PINMUX_CFG_REG_VAR("MOD_SEL1", 0xe6060504, 32,
  2569. GROUP(1, 1, 1, 1, 1, 1, -26),
  2570. GROUP(
  2571. MOD_SEL1_31
  2572. MOD_SEL1_30
  2573. MOD_SEL1_29
  2574. MOD_SEL1_28
  2575. MOD_SEL1_27
  2576. MOD_SEL1_26
  2577. /* RESERVED 25-0 */ ))
  2578. },
  2579. { },
  2580. };
  2581. static int r8a77995_pin_to_pocctrl(unsigned int pin, u32 *pocctrl)
  2582. {
  2583. int bit = -EINVAL;
  2584. *pocctrl = 0xe6060380;
  2585. if (pin >= RCAR_GP_PIN(3, 0) && pin <= RCAR_GP_PIN(3, 9))
  2586. bit = 29 - (pin - RCAR_GP_PIN(3, 0));
  2587. return bit;
  2588. }
  2589. static const struct pinmux_bias_reg pinmux_bias_regs[] = {
  2590. { PINMUX_BIAS_REG("PUEN0", 0xe6060400, "PUD0", 0xe6060440) {
  2591. [ 0] = RCAR_GP_PIN(1, 9), /* DU_DG1 */
  2592. [ 1] = RCAR_GP_PIN(1, 8), /* DU_DG0 */
  2593. [ 2] = RCAR_GP_PIN(1, 7), /* DU_DB7 */
  2594. [ 3] = RCAR_GP_PIN(1, 6), /* DU_DB6 */
  2595. [ 4] = RCAR_GP_PIN(1, 5), /* DU_DB5 */
  2596. [ 5] = RCAR_GP_PIN(1, 4), /* DU_DB4 */
  2597. [ 6] = RCAR_GP_PIN(1, 3), /* DU_DB3 */
  2598. [ 7] = RCAR_GP_PIN(1, 2), /* DU_DB2 */
  2599. [ 8] = RCAR_GP_PIN(1, 1), /* DU_DB1 */
  2600. [ 9] = RCAR_GP_PIN(1, 0), /* DU_DB0 */
  2601. [10] = PIN_MLB_REF, /* MLB_REF */
  2602. [11] = RCAR_GP_PIN(0, 8), /* MLB_SIG */
  2603. [12] = RCAR_GP_PIN(0, 7), /* MLB_DAT */
  2604. [13] = RCAR_GP_PIN(0, 6), /* MLB_CLK */
  2605. [14] = RCAR_GP_PIN(0, 5), /* MSIOF2_RXD */
  2606. [15] = RCAR_GP_PIN(0, 4), /* MSIOF2_TXD */
  2607. [16] = RCAR_GP_PIN(0, 3), /* MSIOF2_SCK */
  2608. [17] = RCAR_GP_PIN(0, 2), /* IRQ0_A */
  2609. [18] = RCAR_GP_PIN(0, 1), /* USB0_OVC */
  2610. [19] = RCAR_GP_PIN(0, 0), /* USB0_PWEN */
  2611. [20] = PIN_PRESETOUT_N, /* PRESETOUT# */
  2612. [21] = PIN_DU_DOTCLKIN0, /* DU_DOTCLKIN0 */
  2613. [22] = PIN_FSCLKST_N, /* FSCLKST# */
  2614. [23] = SH_PFC_PIN_NONE,
  2615. [24] = SH_PFC_PIN_NONE,
  2616. [25] = SH_PFC_PIN_NONE,
  2617. [26] = SH_PFC_PIN_NONE,
  2618. [27] = SH_PFC_PIN_NONE,
  2619. [28] = PIN_TDI, /* TDI */
  2620. [29] = PIN_TMS, /* TMS */
  2621. [30] = PIN_TCK, /* TCK */
  2622. [31] = PIN_TRST_N, /* TRST# */
  2623. } },
  2624. { PINMUX_BIAS_REG("PUEN1", 0xe6060404, "PUD1", 0xe6060444) {
  2625. [ 0] = RCAR_GP_PIN(2, 9), /* VI4_DATA8 */
  2626. [ 1] = RCAR_GP_PIN(2, 8), /* VI4_DATA7 */
  2627. [ 2] = RCAR_GP_PIN(2, 7), /* VI4_DATA6 */
  2628. [ 3] = RCAR_GP_PIN(2, 6), /* VI4_DATA5 */
  2629. [ 4] = RCAR_GP_PIN(2, 5), /* VI4_DATA4 */
  2630. [ 5] = RCAR_GP_PIN(2, 4), /* VI4_DATA3 */
  2631. [ 6] = RCAR_GP_PIN(2, 3), /* VI4_DATA2 */
  2632. [ 7] = RCAR_GP_PIN(2, 2), /* VI4_DATA1 */
  2633. [ 8] = RCAR_GP_PIN(2, 1), /* VI4_DATA0 */
  2634. [ 9] = RCAR_GP_PIN(2, 0), /* VI4_CLK */
  2635. [10] = RCAR_GP_PIN(1, 31), /* QPOLB */
  2636. [11] = RCAR_GP_PIN(1, 30), /* QPOLA */
  2637. [12] = RCAR_GP_PIN(1, 29), /* DU_CDE */
  2638. [13] = RCAR_GP_PIN(1, 28), /* DU_DISP/CDE */
  2639. [14] = RCAR_GP_PIN(1, 27), /* DU_DISP */
  2640. [15] = RCAR_GP_PIN(1, 26), /* DU_VSYNC */
  2641. [16] = RCAR_GP_PIN(1, 25), /* DU_HSYNC */
  2642. [17] = RCAR_GP_PIN(1, 24), /* DU_DOTCLKOUT0 */
  2643. [18] = RCAR_GP_PIN(1, 23), /* DU_DR7 */
  2644. [19] = RCAR_GP_PIN(1, 22), /* DU_DR6 */
  2645. [20] = RCAR_GP_PIN(1, 21), /* DU_DR5 */
  2646. [21] = RCAR_GP_PIN(1, 20), /* DU_DR4 */
  2647. [22] = RCAR_GP_PIN(1, 19), /* DU_DR3 */
  2648. [23] = RCAR_GP_PIN(1, 18), /* DU_DR2 */
  2649. [24] = RCAR_GP_PIN(1, 17), /* DU_DR1 */
  2650. [25] = RCAR_GP_PIN(1, 16), /* DU_DR0 */
  2651. [26] = RCAR_GP_PIN(1, 15), /* DU_DG7 */
  2652. [27] = RCAR_GP_PIN(1, 14), /* DU_DG6 */
  2653. [28] = RCAR_GP_PIN(1, 13), /* DU_DG5 */
  2654. [29] = RCAR_GP_PIN(1, 12), /* DU_DG4 */
  2655. [30] = RCAR_GP_PIN(1, 11), /* DU_DG3 */
  2656. [31] = RCAR_GP_PIN(1, 10), /* DU_DG2 */
  2657. } },
  2658. { PINMUX_BIAS_REG("PUEN2", 0xe6060408, "PUD2", 0xe6060448) {
  2659. [ 0] = RCAR_GP_PIN(3, 8), /* NFDATA6 */
  2660. [ 1] = RCAR_GP_PIN(3, 7), /* NFDATA5 */
  2661. [ 2] = RCAR_GP_PIN(3, 6), /* NFDATA4 */
  2662. [ 3] = RCAR_GP_PIN(3, 5), /* NFDATA3 */
  2663. [ 4] = RCAR_GP_PIN(3, 4), /* NFDATA2 */
  2664. [ 5] = RCAR_GP_PIN(3, 3), /* NFDATA1 */
  2665. [ 6] = RCAR_GP_PIN(3, 2), /* NFDATA0 */
  2666. [ 7] = RCAR_GP_PIN(3, 1), /* NFWE# (PUEN) / NFRE# (PUD) */
  2667. [ 8] = RCAR_GP_PIN(3, 0), /* NFRE# (PUEN) / NFWE# (PUD) */
  2668. [ 9] = RCAR_GP_PIN(4, 0), /* NFRB# */
  2669. [10] = RCAR_GP_PIN(2, 31), /* NFCE# */
  2670. [11] = RCAR_GP_PIN(2, 30), /* NFCLE */
  2671. [12] = RCAR_GP_PIN(2, 29), /* NFALE */
  2672. [13] = RCAR_GP_PIN(2, 28), /* VI4_CLKENB */
  2673. [14] = RCAR_GP_PIN(2, 27), /* VI4_FIELD */
  2674. [15] = RCAR_GP_PIN(2, 26), /* VI4_HSYNC# */
  2675. [16] = RCAR_GP_PIN(2, 25), /* VI4_VSYNC# */
  2676. [17] = RCAR_GP_PIN(2, 24), /* VI4_DATA23 */
  2677. [18] = RCAR_GP_PIN(2, 23), /* VI4_DATA22 */
  2678. [19] = RCAR_GP_PIN(2, 22), /* VI4_DATA21 */
  2679. [20] = RCAR_GP_PIN(2, 21), /* VI4_DATA20 */
  2680. [21] = RCAR_GP_PIN(2, 20), /* VI4_DATA19 */
  2681. [22] = RCAR_GP_PIN(2, 19), /* VI4_DATA18 */
  2682. [23] = RCAR_GP_PIN(2, 18), /* VI4_DATA17 */
  2683. [24] = RCAR_GP_PIN(2, 17), /* VI4_DATA16 */
  2684. [25] = RCAR_GP_PIN(2, 16), /* VI4_DATA15 */
  2685. [26] = RCAR_GP_PIN(2, 15), /* VI4_DATA14 */
  2686. [27] = RCAR_GP_PIN(2, 14), /* VI4_DATA13 */
  2687. [28] = RCAR_GP_PIN(2, 13), /* VI4_DATA12 */
  2688. [29] = RCAR_GP_PIN(2, 12), /* VI4_DATA11 */
  2689. [30] = RCAR_GP_PIN(2, 11), /* VI4_DATA10 */
  2690. [31] = RCAR_GP_PIN(2, 10), /* VI4_DATA9 */
  2691. } },
  2692. { PINMUX_BIAS_REG("PUEN3", 0xe606040c, "PUD3", 0xe606044c) {
  2693. [ 0] = RCAR_GP_PIN(4, 31), /* CAN0_RX_A */
  2694. [ 1] = RCAR_GP_PIN(5, 2), /* CAN_CLK */
  2695. [ 2] = RCAR_GP_PIN(5, 1), /* TPU0TO1_A */
  2696. [ 3] = RCAR_GP_PIN(5, 0), /* TPU0TO0_A */
  2697. [ 4] = RCAR_GP_PIN(4, 27), /* TX2 */
  2698. [ 5] = RCAR_GP_PIN(4, 26), /* RX2 */
  2699. [ 6] = RCAR_GP_PIN(4, 25), /* SCK2 */
  2700. [ 7] = RCAR_GP_PIN(4, 24), /* TX1_A */
  2701. [ 8] = RCAR_GP_PIN(4, 23), /* RX1_A */
  2702. [ 9] = RCAR_GP_PIN(4, 22), /* SCK1_A */
  2703. [10] = RCAR_GP_PIN(4, 21), /* TX0_A */
  2704. [11] = RCAR_GP_PIN(4, 20), /* RX0_A */
  2705. [12] = RCAR_GP_PIN(4, 19), /* SCK0_A */
  2706. [13] = RCAR_GP_PIN(4, 18), /* MSIOF1_RXD */
  2707. [14] = RCAR_GP_PIN(4, 17), /* MSIOF1_TXD */
  2708. [15] = RCAR_GP_PIN(4, 16), /* MSIOF1_SCK */
  2709. [16] = RCAR_GP_PIN(4, 15), /* MSIOF0_RXD */
  2710. [17] = RCAR_GP_PIN(4, 14), /* MSIOF0_TXD */
  2711. [18] = RCAR_GP_PIN(4, 13), /* MSIOF0_SYNC */
  2712. [19] = RCAR_GP_PIN(4, 12), /* MSIOF0_SCK */
  2713. [20] = RCAR_GP_PIN(4, 11), /* SDA1 */
  2714. [21] = RCAR_GP_PIN(4, 10), /* SCL1 */
  2715. [22] = RCAR_GP_PIN(4, 9), /* SDA0 */
  2716. [23] = RCAR_GP_PIN(4, 8), /* SCL0 */
  2717. [24] = RCAR_GP_PIN(4, 7), /* SSI_WS4_A */
  2718. [25] = RCAR_GP_PIN(4, 6), /* SSI_SDATA4_A */
  2719. [26] = RCAR_GP_PIN(4, 5), /* SSI_SCK4_A */
  2720. [27] = RCAR_GP_PIN(4, 4), /* SSI_WS34 */
  2721. [28] = RCAR_GP_PIN(4, 3), /* SSI_SDATA3 */
  2722. [29] = RCAR_GP_PIN(4, 2), /* SSI_SCK34 */
  2723. [30] = RCAR_GP_PIN(4, 1), /* AUDIO_CLKA */
  2724. [31] = RCAR_GP_PIN(3, 9), /* NFDATA7 */
  2725. } },
  2726. { PINMUX_BIAS_REG("PUEN4", 0xe6060410, "PUD4", 0xe6060450) {
  2727. [ 0] = RCAR_GP_PIN(6, 10), /* QSPI1_IO3 */
  2728. [ 1] = RCAR_GP_PIN(6, 9), /* QSPI1_IO2 */
  2729. [ 2] = RCAR_GP_PIN(6, 8), /* QSPI1_MISO_IO1 */
  2730. [ 3] = RCAR_GP_PIN(6, 7), /* QSPI1_MOSI_IO0 */
  2731. [ 4] = RCAR_GP_PIN(6, 6), /* QSPI1_SPCLK */
  2732. [ 5] = RCAR_GP_PIN(6, 5), /* QSPI0_SSL */
  2733. [ 6] = RCAR_GP_PIN(6, 4), /* QSPI0_IO3 */
  2734. [ 7] = RCAR_GP_PIN(6, 3), /* QSPI0_IO2 */
  2735. [ 8] = RCAR_GP_PIN(6, 2), /* QSPI0_MISO_IO1 */
  2736. [ 9] = RCAR_GP_PIN(6, 1), /* QSPI0_MOSI_IO0 */
  2737. [10] = RCAR_GP_PIN(6, 0), /* QSPI0_SPCLK */
  2738. [11] = RCAR_GP_PIN(5, 20), /* AVB0_LINK */
  2739. [12] = RCAR_GP_PIN(5, 19), /* AVB0_PHY_INT */
  2740. [13] = RCAR_GP_PIN(5, 18), /* AVB0_MAGIC */
  2741. [14] = RCAR_GP_PIN(5, 17), /* AVB0_MDC */
  2742. [15] = RCAR_GP_PIN(5, 16), /* AVB0_MDIO */
  2743. [16] = RCAR_GP_PIN(5, 15), /* AVB0_TXCREFCLK */
  2744. [17] = RCAR_GP_PIN(5, 14), /* AVB0_TD3 */
  2745. [18] = RCAR_GP_PIN(5, 13), /* AVB0_TD2 */
  2746. [19] = RCAR_GP_PIN(5, 12), /* AVB0_TD1 */
  2747. [20] = RCAR_GP_PIN(5, 11), /* AVB0_TD0 */
  2748. [21] = RCAR_GP_PIN(5, 10), /* AVB0_TXC */
  2749. [22] = RCAR_GP_PIN(5, 9), /* AVB0_TX_CTL */
  2750. [23] = RCAR_GP_PIN(5, 8), /* AVB0_RD3 */
  2751. [24] = RCAR_GP_PIN(5, 7), /* AVB0_RD2 */
  2752. [25] = RCAR_GP_PIN(5, 6), /* AVB0_RD1 */
  2753. [26] = RCAR_GP_PIN(5, 5), /* AVB0_RD0 */
  2754. [27] = RCAR_GP_PIN(5, 4), /* AVB0_RXC */
  2755. [28] = RCAR_GP_PIN(5, 3), /* AVB0_RX_CTL */
  2756. [29] = RCAR_GP_PIN(4, 30), /* CAN1_TX_A */
  2757. [30] = RCAR_GP_PIN(4, 29), /* CAN1_RX_A */
  2758. [31] = RCAR_GP_PIN(4, 28), /* CAN0_TX_A */
  2759. } },
  2760. { PINMUX_BIAS_REG("PUEN5", 0xe6060414, "PUD4", 0xe6060454) {
  2761. [ 0] = SH_PFC_PIN_NONE,
  2762. [ 1] = SH_PFC_PIN_NONE,
  2763. [ 2] = SH_PFC_PIN_NONE,
  2764. [ 3] = SH_PFC_PIN_NONE,
  2765. [ 4] = SH_PFC_PIN_NONE,
  2766. [ 5] = SH_PFC_PIN_NONE,
  2767. [ 6] = SH_PFC_PIN_NONE,
  2768. [ 7] = SH_PFC_PIN_NONE,
  2769. [ 8] = SH_PFC_PIN_NONE,
  2770. [ 9] = SH_PFC_PIN_NONE,
  2771. [10] = SH_PFC_PIN_NONE,
  2772. [11] = SH_PFC_PIN_NONE,
  2773. [12] = SH_PFC_PIN_NONE,
  2774. [13] = SH_PFC_PIN_NONE,
  2775. [14] = SH_PFC_PIN_NONE,
  2776. [15] = SH_PFC_PIN_NONE,
  2777. [16] = SH_PFC_PIN_NONE,
  2778. [17] = SH_PFC_PIN_NONE,
  2779. [18] = SH_PFC_PIN_NONE,
  2780. [19] = SH_PFC_PIN_NONE,
  2781. [20] = SH_PFC_PIN_NONE,
  2782. [21] = SH_PFC_PIN_NONE,
  2783. [22] = SH_PFC_PIN_NONE,
  2784. [23] = SH_PFC_PIN_NONE,
  2785. [24] = SH_PFC_PIN_NONE,
  2786. [25] = SH_PFC_PIN_NONE,
  2787. [26] = SH_PFC_PIN_NONE,
  2788. [27] = SH_PFC_PIN_NONE,
  2789. [28] = SH_PFC_PIN_NONE,
  2790. [29] = RCAR_GP_PIN(6, 13), /* RPC_INT# */
  2791. [30] = RCAR_GP_PIN(6, 12), /* RPC_RESET# */
  2792. [31] = RCAR_GP_PIN(6, 11), /* QSPI1_SSL */
  2793. } },
  2794. { /* sentinel */ }
  2795. };
  2796. enum ioctrl_regs {
  2797. TDSELCTRL,
  2798. };
  2799. static const struct pinmux_ioctrl_reg pinmux_ioctrl_regs[] = {
  2800. [TDSELCTRL] = { 0xe60603c0, },
  2801. { /* sentinel */ },
  2802. };
  2803. static const struct pinmux_bias_reg *
  2804. r8a77995_pin_to_bias_reg(const struct sh_pfc *pfc, unsigned int pin,
  2805. unsigned int *puen_bit, unsigned int *pud_bit)
  2806. {
  2807. const struct pinmux_bias_reg *reg;
  2808. unsigned int bit;
  2809. reg = rcar_pin_to_bias_reg(pfc->info, pin, &bit);
  2810. if (!reg)
  2811. return reg;
  2812. *puen_bit = bit;
  2813. /* NFWE# and NFRE# use different bit positions in PUD2 */
  2814. switch (pin) {
  2815. case RCAR_GP_PIN(3, 0): /* NFRE# */
  2816. *pud_bit = 7;
  2817. break;
  2818. case RCAR_GP_PIN(3, 1): /* NFWE# */
  2819. *pud_bit = 8;
  2820. break;
  2821. default:
  2822. *pud_bit = bit;
  2823. break;
  2824. }
  2825. return reg;
  2826. }
  2827. static unsigned int r8a77995_pinmux_get_bias(struct sh_pfc *pfc,
  2828. unsigned int pin)
  2829. {
  2830. const struct pinmux_bias_reg *reg;
  2831. unsigned int puen_bit, pud_bit;
  2832. reg = r8a77995_pin_to_bias_reg(pfc, pin, &puen_bit, &pud_bit);
  2833. if (!reg)
  2834. return PIN_CONFIG_BIAS_DISABLE;
  2835. if (!(sh_pfc_read(pfc, reg->puen) & BIT(puen_bit)))
  2836. return PIN_CONFIG_BIAS_DISABLE;
  2837. else if (sh_pfc_read(pfc, reg->pud) & BIT(pud_bit))
  2838. return PIN_CONFIG_BIAS_PULL_UP;
  2839. else
  2840. return PIN_CONFIG_BIAS_PULL_DOWN;
  2841. }
  2842. static void r8a77995_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
  2843. unsigned int bias)
  2844. {
  2845. const struct pinmux_bias_reg *reg;
  2846. unsigned int puen_bit, pud_bit;
  2847. u32 enable, updown;
  2848. reg = r8a77995_pin_to_bias_reg(pfc, pin, &puen_bit, &pud_bit);
  2849. if (!reg)
  2850. return;
  2851. enable = sh_pfc_read(pfc, reg->puen) & ~BIT(puen_bit);
  2852. if (bias != PIN_CONFIG_BIAS_DISABLE) {
  2853. enable |= BIT(puen_bit);
  2854. updown = sh_pfc_read(pfc, reg->pud) & ~BIT(pud_bit);
  2855. if (bias == PIN_CONFIG_BIAS_PULL_UP)
  2856. updown |= BIT(pud_bit);
  2857. sh_pfc_write(pfc, reg->pud, updown);
  2858. }
  2859. sh_pfc_write(pfc, reg->puen, enable);
  2860. }
  2861. static const struct sh_pfc_soc_operations r8a77995_pfc_ops = {
  2862. .pin_to_pocctrl = r8a77995_pin_to_pocctrl,
  2863. .get_bias = r8a77995_pinmux_get_bias,
  2864. .set_bias = r8a77995_pinmux_set_bias,
  2865. };
  2866. const struct sh_pfc_soc_info r8a77995_pinmux_info = {
  2867. .name = "r8a77995_pfc",
  2868. .ops = &r8a77995_pfc_ops,
  2869. .unlock_reg = 0xe6060000, /* PMMR */
  2870. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  2871. .pins = pinmux_pins,
  2872. .nr_pins = ARRAY_SIZE(pinmux_pins),
  2873. .groups = pinmux_groups,
  2874. .nr_groups = ARRAY_SIZE(pinmux_groups),
  2875. .functions = pinmux_functions,
  2876. .nr_functions = ARRAY_SIZE(pinmux_functions),
  2877. .cfg_regs = pinmux_config_regs,
  2878. .bias_regs = pinmux_bias_regs,
  2879. .ioctrl_regs = pinmux_ioctrl_regs,
  2880. .pinmux_data = pinmux_data,
  2881. .pinmux_data_size = ARRAY_SIZE(pinmux_data),
  2882. };