pfc-sh7372.c 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841
  1. /*
  2. * sh7372 processor support - PFC hardware block
  3. *
  4. * Copyright (C) 2010 Kuninori Morimoto <morimoto.kuninori@renesas.com>
  5. *
  6. * Based on
  7. * sh7367 processor support - PFC hardware block
  8. * Copyright (C) 2010 Magnus Damm
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; version 2 of the License.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. #include <linux/kernel.h>
  24. #include <mach/irqs.h>
  25. #include <mach/sh7372.h>
  26. #include "sh_pfc.h"
  27. #define CPU_ALL_PORT(fn, pfx, sfx) \
  28. PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \
  29. PORT_10(fn, pfx##10, sfx), PORT_10(fn, pfx##11, sfx), \
  30. PORT_10(fn, pfx##12, sfx), PORT_10(fn, pfx##13, sfx), \
  31. PORT_10(fn, pfx##14, sfx), PORT_10(fn, pfx##15, sfx), \
  32. PORT_10(fn, pfx##16, sfx), PORT_10(fn, pfx##17, sfx), \
  33. PORT_10(fn, pfx##18, sfx), PORT_1(fn, pfx##190, sfx)
  34. #undef _GPIO_PORT
  35. #define _GPIO_PORT(gpio, sfx) \
  36. [gpio] = { \
  37. .name = __stringify(PORT##gpio), \
  38. .enum_id = PORT##gpio##_DATA, \
  39. }
  40. #define IRQC_PIN_MUX(irq, pin) \
  41. static const unsigned int intc_irq##irq##_pins[] = { \
  42. pin, \
  43. }; \
  44. static const unsigned int intc_irq##irq##_mux[] = { \
  45. IRQ##irq##_MARK, \
  46. }
  47. #define IRQC_PINS_MUX(irq, pin0, pin1) \
  48. static const unsigned int intc_irq##irq##_0_pins[] = { \
  49. pin0, \
  50. }; \
  51. static const unsigned int intc_irq##irq##_0_mux[] = { \
  52. IRQ##irq##_##pin0##_MARK, \
  53. }; \
  54. static const unsigned int intc_irq##irq##_1_pins[] = { \
  55. pin1, \
  56. }; \
  57. static const unsigned int intc_irq##irq##_1_mux[] = { \
  58. IRQ##irq##_##pin1##_MARK, \
  59. }
  60. enum {
  61. PINMUX_RESERVED = 0,
  62. /* PORT0_DATA -> PORT190_DATA */
  63. PINMUX_DATA_BEGIN,
  64. PORT_ALL(DATA),
  65. PINMUX_DATA_END,
  66. /* PORT0_IN -> PORT190_IN */
  67. PINMUX_INPUT_BEGIN,
  68. PORT_ALL(IN),
  69. PINMUX_INPUT_END,
  70. /* PORT0_IN_PU -> PORT190_IN_PU */
  71. PINMUX_INPUT_PULLUP_BEGIN,
  72. PORT_ALL(IN_PU),
  73. PINMUX_INPUT_PULLUP_END,
  74. /* PORT0_IN_PD -> PORT190_IN_PD */
  75. PINMUX_INPUT_PULLDOWN_BEGIN,
  76. PORT_ALL(IN_PD),
  77. PINMUX_INPUT_PULLDOWN_END,
  78. /* PORT0_OUT -> PORT190_OUT */
  79. PINMUX_OUTPUT_BEGIN,
  80. PORT_ALL(OUT),
  81. PINMUX_OUTPUT_END,
  82. PINMUX_FUNCTION_BEGIN,
  83. PORT_ALL(FN_IN), /* PORT0_FN_IN -> PORT190_FN_IN */
  84. PORT_ALL(FN_OUT), /* PORT0_FN_OUT -> PORT190_FN_OUT */
  85. PORT_ALL(FN0), /* PORT0_FN0 -> PORT190_FN0 */
  86. PORT_ALL(FN1), /* PORT0_FN1 -> PORT190_FN1 */
  87. PORT_ALL(FN2), /* PORT0_FN2 -> PORT190_FN2 */
  88. PORT_ALL(FN3), /* PORT0_FN3 -> PORT190_FN3 */
  89. PORT_ALL(FN4), /* PORT0_FN4 -> PORT190_FN4 */
  90. PORT_ALL(FN5), /* PORT0_FN5 -> PORT190_FN5 */
  91. PORT_ALL(FN6), /* PORT0_FN6 -> PORT190_FN6 */
  92. PORT_ALL(FN7), /* PORT0_FN7 -> PORT190_FN7 */
  93. MSEL1CR_31_0, MSEL1CR_31_1,
  94. MSEL1CR_30_0, MSEL1CR_30_1,
  95. MSEL1CR_29_0, MSEL1CR_29_1,
  96. MSEL1CR_28_0, MSEL1CR_28_1,
  97. MSEL1CR_27_0, MSEL1CR_27_1,
  98. MSEL1CR_26_0, MSEL1CR_26_1,
  99. MSEL1CR_16_0, MSEL1CR_16_1,
  100. MSEL1CR_15_0, MSEL1CR_15_1,
  101. MSEL1CR_14_0, MSEL1CR_14_1,
  102. MSEL1CR_13_0, MSEL1CR_13_1,
  103. MSEL1CR_12_0, MSEL1CR_12_1,
  104. MSEL1CR_9_0, MSEL1CR_9_1,
  105. MSEL1CR_8_0, MSEL1CR_8_1,
  106. MSEL1CR_7_0, MSEL1CR_7_1,
  107. MSEL1CR_6_0, MSEL1CR_6_1,
  108. MSEL1CR_4_0, MSEL1CR_4_1,
  109. MSEL1CR_3_0, MSEL1CR_3_1,
  110. MSEL1CR_2_0, MSEL1CR_2_1,
  111. MSEL1CR_0_0, MSEL1CR_0_1,
  112. MSEL3CR_27_0, MSEL3CR_27_1,
  113. MSEL3CR_26_0, MSEL3CR_26_1,
  114. MSEL3CR_21_0, MSEL3CR_21_1,
  115. MSEL3CR_20_0, MSEL3CR_20_1,
  116. MSEL3CR_15_0, MSEL3CR_15_1,
  117. MSEL3CR_9_0, MSEL3CR_9_1,
  118. MSEL3CR_6_0, MSEL3CR_6_1,
  119. MSEL4CR_19_0, MSEL4CR_19_1,
  120. MSEL4CR_18_0, MSEL4CR_18_1,
  121. MSEL4CR_17_0, MSEL4CR_17_1,
  122. MSEL4CR_16_0, MSEL4CR_16_1,
  123. MSEL4CR_15_0, MSEL4CR_15_1,
  124. MSEL4CR_14_0, MSEL4CR_14_1,
  125. MSEL4CR_10_0, MSEL4CR_10_1,
  126. MSEL4CR_6_0, MSEL4CR_6_1,
  127. MSEL4CR_4_0, MSEL4CR_4_1,
  128. MSEL4CR_1_0, MSEL4CR_1_1,
  129. PINMUX_FUNCTION_END,
  130. PINMUX_MARK_BEGIN,
  131. /* IRQ */
  132. IRQ0_6_MARK, IRQ0_162_MARK, IRQ1_MARK, IRQ2_4_MARK,
  133. IRQ2_5_MARK, IRQ3_8_MARK, IRQ3_16_MARK, IRQ4_17_MARK,
  134. IRQ4_163_MARK, IRQ5_MARK, IRQ6_39_MARK, IRQ6_164_MARK,
  135. IRQ7_40_MARK, IRQ7_167_MARK, IRQ8_41_MARK, IRQ8_168_MARK,
  136. IRQ9_42_MARK, IRQ9_169_MARK, IRQ10_MARK, IRQ11_MARK,
  137. IRQ12_80_MARK, IRQ12_137_MARK, IRQ13_81_MARK, IRQ13_145_MARK,
  138. IRQ14_82_MARK, IRQ14_146_MARK, IRQ15_83_MARK, IRQ15_147_MARK,
  139. IRQ16_84_MARK, IRQ16_170_MARK, IRQ17_MARK, IRQ18_MARK,
  140. IRQ19_MARK, IRQ20_MARK, IRQ21_MARK, IRQ22_MARK,
  141. IRQ23_MARK, IRQ24_MARK, IRQ25_MARK, IRQ26_121_MARK,
  142. IRQ26_172_MARK, IRQ27_122_MARK, IRQ27_180_MARK, IRQ28_123_MARK,
  143. IRQ28_181_MARK, IRQ29_129_MARK, IRQ29_182_MARK, IRQ30_130_MARK,
  144. IRQ30_183_MARK, IRQ31_138_MARK, IRQ31_184_MARK,
  145. /* MSIOF0 */
  146. MSIOF0_TSYNC_MARK, MSIOF0_TSCK_MARK, MSIOF0_RXD_MARK,
  147. MSIOF0_RSCK_MARK, MSIOF0_RSYNC_MARK, MSIOF0_MCK0_MARK,
  148. MSIOF0_MCK1_MARK, MSIOF0_SS1_MARK, MSIOF0_SS2_MARK,
  149. MSIOF0_TXD_MARK,
  150. /* MSIOF1 */
  151. MSIOF1_TSCK_39_MARK, MSIOF1_TSYNC_40_MARK,
  152. MSIOF1_TSCK_88_MARK, MSIOF1_TSYNC_89_MARK,
  153. MSIOF1_TXD_41_MARK, MSIOF1_RXD_42_MARK,
  154. MSIOF1_TXD_90_MARK, MSIOF1_RXD_91_MARK,
  155. MSIOF1_SS1_43_MARK, MSIOF1_SS2_44_MARK,
  156. MSIOF1_SS1_92_MARK, MSIOF1_SS2_93_MARK,
  157. MSIOF1_RSCK_MARK, MSIOF1_RSYNC_MARK,
  158. MSIOF1_MCK0_MARK, MSIOF1_MCK1_MARK,
  159. /* MSIOF2 */
  160. MSIOF2_RSCK_MARK, MSIOF2_RSYNC_MARK, MSIOF2_MCK0_MARK,
  161. MSIOF2_MCK1_MARK, MSIOF2_SS1_MARK, MSIOF2_SS2_MARK,
  162. MSIOF2_TSYNC_MARK, MSIOF2_TSCK_MARK, MSIOF2_RXD_MARK,
  163. MSIOF2_TXD_MARK,
  164. /* BBIF1 */
  165. BBIF1_RXD_MARK, BBIF1_TSYNC_MARK, BBIF1_TSCK_MARK,
  166. BBIF1_TXD_MARK, BBIF1_RSCK_MARK, BBIF1_RSYNC_MARK,
  167. BBIF1_FLOW_MARK, BB_RX_FLOW_N_MARK,
  168. /* BBIF2 */
  169. BBIF2_TSCK1_MARK, BBIF2_TSYNC1_MARK,
  170. BBIF2_TXD1_MARK, BBIF2_RXD_MARK,
  171. /* FSI */
  172. FSIACK_MARK, FSIBCK_MARK, FSIAILR_MARK, FSIAIBT_MARK,
  173. FSIAISLD_MARK, FSIAOMC_MARK, FSIAOLR_MARK, FSIAOBT_MARK,
  174. FSIAOSLD_MARK, FSIASPDIF_11_MARK, FSIASPDIF_15_MARK,
  175. /* FMSI */
  176. FMSOCK_MARK, FMSOOLR_MARK, FMSIOLR_MARK, FMSOOBT_MARK,
  177. FMSIOBT_MARK, FMSOSLD_MARK, FMSOILR_MARK, FMSIILR_MARK,
  178. FMSOIBT_MARK, FMSIIBT_MARK, FMSISLD_MARK, FMSICK_MARK,
  179. /* SCIFA0 */
  180. SCIFA0_TXD_MARK, SCIFA0_RXD_MARK, SCIFA0_SCK_MARK,
  181. SCIFA0_RTS_MARK, SCIFA0_CTS_MARK,
  182. /* SCIFA1 */
  183. SCIFA1_TXD_MARK, SCIFA1_RXD_MARK, SCIFA1_SCK_MARK,
  184. SCIFA1_RTS_MARK, SCIFA1_CTS_MARK,
  185. /* SCIFA2 */
  186. SCIFA2_CTS1_MARK, SCIFA2_RTS1_MARK, SCIFA2_TXD1_MARK,
  187. SCIFA2_RXD1_MARK, SCIFA2_SCK1_MARK,
  188. /* SCIFA3 */
  189. SCIFA3_CTS_43_MARK, SCIFA3_CTS_140_MARK, SCIFA3_RTS_44_MARK,
  190. SCIFA3_RTS_141_MARK, SCIFA3_SCK_MARK, SCIFA3_TXD_MARK,
  191. SCIFA3_RXD_MARK,
  192. /* SCIFA4 */
  193. SCIFA4_RXD_MARK, SCIFA4_TXD_MARK,
  194. /* SCIFA5 */
  195. SCIFA5_RXD_MARK, SCIFA5_TXD_MARK,
  196. /* SCIFB */
  197. SCIFB_SCK_MARK, SCIFB_RTS_MARK, SCIFB_CTS_MARK,
  198. SCIFB_TXD_MARK, SCIFB_RXD_MARK,
  199. /* CEU */
  200. VIO_HD_MARK, VIO_CKO1_MARK, VIO_CKO2_MARK, VIO_VD_MARK,
  201. VIO_CLK_MARK, VIO_FIELD_MARK, VIO_CKO_MARK,
  202. VIO_D0_MARK, VIO_D1_MARK, VIO_D2_MARK, VIO_D3_MARK,
  203. VIO_D4_MARK, VIO_D5_MARK, VIO_D6_MARK, VIO_D7_MARK,
  204. VIO_D8_MARK, VIO_D9_MARK, VIO_D10_MARK, VIO_D11_MARK,
  205. VIO_D12_MARK, VIO_D13_MARK, VIO_D14_MARK, VIO_D15_MARK,
  206. /* USB0 */
  207. IDIN_0_MARK, EXTLP_0_MARK, OVCN2_0_MARK, PWEN_0_MARK,
  208. OVCN_0_MARK, VBUS0_0_MARK,
  209. /* USB1 */
  210. IDIN_1_18_MARK, IDIN_1_113_MARK,
  211. PWEN_1_115_MARK, PWEN_1_138_MARK,
  212. OVCN_1_114_MARK, OVCN_1_162_MARK,
  213. EXTLP_1_MARK, OVCN2_1_MARK,
  214. VBUS0_1_MARK,
  215. /* GPIO */
  216. GPI0_MARK, GPI1_MARK, GPO0_MARK, GPO1_MARK,
  217. /* BSC */
  218. BS_MARK, WE1_MARK,
  219. CKO_MARK, WAIT_MARK, RDWR_MARK,
  220. A0_MARK, A1_MARK, A2_MARK, A3_MARK,
  221. A6_MARK, A7_MARK, A8_MARK, A9_MARK,
  222. A10_MARK, A11_MARK, A12_MARK, A13_MARK,
  223. A14_MARK, A15_MARK, A16_MARK, A17_MARK,
  224. A18_MARK, A19_MARK, A20_MARK, A21_MARK,
  225. A22_MARK, A23_MARK, A24_MARK, A25_MARK,
  226. A26_MARK,
  227. CS0_MARK, CS2_MARK, CS4_MARK,
  228. CS5A_MARK, CS5B_MARK, CS6A_MARK,
  229. /* BSC/FLCTL */
  230. RD_FSC_MARK, WE0_FWE_MARK, A4_FOE_MARK, A5_FCDE_MARK,
  231. D0_NAF0_MARK, D1_NAF1_MARK, D2_NAF2_MARK, D3_NAF3_MARK,
  232. D4_NAF4_MARK, D5_NAF5_MARK, D6_NAF6_MARK, D7_NAF7_MARK,
  233. D8_NAF8_MARK, D9_NAF9_MARK, D10_NAF10_MARK, D11_NAF11_MARK,
  234. D12_NAF12_MARK, D13_NAF13_MARK, D14_NAF14_MARK, D15_NAF15_MARK,
  235. /* MMCIF(1) */
  236. MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
  237. MMCD0_4_MARK, MMCD0_5_MARK, MMCD0_6_MARK, MMCD0_7_MARK,
  238. MMCCMD0_MARK, MMCCLK0_MARK,
  239. /* MMCIF(2) */
  240. MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
  241. MMCD1_4_MARK, MMCD1_5_MARK, MMCD1_6_MARK, MMCD1_7_MARK,
  242. MMCCLK1_MARK, MMCCMD1_MARK,
  243. /* SPU2 */
  244. VINT_I_MARK,
  245. /* FLCTL */
  246. FCE1_MARK, FCE0_MARK, FRB_MARK,
  247. /* HSI */
  248. GP_RX_FLAG_MARK, GP_RX_DATA_MARK, GP_TX_READY_MARK,
  249. GP_RX_WAKE_MARK, MP_TX_FLAG_MARK, MP_TX_DATA_MARK,
  250. MP_RX_READY_MARK, MP_TX_WAKE_MARK,
  251. /* MFI */
  252. MFIv6_MARK,
  253. MFIv4_MARK,
  254. MEMC_CS0_MARK, MEMC_BUSCLK_MEMC_A0_MARK,
  255. MEMC_CS1_MEMC_A1_MARK, MEMC_ADV_MEMC_DREQ0_MARK,
  256. MEMC_WAIT_MEMC_DREQ1_MARK, MEMC_NOE_MARK,
  257. MEMC_NWE_MARK, MEMC_INT_MARK,
  258. MEMC_AD0_MARK, MEMC_AD1_MARK, MEMC_AD2_MARK,
  259. MEMC_AD3_MARK, MEMC_AD4_MARK, MEMC_AD5_MARK,
  260. MEMC_AD6_MARK, MEMC_AD7_MARK, MEMC_AD8_MARK,
  261. MEMC_AD9_MARK, MEMC_AD10_MARK, MEMC_AD11_MARK,
  262. MEMC_AD12_MARK, MEMC_AD13_MARK, MEMC_AD14_MARK,
  263. MEMC_AD15_MARK,
  264. /* SIM */
  265. SIM_RST_MARK, SIM_CLK_MARK, SIM_D_MARK,
  266. /* TPU */
  267. TPU0TO0_MARK, TPU0TO1_MARK,
  268. TPU0TO2_93_MARK, TPU0TO2_99_MARK,
  269. TPU0TO3_MARK,
  270. /* I2C2 */
  271. I2C_SCL2_MARK, I2C_SDA2_MARK,
  272. /* I2C3(1) */
  273. I2C_SCL3_MARK, I2C_SDA3_MARK,
  274. /* I2C3(2) */
  275. I2C_SCL3S_MARK, I2C_SDA3S_MARK,
  276. /* I2C4(2) */
  277. I2C_SCL4_MARK, I2C_SDA4_MARK,
  278. /* I2C4(2) */
  279. I2C_SCL4S_MARK, I2C_SDA4S_MARK,
  280. /* KEYSC */
  281. KEYOUT0_MARK, KEYIN0_121_MARK, KEYIN0_136_MARK,
  282. KEYOUT1_MARK, KEYIN1_122_MARK, KEYIN1_135_MARK,
  283. KEYOUT2_MARK, KEYIN2_123_MARK, KEYIN2_134_MARK,
  284. KEYOUT3_MARK, KEYIN3_124_MARK, KEYIN3_133_MARK,
  285. KEYOUT4_MARK, KEYIN4_MARK,
  286. KEYOUT5_MARK, KEYIN5_MARK,
  287. KEYOUT6_MARK, KEYIN6_MARK,
  288. KEYOUT7_MARK, KEYIN7_MARK,
  289. /* LCDC */
  290. LCDC0_SELECT_MARK,
  291. LCDC1_SELECT_MARK,
  292. LCDHSYN_MARK, LCDCS_MARK, LCDVSYN_MARK, LCDDCK_MARK,
  293. LCDWR_MARK, LCDRD_MARK, LCDDISP_MARK, LCDRS_MARK,
  294. LCDLCLK_MARK, LCDDON_MARK,
  295. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  296. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  297. LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
  298. LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
  299. LCDD16_MARK, LCDD17_MARK, LCDD18_MARK, LCDD19_MARK,
  300. LCDD20_MARK, LCDD21_MARK, LCDD22_MARK, LCDD23_MARK,
  301. /* IRDA */
  302. IRDA_OUT_MARK, IRDA_IN_MARK, IRDA_FIRSEL_MARK,
  303. IROUT_139_MARK, IROUT_140_MARK,
  304. /* TSIF1 */
  305. TS0_1SELECT_MARK,
  306. TS0_2SELECT_MARK,
  307. TS1_1SELECT_MARK,
  308. TS1_2SELECT_MARK,
  309. TS_SPSYNC1_MARK, TS_SDAT1_MARK,
  310. TS_SDEN1_MARK, TS_SCK1_MARK,
  311. /* TSIF2 */
  312. TS_SPSYNC2_MARK, TS_SDAT2_MARK,
  313. TS_SDEN2_MARK, TS_SCK2_MARK,
  314. /* HDMI */
  315. HDMI_HPD_MARK, HDMI_CEC_MARK,
  316. /* SDHI0 */
  317. SDHICLK0_MARK, SDHICD0_MARK,
  318. SDHICMD0_MARK, SDHIWP0_MARK,
  319. SDHID0_0_MARK, SDHID0_1_MARK,
  320. SDHID0_2_MARK, SDHID0_3_MARK,
  321. /* SDHI1 */
  322. SDHICLK1_MARK, SDHICMD1_MARK, SDHID1_0_MARK,
  323. SDHID1_1_MARK, SDHID1_2_MARK, SDHID1_3_MARK,
  324. /* SDHI2 */
  325. SDHICLK2_MARK, SDHICMD2_MARK, SDHID2_0_MARK,
  326. SDHID2_1_MARK, SDHID2_2_MARK, SDHID2_3_MARK,
  327. /* SDENC */
  328. SDENC_CPG_MARK,
  329. SDENC_DV_CLKI_MARK,
  330. PINMUX_MARK_END,
  331. };
  332. static const pinmux_enum_t pinmux_data[] = {
  333. /* specify valid pin states for each pin in GPIO mode */
  334. PORT_DATA_IO_PD(0), PORT_DATA_IO_PD(1),
  335. PORT_DATA_O(2), PORT_DATA_I_PD(3),
  336. PORT_DATA_I_PD(4), PORT_DATA_I_PD(5),
  337. PORT_DATA_IO_PU_PD(6), PORT_DATA_I_PD(7),
  338. PORT_DATA_IO_PD(8), PORT_DATA_O(9),
  339. PORT_DATA_O(10), PORT_DATA_O(11),
  340. PORT_DATA_IO_PU_PD(12), PORT_DATA_IO_PD(13),
  341. PORT_DATA_IO_PD(14), PORT_DATA_O(15),
  342. PORT_DATA_IO_PD(16), PORT_DATA_IO_PD(17),
  343. PORT_DATA_I_PD(18), PORT_DATA_IO(19),
  344. PORT_DATA_IO(20), PORT_DATA_IO(21),
  345. PORT_DATA_IO(22), PORT_DATA_IO(23),
  346. PORT_DATA_IO(24), PORT_DATA_IO(25),
  347. PORT_DATA_IO(26), PORT_DATA_IO(27),
  348. PORT_DATA_IO(28), PORT_DATA_IO(29),
  349. PORT_DATA_IO(30), PORT_DATA_IO(31),
  350. PORT_DATA_IO(32), PORT_DATA_IO(33),
  351. PORT_DATA_IO(34), PORT_DATA_IO(35),
  352. PORT_DATA_IO(36), PORT_DATA_IO(37),
  353. PORT_DATA_IO(38), PORT_DATA_IO(39),
  354. PORT_DATA_IO(40), PORT_DATA_IO(41),
  355. PORT_DATA_IO(42), PORT_DATA_IO(43),
  356. PORT_DATA_IO(44), PORT_DATA_IO(45),
  357. PORT_DATA_IO_PU(46), PORT_DATA_IO_PU(47),
  358. PORT_DATA_IO_PU(48), PORT_DATA_IO_PU(49),
  359. PORT_DATA_IO_PU(50), PORT_DATA_IO_PU(51),
  360. PORT_DATA_IO_PU(52), PORT_DATA_IO_PU(53),
  361. PORT_DATA_IO_PU(54), PORT_DATA_IO_PU(55),
  362. PORT_DATA_IO_PU(56), PORT_DATA_IO_PU(57),
  363. PORT_DATA_IO_PU(58), PORT_DATA_IO_PU(59),
  364. PORT_DATA_IO_PU(60), PORT_DATA_IO_PU(61),
  365. PORT_DATA_IO(62), PORT_DATA_O(63),
  366. PORT_DATA_O(64), PORT_DATA_IO_PU(65),
  367. PORT_DATA_O(66), PORT_DATA_IO_PU(67), /*66?*/
  368. PORT_DATA_O(68), PORT_DATA_IO(69),
  369. PORT_DATA_IO(70), PORT_DATA_IO(71),
  370. PORT_DATA_O(72), PORT_DATA_I_PU(73),
  371. PORT_DATA_I_PU_PD(74), PORT_DATA_IO_PU_PD(75),
  372. PORT_DATA_IO_PU_PD(76), PORT_DATA_IO_PU_PD(77),
  373. PORT_DATA_IO_PU_PD(78), PORT_DATA_IO_PU_PD(79),
  374. PORT_DATA_IO_PU_PD(80), PORT_DATA_IO_PU_PD(81),
  375. PORT_DATA_IO_PU_PD(82), PORT_DATA_IO_PU_PD(83),
  376. PORT_DATA_IO_PU_PD(84), PORT_DATA_IO_PU_PD(85),
  377. PORT_DATA_IO_PU_PD(86), PORT_DATA_IO_PU_PD(87),
  378. PORT_DATA_IO_PU_PD(88), PORT_DATA_IO_PU_PD(89),
  379. PORT_DATA_IO_PU_PD(90), PORT_DATA_IO_PU_PD(91),
  380. PORT_DATA_IO_PU_PD(92), PORT_DATA_IO_PU_PD(93),
  381. PORT_DATA_IO_PU_PD(94), PORT_DATA_IO_PU_PD(95),
  382. PORT_DATA_IO_PU(96), PORT_DATA_IO_PU_PD(97),
  383. PORT_DATA_IO_PU_PD(98), PORT_DATA_O(99), /*99?*/
  384. PORT_DATA_IO_PD(100), PORT_DATA_IO_PD(101),
  385. PORT_DATA_IO_PD(102), PORT_DATA_IO_PD(103),
  386. PORT_DATA_IO_PD(104), PORT_DATA_IO_PD(105),
  387. PORT_DATA_IO_PU(106), PORT_DATA_IO_PU(107),
  388. PORT_DATA_IO_PU(108), PORT_DATA_IO_PU(109),
  389. PORT_DATA_IO_PU(110), PORT_DATA_IO_PU(111),
  390. PORT_DATA_IO_PD(112), PORT_DATA_IO_PD(113),
  391. PORT_DATA_IO_PU(114), PORT_DATA_IO_PU(115),
  392. PORT_DATA_IO_PU(116), PORT_DATA_IO_PU(117),
  393. PORT_DATA_IO_PU(118), PORT_DATA_IO_PU(119),
  394. PORT_DATA_IO_PU(120), PORT_DATA_IO_PD(121),
  395. PORT_DATA_IO_PD(122), PORT_DATA_IO_PD(123),
  396. PORT_DATA_IO_PD(124), PORT_DATA_IO_PD(125),
  397. PORT_DATA_IO_PD(126), PORT_DATA_IO_PD(127),
  398. PORT_DATA_IO_PD(128), PORT_DATA_IO_PU_PD(129),
  399. PORT_DATA_IO_PU_PD(130), PORT_DATA_IO_PU_PD(131),
  400. PORT_DATA_IO_PU_PD(132), PORT_DATA_IO_PU_PD(133),
  401. PORT_DATA_IO_PU_PD(134), PORT_DATA_IO_PU_PD(135),
  402. PORT_DATA_IO_PD(136), PORT_DATA_IO_PD(137),
  403. PORT_DATA_IO_PD(138), PORT_DATA_IO_PD(139),
  404. PORT_DATA_IO_PD(140), PORT_DATA_IO_PD(141),
  405. PORT_DATA_IO_PD(142), PORT_DATA_IO_PU_PD(143),
  406. PORT_DATA_IO_PD(144), PORT_DATA_IO_PD(145),
  407. PORT_DATA_IO_PD(146), PORT_DATA_IO_PD(147),
  408. PORT_DATA_IO_PD(148), PORT_DATA_IO_PD(149),
  409. PORT_DATA_IO_PD(150), PORT_DATA_IO_PD(151),
  410. PORT_DATA_IO_PU_PD(152), PORT_DATA_I_PD(153),
  411. PORT_DATA_IO_PU_PD(154), PORT_DATA_I_PD(155),
  412. PORT_DATA_IO_PD(156), PORT_DATA_IO_PD(157),
  413. PORT_DATA_I_PD(158), PORT_DATA_IO_PD(159),
  414. PORT_DATA_O(160), PORT_DATA_IO_PD(161),
  415. PORT_DATA_IO_PD(162), PORT_DATA_IO_PD(163),
  416. PORT_DATA_I_PD(164), PORT_DATA_IO_PD(165),
  417. PORT_DATA_I_PD(166), PORT_DATA_I_PD(167),
  418. PORT_DATA_I_PD(168), PORT_DATA_I_PD(169),
  419. PORT_DATA_I_PD(170), PORT_DATA_O(171),
  420. PORT_DATA_IO_PU_PD(172), PORT_DATA_IO_PU_PD(173),
  421. PORT_DATA_IO_PU_PD(174), PORT_DATA_IO_PU_PD(175),
  422. PORT_DATA_IO_PU_PD(176), PORT_DATA_IO_PU_PD(177),
  423. PORT_DATA_IO_PU_PD(178), PORT_DATA_O(179),
  424. PORT_DATA_IO_PU_PD(180), PORT_DATA_IO_PU_PD(181),
  425. PORT_DATA_IO_PU_PD(182), PORT_DATA_IO_PU_PD(183),
  426. PORT_DATA_IO_PU_PD(184), PORT_DATA_O(185),
  427. PORT_DATA_IO_PU_PD(186), PORT_DATA_IO_PU_PD(187),
  428. PORT_DATA_IO_PU_PD(188), PORT_DATA_IO_PU_PD(189),
  429. PORT_DATA_IO_PU_PD(190),
  430. /* IRQ */
  431. PINMUX_DATA(IRQ0_6_MARK, PORT6_FN0, MSEL1CR_0_0),
  432. PINMUX_DATA(IRQ0_162_MARK, PORT162_FN0, MSEL1CR_0_1),
  433. PINMUX_DATA(IRQ1_MARK, PORT12_FN0),
  434. PINMUX_DATA(IRQ2_4_MARK, PORT4_FN0, MSEL1CR_2_0),
  435. PINMUX_DATA(IRQ2_5_MARK, PORT5_FN0, MSEL1CR_2_1),
  436. PINMUX_DATA(IRQ3_8_MARK, PORT8_FN0, MSEL1CR_3_0),
  437. PINMUX_DATA(IRQ3_16_MARK, PORT16_FN0, MSEL1CR_3_1),
  438. PINMUX_DATA(IRQ4_17_MARK, PORT17_FN0, MSEL1CR_4_0),
  439. PINMUX_DATA(IRQ4_163_MARK, PORT163_FN0, MSEL1CR_4_1),
  440. PINMUX_DATA(IRQ5_MARK, PORT18_FN0),
  441. PINMUX_DATA(IRQ6_39_MARK, PORT39_FN0, MSEL1CR_6_0),
  442. PINMUX_DATA(IRQ6_164_MARK, PORT164_FN0, MSEL1CR_6_1),
  443. PINMUX_DATA(IRQ7_40_MARK, PORT40_FN0, MSEL1CR_7_1),
  444. PINMUX_DATA(IRQ7_167_MARK, PORT167_FN0, MSEL1CR_7_0),
  445. PINMUX_DATA(IRQ8_41_MARK, PORT41_FN0, MSEL1CR_8_1),
  446. PINMUX_DATA(IRQ8_168_MARK, PORT168_FN0, MSEL1CR_8_0),
  447. PINMUX_DATA(IRQ9_42_MARK, PORT42_FN0, MSEL1CR_9_0),
  448. PINMUX_DATA(IRQ9_169_MARK, PORT169_FN0, MSEL1CR_9_1),
  449. PINMUX_DATA(IRQ10_MARK, PORT65_FN0, MSEL1CR_9_1),
  450. PINMUX_DATA(IRQ11_MARK, PORT67_FN0),
  451. PINMUX_DATA(IRQ12_80_MARK, PORT80_FN0, MSEL1CR_12_0),
  452. PINMUX_DATA(IRQ12_137_MARK, PORT137_FN0, MSEL1CR_12_1),
  453. PINMUX_DATA(IRQ13_81_MARK, PORT81_FN0, MSEL1CR_13_0),
  454. PINMUX_DATA(IRQ13_145_MARK, PORT145_FN0, MSEL1CR_13_1),
  455. PINMUX_DATA(IRQ14_82_MARK, PORT82_FN0, MSEL1CR_14_0),
  456. PINMUX_DATA(IRQ14_146_MARK, PORT146_FN0, MSEL1CR_14_1),
  457. PINMUX_DATA(IRQ15_83_MARK, PORT83_FN0, MSEL1CR_15_0),
  458. PINMUX_DATA(IRQ15_147_MARK, PORT147_FN0, MSEL1CR_15_1),
  459. PINMUX_DATA(IRQ16_84_MARK, PORT84_FN0, MSEL1CR_16_0),
  460. PINMUX_DATA(IRQ16_170_MARK, PORT170_FN0, MSEL1CR_16_1),
  461. PINMUX_DATA(IRQ17_MARK, PORT85_FN0),
  462. PINMUX_DATA(IRQ18_MARK, PORT86_FN0),
  463. PINMUX_DATA(IRQ19_MARK, PORT87_FN0),
  464. PINMUX_DATA(IRQ20_MARK, PORT92_FN0),
  465. PINMUX_DATA(IRQ21_MARK, PORT93_FN0),
  466. PINMUX_DATA(IRQ22_MARK, PORT94_FN0),
  467. PINMUX_DATA(IRQ23_MARK, PORT95_FN0),
  468. PINMUX_DATA(IRQ24_MARK, PORT112_FN0),
  469. PINMUX_DATA(IRQ25_MARK, PORT119_FN0),
  470. PINMUX_DATA(IRQ26_121_MARK, PORT121_FN0, MSEL1CR_26_1),
  471. PINMUX_DATA(IRQ26_172_MARK, PORT172_FN0, MSEL1CR_26_0),
  472. PINMUX_DATA(IRQ27_122_MARK, PORT122_FN0, MSEL1CR_27_1),
  473. PINMUX_DATA(IRQ27_180_MARK, PORT180_FN0, MSEL1CR_27_0),
  474. PINMUX_DATA(IRQ28_123_MARK, PORT123_FN0, MSEL1CR_28_1),
  475. PINMUX_DATA(IRQ28_181_MARK, PORT181_FN0, MSEL1CR_28_0),
  476. PINMUX_DATA(IRQ29_129_MARK, PORT129_FN0, MSEL1CR_29_1),
  477. PINMUX_DATA(IRQ29_182_MARK, PORT182_FN0, MSEL1CR_29_0),
  478. PINMUX_DATA(IRQ30_130_MARK, PORT130_FN0, MSEL1CR_30_1),
  479. PINMUX_DATA(IRQ30_183_MARK, PORT183_FN0, MSEL1CR_30_0),
  480. PINMUX_DATA(IRQ31_138_MARK, PORT138_FN0, MSEL1CR_31_1),
  481. PINMUX_DATA(IRQ31_184_MARK, PORT184_FN0, MSEL1CR_31_0),
  482. /* Function 1 */
  483. PINMUX_DATA(BBIF2_TSCK1_MARK, PORT0_FN1),
  484. PINMUX_DATA(BBIF2_TSYNC1_MARK, PORT1_FN1),
  485. PINMUX_DATA(BBIF2_TXD1_MARK, PORT2_FN1),
  486. PINMUX_DATA(BBIF2_RXD_MARK, PORT3_FN1),
  487. PINMUX_DATA(FSIACK_MARK, PORT4_FN1),
  488. PINMUX_DATA(FSIAILR_MARK, PORT5_FN1),
  489. PINMUX_DATA(FSIAIBT_MARK, PORT6_FN1),
  490. PINMUX_DATA(FSIAISLD_MARK, PORT7_FN1),
  491. PINMUX_DATA(FSIAOMC_MARK, PORT8_FN1),
  492. PINMUX_DATA(FSIAOLR_MARK, PORT9_FN1),
  493. PINMUX_DATA(FSIAOBT_MARK, PORT10_FN1),
  494. PINMUX_DATA(FSIAOSLD_MARK, PORT11_FN1),
  495. PINMUX_DATA(FMSOCK_MARK, PORT12_FN1),
  496. PINMUX_DATA(FMSOOLR_MARK, PORT13_FN1),
  497. PINMUX_DATA(FMSOOBT_MARK, PORT14_FN1),
  498. PINMUX_DATA(FMSOSLD_MARK, PORT15_FN1),
  499. PINMUX_DATA(FMSOILR_MARK, PORT16_FN1),
  500. PINMUX_DATA(FMSOIBT_MARK, PORT17_FN1),
  501. PINMUX_DATA(FMSISLD_MARK, PORT18_FN1),
  502. PINMUX_DATA(A0_MARK, PORT19_FN1),
  503. PINMUX_DATA(A1_MARK, PORT20_FN1),
  504. PINMUX_DATA(A2_MARK, PORT21_FN1),
  505. PINMUX_DATA(A3_MARK, PORT22_FN1),
  506. PINMUX_DATA(A4_FOE_MARK, PORT23_FN1),
  507. PINMUX_DATA(A5_FCDE_MARK, PORT24_FN1),
  508. PINMUX_DATA(A6_MARK, PORT25_FN1),
  509. PINMUX_DATA(A7_MARK, PORT26_FN1),
  510. PINMUX_DATA(A8_MARK, PORT27_FN1),
  511. PINMUX_DATA(A9_MARK, PORT28_FN1),
  512. PINMUX_DATA(A10_MARK, PORT29_FN1),
  513. PINMUX_DATA(A11_MARK, PORT30_FN1),
  514. PINMUX_DATA(A12_MARK, PORT31_FN1),
  515. PINMUX_DATA(A13_MARK, PORT32_FN1),
  516. PINMUX_DATA(A14_MARK, PORT33_FN1),
  517. PINMUX_DATA(A15_MARK, PORT34_FN1),
  518. PINMUX_DATA(A16_MARK, PORT35_FN1),
  519. PINMUX_DATA(A17_MARK, PORT36_FN1),
  520. PINMUX_DATA(A18_MARK, PORT37_FN1),
  521. PINMUX_DATA(A19_MARK, PORT38_FN1),
  522. PINMUX_DATA(A20_MARK, PORT39_FN1),
  523. PINMUX_DATA(A21_MARK, PORT40_FN1),
  524. PINMUX_DATA(A22_MARK, PORT41_FN1),
  525. PINMUX_DATA(A23_MARK, PORT42_FN1),
  526. PINMUX_DATA(A24_MARK, PORT43_FN1),
  527. PINMUX_DATA(A25_MARK, PORT44_FN1),
  528. PINMUX_DATA(A26_MARK, PORT45_FN1),
  529. PINMUX_DATA(D0_NAF0_MARK, PORT46_FN1),
  530. PINMUX_DATA(D1_NAF1_MARK, PORT47_FN1),
  531. PINMUX_DATA(D2_NAF2_MARK, PORT48_FN1),
  532. PINMUX_DATA(D3_NAF3_MARK, PORT49_FN1),
  533. PINMUX_DATA(D4_NAF4_MARK, PORT50_FN1),
  534. PINMUX_DATA(D5_NAF5_MARK, PORT51_FN1),
  535. PINMUX_DATA(D6_NAF6_MARK, PORT52_FN1),
  536. PINMUX_DATA(D7_NAF7_MARK, PORT53_FN1),
  537. PINMUX_DATA(D8_NAF8_MARK, PORT54_FN1),
  538. PINMUX_DATA(D9_NAF9_MARK, PORT55_FN1),
  539. PINMUX_DATA(D10_NAF10_MARK, PORT56_FN1),
  540. PINMUX_DATA(D11_NAF11_MARK, PORT57_FN1),
  541. PINMUX_DATA(D12_NAF12_MARK, PORT58_FN1),
  542. PINMUX_DATA(D13_NAF13_MARK, PORT59_FN1),
  543. PINMUX_DATA(D14_NAF14_MARK, PORT60_FN1),
  544. PINMUX_DATA(D15_NAF15_MARK, PORT61_FN1),
  545. PINMUX_DATA(CS0_MARK, PORT62_FN1),
  546. PINMUX_DATA(CS2_MARK, PORT63_FN1),
  547. PINMUX_DATA(CS4_MARK, PORT64_FN1),
  548. PINMUX_DATA(CS5A_MARK, PORT65_FN1),
  549. PINMUX_DATA(CS5B_MARK, PORT66_FN1),
  550. PINMUX_DATA(CS6A_MARK, PORT67_FN1),
  551. PINMUX_DATA(FCE0_MARK, PORT68_FN1),
  552. PINMUX_DATA(RD_FSC_MARK, PORT69_FN1),
  553. PINMUX_DATA(WE0_FWE_MARK, PORT70_FN1),
  554. PINMUX_DATA(WE1_MARK, PORT71_FN1),
  555. PINMUX_DATA(CKO_MARK, PORT72_FN1),
  556. PINMUX_DATA(FRB_MARK, PORT73_FN1),
  557. PINMUX_DATA(WAIT_MARK, PORT74_FN1),
  558. PINMUX_DATA(RDWR_MARK, PORT75_FN1),
  559. PINMUX_DATA(MEMC_AD0_MARK, PORT76_FN1),
  560. PINMUX_DATA(MEMC_AD1_MARK, PORT77_FN1),
  561. PINMUX_DATA(MEMC_AD2_MARK, PORT78_FN1),
  562. PINMUX_DATA(MEMC_AD3_MARK, PORT79_FN1),
  563. PINMUX_DATA(MEMC_AD4_MARK, PORT80_FN1),
  564. PINMUX_DATA(MEMC_AD5_MARK, PORT81_FN1),
  565. PINMUX_DATA(MEMC_AD6_MARK, PORT82_FN1),
  566. PINMUX_DATA(MEMC_AD7_MARK, PORT83_FN1),
  567. PINMUX_DATA(MEMC_AD8_MARK, PORT84_FN1),
  568. PINMUX_DATA(MEMC_AD9_MARK, PORT85_FN1),
  569. PINMUX_DATA(MEMC_AD10_MARK, PORT86_FN1),
  570. PINMUX_DATA(MEMC_AD11_MARK, PORT87_FN1),
  571. PINMUX_DATA(MEMC_AD12_MARK, PORT88_FN1),
  572. PINMUX_DATA(MEMC_AD13_MARK, PORT89_FN1),
  573. PINMUX_DATA(MEMC_AD14_MARK, PORT90_FN1),
  574. PINMUX_DATA(MEMC_AD15_MARK, PORT91_FN1),
  575. PINMUX_DATA(MEMC_CS0_MARK, PORT92_FN1),
  576. PINMUX_DATA(MEMC_BUSCLK_MEMC_A0_MARK, PORT93_FN1),
  577. PINMUX_DATA(MEMC_CS1_MEMC_A1_MARK, PORT94_FN1),
  578. PINMUX_DATA(MEMC_ADV_MEMC_DREQ0_MARK, PORT95_FN1),
  579. PINMUX_DATA(MEMC_WAIT_MEMC_DREQ1_MARK, PORT96_FN1),
  580. PINMUX_DATA(MEMC_NOE_MARK, PORT97_FN1),
  581. PINMUX_DATA(MEMC_NWE_MARK, PORT98_FN1),
  582. PINMUX_DATA(MEMC_INT_MARK, PORT99_FN1),
  583. PINMUX_DATA(VIO_VD_MARK, PORT100_FN1),
  584. PINMUX_DATA(VIO_HD_MARK, PORT101_FN1),
  585. PINMUX_DATA(VIO_D0_MARK, PORT102_FN1),
  586. PINMUX_DATA(VIO_D1_MARK, PORT103_FN1),
  587. PINMUX_DATA(VIO_D2_MARK, PORT104_FN1),
  588. PINMUX_DATA(VIO_D3_MARK, PORT105_FN1),
  589. PINMUX_DATA(VIO_D4_MARK, PORT106_FN1),
  590. PINMUX_DATA(VIO_D5_MARK, PORT107_FN1),
  591. PINMUX_DATA(VIO_D6_MARK, PORT108_FN1),
  592. PINMUX_DATA(VIO_D7_MARK, PORT109_FN1),
  593. PINMUX_DATA(VIO_D8_MARK, PORT110_FN1),
  594. PINMUX_DATA(VIO_D9_MARK, PORT111_FN1),
  595. PINMUX_DATA(VIO_D10_MARK, PORT112_FN1),
  596. PINMUX_DATA(VIO_D11_MARK, PORT113_FN1),
  597. PINMUX_DATA(VIO_D12_MARK, PORT114_FN1),
  598. PINMUX_DATA(VIO_D13_MARK, PORT115_FN1),
  599. PINMUX_DATA(VIO_D14_MARK, PORT116_FN1),
  600. PINMUX_DATA(VIO_D15_MARK, PORT117_FN1),
  601. PINMUX_DATA(VIO_CLK_MARK, PORT118_FN1),
  602. PINMUX_DATA(VIO_FIELD_MARK, PORT119_FN1),
  603. PINMUX_DATA(VIO_CKO_MARK, PORT120_FN1),
  604. PINMUX_DATA(LCDD0_MARK, PORT121_FN1),
  605. PINMUX_DATA(LCDD1_MARK, PORT122_FN1),
  606. PINMUX_DATA(LCDD2_MARK, PORT123_FN1),
  607. PINMUX_DATA(LCDD3_MARK, PORT124_FN1),
  608. PINMUX_DATA(LCDD4_MARK, PORT125_FN1),
  609. PINMUX_DATA(LCDD5_MARK, PORT126_FN1),
  610. PINMUX_DATA(LCDD6_MARK, PORT127_FN1),
  611. PINMUX_DATA(LCDD7_MARK, PORT128_FN1),
  612. PINMUX_DATA(LCDD8_MARK, PORT129_FN1),
  613. PINMUX_DATA(LCDD9_MARK, PORT130_FN1),
  614. PINMUX_DATA(LCDD10_MARK, PORT131_FN1),
  615. PINMUX_DATA(LCDD11_MARK, PORT132_FN1),
  616. PINMUX_DATA(LCDD12_MARK, PORT133_FN1),
  617. PINMUX_DATA(LCDD13_MARK, PORT134_FN1),
  618. PINMUX_DATA(LCDD14_MARK, PORT135_FN1),
  619. PINMUX_DATA(LCDD15_MARK, PORT136_FN1),
  620. PINMUX_DATA(LCDD16_MARK, PORT137_FN1),
  621. PINMUX_DATA(LCDD17_MARK, PORT138_FN1),
  622. PINMUX_DATA(LCDD18_MARK, PORT139_FN1),
  623. PINMUX_DATA(LCDD19_MARK, PORT140_FN1),
  624. PINMUX_DATA(LCDD20_MARK, PORT141_FN1),
  625. PINMUX_DATA(LCDD21_MARK, PORT142_FN1),
  626. PINMUX_DATA(LCDD22_MARK, PORT143_FN1),
  627. PINMUX_DATA(LCDD23_MARK, PORT144_FN1),
  628. PINMUX_DATA(LCDHSYN_MARK, PORT145_FN1),
  629. PINMUX_DATA(LCDVSYN_MARK, PORT146_FN1),
  630. PINMUX_DATA(LCDDCK_MARK, PORT147_FN1),
  631. PINMUX_DATA(LCDRD_MARK, PORT148_FN1),
  632. PINMUX_DATA(LCDDISP_MARK, PORT149_FN1),
  633. PINMUX_DATA(LCDLCLK_MARK, PORT150_FN1),
  634. PINMUX_DATA(LCDDON_MARK, PORT151_FN1),
  635. PINMUX_DATA(SCIFA0_TXD_MARK, PORT152_FN1),
  636. PINMUX_DATA(SCIFA0_RXD_MARK, PORT153_FN1),
  637. PINMUX_DATA(SCIFA1_TXD_MARK, PORT154_FN1),
  638. PINMUX_DATA(SCIFA1_RXD_MARK, PORT155_FN1),
  639. PINMUX_DATA(TS_SPSYNC1_MARK, PORT156_FN1),
  640. PINMUX_DATA(TS_SDAT1_MARK, PORT157_FN1),
  641. PINMUX_DATA(TS_SDEN1_MARK, PORT158_FN1),
  642. PINMUX_DATA(TS_SCK1_MARK, PORT159_FN1),
  643. PINMUX_DATA(TPU0TO0_MARK, PORT160_FN1),
  644. PINMUX_DATA(TPU0TO1_MARK, PORT161_FN1),
  645. PINMUX_DATA(SCIFB_SCK_MARK, PORT162_FN1),
  646. PINMUX_DATA(SCIFB_RTS_MARK, PORT163_FN1),
  647. PINMUX_DATA(SCIFB_CTS_MARK, PORT164_FN1),
  648. PINMUX_DATA(SCIFB_TXD_MARK, PORT165_FN1),
  649. PINMUX_DATA(SCIFB_RXD_MARK, PORT166_FN1),
  650. PINMUX_DATA(VBUS0_0_MARK, PORT167_FN1),
  651. PINMUX_DATA(VBUS0_1_MARK, PORT168_FN1),
  652. PINMUX_DATA(HDMI_HPD_MARK, PORT169_FN1),
  653. PINMUX_DATA(HDMI_CEC_MARK, PORT170_FN1),
  654. PINMUX_DATA(SDHICLK0_MARK, PORT171_FN1),
  655. PINMUX_DATA(SDHICD0_MARK, PORT172_FN1),
  656. PINMUX_DATA(SDHID0_0_MARK, PORT173_FN1),
  657. PINMUX_DATA(SDHID0_1_MARK, PORT174_FN1),
  658. PINMUX_DATA(SDHID0_2_MARK, PORT175_FN1),
  659. PINMUX_DATA(SDHID0_3_MARK, PORT176_FN1),
  660. PINMUX_DATA(SDHICMD0_MARK, PORT177_FN1),
  661. PINMUX_DATA(SDHIWP0_MARK, PORT178_FN1),
  662. PINMUX_DATA(SDHICLK1_MARK, PORT179_FN1),
  663. PINMUX_DATA(SDHID1_0_MARK, PORT180_FN1),
  664. PINMUX_DATA(SDHID1_1_MARK, PORT181_FN1),
  665. PINMUX_DATA(SDHID1_2_MARK, PORT182_FN1),
  666. PINMUX_DATA(SDHID1_3_MARK, PORT183_FN1),
  667. PINMUX_DATA(SDHICMD1_MARK, PORT184_FN1),
  668. PINMUX_DATA(SDHICLK2_MARK, PORT185_FN1),
  669. PINMUX_DATA(SDHID2_0_MARK, PORT186_FN1),
  670. PINMUX_DATA(SDHID2_1_MARK, PORT187_FN1),
  671. PINMUX_DATA(SDHID2_2_MARK, PORT188_FN1),
  672. PINMUX_DATA(SDHID2_3_MARK, PORT189_FN1),
  673. PINMUX_DATA(SDHICMD2_MARK, PORT190_FN1),
  674. /* Function 2 */
  675. PINMUX_DATA(FSIBCK_MARK, PORT4_FN2),
  676. PINMUX_DATA(SCIFA4_RXD_MARK, PORT5_FN2),
  677. PINMUX_DATA(SCIFA4_TXD_MARK, PORT6_FN2),
  678. PINMUX_DATA(SCIFA5_RXD_MARK, PORT8_FN2),
  679. PINMUX_DATA(FSIASPDIF_11_MARK, PORT11_FN2),
  680. PINMUX_DATA(SCIFA5_TXD_MARK, PORT12_FN2),
  681. PINMUX_DATA(FMSIOLR_MARK, PORT13_FN2),
  682. PINMUX_DATA(FMSIOBT_MARK, PORT14_FN2),
  683. PINMUX_DATA(FSIASPDIF_15_MARK, PORT15_FN2),
  684. PINMUX_DATA(FMSIILR_MARK, PORT16_FN2),
  685. PINMUX_DATA(FMSIIBT_MARK, PORT17_FN2),
  686. PINMUX_DATA(BS_MARK, PORT19_FN2),
  687. PINMUX_DATA(MSIOF0_TSYNC_MARK, PORT36_FN2),
  688. PINMUX_DATA(MSIOF0_TSCK_MARK, PORT37_FN2),
  689. PINMUX_DATA(MSIOF0_RXD_MARK, PORT38_FN2),
  690. PINMUX_DATA(MSIOF0_RSCK_MARK, PORT39_FN2),
  691. PINMUX_DATA(MSIOF0_RSYNC_MARK, PORT40_FN2),
  692. PINMUX_DATA(MSIOF0_MCK0_MARK, PORT41_FN2),
  693. PINMUX_DATA(MSIOF0_MCK1_MARK, PORT42_FN2),
  694. PINMUX_DATA(MSIOF0_SS1_MARK, PORT43_FN2),
  695. PINMUX_DATA(MSIOF0_SS2_MARK, PORT44_FN2),
  696. PINMUX_DATA(MSIOF0_TXD_MARK, PORT45_FN2),
  697. PINMUX_DATA(FMSICK_MARK, PORT65_FN2),
  698. PINMUX_DATA(FCE1_MARK, PORT66_FN2),
  699. PINMUX_DATA(BBIF1_RXD_MARK, PORT76_FN2),
  700. PINMUX_DATA(BBIF1_TSYNC_MARK, PORT77_FN2),
  701. PINMUX_DATA(BBIF1_TSCK_MARK, PORT78_FN2),
  702. PINMUX_DATA(BBIF1_TXD_MARK, PORT79_FN2),
  703. PINMUX_DATA(BBIF1_RSCK_MARK, PORT80_FN2),
  704. PINMUX_DATA(BBIF1_RSYNC_MARK, PORT81_FN2),
  705. PINMUX_DATA(BBIF1_FLOW_MARK, PORT82_FN2),
  706. PINMUX_DATA(BB_RX_FLOW_N_MARK, PORT83_FN2),
  707. PINMUX_DATA(MSIOF1_RSCK_MARK, PORT84_FN2),
  708. PINMUX_DATA(MSIOF1_RSYNC_MARK, PORT85_FN2),
  709. PINMUX_DATA(MSIOF1_MCK0_MARK, PORT86_FN2),
  710. PINMUX_DATA(MSIOF1_MCK1_MARK, PORT87_FN2),
  711. PINMUX_DATA(MSIOF1_TSCK_88_MARK, PORT88_FN2, MSEL4CR_10_1),
  712. PINMUX_DATA(MSIOF1_TSYNC_89_MARK, PORT89_FN2, MSEL4CR_10_1),
  713. PINMUX_DATA(MSIOF1_TXD_90_MARK, PORT90_FN2, MSEL4CR_10_1),
  714. PINMUX_DATA(MSIOF1_RXD_91_MARK, PORT91_FN2, MSEL4CR_10_1),
  715. PINMUX_DATA(MSIOF1_SS1_92_MARK, PORT92_FN2, MSEL4CR_10_1),
  716. PINMUX_DATA(MSIOF1_SS2_93_MARK, PORT93_FN2, MSEL4CR_10_1),
  717. PINMUX_DATA(SCIFA2_CTS1_MARK, PORT94_FN2),
  718. PINMUX_DATA(SCIFA2_RTS1_MARK, PORT95_FN2),
  719. PINMUX_DATA(SCIFA2_TXD1_MARK, PORT96_FN2),
  720. PINMUX_DATA(SCIFA2_RXD1_MARK, PORT97_FN2),
  721. PINMUX_DATA(SCIFA2_SCK1_MARK, PORT98_FN2),
  722. PINMUX_DATA(I2C_SCL2_MARK, PORT110_FN2),
  723. PINMUX_DATA(I2C_SDA2_MARK, PORT111_FN2),
  724. PINMUX_DATA(I2C_SCL3_MARK, PORT114_FN2, MSEL4CR_16_1),
  725. PINMUX_DATA(I2C_SDA3_MARK, PORT115_FN2, MSEL4CR_16_1),
  726. PINMUX_DATA(I2C_SCL4_MARK, PORT116_FN2, MSEL4CR_17_1),
  727. PINMUX_DATA(I2C_SDA4_MARK, PORT117_FN2, MSEL4CR_17_1),
  728. PINMUX_DATA(MSIOF2_RSCK_MARK, PORT134_FN2),
  729. PINMUX_DATA(MSIOF2_RSYNC_MARK, PORT135_FN2),
  730. PINMUX_DATA(MSIOF2_MCK0_MARK, PORT136_FN2),
  731. PINMUX_DATA(MSIOF2_MCK1_MARK, PORT137_FN2),
  732. PINMUX_DATA(MSIOF2_SS1_MARK, PORT138_FN2),
  733. PINMUX_DATA(MSIOF2_SS2_MARK, PORT139_FN2),
  734. PINMUX_DATA(SCIFA3_CTS_140_MARK, PORT140_FN2, MSEL3CR_9_1),
  735. PINMUX_DATA(SCIFA3_RTS_141_MARK, PORT141_FN2),
  736. PINMUX_DATA(SCIFA3_SCK_MARK, PORT142_FN2),
  737. PINMUX_DATA(SCIFA3_TXD_MARK, PORT143_FN2),
  738. PINMUX_DATA(SCIFA3_RXD_MARK, PORT144_FN2),
  739. PINMUX_DATA(MSIOF2_TSYNC_MARK, PORT148_FN2),
  740. PINMUX_DATA(MSIOF2_TSCK_MARK, PORT149_FN2),
  741. PINMUX_DATA(MSIOF2_RXD_MARK, PORT150_FN2),
  742. PINMUX_DATA(MSIOF2_TXD_MARK, PORT151_FN2),
  743. PINMUX_DATA(SCIFA0_SCK_MARK, PORT156_FN2),
  744. PINMUX_DATA(SCIFA0_RTS_MARK, PORT157_FN2),
  745. PINMUX_DATA(SCIFA0_CTS_MARK, PORT158_FN2),
  746. PINMUX_DATA(SCIFA1_SCK_MARK, PORT159_FN2),
  747. PINMUX_DATA(SCIFA1_RTS_MARK, PORT160_FN2),
  748. PINMUX_DATA(SCIFA1_CTS_MARK, PORT161_FN2),
  749. /* Function 3 */
  750. PINMUX_DATA(VIO_CKO1_MARK, PORT16_FN3),
  751. PINMUX_DATA(VIO_CKO2_MARK, PORT17_FN3),
  752. PINMUX_DATA(IDIN_1_18_MARK, PORT18_FN3, MSEL4CR_14_1),
  753. PINMUX_DATA(MSIOF1_TSCK_39_MARK, PORT39_FN3, MSEL4CR_10_0),
  754. PINMUX_DATA(MSIOF1_TSYNC_40_MARK, PORT40_FN3, MSEL4CR_10_0),
  755. PINMUX_DATA(MSIOF1_TXD_41_MARK, PORT41_FN3, MSEL4CR_10_0),
  756. PINMUX_DATA(MSIOF1_RXD_42_MARK, PORT42_FN3, MSEL4CR_10_0),
  757. PINMUX_DATA(MSIOF1_SS1_43_MARK, PORT43_FN3, MSEL4CR_10_0),
  758. PINMUX_DATA(MSIOF1_SS2_44_MARK, PORT44_FN3, MSEL4CR_10_0),
  759. PINMUX_DATA(MMCD1_0_MARK, PORT54_FN3, MSEL4CR_15_1),
  760. PINMUX_DATA(MMCD1_1_MARK, PORT55_FN3, MSEL4CR_15_1),
  761. PINMUX_DATA(MMCD1_2_MARK, PORT56_FN3, MSEL4CR_15_1),
  762. PINMUX_DATA(MMCD1_3_MARK, PORT57_FN3, MSEL4CR_15_1),
  763. PINMUX_DATA(MMCD1_4_MARK, PORT58_FN3, MSEL4CR_15_1),
  764. PINMUX_DATA(MMCD1_5_MARK, PORT59_FN3, MSEL4CR_15_1),
  765. PINMUX_DATA(MMCD1_6_MARK, PORT60_FN3, MSEL4CR_15_1),
  766. PINMUX_DATA(MMCD1_7_MARK, PORT61_FN3, MSEL4CR_15_1),
  767. PINMUX_DATA(VINT_I_MARK, PORT65_FN3),
  768. PINMUX_DATA(MMCCLK1_MARK, PORT66_FN3, MSEL4CR_15_1),
  769. PINMUX_DATA(MMCCMD1_MARK, PORT67_FN3, MSEL4CR_15_1),
  770. PINMUX_DATA(TPU0TO2_93_MARK, PORT93_FN3),
  771. PINMUX_DATA(TPU0TO2_99_MARK, PORT99_FN3),
  772. PINMUX_DATA(TPU0TO3_MARK, PORT112_FN3),
  773. PINMUX_DATA(IDIN_0_MARK, PORT113_FN3),
  774. PINMUX_DATA(EXTLP_0_MARK, PORT114_FN3),
  775. PINMUX_DATA(OVCN2_0_MARK, PORT115_FN3),
  776. PINMUX_DATA(PWEN_0_MARK, PORT116_FN3),
  777. PINMUX_DATA(OVCN_0_MARK, PORT117_FN3),
  778. PINMUX_DATA(KEYOUT7_MARK, PORT121_FN3),
  779. PINMUX_DATA(KEYOUT6_MARK, PORT122_FN3),
  780. PINMUX_DATA(KEYOUT5_MARK, PORT123_FN3),
  781. PINMUX_DATA(KEYOUT4_MARK, PORT124_FN3),
  782. PINMUX_DATA(KEYOUT3_MARK, PORT125_FN3),
  783. PINMUX_DATA(KEYOUT2_MARK, PORT126_FN3),
  784. PINMUX_DATA(KEYOUT1_MARK, PORT127_FN3),
  785. PINMUX_DATA(KEYOUT0_MARK, PORT128_FN3),
  786. PINMUX_DATA(KEYIN7_MARK, PORT129_FN3),
  787. PINMUX_DATA(KEYIN6_MARK, PORT130_FN3),
  788. PINMUX_DATA(KEYIN5_MARK, PORT131_FN3),
  789. PINMUX_DATA(KEYIN4_MARK, PORT132_FN3),
  790. PINMUX_DATA(KEYIN3_133_MARK, PORT133_FN3, MSEL4CR_18_0),
  791. PINMUX_DATA(KEYIN2_134_MARK, PORT134_FN3, MSEL4CR_18_0),
  792. PINMUX_DATA(KEYIN1_135_MARK, PORT135_FN3, MSEL4CR_18_0),
  793. PINMUX_DATA(KEYIN0_136_MARK, PORT136_FN3, MSEL4CR_18_0),
  794. PINMUX_DATA(TS_SPSYNC2_MARK, PORT137_FN3),
  795. PINMUX_DATA(IROUT_139_MARK, PORT139_FN3),
  796. PINMUX_DATA(IRDA_OUT_MARK, PORT140_FN3),
  797. PINMUX_DATA(IRDA_IN_MARK, PORT141_FN3),
  798. PINMUX_DATA(IRDA_FIRSEL_MARK, PORT142_FN3),
  799. PINMUX_DATA(TS_SDAT2_MARK, PORT145_FN3),
  800. PINMUX_DATA(TS_SDEN2_MARK, PORT146_FN3),
  801. PINMUX_DATA(TS_SCK2_MARK, PORT147_FN3),
  802. /* Function 4 */
  803. PINMUX_DATA(SCIFA3_CTS_43_MARK, PORT43_FN4, MSEL3CR_9_0),
  804. PINMUX_DATA(SCIFA3_RTS_44_MARK, PORT44_FN4),
  805. PINMUX_DATA(GP_RX_FLAG_MARK, PORT76_FN4),
  806. PINMUX_DATA(GP_RX_DATA_MARK, PORT77_FN4),
  807. PINMUX_DATA(GP_TX_READY_MARK, PORT78_FN4),
  808. PINMUX_DATA(GP_RX_WAKE_MARK, PORT79_FN4),
  809. PINMUX_DATA(MP_TX_FLAG_MARK, PORT80_FN4),
  810. PINMUX_DATA(MP_TX_DATA_MARK, PORT81_FN4),
  811. PINMUX_DATA(MP_RX_READY_MARK, PORT82_FN4),
  812. PINMUX_DATA(MP_TX_WAKE_MARK, PORT83_FN4),
  813. PINMUX_DATA(MMCD0_0_MARK, PORT84_FN4, MSEL4CR_15_0),
  814. PINMUX_DATA(MMCD0_1_MARK, PORT85_FN4, MSEL4CR_15_0),
  815. PINMUX_DATA(MMCD0_2_MARK, PORT86_FN4, MSEL4CR_15_0),
  816. PINMUX_DATA(MMCD0_3_MARK, PORT87_FN4, MSEL4CR_15_0),
  817. PINMUX_DATA(MMCD0_4_MARK, PORT88_FN4, MSEL4CR_15_0),
  818. PINMUX_DATA(MMCD0_5_MARK, PORT89_FN4, MSEL4CR_15_0),
  819. PINMUX_DATA(MMCD0_6_MARK, PORT90_FN4, MSEL4CR_15_0),
  820. PINMUX_DATA(MMCD0_7_MARK, PORT91_FN4, MSEL4CR_15_0),
  821. PINMUX_DATA(MMCCMD0_MARK, PORT92_FN4, MSEL4CR_15_0),
  822. PINMUX_DATA(SIM_RST_MARK, PORT94_FN4),
  823. PINMUX_DATA(SIM_CLK_MARK, PORT95_FN4),
  824. PINMUX_DATA(SIM_D_MARK, PORT98_FN4),
  825. PINMUX_DATA(MMCCLK0_MARK, PORT99_FN4, MSEL4CR_15_0),
  826. PINMUX_DATA(IDIN_1_113_MARK, PORT113_FN4, MSEL4CR_14_0),
  827. PINMUX_DATA(OVCN_1_114_MARK, PORT114_FN4, MSEL4CR_14_0),
  828. PINMUX_DATA(PWEN_1_115_MARK, PORT115_FN4),
  829. PINMUX_DATA(EXTLP_1_MARK, PORT116_FN4),
  830. PINMUX_DATA(OVCN2_1_MARK, PORT117_FN4),
  831. PINMUX_DATA(KEYIN0_121_MARK, PORT121_FN4, MSEL4CR_18_1),
  832. PINMUX_DATA(KEYIN1_122_MARK, PORT122_FN4, MSEL4CR_18_1),
  833. PINMUX_DATA(KEYIN2_123_MARK, PORT123_FN4, MSEL4CR_18_1),
  834. PINMUX_DATA(KEYIN3_124_MARK, PORT124_FN4, MSEL4CR_18_1),
  835. PINMUX_DATA(PWEN_1_138_MARK, PORT138_FN4),
  836. PINMUX_DATA(IROUT_140_MARK, PORT140_FN4),
  837. PINMUX_DATA(LCDCS_MARK, PORT145_FN4),
  838. PINMUX_DATA(LCDWR_MARK, PORT147_FN4),
  839. PINMUX_DATA(LCDRS_MARK, PORT149_FN4),
  840. PINMUX_DATA(OVCN_1_162_MARK, PORT162_FN4, MSEL4CR_14_1),
  841. /* Function 5 */
  842. PINMUX_DATA(GPI0_MARK, PORT41_FN5),
  843. PINMUX_DATA(GPI1_MARK, PORT42_FN5),
  844. PINMUX_DATA(GPO0_MARK, PORT43_FN5),
  845. PINMUX_DATA(GPO1_MARK, PORT44_FN5),
  846. PINMUX_DATA(I2C_SCL3S_MARK, PORT137_FN5, MSEL4CR_16_0),
  847. PINMUX_DATA(I2C_SDA3S_MARK, PORT145_FN5, MSEL4CR_16_0),
  848. PINMUX_DATA(I2C_SCL4S_MARK, PORT146_FN5, MSEL4CR_17_0),
  849. PINMUX_DATA(I2C_SDA4S_MARK, PORT147_FN5, MSEL4CR_17_0),
  850. /* Function select */
  851. PINMUX_DATA(LCDC0_SELECT_MARK, MSEL3CR_6_0),
  852. PINMUX_DATA(LCDC1_SELECT_MARK, MSEL3CR_6_1),
  853. PINMUX_DATA(TS0_1SELECT_MARK, MSEL3CR_21_0, MSEL3CR_20_0),
  854. PINMUX_DATA(TS0_2SELECT_MARK, MSEL3CR_21_0, MSEL3CR_20_1),
  855. PINMUX_DATA(TS1_1SELECT_MARK, MSEL3CR_27_0, MSEL3CR_26_0),
  856. PINMUX_DATA(TS1_2SELECT_MARK, MSEL3CR_27_0, MSEL3CR_26_1),
  857. PINMUX_DATA(SDENC_CPG_MARK, MSEL4CR_19_0),
  858. PINMUX_DATA(SDENC_DV_CLKI_MARK, MSEL4CR_19_1),
  859. PINMUX_DATA(MFIv6_MARK, MSEL4CR_6_0),
  860. PINMUX_DATA(MFIv4_MARK, MSEL4CR_6_1),
  861. };
  862. static struct sh_pfc_pin pinmux_pins[] = {
  863. GPIO_PORT_ALL(),
  864. };
  865. /* - BSC -------------------------------------------------------------------- */
  866. static const unsigned int bsc_data8_pins[] = {
  867. /* D[0:7] */
  868. 46, 47, 48, 49, 50, 51, 52, 53,
  869. };
  870. static const unsigned int bsc_data8_mux[] = {
  871. D0_NAF0_MARK, D1_NAF1_MARK, D2_NAF2_MARK, D3_NAF3_MARK,
  872. D4_NAF4_MARK, D5_NAF5_MARK, D6_NAF6_MARK, D7_NAF7_MARK,
  873. };
  874. static const unsigned int bsc_data16_pins[] = {
  875. /* D[0:15] */
  876. 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
  877. };
  878. static const unsigned int bsc_data16_mux[] = {
  879. D0_NAF0_MARK, D1_NAF1_MARK, D2_NAF2_MARK, D3_NAF3_MARK,
  880. D4_NAF4_MARK, D5_NAF5_MARK, D6_NAF6_MARK, D7_NAF7_MARK,
  881. D8_NAF8_MARK, D9_NAF9_MARK, D10_NAF10_MARK, D11_NAF11_MARK,
  882. D12_NAF12_MARK, D13_NAF13_MARK, D14_NAF14_MARK, D15_NAF15_MARK,
  883. };
  884. static const unsigned int bsc_cs0_pins[] = {
  885. /* CS */
  886. 62,
  887. };
  888. static const unsigned int bsc_cs0_mux[] = {
  889. CS0_MARK,
  890. };
  891. static const unsigned int bsc_cs2_pins[] = {
  892. /* CS */
  893. 63,
  894. };
  895. static const unsigned int bsc_cs2_mux[] = {
  896. CS2_MARK,
  897. };
  898. static const unsigned int bsc_cs4_pins[] = {
  899. /* CS */
  900. 64,
  901. };
  902. static const unsigned int bsc_cs4_mux[] = {
  903. CS4_MARK,
  904. };
  905. static const unsigned int bsc_cs5a_pins[] = {
  906. /* CS */
  907. 65,
  908. };
  909. static const unsigned int bsc_cs5a_mux[] = {
  910. CS5A_MARK,
  911. };
  912. static const unsigned int bsc_cs5b_pins[] = {
  913. /* CS */
  914. 66,
  915. };
  916. static const unsigned int bsc_cs5b_mux[] = {
  917. CS5B_MARK,
  918. };
  919. static const unsigned int bsc_cs6a_pins[] = {
  920. /* CS */
  921. 67,
  922. };
  923. static const unsigned int bsc_cs6a_mux[] = {
  924. CS6A_MARK,
  925. };
  926. static const unsigned int bsc_rd_we8_pins[] = {
  927. /* RD, WE[0] */
  928. 69, 70,
  929. };
  930. static const unsigned int bsc_rd_we8_mux[] = {
  931. RD_FSC_MARK, WE0_FWE_MARK,
  932. };
  933. static const unsigned int bsc_rd_we16_pins[] = {
  934. /* RD, WE[0:1] */
  935. 69, 70, 71,
  936. };
  937. static const unsigned int bsc_rd_we16_mux[] = {
  938. RD_FSC_MARK, WE0_FWE_MARK, WE1_MARK,
  939. };
  940. static const unsigned int bsc_bs_pins[] = {
  941. /* BS */
  942. 19,
  943. };
  944. static const unsigned int bsc_bs_mux[] = {
  945. BS_MARK,
  946. };
  947. static const unsigned int bsc_rdwr_pins[] = {
  948. /* RDWR */
  949. 75,
  950. };
  951. static const unsigned int bsc_rdwr_mux[] = {
  952. RDWR_MARK,
  953. };
  954. static const unsigned int bsc_wait_pins[] = {
  955. /* WAIT */
  956. 74,
  957. };
  958. static const unsigned int bsc_wait_mux[] = {
  959. WAIT_MARK,
  960. };
  961. /* - CEU -------------------------------------------------------------------- */
  962. static const unsigned int ceu_data_0_7_pins[] = {
  963. /* D[0:7] */
  964. 102, 103, 104, 105, 106, 107, 108, 109,
  965. };
  966. static const unsigned int ceu_data_0_7_mux[] = {
  967. VIO_D0_MARK, VIO_D1_MARK, VIO_D2_MARK, VIO_D3_MARK,
  968. VIO_D4_MARK, VIO_D5_MARK, VIO_D6_MARK, VIO_D7_MARK,
  969. };
  970. static const unsigned int ceu_data_8_15_pins[] = {
  971. /* D[8:15] */
  972. 110, 111, 112, 113, 114, 115, 116, 117,
  973. };
  974. static const unsigned int ceu_data_8_15_mux[] = {
  975. VIO_D8_MARK, VIO_D9_MARK, VIO_D10_MARK, VIO_D11_MARK,
  976. VIO_D12_MARK, VIO_D13_MARK, VIO_D14_MARK, VIO_D15_MARK,
  977. };
  978. static const unsigned int ceu_clk_0_pins[] = {
  979. /* CKO */
  980. 120,
  981. };
  982. static const unsigned int ceu_clk_0_mux[] = {
  983. VIO_CKO_MARK,
  984. };
  985. static const unsigned int ceu_clk_1_pins[] = {
  986. /* CKO */
  987. 16,
  988. };
  989. static const unsigned int ceu_clk_1_mux[] = {
  990. VIO_CKO1_MARK,
  991. };
  992. static const unsigned int ceu_clk_2_pins[] = {
  993. /* CKO */
  994. 17,
  995. };
  996. static const unsigned int ceu_clk_2_mux[] = {
  997. VIO_CKO2_MARK,
  998. };
  999. static const unsigned int ceu_sync_pins[] = {
  1000. /* CLK, VD, HD */
  1001. 118, 100, 101,
  1002. };
  1003. static const unsigned int ceu_sync_mux[] = {
  1004. VIO_CLK_MARK, VIO_VD_MARK, VIO_HD_MARK,
  1005. };
  1006. static const unsigned int ceu_field_pins[] = {
  1007. /* FIELD */
  1008. 119,
  1009. };
  1010. static const unsigned int ceu_field_mux[] = {
  1011. VIO_FIELD_MARK,
  1012. };
  1013. /* - FLCTL ------------------------------------------------------------------ */
  1014. static const unsigned int flctl_data_pins[] = {
  1015. /* NAF[0:15] */
  1016. 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
  1017. };
  1018. static const unsigned int flctl_data_mux[] = {
  1019. D0_NAF0_MARK, D1_NAF1_MARK, D2_NAF2_MARK, D3_NAF3_MARK,
  1020. D4_NAF4_MARK, D5_NAF5_MARK, D6_NAF6_MARK, D7_NAF7_MARK,
  1021. D8_NAF8_MARK, D9_NAF9_MARK, D10_NAF10_MARK, D11_NAF11_MARK,
  1022. D12_NAF12_MARK, D13_NAF13_MARK, D14_NAF14_MARK, D15_NAF15_MARK,
  1023. };
  1024. static const unsigned int flctl_ce0_pins[] = {
  1025. /* CE */
  1026. 68,
  1027. };
  1028. static const unsigned int flctl_ce0_mux[] = {
  1029. FCE0_MARK,
  1030. };
  1031. static const unsigned int flctl_ce1_pins[] = {
  1032. /* CE */
  1033. 66,
  1034. };
  1035. static const unsigned int flctl_ce1_mux[] = {
  1036. FCE1_MARK,
  1037. };
  1038. static const unsigned int flctl_ctrl_pins[] = {
  1039. /* FCDE, FOE, FSC, FWE, FRB */
  1040. 24, 23, 69, 70, 73,
  1041. };
  1042. static const unsigned int flctl_ctrl_mux[] = {
  1043. A5_FCDE_MARK, A4_FOE_MARK, RD_FSC_MARK, WE0_FWE_MARK, FRB_MARK,
  1044. };
  1045. /* - FSIA ------------------------------------------------------------------- */
  1046. static const unsigned int fsia_mclk_in_pins[] = {
  1047. /* CK */
  1048. 4,
  1049. };
  1050. static const unsigned int fsia_mclk_in_mux[] = {
  1051. FSIACK_MARK,
  1052. };
  1053. static const unsigned int fsia_mclk_out_pins[] = {
  1054. /* OMC */
  1055. 8,
  1056. };
  1057. static const unsigned int fsia_mclk_out_mux[] = {
  1058. FSIAOMC_MARK,
  1059. };
  1060. static const unsigned int fsia_sclk_in_pins[] = {
  1061. /* ILR, IBT */
  1062. 5, 6,
  1063. };
  1064. static const unsigned int fsia_sclk_in_mux[] = {
  1065. FSIAILR_MARK, FSIAIBT_MARK,
  1066. };
  1067. static const unsigned int fsia_sclk_out_pins[] = {
  1068. /* OLR, OBT */
  1069. 9, 10,
  1070. };
  1071. static const unsigned int fsia_sclk_out_mux[] = {
  1072. FSIAOLR_MARK, FSIAOBT_MARK,
  1073. };
  1074. static const unsigned int fsia_data_in_pins[] = {
  1075. /* ISLD */
  1076. 7,
  1077. };
  1078. static const unsigned int fsia_data_in_mux[] = {
  1079. FSIAISLD_MARK,
  1080. };
  1081. static const unsigned int fsia_data_out_pins[] = {
  1082. /* OSLD */
  1083. 11,
  1084. };
  1085. static const unsigned int fsia_data_out_mux[] = {
  1086. FSIAOSLD_MARK,
  1087. };
  1088. static const unsigned int fsia_spdif_0_pins[] = {
  1089. /* SPDIF */
  1090. 11,
  1091. };
  1092. static const unsigned int fsia_spdif_0_mux[] = {
  1093. FSIASPDIF_11_MARK,
  1094. };
  1095. static const unsigned int fsia_spdif_1_pins[] = {
  1096. /* SPDIF */
  1097. 15,
  1098. };
  1099. static const unsigned int fsia_spdif_1_mux[] = {
  1100. FSIASPDIF_15_MARK,
  1101. };
  1102. /* - FSIB ------------------------------------------------------------------- */
  1103. static const unsigned int fsib_mclk_in_pins[] = {
  1104. /* CK */
  1105. 4,
  1106. };
  1107. static const unsigned int fsib_mclk_in_mux[] = {
  1108. FSIBCK_MARK,
  1109. };
  1110. /* - HDMI ------------------------------------------------------------------- */
  1111. static const unsigned int hdmi_pins[] = {
  1112. /* HPD, CEC */
  1113. 169, 170,
  1114. };
  1115. static const unsigned int hdmi_mux[] = {
  1116. HDMI_HPD_MARK, HDMI_CEC_MARK,
  1117. };
  1118. /* - INTC ------------------------------------------------------------------- */
  1119. IRQC_PINS_MUX(0, 6, 162);
  1120. IRQC_PIN_MUX(1, 12);
  1121. IRQC_PINS_MUX(2, 4, 5);
  1122. IRQC_PINS_MUX(3, 8, 16);
  1123. IRQC_PINS_MUX(4, 17, 163);
  1124. IRQC_PIN_MUX(5, 18);
  1125. IRQC_PINS_MUX(6, 39, 164);
  1126. IRQC_PINS_MUX(7, 40, 167);
  1127. IRQC_PINS_MUX(8, 41, 168);
  1128. IRQC_PINS_MUX(9, 42, 169);
  1129. IRQC_PIN_MUX(10, 65);
  1130. IRQC_PIN_MUX(11, 67);
  1131. IRQC_PINS_MUX(12, 80, 137);
  1132. IRQC_PINS_MUX(13, 81, 145);
  1133. IRQC_PINS_MUX(14, 82, 146);
  1134. IRQC_PINS_MUX(15, 83, 147);
  1135. IRQC_PINS_MUX(16, 84, 170);
  1136. IRQC_PIN_MUX(17, 85);
  1137. IRQC_PIN_MUX(18, 86);
  1138. IRQC_PIN_MUX(19, 87);
  1139. IRQC_PIN_MUX(20, 92);
  1140. IRQC_PIN_MUX(21, 93);
  1141. IRQC_PIN_MUX(22, 94);
  1142. IRQC_PIN_MUX(23, 95);
  1143. IRQC_PIN_MUX(24, 112);
  1144. IRQC_PIN_MUX(25, 119);
  1145. IRQC_PINS_MUX(26, 121, 172);
  1146. IRQC_PINS_MUX(27, 122, 180);
  1147. IRQC_PINS_MUX(28, 123, 181);
  1148. IRQC_PINS_MUX(29, 129, 182);
  1149. IRQC_PINS_MUX(30, 130, 183);
  1150. IRQC_PINS_MUX(31, 138, 184);
  1151. /* - KEYSC ------------------------------------------------------------------ */
  1152. static const unsigned int keysc_in04_0_pins[] = {
  1153. /* KEYIN[0:4] */
  1154. 136, 135, 134, 133, 132,
  1155. };
  1156. static const unsigned int keysc_in04_0_mux[] = {
  1157. KEYIN0_136_MARK, KEYIN1_135_MARK, KEYIN2_134_MARK, KEYIN3_133_MARK,
  1158. KEYIN4_MARK,
  1159. };
  1160. static const unsigned int keysc_in04_1_pins[] = {
  1161. /* KEYIN[0:4] */
  1162. 121, 122, 123, 124, 132,
  1163. };
  1164. static const unsigned int keysc_in04_1_mux[] = {
  1165. KEYIN0_121_MARK, KEYIN1_122_MARK, KEYIN2_123_MARK, KEYIN3_124_MARK,
  1166. KEYIN4_MARK,
  1167. };
  1168. static const unsigned int keysc_in5_pins[] = {
  1169. /* KEYIN5 */
  1170. 131,
  1171. };
  1172. static const unsigned int keysc_in5_mux[] = {
  1173. KEYIN5_MARK,
  1174. };
  1175. static const unsigned int keysc_in6_pins[] = {
  1176. /* KEYIN6 */
  1177. 130,
  1178. };
  1179. static const unsigned int keysc_in6_mux[] = {
  1180. KEYIN6_MARK,
  1181. };
  1182. static const unsigned int keysc_in7_pins[] = {
  1183. /* KEYIN7 */
  1184. 129,
  1185. };
  1186. static const unsigned int keysc_in7_mux[] = {
  1187. KEYIN7_MARK,
  1188. };
  1189. static const unsigned int keysc_out4_pins[] = {
  1190. /* KEYOUT[0:3] */
  1191. 128, 127, 126, 125,
  1192. };
  1193. static const unsigned int keysc_out4_mux[] = {
  1194. KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
  1195. };
  1196. static const unsigned int keysc_out5_pins[] = {
  1197. /* KEYOUT[0:4] */
  1198. 128, 127, 126, 125, 124,
  1199. };
  1200. static const unsigned int keysc_out5_mux[] = {
  1201. KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
  1202. KEYOUT4_MARK,
  1203. };
  1204. static const unsigned int keysc_out6_pins[] = {
  1205. /* KEYOUT[0:5] */
  1206. 128, 127, 126, 125, 124, 123,
  1207. };
  1208. static const unsigned int keysc_out6_mux[] = {
  1209. KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
  1210. KEYOUT4_MARK, KEYOUT5_MARK,
  1211. };
  1212. static const unsigned int keysc_out8_pins[] = {
  1213. /* KEYOUT[0:7] */
  1214. 128, 127, 126, 125, 124, 123, 122, 121,
  1215. };
  1216. static const unsigned int keysc_out8_mux[] = {
  1217. KEYOUT0_MARK, KEYOUT1_MARK, KEYOUT2_MARK, KEYOUT3_MARK,
  1218. KEYOUT4_MARK, KEYOUT5_MARK, KEYOUT6_MARK, KEYOUT7_MARK,
  1219. };
  1220. /* - LCD -------------------------------------------------------------------- */
  1221. static const unsigned int lcd_data8_pins[] = {
  1222. /* D[0:7] */
  1223. 121, 122, 123, 124, 125, 126, 127, 128,
  1224. };
  1225. static const unsigned int lcd_data8_mux[] = {
  1226. /* LCDC */
  1227. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1228. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1229. };
  1230. static const unsigned int lcd_data9_pins[] = {
  1231. /* D[0:8] */
  1232. 121, 122, 123, 124, 125, 126, 127, 128,
  1233. 129,
  1234. 137, 138, 139, 140, 141, 142, 143, 144,
  1235. };
  1236. static const unsigned int lcd_data9_mux[] = {
  1237. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1238. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1239. LCDD8_MARK,
  1240. };
  1241. static const unsigned int lcd_data12_pins[] = {
  1242. /* D[0:11] */
  1243. 121, 122, 123, 124, 125, 126, 127, 128,
  1244. 129, 130, 131, 132,
  1245. };
  1246. static const unsigned int lcd_data12_mux[] = {
  1247. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1248. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1249. LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
  1250. };
  1251. static const unsigned int lcd_data16_pins[] = {
  1252. /* D[0:15] */
  1253. 121, 122, 123, 124, 125, 126, 127, 128,
  1254. 129, 130, 131, 132, 133, 134, 135, 136,
  1255. };
  1256. static const unsigned int lcd_data16_mux[] = {
  1257. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1258. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1259. LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
  1260. LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
  1261. };
  1262. static const unsigned int lcd_data18_pins[] = {
  1263. /* D[0:17] */
  1264. 121, 122, 123, 124, 125, 126, 127, 128,
  1265. 129, 130, 131, 132, 133, 134, 135, 136,
  1266. 137, 138,
  1267. };
  1268. static const unsigned int lcd_data18_mux[] = {
  1269. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1270. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1271. LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
  1272. LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
  1273. LCDD16_MARK, LCDD17_MARK,
  1274. };
  1275. static const unsigned int lcd_data24_pins[] = {
  1276. /* D[0:23] */
  1277. 121, 122, 123, 124, 125, 126, 127, 128,
  1278. 129, 130, 131, 132, 133, 134, 135, 136,
  1279. 137, 138, 139, 140, 141, 142, 143, 144,
  1280. };
  1281. static const unsigned int lcd_data24_mux[] = {
  1282. LCDD0_MARK, LCDD1_MARK, LCDD2_MARK, LCDD3_MARK,
  1283. LCDD4_MARK, LCDD5_MARK, LCDD6_MARK, LCDD7_MARK,
  1284. LCDD8_MARK, LCDD9_MARK, LCDD10_MARK, LCDD11_MARK,
  1285. LCDD12_MARK, LCDD13_MARK, LCDD14_MARK, LCDD15_MARK,
  1286. LCDD16_MARK, LCDD17_MARK, LCDD18_MARK, LCDD19_MARK,
  1287. LCDD20_MARK, LCDD21_MARK, LCDD22_MARK, LCDD23_MARK,
  1288. };
  1289. static const unsigned int lcd_display_pins[] = {
  1290. /* DON */
  1291. 151,
  1292. };
  1293. static const unsigned int lcd_display_mux[] = {
  1294. LCDDON_MARK,
  1295. };
  1296. static const unsigned int lcd_lclk_pins[] = {
  1297. /* LCLK */
  1298. 150,
  1299. };
  1300. static const unsigned int lcd_lclk_mux[] = {
  1301. LCDLCLK_MARK,
  1302. };
  1303. static const unsigned int lcd_sync_pins[] = {
  1304. /* VSYN, HSYN, DCK, DISP */
  1305. 146, 145, 147, 149,
  1306. };
  1307. static const unsigned int lcd_sync_mux[] = {
  1308. LCDVSYN_MARK, LCDHSYN_MARK, LCDDCK_MARK, LCDDISP_MARK,
  1309. };
  1310. static const unsigned int lcd_sys_pins[] = {
  1311. /* CS, WR, RD, RS */
  1312. 145, 147, 148, 149,
  1313. };
  1314. static const unsigned int lcd_sys_mux[] = {
  1315. LCDCS_MARK, LCDWR_MARK, LCDRD_MARK, LCDRS_MARK,
  1316. };
  1317. /* - MMCIF ------------------------------------------------------------------ */
  1318. static const unsigned int mmc0_data1_0_pins[] = {
  1319. /* D[0] */
  1320. 84,
  1321. };
  1322. static const unsigned int mmc0_data1_0_mux[] = {
  1323. MMCD0_0_MARK,
  1324. };
  1325. static const unsigned int mmc0_data4_0_pins[] = {
  1326. /* D[0:3] */
  1327. 84, 85, 86, 87,
  1328. };
  1329. static const unsigned int mmc0_data4_0_mux[] = {
  1330. MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
  1331. };
  1332. static const unsigned int mmc0_data8_0_pins[] = {
  1333. /* D[0:7] */
  1334. 84, 85, 86, 87, 88, 89, 90, 91,
  1335. };
  1336. static const unsigned int mmc0_data8_0_mux[] = {
  1337. MMCD0_0_MARK, MMCD0_1_MARK, MMCD0_2_MARK, MMCD0_3_MARK,
  1338. MMCD0_4_MARK, MMCD0_5_MARK, MMCD0_6_MARK, MMCD0_7_MARK,
  1339. };
  1340. static const unsigned int mmc0_ctrl_0_pins[] = {
  1341. /* CMD, CLK */
  1342. 92, 99,
  1343. };
  1344. static const unsigned int mmc0_ctrl_0_mux[] = {
  1345. MMCCMD0_MARK, MMCCLK0_MARK,
  1346. };
  1347. static const unsigned int mmc0_data1_1_pins[] = {
  1348. /* D[0] */
  1349. 54,
  1350. };
  1351. static const unsigned int mmc0_data1_1_mux[] = {
  1352. MMCD1_0_MARK,
  1353. };
  1354. static const unsigned int mmc0_data4_1_pins[] = {
  1355. /* D[0:3] */
  1356. 54, 55, 56, 57,
  1357. };
  1358. static const unsigned int mmc0_data4_1_mux[] = {
  1359. MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
  1360. };
  1361. static const unsigned int mmc0_data8_1_pins[] = {
  1362. /* D[0:7] */
  1363. 54, 55, 56, 57, 58, 59, 60, 61,
  1364. };
  1365. static const unsigned int mmc0_data8_1_mux[] = {
  1366. MMCD1_0_MARK, MMCD1_1_MARK, MMCD1_2_MARK, MMCD1_3_MARK,
  1367. MMCD1_4_MARK, MMCD1_5_MARK, MMCD1_6_MARK, MMCD1_7_MARK,
  1368. };
  1369. static const unsigned int mmc0_ctrl_1_pins[] = {
  1370. /* CMD, CLK */
  1371. 67, 66,
  1372. };
  1373. static const unsigned int mmc0_ctrl_1_mux[] = {
  1374. MMCCMD1_MARK, MMCCLK1_MARK,
  1375. };
  1376. /* - SCIFA0 ----------------------------------------------------------------- */
  1377. static const unsigned int scifa0_data_pins[] = {
  1378. /* RXD, TXD */
  1379. 153, 152,
  1380. };
  1381. static const unsigned int scifa0_data_mux[] = {
  1382. SCIFA0_RXD_MARK, SCIFA0_TXD_MARK,
  1383. };
  1384. static const unsigned int scifa0_clk_pins[] = {
  1385. /* SCK */
  1386. 156,
  1387. };
  1388. static const unsigned int scifa0_clk_mux[] = {
  1389. SCIFA0_SCK_MARK,
  1390. };
  1391. static const unsigned int scifa0_ctrl_pins[] = {
  1392. /* RTS, CTS */
  1393. 157, 158,
  1394. };
  1395. static const unsigned int scifa0_ctrl_mux[] = {
  1396. SCIFA0_RTS_MARK, SCIFA0_CTS_MARK,
  1397. };
  1398. /* - SCIFA1 ----------------------------------------------------------------- */
  1399. static const unsigned int scifa1_data_pins[] = {
  1400. /* RXD, TXD */
  1401. 155, 154,
  1402. };
  1403. static const unsigned int scifa1_data_mux[] = {
  1404. SCIFA1_RXD_MARK, SCIFA1_TXD_MARK,
  1405. };
  1406. static const unsigned int scifa1_clk_pins[] = {
  1407. /* SCK */
  1408. 159,
  1409. };
  1410. static const unsigned int scifa1_clk_mux[] = {
  1411. SCIFA1_SCK_MARK,
  1412. };
  1413. static const unsigned int scifa1_ctrl_pins[] = {
  1414. /* RTS, CTS */
  1415. 160, 161,
  1416. };
  1417. static const unsigned int scifa1_ctrl_mux[] = {
  1418. SCIFA1_RTS_MARK, SCIFA1_CTS_MARK,
  1419. };
  1420. /* - SCIFA2 ----------------------------------------------------------------- */
  1421. static const unsigned int scifa2_data_pins[] = {
  1422. /* RXD, TXD */
  1423. 97, 96,
  1424. };
  1425. static const unsigned int scifa2_data_mux[] = {
  1426. SCIFA2_RXD1_MARK, SCIFA2_TXD1_MARK,
  1427. };
  1428. static const unsigned int scifa2_clk_pins[] = {
  1429. /* SCK */
  1430. 98,
  1431. };
  1432. static const unsigned int scifa2_clk_mux[] = {
  1433. SCIFA2_SCK1_MARK,
  1434. };
  1435. static const unsigned int scifa2_ctrl_pins[] = {
  1436. /* RTS, CTS */
  1437. 95, 94,
  1438. };
  1439. static const unsigned int scifa2_ctrl_mux[] = {
  1440. SCIFA2_RTS1_MARK, SCIFA2_CTS1_MARK,
  1441. };
  1442. /* - SCIFA3 ----------------------------------------------------------------- */
  1443. static const unsigned int scifa3_data_pins[] = {
  1444. /* RXD, TXD */
  1445. 144, 143,
  1446. };
  1447. static const unsigned int scifa3_data_mux[] = {
  1448. SCIFA3_RXD_MARK, SCIFA3_TXD_MARK,
  1449. };
  1450. static const unsigned int scifa3_clk_pins[] = {
  1451. /* SCK */
  1452. 142,
  1453. };
  1454. static const unsigned int scifa3_clk_mux[] = {
  1455. SCIFA3_SCK_MARK,
  1456. };
  1457. static const unsigned int scifa3_ctrl_0_pins[] = {
  1458. /* RTS, CTS */
  1459. 44, 43,
  1460. };
  1461. static const unsigned int scifa3_ctrl_0_mux[] = {
  1462. SCIFA3_RTS_44_MARK, SCIFA3_CTS_43_MARK,
  1463. };
  1464. static const unsigned int scifa3_ctrl_1_pins[] = {
  1465. /* RTS, CTS */
  1466. 141, 140,
  1467. };
  1468. static const unsigned int scifa3_ctrl_1_mux[] = {
  1469. SCIFA3_RTS_141_MARK, SCIFA3_CTS_140_MARK,
  1470. };
  1471. /* - SCIFA4 ----------------------------------------------------------------- */
  1472. static const unsigned int scifa4_data_pins[] = {
  1473. /* RXD, TXD */
  1474. 5, 6,
  1475. };
  1476. static const unsigned int scifa4_data_mux[] = {
  1477. SCIFA4_RXD_MARK, SCIFA4_TXD_MARK,
  1478. };
  1479. /* - SCIFA5 ----------------------------------------------------------------- */
  1480. static const unsigned int scifa5_data_pins[] = {
  1481. /* RXD, TXD */
  1482. 8, 12,
  1483. };
  1484. static const unsigned int scifa5_data_mux[] = {
  1485. SCIFA5_RXD_MARK, SCIFA5_TXD_MARK,
  1486. };
  1487. /* - SCIFB ------------------------------------------------------------------ */
  1488. static const unsigned int scifb_data_pins[] = {
  1489. /* RXD, TXD */
  1490. 166, 165,
  1491. };
  1492. static const unsigned int scifb_data_mux[] = {
  1493. SCIFB_RXD_MARK, SCIFB_TXD_MARK,
  1494. };
  1495. static const unsigned int scifb_clk_pins[] = {
  1496. /* SCK */
  1497. 162,
  1498. };
  1499. static const unsigned int scifb_clk_mux[] = {
  1500. SCIFB_SCK_MARK,
  1501. };
  1502. static const unsigned int scifb_ctrl_pins[] = {
  1503. /* RTS, CTS */
  1504. 163, 164,
  1505. };
  1506. static const unsigned int scifb_ctrl_mux[] = {
  1507. SCIFB_RTS_MARK, SCIFB_CTS_MARK,
  1508. };
  1509. /* - SDHI0 ------------------------------------------------------------------ */
  1510. static const unsigned int sdhi0_data1_pins[] = {
  1511. /* D0 */
  1512. 173,
  1513. };
  1514. static const unsigned int sdhi0_data1_mux[] = {
  1515. SDHID0_0_MARK,
  1516. };
  1517. static const unsigned int sdhi0_data4_pins[] = {
  1518. /* D[0:3] */
  1519. 173, 174, 175, 176,
  1520. };
  1521. static const unsigned int sdhi0_data4_mux[] = {
  1522. SDHID0_0_MARK, SDHID0_1_MARK, SDHID0_2_MARK, SDHID0_3_MARK,
  1523. };
  1524. static const unsigned int sdhi0_ctrl_pins[] = {
  1525. /* CMD, CLK */
  1526. 177, 171,
  1527. };
  1528. static const unsigned int sdhi0_ctrl_mux[] = {
  1529. SDHICMD0_MARK, SDHICLK0_MARK,
  1530. };
  1531. static const unsigned int sdhi0_cd_pins[] = {
  1532. /* CD */
  1533. 172,
  1534. };
  1535. static const unsigned int sdhi0_cd_mux[] = {
  1536. SDHICD0_MARK,
  1537. };
  1538. static const unsigned int sdhi0_wp_pins[] = {
  1539. /* WP */
  1540. 178,
  1541. };
  1542. static const unsigned int sdhi0_wp_mux[] = {
  1543. SDHIWP0_MARK,
  1544. };
  1545. /* - SDHI1 ------------------------------------------------------------------ */
  1546. static const unsigned int sdhi1_data1_pins[] = {
  1547. /* D0 */
  1548. 180,
  1549. };
  1550. static const unsigned int sdhi1_data1_mux[] = {
  1551. SDHID1_0_MARK,
  1552. };
  1553. static const unsigned int sdhi1_data4_pins[] = {
  1554. /* D[0:3] */
  1555. 180, 181, 182, 183,
  1556. };
  1557. static const unsigned int sdhi1_data4_mux[] = {
  1558. SDHID1_0_MARK, SDHID1_1_MARK, SDHID1_2_MARK, SDHID1_3_MARK,
  1559. };
  1560. static const unsigned int sdhi1_ctrl_pins[] = {
  1561. /* CMD, CLK */
  1562. 184, 179,
  1563. };
  1564. static const unsigned int sdhi1_ctrl_mux[] = {
  1565. SDHICMD1_MARK, SDHICLK1_MARK,
  1566. };
  1567. static const unsigned int sdhi2_data1_pins[] = {
  1568. /* D0 */
  1569. 186,
  1570. };
  1571. static const unsigned int sdhi2_data1_mux[] = {
  1572. SDHID2_0_MARK,
  1573. };
  1574. static const unsigned int sdhi2_data4_pins[] = {
  1575. /* D[0:3] */
  1576. 186, 187, 188, 189,
  1577. };
  1578. static const unsigned int sdhi2_data4_mux[] = {
  1579. SDHID2_0_MARK, SDHID2_1_MARK, SDHID2_2_MARK, SDHID2_3_MARK,
  1580. };
  1581. static const unsigned int sdhi2_ctrl_pins[] = {
  1582. /* CMD, CLK */
  1583. 190, 185,
  1584. };
  1585. static const unsigned int sdhi2_ctrl_mux[] = {
  1586. SDHICMD2_MARK, SDHICLK2_MARK,
  1587. };
  1588. /* - USB0 ------------------------------------------------------------------- */
  1589. static const unsigned int usb0_vbus_pins[] = {
  1590. /* VBUS */
  1591. 167,
  1592. };
  1593. static const unsigned int usb0_vbus_mux[] = {
  1594. VBUS0_0_MARK,
  1595. };
  1596. static const unsigned int usb0_otg_id_pins[] = {
  1597. /* IDIN */
  1598. 113,
  1599. };
  1600. static const unsigned int usb0_otg_id_mux[] = {
  1601. IDIN_0_MARK,
  1602. };
  1603. static const unsigned int usb0_otg_ctrl_pins[] = {
  1604. /* PWEN, EXTLP, OVCN, OVCN2 */
  1605. 116, 114, 117, 115,
  1606. };
  1607. static const unsigned int usb0_otg_ctrl_mux[] = {
  1608. PWEN_0_MARK, EXTLP_0_MARK, OVCN_0_MARK, OVCN2_0_MARK,
  1609. };
  1610. /* - USB1 ------------------------------------------------------------------- */
  1611. static const unsigned int usb1_vbus_pins[] = {
  1612. /* VBUS */
  1613. 168,
  1614. };
  1615. static const unsigned int usb1_vbus_mux[] = {
  1616. VBUS0_1_MARK,
  1617. };
  1618. static const unsigned int usb1_otg_id_0_pins[] = {
  1619. /* IDIN */
  1620. 113,
  1621. };
  1622. static const unsigned int usb1_otg_id_0_mux[] = {
  1623. IDIN_1_113_MARK,
  1624. };
  1625. static const unsigned int usb1_otg_id_1_pins[] = {
  1626. /* IDIN */
  1627. 18,
  1628. };
  1629. static const unsigned int usb1_otg_id_1_mux[] = {
  1630. IDIN_1_18_MARK,
  1631. };
  1632. static const unsigned int usb1_otg_ctrl_0_pins[] = {
  1633. /* PWEN, EXTLP, OVCN, OVCN2 */
  1634. 115, 116, 114, 117, 113,
  1635. };
  1636. static const unsigned int usb1_otg_ctrl_0_mux[] = {
  1637. PWEN_1_115_MARK, EXTLP_1_MARK, OVCN_1_114_MARK, OVCN2_1_MARK,
  1638. };
  1639. static const unsigned int usb1_otg_ctrl_1_pins[] = {
  1640. /* PWEN, EXTLP, OVCN, OVCN2 */
  1641. 138, 116, 162, 117, 18,
  1642. };
  1643. static const unsigned int usb1_otg_ctrl_1_mux[] = {
  1644. PWEN_1_138_MARK, EXTLP_1_MARK, OVCN_1_162_MARK, OVCN2_1_MARK,
  1645. };
  1646. static const struct sh_pfc_pin_group pinmux_groups[] = {
  1647. SH_PFC_PIN_GROUP(bsc_data8),
  1648. SH_PFC_PIN_GROUP(bsc_data16),
  1649. SH_PFC_PIN_GROUP(bsc_cs0),
  1650. SH_PFC_PIN_GROUP(bsc_cs2),
  1651. SH_PFC_PIN_GROUP(bsc_cs4),
  1652. SH_PFC_PIN_GROUP(bsc_cs5a),
  1653. SH_PFC_PIN_GROUP(bsc_cs5b),
  1654. SH_PFC_PIN_GROUP(bsc_cs6a),
  1655. SH_PFC_PIN_GROUP(bsc_rd_we8),
  1656. SH_PFC_PIN_GROUP(bsc_rd_we16),
  1657. SH_PFC_PIN_GROUP(bsc_bs),
  1658. SH_PFC_PIN_GROUP(bsc_rdwr),
  1659. SH_PFC_PIN_GROUP(ceu_data_0_7),
  1660. SH_PFC_PIN_GROUP(ceu_data_8_15),
  1661. SH_PFC_PIN_GROUP(ceu_clk_0),
  1662. SH_PFC_PIN_GROUP(ceu_clk_1),
  1663. SH_PFC_PIN_GROUP(ceu_clk_2),
  1664. SH_PFC_PIN_GROUP(ceu_sync),
  1665. SH_PFC_PIN_GROUP(ceu_field),
  1666. SH_PFC_PIN_GROUP(flctl_data),
  1667. SH_PFC_PIN_GROUP(flctl_ce0),
  1668. SH_PFC_PIN_GROUP(flctl_ce1),
  1669. SH_PFC_PIN_GROUP(flctl_ctrl),
  1670. SH_PFC_PIN_GROUP(fsia_mclk_in),
  1671. SH_PFC_PIN_GROUP(fsia_mclk_out),
  1672. SH_PFC_PIN_GROUP(fsia_sclk_in),
  1673. SH_PFC_PIN_GROUP(fsia_sclk_out),
  1674. SH_PFC_PIN_GROUP(fsia_data_in),
  1675. SH_PFC_PIN_GROUP(fsia_data_out),
  1676. SH_PFC_PIN_GROUP(fsia_spdif_0),
  1677. SH_PFC_PIN_GROUP(fsia_spdif_1),
  1678. SH_PFC_PIN_GROUP(fsib_mclk_in),
  1679. SH_PFC_PIN_GROUP(hdmi),
  1680. SH_PFC_PIN_GROUP(intc_irq0_0),
  1681. SH_PFC_PIN_GROUP(intc_irq0_1),
  1682. SH_PFC_PIN_GROUP(intc_irq1),
  1683. SH_PFC_PIN_GROUP(intc_irq2_0),
  1684. SH_PFC_PIN_GROUP(intc_irq2_1),
  1685. SH_PFC_PIN_GROUP(intc_irq3_0),
  1686. SH_PFC_PIN_GROUP(intc_irq3_1),
  1687. SH_PFC_PIN_GROUP(intc_irq4_0),
  1688. SH_PFC_PIN_GROUP(intc_irq4_1),
  1689. SH_PFC_PIN_GROUP(intc_irq5),
  1690. SH_PFC_PIN_GROUP(intc_irq6_0),
  1691. SH_PFC_PIN_GROUP(intc_irq6_1),
  1692. SH_PFC_PIN_GROUP(intc_irq7_0),
  1693. SH_PFC_PIN_GROUP(intc_irq7_1),
  1694. SH_PFC_PIN_GROUP(intc_irq8_0),
  1695. SH_PFC_PIN_GROUP(intc_irq8_1),
  1696. SH_PFC_PIN_GROUP(intc_irq9_0),
  1697. SH_PFC_PIN_GROUP(intc_irq9_1),
  1698. SH_PFC_PIN_GROUP(intc_irq10),
  1699. SH_PFC_PIN_GROUP(intc_irq11),
  1700. SH_PFC_PIN_GROUP(intc_irq12_0),
  1701. SH_PFC_PIN_GROUP(intc_irq12_1),
  1702. SH_PFC_PIN_GROUP(intc_irq13_0),
  1703. SH_PFC_PIN_GROUP(intc_irq13_1),
  1704. SH_PFC_PIN_GROUP(intc_irq14_0),
  1705. SH_PFC_PIN_GROUP(intc_irq14_1),
  1706. SH_PFC_PIN_GROUP(intc_irq15_0),
  1707. SH_PFC_PIN_GROUP(intc_irq15_1),
  1708. SH_PFC_PIN_GROUP(intc_irq16_0),
  1709. SH_PFC_PIN_GROUP(intc_irq16_1),
  1710. SH_PFC_PIN_GROUP(intc_irq17),
  1711. SH_PFC_PIN_GROUP(intc_irq18),
  1712. SH_PFC_PIN_GROUP(intc_irq19),
  1713. SH_PFC_PIN_GROUP(intc_irq20),
  1714. SH_PFC_PIN_GROUP(intc_irq21),
  1715. SH_PFC_PIN_GROUP(intc_irq22),
  1716. SH_PFC_PIN_GROUP(intc_irq23),
  1717. SH_PFC_PIN_GROUP(intc_irq24),
  1718. SH_PFC_PIN_GROUP(intc_irq25),
  1719. SH_PFC_PIN_GROUP(intc_irq26_0),
  1720. SH_PFC_PIN_GROUP(intc_irq26_1),
  1721. SH_PFC_PIN_GROUP(intc_irq27_0),
  1722. SH_PFC_PIN_GROUP(intc_irq27_1),
  1723. SH_PFC_PIN_GROUP(intc_irq28_0),
  1724. SH_PFC_PIN_GROUP(intc_irq28_1),
  1725. SH_PFC_PIN_GROUP(intc_irq29_0),
  1726. SH_PFC_PIN_GROUP(intc_irq29_1),
  1727. SH_PFC_PIN_GROUP(intc_irq30_0),
  1728. SH_PFC_PIN_GROUP(intc_irq30_1),
  1729. SH_PFC_PIN_GROUP(intc_irq31_0),
  1730. SH_PFC_PIN_GROUP(intc_irq31_1),
  1731. SH_PFC_PIN_GROUP(keysc_in04_0),
  1732. SH_PFC_PIN_GROUP(keysc_in04_1),
  1733. SH_PFC_PIN_GROUP(keysc_in5),
  1734. SH_PFC_PIN_GROUP(keysc_in6),
  1735. SH_PFC_PIN_GROUP(keysc_in7),
  1736. SH_PFC_PIN_GROUP(keysc_out4),
  1737. SH_PFC_PIN_GROUP(keysc_out5),
  1738. SH_PFC_PIN_GROUP(keysc_out6),
  1739. SH_PFC_PIN_GROUP(keysc_out8),
  1740. SH_PFC_PIN_GROUP(lcd_data8),
  1741. SH_PFC_PIN_GROUP(lcd_data9),
  1742. SH_PFC_PIN_GROUP(lcd_data12),
  1743. SH_PFC_PIN_GROUP(lcd_data16),
  1744. SH_PFC_PIN_GROUP(lcd_data18),
  1745. SH_PFC_PIN_GROUP(lcd_data24),
  1746. SH_PFC_PIN_GROUP(lcd_display),
  1747. SH_PFC_PIN_GROUP(lcd_lclk),
  1748. SH_PFC_PIN_GROUP(lcd_sync),
  1749. SH_PFC_PIN_GROUP(lcd_sys),
  1750. SH_PFC_PIN_GROUP(mmc0_data1_0),
  1751. SH_PFC_PIN_GROUP(mmc0_data4_0),
  1752. SH_PFC_PIN_GROUP(mmc0_data8_0),
  1753. SH_PFC_PIN_GROUP(mmc0_ctrl_0),
  1754. SH_PFC_PIN_GROUP(mmc0_data1_1),
  1755. SH_PFC_PIN_GROUP(mmc0_data4_1),
  1756. SH_PFC_PIN_GROUP(mmc0_data8_1),
  1757. SH_PFC_PIN_GROUP(mmc0_ctrl_1),
  1758. SH_PFC_PIN_GROUP(scifa0_data),
  1759. SH_PFC_PIN_GROUP(scifa0_clk),
  1760. SH_PFC_PIN_GROUP(scifa0_ctrl),
  1761. SH_PFC_PIN_GROUP(scifa1_data),
  1762. SH_PFC_PIN_GROUP(scifa1_clk),
  1763. SH_PFC_PIN_GROUP(scifa1_ctrl),
  1764. SH_PFC_PIN_GROUP(scifa2_data),
  1765. SH_PFC_PIN_GROUP(scifa2_clk),
  1766. SH_PFC_PIN_GROUP(scifa2_ctrl),
  1767. SH_PFC_PIN_GROUP(scifa3_data),
  1768. SH_PFC_PIN_GROUP(scifa3_clk),
  1769. SH_PFC_PIN_GROUP(scifa3_ctrl_0),
  1770. SH_PFC_PIN_GROUP(scifa3_ctrl_1),
  1771. SH_PFC_PIN_GROUP(scifa4_data),
  1772. SH_PFC_PIN_GROUP(scifa5_data),
  1773. SH_PFC_PIN_GROUP(scifb_data),
  1774. SH_PFC_PIN_GROUP(scifb_clk),
  1775. SH_PFC_PIN_GROUP(scifb_ctrl),
  1776. SH_PFC_PIN_GROUP(sdhi0_data1),
  1777. SH_PFC_PIN_GROUP(sdhi0_data4),
  1778. SH_PFC_PIN_GROUP(sdhi0_ctrl),
  1779. SH_PFC_PIN_GROUP(sdhi0_cd),
  1780. SH_PFC_PIN_GROUP(sdhi0_wp),
  1781. SH_PFC_PIN_GROUP(sdhi1_data1),
  1782. SH_PFC_PIN_GROUP(sdhi1_data4),
  1783. SH_PFC_PIN_GROUP(sdhi1_ctrl),
  1784. SH_PFC_PIN_GROUP(sdhi2_data1),
  1785. SH_PFC_PIN_GROUP(sdhi2_data4),
  1786. SH_PFC_PIN_GROUP(sdhi2_ctrl),
  1787. SH_PFC_PIN_GROUP(usb0_vbus),
  1788. SH_PFC_PIN_GROUP(usb0_otg_id),
  1789. SH_PFC_PIN_GROUP(usb0_otg_ctrl),
  1790. SH_PFC_PIN_GROUP(usb1_vbus),
  1791. SH_PFC_PIN_GROUP(usb1_otg_id_0),
  1792. SH_PFC_PIN_GROUP(usb1_otg_id_1),
  1793. SH_PFC_PIN_GROUP(usb1_otg_ctrl_0),
  1794. SH_PFC_PIN_GROUP(usb1_otg_ctrl_1),
  1795. };
  1796. static const char * const bsc_groups[] = {
  1797. "bsc_data8",
  1798. "bsc_data16",
  1799. "bsc_cs0",
  1800. "bsc_cs2",
  1801. "bsc_cs4",
  1802. "bsc_cs5a",
  1803. "bsc_cs5b",
  1804. "bsc_cs6a",
  1805. "bsc_rd_we8",
  1806. "bsc_rd_we16",
  1807. "bsc_bs",
  1808. "bsc_rdwr",
  1809. };
  1810. static const char * const ceu_groups[] = {
  1811. "ceu_data_0_7",
  1812. "ceu_data_8_15",
  1813. "ceu_clk_0",
  1814. "ceu_clk_1",
  1815. "ceu_clk_2",
  1816. "ceu_sync",
  1817. "ceu_field",
  1818. };
  1819. static const char * const flctl_groups[] = {
  1820. "flctl_data",
  1821. "flctl_ce0",
  1822. "flctl_ce1",
  1823. "flctl_ctrl",
  1824. };
  1825. static const char * const fsia_groups[] = {
  1826. "fsia_mclk_in",
  1827. "fsia_mclk_out",
  1828. "fsia_sclk_in",
  1829. "fsia_sclk_out",
  1830. "fsia_data_in",
  1831. "fsia_data_out",
  1832. "fsia_spdif_0",
  1833. "fsia_spdif_1",
  1834. };
  1835. static const char * const fsib_groups[] = {
  1836. "fsib_mclk_in",
  1837. };
  1838. static const char * const hdmi_groups[] = {
  1839. "hdmi",
  1840. };
  1841. static const char * const intc_groups[] = {
  1842. "intc_irq0_0",
  1843. "intc_irq0_1",
  1844. "intc_irq1",
  1845. "intc_irq2_0",
  1846. "intc_irq2_1",
  1847. "intc_irq3_0",
  1848. "intc_irq3_1",
  1849. "intc_irq4_0",
  1850. "intc_irq4_1",
  1851. "intc_irq5",
  1852. "intc_irq6_0",
  1853. "intc_irq6_1",
  1854. "intc_irq7_0",
  1855. "intc_irq7_1",
  1856. "intc_irq8_0",
  1857. "intc_irq8_1",
  1858. "intc_irq9_0",
  1859. "intc_irq9_1",
  1860. "intc_irq10",
  1861. "intc_irq11",
  1862. "intc_irq12_0",
  1863. "intc_irq12_1",
  1864. "intc_irq13_0",
  1865. "intc_irq13_1",
  1866. "intc_irq14_0",
  1867. "intc_irq14_1",
  1868. "intc_irq15_0",
  1869. "intc_irq15_1",
  1870. "intc_irq16_0",
  1871. "intc_irq16_1",
  1872. "intc_irq17",
  1873. "intc_irq18",
  1874. "intc_irq19",
  1875. "intc_irq20",
  1876. "intc_irq21",
  1877. "intc_irq22",
  1878. "intc_irq23",
  1879. "intc_irq24",
  1880. "intc_irq25",
  1881. "intc_irq26_0",
  1882. "intc_irq26_1",
  1883. "intc_irq27_0",
  1884. "intc_irq27_1",
  1885. "intc_irq28_0",
  1886. "intc_irq28_1",
  1887. "intc_irq29_0",
  1888. "intc_irq29_1",
  1889. "intc_irq30_0",
  1890. "intc_irq30_1",
  1891. "intc_irq31_0",
  1892. "intc_irq31_1",
  1893. };
  1894. static const char * const keysc_groups[] = {
  1895. "keysc_in04_0",
  1896. "keysc_in04_1",
  1897. "keysc_in5",
  1898. "keysc_in6",
  1899. "keysc_in7",
  1900. "keysc_out4",
  1901. "keysc_out5",
  1902. "keysc_out6",
  1903. "keysc_out8",
  1904. };
  1905. static const char * const lcd_groups[] = {
  1906. "lcd_data8",
  1907. "lcd_data9",
  1908. "lcd_data12",
  1909. "lcd_data16",
  1910. "lcd_data18",
  1911. "lcd_data24",
  1912. "lcd_display",
  1913. "lcd_lclk",
  1914. "lcd_sync",
  1915. "lcd_sys",
  1916. };
  1917. static const char * const mmc0_groups[] = {
  1918. "mmc0_data1_0",
  1919. "mmc0_data4_0",
  1920. "mmc0_data8_0",
  1921. "mmc0_ctrl_0",
  1922. "mmc0_data1_1",
  1923. "mmc0_data4_1",
  1924. "mmc0_data8_1",
  1925. "mmc0_ctrl_1",
  1926. };
  1927. static const char * const scifa0_groups[] = {
  1928. "scifa0_data",
  1929. "scifa0_clk",
  1930. "scifa0_ctrl",
  1931. };
  1932. static const char * const scifa1_groups[] = {
  1933. "scifa1_data",
  1934. "scifa1_clk",
  1935. "scifa1_ctrl",
  1936. };
  1937. static const char * const scifa2_groups[] = {
  1938. "scifa2_data",
  1939. "scifa2_clk",
  1940. "scifa2_ctrl",
  1941. };
  1942. static const char * const scifa3_groups[] = {
  1943. "scifa3_data",
  1944. "scifa3_clk",
  1945. "scifa3_ctrl_0",
  1946. "scifa3_ctrl_1",
  1947. };
  1948. static const char * const scifa4_groups[] = {
  1949. "scifa4_data",
  1950. };
  1951. static const char * const scifa5_groups[] = {
  1952. "scifa5_data",
  1953. };
  1954. static const char * const scifb_groups[] = {
  1955. "scifb_data",
  1956. "scifb_clk",
  1957. "scifb_ctrl",
  1958. };
  1959. static const char * const sdhi0_groups[] = {
  1960. "sdhi0_data1",
  1961. "sdhi0_data4",
  1962. "sdhi0_ctrl",
  1963. "sdhi0_cd",
  1964. "sdhi0_wp",
  1965. };
  1966. static const char * const sdhi1_groups[] = {
  1967. "sdhi1_data1",
  1968. "sdhi1_data4",
  1969. "sdhi1_ctrl",
  1970. };
  1971. static const char * const sdhi2_groups[] = {
  1972. "sdhi2_data1",
  1973. "sdhi2_data4",
  1974. "sdhi2_ctrl",
  1975. };
  1976. static const char * const usb0_groups[] = {
  1977. "usb0_vbus",
  1978. "usb0_otg_id",
  1979. "usb0_otg_ctrl",
  1980. };
  1981. static const char * const usb1_groups[] = {
  1982. "usb1_vbus",
  1983. "usb1_otg_id_0",
  1984. "usb1_otg_id_1",
  1985. "usb1_otg_ctrl_0",
  1986. "usb1_otg_ctrl_1",
  1987. };
  1988. static const struct sh_pfc_function pinmux_functions[] = {
  1989. SH_PFC_FUNCTION(bsc),
  1990. SH_PFC_FUNCTION(ceu),
  1991. SH_PFC_FUNCTION(flctl),
  1992. SH_PFC_FUNCTION(fsia),
  1993. SH_PFC_FUNCTION(fsib),
  1994. SH_PFC_FUNCTION(hdmi),
  1995. SH_PFC_FUNCTION(intc),
  1996. SH_PFC_FUNCTION(keysc),
  1997. SH_PFC_FUNCTION(lcd),
  1998. SH_PFC_FUNCTION(mmc0),
  1999. SH_PFC_FUNCTION(scifa0),
  2000. SH_PFC_FUNCTION(scifa1),
  2001. SH_PFC_FUNCTION(scifa2),
  2002. SH_PFC_FUNCTION(scifa3),
  2003. SH_PFC_FUNCTION(scifa4),
  2004. SH_PFC_FUNCTION(scifa5),
  2005. SH_PFC_FUNCTION(scifb),
  2006. SH_PFC_FUNCTION(sdhi0),
  2007. SH_PFC_FUNCTION(sdhi1),
  2008. SH_PFC_FUNCTION(sdhi2),
  2009. SH_PFC_FUNCTION(usb0),
  2010. SH_PFC_FUNCTION(usb1),
  2011. };
  2012. #define PINMUX_FN_BASE ARRAY_SIZE(pinmux_pins)
  2013. static const struct pinmux_func pinmux_func_gpios[] = {
  2014. /* IRQ */
  2015. GPIO_FN(IRQ0_6), GPIO_FN(IRQ0_162), GPIO_FN(IRQ1),
  2016. GPIO_FN(IRQ2_4), GPIO_FN(IRQ2_5), GPIO_FN(IRQ3_8),
  2017. GPIO_FN(IRQ3_16), GPIO_FN(IRQ4_17), GPIO_FN(IRQ4_163),
  2018. GPIO_FN(IRQ5), GPIO_FN(IRQ6_39), GPIO_FN(IRQ6_164),
  2019. GPIO_FN(IRQ7_40), GPIO_FN(IRQ7_167), GPIO_FN(IRQ8_41),
  2020. GPIO_FN(IRQ8_168), GPIO_FN(IRQ9_42), GPIO_FN(IRQ9_169),
  2021. GPIO_FN(IRQ10), GPIO_FN(IRQ11), GPIO_FN(IRQ12_80),
  2022. GPIO_FN(IRQ12_137), GPIO_FN(IRQ13_81), GPIO_FN(IRQ13_145),
  2023. GPIO_FN(IRQ14_82), GPIO_FN(IRQ14_146), GPIO_FN(IRQ15_83),
  2024. GPIO_FN(IRQ15_147), GPIO_FN(IRQ16_84), GPIO_FN(IRQ16_170),
  2025. GPIO_FN(IRQ17), GPIO_FN(IRQ18), GPIO_FN(IRQ19),
  2026. GPIO_FN(IRQ20), GPIO_FN(IRQ21), GPIO_FN(IRQ22),
  2027. GPIO_FN(IRQ23), GPIO_FN(IRQ24), GPIO_FN(IRQ25),
  2028. GPIO_FN(IRQ26_121), GPIO_FN(IRQ26_172), GPIO_FN(IRQ27_122),
  2029. GPIO_FN(IRQ27_180), GPIO_FN(IRQ28_123), GPIO_FN(IRQ28_181),
  2030. GPIO_FN(IRQ29_129), GPIO_FN(IRQ29_182), GPIO_FN(IRQ30_130),
  2031. GPIO_FN(IRQ30_183), GPIO_FN(IRQ31_138), GPIO_FN(IRQ31_184),
  2032. /* MSIOF0 */
  2033. GPIO_FN(MSIOF0_TSYNC), GPIO_FN(MSIOF0_TSCK), GPIO_FN(MSIOF0_RXD),
  2034. GPIO_FN(MSIOF0_RSCK), GPIO_FN(MSIOF0_RSYNC), GPIO_FN(MSIOF0_MCK0),
  2035. GPIO_FN(MSIOF0_MCK1), GPIO_FN(MSIOF0_SS1), GPIO_FN(MSIOF0_SS2),
  2036. GPIO_FN(MSIOF0_TXD),
  2037. /* MSIOF1 */
  2038. GPIO_FN(MSIOF1_TSCK_39), GPIO_FN(MSIOF1_TSCK_88),
  2039. GPIO_FN(MSIOF1_TSYNC_40), GPIO_FN(MSIOF1_TSYNC_89),
  2040. GPIO_FN(MSIOF1_TXD_41), GPIO_FN(MSIOF1_TXD_90),
  2041. GPIO_FN(MSIOF1_RXD_42), GPIO_FN(MSIOF1_RXD_91),
  2042. GPIO_FN(MSIOF1_SS1_43), GPIO_FN(MSIOF1_SS1_92),
  2043. GPIO_FN(MSIOF1_SS2_44), GPIO_FN(MSIOF1_SS2_93),
  2044. GPIO_FN(MSIOF1_RSCK), GPIO_FN(MSIOF1_RSYNC),
  2045. GPIO_FN(MSIOF1_MCK0), GPIO_FN(MSIOF1_MCK1),
  2046. /* MSIOF2 */
  2047. GPIO_FN(MSIOF2_RSCK), GPIO_FN(MSIOF2_RSYNC), GPIO_FN(MSIOF2_MCK0),
  2048. GPIO_FN(MSIOF2_MCK1), GPIO_FN(MSIOF2_SS1), GPIO_FN(MSIOF2_SS2),
  2049. GPIO_FN(MSIOF2_TSYNC), GPIO_FN(MSIOF2_TSCK), GPIO_FN(MSIOF2_RXD),
  2050. GPIO_FN(MSIOF2_TXD),
  2051. /* BBIF1 */
  2052. GPIO_FN(BBIF1_RXD), GPIO_FN(BBIF1_TSYNC), GPIO_FN(BBIF1_TSCK),
  2053. GPIO_FN(BBIF1_TXD), GPIO_FN(BBIF1_RSCK), GPIO_FN(BBIF1_RSYNC),
  2054. GPIO_FN(BBIF1_FLOW), GPIO_FN(BB_RX_FLOW_N),
  2055. /* BBIF2 */
  2056. GPIO_FN(BBIF2_TSCK1), GPIO_FN(BBIF2_TSYNC1),
  2057. GPIO_FN(BBIF2_TXD1), GPIO_FN(BBIF2_RXD),
  2058. /* FSI */
  2059. GPIO_FN(FSIACK), GPIO_FN(FSIBCK), GPIO_FN(FSIAILR),
  2060. GPIO_FN(FSIAIBT), GPIO_FN(FSIAISLD), GPIO_FN(FSIAOMC),
  2061. GPIO_FN(FSIAOLR), GPIO_FN(FSIAOBT), GPIO_FN(FSIAOSLD),
  2062. GPIO_FN(FSIASPDIF_11), GPIO_FN(FSIASPDIF_15),
  2063. /* FMSI */
  2064. GPIO_FN(FMSOCK), GPIO_FN(FMSOOLR), GPIO_FN(FMSIOLR),
  2065. GPIO_FN(FMSOOBT), GPIO_FN(FMSIOBT), GPIO_FN(FMSOSLD),
  2066. GPIO_FN(FMSOILR), GPIO_FN(FMSIILR), GPIO_FN(FMSOIBT),
  2067. GPIO_FN(FMSIIBT), GPIO_FN(FMSISLD), GPIO_FN(FMSICK),
  2068. /* SCIFA0 */
  2069. GPIO_FN(SCIFA0_TXD), GPIO_FN(SCIFA0_RXD), GPIO_FN(SCIFA0_SCK),
  2070. GPIO_FN(SCIFA0_RTS), GPIO_FN(SCIFA0_CTS),
  2071. /* SCIFA1 */
  2072. GPIO_FN(SCIFA1_TXD), GPIO_FN(SCIFA1_RXD), GPIO_FN(SCIFA1_SCK),
  2073. GPIO_FN(SCIFA1_RTS), GPIO_FN(SCIFA1_CTS),
  2074. /* SCIFA2 */
  2075. GPIO_FN(SCIFA2_CTS1), GPIO_FN(SCIFA2_RTS1), GPIO_FN(SCIFA2_TXD1),
  2076. GPIO_FN(SCIFA2_RXD1), GPIO_FN(SCIFA2_SCK1),
  2077. /* SCIFA3 */
  2078. GPIO_FN(SCIFA3_CTS_43), GPIO_FN(SCIFA3_CTS_140),
  2079. GPIO_FN(SCIFA3_RTS_44), GPIO_FN(SCIFA3_RTS_141),
  2080. GPIO_FN(SCIFA3_SCK), GPIO_FN(SCIFA3_TXD),
  2081. GPIO_FN(SCIFA3_RXD),
  2082. /* SCIFA4 */
  2083. GPIO_FN(SCIFA4_RXD), GPIO_FN(SCIFA4_TXD),
  2084. /* SCIFA5 */
  2085. GPIO_FN(SCIFA5_RXD), GPIO_FN(SCIFA5_TXD),
  2086. /* SCIFB */
  2087. GPIO_FN(SCIFB_SCK), GPIO_FN(SCIFB_RTS), GPIO_FN(SCIFB_CTS),
  2088. GPIO_FN(SCIFB_TXD), GPIO_FN(SCIFB_RXD),
  2089. /* CEU */
  2090. GPIO_FN(VIO_HD), GPIO_FN(VIO_CKO1), GPIO_FN(VIO_CKO2),
  2091. GPIO_FN(VIO_VD), GPIO_FN(VIO_CLK), GPIO_FN(VIO_FIELD),
  2092. GPIO_FN(VIO_CKO), GPIO_FN(VIO_D0), GPIO_FN(VIO_D1),
  2093. GPIO_FN(VIO_D2), GPIO_FN(VIO_D3), GPIO_FN(VIO_D4),
  2094. GPIO_FN(VIO_D5), GPIO_FN(VIO_D6), GPIO_FN(VIO_D7),
  2095. GPIO_FN(VIO_D8), GPIO_FN(VIO_D9), GPIO_FN(VIO_D10),
  2096. GPIO_FN(VIO_D11), GPIO_FN(VIO_D12), GPIO_FN(VIO_D13),
  2097. GPIO_FN(VIO_D14), GPIO_FN(VIO_D15),
  2098. /* USB0 */
  2099. GPIO_FN(IDIN_0), GPIO_FN(EXTLP_0), GPIO_FN(OVCN2_0),
  2100. GPIO_FN(PWEN_0), GPIO_FN(OVCN_0), GPIO_FN(VBUS0_0),
  2101. /* USB1 */
  2102. GPIO_FN(IDIN_1_18), GPIO_FN(IDIN_1_113),
  2103. GPIO_FN(OVCN_1_114), GPIO_FN(OVCN_1_162),
  2104. GPIO_FN(PWEN_1_115), GPIO_FN(PWEN_1_138),
  2105. GPIO_FN(EXTLP_1), GPIO_FN(OVCN2_1),
  2106. GPIO_FN(VBUS0_1),
  2107. /* GPIO */
  2108. GPIO_FN(GPI0), GPIO_FN(GPI1), GPIO_FN(GPO0), GPIO_FN(GPO1),
  2109. /* BSC */
  2110. GPIO_FN(BS), GPIO_FN(WE1), GPIO_FN(CKO),
  2111. GPIO_FN(WAIT), GPIO_FN(RDWR),
  2112. GPIO_FN(A0), GPIO_FN(A1), GPIO_FN(A2),
  2113. GPIO_FN(A3), GPIO_FN(A6), GPIO_FN(A7),
  2114. GPIO_FN(A8), GPIO_FN(A9), GPIO_FN(A10),
  2115. GPIO_FN(A11), GPIO_FN(A12), GPIO_FN(A13),
  2116. GPIO_FN(A14), GPIO_FN(A15), GPIO_FN(A16),
  2117. GPIO_FN(A17), GPIO_FN(A18), GPIO_FN(A19),
  2118. GPIO_FN(A20), GPIO_FN(A21), GPIO_FN(A22),
  2119. GPIO_FN(A23), GPIO_FN(A24), GPIO_FN(A25),
  2120. GPIO_FN(A26),
  2121. GPIO_FN(CS0), GPIO_FN(CS2), GPIO_FN(CS4),
  2122. GPIO_FN(CS5A), GPIO_FN(CS5B), GPIO_FN(CS6A),
  2123. /* BSC/FLCTL */
  2124. GPIO_FN(RD_FSC), GPIO_FN(WE0_FWE), GPIO_FN(A4_FOE),
  2125. GPIO_FN(A5_FCDE), GPIO_FN(D0_NAF0), GPIO_FN(D1_NAF1),
  2126. GPIO_FN(D2_NAF2), GPIO_FN(D3_NAF3), GPIO_FN(D4_NAF4),
  2127. GPIO_FN(D5_NAF5), GPIO_FN(D6_NAF6), GPIO_FN(D7_NAF7),
  2128. GPIO_FN(D8_NAF8), GPIO_FN(D9_NAF9), GPIO_FN(D10_NAF10),
  2129. GPIO_FN(D11_NAF11), GPIO_FN(D12_NAF12), GPIO_FN(D13_NAF13),
  2130. GPIO_FN(D14_NAF14), GPIO_FN(D15_NAF15),
  2131. /* SPU2 */
  2132. GPIO_FN(VINT_I),
  2133. /* FLCTL */
  2134. GPIO_FN(FCE1), GPIO_FN(FCE0), GPIO_FN(FRB),
  2135. /* HSI */
  2136. GPIO_FN(GP_RX_FLAG), GPIO_FN(GP_RX_DATA), GPIO_FN(GP_TX_READY),
  2137. GPIO_FN(GP_RX_WAKE), GPIO_FN(MP_TX_FLAG), GPIO_FN(MP_TX_DATA),
  2138. GPIO_FN(MP_RX_READY), GPIO_FN(MP_TX_WAKE),
  2139. /* MFI */
  2140. GPIO_FN(MFIv6),
  2141. GPIO_FN(MFIv4),
  2142. GPIO_FN(MEMC_BUSCLK_MEMC_A0), GPIO_FN(MEMC_ADV_MEMC_DREQ0),
  2143. GPIO_FN(MEMC_WAIT_MEMC_DREQ1), GPIO_FN(MEMC_CS1_MEMC_A1),
  2144. GPIO_FN(MEMC_CS0), GPIO_FN(MEMC_NOE),
  2145. GPIO_FN(MEMC_NWE), GPIO_FN(MEMC_INT),
  2146. GPIO_FN(MEMC_AD0), GPIO_FN(MEMC_AD1), GPIO_FN(MEMC_AD2),
  2147. GPIO_FN(MEMC_AD3), GPIO_FN(MEMC_AD4), GPIO_FN(MEMC_AD5),
  2148. GPIO_FN(MEMC_AD6), GPIO_FN(MEMC_AD7), GPIO_FN(MEMC_AD8),
  2149. GPIO_FN(MEMC_AD9), GPIO_FN(MEMC_AD10), GPIO_FN(MEMC_AD11),
  2150. GPIO_FN(MEMC_AD12), GPIO_FN(MEMC_AD13), GPIO_FN(MEMC_AD14),
  2151. GPIO_FN(MEMC_AD15),
  2152. /* SIM */
  2153. GPIO_FN(SIM_RST), GPIO_FN(SIM_CLK), GPIO_FN(SIM_D),
  2154. /* TPU */
  2155. GPIO_FN(TPU0TO0), GPIO_FN(TPU0TO1), GPIO_FN(TPU0TO2_93),
  2156. GPIO_FN(TPU0TO2_99), GPIO_FN(TPU0TO3),
  2157. /* I2C2 */
  2158. GPIO_FN(I2C_SCL2), GPIO_FN(I2C_SDA2),
  2159. /* I2C3(1) */
  2160. GPIO_FN(I2C_SCL3), GPIO_FN(I2C_SDA3),
  2161. /* I2C3(2) */
  2162. GPIO_FN(I2C_SCL3S), GPIO_FN(I2C_SDA3S),
  2163. /* I2C4(2) */
  2164. GPIO_FN(I2C_SCL4), GPIO_FN(I2C_SDA4),
  2165. /* I2C4(2) */
  2166. GPIO_FN(I2C_SCL4S), GPIO_FN(I2C_SDA4S),
  2167. /* KEYSC */
  2168. GPIO_FN(KEYOUT0), GPIO_FN(KEYIN0_121), GPIO_FN(KEYIN0_136),
  2169. GPIO_FN(KEYOUT1), GPIO_FN(KEYIN1_122), GPIO_FN(KEYIN1_135),
  2170. GPIO_FN(KEYOUT2), GPIO_FN(KEYIN2_123), GPIO_FN(KEYIN2_134),
  2171. GPIO_FN(KEYOUT3), GPIO_FN(KEYIN3_124), GPIO_FN(KEYIN3_133),
  2172. GPIO_FN(KEYOUT4), GPIO_FN(KEYIN4), GPIO_FN(KEYOUT5),
  2173. GPIO_FN(KEYIN5), GPIO_FN(KEYOUT6), GPIO_FN(KEYIN6),
  2174. GPIO_FN(KEYOUT7), GPIO_FN(KEYIN7),
  2175. /* LCDC */
  2176. GPIO_FN(LCDHSYN), GPIO_FN(LCDCS), GPIO_FN(LCDVSYN),
  2177. GPIO_FN(LCDDCK), GPIO_FN(LCDWR), GPIO_FN(LCDRD),
  2178. GPIO_FN(LCDDISP), GPIO_FN(LCDRS), GPIO_FN(LCDLCLK),
  2179. GPIO_FN(LCDDON),
  2180. GPIO_FN(LCDD0), GPIO_FN(LCDD1), GPIO_FN(LCDD2),
  2181. GPIO_FN(LCDD3), GPIO_FN(LCDD4), GPIO_FN(LCDD5),
  2182. GPIO_FN(LCDD6), GPIO_FN(LCDD7), GPIO_FN(LCDD8),
  2183. GPIO_FN(LCDD9), GPIO_FN(LCDD10), GPIO_FN(LCDD11),
  2184. GPIO_FN(LCDD12), GPIO_FN(LCDD13), GPIO_FN(LCDD14),
  2185. GPIO_FN(LCDD15), GPIO_FN(LCDD16), GPIO_FN(LCDD17),
  2186. GPIO_FN(LCDD18), GPIO_FN(LCDD19), GPIO_FN(LCDD20),
  2187. GPIO_FN(LCDD21), GPIO_FN(LCDD22), GPIO_FN(LCDD23),
  2188. GPIO_FN(LCDC0_SELECT),
  2189. GPIO_FN(LCDC1_SELECT),
  2190. /* IRDA */
  2191. GPIO_FN(IRDA_OUT), GPIO_FN(IRDA_IN), GPIO_FN(IRDA_FIRSEL),
  2192. GPIO_FN(IROUT_139), GPIO_FN(IROUT_140),
  2193. /* TSIF1 */
  2194. GPIO_FN(TS0_1SELECT),
  2195. GPIO_FN(TS0_2SELECT),
  2196. GPIO_FN(TS1_1SELECT),
  2197. GPIO_FN(TS1_2SELECT),
  2198. GPIO_FN(TS_SPSYNC1), GPIO_FN(TS_SDAT1),
  2199. GPIO_FN(TS_SDEN1), GPIO_FN(TS_SCK1),
  2200. /* TSIF2 */
  2201. GPIO_FN(TS_SPSYNC2), GPIO_FN(TS_SDAT2),
  2202. GPIO_FN(TS_SDEN2), GPIO_FN(TS_SCK2),
  2203. /* HDMI */
  2204. GPIO_FN(HDMI_HPD), GPIO_FN(HDMI_CEC),
  2205. /* SDENC */
  2206. GPIO_FN(SDENC_CPG),
  2207. GPIO_FN(SDENC_DV_CLKI),
  2208. };
  2209. static const struct pinmux_cfg_reg pinmux_config_regs[] = {
  2210. PORTCR(0, 0xE6051000), /* PORT0CR */
  2211. PORTCR(1, 0xE6051001), /* PORT1CR */
  2212. PORTCR(2, 0xE6051002), /* PORT2CR */
  2213. PORTCR(3, 0xE6051003), /* PORT3CR */
  2214. PORTCR(4, 0xE6051004), /* PORT4CR */
  2215. PORTCR(5, 0xE6051005), /* PORT5CR */
  2216. PORTCR(6, 0xE6051006), /* PORT6CR */
  2217. PORTCR(7, 0xE6051007), /* PORT7CR */
  2218. PORTCR(8, 0xE6051008), /* PORT8CR */
  2219. PORTCR(9, 0xE6051009), /* PORT9CR */
  2220. PORTCR(10, 0xE605100A), /* PORT10CR */
  2221. PORTCR(11, 0xE605100B), /* PORT11CR */
  2222. PORTCR(12, 0xE605100C), /* PORT12CR */
  2223. PORTCR(13, 0xE605100D), /* PORT13CR */
  2224. PORTCR(14, 0xE605100E), /* PORT14CR */
  2225. PORTCR(15, 0xE605100F), /* PORT15CR */
  2226. PORTCR(16, 0xE6051010), /* PORT16CR */
  2227. PORTCR(17, 0xE6051011), /* PORT17CR */
  2228. PORTCR(18, 0xE6051012), /* PORT18CR */
  2229. PORTCR(19, 0xE6051013), /* PORT19CR */
  2230. PORTCR(20, 0xE6051014), /* PORT20CR */
  2231. PORTCR(21, 0xE6051015), /* PORT21CR */
  2232. PORTCR(22, 0xE6051016), /* PORT22CR */
  2233. PORTCR(23, 0xE6051017), /* PORT23CR */
  2234. PORTCR(24, 0xE6051018), /* PORT24CR */
  2235. PORTCR(25, 0xE6051019), /* PORT25CR */
  2236. PORTCR(26, 0xE605101A), /* PORT26CR */
  2237. PORTCR(27, 0xE605101B), /* PORT27CR */
  2238. PORTCR(28, 0xE605101C), /* PORT28CR */
  2239. PORTCR(29, 0xE605101D), /* PORT29CR */
  2240. PORTCR(30, 0xE605101E), /* PORT30CR */
  2241. PORTCR(31, 0xE605101F), /* PORT31CR */
  2242. PORTCR(32, 0xE6051020), /* PORT32CR */
  2243. PORTCR(33, 0xE6051021), /* PORT33CR */
  2244. PORTCR(34, 0xE6051022), /* PORT34CR */
  2245. PORTCR(35, 0xE6051023), /* PORT35CR */
  2246. PORTCR(36, 0xE6051024), /* PORT36CR */
  2247. PORTCR(37, 0xE6051025), /* PORT37CR */
  2248. PORTCR(38, 0xE6051026), /* PORT38CR */
  2249. PORTCR(39, 0xE6051027), /* PORT39CR */
  2250. PORTCR(40, 0xE6051028), /* PORT40CR */
  2251. PORTCR(41, 0xE6051029), /* PORT41CR */
  2252. PORTCR(42, 0xE605102A), /* PORT42CR */
  2253. PORTCR(43, 0xE605102B), /* PORT43CR */
  2254. PORTCR(44, 0xE605102C), /* PORT44CR */
  2255. PORTCR(45, 0xE605102D), /* PORT45CR */
  2256. PORTCR(46, 0xE605202E), /* PORT46CR */
  2257. PORTCR(47, 0xE605202F), /* PORT47CR */
  2258. PORTCR(48, 0xE6052030), /* PORT48CR */
  2259. PORTCR(49, 0xE6052031), /* PORT49CR */
  2260. PORTCR(50, 0xE6052032), /* PORT50CR */
  2261. PORTCR(51, 0xE6052033), /* PORT51CR */
  2262. PORTCR(52, 0xE6052034), /* PORT52CR */
  2263. PORTCR(53, 0xE6052035), /* PORT53CR */
  2264. PORTCR(54, 0xE6052036), /* PORT54CR */
  2265. PORTCR(55, 0xE6052037), /* PORT55CR */
  2266. PORTCR(56, 0xE6052038), /* PORT56CR */
  2267. PORTCR(57, 0xE6052039), /* PORT57CR */
  2268. PORTCR(58, 0xE605203A), /* PORT58CR */
  2269. PORTCR(59, 0xE605203B), /* PORT59CR */
  2270. PORTCR(60, 0xE605203C), /* PORT60CR */
  2271. PORTCR(61, 0xE605203D), /* PORT61CR */
  2272. PORTCR(62, 0xE605203E), /* PORT62CR */
  2273. PORTCR(63, 0xE605203F), /* PORT63CR */
  2274. PORTCR(64, 0xE6052040), /* PORT64CR */
  2275. PORTCR(65, 0xE6052041), /* PORT65CR */
  2276. PORTCR(66, 0xE6052042), /* PORT66CR */
  2277. PORTCR(67, 0xE6052043), /* PORT67CR */
  2278. PORTCR(68, 0xE6052044), /* PORT68CR */
  2279. PORTCR(69, 0xE6052045), /* PORT69CR */
  2280. PORTCR(70, 0xE6052046), /* PORT70CR */
  2281. PORTCR(71, 0xE6052047), /* PORT71CR */
  2282. PORTCR(72, 0xE6052048), /* PORT72CR */
  2283. PORTCR(73, 0xE6052049), /* PORT73CR */
  2284. PORTCR(74, 0xE605204A), /* PORT74CR */
  2285. PORTCR(75, 0xE605204B), /* PORT75CR */
  2286. PORTCR(76, 0xE605004C), /* PORT76CR */
  2287. PORTCR(77, 0xE605004D), /* PORT77CR */
  2288. PORTCR(78, 0xE605004E), /* PORT78CR */
  2289. PORTCR(79, 0xE605004F), /* PORT79CR */
  2290. PORTCR(80, 0xE6050050), /* PORT80CR */
  2291. PORTCR(81, 0xE6050051), /* PORT81CR */
  2292. PORTCR(82, 0xE6050052), /* PORT82CR */
  2293. PORTCR(83, 0xE6050053), /* PORT83CR */
  2294. PORTCR(84, 0xE6050054), /* PORT84CR */
  2295. PORTCR(85, 0xE6050055), /* PORT85CR */
  2296. PORTCR(86, 0xE6050056), /* PORT86CR */
  2297. PORTCR(87, 0xE6050057), /* PORT87CR */
  2298. PORTCR(88, 0xE6050058), /* PORT88CR */
  2299. PORTCR(89, 0xE6050059), /* PORT89CR */
  2300. PORTCR(90, 0xE605005A), /* PORT90CR */
  2301. PORTCR(91, 0xE605005B), /* PORT91CR */
  2302. PORTCR(92, 0xE605005C), /* PORT92CR */
  2303. PORTCR(93, 0xE605005D), /* PORT93CR */
  2304. PORTCR(94, 0xE605005E), /* PORT94CR */
  2305. PORTCR(95, 0xE605005F), /* PORT95CR */
  2306. PORTCR(96, 0xE6050060), /* PORT96CR */
  2307. PORTCR(97, 0xE6050061), /* PORT97CR */
  2308. PORTCR(98, 0xE6050062), /* PORT98CR */
  2309. PORTCR(99, 0xE6050063), /* PORT99CR */
  2310. PORTCR(100, 0xE6053064), /* PORT100CR */
  2311. PORTCR(101, 0xE6053065), /* PORT101CR */
  2312. PORTCR(102, 0xE6053066), /* PORT102CR */
  2313. PORTCR(103, 0xE6053067), /* PORT103CR */
  2314. PORTCR(104, 0xE6053068), /* PORT104CR */
  2315. PORTCR(105, 0xE6053069), /* PORT105CR */
  2316. PORTCR(106, 0xE605306A), /* PORT106CR */
  2317. PORTCR(107, 0xE605306B), /* PORT107CR */
  2318. PORTCR(108, 0xE605306C), /* PORT108CR */
  2319. PORTCR(109, 0xE605306D), /* PORT109CR */
  2320. PORTCR(110, 0xE605306E), /* PORT110CR */
  2321. PORTCR(111, 0xE605306F), /* PORT111CR */
  2322. PORTCR(112, 0xE6053070), /* PORT112CR */
  2323. PORTCR(113, 0xE6053071), /* PORT113CR */
  2324. PORTCR(114, 0xE6053072), /* PORT114CR */
  2325. PORTCR(115, 0xE6053073), /* PORT115CR */
  2326. PORTCR(116, 0xE6053074), /* PORT116CR */
  2327. PORTCR(117, 0xE6053075), /* PORT117CR */
  2328. PORTCR(118, 0xE6053076), /* PORT118CR */
  2329. PORTCR(119, 0xE6053077), /* PORT119CR */
  2330. PORTCR(120, 0xE6053078), /* PORT120CR */
  2331. PORTCR(121, 0xE6050079), /* PORT121CR */
  2332. PORTCR(122, 0xE605007A), /* PORT122CR */
  2333. PORTCR(123, 0xE605007B), /* PORT123CR */
  2334. PORTCR(124, 0xE605007C), /* PORT124CR */
  2335. PORTCR(125, 0xE605007D), /* PORT125CR */
  2336. PORTCR(126, 0xE605007E), /* PORT126CR */
  2337. PORTCR(127, 0xE605007F), /* PORT127CR */
  2338. PORTCR(128, 0xE6050080), /* PORT128CR */
  2339. PORTCR(129, 0xE6050081), /* PORT129CR */
  2340. PORTCR(130, 0xE6050082), /* PORT130CR */
  2341. PORTCR(131, 0xE6050083), /* PORT131CR */
  2342. PORTCR(132, 0xE6050084), /* PORT132CR */
  2343. PORTCR(133, 0xE6050085), /* PORT133CR */
  2344. PORTCR(134, 0xE6050086), /* PORT134CR */
  2345. PORTCR(135, 0xE6050087), /* PORT135CR */
  2346. PORTCR(136, 0xE6050088), /* PORT136CR */
  2347. PORTCR(137, 0xE6050089), /* PORT137CR */
  2348. PORTCR(138, 0xE605008A), /* PORT138CR */
  2349. PORTCR(139, 0xE605008B), /* PORT139CR */
  2350. PORTCR(140, 0xE605008C), /* PORT140CR */
  2351. PORTCR(141, 0xE605008D), /* PORT141CR */
  2352. PORTCR(142, 0xE605008E), /* PORT142CR */
  2353. PORTCR(143, 0xE605008F), /* PORT143CR */
  2354. PORTCR(144, 0xE6050090), /* PORT144CR */
  2355. PORTCR(145, 0xE6050091), /* PORT145CR */
  2356. PORTCR(146, 0xE6050092), /* PORT146CR */
  2357. PORTCR(147, 0xE6050093), /* PORT147CR */
  2358. PORTCR(148, 0xE6050094), /* PORT148CR */
  2359. PORTCR(149, 0xE6050095), /* PORT149CR */
  2360. PORTCR(150, 0xE6050096), /* PORT150CR */
  2361. PORTCR(151, 0xE6050097), /* PORT151CR */
  2362. PORTCR(152, 0xE6053098), /* PORT152CR */
  2363. PORTCR(153, 0xE6053099), /* PORT153CR */
  2364. PORTCR(154, 0xE605309A), /* PORT154CR */
  2365. PORTCR(155, 0xE605309B), /* PORT155CR */
  2366. PORTCR(156, 0xE605009C), /* PORT156CR */
  2367. PORTCR(157, 0xE605009D), /* PORT157CR */
  2368. PORTCR(158, 0xE605009E), /* PORT158CR */
  2369. PORTCR(159, 0xE605009F), /* PORT159CR */
  2370. PORTCR(160, 0xE60500A0), /* PORT160CR */
  2371. PORTCR(161, 0xE60500A1), /* PORT161CR */
  2372. PORTCR(162, 0xE60500A2), /* PORT162CR */
  2373. PORTCR(163, 0xE60500A3), /* PORT163CR */
  2374. PORTCR(164, 0xE60500A4), /* PORT164CR */
  2375. PORTCR(165, 0xE60500A5), /* PORT165CR */
  2376. PORTCR(166, 0xE60500A6), /* PORT166CR */
  2377. PORTCR(167, 0xE60520A7), /* PORT167CR */
  2378. PORTCR(168, 0xE60520A8), /* PORT168CR */
  2379. PORTCR(169, 0xE60520A9), /* PORT169CR */
  2380. PORTCR(170, 0xE60520AA), /* PORT170CR */
  2381. PORTCR(171, 0xE60520AB), /* PORT171CR */
  2382. PORTCR(172, 0xE60520AC), /* PORT172CR */
  2383. PORTCR(173, 0xE60520AD), /* PORT173CR */
  2384. PORTCR(174, 0xE60520AE), /* PORT174CR */
  2385. PORTCR(175, 0xE60520AF), /* PORT175CR */
  2386. PORTCR(176, 0xE60520B0), /* PORT176CR */
  2387. PORTCR(177, 0xE60520B1), /* PORT177CR */
  2388. PORTCR(178, 0xE60520B2), /* PORT178CR */
  2389. PORTCR(179, 0xE60520B3), /* PORT179CR */
  2390. PORTCR(180, 0xE60520B4), /* PORT180CR */
  2391. PORTCR(181, 0xE60520B5), /* PORT181CR */
  2392. PORTCR(182, 0xE60520B6), /* PORT182CR */
  2393. PORTCR(183, 0xE60520B7), /* PORT183CR */
  2394. PORTCR(184, 0xE60520B8), /* PORT184CR */
  2395. PORTCR(185, 0xE60520B9), /* PORT185CR */
  2396. PORTCR(186, 0xE60520BA), /* PORT186CR */
  2397. PORTCR(187, 0xE60520BB), /* PORT187CR */
  2398. PORTCR(188, 0xE60520BC), /* PORT188CR */
  2399. PORTCR(189, 0xE60520BD), /* PORT189CR */
  2400. PORTCR(190, 0xE60520BE), /* PORT190CR */
  2401. { PINMUX_CFG_REG("MSEL1CR", 0xE605800C, 32, 1) {
  2402. MSEL1CR_31_0, MSEL1CR_31_1,
  2403. MSEL1CR_30_0, MSEL1CR_30_1,
  2404. MSEL1CR_29_0, MSEL1CR_29_1,
  2405. MSEL1CR_28_0, MSEL1CR_28_1,
  2406. MSEL1CR_27_0, MSEL1CR_27_1,
  2407. MSEL1CR_26_0, MSEL1CR_26_1,
  2408. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  2409. 0, 0, 0, 0, 0, 0, 0, 0,
  2410. MSEL1CR_16_0, MSEL1CR_16_1,
  2411. MSEL1CR_15_0, MSEL1CR_15_1,
  2412. MSEL1CR_14_0, MSEL1CR_14_1,
  2413. MSEL1CR_13_0, MSEL1CR_13_1,
  2414. MSEL1CR_12_0, MSEL1CR_12_1,
  2415. 0, 0, 0, 0,
  2416. MSEL1CR_9_0, MSEL1CR_9_1,
  2417. MSEL1CR_8_0, MSEL1CR_8_1,
  2418. MSEL1CR_7_0, MSEL1CR_7_1,
  2419. MSEL1CR_6_0, MSEL1CR_6_1,
  2420. 0, 0,
  2421. MSEL1CR_4_0, MSEL1CR_4_1,
  2422. MSEL1CR_3_0, MSEL1CR_3_1,
  2423. MSEL1CR_2_0, MSEL1CR_2_1,
  2424. 0, 0,
  2425. MSEL1CR_0_0, MSEL1CR_0_1,
  2426. }
  2427. },
  2428. { PINMUX_CFG_REG("MSEL3CR", 0xE6058020, 32, 1) {
  2429. 0, 0, 0, 0,
  2430. 0, 0, 0, 0,
  2431. MSEL3CR_27_0, MSEL3CR_27_1,
  2432. MSEL3CR_26_0, MSEL3CR_26_1,
  2433. 0, 0, 0, 0,
  2434. 0, 0, 0, 0,
  2435. MSEL3CR_21_0, MSEL3CR_21_1,
  2436. MSEL3CR_20_0, MSEL3CR_20_1,
  2437. 0, 0, 0, 0,
  2438. 0, 0, 0, 0,
  2439. MSEL3CR_15_0, MSEL3CR_15_1,
  2440. 0, 0, 0, 0,
  2441. 0, 0, 0, 0,
  2442. 0, 0,
  2443. MSEL3CR_9_0, MSEL3CR_9_1,
  2444. 0, 0, 0, 0,
  2445. MSEL3CR_6_0, MSEL3CR_6_1,
  2446. 0, 0, 0, 0,
  2447. 0, 0, 0, 0,
  2448. 0, 0, 0, 0,
  2449. }
  2450. },
  2451. { PINMUX_CFG_REG("MSEL4CR", 0xE6058024, 32, 1) {
  2452. 0, 0, 0, 0,
  2453. 0, 0, 0, 0,
  2454. 0, 0, 0, 0,
  2455. 0, 0, 0, 0,
  2456. 0, 0, 0, 0,
  2457. 0, 0, 0, 0,
  2458. MSEL4CR_19_0, MSEL4CR_19_1,
  2459. MSEL4CR_18_0, MSEL4CR_18_1,
  2460. MSEL4CR_17_0, MSEL4CR_17_1,
  2461. MSEL4CR_16_0, MSEL4CR_16_1,
  2462. MSEL4CR_15_0, MSEL4CR_15_1,
  2463. MSEL4CR_14_0, MSEL4CR_14_1,
  2464. 0, 0, 0, 0,
  2465. 0, 0,
  2466. MSEL4CR_10_0, MSEL4CR_10_1,
  2467. 0, 0, 0, 0,
  2468. 0, 0,
  2469. MSEL4CR_6_0, MSEL4CR_6_1,
  2470. 0, 0,
  2471. MSEL4CR_4_0, MSEL4CR_4_1,
  2472. 0, 0, 0, 0,
  2473. MSEL4CR_1_0, MSEL4CR_1_1,
  2474. 0, 0,
  2475. }
  2476. },
  2477. { },
  2478. };
  2479. static const struct pinmux_data_reg pinmux_data_regs[] = {
  2480. { PINMUX_DATA_REG("PORTL095_064DR", 0xE6054008, 32) {
  2481. PORT95_DATA, PORT94_DATA, PORT93_DATA, PORT92_DATA,
  2482. PORT91_DATA, PORT90_DATA, PORT89_DATA, PORT88_DATA,
  2483. PORT87_DATA, PORT86_DATA, PORT85_DATA, PORT84_DATA,
  2484. PORT83_DATA, PORT82_DATA, PORT81_DATA, PORT80_DATA,
  2485. PORT79_DATA, PORT78_DATA, PORT77_DATA, PORT76_DATA,
  2486. 0, 0, 0, 0,
  2487. 0, 0, 0, 0,
  2488. 0, 0, 0, 0,
  2489. }
  2490. },
  2491. { PINMUX_DATA_REG("PORTL127_096DR", 0xE605400C, 32) {
  2492. PORT127_DATA, PORT126_DATA, PORT125_DATA, PORT124_DATA,
  2493. PORT123_DATA, PORT122_DATA, PORT121_DATA, 0,
  2494. 0, 0, 0, 0,
  2495. 0, 0, 0, 0,
  2496. 0, 0, 0, 0,
  2497. 0, 0, 0, 0,
  2498. 0, 0, 0, 0,
  2499. PORT99_DATA, PORT98_DATA, PORT97_DATA, PORT96_DATA,
  2500. }
  2501. },
  2502. { PINMUX_DATA_REG("PORTL159_128DR", 0xE6054010, 32) {
  2503. PORT159_DATA, PORT158_DATA, PORT157_DATA, PORT156_DATA,
  2504. 0, 0, 0, 0,
  2505. PORT151_DATA, PORT150_DATA, PORT149_DATA, PORT148_DATA,
  2506. PORT147_DATA, PORT146_DATA, PORT145_DATA, PORT144_DATA,
  2507. PORT143_DATA, PORT142_DATA, PORT141_DATA, PORT140_DATA,
  2508. PORT139_DATA, PORT138_DATA, PORT137_DATA, PORT136_DATA,
  2509. PORT135_DATA, PORT134_DATA, PORT133_DATA, PORT132_DATA,
  2510. PORT131_DATA, PORT130_DATA, PORT129_DATA, PORT128_DATA,
  2511. }
  2512. },
  2513. { PINMUX_DATA_REG("PORTL191_160DR", 0xE6054014, 32) {
  2514. 0, 0, 0, 0,
  2515. 0, 0, 0, 0,
  2516. 0, 0, 0, 0,
  2517. 0, 0, 0, 0,
  2518. 0, 0, 0, 0,
  2519. 0, 0, 0, 0,
  2520. 0, PORT166_DATA, PORT165_DATA, PORT164_DATA,
  2521. PORT163_DATA, PORT162_DATA, PORT161_DATA, PORT160_DATA,
  2522. }
  2523. },
  2524. { PINMUX_DATA_REG("PORTD031_000DR", 0xE6055000, 32) {
  2525. PORT31_DATA, PORT30_DATA, PORT29_DATA, PORT28_DATA,
  2526. PORT27_DATA, PORT26_DATA, PORT25_DATA, PORT24_DATA,
  2527. PORT23_DATA, PORT22_DATA, PORT21_DATA, PORT20_DATA,
  2528. PORT19_DATA, PORT18_DATA, PORT17_DATA, PORT16_DATA,
  2529. PORT15_DATA, PORT14_DATA, PORT13_DATA, PORT12_DATA,
  2530. PORT11_DATA, PORT10_DATA, PORT9_DATA, PORT8_DATA,
  2531. PORT7_DATA, PORT6_DATA, PORT5_DATA, PORT4_DATA,
  2532. PORT3_DATA, PORT2_DATA, PORT1_DATA, PORT0_DATA,
  2533. }
  2534. },
  2535. { PINMUX_DATA_REG("PORTD063_032DR", 0xE6055004, 32) {
  2536. 0, 0, 0, 0, 0, 0, 0, 0,
  2537. 0, 0, 0, 0, 0, 0, 0, 0,
  2538. 0, 0, PORT45_DATA, PORT44_DATA,
  2539. PORT43_DATA, PORT42_DATA, PORT41_DATA, PORT40_DATA,
  2540. PORT39_DATA, PORT38_DATA, PORT37_DATA, PORT36_DATA,
  2541. PORT35_DATA, PORT34_DATA, PORT33_DATA, PORT32_DATA,
  2542. }
  2543. },
  2544. { PINMUX_DATA_REG("PORTR063_032DR", 0xE6056004, 32) {
  2545. PORT63_DATA, PORT62_DATA, PORT61_DATA, PORT60_DATA,
  2546. PORT59_DATA, PORT58_DATA, PORT57_DATA, PORT56_DATA,
  2547. PORT55_DATA, PORT54_DATA, PORT53_DATA, PORT52_DATA,
  2548. PORT51_DATA, PORT50_DATA, PORT49_DATA, PORT48_DATA,
  2549. PORT47_DATA, PORT46_DATA, 0, 0,
  2550. 0, 0, 0, 0,
  2551. 0, 0, 0, 0,
  2552. 0, 0, 0, 0,
  2553. }
  2554. },
  2555. { PINMUX_DATA_REG("PORTR095_064DR", 0xE6056008, 32) {
  2556. 0, 0, 0, 0,
  2557. 0, 0, 0, 0,
  2558. 0, 0, 0, 0,
  2559. 0, 0, 0, 0,
  2560. 0, 0, 0, 0,
  2561. PORT75_DATA, PORT74_DATA, PORT73_DATA, PORT72_DATA,
  2562. PORT71_DATA, PORT70_DATA, PORT69_DATA, PORT68_DATA,
  2563. PORT67_DATA, PORT66_DATA, PORT65_DATA, PORT64_DATA,
  2564. }
  2565. },
  2566. { PINMUX_DATA_REG("PORTR191_160DR", 0xE6056014, 32) {
  2567. 0, PORT190_DATA, PORT189_DATA, PORT188_DATA,
  2568. PORT187_DATA, PORT186_DATA, PORT185_DATA, PORT184_DATA,
  2569. PORT183_DATA, PORT182_DATA, PORT181_DATA, PORT180_DATA,
  2570. PORT179_DATA, PORT178_DATA, PORT177_DATA, PORT176_DATA,
  2571. PORT175_DATA, PORT174_DATA, PORT173_DATA, PORT172_DATA,
  2572. PORT171_DATA, PORT170_DATA, PORT169_DATA, PORT168_DATA,
  2573. PORT167_DATA, 0, 0, 0,
  2574. 0, 0, 0, 0,
  2575. }
  2576. },
  2577. { PINMUX_DATA_REG("PORTU127_096DR", 0xE605700C, 32) {
  2578. 0, 0, 0, 0,
  2579. 0, 0, 0, PORT120_DATA,
  2580. PORT119_DATA, PORT118_DATA, PORT117_DATA, PORT116_DATA,
  2581. PORT115_DATA, PORT114_DATA, PORT113_DATA, PORT112_DATA,
  2582. PORT111_DATA, PORT110_DATA, PORT109_DATA, PORT108_DATA,
  2583. PORT107_DATA, PORT106_DATA, PORT105_DATA, PORT104_DATA,
  2584. PORT103_DATA, PORT102_DATA, PORT101_DATA, PORT100_DATA,
  2585. 0, 0, 0, 0,
  2586. }
  2587. },
  2588. { PINMUX_DATA_REG("PORTU159_128DR", 0xE6057010, 32) {
  2589. 0, 0, 0, 0,
  2590. PORT155_DATA, PORT154_DATA, PORT153_DATA, PORT152_DATA,
  2591. 0, 0, 0, 0,
  2592. 0, 0, 0, 0,
  2593. 0, 0, 0, 0,
  2594. 0, 0, 0, 0,
  2595. 0, 0, 0, 0,
  2596. 0, 0, 0, 0,
  2597. }
  2598. },
  2599. { },
  2600. };
  2601. #define EXT_IRQ16L(n) evt2irq(0x200 + ((n) << 5))
  2602. #define EXT_IRQ16H(n) evt2irq(0x3200 + (((n) - 16) << 5))
  2603. static const struct pinmux_irq pinmux_irqs[] = {
  2604. PINMUX_IRQ(EXT_IRQ16L(0), 6, 162),
  2605. PINMUX_IRQ(EXT_IRQ16L(1), 12),
  2606. PINMUX_IRQ(EXT_IRQ16L(2), 4, 5),
  2607. PINMUX_IRQ(EXT_IRQ16L(3), 8, 16),
  2608. PINMUX_IRQ(EXT_IRQ16L(4), 17, 163),
  2609. PINMUX_IRQ(EXT_IRQ16L(5), 18),
  2610. PINMUX_IRQ(EXT_IRQ16L(6), 39, 164),
  2611. PINMUX_IRQ(EXT_IRQ16L(7), 40, 167),
  2612. PINMUX_IRQ(EXT_IRQ16L(8), 41, 168),
  2613. PINMUX_IRQ(EXT_IRQ16L(9), 42, 169),
  2614. PINMUX_IRQ(EXT_IRQ16L(10), 65),
  2615. PINMUX_IRQ(EXT_IRQ16L(11), 67),
  2616. PINMUX_IRQ(EXT_IRQ16L(12), 80, 137),
  2617. PINMUX_IRQ(EXT_IRQ16L(13), 81, 145),
  2618. PINMUX_IRQ(EXT_IRQ16L(14), 82, 146),
  2619. PINMUX_IRQ(EXT_IRQ16L(15), 83, 147),
  2620. PINMUX_IRQ(EXT_IRQ16H(16), 84, 170),
  2621. PINMUX_IRQ(EXT_IRQ16H(17), 85),
  2622. PINMUX_IRQ(EXT_IRQ16H(18), 86),
  2623. PINMUX_IRQ(EXT_IRQ16H(19), 87),
  2624. PINMUX_IRQ(EXT_IRQ16H(20), 92),
  2625. PINMUX_IRQ(EXT_IRQ16H(21), 93),
  2626. PINMUX_IRQ(EXT_IRQ16H(22), 94),
  2627. PINMUX_IRQ(EXT_IRQ16H(23), 95),
  2628. PINMUX_IRQ(EXT_IRQ16H(24), 112),
  2629. PINMUX_IRQ(EXT_IRQ16H(25), 119),
  2630. PINMUX_IRQ(EXT_IRQ16H(26), 121, 172),
  2631. PINMUX_IRQ(EXT_IRQ16H(27), 122, 180),
  2632. PINMUX_IRQ(EXT_IRQ16H(28), 123, 181),
  2633. PINMUX_IRQ(EXT_IRQ16H(29), 129, 182),
  2634. PINMUX_IRQ(EXT_IRQ16H(30), 130, 183),
  2635. PINMUX_IRQ(EXT_IRQ16H(31), 138, 184),
  2636. };
  2637. const struct sh_pfc_soc_info sh7372_pinmux_info = {
  2638. .name = "sh7372_pfc",
  2639. .input = { PINMUX_INPUT_BEGIN, PINMUX_INPUT_END },
  2640. .input_pu = { PINMUX_INPUT_PULLUP_BEGIN, PINMUX_INPUT_PULLUP_END },
  2641. .input_pd = { PINMUX_INPUT_PULLDOWN_BEGIN, PINMUX_INPUT_PULLDOWN_END },
  2642. .output = { PINMUX_OUTPUT_BEGIN, PINMUX_OUTPUT_END },
  2643. .function = { PINMUX_FUNCTION_BEGIN, PINMUX_FUNCTION_END },
  2644. .pins = pinmux_pins,
  2645. .nr_pins = ARRAY_SIZE(pinmux_pins),
  2646. .groups = pinmux_groups,
  2647. .nr_groups = ARRAY_SIZE(pinmux_groups),
  2648. .functions = pinmux_functions,
  2649. .nr_functions = ARRAY_SIZE(pinmux_functions),
  2650. .func_gpios = pinmux_func_gpios,
  2651. .nr_func_gpios = ARRAY_SIZE(pinmux_func_gpios),
  2652. .cfg_regs = pinmux_config_regs,
  2653. .data_regs = pinmux_data_regs,
  2654. .gpio_data = pinmux_data,
  2655. .gpio_data_size = ARRAY_SIZE(pinmux_data),
  2656. .gpio_irq = pinmux_irqs,
  2657. .gpio_irq_size = ARRAY_SIZE(pinmux_irqs),
  2658. };