pinctrl-tegra114.c 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769
  1. /*
  2. * Pinctrl data and driver for the NVIDIA Tegra114 pinmux
  3. *
  4. * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
  5. *
  6. * Arthur: Pritesh Raithatha <praithatha@nvidia.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms and conditions of the GNU General Public License,
  10. * version 2, as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  15. * more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include <linux/module.h>
  21. #include <linux/of.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/pinctrl/pinctrl.h>
  24. #include <linux/pinctrl/pinmux.h>
  25. #include "pinctrl-tegra.h"
  26. /*
  27. * Most pins affected by the pinmux can also be GPIOs. Define these first.
  28. * These must match how the GPIO driver names/numbers its pins.
  29. */
  30. #define _GPIO(offset) (offset)
  31. #define TEGRA_PIN_CLK_32K_OUT_PA0 _GPIO(0)
  32. #define TEGRA_PIN_UART3_CTS_N_PA1 _GPIO(1)
  33. #define TEGRA_PIN_DAP2_FS_PA2 _GPIO(2)
  34. #define TEGRA_PIN_DAP2_SCLK_PA3 _GPIO(3)
  35. #define TEGRA_PIN_DAP2_DIN_PA4 _GPIO(4)
  36. #define TEGRA_PIN_DAP2_DOUT_PA5 _GPIO(5)
  37. #define TEGRA_PIN_SDMMC3_CLK_PA6 _GPIO(6)
  38. #define TEGRA_PIN_SDMMC3_CMD_PA7 _GPIO(7)
  39. #define TEGRA_PIN_GMI_A17_PB0 _GPIO(8)
  40. #define TEGRA_PIN_GMI_A18_PB1 _GPIO(9)
  41. #define TEGRA_PIN_SDMMC3_DAT3_PB4 _GPIO(12)
  42. #define TEGRA_PIN_SDMMC3_DAT2_PB5 _GPIO(13)
  43. #define TEGRA_PIN_SDMMC3_DAT1_PB6 _GPIO(14)
  44. #define TEGRA_PIN_SDMMC3_DAT0_PB7 _GPIO(15)
  45. #define TEGRA_PIN_UART3_RTS_N_PC0 _GPIO(16)
  46. #define TEGRA_PIN_UART2_TXD_PC2 _GPIO(18)
  47. #define TEGRA_PIN_UART2_RXD_PC3 _GPIO(19)
  48. #define TEGRA_PIN_GEN1_I2C_SCL_PC4 _GPIO(20)
  49. #define TEGRA_PIN_GEN1_I2C_SDA_PC5 _GPIO(21)
  50. #define TEGRA_PIN_GMI_WP_N_PC7 _GPIO(23)
  51. #define TEGRA_PIN_GMI_AD0_PG0 _GPIO(48)
  52. #define TEGRA_PIN_GMI_AD1_PG1 _GPIO(49)
  53. #define TEGRA_PIN_GMI_AD2_PG2 _GPIO(50)
  54. #define TEGRA_PIN_GMI_AD3_PG3 _GPIO(51)
  55. #define TEGRA_PIN_GMI_AD4_PG4 _GPIO(52)
  56. #define TEGRA_PIN_GMI_AD5_PG5 _GPIO(53)
  57. #define TEGRA_PIN_GMI_AD6_PG6 _GPIO(54)
  58. #define TEGRA_PIN_GMI_AD7_PG7 _GPIO(55)
  59. #define TEGRA_PIN_GMI_AD8_PH0 _GPIO(56)
  60. #define TEGRA_PIN_GMI_AD9_PH1 _GPIO(57)
  61. #define TEGRA_PIN_GMI_AD10_PH2 _GPIO(58)
  62. #define TEGRA_PIN_GMI_AD11_PH3 _GPIO(59)
  63. #define TEGRA_PIN_GMI_AD12_PH4 _GPIO(60)
  64. #define TEGRA_PIN_GMI_AD13_PH5 _GPIO(61)
  65. #define TEGRA_PIN_GMI_AD14_PH6 _GPIO(62)
  66. #define TEGRA_PIN_GMI_AD15_PH7 _GPIO(63)
  67. #define TEGRA_PIN_GMI_WR_N_PI0 _GPIO(64)
  68. #define TEGRA_PIN_GMI_OE_N_PI1 _GPIO(65)
  69. #define TEGRA_PIN_GMI_CS6_N_PI3 _GPIO(67)
  70. #define TEGRA_PIN_GMI_RST_N_PI4 _GPIO(68)
  71. #define TEGRA_PIN_GMI_IORDY_PI5 _GPIO(69)
  72. #define TEGRA_PIN_GMI_CS7_N_PI6 _GPIO(70)
  73. #define TEGRA_PIN_GMI_WAIT_PI7 _GPIO(71)
  74. #define TEGRA_PIN_GMI_CS0_N_PJ0 _GPIO(72)
  75. #define TEGRA_PIN_GMI_CS1_N_PJ2 _GPIO(74)
  76. #define TEGRA_PIN_GMI_DQS_P_PJ3 _GPIO(75)
  77. #define TEGRA_PIN_UART2_CTS_N_PJ5 _GPIO(77)
  78. #define TEGRA_PIN_UART2_RTS_N_PJ6 _GPIO(78)
  79. #define TEGRA_PIN_GMI_A16_PJ7 _GPIO(79)
  80. #define TEGRA_PIN_GMI_ADV_N_PK0 _GPIO(80)
  81. #define TEGRA_PIN_GMI_CLK_PK1 _GPIO(81)
  82. #define TEGRA_PIN_GMI_CS4_N_PK2 _GPIO(82)
  83. #define TEGRA_PIN_GMI_CS2_N_PK3 _GPIO(83)
  84. #define TEGRA_PIN_GMI_CS3_N_PK4 _GPIO(84)
  85. #define TEGRA_PIN_SPDIF_OUT_PK5 _GPIO(85)
  86. #define TEGRA_PIN_SPDIF_IN_PK6 _GPIO(86)
  87. #define TEGRA_PIN_GMI_A19_PK7 _GPIO(87)
  88. #define TEGRA_PIN_DAP1_FS_PN0 _GPIO(104)
  89. #define TEGRA_PIN_DAP1_DIN_PN1 _GPIO(105)
  90. #define TEGRA_PIN_DAP1_DOUT_PN2 _GPIO(106)
  91. #define TEGRA_PIN_DAP1_SCLK_PN3 _GPIO(107)
  92. #define TEGRA_PIN_USB_VBUS_EN0_PN4 _GPIO(108)
  93. #define TEGRA_PIN_USB_VBUS_EN1_PN5 _GPIO(109)
  94. #define TEGRA_PIN_HDMI_INT_PN7 _GPIO(111)
  95. #define TEGRA_PIN_ULPI_DATA7_PO0 _GPIO(112)
  96. #define TEGRA_PIN_ULPI_DATA0_PO1 _GPIO(113)
  97. #define TEGRA_PIN_ULPI_DATA1_PO2 _GPIO(114)
  98. #define TEGRA_PIN_ULPI_DATA2_PO3 _GPIO(115)
  99. #define TEGRA_PIN_ULPI_DATA3_PO4 _GPIO(116)
  100. #define TEGRA_PIN_ULPI_DATA4_PO5 _GPIO(117)
  101. #define TEGRA_PIN_ULPI_DATA5_PO6 _GPIO(118)
  102. #define TEGRA_PIN_ULPI_DATA6_PO7 _GPIO(119)
  103. #define TEGRA_PIN_DAP3_FS_PP0 _GPIO(120)
  104. #define TEGRA_PIN_DAP3_DIN_PP1 _GPIO(121)
  105. #define TEGRA_PIN_DAP3_DOUT_PP2 _GPIO(122)
  106. #define TEGRA_PIN_DAP3_SCLK_PP3 _GPIO(123)
  107. #define TEGRA_PIN_DAP4_FS_PP4 _GPIO(124)
  108. #define TEGRA_PIN_DAP4_DIN_PP5 _GPIO(125)
  109. #define TEGRA_PIN_DAP4_DOUT_PP6 _GPIO(126)
  110. #define TEGRA_PIN_DAP4_SCLK_PP7 _GPIO(127)
  111. #define TEGRA_PIN_KB_COL0_PQ0 _GPIO(128)
  112. #define TEGRA_PIN_KB_COL1_PQ1 _GPIO(129)
  113. #define TEGRA_PIN_KB_COL2_PQ2 _GPIO(130)
  114. #define TEGRA_PIN_KB_COL3_PQ3 _GPIO(131)
  115. #define TEGRA_PIN_KB_COL4_PQ4 _GPIO(132)
  116. #define TEGRA_PIN_KB_COL5_PQ5 _GPIO(133)
  117. #define TEGRA_PIN_KB_COL6_PQ6 _GPIO(134)
  118. #define TEGRA_PIN_KB_COL7_PQ7 _GPIO(135)
  119. #define TEGRA_PIN_KB_ROW0_PR0 _GPIO(136)
  120. #define TEGRA_PIN_KB_ROW1_PR1 _GPIO(137)
  121. #define TEGRA_PIN_KB_ROW2_PR2 _GPIO(138)
  122. #define TEGRA_PIN_KB_ROW3_PR3 _GPIO(139)
  123. #define TEGRA_PIN_KB_ROW4_PR4 _GPIO(140)
  124. #define TEGRA_PIN_KB_ROW5_PR5 _GPIO(141)
  125. #define TEGRA_PIN_KB_ROW6_PR6 _GPIO(142)
  126. #define TEGRA_PIN_KB_ROW7_PR7 _GPIO(143)
  127. #define TEGRA_PIN_KB_ROW8_PS0 _GPIO(144)
  128. #define TEGRA_PIN_KB_ROW9_PS1 _GPIO(145)
  129. #define TEGRA_PIN_KB_ROW10_PS2 _GPIO(146)
  130. #define TEGRA_PIN_GEN2_I2C_SCL_PT5 _GPIO(157)
  131. #define TEGRA_PIN_GEN2_I2C_SDA_PT6 _GPIO(158)
  132. #define TEGRA_PIN_SDMMC4_CMD_PT7 _GPIO(159)
  133. #define TEGRA_PIN_PU0 _GPIO(160)
  134. #define TEGRA_PIN_PU1 _GPIO(161)
  135. #define TEGRA_PIN_PU2 _GPIO(162)
  136. #define TEGRA_PIN_PU3 _GPIO(163)
  137. #define TEGRA_PIN_PU4 _GPIO(164)
  138. #define TEGRA_PIN_PU5 _GPIO(165)
  139. #define TEGRA_PIN_PU6 _GPIO(166)
  140. #define TEGRA_PIN_PV0 _GPIO(168)
  141. #define TEGRA_PIN_PV1 _GPIO(169)
  142. #define TEGRA_PIN_SDMMC3_CD_N_PV2 _GPIO(170)
  143. #define TEGRA_PIN_SDMMC1_WP_N_PV3 _GPIO(171)
  144. #define TEGRA_PIN_DDC_SCL_PV4 _GPIO(172)
  145. #define TEGRA_PIN_DDC_SDA_PV5 _GPIO(173)
  146. #define TEGRA_PIN_GPIO_W2_AUD_PW2 _GPIO(178)
  147. #define TEGRA_PIN_GPIO_W3_AUD_PW3 _GPIO(179)
  148. #define TEGRA_PIN_CLK1_OUT_PW4 _GPIO(180)
  149. #define TEGRA_PIN_CLK2_OUT_PW5 _GPIO(181)
  150. #define TEGRA_PIN_UART3_TXD_PW6 _GPIO(182)
  151. #define TEGRA_PIN_UART3_RXD_PW7 _GPIO(183)
  152. #define TEGRA_PIN_DVFS_PWM_PX0 _GPIO(184)
  153. #define TEGRA_PIN_GPIO_X1_AUD_PX1 _GPIO(185)
  154. #define TEGRA_PIN_DVFS_CLK_PX2 _GPIO(186)
  155. #define TEGRA_PIN_GPIO_X3_AUD_PX3 _GPIO(187)
  156. #define TEGRA_PIN_GPIO_X4_AUD_PX4 _GPIO(188)
  157. #define TEGRA_PIN_GPIO_X5_AUD_PX5 _GPIO(189)
  158. #define TEGRA_PIN_GPIO_X6_AUD_PX6 _GPIO(190)
  159. #define TEGRA_PIN_GPIO_X7_AUD_PX7 _GPIO(191)
  160. #define TEGRA_PIN_ULPI_CLK_PY0 _GPIO(192)
  161. #define TEGRA_PIN_ULPI_DIR_PY1 _GPIO(193)
  162. #define TEGRA_PIN_ULPI_NXT_PY2 _GPIO(194)
  163. #define TEGRA_PIN_ULPI_STP_PY3 _GPIO(195)
  164. #define TEGRA_PIN_SDMMC1_DAT3_PY4 _GPIO(196)
  165. #define TEGRA_PIN_SDMMC1_DAT2_PY5 _GPIO(197)
  166. #define TEGRA_PIN_SDMMC1_DAT1_PY6 _GPIO(198)
  167. #define TEGRA_PIN_SDMMC1_DAT0_PY7 _GPIO(199)
  168. #define TEGRA_PIN_SDMMC1_CLK_PZ0 _GPIO(200)
  169. #define TEGRA_PIN_SDMMC1_CMD_PZ1 _GPIO(201)
  170. #define TEGRA_PIN_SYS_CLK_REQ_PZ5 _GPIO(205)
  171. #define TEGRA_PIN_PWR_I2C_SCL_PZ6 _GPIO(206)
  172. #define TEGRA_PIN_PWR_I2C_SDA_PZ7 _GPIO(207)
  173. #define TEGRA_PIN_SDMMC4_DAT0_PAA0 _GPIO(208)
  174. #define TEGRA_PIN_SDMMC4_DAT1_PAA1 _GPIO(209)
  175. #define TEGRA_PIN_SDMMC4_DAT2_PAA2 _GPIO(210)
  176. #define TEGRA_PIN_SDMMC4_DAT3_PAA3 _GPIO(211)
  177. #define TEGRA_PIN_SDMMC4_DAT4_PAA4 _GPIO(212)
  178. #define TEGRA_PIN_SDMMC4_DAT5_PAA5 _GPIO(213)
  179. #define TEGRA_PIN_SDMMC4_DAT6_PAA6 _GPIO(214)
  180. #define TEGRA_PIN_SDMMC4_DAT7_PAA7 _GPIO(215)
  181. #define TEGRA_PIN_PBB0 _GPIO(216)
  182. #define TEGRA_PIN_CAM_I2C_SCL_PBB1 _GPIO(217)
  183. #define TEGRA_PIN_CAM_I2C_SDA_PBB2 _GPIO(218)
  184. #define TEGRA_PIN_PBB3 _GPIO(219)
  185. #define TEGRA_PIN_PBB4 _GPIO(220)
  186. #define TEGRA_PIN_PBB5 _GPIO(221)
  187. #define TEGRA_PIN_PBB6 _GPIO(222)
  188. #define TEGRA_PIN_PBB7 _GPIO(223)
  189. #define TEGRA_PIN_CAM_MCLK_PCC0 _GPIO(224)
  190. #define TEGRA_PIN_PCC1 _GPIO(225)
  191. #define TEGRA_PIN_PCC2 _GPIO(226)
  192. #define TEGRA_PIN_SDMMC4_CLK_PCC4 _GPIO(228)
  193. #define TEGRA_PIN_CLK2_REQ_PCC5 _GPIO(229)
  194. #define TEGRA_PIN_CLK3_OUT_PEE0 _GPIO(240)
  195. #define TEGRA_PIN_CLK3_REQ_PEE1 _GPIO(241)
  196. #define TEGRA_PIN_CLK1_REQ_PEE2 _GPIO(242)
  197. #define TEGRA_PIN_HDMI_CEC_PEE3 _GPIO(243)
  198. #define TEGRA_PIN_SDMMC3_CLK_LB_OUT_PEE4 _GPIO(244)
  199. #define TEGRA_PIN_SDMMC3_CLK_LB_IN_PEE5 _GPIO(245)
  200. /* All non-GPIO pins follow */
  201. #define NUM_GPIOS (TEGRA_PIN_SDMMC3_CLK_LB_IN_PEE5 + 1)
  202. #define _PIN(offset) (NUM_GPIOS + (offset))
  203. /* Non-GPIO pins */
  204. #define TEGRA_PIN_CORE_PWR_REQ _PIN(0)
  205. #define TEGRA_PIN_CPU_PWR_REQ _PIN(1)
  206. #define TEGRA_PIN_PWR_INT_N _PIN(2)
  207. #define TEGRA_PIN_RESET_OUT_N _PIN(3)
  208. #define TEGRA_PIN_OWR _PIN(4)
  209. static const struct pinctrl_pin_desc tegra114_pins[] = {
  210. PINCTRL_PIN(TEGRA_PIN_CLK_32K_OUT_PA0, "CLK_32K_OUT PA0"),
  211. PINCTRL_PIN(TEGRA_PIN_UART3_CTS_N_PA1, "UART3_CTS_N PA1"),
  212. PINCTRL_PIN(TEGRA_PIN_DAP2_FS_PA2, "DAP2_FS PA2"),
  213. PINCTRL_PIN(TEGRA_PIN_DAP2_SCLK_PA3, "DAP2_SCLK PA3"),
  214. PINCTRL_PIN(TEGRA_PIN_DAP2_DIN_PA4, "DAP2_DIN PA4"),
  215. PINCTRL_PIN(TEGRA_PIN_DAP2_DOUT_PA5, "DAP2_DOUT PA5"),
  216. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CLK_PA6, "SDMMC3_CLK PA6"),
  217. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CMD_PA7, "SDMMC3_CMD PA7"),
  218. PINCTRL_PIN(TEGRA_PIN_GMI_A17_PB0, "GMI_A17 PB0"),
  219. PINCTRL_PIN(TEGRA_PIN_GMI_A18_PB1, "GMI_A18 PB1"),
  220. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT3_PB4, "SDMMC3_DAT3 PB4"),
  221. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT2_PB5, "SDMMC3_DAT2 PB5"),
  222. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT1_PB6, "SDMMC3_DAT1 PB6"),
  223. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT0_PB7, "SDMMC3_DAT0 PB7"),
  224. PINCTRL_PIN(TEGRA_PIN_UART3_RTS_N_PC0, "UART3_RTS_N PC0"),
  225. PINCTRL_PIN(TEGRA_PIN_UART2_TXD_PC2, "UART2_TXD PC2"),
  226. PINCTRL_PIN(TEGRA_PIN_UART2_RXD_PC3, "UART2_RXD PC3"),
  227. PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SCL_PC4, "GEN1_I2C_SCL PC4"),
  228. PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SDA_PC5, "GEN1_I2C_SDA PC5"),
  229. PINCTRL_PIN(TEGRA_PIN_GMI_WP_N_PC7, "GMI_WP_N PC7"),
  230. PINCTRL_PIN(TEGRA_PIN_GMI_AD0_PG0, "GMI_AD0 PG0"),
  231. PINCTRL_PIN(TEGRA_PIN_GMI_AD1_PG1, "GMI_AD1 PG1"),
  232. PINCTRL_PIN(TEGRA_PIN_GMI_AD2_PG2, "GMI_AD2 PG2"),
  233. PINCTRL_PIN(TEGRA_PIN_GMI_AD3_PG3, "GMI_AD3 PG3"),
  234. PINCTRL_PIN(TEGRA_PIN_GMI_AD4_PG4, "GMI_AD4 PG4"),
  235. PINCTRL_PIN(TEGRA_PIN_GMI_AD5_PG5, "GMI_AD5 PG5"),
  236. PINCTRL_PIN(TEGRA_PIN_GMI_AD6_PG6, "GMI_AD6 PG6"),
  237. PINCTRL_PIN(TEGRA_PIN_GMI_AD7_PG7, "GMI_AD7 PG7"),
  238. PINCTRL_PIN(TEGRA_PIN_GMI_AD8_PH0, "GMI_AD8 PH0"),
  239. PINCTRL_PIN(TEGRA_PIN_GMI_AD9_PH1, "GMI_AD9 PH1"),
  240. PINCTRL_PIN(TEGRA_PIN_GMI_AD10_PH2, "GMI_AD10 PH2"),
  241. PINCTRL_PIN(TEGRA_PIN_GMI_AD11_PH3, "GMI_AD11 PH3"),
  242. PINCTRL_PIN(TEGRA_PIN_GMI_AD12_PH4, "GMI_AD12 PH4"),
  243. PINCTRL_PIN(TEGRA_PIN_GMI_AD13_PH5, "GMI_AD13 PH5"),
  244. PINCTRL_PIN(TEGRA_PIN_GMI_AD14_PH6, "GMI_AD14 PH6"),
  245. PINCTRL_PIN(TEGRA_PIN_GMI_AD15_PH7, "GMI_AD15 PH7"),
  246. PINCTRL_PIN(TEGRA_PIN_GMI_WR_N_PI0, "GMI_WR_N PI0"),
  247. PINCTRL_PIN(TEGRA_PIN_GMI_OE_N_PI1, "GMI_OE_N PI1"),
  248. PINCTRL_PIN(TEGRA_PIN_GMI_CS6_N_PI3, "GMI_CS6_N PI3"),
  249. PINCTRL_PIN(TEGRA_PIN_GMI_RST_N_PI4, "GMI_RST_N PI4"),
  250. PINCTRL_PIN(TEGRA_PIN_GMI_IORDY_PI5, "GMI_IORDY PI5"),
  251. PINCTRL_PIN(TEGRA_PIN_GMI_CS7_N_PI6, "GMI_CS7_N PI6"),
  252. PINCTRL_PIN(TEGRA_PIN_GMI_WAIT_PI7, "GMI_WAIT PI7"),
  253. PINCTRL_PIN(TEGRA_PIN_GMI_CS0_N_PJ0, "GMI_CS0_N PJ0"),
  254. PINCTRL_PIN(TEGRA_PIN_GMI_CS1_N_PJ2, "GMI_CS1_N PJ2"),
  255. PINCTRL_PIN(TEGRA_PIN_GMI_DQS_P_PJ3, "GMI_DQS_P PJ3"),
  256. PINCTRL_PIN(TEGRA_PIN_UART2_CTS_N_PJ5, "UART2_CTS_N PJ5"),
  257. PINCTRL_PIN(TEGRA_PIN_UART2_RTS_N_PJ6, "UART2_RTS_N PJ6"),
  258. PINCTRL_PIN(TEGRA_PIN_GMI_A16_PJ7, "GMI_A16 PJ7"),
  259. PINCTRL_PIN(TEGRA_PIN_GMI_ADV_N_PK0, "GMI_ADV_N PK0"),
  260. PINCTRL_PIN(TEGRA_PIN_GMI_CLK_PK1, "GMI_CLK PK1"),
  261. PINCTRL_PIN(TEGRA_PIN_GMI_CS4_N_PK2, "GMI_CS4_N PK2"),
  262. PINCTRL_PIN(TEGRA_PIN_GMI_CS2_N_PK3, "GMI_CS2_N PK3"),
  263. PINCTRL_PIN(TEGRA_PIN_GMI_CS3_N_PK4, "GMI_CS3_N PK4"),
  264. PINCTRL_PIN(TEGRA_PIN_SPDIF_OUT_PK5, "SPDIF_OUT PK5"),
  265. PINCTRL_PIN(TEGRA_PIN_SPDIF_IN_PK6, "SPDIF_IN PK6"),
  266. PINCTRL_PIN(TEGRA_PIN_GMI_A19_PK7, "GMI_A19 PK7"),
  267. PINCTRL_PIN(TEGRA_PIN_DAP1_FS_PN0, "DAP1_FS PN0"),
  268. PINCTRL_PIN(TEGRA_PIN_DAP1_DIN_PN1, "DAP1_DIN PN1"),
  269. PINCTRL_PIN(TEGRA_PIN_DAP1_DOUT_PN2, "DAP1_DOUT PN2"),
  270. PINCTRL_PIN(TEGRA_PIN_DAP1_SCLK_PN3, "DAP1_SCLK PN3"),
  271. PINCTRL_PIN(TEGRA_PIN_USB_VBUS_EN0_PN4, "USB_VBUS_EN0 PN4"),
  272. PINCTRL_PIN(TEGRA_PIN_USB_VBUS_EN1_PN5, "USB_VBUS_EN1 PN5"),
  273. PINCTRL_PIN(TEGRA_PIN_HDMI_INT_PN7, "HDMI_INT PN7"),
  274. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA7_PO0, "ULPI_DATA7 PO0"),
  275. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA0_PO1, "ULPI_DATA0 PO1"),
  276. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA1_PO2, "ULPI_DATA1 PO2"),
  277. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA2_PO3, "ULPI_DATA2 PO3"),
  278. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA3_PO4, "ULPI_DATA3 PO4"),
  279. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA4_PO5, "ULPI_DATA4 PO5"),
  280. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA5_PO6, "ULPI_DATA5 PO6"),
  281. PINCTRL_PIN(TEGRA_PIN_ULPI_DATA6_PO7, "ULPI_DATA6 PO7"),
  282. PINCTRL_PIN(TEGRA_PIN_DAP3_FS_PP0, "DAP3_FS PP0"),
  283. PINCTRL_PIN(TEGRA_PIN_DAP3_DIN_PP1, "DAP3_DIN PP1"),
  284. PINCTRL_PIN(TEGRA_PIN_DAP3_DOUT_PP2, "DAP3_DOUT PP2"),
  285. PINCTRL_PIN(TEGRA_PIN_DAP3_SCLK_PP3, "DAP3_SCLK PP3"),
  286. PINCTRL_PIN(TEGRA_PIN_DAP4_FS_PP4, "DAP4_FS PP4"),
  287. PINCTRL_PIN(TEGRA_PIN_DAP4_DIN_PP5, "DAP4_DIN PP5"),
  288. PINCTRL_PIN(TEGRA_PIN_DAP4_DOUT_PP6, "DAP4_DOUT PP6"),
  289. PINCTRL_PIN(TEGRA_PIN_DAP4_SCLK_PP7, "DAP4_SCLK PP7"),
  290. PINCTRL_PIN(TEGRA_PIN_KB_COL0_PQ0, "KB_COL0 PQ0"),
  291. PINCTRL_PIN(TEGRA_PIN_KB_COL1_PQ1, "KB_COL1 PQ1"),
  292. PINCTRL_PIN(TEGRA_PIN_KB_COL2_PQ2, "KB_COL2 PQ2"),
  293. PINCTRL_PIN(TEGRA_PIN_KB_COL3_PQ3, "KB_COL3 PQ3"),
  294. PINCTRL_PIN(TEGRA_PIN_KB_COL4_PQ4, "KB_COL4 PQ4"),
  295. PINCTRL_PIN(TEGRA_PIN_KB_COL5_PQ5, "KB_COL5 PQ5"),
  296. PINCTRL_PIN(TEGRA_PIN_KB_COL6_PQ6, "KB_COL6 PQ6"),
  297. PINCTRL_PIN(TEGRA_PIN_KB_COL7_PQ7, "KB_COL7 PQ7"),
  298. PINCTRL_PIN(TEGRA_PIN_KB_ROW0_PR0, "KB_ROW0 PR0"),
  299. PINCTRL_PIN(TEGRA_PIN_KB_ROW1_PR1, "KB_ROW1 PR1"),
  300. PINCTRL_PIN(TEGRA_PIN_KB_ROW2_PR2, "KB_ROW2 PR2"),
  301. PINCTRL_PIN(TEGRA_PIN_KB_ROW3_PR3, "KB_ROW3 PR3"),
  302. PINCTRL_PIN(TEGRA_PIN_KB_ROW4_PR4, "KB_ROW4 PR4"),
  303. PINCTRL_PIN(TEGRA_PIN_KB_ROW5_PR5, "KB_ROW5 PR5"),
  304. PINCTRL_PIN(TEGRA_PIN_KB_ROW6_PR6, "KB_ROW6 PR6"),
  305. PINCTRL_PIN(TEGRA_PIN_KB_ROW7_PR7, "KB_ROW7 PR7"),
  306. PINCTRL_PIN(TEGRA_PIN_KB_ROW8_PS0, "KB_ROW8 PS0"),
  307. PINCTRL_PIN(TEGRA_PIN_KB_ROW9_PS1, "KB_ROW9 PS1"),
  308. PINCTRL_PIN(TEGRA_PIN_KB_ROW10_PS2, "KB_ROW10 PS2"),
  309. PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SCL_PT5, "GEN2_I2C_SCL PT5"),
  310. PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SDA_PT6, "GEN2_I2C_SDA PT6"),
  311. PINCTRL_PIN(TEGRA_PIN_SDMMC4_CMD_PT7, "SDMMC4_CMD PT7"),
  312. PINCTRL_PIN(TEGRA_PIN_PU0, "PU0"),
  313. PINCTRL_PIN(TEGRA_PIN_PU1, "PU1"),
  314. PINCTRL_PIN(TEGRA_PIN_PU2, "PU2"),
  315. PINCTRL_PIN(TEGRA_PIN_PU3, "PU3"),
  316. PINCTRL_PIN(TEGRA_PIN_PU4, "PU4"),
  317. PINCTRL_PIN(TEGRA_PIN_PU5, "PU5"),
  318. PINCTRL_PIN(TEGRA_PIN_PU6, "PU6"),
  319. PINCTRL_PIN(TEGRA_PIN_PV0, "PV0"),
  320. PINCTRL_PIN(TEGRA_PIN_PV1, "PV1"),
  321. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CD_N_PV2, "SDMMC3_CD_N PV2"),
  322. PINCTRL_PIN(TEGRA_PIN_SDMMC1_WP_N_PV3, "SDMMC1_WP_N PV3"),
  323. PINCTRL_PIN(TEGRA_PIN_DDC_SCL_PV4, "DDC_SCL PV4"),
  324. PINCTRL_PIN(TEGRA_PIN_DDC_SDA_PV5, "DDC_SDA PV5"),
  325. PINCTRL_PIN(TEGRA_PIN_GPIO_W2_AUD_PW2, "GPIO_W2_AUD PW2"),
  326. PINCTRL_PIN(TEGRA_PIN_GPIO_W3_AUD_PW3, "GPIO_W3_AUD PW3"),
  327. PINCTRL_PIN(TEGRA_PIN_CLK1_OUT_PW4, "CLK1_OUT PW4"),
  328. PINCTRL_PIN(TEGRA_PIN_CLK2_OUT_PW5, "CLK2_OUT PW5"),
  329. PINCTRL_PIN(TEGRA_PIN_UART3_TXD_PW6, "UART3_TXD PW6"),
  330. PINCTRL_PIN(TEGRA_PIN_UART3_RXD_PW7, "UART3_RXD PW7"),
  331. PINCTRL_PIN(TEGRA_PIN_DVFS_PWM_PX0, "DVFS_PWM PX0"),
  332. PINCTRL_PIN(TEGRA_PIN_GPIO_X1_AUD_PX1, "GPIO_X1_AUD PX1"),
  333. PINCTRL_PIN(TEGRA_PIN_DVFS_CLK_PX2, "DVFS_CLK PX2"),
  334. PINCTRL_PIN(TEGRA_PIN_GPIO_X3_AUD_PX3, "GPIO_X3_AUD PX3"),
  335. PINCTRL_PIN(TEGRA_PIN_GPIO_X4_AUD_PX4, "GPIO_X4_AUD PX4"),
  336. PINCTRL_PIN(TEGRA_PIN_GPIO_X5_AUD_PX5, "GPIO_X5_AUD PX5"),
  337. PINCTRL_PIN(TEGRA_PIN_GPIO_X6_AUD_PX6, "GPIO_X6_AUD PX6"),
  338. PINCTRL_PIN(TEGRA_PIN_GPIO_X7_AUD_PX7, "GPIO_X7_AUD PX7"),
  339. PINCTRL_PIN(TEGRA_PIN_ULPI_CLK_PY0, "ULPI_CLK PY0"),
  340. PINCTRL_PIN(TEGRA_PIN_ULPI_DIR_PY1, "ULPI_DIR PY1"),
  341. PINCTRL_PIN(TEGRA_PIN_ULPI_NXT_PY2, "ULPI_NXT PY2"),
  342. PINCTRL_PIN(TEGRA_PIN_ULPI_STP_PY3, "ULPI_STP PY3"),
  343. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT3_PY4, "SDMMC1_DAT3 PY4"),
  344. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT2_PY5, "SDMMC1_DAT2 PY5"),
  345. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT1_PY6, "SDMMC1_DAT1 PY6"),
  346. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT0_PY7, "SDMMC1_DAT0 PY7"),
  347. PINCTRL_PIN(TEGRA_PIN_SDMMC1_CLK_PZ0, "SDMMC1_CLK PZ0"),
  348. PINCTRL_PIN(TEGRA_PIN_SDMMC1_CMD_PZ1, "SDMMC1_CMD PZ1"),
  349. PINCTRL_PIN(TEGRA_PIN_SYS_CLK_REQ_PZ5, "SYS_CLK_REQ PZ5"),
  350. PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SCL_PZ6, "PWR_I2C_SCL PZ6"),
  351. PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SDA_PZ7, "PWR_I2C_SDA PZ7"),
  352. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT0_PAA0, "SDMMC4_DAT0 PAA0"),
  353. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT1_PAA1, "SDMMC4_DAT1 PAA1"),
  354. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT2_PAA2, "SDMMC4_DAT2 PAA2"),
  355. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT3_PAA3, "SDMMC4_DAT3 PAA3"),
  356. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT4_PAA4, "SDMMC4_DAT4 PAA4"),
  357. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT5_PAA5, "SDMMC4_DAT5 PAA5"),
  358. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT6_PAA6, "SDMMC4_DAT6 PAA6"),
  359. PINCTRL_PIN(TEGRA_PIN_SDMMC4_DAT7_PAA7, "SDMMC4_DAT7 PAA7"),
  360. PINCTRL_PIN(TEGRA_PIN_PBB0, "PBB0"),
  361. PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SCL_PBB1, "CAM_I2C_SCL PBB1"),
  362. PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SDA_PBB2, "CAM_I2C_SDA PBB2"),
  363. PINCTRL_PIN(TEGRA_PIN_PBB3, "PBB3"),
  364. PINCTRL_PIN(TEGRA_PIN_PBB4, "PBB4"),
  365. PINCTRL_PIN(TEGRA_PIN_PBB5, "PBB5"),
  366. PINCTRL_PIN(TEGRA_PIN_PBB6, "PBB6"),
  367. PINCTRL_PIN(TEGRA_PIN_PBB7, "PBB7"),
  368. PINCTRL_PIN(TEGRA_PIN_CAM_MCLK_PCC0, "CAM_MCLK PCC0"),
  369. PINCTRL_PIN(TEGRA_PIN_PCC1, "PCC1"),
  370. PINCTRL_PIN(TEGRA_PIN_PCC2, "PCC2"),
  371. PINCTRL_PIN(TEGRA_PIN_SDMMC4_CLK_PCC4, "SDMMC4_CLK PCC4"),
  372. PINCTRL_PIN(TEGRA_PIN_CLK2_REQ_PCC5, "CLK2_REQ PCC5"),
  373. PINCTRL_PIN(TEGRA_PIN_CLK3_OUT_PEE0, "CLK3_OUT PEE0"),
  374. PINCTRL_PIN(TEGRA_PIN_CLK3_REQ_PEE1, "CLK3_REQ PEE1"),
  375. PINCTRL_PIN(TEGRA_PIN_CLK1_REQ_PEE2, "CLK1_REQ PEE2"),
  376. PINCTRL_PIN(TEGRA_PIN_HDMI_CEC_PEE3, "HDMI_CEC PEE3"),
  377. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CLK_LB_OUT_PEE4, "SDMMC3_CLK_LB_OUT PEE4"),
  378. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CLK_LB_IN_PEE5, "SDMMC3_CLK_LB_IN PEE5"),
  379. PINCTRL_PIN(TEGRA_PIN_CORE_PWR_REQ, "CORE_PWR_REQ"),
  380. PINCTRL_PIN(TEGRA_PIN_CPU_PWR_REQ, "CPU_PWR_REQ"),
  381. PINCTRL_PIN(TEGRA_PIN_OWR, "OWR"),
  382. PINCTRL_PIN(TEGRA_PIN_PWR_INT_N, "PWR_INT_N"),
  383. PINCTRL_PIN(TEGRA_PIN_RESET_OUT_N, "RESET_OUT_N"),
  384. };
  385. static const unsigned clk_32k_out_pa0_pins[] = {
  386. TEGRA_PIN_CLK_32K_OUT_PA0,
  387. };
  388. static const unsigned uart3_cts_n_pa1_pins[] = {
  389. TEGRA_PIN_UART3_CTS_N_PA1,
  390. };
  391. static const unsigned dap2_fs_pa2_pins[] = {
  392. TEGRA_PIN_DAP2_FS_PA2,
  393. };
  394. static const unsigned dap2_sclk_pa3_pins[] = {
  395. TEGRA_PIN_DAP2_SCLK_PA3,
  396. };
  397. static const unsigned dap2_din_pa4_pins[] = {
  398. TEGRA_PIN_DAP2_DIN_PA4,
  399. };
  400. static const unsigned dap2_dout_pa5_pins[] = {
  401. TEGRA_PIN_DAP2_DOUT_PA5,
  402. };
  403. static const unsigned sdmmc3_clk_pa6_pins[] = {
  404. TEGRA_PIN_SDMMC3_CLK_PA6,
  405. };
  406. static const unsigned sdmmc3_cmd_pa7_pins[] = {
  407. TEGRA_PIN_SDMMC3_CMD_PA7,
  408. };
  409. static const unsigned gmi_a17_pb0_pins[] = {
  410. TEGRA_PIN_GMI_A17_PB0,
  411. };
  412. static const unsigned gmi_a18_pb1_pins[] = {
  413. TEGRA_PIN_GMI_A18_PB1,
  414. };
  415. static const unsigned sdmmc3_dat3_pb4_pins[] = {
  416. TEGRA_PIN_SDMMC3_DAT3_PB4,
  417. };
  418. static const unsigned sdmmc3_dat2_pb5_pins[] = {
  419. TEGRA_PIN_SDMMC3_DAT2_PB5,
  420. };
  421. static const unsigned sdmmc3_dat1_pb6_pins[] = {
  422. TEGRA_PIN_SDMMC3_DAT1_PB6,
  423. };
  424. static const unsigned sdmmc3_dat0_pb7_pins[] = {
  425. TEGRA_PIN_SDMMC3_DAT0_PB7,
  426. };
  427. static const unsigned uart3_rts_n_pc0_pins[] = {
  428. TEGRA_PIN_UART3_RTS_N_PC0,
  429. };
  430. static const unsigned uart2_txd_pc2_pins[] = {
  431. TEGRA_PIN_UART2_TXD_PC2,
  432. };
  433. static const unsigned uart2_rxd_pc3_pins[] = {
  434. TEGRA_PIN_UART2_RXD_PC3,
  435. };
  436. static const unsigned gen1_i2c_scl_pc4_pins[] = {
  437. TEGRA_PIN_GEN1_I2C_SCL_PC4,
  438. };
  439. static const unsigned gen1_i2c_sda_pc5_pins[] = {
  440. TEGRA_PIN_GEN1_I2C_SDA_PC5,
  441. };
  442. static const unsigned gmi_wp_n_pc7_pins[] = {
  443. TEGRA_PIN_GMI_WP_N_PC7,
  444. };
  445. static const unsigned gmi_ad0_pg0_pins[] = {
  446. TEGRA_PIN_GMI_AD0_PG0,
  447. };
  448. static const unsigned gmi_ad1_pg1_pins[] = {
  449. TEGRA_PIN_GMI_AD1_PG1,
  450. };
  451. static const unsigned gmi_ad2_pg2_pins[] = {
  452. TEGRA_PIN_GMI_AD2_PG2,
  453. };
  454. static const unsigned gmi_ad3_pg3_pins[] = {
  455. TEGRA_PIN_GMI_AD3_PG3,
  456. };
  457. static const unsigned gmi_ad4_pg4_pins[] = {
  458. TEGRA_PIN_GMI_AD4_PG4,
  459. };
  460. static const unsigned gmi_ad5_pg5_pins[] = {
  461. TEGRA_PIN_GMI_AD5_PG5,
  462. };
  463. static const unsigned gmi_ad6_pg6_pins[] = {
  464. TEGRA_PIN_GMI_AD6_PG6,
  465. };
  466. static const unsigned gmi_ad7_pg7_pins[] = {
  467. TEGRA_PIN_GMI_AD7_PG7,
  468. };
  469. static const unsigned gmi_ad8_ph0_pins[] = {
  470. TEGRA_PIN_GMI_AD8_PH0,
  471. };
  472. static const unsigned gmi_ad9_ph1_pins[] = {
  473. TEGRA_PIN_GMI_AD9_PH1,
  474. };
  475. static const unsigned gmi_ad10_ph2_pins[] = {
  476. TEGRA_PIN_GMI_AD10_PH2,
  477. };
  478. static const unsigned gmi_ad11_ph3_pins[] = {
  479. TEGRA_PIN_GMI_AD11_PH3,
  480. };
  481. static const unsigned gmi_ad12_ph4_pins[] = {
  482. TEGRA_PIN_GMI_AD12_PH4,
  483. };
  484. static const unsigned gmi_ad13_ph5_pins[] = {
  485. TEGRA_PIN_GMI_AD13_PH5,
  486. };
  487. static const unsigned gmi_ad14_ph6_pins[] = {
  488. TEGRA_PIN_GMI_AD14_PH6,
  489. };
  490. static const unsigned gmi_ad15_ph7_pins[] = {
  491. TEGRA_PIN_GMI_AD15_PH7,
  492. };
  493. static const unsigned gmi_wr_n_pi0_pins[] = {
  494. TEGRA_PIN_GMI_WR_N_PI0,
  495. };
  496. static const unsigned gmi_oe_n_pi1_pins[] = {
  497. TEGRA_PIN_GMI_OE_N_PI1,
  498. };
  499. static const unsigned gmi_cs6_n_pi3_pins[] = {
  500. TEGRA_PIN_GMI_CS6_N_PI3,
  501. };
  502. static const unsigned gmi_rst_n_pi4_pins[] = {
  503. TEGRA_PIN_GMI_RST_N_PI4,
  504. };
  505. static const unsigned gmi_iordy_pi5_pins[] = {
  506. TEGRA_PIN_GMI_IORDY_PI5,
  507. };
  508. static const unsigned gmi_cs7_n_pi6_pins[] = {
  509. TEGRA_PIN_GMI_CS7_N_PI6,
  510. };
  511. static const unsigned gmi_wait_pi7_pins[] = {
  512. TEGRA_PIN_GMI_WAIT_PI7,
  513. };
  514. static const unsigned gmi_cs0_n_pj0_pins[] = {
  515. TEGRA_PIN_GMI_CS0_N_PJ0,
  516. };
  517. static const unsigned gmi_cs1_n_pj2_pins[] = {
  518. TEGRA_PIN_GMI_CS1_N_PJ2,
  519. };
  520. static const unsigned gmi_dqs_p_pj3_pins[] = {
  521. TEGRA_PIN_GMI_DQS_P_PJ3,
  522. };
  523. static const unsigned uart2_cts_n_pj5_pins[] = {
  524. TEGRA_PIN_UART2_CTS_N_PJ5,
  525. };
  526. static const unsigned uart2_rts_n_pj6_pins[] = {
  527. TEGRA_PIN_UART2_RTS_N_PJ6,
  528. };
  529. static const unsigned gmi_a16_pj7_pins[] = {
  530. TEGRA_PIN_GMI_A16_PJ7,
  531. };
  532. static const unsigned gmi_adv_n_pk0_pins[] = {
  533. TEGRA_PIN_GMI_ADV_N_PK0,
  534. };
  535. static const unsigned gmi_clk_pk1_pins[] = {
  536. TEGRA_PIN_GMI_CLK_PK1,
  537. };
  538. static const unsigned gmi_cs4_n_pk2_pins[] = {
  539. TEGRA_PIN_GMI_CS4_N_PK2,
  540. };
  541. static const unsigned gmi_cs2_n_pk3_pins[] = {
  542. TEGRA_PIN_GMI_CS2_N_PK3,
  543. };
  544. static const unsigned gmi_cs3_n_pk4_pins[] = {
  545. TEGRA_PIN_GMI_CS3_N_PK4,
  546. };
  547. static const unsigned spdif_out_pk5_pins[] = {
  548. TEGRA_PIN_SPDIF_OUT_PK5,
  549. };
  550. static const unsigned spdif_in_pk6_pins[] = {
  551. TEGRA_PIN_SPDIF_IN_PK6,
  552. };
  553. static const unsigned gmi_a19_pk7_pins[] = {
  554. TEGRA_PIN_GMI_A19_PK7,
  555. };
  556. static const unsigned dap1_fs_pn0_pins[] = {
  557. TEGRA_PIN_DAP1_FS_PN0,
  558. };
  559. static const unsigned dap1_din_pn1_pins[] = {
  560. TEGRA_PIN_DAP1_DIN_PN1,
  561. };
  562. static const unsigned dap1_dout_pn2_pins[] = {
  563. TEGRA_PIN_DAP1_DOUT_PN2,
  564. };
  565. static const unsigned dap1_sclk_pn3_pins[] = {
  566. TEGRA_PIN_DAP1_SCLK_PN3,
  567. };
  568. static const unsigned usb_vbus_en0_pn4_pins[] = {
  569. TEGRA_PIN_USB_VBUS_EN0_PN4,
  570. };
  571. static const unsigned usb_vbus_en1_pn5_pins[] = {
  572. TEGRA_PIN_USB_VBUS_EN1_PN5,
  573. };
  574. static const unsigned hdmi_int_pn7_pins[] = {
  575. TEGRA_PIN_HDMI_INT_PN7,
  576. };
  577. static const unsigned ulpi_data7_po0_pins[] = {
  578. TEGRA_PIN_ULPI_DATA7_PO0,
  579. };
  580. static const unsigned ulpi_data0_po1_pins[] = {
  581. TEGRA_PIN_ULPI_DATA0_PO1,
  582. };
  583. static const unsigned ulpi_data1_po2_pins[] = {
  584. TEGRA_PIN_ULPI_DATA1_PO2,
  585. };
  586. static const unsigned ulpi_data2_po3_pins[] = {
  587. TEGRA_PIN_ULPI_DATA2_PO3,
  588. };
  589. static const unsigned ulpi_data3_po4_pins[] = {
  590. TEGRA_PIN_ULPI_DATA3_PO4,
  591. };
  592. static const unsigned ulpi_data4_po5_pins[] = {
  593. TEGRA_PIN_ULPI_DATA4_PO5,
  594. };
  595. static const unsigned ulpi_data5_po6_pins[] = {
  596. TEGRA_PIN_ULPI_DATA5_PO6,
  597. };
  598. static const unsigned ulpi_data6_po7_pins[] = {
  599. TEGRA_PIN_ULPI_DATA6_PO7,
  600. };
  601. static const unsigned dap3_fs_pp0_pins[] = {
  602. TEGRA_PIN_DAP3_FS_PP0,
  603. };
  604. static const unsigned dap3_din_pp1_pins[] = {
  605. TEGRA_PIN_DAP3_DIN_PP1,
  606. };
  607. static const unsigned dap3_dout_pp2_pins[] = {
  608. TEGRA_PIN_DAP3_DOUT_PP2,
  609. };
  610. static const unsigned dap3_sclk_pp3_pins[] = {
  611. TEGRA_PIN_DAP3_SCLK_PP3,
  612. };
  613. static const unsigned dap4_fs_pp4_pins[] = {
  614. TEGRA_PIN_DAP4_FS_PP4,
  615. };
  616. static const unsigned dap4_din_pp5_pins[] = {
  617. TEGRA_PIN_DAP4_DIN_PP5,
  618. };
  619. static const unsigned dap4_dout_pp6_pins[] = {
  620. TEGRA_PIN_DAP4_DOUT_PP6,
  621. };
  622. static const unsigned dap4_sclk_pp7_pins[] = {
  623. TEGRA_PIN_DAP4_SCLK_PP7,
  624. };
  625. static const unsigned kb_col0_pq0_pins[] = {
  626. TEGRA_PIN_KB_COL0_PQ0,
  627. };
  628. static const unsigned kb_col1_pq1_pins[] = {
  629. TEGRA_PIN_KB_COL1_PQ1,
  630. };
  631. static const unsigned kb_col2_pq2_pins[] = {
  632. TEGRA_PIN_KB_COL2_PQ2,
  633. };
  634. static const unsigned kb_col3_pq3_pins[] = {
  635. TEGRA_PIN_KB_COL3_PQ3,
  636. };
  637. static const unsigned kb_col4_pq4_pins[] = {
  638. TEGRA_PIN_KB_COL4_PQ4,
  639. };
  640. static const unsigned kb_col5_pq5_pins[] = {
  641. TEGRA_PIN_KB_COL5_PQ5,
  642. };
  643. static const unsigned kb_col6_pq6_pins[] = {
  644. TEGRA_PIN_KB_COL6_PQ6,
  645. };
  646. static const unsigned kb_col7_pq7_pins[] = {
  647. TEGRA_PIN_KB_COL7_PQ7,
  648. };
  649. static const unsigned kb_row0_pr0_pins[] = {
  650. TEGRA_PIN_KB_ROW0_PR0,
  651. };
  652. static const unsigned kb_row1_pr1_pins[] = {
  653. TEGRA_PIN_KB_ROW1_PR1,
  654. };
  655. static const unsigned kb_row2_pr2_pins[] = {
  656. TEGRA_PIN_KB_ROW2_PR2,
  657. };
  658. static const unsigned kb_row3_pr3_pins[] = {
  659. TEGRA_PIN_KB_ROW3_PR3,
  660. };
  661. static const unsigned kb_row4_pr4_pins[] = {
  662. TEGRA_PIN_KB_ROW4_PR4,
  663. };
  664. static const unsigned kb_row5_pr5_pins[] = {
  665. TEGRA_PIN_KB_ROW5_PR5,
  666. };
  667. static const unsigned kb_row6_pr6_pins[] = {
  668. TEGRA_PIN_KB_ROW6_PR6,
  669. };
  670. static const unsigned kb_row7_pr7_pins[] = {
  671. TEGRA_PIN_KB_ROW7_PR7,
  672. };
  673. static const unsigned kb_row8_ps0_pins[] = {
  674. TEGRA_PIN_KB_ROW8_PS0,
  675. };
  676. static const unsigned kb_row9_ps1_pins[] = {
  677. TEGRA_PIN_KB_ROW9_PS1,
  678. };
  679. static const unsigned kb_row10_ps2_pins[] = {
  680. TEGRA_PIN_KB_ROW10_PS2,
  681. };
  682. static const unsigned gen2_i2c_scl_pt5_pins[] = {
  683. TEGRA_PIN_GEN2_I2C_SCL_PT5,
  684. };
  685. static const unsigned gen2_i2c_sda_pt6_pins[] = {
  686. TEGRA_PIN_GEN2_I2C_SDA_PT6,
  687. };
  688. static const unsigned sdmmc4_cmd_pt7_pins[] = {
  689. TEGRA_PIN_SDMMC4_CMD_PT7,
  690. };
  691. static const unsigned pu0_pins[] = {
  692. TEGRA_PIN_PU0,
  693. };
  694. static const unsigned pu1_pins[] = {
  695. TEGRA_PIN_PU1,
  696. };
  697. static const unsigned pu2_pins[] = {
  698. TEGRA_PIN_PU2,
  699. };
  700. static const unsigned pu3_pins[] = {
  701. TEGRA_PIN_PU3,
  702. };
  703. static const unsigned pu4_pins[] = {
  704. TEGRA_PIN_PU4,
  705. };
  706. static const unsigned pu5_pins[] = {
  707. TEGRA_PIN_PU5,
  708. };
  709. static const unsigned pu6_pins[] = {
  710. TEGRA_PIN_PU6,
  711. };
  712. static const unsigned pv0_pins[] = {
  713. TEGRA_PIN_PV0,
  714. };
  715. static const unsigned pv1_pins[] = {
  716. TEGRA_PIN_PV1,
  717. };
  718. static const unsigned sdmmc3_cd_n_pv2_pins[] = {
  719. TEGRA_PIN_SDMMC3_CD_N_PV2,
  720. };
  721. static const unsigned sdmmc1_wp_n_pv3_pins[] = {
  722. TEGRA_PIN_SDMMC1_WP_N_PV3,
  723. };
  724. static const unsigned ddc_scl_pv4_pins[] = {
  725. TEGRA_PIN_DDC_SCL_PV4,
  726. };
  727. static const unsigned ddc_sda_pv5_pins[] = {
  728. TEGRA_PIN_DDC_SDA_PV5,
  729. };
  730. static const unsigned gpio_w2_aud_pw2_pins[] = {
  731. TEGRA_PIN_GPIO_W2_AUD_PW2,
  732. };
  733. static const unsigned gpio_w3_aud_pw3_pins[] = {
  734. TEGRA_PIN_GPIO_W3_AUD_PW3,
  735. };
  736. static const unsigned clk1_out_pw4_pins[] = {
  737. TEGRA_PIN_CLK1_OUT_PW4,
  738. };
  739. static const unsigned clk2_out_pw5_pins[] = {
  740. TEGRA_PIN_CLK2_OUT_PW5,
  741. };
  742. static const unsigned uart3_txd_pw6_pins[] = {
  743. TEGRA_PIN_UART3_TXD_PW6,
  744. };
  745. static const unsigned uart3_rxd_pw7_pins[] = {
  746. TEGRA_PIN_UART3_RXD_PW7,
  747. };
  748. static const unsigned dvfs_pwm_px0_pins[] = {
  749. TEGRA_PIN_DVFS_PWM_PX0,
  750. };
  751. static const unsigned gpio_x1_aud_px1_pins[] = {
  752. TEGRA_PIN_GPIO_X1_AUD_PX1,
  753. };
  754. static const unsigned dvfs_clk_px2_pins[] = {
  755. TEGRA_PIN_DVFS_CLK_PX2,
  756. };
  757. static const unsigned gpio_x3_aud_px3_pins[] = {
  758. TEGRA_PIN_GPIO_X3_AUD_PX3,
  759. };
  760. static const unsigned gpio_x4_aud_px4_pins[] = {
  761. TEGRA_PIN_GPIO_X4_AUD_PX4,
  762. };
  763. static const unsigned gpio_x5_aud_px5_pins[] = {
  764. TEGRA_PIN_GPIO_X5_AUD_PX5,
  765. };
  766. static const unsigned gpio_x6_aud_px6_pins[] = {
  767. TEGRA_PIN_GPIO_X6_AUD_PX6,
  768. };
  769. static const unsigned gpio_x7_aud_px7_pins[] = {
  770. TEGRA_PIN_GPIO_X7_AUD_PX7,
  771. };
  772. static const unsigned ulpi_clk_py0_pins[] = {
  773. TEGRA_PIN_ULPI_CLK_PY0,
  774. };
  775. static const unsigned ulpi_dir_py1_pins[] = {
  776. TEGRA_PIN_ULPI_DIR_PY1,
  777. };
  778. static const unsigned ulpi_nxt_py2_pins[] = {
  779. TEGRA_PIN_ULPI_NXT_PY2,
  780. };
  781. static const unsigned ulpi_stp_py3_pins[] = {
  782. TEGRA_PIN_ULPI_STP_PY3,
  783. };
  784. static const unsigned sdmmc1_dat3_py4_pins[] = {
  785. TEGRA_PIN_SDMMC1_DAT3_PY4,
  786. };
  787. static const unsigned sdmmc1_dat2_py5_pins[] = {
  788. TEGRA_PIN_SDMMC1_DAT2_PY5,
  789. };
  790. static const unsigned sdmmc1_dat1_py6_pins[] = {
  791. TEGRA_PIN_SDMMC1_DAT1_PY6,
  792. };
  793. static const unsigned sdmmc1_dat0_py7_pins[] = {
  794. TEGRA_PIN_SDMMC1_DAT0_PY7,
  795. };
  796. static const unsigned sdmmc1_clk_pz0_pins[] = {
  797. TEGRA_PIN_SDMMC1_CLK_PZ0,
  798. };
  799. static const unsigned sdmmc1_cmd_pz1_pins[] = {
  800. TEGRA_PIN_SDMMC1_CMD_PZ1,
  801. };
  802. static const unsigned sys_clk_req_pz5_pins[] = {
  803. TEGRA_PIN_SYS_CLK_REQ_PZ5,
  804. };
  805. static const unsigned pwr_i2c_scl_pz6_pins[] = {
  806. TEGRA_PIN_PWR_I2C_SCL_PZ6,
  807. };
  808. static const unsigned pwr_i2c_sda_pz7_pins[] = {
  809. TEGRA_PIN_PWR_I2C_SDA_PZ7,
  810. };
  811. static const unsigned sdmmc4_dat0_paa0_pins[] = {
  812. TEGRA_PIN_SDMMC4_DAT0_PAA0,
  813. };
  814. static const unsigned sdmmc4_dat1_paa1_pins[] = {
  815. TEGRA_PIN_SDMMC4_DAT1_PAA1,
  816. };
  817. static const unsigned sdmmc4_dat2_paa2_pins[] = {
  818. TEGRA_PIN_SDMMC4_DAT2_PAA2,
  819. };
  820. static const unsigned sdmmc4_dat3_paa3_pins[] = {
  821. TEGRA_PIN_SDMMC4_DAT3_PAA3,
  822. };
  823. static const unsigned sdmmc4_dat4_paa4_pins[] = {
  824. TEGRA_PIN_SDMMC4_DAT4_PAA4,
  825. };
  826. static const unsigned sdmmc4_dat5_paa5_pins[] = {
  827. TEGRA_PIN_SDMMC4_DAT5_PAA5,
  828. };
  829. static const unsigned sdmmc4_dat6_paa6_pins[] = {
  830. TEGRA_PIN_SDMMC4_DAT6_PAA6,
  831. };
  832. static const unsigned sdmmc4_dat7_paa7_pins[] = {
  833. TEGRA_PIN_SDMMC4_DAT7_PAA7,
  834. };
  835. static const unsigned pbb0_pins[] = {
  836. TEGRA_PIN_PBB0,
  837. };
  838. static const unsigned cam_i2c_scl_pbb1_pins[] = {
  839. TEGRA_PIN_CAM_I2C_SCL_PBB1,
  840. };
  841. static const unsigned cam_i2c_sda_pbb2_pins[] = {
  842. TEGRA_PIN_CAM_I2C_SDA_PBB2,
  843. };
  844. static const unsigned pbb3_pins[] = {
  845. TEGRA_PIN_PBB3,
  846. };
  847. static const unsigned pbb4_pins[] = {
  848. TEGRA_PIN_PBB4,
  849. };
  850. static const unsigned pbb5_pins[] = {
  851. TEGRA_PIN_PBB5,
  852. };
  853. static const unsigned pbb6_pins[] = {
  854. TEGRA_PIN_PBB6,
  855. };
  856. static const unsigned pbb7_pins[] = {
  857. TEGRA_PIN_PBB7,
  858. };
  859. static const unsigned cam_mclk_pcc0_pins[] = {
  860. TEGRA_PIN_CAM_MCLK_PCC0,
  861. };
  862. static const unsigned pcc1_pins[] = {
  863. TEGRA_PIN_PCC1,
  864. };
  865. static const unsigned pcc2_pins[] = {
  866. TEGRA_PIN_PCC2,
  867. };
  868. static const unsigned sdmmc4_clk_pcc4_pins[] = {
  869. TEGRA_PIN_SDMMC4_CLK_PCC4,
  870. };
  871. static const unsigned clk2_req_pcc5_pins[] = {
  872. TEGRA_PIN_CLK2_REQ_PCC5,
  873. };
  874. static const unsigned clk3_out_pee0_pins[] = {
  875. TEGRA_PIN_CLK3_OUT_PEE0,
  876. };
  877. static const unsigned clk3_req_pee1_pins[] = {
  878. TEGRA_PIN_CLK3_REQ_PEE1,
  879. };
  880. static const unsigned clk1_req_pee2_pins[] = {
  881. TEGRA_PIN_CLK1_REQ_PEE2,
  882. };
  883. static const unsigned hdmi_cec_pee3_pins[] = {
  884. TEGRA_PIN_HDMI_CEC_PEE3,
  885. };
  886. static const unsigned sdmmc3_clk_lb_out_pee4_pins[] = {
  887. TEGRA_PIN_SDMMC3_CLK_LB_OUT_PEE4,
  888. };
  889. static const unsigned sdmmc3_clk_lb_in_pee5_pins[] = {
  890. TEGRA_PIN_SDMMC3_CLK_LB_IN_PEE5,
  891. };
  892. static const unsigned core_pwr_req_pins[] = {
  893. TEGRA_PIN_CORE_PWR_REQ,
  894. };
  895. static const unsigned cpu_pwr_req_pins[] = {
  896. TEGRA_PIN_CPU_PWR_REQ,
  897. };
  898. static const unsigned owr_pins[] = {
  899. TEGRA_PIN_OWR,
  900. };
  901. static const unsigned pwr_int_n_pins[] = {
  902. TEGRA_PIN_PWR_INT_N,
  903. };
  904. static const unsigned reset_out_n_pins[] = {
  905. TEGRA_PIN_RESET_OUT_N,
  906. };
  907. static const unsigned drive_ao1_pins[] = {
  908. TEGRA_PIN_KB_ROW0_PR0,
  909. TEGRA_PIN_KB_ROW1_PR1,
  910. TEGRA_PIN_KB_ROW2_PR2,
  911. TEGRA_PIN_KB_ROW3_PR3,
  912. TEGRA_PIN_KB_ROW4_PR4,
  913. TEGRA_PIN_KB_ROW5_PR5,
  914. TEGRA_PIN_KB_ROW6_PR6,
  915. TEGRA_PIN_KB_ROW7_PR7,
  916. TEGRA_PIN_PWR_I2C_SCL_PZ6,
  917. TEGRA_PIN_PWR_I2C_SDA_PZ7,
  918. };
  919. static const unsigned drive_ao2_pins[] = {
  920. TEGRA_PIN_CLK_32K_OUT_PA0,
  921. TEGRA_PIN_KB_COL0_PQ0,
  922. TEGRA_PIN_KB_COL1_PQ1,
  923. TEGRA_PIN_KB_COL2_PQ2,
  924. TEGRA_PIN_KB_COL3_PQ3,
  925. TEGRA_PIN_KB_COL4_PQ4,
  926. TEGRA_PIN_KB_COL5_PQ5,
  927. TEGRA_PIN_KB_COL6_PQ6,
  928. TEGRA_PIN_KB_COL7_PQ7,
  929. TEGRA_PIN_KB_ROW8_PS0,
  930. TEGRA_PIN_KB_ROW9_PS1,
  931. TEGRA_PIN_KB_ROW10_PS2,
  932. TEGRA_PIN_SYS_CLK_REQ_PZ5,
  933. TEGRA_PIN_CORE_PWR_REQ,
  934. TEGRA_PIN_CPU_PWR_REQ,
  935. TEGRA_PIN_RESET_OUT_N,
  936. };
  937. static const unsigned drive_at1_pins[] = {
  938. TEGRA_PIN_GMI_AD8_PH0,
  939. TEGRA_PIN_GMI_AD9_PH1,
  940. TEGRA_PIN_GMI_AD10_PH2,
  941. TEGRA_PIN_GMI_AD11_PH3,
  942. TEGRA_PIN_GMI_AD12_PH4,
  943. TEGRA_PIN_GMI_AD13_PH5,
  944. TEGRA_PIN_GMI_AD14_PH6,
  945. TEGRA_PIN_GMI_AD15_PH7,
  946. TEGRA_PIN_GMI_IORDY_PI5,
  947. TEGRA_PIN_GMI_CS7_N_PI6,
  948. };
  949. static const unsigned drive_at2_pins[] = {
  950. TEGRA_PIN_GMI_AD0_PG0,
  951. TEGRA_PIN_GMI_AD1_PG1,
  952. TEGRA_PIN_GMI_AD2_PG2,
  953. TEGRA_PIN_GMI_AD3_PG3,
  954. TEGRA_PIN_GMI_AD4_PG4,
  955. TEGRA_PIN_GMI_AD5_PG5,
  956. TEGRA_PIN_GMI_AD6_PG6,
  957. TEGRA_PIN_GMI_AD7_PG7,
  958. TEGRA_PIN_GMI_WR_N_PI0,
  959. TEGRA_PIN_GMI_OE_N_PI1,
  960. TEGRA_PIN_GMI_CS6_N_PI3,
  961. TEGRA_PIN_GMI_RST_N_PI4,
  962. TEGRA_PIN_GMI_WAIT_PI7,
  963. TEGRA_PIN_GMI_DQS_P_PJ3,
  964. TEGRA_PIN_GMI_ADV_N_PK0,
  965. TEGRA_PIN_GMI_CLK_PK1,
  966. TEGRA_PIN_GMI_CS4_N_PK2,
  967. TEGRA_PIN_GMI_CS2_N_PK3,
  968. TEGRA_PIN_GMI_CS3_N_PK4,
  969. };
  970. static const unsigned drive_at3_pins[] = {
  971. TEGRA_PIN_GMI_WP_N_PC7,
  972. TEGRA_PIN_GMI_CS0_N_PJ0,
  973. };
  974. static const unsigned drive_at4_pins[] = {
  975. TEGRA_PIN_GMI_A17_PB0,
  976. TEGRA_PIN_GMI_A18_PB1,
  977. TEGRA_PIN_GMI_CS1_N_PJ2,
  978. TEGRA_PIN_GMI_A16_PJ7,
  979. TEGRA_PIN_GMI_A19_PK7,
  980. };
  981. static const unsigned drive_at5_pins[] = {
  982. TEGRA_PIN_GEN2_I2C_SCL_PT5,
  983. TEGRA_PIN_GEN2_I2C_SDA_PT6,
  984. };
  985. static const unsigned drive_cdev1_pins[] = {
  986. TEGRA_PIN_CLK1_OUT_PW4,
  987. TEGRA_PIN_CLK1_REQ_PEE2,
  988. };
  989. static const unsigned drive_cdev2_pins[] = {
  990. TEGRA_PIN_CLK2_OUT_PW5,
  991. TEGRA_PIN_CLK2_REQ_PCC5,
  992. TEGRA_PIN_SDMMC1_WP_N_PV3,
  993. };
  994. static const unsigned drive_dap1_pins[] = {
  995. TEGRA_PIN_DAP1_FS_PN0,
  996. TEGRA_PIN_DAP1_DIN_PN1,
  997. TEGRA_PIN_DAP1_DOUT_PN2,
  998. TEGRA_PIN_DAP1_SCLK_PN3,
  999. };
  1000. static const unsigned drive_dap2_pins[] = {
  1001. TEGRA_PIN_DAP2_FS_PA2,
  1002. TEGRA_PIN_DAP2_SCLK_PA3,
  1003. TEGRA_PIN_DAP2_DIN_PA4,
  1004. TEGRA_PIN_DAP2_DOUT_PA5,
  1005. };
  1006. static const unsigned drive_dap3_pins[] = {
  1007. TEGRA_PIN_DAP3_FS_PP0,
  1008. TEGRA_PIN_DAP3_DIN_PP1,
  1009. TEGRA_PIN_DAP3_DOUT_PP2,
  1010. TEGRA_PIN_DAP3_SCLK_PP3,
  1011. };
  1012. static const unsigned drive_dap4_pins[] = {
  1013. TEGRA_PIN_DAP4_FS_PP4,
  1014. TEGRA_PIN_DAP4_DIN_PP5,
  1015. TEGRA_PIN_DAP4_DOUT_PP6,
  1016. TEGRA_PIN_DAP4_SCLK_PP7,
  1017. };
  1018. static const unsigned drive_dbg_pins[] = {
  1019. TEGRA_PIN_GEN1_I2C_SCL_PC4,
  1020. TEGRA_PIN_GEN1_I2C_SDA_PC5,
  1021. TEGRA_PIN_PU0,
  1022. TEGRA_PIN_PU1,
  1023. TEGRA_PIN_PU2,
  1024. TEGRA_PIN_PU3,
  1025. TEGRA_PIN_PU4,
  1026. TEGRA_PIN_PU5,
  1027. TEGRA_PIN_PU6,
  1028. };
  1029. static const unsigned drive_sdio3_pins[] = {
  1030. TEGRA_PIN_SDMMC3_CLK_PA6,
  1031. TEGRA_PIN_SDMMC3_CMD_PA7,
  1032. TEGRA_PIN_SDMMC3_DAT3_PB4,
  1033. TEGRA_PIN_SDMMC3_DAT2_PB5,
  1034. TEGRA_PIN_SDMMC3_DAT1_PB6,
  1035. TEGRA_PIN_SDMMC3_DAT0_PB7,
  1036. TEGRA_PIN_SDMMC3_CLK_LB_OUT_PEE4,
  1037. TEGRA_PIN_SDMMC3_CLK_LB_IN_PEE5,
  1038. };
  1039. static const unsigned drive_spi_pins[] = {
  1040. TEGRA_PIN_DVFS_PWM_PX0,
  1041. TEGRA_PIN_GPIO_X1_AUD_PX1,
  1042. TEGRA_PIN_DVFS_CLK_PX2,
  1043. TEGRA_PIN_GPIO_X3_AUD_PX3,
  1044. TEGRA_PIN_GPIO_X4_AUD_PX4,
  1045. TEGRA_PIN_GPIO_X5_AUD_PX5,
  1046. TEGRA_PIN_GPIO_X6_AUD_PX6,
  1047. TEGRA_PIN_GPIO_X7_AUD_PX7,
  1048. TEGRA_PIN_GPIO_W2_AUD_PW2,
  1049. TEGRA_PIN_GPIO_W3_AUD_PW3,
  1050. };
  1051. static const unsigned drive_uaa_pins[] = {
  1052. TEGRA_PIN_ULPI_DATA0_PO1,
  1053. TEGRA_PIN_ULPI_DATA1_PO2,
  1054. TEGRA_PIN_ULPI_DATA2_PO3,
  1055. TEGRA_PIN_ULPI_DATA3_PO4,
  1056. };
  1057. static const unsigned drive_uab_pins[] = {
  1058. TEGRA_PIN_ULPI_DATA7_PO0,
  1059. TEGRA_PIN_ULPI_DATA4_PO5,
  1060. TEGRA_PIN_ULPI_DATA5_PO6,
  1061. TEGRA_PIN_ULPI_DATA6_PO7,
  1062. TEGRA_PIN_PV0,
  1063. TEGRA_PIN_PV1,
  1064. };
  1065. static const unsigned drive_uart2_pins[] = {
  1066. TEGRA_PIN_UART2_TXD_PC2,
  1067. TEGRA_PIN_UART2_RXD_PC3,
  1068. TEGRA_PIN_UART2_CTS_N_PJ5,
  1069. TEGRA_PIN_UART2_RTS_N_PJ6,
  1070. };
  1071. static const unsigned drive_uart3_pins[] = {
  1072. TEGRA_PIN_UART3_CTS_N_PA1,
  1073. TEGRA_PIN_UART3_RTS_N_PC0,
  1074. TEGRA_PIN_UART3_TXD_PW6,
  1075. TEGRA_PIN_UART3_RXD_PW7,
  1076. };
  1077. static const unsigned drive_sdio1_pins[] = {
  1078. TEGRA_PIN_SDMMC1_DAT3_PY4,
  1079. TEGRA_PIN_SDMMC1_DAT2_PY5,
  1080. TEGRA_PIN_SDMMC1_DAT1_PY6,
  1081. TEGRA_PIN_SDMMC1_DAT0_PY7,
  1082. TEGRA_PIN_SDMMC1_CLK_PZ0,
  1083. TEGRA_PIN_SDMMC1_CMD_PZ1,
  1084. };
  1085. static const unsigned drive_ddc_pins[] = {
  1086. TEGRA_PIN_DDC_SCL_PV4,
  1087. TEGRA_PIN_DDC_SDA_PV5,
  1088. };
  1089. static const unsigned drive_gma_pins[] = {
  1090. TEGRA_PIN_SDMMC4_CLK_PCC4,
  1091. TEGRA_PIN_SDMMC4_CMD_PT7,
  1092. TEGRA_PIN_SDMMC4_DAT0_PAA0,
  1093. TEGRA_PIN_SDMMC4_DAT1_PAA1,
  1094. TEGRA_PIN_SDMMC4_DAT2_PAA2,
  1095. TEGRA_PIN_SDMMC4_DAT3_PAA3,
  1096. TEGRA_PIN_SDMMC4_DAT4_PAA4,
  1097. TEGRA_PIN_SDMMC4_DAT5_PAA5,
  1098. TEGRA_PIN_SDMMC4_DAT6_PAA6,
  1099. TEGRA_PIN_SDMMC4_DAT7_PAA7,
  1100. };
  1101. static const unsigned drive_gme_pins[] = {
  1102. TEGRA_PIN_PBB0,
  1103. TEGRA_PIN_CAM_I2C_SCL_PBB1,
  1104. TEGRA_PIN_CAM_I2C_SDA_PBB2,
  1105. TEGRA_PIN_PBB3,
  1106. TEGRA_PIN_PCC2,
  1107. };
  1108. static const unsigned drive_gmf_pins[] = {
  1109. TEGRA_PIN_PBB4,
  1110. TEGRA_PIN_PBB5,
  1111. TEGRA_PIN_PBB6,
  1112. TEGRA_PIN_PBB7,
  1113. };
  1114. static const unsigned drive_gmg_pins[] = {
  1115. TEGRA_PIN_CAM_MCLK_PCC0,
  1116. };
  1117. static const unsigned drive_gmh_pins[] = {
  1118. TEGRA_PIN_PCC1,
  1119. };
  1120. static const unsigned drive_owr_pins[] = {
  1121. TEGRA_PIN_SDMMC3_CD_N_PV2,
  1122. };
  1123. static const unsigned drive_uda_pins[] = {
  1124. TEGRA_PIN_ULPI_CLK_PY0,
  1125. TEGRA_PIN_ULPI_DIR_PY1,
  1126. TEGRA_PIN_ULPI_NXT_PY2,
  1127. TEGRA_PIN_ULPI_STP_PY3,
  1128. };
  1129. static const unsigned drive_dev3_pins[] = {
  1130. TEGRA_PIN_CLK3_OUT_PEE0,
  1131. TEGRA_PIN_CLK3_REQ_PEE1,
  1132. };
  1133. enum tegra_mux {
  1134. TEGRA_MUX_BLINK,
  1135. TEGRA_MUX_CEC,
  1136. TEGRA_MUX_CLDVFS,
  1137. TEGRA_MUX_CLK12,
  1138. TEGRA_MUX_CPU,
  1139. TEGRA_MUX_DAP,
  1140. TEGRA_MUX_DAP1,
  1141. TEGRA_MUX_DAP2,
  1142. TEGRA_MUX_DEV3,
  1143. TEGRA_MUX_DISPLAYA,
  1144. TEGRA_MUX_DISPLAYA_ALT,
  1145. TEGRA_MUX_DISPLAYB,
  1146. TEGRA_MUX_DTV,
  1147. TEGRA_MUX_EMC_DLL,
  1148. TEGRA_MUX_EXTPERIPH1,
  1149. TEGRA_MUX_EXTPERIPH2,
  1150. TEGRA_MUX_EXTPERIPH3,
  1151. TEGRA_MUX_GMI,
  1152. TEGRA_MUX_GMI_ALT,
  1153. TEGRA_MUX_HDA,
  1154. TEGRA_MUX_HSI,
  1155. TEGRA_MUX_I2C1,
  1156. TEGRA_MUX_I2C2,
  1157. TEGRA_MUX_I2C3,
  1158. TEGRA_MUX_I2C4,
  1159. TEGRA_MUX_I2CPWR,
  1160. TEGRA_MUX_I2S0,
  1161. TEGRA_MUX_I2S1,
  1162. TEGRA_MUX_I2S2,
  1163. TEGRA_MUX_I2S3,
  1164. TEGRA_MUX_I2S4,
  1165. TEGRA_MUX_IRDA,
  1166. TEGRA_MUX_KBC,
  1167. TEGRA_MUX_NAND,
  1168. TEGRA_MUX_NAND_ALT,
  1169. TEGRA_MUX_OWR,
  1170. TEGRA_MUX_PMI,
  1171. TEGRA_MUX_PWM0,
  1172. TEGRA_MUX_PWM1,
  1173. TEGRA_MUX_PWM2,
  1174. TEGRA_MUX_PWM3,
  1175. TEGRA_MUX_PWRON,
  1176. TEGRA_MUX_RESET_OUT_N,
  1177. TEGRA_MUX_RSVD1,
  1178. TEGRA_MUX_RSVD2,
  1179. TEGRA_MUX_RSVD3,
  1180. TEGRA_MUX_RSVD4,
  1181. TEGRA_MUX_SDMMC1,
  1182. TEGRA_MUX_SDMMC2,
  1183. TEGRA_MUX_SDMMC3,
  1184. TEGRA_MUX_SDMMC4,
  1185. TEGRA_MUX_SOC,
  1186. TEGRA_MUX_SPDIF,
  1187. TEGRA_MUX_SPI1,
  1188. TEGRA_MUX_SPI2,
  1189. TEGRA_MUX_SPI3,
  1190. TEGRA_MUX_SPI4,
  1191. TEGRA_MUX_SPI5,
  1192. TEGRA_MUX_SPI6,
  1193. TEGRA_MUX_SYSCLK,
  1194. TEGRA_MUX_TRACE,
  1195. TEGRA_MUX_UARTA,
  1196. TEGRA_MUX_UARTB,
  1197. TEGRA_MUX_UARTC,
  1198. TEGRA_MUX_UARTD,
  1199. TEGRA_MUX_ULPI,
  1200. TEGRA_MUX_USB,
  1201. TEGRA_MUX_VGP1,
  1202. TEGRA_MUX_VGP2,
  1203. TEGRA_MUX_VGP3,
  1204. TEGRA_MUX_VGP4,
  1205. TEGRA_MUX_VGP5,
  1206. TEGRA_MUX_VGP6,
  1207. TEGRA_MUX_VI,
  1208. TEGRA_MUX_VI_ALT1,
  1209. TEGRA_MUX_VI_ALT3,
  1210. };
  1211. static const char * const blink_groups[] = {
  1212. "clk_32k_out_pa0",
  1213. };
  1214. static const char * const cec_groups[] = {
  1215. "hdmi_cec_pee3",
  1216. };
  1217. static const char * const cldvfs_groups[] = {
  1218. "gmi_ad9_ph1",
  1219. "gmi_ad10_ph2",
  1220. "kb_row7_pr7",
  1221. "kb_row8_ps0",
  1222. "dvfs_pwm_px0",
  1223. "dvfs_clk_px2",
  1224. };
  1225. static const char * const clk12_groups[] = {
  1226. "sdmmc1_wp_n_pv3",
  1227. "sdmmc1_clk_pz0",
  1228. };
  1229. static const char * const cpu_groups[] = {
  1230. "cpu_pwr_req",
  1231. };
  1232. static const char * const dap_groups[] = {
  1233. "clk1_req_pee2",
  1234. "clk2_req_pcc5",
  1235. };
  1236. static const char * const dap1_groups[] = {
  1237. "clk1_req_pee2",
  1238. };
  1239. static const char * const dap2_groups[] = {
  1240. "clk1_out_pw4",
  1241. "gpio_x4_aud_px4",
  1242. };
  1243. static const char * const dev3_groups[] = {
  1244. "clk3_req_pee1",
  1245. };
  1246. static const char * const displaya_groups[] = {
  1247. "dap3_fs_pp0",
  1248. "dap3_din_pp1",
  1249. "dap3_dout_pp2",
  1250. "dap3_sclk_pp3",
  1251. "uart3_rts_n_pc0",
  1252. "pu3",
  1253. "pu4",
  1254. "pu5",
  1255. "pbb3",
  1256. "pbb4",
  1257. "pbb5",
  1258. "pbb6",
  1259. "kb_row3_pr3",
  1260. "kb_row4_pr4",
  1261. "kb_row5_pr5",
  1262. "kb_row6_pr6",
  1263. "kb_col3_pq3",
  1264. "sdmmc3_dat2_pb5",
  1265. };
  1266. static const char * const displaya_alt_groups[] = {
  1267. "kb_row6_pr6",
  1268. };
  1269. static const char * const displayb_groups[] = {
  1270. "dap3_fs_pp0",
  1271. "dap3_din_pp1",
  1272. "dap3_dout_pp2",
  1273. "dap3_sclk_pp3",
  1274. "pu3",
  1275. "pu4",
  1276. "pu5",
  1277. "pu6",
  1278. "pbb3",
  1279. "pbb4",
  1280. "pbb5",
  1281. "pbb6",
  1282. "kb_row3_pr3",
  1283. "kb_row4_pr4",
  1284. "kb_row5_pr5",
  1285. "kb_row6_pr6",
  1286. "sdmmc3_dat3_pb4",
  1287. };
  1288. static const char * const dtv_groups[] = {
  1289. "uart3_cts_n_pa1",
  1290. "uart3_rts_n_pc0",
  1291. "dap4_fs_pp4",
  1292. "dap4_dout_pp6",
  1293. "gmi_wait_pi7",
  1294. "gmi_ad8_ph0",
  1295. "gmi_ad14_ph6",
  1296. "gmi_ad15_ph7",
  1297. };
  1298. static const char * const emc_dll_groups[] = {
  1299. "kb_col0_pq0",
  1300. "kb_col1_pq1",
  1301. };
  1302. static const char * const extperiph1_groups[] = {
  1303. "clk1_out_pw4",
  1304. };
  1305. static const char * const extperiph2_groups[] = {
  1306. "clk2_out_pw5",
  1307. };
  1308. static const char * const extperiph3_groups[] = {
  1309. "clk3_out_pee0",
  1310. };
  1311. static const char * const gmi_groups[] = {
  1312. "gmi_wp_n_pc7",
  1313. "gmi_ad0_pg0",
  1314. "gmi_ad1_pg1",
  1315. "gmi_ad2_pg2",
  1316. "gmi_ad3_pg3",
  1317. "gmi_ad4_pg4",
  1318. "gmi_ad5_pg5",
  1319. "gmi_ad6_pg6",
  1320. "gmi_ad7_pg7",
  1321. "gmi_ad8_ph0",
  1322. "gmi_ad9_ph1",
  1323. "gmi_ad10_ph2",
  1324. "gmi_ad11_ph3",
  1325. "gmi_ad12_ph4",
  1326. "gmi_ad13_ph5",
  1327. "gmi_ad14_ph6",
  1328. "gmi_ad15_ph7",
  1329. "gmi_wr_n_pi0",
  1330. "gmi_oe_n_pi1",
  1331. "gmi_cs6_n_pi3",
  1332. "gmi_rst_n_pi4",
  1333. "gmi_iordy_pi5",
  1334. "gmi_cs7_n_pi6",
  1335. "gmi_wait_pi7",
  1336. "gmi_cs0_n_pj0",
  1337. "gmi_cs1_n_pj2",
  1338. "gmi_dqs_p_pj3",
  1339. "gmi_adv_n_pk0",
  1340. "gmi_clk_pk1",
  1341. "gmi_cs4_n_pk2",
  1342. "gmi_cs2_n_pk3",
  1343. "gmi_cs3_n_pk4",
  1344. "gmi_a16_pj7",
  1345. "gmi_a17_pb0",
  1346. "gmi_a18_pb1",
  1347. "gmi_a19_pk7",
  1348. "gen2_i2c_scl_pt5",
  1349. "gen2_i2c_sda_pt6",
  1350. "sdmmc4_dat0_paa0",
  1351. "sdmmc4_dat1_paa1",
  1352. "sdmmc4_dat2_paa2",
  1353. "sdmmc4_dat3_paa3",
  1354. "sdmmc4_dat4_paa4",
  1355. "sdmmc4_dat5_paa5",
  1356. "sdmmc4_dat6_paa6",
  1357. "sdmmc4_dat7_paa7",
  1358. "sdmmc4_clk_pcc4",
  1359. "sdmmc4_cmd_pt7",
  1360. "dap1_fs_pn0",
  1361. "dap1_din_pn1",
  1362. "dap1_dout_pn2",
  1363. "dap1_sclk_pn3",
  1364. };
  1365. static const char * const gmi_alt_groups[] = {
  1366. "gmi_wp_n_pc7",
  1367. "gmi_cs3_n_pk4",
  1368. "gmi_a16_pj7",
  1369. };
  1370. static const char * const hda_groups[] = {
  1371. "dap1_fs_pn0",
  1372. "dap1_din_pn1",
  1373. "dap1_dout_pn2",
  1374. "dap1_sclk_pn3",
  1375. "dap2_fs_pa2",
  1376. "dap2_sclk_pa3",
  1377. "dap2_din_pa4",
  1378. "dap2_dout_pa5",
  1379. };
  1380. static const char * const hsi_groups[] = {
  1381. "ulpi_data0_po1",
  1382. "ulpi_data1_po2",
  1383. "ulpi_data2_po3",
  1384. "ulpi_data3_po4",
  1385. "ulpi_data4_po5",
  1386. "ulpi_data5_po6",
  1387. "ulpi_data6_po7",
  1388. "ulpi_data7_po0",
  1389. };
  1390. static const char * const i2c1_groups[] = {
  1391. "gen1_i2c_scl_pc4",
  1392. "gen1_i2c_sda_pc5",
  1393. "gpio_w2_aud_pw2",
  1394. "gpio_w3_aud_pw3",
  1395. };
  1396. static const char * const i2c2_groups[] = {
  1397. "gen2_i2c_scl_pt5",
  1398. "gen2_i2c_sda_pt6",
  1399. };
  1400. static const char * const i2c3_groups[] = {
  1401. "cam_i2c_scl_pbb1",
  1402. "cam_i2c_sda_pbb2",
  1403. };
  1404. static const char * const i2c4_groups[] = {
  1405. "ddc_scl_pv4",
  1406. "ddc_sda_pv5",
  1407. };
  1408. static const char * const i2cpwr_groups[] = {
  1409. "pwr_i2c_scl_pz6",
  1410. "pwr_i2c_sda_pz7",
  1411. };
  1412. static const char * const i2s0_groups[] = {
  1413. "dap1_fs_pn0",
  1414. "dap1_din_pn1",
  1415. "dap1_dout_pn2",
  1416. "dap1_sclk_pn3",
  1417. };
  1418. static const char * const i2s1_groups[] = {
  1419. "dap2_fs_pa2",
  1420. "dap2_sclk_pa3",
  1421. "dap2_din_pa4",
  1422. "dap2_dout_pa5",
  1423. };
  1424. static const char * const i2s2_groups[] = {
  1425. "dap3_fs_pp0",
  1426. "dap3_din_pp1",
  1427. "dap3_dout_pp2",
  1428. "dap3_sclk_pp3",
  1429. };
  1430. static const char * const i2s3_groups[] = {
  1431. "dap4_fs_pp4",
  1432. "dap4_din_pp5",
  1433. "dap4_dout_pp6",
  1434. "dap4_sclk_pp7",
  1435. };
  1436. static const char * const i2s4_groups[] = {
  1437. "pcc1",
  1438. "pbb0",
  1439. "pbb7",
  1440. "pcc2",
  1441. };
  1442. static const char * const irda_groups[] = {
  1443. "uart2_rxd_pc3",
  1444. "uart2_txd_pc2",
  1445. };
  1446. static const char * const kbc_groups[] = {
  1447. "kb_row0_pr0",
  1448. "kb_row1_pr1",
  1449. "kb_row2_pr2",
  1450. "kb_row3_pr3",
  1451. "kb_row4_pr4",
  1452. "kb_row5_pr5",
  1453. "kb_row6_pr6",
  1454. "kb_row7_pr7",
  1455. "kb_row8_ps0",
  1456. "kb_row9_ps1",
  1457. "kb_row10_ps2",
  1458. "kb_col0_pq0",
  1459. "kb_col1_pq1",
  1460. "kb_col2_pq2",
  1461. "kb_col3_pq3",
  1462. "kb_col4_pq4",
  1463. "kb_col5_pq5",
  1464. "kb_col6_pq6",
  1465. "kb_col7_pq7",
  1466. };
  1467. static const char * const nand_groups[] = {
  1468. "gmi_wp_n_pc7",
  1469. "gmi_wait_pi7",
  1470. "gmi_adv_n_pk0",
  1471. "gmi_clk_pk1",
  1472. "gmi_cs0_n_pj0",
  1473. "gmi_cs1_n_pj2",
  1474. "gmi_cs2_n_pk3",
  1475. "gmi_cs3_n_pk4",
  1476. "gmi_cs4_n_pk2",
  1477. "gmi_cs6_n_pi3",
  1478. "gmi_cs7_n_pi6",
  1479. "gmi_ad0_pg0",
  1480. "gmi_ad1_pg1",
  1481. "gmi_ad2_pg2",
  1482. "gmi_ad3_pg3",
  1483. "gmi_ad4_pg4",
  1484. "gmi_ad5_pg5",
  1485. "gmi_ad6_pg6",
  1486. "gmi_ad7_pg7",
  1487. "gmi_ad8_ph0",
  1488. "gmi_ad9_ph1",
  1489. "gmi_ad10_ph2",
  1490. "gmi_ad11_ph3",
  1491. "gmi_ad12_ph4",
  1492. "gmi_ad13_ph5",
  1493. "gmi_ad14_ph6",
  1494. "gmi_ad15_ph7",
  1495. "gmi_wr_n_pi0",
  1496. "gmi_oe_n_pi1",
  1497. "gmi_dqs_p_pj3",
  1498. "gmi_rst_n_pi4",
  1499. };
  1500. static const char * const nand_alt_groups[] = {
  1501. "gmi_cs6_n_pi3",
  1502. "gmi_cs7_n_pi6",
  1503. "gmi_rst_n_pi4",
  1504. };
  1505. static const char * const owr_groups[] = {
  1506. "pu0",
  1507. "kb_col4_pq4",
  1508. "owr",
  1509. "sdmmc3_cd_n_pv2",
  1510. };
  1511. static const char * const pmi_groups[] = {
  1512. "pwr_int_n",
  1513. };
  1514. static const char * const pwm0_groups[] = {
  1515. "sdmmc1_dat2_py5",
  1516. "uart3_rts_n_pc0",
  1517. "pu3",
  1518. "gmi_ad8_ph0",
  1519. "sdmmc3_dat3_pb4",
  1520. };
  1521. static const char * const pwm1_groups[] = {
  1522. "sdmmc1_dat1_py6",
  1523. "pu4",
  1524. "gmi_ad9_ph1",
  1525. "sdmmc3_dat2_pb5",
  1526. };
  1527. static const char * const pwm2_groups[] = {
  1528. "pu5",
  1529. "gmi_ad10_ph2",
  1530. "kb_col3_pq3",
  1531. "sdmmc3_dat1_pb6",
  1532. };
  1533. static const char * const pwm3_groups[] = {
  1534. "pu6",
  1535. "gmi_ad11_ph3",
  1536. "sdmmc3_cmd_pa7",
  1537. };
  1538. static const char * const pwron_groups[] = {
  1539. "core_pwr_req",
  1540. };
  1541. static const char * const reset_out_n_groups[] = {
  1542. "reset_out_n",
  1543. };
  1544. static const char * const rsvd1_groups[] = {
  1545. "pv1",
  1546. "hdmi_int_pn7",
  1547. "pu1",
  1548. "pu2",
  1549. "gmi_wp_n_pc7",
  1550. "gmi_adv_n_pk0",
  1551. "gmi_cs0_n_pj0",
  1552. "gmi_cs1_n_pj2",
  1553. "gmi_ad0_pg0",
  1554. "gmi_ad1_pg1",
  1555. "gmi_ad2_pg2",
  1556. "gmi_ad3_pg3",
  1557. "gmi_ad4_pg4",
  1558. "gmi_ad5_pg5",
  1559. "gmi_ad6_pg6",
  1560. "gmi_ad7_pg7",
  1561. "gmi_wr_n_pi0",
  1562. "gmi_oe_n_pi1",
  1563. "gpio_x4_aud_px4",
  1564. "gpio_x5_aud_px5",
  1565. "gpio_x7_aud_px7",
  1566. "reset_out_n",
  1567. };
  1568. static const char * const rsvd2_groups[] = {
  1569. "pv0",
  1570. "pv1",
  1571. "sdmmc1_dat0_py7",
  1572. "clk2_out_pw5",
  1573. "clk2_req_pcc5",
  1574. "hdmi_int_pn7",
  1575. "ddc_scl_pv4",
  1576. "ddc_sda_pv5",
  1577. "uart3_txd_pw6",
  1578. "uart3_rxd_pw7",
  1579. "gen1_i2c_scl_pc4",
  1580. "gen1_i2c_sda_pc5",
  1581. "dap4_fs_pp4",
  1582. "dap4_din_pp5",
  1583. "dap4_dout_pp6",
  1584. "dap4_sclk_pp7",
  1585. "clk3_out_pee0",
  1586. "clk3_req_pee1",
  1587. "gmi_iordy_pi5",
  1588. "gmi_a17_pb0",
  1589. "gmi_a18_pb1",
  1590. "gen2_i2c_scl_pt5",
  1591. "gen2_i2c_sda_pt6",
  1592. "sdmmc4_clk_pcc4",
  1593. "sdmmc4_cmd_pt7",
  1594. "sdmmc4_dat7_paa7",
  1595. "pcc1",
  1596. "pbb7",
  1597. "pcc2",
  1598. "pwr_i2c_scl_pz6",
  1599. "pwr_i2c_sda_pz7",
  1600. "kb_row0_pr0",
  1601. "kb_row1_pr1",
  1602. "kb_row2_pr2",
  1603. "kb_row7_pr7",
  1604. "kb_row8_ps0",
  1605. "kb_row9_ps1",
  1606. "kb_row10_ps2",
  1607. "kb_col1_pq1",
  1608. "kb_col2_pq2",
  1609. "kb_col5_pq5",
  1610. "kb_col6_pq6",
  1611. "kb_col7_pq7",
  1612. "sys_clk_req_pz5",
  1613. "core_pwr_req",
  1614. "cpu_pwr_req",
  1615. "pwr_int_n",
  1616. "owr",
  1617. "spdif_out_pk5",
  1618. "gpio_x1_aud_px1",
  1619. "sdmmc3_clk_pa6",
  1620. "sdmmc3_dat0_pb7",
  1621. "gpio_w2_aud_pw2",
  1622. "usb_vbus_en0_pn4",
  1623. "usb_vbus_en1_pn5",
  1624. "sdmmc3_clk_lb_out_pee4",
  1625. "sdmmc3_clk_lb_in_pee5",
  1626. "reset_out_n",
  1627. };
  1628. static const char * const rsvd3_groups[] = {
  1629. "pv0",
  1630. "pv1",
  1631. "sdmmc1_clk_pz0",
  1632. "clk2_out_pw5",
  1633. "clk2_req_pcc5",
  1634. "hdmi_int_pn7",
  1635. "ddc_scl_pv4",
  1636. "ddc_sda_pv5",
  1637. "uart2_rts_n_pj6",
  1638. "uart2_cts_n_pj5",
  1639. "uart3_txd_pw6",
  1640. "uart3_rxd_pw7",
  1641. "pu0",
  1642. "pu1",
  1643. "pu2",
  1644. "gen1_i2c_scl_pc4",
  1645. "gen1_i2c_sda_pc5",
  1646. "dap4_din_pp5",
  1647. "dap4_sclk_pp7",
  1648. "clk3_out_pee0",
  1649. "clk3_req_pee1",
  1650. "pcc1",
  1651. "cam_i2c_scl_pbb1",
  1652. "cam_i2c_sda_pbb2",
  1653. "pbb7",
  1654. "pcc2",
  1655. "pwr_i2c_scl_pz6",
  1656. "pwr_i2c_sda_pz7",
  1657. "kb_row0_pr0",
  1658. "kb_row1_pr1",
  1659. "kb_row2_pr2",
  1660. "kb_row3_pr3",
  1661. "kb_row9_ps1",
  1662. "kb_row10_ps2",
  1663. "clk_32k_out_pa0",
  1664. "sys_clk_req_pz5",
  1665. "core_pwr_req",
  1666. "cpu_pwr_req",
  1667. "pwr_int_n",
  1668. "owr",
  1669. "clk1_req_pee2",
  1670. "clk1_out_pw4",
  1671. "spdif_out_pk5",
  1672. "spdif_in_pk6",
  1673. "dap2_fs_pa2",
  1674. "dap2_sclk_pa3",
  1675. "dap2_din_pa4",
  1676. "dap2_dout_pa5",
  1677. "dvfs_pwm_px0",
  1678. "gpio_x1_aud_px1",
  1679. "gpio_x3_aud_px3",
  1680. "dvfs_clk_px2",
  1681. "sdmmc3_clk_pa6",
  1682. "sdmmc3_dat0_pb7",
  1683. "hdmi_cec_pee3",
  1684. "sdmmc3_cd_n_pv2",
  1685. "usb_vbus_en0_pn4",
  1686. "usb_vbus_en1_pn5",
  1687. "sdmmc3_clk_lb_out_pee4",
  1688. "sdmmc3_clk_lb_in_pee5",
  1689. "reset_out_n",
  1690. };
  1691. static const char * const rsvd4_groups[] = {
  1692. "pv0",
  1693. "pv1",
  1694. "sdmmc1_clk_pz0",
  1695. "clk2_out_pw5",
  1696. "clk2_req_pcc5",
  1697. "hdmi_int_pn7",
  1698. "ddc_scl_pv4",
  1699. "ddc_sda_pv5",
  1700. "pu0",
  1701. "pu1",
  1702. "pu2",
  1703. "gen1_i2c_scl_pc4",
  1704. "gen1_i2c_sda_pc5",
  1705. "dap4_fs_pp4",
  1706. "dap4_din_pp5",
  1707. "dap4_dout_pp6",
  1708. "dap4_sclk_pp7",
  1709. "clk3_out_pee0",
  1710. "clk3_req_pee1",
  1711. "gmi_ad0_pg0",
  1712. "gmi_ad1_pg1",
  1713. "gmi_ad2_pg2",
  1714. "gmi_ad3_pg3",
  1715. "gmi_ad4_pg4",
  1716. "gmi_ad12_ph4",
  1717. "gmi_ad13_ph5",
  1718. "gmi_rst_n_pi4",
  1719. "gen2_i2c_scl_pt5",
  1720. "gen2_i2c_sda_pt6",
  1721. "sdmmc4_clk_pcc4",
  1722. "sdmmc4_cmd_pt7",
  1723. "sdmmc4_dat0_paa0",
  1724. "sdmmc4_dat1_paa1",
  1725. "sdmmc4_dat2_paa2",
  1726. "sdmmc4_dat3_paa3",
  1727. "sdmmc4_dat4_paa4",
  1728. "sdmmc4_dat5_paa5",
  1729. "sdmmc4_dat6_paa6",
  1730. "sdmmc4_dat7_paa7",
  1731. "cam_mclk_pcc0",
  1732. "pcc1",
  1733. "cam_i2c_scl_pbb1",
  1734. "cam_i2c_sda_pbb2",
  1735. "pbb3",
  1736. "pbb4",
  1737. "pbb5",
  1738. "pbb6",
  1739. "pbb7",
  1740. "pcc2",
  1741. "pwr_i2c_scl_pz6",
  1742. "pwr_i2c_sda_pz7",
  1743. "kb_row0_pr0",
  1744. "kb_row1_pr1",
  1745. "kb_row2_pr2",
  1746. "kb_col2_pq2",
  1747. "kb_col5_pq5",
  1748. "kb_col6_pq6",
  1749. "kb_col7_pq7",
  1750. "clk_32k_out_pa0",
  1751. "sys_clk_req_pz5",
  1752. "core_pwr_req",
  1753. "cpu_pwr_req",
  1754. "pwr_int_n",
  1755. "owr",
  1756. "dap1_fs_pn0",
  1757. "dap1_din_pn1",
  1758. "dap1_dout_pn2",
  1759. "dap1_sclk_pn3",
  1760. "clk1_req_pee2",
  1761. "clk1_out_pw4",
  1762. "spdif_in_pk6",
  1763. "spdif_out_pk5",
  1764. "dap2_fs_pa2",
  1765. "dap2_sclk_pa3",
  1766. "dap2_din_pa4",
  1767. "dap2_dout_pa5",
  1768. "dvfs_pwm_px0",
  1769. "gpio_x1_aud_px1",
  1770. "gpio_x3_aud_px3",
  1771. "dvfs_clk_px2",
  1772. "gpio_x5_aud_px5",
  1773. "gpio_x6_aud_px6",
  1774. "gpio_x7_aud_px7",
  1775. "sdmmc3_cd_n_pv2",
  1776. "usb_vbus_en0_pn4",
  1777. "usb_vbus_en1_pn5",
  1778. "sdmmc3_clk_lb_in_pee5",
  1779. "sdmmc3_clk_lb_out_pee4",
  1780. };
  1781. static const char * const sdmmc1_groups[] = {
  1782. "sdmmc1_clk_pz0",
  1783. "sdmmc1_cmd_pz1",
  1784. "sdmmc1_dat3_py4",
  1785. "sdmmc1_dat2_py5",
  1786. "sdmmc1_dat1_py6",
  1787. "sdmmc1_dat0_py7",
  1788. "uart3_cts_n_pa1",
  1789. "kb_col5_pq5",
  1790. "sdmmc1_wp_n_pv3",
  1791. };
  1792. static const char * const sdmmc2_groups[] = {
  1793. "gmi_iordy_pi5",
  1794. "gmi_clk_pk1",
  1795. "gmi_cs2_n_pk3",
  1796. "gmi_cs3_n_pk4",
  1797. "gmi_cs7_n_pi6",
  1798. "gmi_ad12_ph4",
  1799. "gmi_ad13_ph5",
  1800. "gmi_ad14_ph6",
  1801. "gmi_ad15_ph7",
  1802. "gmi_dqs_p_pj3",
  1803. };
  1804. static const char * const sdmmc3_groups[] = {
  1805. "kb_col4_pq4",
  1806. "sdmmc3_clk_pa6",
  1807. "sdmmc3_cmd_pa7",
  1808. "sdmmc3_dat0_pb7",
  1809. "sdmmc3_dat1_pb6",
  1810. "sdmmc3_dat2_pb5",
  1811. "sdmmc3_dat3_pb4",
  1812. "hdmi_cec_pee3",
  1813. "sdmmc3_cd_n_pv2",
  1814. "sdmmc3_clk_lb_in_pee5",
  1815. "sdmmc3_clk_lb_out_pee4",
  1816. };
  1817. static const char * const sdmmc4_groups[] = {
  1818. "sdmmc4_clk_pcc4",
  1819. "sdmmc4_cmd_pt7",
  1820. "sdmmc4_dat0_paa0",
  1821. "sdmmc4_dat1_paa1",
  1822. "sdmmc4_dat2_paa2",
  1823. "sdmmc4_dat3_paa3",
  1824. "sdmmc4_dat4_paa4",
  1825. "sdmmc4_dat5_paa5",
  1826. "sdmmc4_dat6_paa6",
  1827. "sdmmc4_dat7_paa7",
  1828. };
  1829. static const char * const soc_groups[] = {
  1830. "gmi_cs1_n_pj2",
  1831. "gmi_oe_n_pi1",
  1832. "clk_32k_out_pa0",
  1833. "hdmi_cec_pee3",
  1834. };
  1835. static const char * const spdif_groups[] = {
  1836. "sdmmc1_cmd_pz1",
  1837. "sdmmc1_dat3_py4",
  1838. "uart2_rxd_pc3",
  1839. "uart2_txd_pc2",
  1840. "spdif_in_pk6",
  1841. "spdif_out_pk5",
  1842. };
  1843. static const char * const spi1_groups[] = {
  1844. "ulpi_clk_py0",
  1845. "ulpi_dir_py1",
  1846. "ulpi_nxt_py2",
  1847. "ulpi_stp_py3",
  1848. "gpio_x3_aud_px3",
  1849. "gpio_x4_aud_px4",
  1850. "gpio_x5_aud_px5",
  1851. "gpio_x6_aud_px6",
  1852. "gpio_x7_aud_px7",
  1853. "gpio_w3_aud_pw3",
  1854. };
  1855. static const char * const spi2_groups[] = {
  1856. "ulpi_data4_po5",
  1857. "ulpi_data5_po6",
  1858. "ulpi_data6_po7",
  1859. "ulpi_data7_po0",
  1860. "kb_row4_pr4",
  1861. "kb_row5_pr5",
  1862. "kb_col0_pq0",
  1863. "kb_col1_pq1",
  1864. "kb_col2_pq2",
  1865. "kb_col6_pq6",
  1866. "kb_col7_pq7",
  1867. "gpio_x4_aud_px4",
  1868. "gpio_x5_aud_px5",
  1869. "gpio_x6_aud_px6",
  1870. "gpio_x7_aud_px7",
  1871. "gpio_w2_aud_pw2",
  1872. "gpio_w3_aud_pw3",
  1873. };
  1874. static const char * const spi3_groups[] = {
  1875. "ulpi_data0_po1",
  1876. "ulpi_data1_po2",
  1877. "ulpi_data2_po3",
  1878. "ulpi_data3_po4",
  1879. "sdmmc4_dat0_paa0",
  1880. "sdmmc4_dat1_paa1",
  1881. "sdmmc4_dat2_paa2",
  1882. "sdmmc4_dat3_paa3",
  1883. "sdmmc4_dat4_paa4",
  1884. "sdmmc4_dat5_paa5",
  1885. "sdmmc4_dat6_paa6",
  1886. "sdmmc3_clk_pa6",
  1887. "sdmmc3_cmd_pa7",
  1888. "sdmmc3_dat0_pb7",
  1889. "sdmmc3_dat1_pb6",
  1890. "sdmmc3_dat2_pb5",
  1891. "sdmmc3_dat3_pb4",
  1892. };
  1893. static const char * const spi4_groups[] = {
  1894. "sdmmc1_cmd_pz1",
  1895. "sdmmc1_dat3_py4",
  1896. "sdmmc1_dat2_py5",
  1897. "sdmmc1_dat1_py6",
  1898. "sdmmc1_dat0_py7",
  1899. "uart2_rxd_pc3",
  1900. "uart2_txd_pc2",
  1901. "uart2_rts_n_pj6",
  1902. "uart2_cts_n_pj5",
  1903. "uart3_txd_pw6",
  1904. "uart3_rxd_pw7",
  1905. "uart3_cts_n_pa1",
  1906. "gmi_wait_pi7",
  1907. "gmi_cs6_n_pi3",
  1908. "gmi_ad5_pg5",
  1909. "gmi_ad6_pg6",
  1910. "gmi_ad7_pg7",
  1911. "gmi_a19_pk7",
  1912. "gmi_wr_n_pi0",
  1913. "sdmmc1_wp_n_pv3",
  1914. };
  1915. static const char * const spi5_groups[] = {
  1916. "ulpi_clk_py0",
  1917. "ulpi_dir_py1",
  1918. "ulpi_nxt_py2",
  1919. "ulpi_stp_py3",
  1920. "dap3_fs_pp0",
  1921. "dap3_din_pp1",
  1922. "dap3_dout_pp2",
  1923. "dap3_sclk_pp3",
  1924. };
  1925. static const char * const spi6_groups[] = {
  1926. "dvfs_pwm_px0",
  1927. "gpio_x1_aud_px1",
  1928. "gpio_x3_aud_px3",
  1929. "dvfs_clk_px2",
  1930. "gpio_x6_aud_px6",
  1931. "gpio_w2_aud_pw2",
  1932. "gpio_w3_aud_pw3",
  1933. };
  1934. static const char * const sysclk_groups[] = {
  1935. "sys_clk_req_pz5",
  1936. };
  1937. static const char * const trace_groups[] = {
  1938. "gmi_iordy_pi5",
  1939. "gmi_adv_n_pk0",
  1940. "gmi_clk_pk1",
  1941. "gmi_cs2_n_pk3",
  1942. "gmi_cs4_n_pk2",
  1943. "gmi_a16_pj7",
  1944. "gmi_a17_pb0",
  1945. "gmi_a18_pb1",
  1946. "gmi_a19_pk7",
  1947. "gmi_dqs_p_pj3",
  1948. };
  1949. static const char * const uarta_groups[] = {
  1950. "ulpi_data0_po1",
  1951. "ulpi_data1_po2",
  1952. "ulpi_data2_po3",
  1953. "ulpi_data3_po4",
  1954. "ulpi_data4_po5",
  1955. "ulpi_data5_po6",
  1956. "ulpi_data6_po7",
  1957. "ulpi_data7_po0",
  1958. "sdmmc1_cmd_pz1",
  1959. "sdmmc1_dat3_py4",
  1960. "sdmmc1_dat2_py5",
  1961. "sdmmc1_dat1_py6",
  1962. "sdmmc1_dat0_py7",
  1963. "uart2_rxd_pc3",
  1964. "uart2_txd_pc2",
  1965. "uart2_rts_n_pj6",
  1966. "uart2_cts_n_pj5",
  1967. "pu0",
  1968. "pu1",
  1969. "pu2",
  1970. "pu3",
  1971. "pu4",
  1972. "pu5",
  1973. "pu6",
  1974. "kb_row7_pr7",
  1975. "kb_row8_ps0",
  1976. "kb_row9_ps1",
  1977. "kb_row10_ps2",
  1978. "kb_col3_pq3",
  1979. "kb_col4_pq4",
  1980. "sdmmc3_cmd_pa7",
  1981. "sdmmc3_dat1_pb6",
  1982. "sdmmc1_wp_n_pv3",
  1983. };
  1984. static const char * const uartb_groups[] = {
  1985. "uart2_rts_n_pj6",
  1986. "uart2_cts_n_pj5",
  1987. };
  1988. static const char * const uartc_groups[] = {
  1989. "uart3_txd_pw6",
  1990. "uart3_rxd_pw7",
  1991. "uart3_cts_n_pa1",
  1992. "uart3_rts_n_pc0",
  1993. };
  1994. static const char * const uartd_groups[] = {
  1995. "ulpi_clk_py0",
  1996. "ulpi_dir_py1",
  1997. "ulpi_nxt_py2",
  1998. "ulpi_stp_py3",
  1999. "gmi_a16_pj7",
  2000. "gmi_a17_pb0",
  2001. "gmi_a18_pb1",
  2002. "gmi_a19_pk7",
  2003. };
  2004. static const char * const ulpi_groups[] = {
  2005. "ulpi_data0_po1",
  2006. "ulpi_data1_po2",
  2007. "ulpi_data2_po3",
  2008. "ulpi_data3_po4",
  2009. "ulpi_data4_po5",
  2010. "ulpi_data5_po6",
  2011. "ulpi_data6_po7",
  2012. "ulpi_data7_po0",
  2013. "ulpi_clk_py0",
  2014. "ulpi_dir_py1",
  2015. "ulpi_nxt_py2",
  2016. "ulpi_stp_py3",
  2017. };
  2018. static const char * const usb_groups[] = {
  2019. "pv0",
  2020. "pu6",
  2021. "gmi_cs0_n_pj0",
  2022. "gmi_cs4_n_pk2",
  2023. "gmi_ad11_ph3",
  2024. "kb_col0_pq0",
  2025. "spdif_in_pk6",
  2026. "usb_vbus_en0_pn4",
  2027. "usb_vbus_en1_pn5",
  2028. };
  2029. static const char * const vgp1_groups[] = {
  2030. "cam_i2c_scl_pbb1",
  2031. };
  2032. static const char * const vgp2_groups[] = {
  2033. "cam_i2c_sda_pbb2",
  2034. };
  2035. static const char * const vgp3_groups[] = {
  2036. "pbb3",
  2037. };
  2038. static const char * const vgp4_groups[] = {
  2039. "pbb4",
  2040. };
  2041. static const char * const vgp5_groups[] = {
  2042. "pbb5",
  2043. };
  2044. static const char * const vgp6_groups[] = {
  2045. "pbb6",
  2046. };
  2047. static const char * const vi_groups[] = {
  2048. "cam_mclk_pcc0",
  2049. "pbb0",
  2050. };
  2051. static const char * const vi_alt1_groups[] = {
  2052. "cam_mclk_pcc0",
  2053. "pbb0",
  2054. };
  2055. static const char * const vi_alt3_groups[] = {
  2056. "cam_mclk_pcc0",
  2057. "pbb0",
  2058. };
  2059. #define FUNCTION(fname) \
  2060. { \
  2061. .name = #fname, \
  2062. .groups = fname##_groups, \
  2063. .ngroups = ARRAY_SIZE(fname##_groups), \
  2064. }
  2065. static const struct tegra_function tegra114_functions[] = {
  2066. FUNCTION(blink),
  2067. FUNCTION(cec),
  2068. FUNCTION(cldvfs),
  2069. FUNCTION(clk12),
  2070. FUNCTION(cpu),
  2071. FUNCTION(dap),
  2072. FUNCTION(dap1),
  2073. FUNCTION(dap2),
  2074. FUNCTION(dev3),
  2075. FUNCTION(displaya),
  2076. FUNCTION(displaya_alt),
  2077. FUNCTION(displayb),
  2078. FUNCTION(dtv),
  2079. FUNCTION(emc_dll),
  2080. FUNCTION(extperiph1),
  2081. FUNCTION(extperiph2),
  2082. FUNCTION(extperiph3),
  2083. FUNCTION(gmi),
  2084. FUNCTION(gmi_alt),
  2085. FUNCTION(hda),
  2086. FUNCTION(hsi),
  2087. FUNCTION(i2c1),
  2088. FUNCTION(i2c2),
  2089. FUNCTION(i2c3),
  2090. FUNCTION(i2c4),
  2091. FUNCTION(i2cpwr),
  2092. FUNCTION(i2s0),
  2093. FUNCTION(i2s1),
  2094. FUNCTION(i2s2),
  2095. FUNCTION(i2s3),
  2096. FUNCTION(i2s4),
  2097. FUNCTION(irda),
  2098. FUNCTION(kbc),
  2099. FUNCTION(nand),
  2100. FUNCTION(nand_alt),
  2101. FUNCTION(owr),
  2102. FUNCTION(pmi),
  2103. FUNCTION(pwm0),
  2104. FUNCTION(pwm1),
  2105. FUNCTION(pwm2),
  2106. FUNCTION(pwm3),
  2107. FUNCTION(pwron),
  2108. FUNCTION(reset_out_n),
  2109. FUNCTION(rsvd1),
  2110. FUNCTION(rsvd2),
  2111. FUNCTION(rsvd3),
  2112. FUNCTION(rsvd4),
  2113. FUNCTION(sdmmc1),
  2114. FUNCTION(sdmmc2),
  2115. FUNCTION(sdmmc3),
  2116. FUNCTION(sdmmc4),
  2117. FUNCTION(soc),
  2118. FUNCTION(spdif),
  2119. FUNCTION(spi1),
  2120. FUNCTION(spi2),
  2121. FUNCTION(spi3),
  2122. FUNCTION(spi4),
  2123. FUNCTION(spi5),
  2124. FUNCTION(spi6),
  2125. FUNCTION(sysclk),
  2126. FUNCTION(trace),
  2127. FUNCTION(uarta),
  2128. FUNCTION(uartb),
  2129. FUNCTION(uartc),
  2130. FUNCTION(uartd),
  2131. FUNCTION(ulpi),
  2132. FUNCTION(usb),
  2133. FUNCTION(vgp1),
  2134. FUNCTION(vgp2),
  2135. FUNCTION(vgp3),
  2136. FUNCTION(vgp4),
  2137. FUNCTION(vgp5),
  2138. FUNCTION(vgp6),
  2139. FUNCTION(vi),
  2140. FUNCTION(vi_alt1),
  2141. FUNCTION(vi_alt3),
  2142. };
  2143. #define DRV_PINGROUP_REG_START 0x868 /* bank 0 */
  2144. #define PINGROUP_REG_START 0x3000 /* bank 1 */
  2145. #define PINGROUP_REG_Y(r) ((r) - PINGROUP_REG_START)
  2146. #define PINGROUP_REG_N(r) -1
  2147. #define PINGROUP(pg_name, f0, f1, f2, f3, f_safe, r, od, ior, rcv_sel) \
  2148. { \
  2149. .name = #pg_name, \
  2150. .pins = pg_name##_pins, \
  2151. .npins = ARRAY_SIZE(pg_name##_pins), \
  2152. .funcs = { \
  2153. TEGRA_MUX_##f0, \
  2154. TEGRA_MUX_##f1, \
  2155. TEGRA_MUX_##f2, \
  2156. TEGRA_MUX_##f3, \
  2157. }, \
  2158. .func_safe = TEGRA_MUX_##f_safe, \
  2159. .mux_reg = PINGROUP_REG_Y(r), \
  2160. .mux_bank = 1, \
  2161. .mux_bit = 0, \
  2162. .pupd_reg = PINGROUP_REG_Y(r), \
  2163. .pupd_bank = 1, \
  2164. .pupd_bit = 2, \
  2165. .tri_reg = PINGROUP_REG_Y(r), \
  2166. .tri_bank = 1, \
  2167. .tri_bit = 4, \
  2168. .einput_reg = PINGROUP_REG_Y(r), \
  2169. .einput_bank = 1, \
  2170. .einput_bit = 5, \
  2171. .odrain_reg = PINGROUP_REG_##od(r), \
  2172. .odrain_bank = 1, \
  2173. .odrain_bit = 6, \
  2174. .lock_reg = PINGROUP_REG_Y(r), \
  2175. .lock_bank = 1, \
  2176. .lock_bit = 7, \
  2177. .ioreset_reg = PINGROUP_REG_##ior(r), \
  2178. .ioreset_bank = 1, \
  2179. .ioreset_bit = 8, \
  2180. .rcv_sel_reg = PINGROUP_REG_##rcv_sel(r), \
  2181. .rcv_sel_bank = 1, \
  2182. .rcv_sel_bit = 9, \
  2183. .drv_reg = -1, \
  2184. .drvtype_reg = -1, \
  2185. }
  2186. #define DRV_PINGROUP_DVRTYPE_Y(r) ((r) - DRV_PINGROUP_REG_START)
  2187. #define DRV_PINGROUP_DVRTYPE_N(r) -1
  2188. #define DRV_PINGROUP(pg_name, r, hsm_b, schmitt_b, lpmd_b, \
  2189. drvdn_b, drvdn_w, drvup_b, drvup_w, \
  2190. slwr_b, slwr_w, slwf_b, slwf_w, \
  2191. drvtype) \
  2192. { \
  2193. .name = "drive_" #pg_name, \
  2194. .pins = drive_##pg_name##_pins, \
  2195. .npins = ARRAY_SIZE(drive_##pg_name##_pins), \
  2196. .mux_reg = -1, \
  2197. .pupd_reg = -1, \
  2198. .tri_reg = -1, \
  2199. .einput_reg = -1, \
  2200. .odrain_reg = -1, \
  2201. .lock_reg = -1, \
  2202. .ioreset_reg = -1, \
  2203. .rcv_sel_reg = -1, \
  2204. .drv_reg = DRV_PINGROUP_DVRTYPE_Y(r), \
  2205. .drv_bank = 0, \
  2206. .hsm_bit = hsm_b, \
  2207. .schmitt_bit = schmitt_b, \
  2208. .lpmd_bit = lpmd_b, \
  2209. .drvdn_bit = drvdn_b, \
  2210. .drvdn_width = drvdn_w, \
  2211. .drvup_bit = drvup_b, \
  2212. .drvup_width = drvup_w, \
  2213. .slwr_bit = slwr_b, \
  2214. .slwr_width = slwr_w, \
  2215. .slwf_bit = slwf_b, \
  2216. .slwf_width = slwf_w, \
  2217. .drvtype_reg = DRV_PINGROUP_DVRTYPE_##drvtype(r), \
  2218. .drvtype_bank = 0, \
  2219. .drvtype_bit = 6, \
  2220. }
  2221. static const struct tegra_pingroup tegra114_groups[] = {
  2222. /* pg_name, f0, f1, f2, f3, safe, r, od, ior, rcv_sel */
  2223. /* FIXME: Fill in correct data in safe column */
  2224. PINGROUP(ulpi_data0_po1, SPI3, HSI, UARTA, ULPI, ULPI, 0x3000, N, N, N),
  2225. PINGROUP(ulpi_data1_po2, SPI3, HSI, UARTA, ULPI, ULPI, 0x3004, N, N, N),
  2226. PINGROUP(ulpi_data2_po3, SPI3, HSI, UARTA, ULPI, ULPI, 0x3008, N, N, N),
  2227. PINGROUP(ulpi_data3_po4, SPI3, HSI, UARTA, ULPI, ULPI, 0x300c, N, N, N),
  2228. PINGROUP(ulpi_data4_po5, SPI2, HSI, UARTA, ULPI, ULPI, 0x3010, N, N, N),
  2229. PINGROUP(ulpi_data5_po6, SPI2, HSI, UARTA, ULPI, ULPI, 0x3014, N, N, N),
  2230. PINGROUP(ulpi_data6_po7, SPI2, HSI, UARTA, ULPI, ULPI, 0x3018, N, N, N),
  2231. PINGROUP(ulpi_data7_po0, SPI2, HSI, UARTA, ULPI, ULPI, 0x301c, N, N, N),
  2232. PINGROUP(ulpi_clk_py0, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3020, N, N, N),
  2233. PINGROUP(ulpi_dir_py1, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3024, N, N, N),
  2234. PINGROUP(ulpi_nxt_py2, SPI1, SPI5, UARTD, ULPI, ULPI, 0x3028, N, N, N),
  2235. PINGROUP(ulpi_stp_py3, SPI1, SPI5, UARTD, ULPI, ULPI, 0x302c, N, N, N),
  2236. PINGROUP(dap3_fs_pp0, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3030, N, N, N),
  2237. PINGROUP(dap3_din_pp1, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3034, N, N, N),
  2238. PINGROUP(dap3_dout_pp2, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x3038, N, N, N),
  2239. PINGROUP(dap3_sclk_pp3, I2S2, SPI5, DISPLAYA, DISPLAYB, I2S2, 0x303c, N, N, N),
  2240. PINGROUP(pv0, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x3040, N, N, N),
  2241. PINGROUP(pv1, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3044, N, N, N),
  2242. PINGROUP(sdmmc1_clk_pz0, SDMMC1, CLK12, RSVD3, RSVD4, RSVD4, 0x3048, N, N, N),
  2243. PINGROUP(sdmmc1_cmd_pz1, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x304c, N, N, N),
  2244. PINGROUP(sdmmc1_dat3_py4, SDMMC1, SPDIF, SPI4, UARTA, SDMMC1, 0x3050, N, N, N),
  2245. PINGROUP(sdmmc1_dat2_py5, SDMMC1, PWM0, SPI4, UARTA, SDMMC1, 0x3054, N, N, N),
  2246. PINGROUP(sdmmc1_dat1_py6, SDMMC1, PWM1, SPI4, UARTA, SDMMC1, 0x3058, N, N, N),
  2247. PINGROUP(sdmmc1_dat0_py7, SDMMC1, RSVD2, SPI4, UARTA, RSVD2, 0x305c, N, N, N),
  2248. PINGROUP(clk2_out_pw5, EXTPERIPH2, RSVD2, RSVD3, RSVD4, RSVD4, 0x3068, N, N, N),
  2249. PINGROUP(clk2_req_pcc5, DAP, RSVD2, RSVD3, RSVD4, RSVD4, 0x306c, N, N, N),
  2250. PINGROUP(hdmi_int_pn7, RSVD1, RSVD2, RSVD3, RSVD4, RSVD4, 0x3110, N, N, Y),
  2251. PINGROUP(ddc_scl_pv4, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3114, N, N, Y),
  2252. PINGROUP(ddc_sda_pv5, I2C4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3118, N, N, Y),
  2253. PINGROUP(uart2_rxd_pc3, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3164, N, N, N),
  2254. PINGROUP(uart2_txd_pc2, IRDA, SPDIF, UARTA, SPI4, IRDA, 0x3168, N, N, N),
  2255. PINGROUP(uart2_rts_n_pj6, UARTA, UARTB, RSVD3, SPI4, RSVD3, 0x316c, N, N, N),
  2256. PINGROUP(uart2_cts_n_pj5, UARTA, UARTB, RSVD3, SPI4, RSVD3, 0x3170, N, N, N),
  2257. PINGROUP(uart3_txd_pw6, UARTC, RSVD2, RSVD3, SPI4, RSVD3, 0x3174, N, N, N),
  2258. PINGROUP(uart3_rxd_pw7, UARTC, RSVD2, RSVD3, SPI4, RSVD3, 0x3178, N, N, N),
  2259. PINGROUP(uart3_cts_n_pa1, UARTC, SDMMC1, DTV, SPI4, UARTC, 0x317c, N, N, N),
  2260. PINGROUP(uart3_rts_n_pc0, UARTC, PWM0, DTV, DISPLAYA, UARTC, 0x3180, N, N, N),
  2261. PINGROUP(pu0, OWR, UARTA, RSVD3, RSVD4, RSVD4, 0x3184, N, N, N),
  2262. PINGROUP(pu1, RSVD1, UARTA, RSVD3, RSVD4, RSVD4, 0x3188, N, N, N),
  2263. PINGROUP(pu2, RSVD1, UARTA, RSVD3, RSVD4, RSVD4, 0x318c, N, N, N),
  2264. PINGROUP(pu3, PWM0, UARTA, DISPLAYA, DISPLAYB, PWM0, 0x3190, N, N, N),
  2265. PINGROUP(pu4, PWM1, UARTA, DISPLAYA, DISPLAYB, PWM1, 0x3194, N, N, N),
  2266. PINGROUP(pu5, PWM2, UARTA, DISPLAYA, DISPLAYB, PWM2, 0x3198, N, N, N),
  2267. PINGROUP(pu6, PWM3, UARTA, USB, DISPLAYB, PWM3, 0x319c, N, N, N),
  2268. PINGROUP(gen1_i2c_sda_pc5, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a0, Y, N, N),
  2269. PINGROUP(gen1_i2c_scl_pc4, I2C1, RSVD2, RSVD3, RSVD4, RSVD4, 0x31a4, Y, N, N),
  2270. PINGROUP(dap4_fs_pp4, I2S3, RSVD2, DTV, RSVD4, RSVD4, 0x31a8, N, N, N),
  2271. PINGROUP(dap4_din_pp5, I2S3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31ac, N, N, N),
  2272. PINGROUP(dap4_dout_pp6, I2S3, RSVD2, DTV, RSVD4, RSVD4, 0x31b0, N, N, N),
  2273. PINGROUP(dap4_sclk_pp7, I2S3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31b4, N, N, N),
  2274. PINGROUP(clk3_out_pee0, EXTPERIPH3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31b8, N, N, N),
  2275. PINGROUP(clk3_req_pee1, DEV3, RSVD2, RSVD3, RSVD4, RSVD4, 0x31bc, N, N, N),
  2276. PINGROUP(gmi_wp_n_pc7, RSVD1, NAND, GMI, GMI_ALT, RSVD1, 0x31c0, N, N, N),
  2277. PINGROUP(gmi_iordy_pi5, SDMMC2, RSVD2, GMI, TRACE, RSVD2, 0x31c4, N, N, N),
  2278. PINGROUP(gmi_wait_pi7, SPI4, NAND, GMI, DTV, NAND, 0x31c8, N, N, N),
  2279. PINGROUP(gmi_adv_n_pk0, RSVD1, NAND, GMI, TRACE, RSVD1, 0x31cc, N, N, N),
  2280. PINGROUP(gmi_clk_pk1, SDMMC2, NAND, GMI, TRACE, GMI, 0x31d0, N, N, N),
  2281. PINGROUP(gmi_cs0_n_pj0, RSVD1, NAND, GMI, USB, RSVD1, 0x31d4, N, N, N),
  2282. PINGROUP(gmi_cs1_n_pj2, RSVD1, NAND, GMI, SOC, RSVD1, 0x31d8, N, N, N),
  2283. PINGROUP(gmi_cs2_n_pk3, SDMMC2, NAND, GMI, TRACE, GMI, 0x31dc, N, N, N),
  2284. PINGROUP(gmi_cs3_n_pk4, SDMMC2, NAND, GMI, GMI_ALT, GMI, 0x31e0, N, N, N),
  2285. PINGROUP(gmi_cs4_n_pk2, USB, NAND, GMI, TRACE, GMI, 0x31e4, N, N, N),
  2286. PINGROUP(gmi_cs6_n_pi3, NAND, NAND_ALT, GMI, SPI4, NAND, 0x31e8, N, N, N),
  2287. PINGROUP(gmi_cs7_n_pi6, NAND, NAND_ALT, GMI, SDMMC2, NAND, 0x31ec, N, N, N),
  2288. PINGROUP(gmi_ad0_pg0, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f0, N, N, N),
  2289. PINGROUP(gmi_ad1_pg1, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f4, N, N, N),
  2290. PINGROUP(gmi_ad2_pg2, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31f8, N, N, N),
  2291. PINGROUP(gmi_ad3_pg3, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x31fc, N, N, N),
  2292. PINGROUP(gmi_ad4_pg4, RSVD1, NAND, GMI, RSVD4, RSVD4, 0x3200, N, N, N),
  2293. PINGROUP(gmi_ad5_pg5, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3204, N, N, N),
  2294. PINGROUP(gmi_ad6_pg6, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3208, N, N, N),
  2295. PINGROUP(gmi_ad7_pg7, RSVD1, NAND, GMI, SPI4, RSVD1, 0x320c, N, N, N),
  2296. PINGROUP(gmi_ad8_ph0, PWM0, NAND, GMI, DTV, GMI, 0x3210, N, N, N),
  2297. PINGROUP(gmi_ad9_ph1, PWM1, NAND, GMI, CLDVFS, GMI, 0x3214, N, N, N),
  2298. PINGROUP(gmi_ad10_ph2, PWM2, NAND, GMI, CLDVFS, GMI, 0x3218, N, N, N),
  2299. PINGROUP(gmi_ad11_ph3, PWM3, NAND, GMI, USB, GMI, 0x321c, N, N, N),
  2300. PINGROUP(gmi_ad12_ph4, SDMMC2, NAND, GMI, RSVD4, RSVD4, 0x3220, N, N, N),
  2301. PINGROUP(gmi_ad13_ph5, SDMMC2, NAND, GMI, RSVD4, RSVD4, 0x3224, N, N, N),
  2302. PINGROUP(gmi_ad14_ph6, SDMMC2, NAND, GMI, DTV, GMI, 0x3228, N, N, N),
  2303. PINGROUP(gmi_ad15_ph7, SDMMC2, NAND, GMI, DTV, GMI, 0x322c, N, N, N),
  2304. PINGROUP(gmi_a16_pj7, UARTD, TRACE, GMI, GMI_ALT, GMI, 0x3230, N, N, N),
  2305. PINGROUP(gmi_a17_pb0, UARTD, RSVD2, GMI, TRACE, RSVD2, 0x3234, N, N, N),
  2306. PINGROUP(gmi_a18_pb1, UARTD, RSVD2, GMI, TRACE, RSVD2, 0x3238, N, N, N),
  2307. PINGROUP(gmi_a19_pk7, UARTD, SPI4, GMI, TRACE, GMI, 0x323c, N, N, N),
  2308. PINGROUP(gmi_wr_n_pi0, RSVD1, NAND, GMI, SPI4, RSVD1, 0x3240, N, N, N),
  2309. PINGROUP(gmi_oe_n_pi1, RSVD1, NAND, GMI, SOC, RSVD1, 0x3244, N, N, N),
  2310. PINGROUP(gmi_dqs_p_pj3, SDMMC2, NAND, GMI, TRACE, NAND, 0x3248, N, N, N),
  2311. PINGROUP(gmi_rst_n_pi4, NAND, NAND_ALT, GMI, RSVD4, RSVD4, 0x324c, N, N, N),
  2312. PINGROUP(gen2_i2c_scl_pt5, I2C2, RSVD2, GMI, RSVD4, RSVD4, 0x3250, Y, N, N),
  2313. PINGROUP(gen2_i2c_sda_pt6, I2C2, RSVD2, GMI, RSVD4, RSVD4, 0x3254, Y, N, N),
  2314. PINGROUP(sdmmc4_clk_pcc4, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x3258, N, Y, N),
  2315. PINGROUP(sdmmc4_cmd_pt7, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x325c, N, Y, N),
  2316. PINGROUP(sdmmc4_dat0_paa0, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3260, N, Y, N),
  2317. PINGROUP(sdmmc4_dat1_paa1, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3264, N, Y, N),
  2318. PINGROUP(sdmmc4_dat2_paa2, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3268, N, Y, N),
  2319. PINGROUP(sdmmc4_dat3_paa3, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x326c, N, Y, N),
  2320. PINGROUP(sdmmc4_dat4_paa4, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3270, N, Y, N),
  2321. PINGROUP(sdmmc4_dat5_paa5, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3274, N, Y, N),
  2322. PINGROUP(sdmmc4_dat6_paa6, SDMMC4, SPI3, GMI, RSVD4, RSVD4, 0x3278, N, Y, N),
  2323. PINGROUP(sdmmc4_dat7_paa7, SDMMC4, RSVD2, GMI, RSVD4, RSVD4, 0x327c, N, Y, N),
  2324. PINGROUP(cam_mclk_pcc0, VI, VI_ALT1, VI_ALT3, RSVD4, RSVD4, 0x3284, N, N, N),
  2325. PINGROUP(pcc1, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x3288, N, N, N),
  2326. PINGROUP(pbb0, I2S4, VI, VI_ALT1, VI_ALT3, I2S4, 0x328c, N, N, N),
  2327. PINGROUP(cam_i2c_scl_pbb1, VGP1, I2C3, RSVD3, RSVD4, RSVD4, 0x3290, Y, N, N),
  2328. PINGROUP(cam_i2c_sda_pbb2, VGP2, I2C3, RSVD3, RSVD4, RSVD4, 0x3294, Y, N, N),
  2329. PINGROUP(pbb3, VGP3, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x3298, N, N, N),
  2330. PINGROUP(pbb4, VGP4, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x329c, N, N, N),
  2331. PINGROUP(pbb5, VGP5, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x32a0, N, N, N),
  2332. PINGROUP(pbb6, VGP6, DISPLAYA, DISPLAYB, RSVD4, RSVD4, 0x32a4, N, N, N),
  2333. PINGROUP(pbb7, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x32a8, N, N, N),
  2334. PINGROUP(pcc2, I2S4, RSVD2, RSVD3, RSVD4, RSVD4, 0x32ac, N, N, N),
  2335. PINGROUP(pwr_i2c_scl_pz6, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b4, Y, N, N),
  2336. PINGROUP(pwr_i2c_sda_pz7, I2CPWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x32b8, Y, N, N),
  2337. PINGROUP(kb_row0_pr0, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32bc, N, N, N),
  2338. PINGROUP(kb_row1_pr1, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c0, N, N, N),
  2339. PINGROUP(kb_row2_pr2, KBC, RSVD2, RSVD3, RSVD4, RSVD4, 0x32c4, N, N, N),
  2340. PINGROUP(kb_row3_pr3, KBC, DISPLAYA, RSVD3, DISPLAYB, RSVD3, 0x32c8, N, N, N),
  2341. PINGROUP(kb_row4_pr4, KBC, DISPLAYA, SPI2, DISPLAYB, KBC, 0x32cc, N, N, N),
  2342. PINGROUP(kb_row5_pr5, KBC, DISPLAYA, SPI2, DISPLAYB, KBC, 0x32d0, N, N, N),
  2343. PINGROUP(kb_row6_pr6, KBC, DISPLAYA, DISPLAYA_ALT, DISPLAYB, KBC, 0x32d4, N, N, N),
  2344. PINGROUP(kb_row7_pr7, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32d8, N, N, N),
  2345. PINGROUP(kb_row8_ps0, KBC, RSVD2, CLDVFS, UARTA, RSVD2, 0x32dc, N, N, N),
  2346. PINGROUP(kb_row9_ps1, KBC, RSVD2, RSVD3, UARTA, RSVD3, 0x32e0, N, N, N),
  2347. PINGROUP(kb_row10_ps2, KBC, RSVD2, RSVD3, UARTA, RSVD3, 0x32e4, N, N, N),
  2348. PINGROUP(kb_col0_pq0, KBC, USB, SPI2, EMC_DLL, KBC, 0x32fc, N, N, N),
  2349. PINGROUP(kb_col1_pq1, KBC, RSVD2, SPI2, EMC_DLL, RSVD2, 0x3300, N, N, N),
  2350. PINGROUP(kb_col2_pq2, KBC, RSVD2, SPI2, RSVD4, RSVD2, 0x3304, N, N, N),
  2351. PINGROUP(kb_col3_pq3, KBC, DISPLAYA, PWM2, UARTA, KBC, 0x3308, N, N, N),
  2352. PINGROUP(kb_col4_pq4, KBC, OWR, SDMMC3, UARTA, KBC, 0x330c, N, N, N),
  2353. PINGROUP(kb_col5_pq5, KBC, RSVD2, SDMMC1, RSVD4, RSVD4, 0x3310, N, N, N),
  2354. PINGROUP(kb_col6_pq6, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3314, N, N, N),
  2355. PINGROUP(kb_col7_pq7, KBC, RSVD2, SPI2, RSVD4, RSVD4, 0x3318, N, N, N),
  2356. PINGROUP(clk_32k_out_pa0, BLINK, SOC, RSVD3, RSVD4, RSVD4, 0x331c, N, N, N),
  2357. PINGROUP(sys_clk_req_pz5, SYSCLK, RSVD2, RSVD3, RSVD4, RSVD4, 0x3320, N, N, N),
  2358. PINGROUP(core_pwr_req, PWRON, RSVD2, RSVD3, RSVD4, RSVD4, 0x3324, N, N, N),
  2359. PINGROUP(cpu_pwr_req, CPU, RSVD2, RSVD3, RSVD4, RSVD4, 0x3328, N, N, N),
  2360. PINGROUP(pwr_int_n, PMI, RSVD2, RSVD3, RSVD4, RSVD4, 0x332c, N, N, N),
  2361. PINGROUP(owr, OWR, RSVD2, RSVD3, RSVD4, RSVD4, 0x3334, N, N, Y),
  2362. PINGROUP(dap1_fs_pn0, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3338, N, N, N),
  2363. PINGROUP(dap1_din_pn1, I2S0, HDA, GMI, RSVD4, RSVD4, 0x333c, N, N, N),
  2364. PINGROUP(dap1_dout_pn2, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3340, N, N, N),
  2365. PINGROUP(dap1_sclk_pn3, I2S0, HDA, GMI, RSVD4, RSVD4, 0x3344, N, N, N),
  2366. PINGROUP(clk1_req_pee2, DAP, DAP1, RSVD3, RSVD4, RSVD4, 0x3348, N, N, N),
  2367. PINGROUP(clk1_out_pw4, EXTPERIPH1, DAP2, RSVD3, RSVD4, RSVD4, 0x334c, N, N, N),
  2368. PINGROUP(spdif_in_pk6, SPDIF, USB, RSVD3, RSVD4, RSVD4, 0x3350, N, N, N),
  2369. PINGROUP(spdif_out_pk5, SPDIF, RSVD2, RSVD3, RSVD4, RSVD4, 0x3354, N, N, N),
  2370. PINGROUP(dap2_fs_pa2, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3358, N, N, N),
  2371. PINGROUP(dap2_din_pa4, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x335c, N, N, N),
  2372. PINGROUP(dap2_dout_pa5, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3360, N, N, N),
  2373. PINGROUP(dap2_sclk_pa3, I2S1, HDA, RSVD3, RSVD4, RSVD4, 0x3364, N, N, N),
  2374. PINGROUP(dvfs_pwm_px0, SPI6, CLDVFS, RSVD3, RSVD4, RSVD4, 0x3368, N, N, N),
  2375. PINGROUP(gpio_x1_aud_px1, SPI6, RSVD2, RSVD3, RSVD4, RSVD4, 0x336c, N, N, N),
  2376. PINGROUP(gpio_x3_aud_px3, SPI6, SPI1, RSVD3, RSVD4, RSVD4, 0x3370, N, N, N),
  2377. PINGROUP(dvfs_clk_px2, SPI6, CLDVFS, RSVD3, RSVD4, RSVD4, 0x3374, N, N, N),
  2378. PINGROUP(gpio_x4_aud_px4, RSVD1, SPI1, SPI2, DAP2, RSVD1, 0x3378, N, N, N),
  2379. PINGROUP(gpio_x5_aud_px5, RSVD1, SPI1, SPI2, RSVD4, RSVD1, 0x337c, N, N, N),
  2380. PINGROUP(gpio_x6_aud_px6, SPI6, SPI1, SPI2, RSVD4, RSVD4, 0x3380, N, N, N),
  2381. PINGROUP(gpio_x7_aud_px7, RSVD1, SPI1, SPI2, RSVD4, RSVD4, 0x3384, N, N, N),
  2382. PINGROUP(sdmmc3_clk_pa6, SDMMC3, RSVD2, RSVD3, SPI3, RSVD3, 0x3390, N, N, N),
  2383. PINGROUP(sdmmc3_cmd_pa7, SDMMC3, PWM3, UARTA, SPI3, SDMMC3, 0x3394, N, N, N),
  2384. PINGROUP(sdmmc3_dat0_pb7, SDMMC3, RSVD2, RSVD3, SPI3, RSVD3, 0x3398, N, N, N),
  2385. PINGROUP(sdmmc3_dat1_pb6, SDMMC3, PWM2, UARTA, SPI3, SDMMC3, 0x339c, N, N, N),
  2386. PINGROUP(sdmmc3_dat2_pb5, SDMMC3, PWM1, DISPLAYA, SPI3, SDMMC3, 0x33a0, N, N, N),
  2387. PINGROUP(sdmmc3_dat3_pb4, SDMMC3, PWM0, DISPLAYB, SPI3, SDMMC3, 0x33a4, N, N, N),
  2388. PINGROUP(hdmi_cec_pee3, CEC, SDMMC3, RSVD3, SOC, RSVD3, 0x33e0, Y, N, N),
  2389. PINGROUP(sdmmc1_wp_n_pv3, SDMMC1, CLK12, SPI4, UARTA, SDMMC1, 0x33e4, N, N, N),
  2390. PINGROUP(sdmmc3_cd_n_pv2, SDMMC3, OWR, RSVD3, RSVD4, RSVD4, 0x33e8, N, N, N),
  2391. PINGROUP(gpio_w2_aud_pw2, SPI6, RSVD2, SPI2, I2C1, RSVD2, 0x33ec, N, N, N),
  2392. PINGROUP(gpio_w3_aud_pw3, SPI6, SPI1, SPI2, I2C1, SPI6, 0x33f0, N, N, N),
  2393. PINGROUP(usb_vbus_en0_pn4, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x33f4, Y, N, N),
  2394. PINGROUP(usb_vbus_en1_pn5, USB, RSVD2, RSVD3, RSVD4, RSVD4, 0x33f8, Y, N, N),
  2395. PINGROUP(sdmmc3_clk_lb_in_pee5, SDMMC3, RSVD2, RSVD3, RSVD4, RSVD4, 0x33fc, N, N, N),
  2396. PINGROUP(sdmmc3_clk_lb_out_pee4, SDMMC3, RSVD2, RSVD3, RSVD4, RSVD4, 0x3400, N, N, N),
  2397. PINGROUP(reset_out_n, RSVD1, RSVD2, RSVD3, RESET_OUT_N, RSVD3, 0x3408, N, N, N),
  2398. /* pg_name, r, hsm_b, schmitt_b, lpmd_b, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w, drvtype */
  2399. DRV_PINGROUP(ao1, 0x868, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2400. DRV_PINGROUP(ao2, 0x86c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2401. DRV_PINGROUP(at1, 0x870, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
  2402. DRV_PINGROUP(at2, 0x874, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
  2403. DRV_PINGROUP(at3, 0x878, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
  2404. DRV_PINGROUP(at4, 0x87c, 2, 3, 4, 12, 7, 20, 7, 28, 2, 30, 2, Y),
  2405. DRV_PINGROUP(at5, 0x880, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
  2406. DRV_PINGROUP(cdev1, 0x884, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2407. DRV_PINGROUP(cdev2, 0x888, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2408. DRV_PINGROUP(dap1, 0x890, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2409. DRV_PINGROUP(dap2, 0x894, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2410. DRV_PINGROUP(dap3, 0x898, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2411. DRV_PINGROUP(dap4, 0x89c, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2412. DRV_PINGROUP(dbg, 0x8a0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2413. DRV_PINGROUP(sdio3, 0x8b0, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
  2414. DRV_PINGROUP(spi, 0x8b4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2415. DRV_PINGROUP(uaa, 0x8b8, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2416. DRV_PINGROUP(uab, 0x8bc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2417. DRV_PINGROUP(uart2, 0x8c0, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2418. DRV_PINGROUP(uart3, 0x8c4, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2419. DRV_PINGROUP(sdio1, 0x8ec, 2, 3, -1, 12, 7, 20, 7, 28, 2, 30, 2, N),
  2420. DRV_PINGROUP(ddc, 0x8fc, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2421. DRV_PINGROUP(gma, 0x900, 2, 3, 4, 14, 5, 20, 5, 28, 2, 30, 2, Y),
  2422. DRV_PINGROUP(gme, 0x910, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
  2423. DRV_PINGROUP(gmf, 0x914, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
  2424. DRV_PINGROUP(gmg, 0x918, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
  2425. DRV_PINGROUP(gmh, 0x91c, 2, 3, 4, 14, 5, 19, 5, 28, 2, 30, 2, N),
  2426. DRV_PINGROUP(owr, 0x920, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2427. DRV_PINGROUP(uda, 0x924, 2, 3, 4, 12, 5, 20, 5, 28, 2, 30, 2, N),
  2428. };
  2429. static const struct tegra_pinctrl_soc_data tegra114_pinctrl = {
  2430. .ngpios = NUM_GPIOS,
  2431. .pins = tegra114_pins,
  2432. .npins = ARRAY_SIZE(tegra114_pins),
  2433. .functions = tegra114_functions,
  2434. .nfunctions = ARRAY_SIZE(tegra114_functions),
  2435. .groups = tegra114_groups,
  2436. .ngroups = ARRAY_SIZE(tegra114_groups),
  2437. };
  2438. static int tegra114_pinctrl_probe(struct platform_device *pdev)
  2439. {
  2440. return tegra_pinctrl_probe(pdev, &tegra114_pinctrl);
  2441. }
  2442. static struct of_device_id tegra114_pinctrl_of_match[] = {
  2443. { .compatible = "nvidia,tegra114-pinmux", },
  2444. { },
  2445. };
  2446. MODULE_DEVICE_TABLE(of, tegra114_pinctrl_of_match);
  2447. static struct platform_driver tegra114_pinctrl_driver = {
  2448. .driver = {
  2449. .name = "tegra114-pinctrl",
  2450. .owner = THIS_MODULE,
  2451. .of_match_table = tegra114_pinctrl_of_match,
  2452. },
  2453. .probe = tegra114_pinctrl_probe,
  2454. .remove = tegra_pinctrl_remove,
  2455. };
  2456. module_platform_driver(tegra114_pinctrl_driver);
  2457. MODULE_ALIAS("platform:tegra114-pinctrl");
  2458. MODULE_AUTHOR("Pritesh Raithatha <praithatha@nvidia.com>");
  2459. MODULE_DESCRIPTION("NVIDIA Tegra114 pincontrol driver");
  2460. MODULE_LICENSE("GPL v2");