pinctrl-tegra210.c 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589
  1. /*
  2. * Pinctrl data for the NVIDIA Tegra210 pinmux
  3. *
  4. * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. */
  15. #include <linux/module.h>
  16. #include <linux/of.h>
  17. #include <linux/platform_device.h>
  18. #include <linux/pinctrl/pinctrl.h>
  19. #include <linux/pinctrl/pinmux.h>
  20. #include "pinctrl-tegra.h"
  21. /*
  22. * Most pins affected by the pinmux can also be GPIOs. Define these first.
  23. * These must match how the GPIO driver names/numbers its pins.
  24. */
  25. #define _GPIO(offset) (offset)
  26. #define TEGRA_PIN_PEX_L0_RST_N_PA0 _GPIO(0)
  27. #define TEGRA_PIN_PEX_L0_CLKREQ_N_PA1 _GPIO(1)
  28. #define TEGRA_PIN_PEX_WAKE_N_PA2 _GPIO(2)
  29. #define TEGRA_PIN_PEX_L1_RST_N_PA3 _GPIO(3)
  30. #define TEGRA_PIN_PEX_L1_CLKREQ_N_PA4 _GPIO(4)
  31. #define TEGRA_PIN_SATA_LED_ACTIVE_PA5 _GPIO(5)
  32. #define TEGRA_PIN_PA6 _GPIO(6)
  33. #define TEGRA_PIN_DAP1_FS_PB0 _GPIO(8)
  34. #define TEGRA_PIN_DAP1_DIN_PB1 _GPIO(9)
  35. #define TEGRA_PIN_DAP1_DOUT_PB2 _GPIO(10)
  36. #define TEGRA_PIN_DAP1_SCLK_PB3 _GPIO(11)
  37. #define TEGRA_PIN_SPI2_MOSI_PB4 _GPIO(12)
  38. #define TEGRA_PIN_SPI2_MISO_PB5 _GPIO(13)
  39. #define TEGRA_PIN_SPI2_SCK_PB6 _GPIO(14)
  40. #define TEGRA_PIN_SPI2_CS0_PB7 _GPIO(15)
  41. #define TEGRA_PIN_SPI1_MOSI_PC0 _GPIO(16)
  42. #define TEGRA_PIN_SPI1_MISO_PC1 _GPIO(17)
  43. #define TEGRA_PIN_SPI1_SCK_PC2 _GPIO(18)
  44. #define TEGRA_PIN_SPI1_CS0_PC3 _GPIO(19)
  45. #define TEGRA_PIN_SPI1_CS1_PC4 _GPIO(20)
  46. #define TEGRA_PIN_SPI4_SCK_PC5 _GPIO(21)
  47. #define TEGRA_PIN_SPI4_CS0_PC6 _GPIO(22)
  48. #define TEGRA_PIN_SPI4_MOSI_PC7 _GPIO(23)
  49. #define TEGRA_PIN_SPI4_MISO_PD0 _GPIO(24)
  50. #define TEGRA_PIN_UART3_TX_PD1 _GPIO(25)
  51. #define TEGRA_PIN_UART3_RX_PD2 _GPIO(26)
  52. #define TEGRA_PIN_UART3_RTS_PD3 _GPIO(27)
  53. #define TEGRA_PIN_UART3_CTS_PD4 _GPIO(28)
  54. #define TEGRA_PIN_DMIC1_CLK_PE0 _GPIO(32)
  55. #define TEGRA_PIN_DMIC1_DAT_PE1 _GPIO(33)
  56. #define TEGRA_PIN_DMIC2_CLK_PE2 _GPIO(34)
  57. #define TEGRA_PIN_DMIC2_DAT_PE3 _GPIO(35)
  58. #define TEGRA_PIN_DMIC3_CLK_PE4 _GPIO(36)
  59. #define TEGRA_PIN_DMIC3_DAT_PE5 _GPIO(37)
  60. #define TEGRA_PIN_PE6 _GPIO(38)
  61. #define TEGRA_PIN_PE7 _GPIO(39)
  62. #define TEGRA_PIN_GEN3_I2C_SCL_PF0 _GPIO(40)
  63. #define TEGRA_PIN_GEN3_I2C_SDA_PF1 _GPIO(41)
  64. #define TEGRA_PIN_UART2_TX_PG0 _GPIO(48)
  65. #define TEGRA_PIN_UART2_RX_PG1 _GPIO(49)
  66. #define TEGRA_PIN_UART2_RTS_PG2 _GPIO(50)
  67. #define TEGRA_PIN_UART2_CTS_PG3 _GPIO(51)
  68. #define TEGRA_PIN_WIFI_EN_PH0 _GPIO(56)
  69. #define TEGRA_PIN_WIFI_RST_PH1 _GPIO(57)
  70. #define TEGRA_PIN_WIFI_WAKE_AP_PH2 _GPIO(58)
  71. #define TEGRA_PIN_AP_WAKE_BT_PH3 _GPIO(59)
  72. #define TEGRA_PIN_BT_RST_PH4 _GPIO(60)
  73. #define TEGRA_PIN_BT_WAKE_AP_PH5 _GPIO(61)
  74. #define TEGRA_PIN_PH6 _GPIO(62)
  75. #define TEGRA_PIN_AP_WAKE_NFC_PH7 _GPIO(63)
  76. #define TEGRA_PIN_NFC_EN_PI0 _GPIO(64)
  77. #define TEGRA_PIN_NFC_INT_PI1 _GPIO(65)
  78. #define TEGRA_PIN_GPS_EN_PI2 _GPIO(66)
  79. #define TEGRA_PIN_GPS_RST_PI3 _GPIO(67)
  80. #define TEGRA_PIN_UART4_TX_PI4 _GPIO(68)
  81. #define TEGRA_PIN_UART4_RX_PI5 _GPIO(69)
  82. #define TEGRA_PIN_UART4_RTS_PI6 _GPIO(70)
  83. #define TEGRA_PIN_UART4_CTS_PI7 _GPIO(71)
  84. #define TEGRA_PIN_GEN1_I2C_SDA_PJ0 _GPIO(72)
  85. #define TEGRA_PIN_GEN1_I2C_SCL_PJ1 _GPIO(73)
  86. #define TEGRA_PIN_GEN2_I2C_SCL_PJ2 _GPIO(74)
  87. #define TEGRA_PIN_GEN2_I2C_SDA_PJ3 _GPIO(75)
  88. #define TEGRA_PIN_DAP4_FS_PJ4 _GPIO(76)
  89. #define TEGRA_PIN_DAP4_DIN_PJ5 _GPIO(77)
  90. #define TEGRA_PIN_DAP4_DOUT_PJ6 _GPIO(78)
  91. #define TEGRA_PIN_DAP4_SCLK_PJ7 _GPIO(79)
  92. #define TEGRA_PIN_PK0 _GPIO(80)
  93. #define TEGRA_PIN_PK1 _GPIO(81)
  94. #define TEGRA_PIN_PK2 _GPIO(82)
  95. #define TEGRA_PIN_PK3 _GPIO(83)
  96. #define TEGRA_PIN_PK4 _GPIO(84)
  97. #define TEGRA_PIN_PK5 _GPIO(85)
  98. #define TEGRA_PIN_PK6 _GPIO(86)
  99. #define TEGRA_PIN_PK7 _GPIO(87)
  100. #define TEGRA_PIN_PL0 _GPIO(88)
  101. #define TEGRA_PIN_PL1 _GPIO(89)
  102. #define TEGRA_PIN_SDMMC1_CLK_PM0 _GPIO(96)
  103. #define TEGRA_PIN_SDMMC1_CMD_PM1 _GPIO(97)
  104. #define TEGRA_PIN_SDMMC1_DAT3_PM2 _GPIO(98)
  105. #define TEGRA_PIN_SDMMC1_DAT2_PM3 _GPIO(99)
  106. #define TEGRA_PIN_SDMMC1_DAT1_PM4 _GPIO(100)
  107. #define TEGRA_PIN_SDMMC1_DAT0_PM5 _GPIO(101)
  108. #define TEGRA_PIN_SDMMC3_CLK_PP0 _GPIO(120)
  109. #define TEGRA_PIN_SDMMC3_CMD_PP1 _GPIO(121)
  110. #define TEGRA_PIN_SDMMC3_DAT3_PP2 _GPIO(122)
  111. #define TEGRA_PIN_SDMMC3_DAT2_PP3 _GPIO(123)
  112. #define TEGRA_PIN_SDMMC3_DAT1_PP4 _GPIO(124)
  113. #define TEGRA_PIN_SDMMC3_DAT0_PP5 _GPIO(125)
  114. #define TEGRA_PIN_CAM1_MCLK_PS0 _GPIO(144)
  115. #define TEGRA_PIN_CAM2_MCLK_PS1 _GPIO(145)
  116. #define TEGRA_PIN_CAM_I2C_SCL_PS2 _GPIO(146)
  117. #define TEGRA_PIN_CAM_I2C_SDA_PS3 _GPIO(147)
  118. #define TEGRA_PIN_CAM_RST_PS4 _GPIO(148)
  119. #define TEGRA_PIN_CAM_AF_EN_PS5 _GPIO(149)
  120. #define TEGRA_PIN_CAM_FLASH_EN_PS6 _GPIO(150)
  121. #define TEGRA_PIN_CAM1_PWDN_PS7 _GPIO(151)
  122. #define TEGRA_PIN_CAM2_PWDN_PT0 _GPIO(152)
  123. #define TEGRA_PIN_CAM1_STROBE_PT1 _GPIO(153)
  124. #define TEGRA_PIN_UART1_TX_PU0 _GPIO(160)
  125. #define TEGRA_PIN_UART1_RX_PU1 _GPIO(161)
  126. #define TEGRA_PIN_UART1_RTS_PU2 _GPIO(162)
  127. #define TEGRA_PIN_UART1_CTS_PU3 _GPIO(163)
  128. #define TEGRA_PIN_LCD_BL_PWM_PV0 _GPIO(168)
  129. #define TEGRA_PIN_LCD_BL_EN_PV1 _GPIO(169)
  130. #define TEGRA_PIN_LCD_RST_PV2 _GPIO(170)
  131. #define TEGRA_PIN_LCD_GPIO1_PV3 _GPIO(171)
  132. #define TEGRA_PIN_LCD_GPIO2_PV4 _GPIO(172)
  133. #define TEGRA_PIN_AP_READY_PV5 _GPIO(173)
  134. #define TEGRA_PIN_TOUCH_RST_PV6 _GPIO(174)
  135. #define TEGRA_PIN_TOUCH_CLK_PV7 _GPIO(175)
  136. #define TEGRA_PIN_MODEM_WAKE_AP_PX0 _GPIO(184)
  137. #define TEGRA_PIN_TOUCH_INT_PX1 _GPIO(185)
  138. #define TEGRA_PIN_MOTION_INT_PX2 _GPIO(186)
  139. #define TEGRA_PIN_ALS_PROX_INT_PX3 _GPIO(187)
  140. #define TEGRA_PIN_TEMP_ALERT_PX4 _GPIO(188)
  141. #define TEGRA_PIN_BUTTON_POWER_ON_PX5 _GPIO(189)
  142. #define TEGRA_PIN_BUTTON_VOL_UP_PX6 _GPIO(190)
  143. #define TEGRA_PIN_BUTTON_VOL_DOWN_PX7 _GPIO(191)
  144. #define TEGRA_PIN_BUTTON_SLIDE_SW_PY0 _GPIO(192)
  145. #define TEGRA_PIN_BUTTON_HOME_PY1 _GPIO(193)
  146. #define TEGRA_PIN_LCD_TE_PY2 _GPIO(194)
  147. #define TEGRA_PIN_PWR_I2C_SCL_PY3 _GPIO(195)
  148. #define TEGRA_PIN_PWR_I2C_SDA_PY4 _GPIO(196)
  149. #define TEGRA_PIN_CLK_32K_OUT_PY5 _GPIO(197)
  150. #define TEGRA_PIN_PZ0 _GPIO(200)
  151. #define TEGRA_PIN_PZ1 _GPIO(201)
  152. #define TEGRA_PIN_PZ2 _GPIO(202)
  153. #define TEGRA_PIN_PZ3 _GPIO(203)
  154. #define TEGRA_PIN_PZ4 _GPIO(204)
  155. #define TEGRA_PIN_PZ5 _GPIO(205)
  156. #define TEGRA_PIN_DAP2_FS_PAA0 _GPIO(208)
  157. #define TEGRA_PIN_DAP2_SCLK_PAA1 _GPIO(209)
  158. #define TEGRA_PIN_DAP2_DIN_PAA2 _GPIO(210)
  159. #define TEGRA_PIN_DAP2_DOUT_PAA3 _GPIO(211)
  160. #define TEGRA_PIN_AUD_MCLK_PBB0 _GPIO(216)
  161. #define TEGRA_PIN_DVFS_PWM_PBB1 _GPIO(217)
  162. #define TEGRA_PIN_DVFS_CLK_PBB2 _GPIO(218)
  163. #define TEGRA_PIN_GPIO_X1_AUD_PBB3 _GPIO(219)
  164. #define TEGRA_PIN_GPIO_X3_AUD_PBB4 _GPIO(220)
  165. #define TEGRA_PIN_HDMI_CEC_PCC0 _GPIO(224)
  166. #define TEGRA_PIN_HDMI_INT_DP_HPD_PCC1 _GPIO(225)
  167. #define TEGRA_PIN_SPDIF_OUT_PCC2 _GPIO(226)
  168. #define TEGRA_PIN_SPDIF_IN_PCC3 _GPIO(227)
  169. #define TEGRA_PIN_USB_VBUS_EN0_PCC4 _GPIO(228)
  170. #define TEGRA_PIN_USB_VBUS_EN1_PCC5 _GPIO(229)
  171. #define TEGRA_PIN_DP_HPD0_PCC6 _GPIO(230)
  172. #define TEGRA_PIN_PCC7 _GPIO(231)
  173. #define TEGRA_PIN_SPI2_CS1_PDD0 _GPIO(232)
  174. #define TEGRA_PIN_QSPI_SCK_PEE0 _GPIO(240)
  175. #define TEGRA_PIN_QSPI_CS_N_PEE1 _GPIO(241)
  176. #define TEGRA_PIN_QSPI_IO0_PEE2 _GPIO(242)
  177. #define TEGRA_PIN_QSPI_IO1_PEE3 _GPIO(243)
  178. #define TEGRA_PIN_QSPI_IO2_PEE4 _GPIO(244)
  179. #define TEGRA_PIN_QSPI_IO3_PEE5 _GPIO(245)
  180. /* All non-GPIO pins follow */
  181. #define NUM_GPIOS (TEGRA_PIN_QSPI_IO3_PEE5 + 1)
  182. #define _PIN(offset) (NUM_GPIOS + (offset))
  183. /* Non-GPIO pins */
  184. #define TEGRA_PIN_CORE_PWR_REQ _PIN(0)
  185. #define TEGRA_PIN_CPU_PWR_REQ _PIN(1)
  186. #define TEGRA_PIN_PWR_INT_N _PIN(2)
  187. #define TEGRA_PIN_CLK_32K_IN _PIN(3)
  188. #define TEGRA_PIN_JTAG_RTCK _PIN(4)
  189. #define TEGRA_PIN_BATT_BCL _PIN(5)
  190. #define TEGRA_PIN_CLK_REQ _PIN(6)
  191. #define TEGRA_PIN_SHUTDOWN _PIN(7)
  192. static const struct pinctrl_pin_desc tegra210_pins[] = {
  193. PINCTRL_PIN(TEGRA_PIN_PEX_L0_RST_N_PA0, "PEX_L0_RST_N PA0"),
  194. PINCTRL_PIN(TEGRA_PIN_PEX_L0_CLKREQ_N_PA1, "PEX_L0_CLKREQ_N PA1"),
  195. PINCTRL_PIN(TEGRA_PIN_PEX_WAKE_N_PA2, "PEX_WAKE_N PA2"),
  196. PINCTRL_PIN(TEGRA_PIN_PEX_L1_RST_N_PA3, "PEX_L1_RST_N PA3"),
  197. PINCTRL_PIN(TEGRA_PIN_PEX_L1_CLKREQ_N_PA4, "PEX_L1_CLKREQ_N PA4"),
  198. PINCTRL_PIN(TEGRA_PIN_SATA_LED_ACTIVE_PA5, "SATA_LED_ACTIVE PA5"),
  199. PINCTRL_PIN(TEGRA_PIN_PA6, "PA6"),
  200. PINCTRL_PIN(TEGRA_PIN_DAP1_FS_PB0, "DAP1_FS PB0"),
  201. PINCTRL_PIN(TEGRA_PIN_DAP1_DIN_PB1, "DAP1_DIN PB1"),
  202. PINCTRL_PIN(TEGRA_PIN_DAP1_DOUT_PB2, "DAP1_DOUT PB2"),
  203. PINCTRL_PIN(TEGRA_PIN_DAP1_SCLK_PB3, "DAP1_SCLK PB3"),
  204. PINCTRL_PIN(TEGRA_PIN_SPI2_MOSI_PB4, "SPI2_MOSI PB4"),
  205. PINCTRL_PIN(TEGRA_PIN_SPI2_MISO_PB5, "SPI2_MISO PB5"),
  206. PINCTRL_PIN(TEGRA_PIN_SPI2_SCK_PB6, "SPI2_SCK PB6"),
  207. PINCTRL_PIN(TEGRA_PIN_SPI2_CS0_PB7, "SPI2_CS0 PB7"),
  208. PINCTRL_PIN(TEGRA_PIN_SPI1_MOSI_PC0, "SPI1_MOSI PC0"),
  209. PINCTRL_PIN(TEGRA_PIN_SPI1_MISO_PC1, "SPI1_MISO PC1"),
  210. PINCTRL_PIN(TEGRA_PIN_SPI1_SCK_PC2, "SPI1_SCK PC2"),
  211. PINCTRL_PIN(TEGRA_PIN_SPI1_CS0_PC3, "SPI1_CS0 PC3"),
  212. PINCTRL_PIN(TEGRA_PIN_SPI1_CS1_PC4, "SPI1_CS1 PC4"),
  213. PINCTRL_PIN(TEGRA_PIN_SPI4_SCK_PC5, "SPI4_SCK PC5"),
  214. PINCTRL_PIN(TEGRA_PIN_SPI4_CS0_PC6, "SPI4_CS0 PC6"),
  215. PINCTRL_PIN(TEGRA_PIN_SPI4_MOSI_PC7, "SPI4_MOSI PC7"),
  216. PINCTRL_PIN(TEGRA_PIN_SPI4_MISO_PD0, "SPI4_MISO PD0"),
  217. PINCTRL_PIN(TEGRA_PIN_UART3_TX_PD1, "UART3_TX PD1"),
  218. PINCTRL_PIN(TEGRA_PIN_UART3_RX_PD2, "UART3_RX PD2"),
  219. PINCTRL_PIN(TEGRA_PIN_UART3_RTS_PD3, "UART3_RTS PD3"),
  220. PINCTRL_PIN(TEGRA_PIN_UART3_CTS_PD4, "UART3_CTS PD4"),
  221. PINCTRL_PIN(TEGRA_PIN_DMIC1_CLK_PE0, "DMIC1_CLK PE0"),
  222. PINCTRL_PIN(TEGRA_PIN_DMIC1_DAT_PE1, "DMIC1_DAT PE1"),
  223. PINCTRL_PIN(TEGRA_PIN_DMIC2_CLK_PE2, "DMIC2_CLK PE2"),
  224. PINCTRL_PIN(TEGRA_PIN_DMIC2_DAT_PE3, "DMIC2_DAT PE3"),
  225. PINCTRL_PIN(TEGRA_PIN_DMIC3_CLK_PE4, "DMIC3_CLK PE4"),
  226. PINCTRL_PIN(TEGRA_PIN_DMIC3_DAT_PE5, "DMIC3_DAT PE5"),
  227. PINCTRL_PIN(TEGRA_PIN_PE6, "PE6"),
  228. PINCTRL_PIN(TEGRA_PIN_PE7, "PE7"),
  229. PINCTRL_PIN(TEGRA_PIN_GEN3_I2C_SCL_PF0, "GEN3_I2C_SCL PF0"),
  230. PINCTRL_PIN(TEGRA_PIN_GEN3_I2C_SDA_PF1, "GEN3_I2C_SDA PF1"),
  231. PINCTRL_PIN(TEGRA_PIN_UART2_TX_PG0, "UART2_TX PG0"),
  232. PINCTRL_PIN(TEGRA_PIN_UART2_RX_PG1, "UART2_RX PG1"),
  233. PINCTRL_PIN(TEGRA_PIN_UART2_RTS_PG2, "UART2_RTS PG2"),
  234. PINCTRL_PIN(TEGRA_PIN_UART2_CTS_PG3, "UART2_CTS PG3"),
  235. PINCTRL_PIN(TEGRA_PIN_WIFI_EN_PH0, "WIFI_EN PH0"),
  236. PINCTRL_PIN(TEGRA_PIN_WIFI_RST_PH1, "WIFI_RST PH1"),
  237. PINCTRL_PIN(TEGRA_PIN_WIFI_WAKE_AP_PH2, "WIFI_WAKE_AP PH2"),
  238. PINCTRL_PIN(TEGRA_PIN_AP_WAKE_BT_PH3, "AP_WAKE_BT PH3"),
  239. PINCTRL_PIN(TEGRA_PIN_BT_RST_PH4, "BT_RST PH4"),
  240. PINCTRL_PIN(TEGRA_PIN_BT_WAKE_AP_PH5, "BT_WAKE_AP PH5"),
  241. PINCTRL_PIN(TEGRA_PIN_PH6, "PH6"),
  242. PINCTRL_PIN(TEGRA_PIN_AP_WAKE_NFC_PH7, "AP_WAKE_NFC PH7"),
  243. PINCTRL_PIN(TEGRA_PIN_NFC_EN_PI0, "NFC_EN PI0"),
  244. PINCTRL_PIN(TEGRA_PIN_NFC_INT_PI1, "NFC_INT PI1"),
  245. PINCTRL_PIN(TEGRA_PIN_GPS_EN_PI2, "GPS_EN PI2"),
  246. PINCTRL_PIN(TEGRA_PIN_GPS_RST_PI3, "GPS_RST PI3"),
  247. PINCTRL_PIN(TEGRA_PIN_UART4_TX_PI4, "UART4_TX PI4"),
  248. PINCTRL_PIN(TEGRA_PIN_UART4_RX_PI5, "UART4_RX PI5"),
  249. PINCTRL_PIN(TEGRA_PIN_UART4_RTS_PI6, "UART4_RTS PI6"),
  250. PINCTRL_PIN(TEGRA_PIN_UART4_CTS_PI7, "UART4_CTS PI7"),
  251. PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SDA_PJ0, "GEN1_I2C_SDA PJ0"),
  252. PINCTRL_PIN(TEGRA_PIN_GEN1_I2C_SCL_PJ1, "GEN1_I2C_SCL PJ1"),
  253. PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SCL_PJ2, "GEN2_I2C_SCL PJ2"),
  254. PINCTRL_PIN(TEGRA_PIN_GEN2_I2C_SDA_PJ3, "GEN2_I2C_SDA PJ3"),
  255. PINCTRL_PIN(TEGRA_PIN_DAP4_FS_PJ4, "DAP4_FS PJ4"),
  256. PINCTRL_PIN(TEGRA_PIN_DAP4_DIN_PJ5, "DAP4_DIN PJ5"),
  257. PINCTRL_PIN(TEGRA_PIN_DAP4_DOUT_PJ6, "DAP4_DOUT PJ6"),
  258. PINCTRL_PIN(TEGRA_PIN_DAP4_SCLK_PJ7, "DAP4_SCLK PJ7"),
  259. PINCTRL_PIN(TEGRA_PIN_PK0, "PK0"),
  260. PINCTRL_PIN(TEGRA_PIN_PK1, "PK1"),
  261. PINCTRL_PIN(TEGRA_PIN_PK2, "PK2"),
  262. PINCTRL_PIN(TEGRA_PIN_PK3, "PK3"),
  263. PINCTRL_PIN(TEGRA_PIN_PK4, "PK4"),
  264. PINCTRL_PIN(TEGRA_PIN_PK5, "PK5"),
  265. PINCTRL_PIN(TEGRA_PIN_PK6, "PK6"),
  266. PINCTRL_PIN(TEGRA_PIN_PK7, "PK7"),
  267. PINCTRL_PIN(TEGRA_PIN_PL0, "PL0"),
  268. PINCTRL_PIN(TEGRA_PIN_PL1, "PL1"),
  269. PINCTRL_PIN(TEGRA_PIN_SDMMC1_CLK_PM0, "SDMMC1_CLK PM0"),
  270. PINCTRL_PIN(TEGRA_PIN_SDMMC1_CMD_PM1, "SDMMC1_CMD PM1"),
  271. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT3_PM2, "SDMMC1_DAT3 PM2"),
  272. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT2_PM3, "SDMMC1_DAT2 PM3"),
  273. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT1_PM4, "SDMMC1_DAT1 PM4"),
  274. PINCTRL_PIN(TEGRA_PIN_SDMMC1_DAT0_PM5, "SDMMC1_DAT0 PM5"),
  275. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CLK_PP0, "SDMMC3_CLK PP0"),
  276. PINCTRL_PIN(TEGRA_PIN_SDMMC3_CMD_PP1, "SDMMC3_CMD PP1"),
  277. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT3_PP2, "SDMMC3_DAT3 PP2"),
  278. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT2_PP3, "SDMMC3_DAT2 PP3"),
  279. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT1_PP4, "SDMMC3_DAT1 PP4"),
  280. PINCTRL_PIN(TEGRA_PIN_SDMMC3_DAT0_PP5, "SDMMC3_DAT0 PP5"),
  281. PINCTRL_PIN(TEGRA_PIN_CAM1_MCLK_PS0, "CAM1_MCLK PS0"),
  282. PINCTRL_PIN(TEGRA_PIN_CAM2_MCLK_PS1, "CAM2_MCLK PS1"),
  283. PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SCL_PS2, "CAM_I2C_SCL PS2"),
  284. PINCTRL_PIN(TEGRA_PIN_CAM_I2C_SDA_PS3, "CAM_I2C_SDA PS3"),
  285. PINCTRL_PIN(TEGRA_PIN_CAM_RST_PS4, "CAM_RST PS4"),
  286. PINCTRL_PIN(TEGRA_PIN_CAM_AF_EN_PS5, "CAM_AF_EN PS5"),
  287. PINCTRL_PIN(TEGRA_PIN_CAM_FLASH_EN_PS6, "CAM_FLASH_EN PS6"),
  288. PINCTRL_PIN(TEGRA_PIN_CAM1_PWDN_PS7, "CAM1_PWDN PS7"),
  289. PINCTRL_PIN(TEGRA_PIN_CAM2_PWDN_PT0, "CAM2_PWDN PT0"),
  290. PINCTRL_PIN(TEGRA_PIN_CAM1_STROBE_PT1, "CAM1_STROBE PT1"),
  291. PINCTRL_PIN(TEGRA_PIN_UART1_TX_PU0, "UART1_TX PU0"),
  292. PINCTRL_PIN(TEGRA_PIN_UART1_RX_PU1, "UART1_RX PU1"),
  293. PINCTRL_PIN(TEGRA_PIN_UART1_RTS_PU2, "UART1_RTS PU2"),
  294. PINCTRL_PIN(TEGRA_PIN_UART1_CTS_PU3, "UART1_CTS PU3"),
  295. PINCTRL_PIN(TEGRA_PIN_LCD_BL_PWM_PV0, "LCD_BL_PWM PV0"),
  296. PINCTRL_PIN(TEGRA_PIN_LCD_BL_EN_PV1, "LCD_BL_EN PV1"),
  297. PINCTRL_PIN(TEGRA_PIN_LCD_RST_PV2, "LCD_RST PV2"),
  298. PINCTRL_PIN(TEGRA_PIN_LCD_GPIO1_PV3, "LCD_GPIO1 PV3"),
  299. PINCTRL_PIN(TEGRA_PIN_LCD_GPIO2_PV4, "LCD_GPIO2 PV4"),
  300. PINCTRL_PIN(TEGRA_PIN_AP_READY_PV5, "AP_READY PV5"),
  301. PINCTRL_PIN(TEGRA_PIN_TOUCH_RST_PV6, "TOUCH_RST PV6"),
  302. PINCTRL_PIN(TEGRA_PIN_TOUCH_CLK_PV7, "TOUCH_CLK PV7"),
  303. PINCTRL_PIN(TEGRA_PIN_MODEM_WAKE_AP_PX0, "MODEM_WAKE_AP PX0"),
  304. PINCTRL_PIN(TEGRA_PIN_TOUCH_INT_PX1, "TOUCH_INT PX1"),
  305. PINCTRL_PIN(TEGRA_PIN_MOTION_INT_PX2, "MOTION_INT PX2"),
  306. PINCTRL_PIN(TEGRA_PIN_ALS_PROX_INT_PX3, "ALS_PROX_INT PX3"),
  307. PINCTRL_PIN(TEGRA_PIN_TEMP_ALERT_PX4, "TEMP_ALERT PX4"),
  308. PINCTRL_PIN(TEGRA_PIN_BUTTON_POWER_ON_PX5, "BUTTON_POWER_ON PX5"),
  309. PINCTRL_PIN(TEGRA_PIN_BUTTON_VOL_UP_PX6, "BUTTON_VOL_UP PX6"),
  310. PINCTRL_PIN(TEGRA_PIN_BUTTON_VOL_DOWN_PX7, "BUTTON_VOL_DOWN PX7"),
  311. PINCTRL_PIN(TEGRA_PIN_BUTTON_SLIDE_SW_PY0, "BUTTON_SLIDE_SW PY0"),
  312. PINCTRL_PIN(TEGRA_PIN_BUTTON_HOME_PY1, "BUTTON_HOME PY1"),
  313. PINCTRL_PIN(TEGRA_PIN_LCD_TE_PY2, "LCD_TE PY2"),
  314. PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SCL_PY3, "PWR_I2C_SCL PY3"),
  315. PINCTRL_PIN(TEGRA_PIN_PWR_I2C_SDA_PY4, "PWR_I2C_SDA PY4"),
  316. PINCTRL_PIN(TEGRA_PIN_CLK_32K_OUT_PY5, "CLK_32K_OUT PY5"),
  317. PINCTRL_PIN(TEGRA_PIN_PZ0, "PZ0"),
  318. PINCTRL_PIN(TEGRA_PIN_PZ1, "PZ1"),
  319. PINCTRL_PIN(TEGRA_PIN_PZ2, "PZ2"),
  320. PINCTRL_PIN(TEGRA_PIN_PZ3, "PZ3"),
  321. PINCTRL_PIN(TEGRA_PIN_PZ4, "PZ4"),
  322. PINCTRL_PIN(TEGRA_PIN_PZ5, "PZ5"),
  323. PINCTRL_PIN(TEGRA_PIN_DAP2_FS_PAA0, "DAP2_FS PAA0"),
  324. PINCTRL_PIN(TEGRA_PIN_DAP2_SCLK_PAA1, "DAP2_SCLK PAA1"),
  325. PINCTRL_PIN(TEGRA_PIN_DAP2_DIN_PAA2, "DAP2_DIN PAA2"),
  326. PINCTRL_PIN(TEGRA_PIN_DAP2_DOUT_PAA3, "DAP2_DOUT PAA3"),
  327. PINCTRL_PIN(TEGRA_PIN_AUD_MCLK_PBB0, "AUD_MCLK PBB0"),
  328. PINCTRL_PIN(TEGRA_PIN_DVFS_PWM_PBB1, "DVFS_PWM PBB1"),
  329. PINCTRL_PIN(TEGRA_PIN_DVFS_CLK_PBB2, "DVFS_CLK PBB2"),
  330. PINCTRL_PIN(TEGRA_PIN_GPIO_X1_AUD_PBB3, "GPIO_X1_AUD PBB3"),
  331. PINCTRL_PIN(TEGRA_PIN_GPIO_X3_AUD_PBB4, "GPIO_X3_AUD PBB4"),
  332. PINCTRL_PIN(TEGRA_PIN_HDMI_CEC_PCC0, "HDMI_CEC PCC0"),
  333. PINCTRL_PIN(TEGRA_PIN_HDMI_INT_DP_HPD_PCC1, "HDMI_INT_DP_HPD PCC1"),
  334. PINCTRL_PIN(TEGRA_PIN_SPDIF_OUT_PCC2, "SPDIF_OUT PCC2"),
  335. PINCTRL_PIN(TEGRA_PIN_SPDIF_IN_PCC3, "SPDIF_IN PCC3"),
  336. PINCTRL_PIN(TEGRA_PIN_USB_VBUS_EN0_PCC4, "USB_VBUS_EN0 PCC4"),
  337. PINCTRL_PIN(TEGRA_PIN_USB_VBUS_EN1_PCC5, "USB_VBUS_EN1 PCC5"),
  338. PINCTRL_PIN(TEGRA_PIN_DP_HPD0_PCC6, "DP_HPD0 PCC6"),
  339. PINCTRL_PIN(TEGRA_PIN_PCC7, "PCC7"),
  340. PINCTRL_PIN(TEGRA_PIN_SPI2_CS1_PDD0, "SPI2_CS1 PDD0"),
  341. PINCTRL_PIN(TEGRA_PIN_QSPI_SCK_PEE0, "QSPI_SCK PEE0"),
  342. PINCTRL_PIN(TEGRA_PIN_QSPI_CS_N_PEE1, "QSPI_CS_N PEE1"),
  343. PINCTRL_PIN(TEGRA_PIN_QSPI_IO0_PEE2, "QSPI_IO0 PEE2"),
  344. PINCTRL_PIN(TEGRA_PIN_QSPI_IO1_PEE3, "QSPI_IO1 PEE3"),
  345. PINCTRL_PIN(TEGRA_PIN_QSPI_IO2_PEE4, "QSPI_IO2 PEE4"),
  346. PINCTRL_PIN(TEGRA_PIN_QSPI_IO3_PEE5, "QSPI_IO3 PEE5"),
  347. PINCTRL_PIN(TEGRA_PIN_CORE_PWR_REQ, "CORE_PWR_REQ"),
  348. PINCTRL_PIN(TEGRA_PIN_CPU_PWR_REQ, "CPU_PWR_REQ"),
  349. PINCTRL_PIN(TEGRA_PIN_PWR_INT_N, "PWR_INT_N"),
  350. PINCTRL_PIN(TEGRA_PIN_CLK_32K_IN, "CLK_32K_IN"),
  351. PINCTRL_PIN(TEGRA_PIN_JTAG_RTCK, "JTAG_RTCK"),
  352. PINCTRL_PIN(TEGRA_PIN_BATT_BCL, "BATT_BCL"),
  353. PINCTRL_PIN(TEGRA_PIN_CLK_REQ, "CLK_REQ"),
  354. PINCTRL_PIN(TEGRA_PIN_SHUTDOWN, "SHUTDOWN"),
  355. };
  356. static const unsigned pex_l0_rst_n_pa0_pins[] = {
  357. TEGRA_PIN_PEX_L0_RST_N_PA0,
  358. };
  359. static const unsigned pex_l0_clkreq_n_pa1_pins[] = {
  360. TEGRA_PIN_PEX_L0_CLKREQ_N_PA1,
  361. };
  362. static const unsigned pex_wake_n_pa2_pins[] = {
  363. TEGRA_PIN_PEX_WAKE_N_PA2,
  364. };
  365. static const unsigned pex_l1_rst_n_pa3_pins[] = {
  366. TEGRA_PIN_PEX_L1_RST_N_PA3,
  367. };
  368. static const unsigned pex_l1_clkreq_n_pa4_pins[] = {
  369. TEGRA_PIN_PEX_L1_CLKREQ_N_PA4,
  370. };
  371. static const unsigned sata_led_active_pa5_pins[] = {
  372. TEGRA_PIN_SATA_LED_ACTIVE_PA5,
  373. };
  374. static const unsigned pa6_pins[] = {
  375. TEGRA_PIN_PA6,
  376. };
  377. static const unsigned dap1_fs_pb0_pins[] = {
  378. TEGRA_PIN_DAP1_FS_PB0,
  379. };
  380. static const unsigned dap1_din_pb1_pins[] = {
  381. TEGRA_PIN_DAP1_DIN_PB1,
  382. };
  383. static const unsigned dap1_dout_pb2_pins[] = {
  384. TEGRA_PIN_DAP1_DOUT_PB2,
  385. };
  386. static const unsigned dap1_sclk_pb3_pins[] = {
  387. TEGRA_PIN_DAP1_SCLK_PB3,
  388. };
  389. static const unsigned spi2_mosi_pb4_pins[] = {
  390. TEGRA_PIN_SPI2_MOSI_PB4,
  391. };
  392. static const unsigned spi2_miso_pb5_pins[] = {
  393. TEGRA_PIN_SPI2_MISO_PB5,
  394. };
  395. static const unsigned spi2_sck_pb6_pins[] = {
  396. TEGRA_PIN_SPI2_SCK_PB6,
  397. };
  398. static const unsigned spi2_cs0_pb7_pins[] = {
  399. TEGRA_PIN_SPI2_CS0_PB7,
  400. };
  401. static const unsigned spi1_mosi_pc0_pins[] = {
  402. TEGRA_PIN_SPI1_MOSI_PC0,
  403. };
  404. static const unsigned spi1_miso_pc1_pins[] = {
  405. TEGRA_PIN_SPI1_MISO_PC1,
  406. };
  407. static const unsigned spi1_sck_pc2_pins[] = {
  408. TEGRA_PIN_SPI1_SCK_PC2,
  409. };
  410. static const unsigned spi1_cs0_pc3_pins[] = {
  411. TEGRA_PIN_SPI1_CS0_PC3,
  412. };
  413. static const unsigned spi1_cs1_pc4_pins[] = {
  414. TEGRA_PIN_SPI1_CS1_PC4,
  415. };
  416. static const unsigned spi4_sck_pc5_pins[] = {
  417. TEGRA_PIN_SPI4_SCK_PC5,
  418. };
  419. static const unsigned spi4_cs0_pc6_pins[] = {
  420. TEGRA_PIN_SPI4_CS0_PC6,
  421. };
  422. static const unsigned spi4_mosi_pc7_pins[] = {
  423. TEGRA_PIN_SPI4_MOSI_PC7,
  424. };
  425. static const unsigned spi4_miso_pd0_pins[] = {
  426. TEGRA_PIN_SPI4_MISO_PD0,
  427. };
  428. static const unsigned uart3_tx_pd1_pins[] = {
  429. TEGRA_PIN_UART3_TX_PD1,
  430. };
  431. static const unsigned uart3_rx_pd2_pins[] = {
  432. TEGRA_PIN_UART3_RX_PD2,
  433. };
  434. static const unsigned uart3_rts_pd3_pins[] = {
  435. TEGRA_PIN_UART3_RTS_PD3,
  436. };
  437. static const unsigned uart3_cts_pd4_pins[] = {
  438. TEGRA_PIN_UART3_CTS_PD4,
  439. };
  440. static const unsigned dmic1_clk_pe0_pins[] = {
  441. TEGRA_PIN_DMIC1_CLK_PE0,
  442. };
  443. static const unsigned dmic1_dat_pe1_pins[] = {
  444. TEGRA_PIN_DMIC1_DAT_PE1,
  445. };
  446. static const unsigned dmic2_clk_pe2_pins[] = {
  447. TEGRA_PIN_DMIC2_CLK_PE2,
  448. };
  449. static const unsigned dmic2_dat_pe3_pins[] = {
  450. TEGRA_PIN_DMIC2_DAT_PE3,
  451. };
  452. static const unsigned dmic3_clk_pe4_pins[] = {
  453. TEGRA_PIN_DMIC3_CLK_PE4,
  454. };
  455. static const unsigned dmic3_dat_pe5_pins[] = {
  456. TEGRA_PIN_DMIC3_DAT_PE5,
  457. };
  458. static const unsigned pe6_pins[] = {
  459. TEGRA_PIN_PE6,
  460. };
  461. static const unsigned pe7_pins[] = {
  462. TEGRA_PIN_PE7,
  463. };
  464. static const unsigned gen3_i2c_scl_pf0_pins[] = {
  465. TEGRA_PIN_GEN3_I2C_SCL_PF0,
  466. };
  467. static const unsigned gen3_i2c_sda_pf1_pins[] = {
  468. TEGRA_PIN_GEN3_I2C_SDA_PF1,
  469. };
  470. static const unsigned uart2_tx_pg0_pins[] = {
  471. TEGRA_PIN_UART2_TX_PG0,
  472. };
  473. static const unsigned uart2_rx_pg1_pins[] = {
  474. TEGRA_PIN_UART2_RX_PG1,
  475. };
  476. static const unsigned uart2_rts_pg2_pins[] = {
  477. TEGRA_PIN_UART2_RTS_PG2,
  478. };
  479. static const unsigned uart2_cts_pg3_pins[] = {
  480. TEGRA_PIN_UART2_CTS_PG3,
  481. };
  482. static const unsigned wifi_en_ph0_pins[] = {
  483. TEGRA_PIN_WIFI_EN_PH0,
  484. };
  485. static const unsigned wifi_rst_ph1_pins[] = {
  486. TEGRA_PIN_WIFI_RST_PH1,
  487. };
  488. static const unsigned wifi_wake_ap_ph2_pins[] = {
  489. TEGRA_PIN_WIFI_WAKE_AP_PH2,
  490. };
  491. static const unsigned ap_wake_bt_ph3_pins[] = {
  492. TEGRA_PIN_AP_WAKE_BT_PH3,
  493. };
  494. static const unsigned bt_rst_ph4_pins[] = {
  495. TEGRA_PIN_BT_RST_PH4,
  496. };
  497. static const unsigned bt_wake_ap_ph5_pins[] = {
  498. TEGRA_PIN_BT_WAKE_AP_PH5,
  499. };
  500. static const unsigned ph6_pins[] = {
  501. TEGRA_PIN_PH6,
  502. };
  503. static const unsigned ap_wake_nfc_ph7_pins[] = {
  504. TEGRA_PIN_AP_WAKE_NFC_PH7,
  505. };
  506. static const unsigned nfc_en_pi0_pins[] = {
  507. TEGRA_PIN_NFC_EN_PI0,
  508. };
  509. static const unsigned nfc_int_pi1_pins[] = {
  510. TEGRA_PIN_NFC_INT_PI1,
  511. };
  512. static const unsigned gps_en_pi2_pins[] = {
  513. TEGRA_PIN_GPS_EN_PI2,
  514. };
  515. static const unsigned gps_rst_pi3_pins[] = {
  516. TEGRA_PIN_GPS_RST_PI3,
  517. };
  518. static const unsigned uart4_tx_pi4_pins[] = {
  519. TEGRA_PIN_UART4_TX_PI4,
  520. };
  521. static const unsigned uart4_rx_pi5_pins[] = {
  522. TEGRA_PIN_UART4_RX_PI5,
  523. };
  524. static const unsigned uart4_rts_pi6_pins[] = {
  525. TEGRA_PIN_UART4_RTS_PI6,
  526. };
  527. static const unsigned uart4_cts_pi7_pins[] = {
  528. TEGRA_PIN_UART4_CTS_PI7,
  529. };
  530. static const unsigned gen1_i2c_sda_pj0_pins[] = {
  531. TEGRA_PIN_GEN1_I2C_SDA_PJ0,
  532. };
  533. static const unsigned gen1_i2c_scl_pj1_pins[] = {
  534. TEGRA_PIN_GEN1_I2C_SCL_PJ1,
  535. };
  536. static const unsigned gen2_i2c_scl_pj2_pins[] = {
  537. TEGRA_PIN_GEN2_I2C_SCL_PJ2,
  538. };
  539. static const unsigned gen2_i2c_sda_pj3_pins[] = {
  540. TEGRA_PIN_GEN2_I2C_SDA_PJ3,
  541. };
  542. static const unsigned dap4_fs_pj4_pins[] = {
  543. TEGRA_PIN_DAP4_FS_PJ4,
  544. };
  545. static const unsigned dap4_din_pj5_pins[] = {
  546. TEGRA_PIN_DAP4_DIN_PJ5,
  547. };
  548. static const unsigned dap4_dout_pj6_pins[] = {
  549. TEGRA_PIN_DAP4_DOUT_PJ6,
  550. };
  551. static const unsigned dap4_sclk_pj7_pins[] = {
  552. TEGRA_PIN_DAP4_SCLK_PJ7,
  553. };
  554. static const unsigned pk0_pins[] = {
  555. TEGRA_PIN_PK0,
  556. };
  557. static const unsigned pk1_pins[] = {
  558. TEGRA_PIN_PK1,
  559. };
  560. static const unsigned pk2_pins[] = {
  561. TEGRA_PIN_PK2,
  562. };
  563. static const unsigned pk3_pins[] = {
  564. TEGRA_PIN_PK3,
  565. };
  566. static const unsigned pk4_pins[] = {
  567. TEGRA_PIN_PK4,
  568. };
  569. static const unsigned pk5_pins[] = {
  570. TEGRA_PIN_PK5,
  571. };
  572. static const unsigned pk6_pins[] = {
  573. TEGRA_PIN_PK6,
  574. };
  575. static const unsigned pk7_pins[] = {
  576. TEGRA_PIN_PK7,
  577. };
  578. static const unsigned pl0_pins[] = {
  579. TEGRA_PIN_PL0,
  580. };
  581. static const unsigned pl1_pins[] = {
  582. TEGRA_PIN_PL1,
  583. };
  584. static const unsigned sdmmc1_clk_pm0_pins[] = {
  585. TEGRA_PIN_SDMMC1_CLK_PM0,
  586. };
  587. static const unsigned sdmmc1_cmd_pm1_pins[] = {
  588. TEGRA_PIN_SDMMC1_CMD_PM1,
  589. };
  590. static const unsigned sdmmc1_dat3_pm2_pins[] = {
  591. TEGRA_PIN_SDMMC1_DAT3_PM2,
  592. };
  593. static const unsigned sdmmc1_dat2_pm3_pins[] = {
  594. TEGRA_PIN_SDMMC1_DAT2_PM3,
  595. };
  596. static const unsigned sdmmc1_dat1_pm4_pins[] = {
  597. TEGRA_PIN_SDMMC1_DAT1_PM4,
  598. };
  599. static const unsigned sdmmc1_dat0_pm5_pins[] = {
  600. TEGRA_PIN_SDMMC1_DAT0_PM5,
  601. };
  602. static const unsigned sdmmc3_clk_pp0_pins[] = {
  603. TEGRA_PIN_SDMMC3_CLK_PP0,
  604. };
  605. static const unsigned sdmmc3_cmd_pp1_pins[] = {
  606. TEGRA_PIN_SDMMC3_CMD_PP1,
  607. };
  608. static const unsigned sdmmc3_dat3_pp2_pins[] = {
  609. TEGRA_PIN_SDMMC3_DAT3_PP2,
  610. };
  611. static const unsigned sdmmc3_dat2_pp3_pins[] = {
  612. TEGRA_PIN_SDMMC3_DAT2_PP3,
  613. };
  614. static const unsigned sdmmc3_dat1_pp4_pins[] = {
  615. TEGRA_PIN_SDMMC3_DAT1_PP4,
  616. };
  617. static const unsigned sdmmc3_dat0_pp5_pins[] = {
  618. TEGRA_PIN_SDMMC3_DAT0_PP5,
  619. };
  620. static const unsigned cam1_mclk_ps0_pins[] = {
  621. TEGRA_PIN_CAM1_MCLK_PS0,
  622. };
  623. static const unsigned cam2_mclk_ps1_pins[] = {
  624. TEGRA_PIN_CAM2_MCLK_PS1,
  625. };
  626. static const unsigned cam_i2c_scl_ps2_pins[] = {
  627. TEGRA_PIN_CAM_I2C_SCL_PS2,
  628. };
  629. static const unsigned cam_i2c_sda_ps3_pins[] = {
  630. TEGRA_PIN_CAM_I2C_SDA_PS3,
  631. };
  632. static const unsigned cam_rst_ps4_pins[] = {
  633. TEGRA_PIN_CAM_RST_PS4,
  634. };
  635. static const unsigned cam_af_en_ps5_pins[] = {
  636. TEGRA_PIN_CAM_AF_EN_PS5,
  637. };
  638. static const unsigned cam_flash_en_ps6_pins[] = {
  639. TEGRA_PIN_CAM_FLASH_EN_PS6,
  640. };
  641. static const unsigned cam1_pwdn_ps7_pins[] = {
  642. TEGRA_PIN_CAM1_PWDN_PS7,
  643. };
  644. static const unsigned cam2_pwdn_pt0_pins[] = {
  645. TEGRA_PIN_CAM2_PWDN_PT0,
  646. };
  647. static const unsigned cam1_strobe_pt1_pins[] = {
  648. TEGRA_PIN_CAM1_STROBE_PT1,
  649. };
  650. static const unsigned uart1_tx_pu0_pins[] = {
  651. TEGRA_PIN_UART1_TX_PU0,
  652. };
  653. static const unsigned uart1_rx_pu1_pins[] = {
  654. TEGRA_PIN_UART1_RX_PU1,
  655. };
  656. static const unsigned uart1_rts_pu2_pins[] = {
  657. TEGRA_PIN_UART1_RTS_PU2,
  658. };
  659. static const unsigned uart1_cts_pu3_pins[] = {
  660. TEGRA_PIN_UART1_CTS_PU3,
  661. };
  662. static const unsigned lcd_bl_pwm_pv0_pins[] = {
  663. TEGRA_PIN_LCD_BL_PWM_PV0,
  664. };
  665. static const unsigned lcd_bl_en_pv1_pins[] = {
  666. TEGRA_PIN_LCD_BL_EN_PV1,
  667. };
  668. static const unsigned lcd_rst_pv2_pins[] = {
  669. TEGRA_PIN_LCD_RST_PV2,
  670. };
  671. static const unsigned lcd_gpio1_pv3_pins[] = {
  672. TEGRA_PIN_LCD_GPIO1_PV3,
  673. };
  674. static const unsigned lcd_gpio2_pv4_pins[] = {
  675. TEGRA_PIN_LCD_GPIO2_PV4,
  676. };
  677. static const unsigned ap_ready_pv5_pins[] = {
  678. TEGRA_PIN_AP_READY_PV5,
  679. };
  680. static const unsigned touch_rst_pv6_pins[] = {
  681. TEGRA_PIN_TOUCH_RST_PV6,
  682. };
  683. static const unsigned touch_clk_pv7_pins[] = {
  684. TEGRA_PIN_TOUCH_CLK_PV7,
  685. };
  686. static const unsigned modem_wake_ap_px0_pins[] = {
  687. TEGRA_PIN_MODEM_WAKE_AP_PX0,
  688. };
  689. static const unsigned touch_int_px1_pins[] = {
  690. TEGRA_PIN_TOUCH_INT_PX1,
  691. };
  692. static const unsigned motion_int_px2_pins[] = {
  693. TEGRA_PIN_MOTION_INT_PX2,
  694. };
  695. static const unsigned als_prox_int_px3_pins[] = {
  696. TEGRA_PIN_ALS_PROX_INT_PX3,
  697. };
  698. static const unsigned temp_alert_px4_pins[] = {
  699. TEGRA_PIN_TEMP_ALERT_PX4,
  700. };
  701. static const unsigned button_power_on_px5_pins[] = {
  702. TEGRA_PIN_BUTTON_POWER_ON_PX5,
  703. };
  704. static const unsigned button_vol_up_px6_pins[] = {
  705. TEGRA_PIN_BUTTON_VOL_UP_PX6,
  706. };
  707. static const unsigned button_vol_down_px7_pins[] = {
  708. TEGRA_PIN_BUTTON_VOL_DOWN_PX7,
  709. };
  710. static const unsigned button_slide_sw_py0_pins[] = {
  711. TEGRA_PIN_BUTTON_SLIDE_SW_PY0,
  712. };
  713. static const unsigned button_home_py1_pins[] = {
  714. TEGRA_PIN_BUTTON_HOME_PY1,
  715. };
  716. static const unsigned lcd_te_py2_pins[] = {
  717. TEGRA_PIN_LCD_TE_PY2,
  718. };
  719. static const unsigned pwr_i2c_scl_py3_pins[] = {
  720. TEGRA_PIN_PWR_I2C_SCL_PY3,
  721. };
  722. static const unsigned pwr_i2c_sda_py4_pins[] = {
  723. TEGRA_PIN_PWR_I2C_SDA_PY4,
  724. };
  725. static const unsigned clk_32k_out_py5_pins[] = {
  726. TEGRA_PIN_CLK_32K_OUT_PY5,
  727. };
  728. static const unsigned pz0_pins[] = {
  729. TEGRA_PIN_PZ0,
  730. };
  731. static const unsigned pz1_pins[] = {
  732. TEGRA_PIN_PZ1,
  733. };
  734. static const unsigned pz2_pins[] = {
  735. TEGRA_PIN_PZ2,
  736. };
  737. static const unsigned pz3_pins[] = {
  738. TEGRA_PIN_PZ3,
  739. };
  740. static const unsigned pz4_pins[] = {
  741. TEGRA_PIN_PZ4,
  742. };
  743. static const unsigned pz5_pins[] = {
  744. TEGRA_PIN_PZ5,
  745. };
  746. static const unsigned dap2_fs_paa0_pins[] = {
  747. TEGRA_PIN_DAP2_FS_PAA0,
  748. };
  749. static const unsigned dap2_sclk_paa1_pins[] = {
  750. TEGRA_PIN_DAP2_SCLK_PAA1,
  751. };
  752. static const unsigned dap2_din_paa2_pins[] = {
  753. TEGRA_PIN_DAP2_DIN_PAA2,
  754. };
  755. static const unsigned dap2_dout_paa3_pins[] = {
  756. TEGRA_PIN_DAP2_DOUT_PAA3,
  757. };
  758. static const unsigned aud_mclk_pbb0_pins[] = {
  759. TEGRA_PIN_AUD_MCLK_PBB0,
  760. };
  761. static const unsigned dvfs_pwm_pbb1_pins[] = {
  762. TEGRA_PIN_DVFS_PWM_PBB1,
  763. };
  764. static const unsigned dvfs_clk_pbb2_pins[] = {
  765. TEGRA_PIN_DVFS_CLK_PBB2,
  766. };
  767. static const unsigned gpio_x1_aud_pbb3_pins[] = {
  768. TEGRA_PIN_GPIO_X1_AUD_PBB3,
  769. };
  770. static const unsigned gpio_x3_aud_pbb4_pins[] = {
  771. TEGRA_PIN_GPIO_X3_AUD_PBB4,
  772. };
  773. static const unsigned hdmi_cec_pcc0_pins[] = {
  774. TEGRA_PIN_HDMI_CEC_PCC0,
  775. };
  776. static const unsigned hdmi_int_dp_hpd_pcc1_pins[] = {
  777. TEGRA_PIN_HDMI_INT_DP_HPD_PCC1,
  778. };
  779. static const unsigned spdif_out_pcc2_pins[] = {
  780. TEGRA_PIN_SPDIF_OUT_PCC2,
  781. };
  782. static const unsigned spdif_in_pcc3_pins[] = {
  783. TEGRA_PIN_SPDIF_IN_PCC3,
  784. };
  785. static const unsigned usb_vbus_en0_pcc4_pins[] = {
  786. TEGRA_PIN_USB_VBUS_EN0_PCC4,
  787. };
  788. static const unsigned usb_vbus_en1_pcc5_pins[] = {
  789. TEGRA_PIN_USB_VBUS_EN1_PCC5,
  790. };
  791. static const unsigned dp_hpd0_pcc6_pins[] = {
  792. TEGRA_PIN_DP_HPD0_PCC6,
  793. };
  794. static const unsigned pcc7_pins[] = {
  795. TEGRA_PIN_PCC7,
  796. };
  797. static const unsigned spi2_cs1_pdd0_pins[] = {
  798. TEGRA_PIN_SPI2_CS1_PDD0,
  799. };
  800. static const unsigned qspi_sck_pee0_pins[] = {
  801. TEGRA_PIN_QSPI_SCK_PEE0,
  802. };
  803. static const unsigned qspi_cs_n_pee1_pins[] = {
  804. TEGRA_PIN_QSPI_CS_N_PEE1,
  805. };
  806. static const unsigned qspi_io0_pee2_pins[] = {
  807. TEGRA_PIN_QSPI_IO0_PEE2,
  808. };
  809. static const unsigned qspi_io1_pee3_pins[] = {
  810. TEGRA_PIN_QSPI_IO1_PEE3,
  811. };
  812. static const unsigned qspi_io2_pee4_pins[] = {
  813. TEGRA_PIN_QSPI_IO2_PEE4,
  814. };
  815. static const unsigned qspi_io3_pee5_pins[] = {
  816. TEGRA_PIN_QSPI_IO3_PEE5,
  817. };
  818. static const unsigned core_pwr_req_pins[] = {
  819. TEGRA_PIN_CORE_PWR_REQ,
  820. };
  821. static const unsigned cpu_pwr_req_pins[] = {
  822. TEGRA_PIN_CPU_PWR_REQ,
  823. };
  824. static const unsigned pwr_int_n_pins[] = {
  825. TEGRA_PIN_PWR_INT_N,
  826. };
  827. static const unsigned clk_32k_in_pins[] = {
  828. TEGRA_PIN_CLK_32K_IN,
  829. };
  830. static const unsigned jtag_rtck_pins[] = {
  831. TEGRA_PIN_JTAG_RTCK,
  832. };
  833. static const unsigned batt_bcl_pins[] = {
  834. TEGRA_PIN_BATT_BCL,
  835. };
  836. static const unsigned clk_req_pins[] = {
  837. TEGRA_PIN_CLK_REQ,
  838. };
  839. static const unsigned shutdown_pins[] = {
  840. TEGRA_PIN_SHUTDOWN,
  841. };
  842. static const unsigned drive_pa6_pins[] = {
  843. TEGRA_PIN_PA6,
  844. };
  845. static const unsigned drive_pcc7_pins[] = {
  846. TEGRA_PIN_PCC7,
  847. };
  848. static const unsigned drive_pe6_pins[] = {
  849. TEGRA_PIN_PE6,
  850. };
  851. static const unsigned drive_pe7_pins[] = {
  852. TEGRA_PIN_PE7,
  853. };
  854. static const unsigned drive_ph6_pins[] = {
  855. TEGRA_PIN_PH6,
  856. };
  857. static const unsigned drive_pk0_pins[] = {
  858. TEGRA_PIN_PK0,
  859. };
  860. static const unsigned drive_pk1_pins[] = {
  861. TEGRA_PIN_PK1,
  862. };
  863. static const unsigned drive_pk2_pins[] = {
  864. TEGRA_PIN_PK2,
  865. };
  866. static const unsigned drive_pk3_pins[] = {
  867. TEGRA_PIN_PK3,
  868. };
  869. static const unsigned drive_pk4_pins[] = {
  870. TEGRA_PIN_PK4,
  871. };
  872. static const unsigned drive_pk5_pins[] = {
  873. TEGRA_PIN_PK5,
  874. };
  875. static const unsigned drive_pk6_pins[] = {
  876. TEGRA_PIN_PK6,
  877. };
  878. static const unsigned drive_pk7_pins[] = {
  879. TEGRA_PIN_PK7,
  880. };
  881. static const unsigned drive_pl0_pins[] = {
  882. TEGRA_PIN_PL0,
  883. };
  884. static const unsigned drive_pl1_pins[] = {
  885. TEGRA_PIN_PL1,
  886. };
  887. static const unsigned drive_pz0_pins[] = {
  888. TEGRA_PIN_PZ0,
  889. };
  890. static const unsigned drive_pz1_pins[] = {
  891. TEGRA_PIN_PZ1,
  892. };
  893. static const unsigned drive_pz2_pins[] = {
  894. TEGRA_PIN_PZ2,
  895. };
  896. static const unsigned drive_pz3_pins[] = {
  897. TEGRA_PIN_PZ3,
  898. };
  899. static const unsigned drive_pz4_pins[] = {
  900. TEGRA_PIN_PZ4,
  901. };
  902. static const unsigned drive_pz5_pins[] = {
  903. TEGRA_PIN_PZ5,
  904. };
  905. static const unsigned drive_sdmmc1_pins[] = {
  906. TEGRA_PIN_SDMMC1_CLK_PM0,
  907. TEGRA_PIN_SDMMC1_CMD_PM1,
  908. TEGRA_PIN_SDMMC1_DAT3_PM2,
  909. TEGRA_PIN_SDMMC1_DAT2_PM3,
  910. TEGRA_PIN_SDMMC1_DAT1_PM4,
  911. TEGRA_PIN_SDMMC1_DAT0_PM5,
  912. };
  913. static const unsigned drive_sdmmc2_pins[] = {
  914. };
  915. static const unsigned drive_sdmmc3_pins[] = {
  916. TEGRA_PIN_SDMMC3_CLK_PP0,
  917. TEGRA_PIN_SDMMC3_CMD_PP1,
  918. TEGRA_PIN_SDMMC3_DAT3_PP2,
  919. TEGRA_PIN_SDMMC3_DAT2_PP3,
  920. TEGRA_PIN_SDMMC3_DAT1_PP4,
  921. TEGRA_PIN_SDMMC3_DAT0_PP5,
  922. };
  923. static const unsigned drive_sdmmc4_pins[] = {
  924. };
  925. enum tegra_mux {
  926. TEGRA_MUX_AUD,
  927. TEGRA_MUX_BCL,
  928. TEGRA_MUX_BLINK,
  929. TEGRA_MUX_CCLA,
  930. TEGRA_MUX_CEC,
  931. TEGRA_MUX_CLDVFS,
  932. TEGRA_MUX_CLK,
  933. TEGRA_MUX_CORE,
  934. TEGRA_MUX_CPU,
  935. TEGRA_MUX_DISPLAYA,
  936. TEGRA_MUX_DISPLAYB,
  937. TEGRA_MUX_DMIC1,
  938. TEGRA_MUX_DMIC2,
  939. TEGRA_MUX_DMIC3,
  940. TEGRA_MUX_DP,
  941. TEGRA_MUX_DTV,
  942. TEGRA_MUX_EXTPERIPH3,
  943. TEGRA_MUX_I2C1,
  944. TEGRA_MUX_I2C2,
  945. TEGRA_MUX_I2C3,
  946. TEGRA_MUX_I2CPMU,
  947. TEGRA_MUX_I2CVI,
  948. TEGRA_MUX_I2S1,
  949. TEGRA_MUX_I2S2,
  950. TEGRA_MUX_I2S3,
  951. TEGRA_MUX_I2S4A,
  952. TEGRA_MUX_I2S4B,
  953. TEGRA_MUX_I2S5A,
  954. TEGRA_MUX_I2S5B,
  955. TEGRA_MUX_IQC0,
  956. TEGRA_MUX_IQC1,
  957. TEGRA_MUX_JTAG,
  958. TEGRA_MUX_PE,
  959. TEGRA_MUX_PE0,
  960. TEGRA_MUX_PE1,
  961. TEGRA_MUX_PMI,
  962. TEGRA_MUX_PWM0,
  963. TEGRA_MUX_PWM1,
  964. TEGRA_MUX_PWM2,
  965. TEGRA_MUX_PWM3,
  966. TEGRA_MUX_QSPI,
  967. TEGRA_MUX_RSVD0,
  968. TEGRA_MUX_RSVD1,
  969. TEGRA_MUX_RSVD2,
  970. TEGRA_MUX_RSVD3,
  971. TEGRA_MUX_SATA,
  972. TEGRA_MUX_SDMMC1,
  973. TEGRA_MUX_SDMMC3,
  974. TEGRA_MUX_SHUTDOWN,
  975. TEGRA_MUX_SOC,
  976. TEGRA_MUX_SOR0,
  977. TEGRA_MUX_SOR1,
  978. TEGRA_MUX_SPDIF,
  979. TEGRA_MUX_SPI1,
  980. TEGRA_MUX_SPI2,
  981. TEGRA_MUX_SPI3,
  982. TEGRA_MUX_SPI4,
  983. TEGRA_MUX_SYS,
  984. TEGRA_MUX_TOUCH,
  985. TEGRA_MUX_UART,
  986. TEGRA_MUX_UARTA,
  987. TEGRA_MUX_UARTB,
  988. TEGRA_MUX_UARTC,
  989. TEGRA_MUX_UARTD,
  990. TEGRA_MUX_USB,
  991. TEGRA_MUX_VGP1,
  992. TEGRA_MUX_VGP2,
  993. TEGRA_MUX_VGP3,
  994. TEGRA_MUX_VGP4,
  995. TEGRA_MUX_VGP5,
  996. TEGRA_MUX_VGP6,
  997. TEGRA_MUX_VIMCLK,
  998. TEGRA_MUX_VIMCLK2,
  999. };
  1000. #define FUNCTION(fname) \
  1001. { \
  1002. .name = #fname, \
  1003. }
  1004. static struct tegra_function tegra210_functions[] = {
  1005. FUNCTION(aud),
  1006. FUNCTION(bcl),
  1007. FUNCTION(blink),
  1008. FUNCTION(ccla),
  1009. FUNCTION(cec),
  1010. FUNCTION(cldvfs),
  1011. FUNCTION(clk),
  1012. FUNCTION(core),
  1013. FUNCTION(cpu),
  1014. FUNCTION(displaya),
  1015. FUNCTION(displayb),
  1016. FUNCTION(dmic1),
  1017. FUNCTION(dmic2),
  1018. FUNCTION(dmic3),
  1019. FUNCTION(dp),
  1020. FUNCTION(dtv),
  1021. FUNCTION(extperiph3),
  1022. FUNCTION(i2c1),
  1023. FUNCTION(i2c2),
  1024. FUNCTION(i2c3),
  1025. FUNCTION(i2cpmu),
  1026. FUNCTION(i2cvi),
  1027. FUNCTION(i2s1),
  1028. FUNCTION(i2s2),
  1029. FUNCTION(i2s3),
  1030. FUNCTION(i2s4a),
  1031. FUNCTION(i2s4b),
  1032. FUNCTION(i2s5a),
  1033. FUNCTION(i2s5b),
  1034. FUNCTION(iqc0),
  1035. FUNCTION(iqc1),
  1036. FUNCTION(jtag),
  1037. FUNCTION(pe),
  1038. FUNCTION(pe0),
  1039. FUNCTION(pe1),
  1040. FUNCTION(pmi),
  1041. FUNCTION(pwm0),
  1042. FUNCTION(pwm1),
  1043. FUNCTION(pwm2),
  1044. FUNCTION(pwm3),
  1045. FUNCTION(qspi),
  1046. FUNCTION(rsvd0),
  1047. FUNCTION(rsvd1),
  1048. FUNCTION(rsvd2),
  1049. FUNCTION(rsvd3),
  1050. FUNCTION(sata),
  1051. FUNCTION(sdmmc1),
  1052. FUNCTION(sdmmc3),
  1053. FUNCTION(shutdown),
  1054. FUNCTION(soc),
  1055. FUNCTION(sor0),
  1056. FUNCTION(sor1),
  1057. FUNCTION(spdif),
  1058. FUNCTION(spi1),
  1059. FUNCTION(spi2),
  1060. FUNCTION(spi3),
  1061. FUNCTION(spi4),
  1062. FUNCTION(sys),
  1063. FUNCTION(touch),
  1064. FUNCTION(uart),
  1065. FUNCTION(uarta),
  1066. FUNCTION(uartb),
  1067. FUNCTION(uartc),
  1068. FUNCTION(uartd),
  1069. FUNCTION(usb),
  1070. FUNCTION(vgp1),
  1071. FUNCTION(vgp2),
  1072. FUNCTION(vgp3),
  1073. FUNCTION(vgp4),
  1074. FUNCTION(vgp5),
  1075. FUNCTION(vgp6),
  1076. FUNCTION(vimclk),
  1077. FUNCTION(vimclk2),
  1078. };
  1079. #define DRV_PINGROUP_REG_A 0x8d4 /* bank 0 */
  1080. #define PINGROUP_REG_A 0x3000 /* bank 1 */
  1081. #define DRV_PINGROUP_REG(r) ((r) - DRV_PINGROUP_REG_A)
  1082. #define PINGROUP_REG(r) ((r) - PINGROUP_REG_A)
  1083. #define PINGROUP_BIT_Y(b) (b)
  1084. #define PINGROUP_BIT_N(b) (-1)
  1085. #define PINGROUP(pg_name, f0, f1, f2, f3, r, hsm, drvtype, e_io_hv, \
  1086. rdrv, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, \
  1087. slwr_w, slwf_b, slwf_w) \
  1088. { \
  1089. .name = #pg_name, \
  1090. .pins = pg_name##_pins, \
  1091. .npins = ARRAY_SIZE(pg_name##_pins), \
  1092. .funcs = { \
  1093. TEGRA_MUX_##f0, \
  1094. TEGRA_MUX_##f1, \
  1095. TEGRA_MUX_##f2, \
  1096. TEGRA_MUX_##f3, \
  1097. }, \
  1098. .mux_reg = PINGROUP_REG(r), \
  1099. .mux_bank = 1, \
  1100. .mux_bit = 0, \
  1101. .pupd_reg = PINGROUP_REG(r), \
  1102. .pupd_bank = 1, \
  1103. .pupd_bit = 2, \
  1104. .tri_reg = PINGROUP_REG(r), \
  1105. .tri_bank = 1, \
  1106. .tri_bit = 4, \
  1107. .einput_bit = 6, \
  1108. .odrain_bit = 11, \
  1109. .lock_bit = 7, \
  1110. .ioreset_bit = -1, \
  1111. .rcv_sel_bit = PINGROUP_BIT_##e_io_hv(10), \
  1112. .parked_bit = 5, \
  1113. .hsm_bit = PINGROUP_BIT_##hsm(9), \
  1114. .schmitt_bit = 12, \
  1115. .drvtype_bit = PINGROUP_BIT_##drvtype(13), \
  1116. .drv_reg = DRV_PINGROUP_REG(rdrv), \
  1117. .drv_bank = 0, \
  1118. .lpmd_bit = -1, \
  1119. .drvdn_bit = drvdn_b, \
  1120. .drvdn_width = drvdn_w, \
  1121. .drvup_bit = drvup_b, \
  1122. .drvup_width = drvup_w, \
  1123. .slwr_bit = slwr_b, \
  1124. .slwr_width = slwr_w, \
  1125. .slwf_bit = slwf_b, \
  1126. .slwf_width = slwf_w, \
  1127. }
  1128. #define DRV_PINGROUP(pg_name, r, drvdn_b, drvdn_w, drvup_b, drvup_w, \
  1129. slwr_b, slwr_w, slwf_b, slwf_w) \
  1130. { \
  1131. .name = "drive_" #pg_name, \
  1132. .pins = drive_##pg_name##_pins, \
  1133. .npins = ARRAY_SIZE(drive_##pg_name##_pins), \
  1134. .mux_reg = -1, \
  1135. .pupd_reg = -1, \
  1136. .tri_reg = -1, \
  1137. .einput_bit = -1, \
  1138. .odrain_bit = -1, \
  1139. .lock_bit = -1, \
  1140. .ioreset_bit = -1, \
  1141. .rcv_sel_bit = -1, \
  1142. .drv_reg = DRV_PINGROUP_REG(r), \
  1143. .drv_bank = 0, \
  1144. .parked_bit = -1, \
  1145. .hsm_bit = -1, \
  1146. .schmitt_bit = -1, \
  1147. .lpmd_bit = -1, \
  1148. .drvdn_bit = drvdn_b, \
  1149. .drvdn_width = drvdn_w, \
  1150. .drvup_bit = drvup_b, \
  1151. .drvup_width = drvup_w, \
  1152. .slwr_bit = slwr_b, \
  1153. .slwr_width = slwr_w, \
  1154. .slwf_bit = slwf_b, \
  1155. .slwf_width = slwf_w, \
  1156. .drvtype_bit = -1, \
  1157. }
  1158. static const struct tegra_pingroup tegra210_groups[] = {
  1159. /* pg_name, f0, f1, f2, f3, r, hsm, drvtype, e_io_hv, rdrv, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w */
  1160. PINGROUP(sdmmc1_clk_pm0, SDMMC1, RSVD1, RSVD2, RSVD3, 0x3000, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1161. PINGROUP(sdmmc1_cmd_pm1, SDMMC1, SPI3, RSVD2, RSVD3, 0x3004, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1162. PINGROUP(sdmmc1_dat3_pm2, SDMMC1, SPI3, RSVD2, RSVD3, 0x3008, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1163. PINGROUP(sdmmc1_dat2_pm3, SDMMC1, SPI3, RSVD2, RSVD3, 0x300c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1164. PINGROUP(sdmmc1_dat1_pm4, SDMMC1, SPI3, RSVD2, RSVD3, 0x3010, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1165. PINGROUP(sdmmc1_dat0_pm5, SDMMC1, RSVD1, RSVD2, RSVD3, 0x3014, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1166. PINGROUP(sdmmc3_clk_pp0, SDMMC3, RSVD1, RSVD2, RSVD3, 0x301c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1167. PINGROUP(sdmmc3_cmd_pp1, SDMMC3, RSVD1, RSVD2, RSVD3, 0x3020, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1168. PINGROUP(sdmmc3_dat0_pp5, SDMMC3, RSVD1, RSVD2, RSVD3, 0x3024, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1169. PINGROUP(sdmmc3_dat1_pp4, SDMMC3, RSVD1, RSVD2, RSVD3, 0x3028, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1170. PINGROUP(sdmmc3_dat2_pp3, SDMMC3, RSVD1, RSVD2, RSVD3, 0x302c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1171. PINGROUP(sdmmc3_dat3_pp2, SDMMC3, RSVD1, RSVD2, RSVD3, 0x3030, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1172. PINGROUP(pex_l0_rst_n_pa0, PE0, RSVD1, RSVD2, RSVD3, 0x3038, N, N, Y, 0xa5c, 12, 5, 20, 5, -1, -1, -1, -1),
  1173. PINGROUP(pex_l0_clkreq_n_pa1, PE0, RSVD1, RSVD2, RSVD3, 0x303c, N, N, Y, 0xa58, 12, 5, 20, 5, -1, -1, -1, -1),
  1174. PINGROUP(pex_wake_n_pa2, PE, RSVD1, RSVD2, RSVD3, 0x3040, N, N, Y, 0xa68, 12, 5, 20, 5, -1, -1, -1, -1),
  1175. PINGROUP(pex_l1_rst_n_pa3, PE1, RSVD1, RSVD2, RSVD3, 0x3044, N, N, Y, 0xa64, 12, 5, 20, 5, -1, -1, -1, -1),
  1176. PINGROUP(pex_l1_clkreq_n_pa4, PE1, RSVD1, RSVD2, RSVD3, 0x3048, N, N, Y, 0xa60, 12, 5, 20, 5, -1, -1, -1, -1),
  1177. PINGROUP(sata_led_active_pa5, SATA, RSVD1, RSVD2, RSVD3, 0x304c, N, N, N, 0xa94, 12, 5, 20, 5, -1, -1, -1, -1),
  1178. PINGROUP(spi1_mosi_pc0, SPI1, RSVD1, RSVD2, RSVD3, 0x3050, Y, Y, N, 0xae0, -1, -1, -1, -1, 28, 2, 30, 2),
  1179. PINGROUP(spi1_miso_pc1, SPI1, RSVD1, RSVD2, RSVD3, 0x3054, Y, Y, N, 0xadc, -1, -1, -1, -1, 28, 2, 30, 2),
  1180. PINGROUP(spi1_sck_pc2, SPI1, RSVD1, RSVD2, RSVD3, 0x3058, Y, Y, N, 0xae4, -1, -1, -1, -1, 28, 2, 30, 2),
  1181. PINGROUP(spi1_cs0_pc3, SPI1, RSVD1, RSVD2, RSVD3, 0x305c, Y, Y, N, 0xad4, -1, -1, -1, -1, 28, 2, 30, 2),
  1182. PINGROUP(spi1_cs1_pc4, SPI1, RSVD1, RSVD2, RSVD3, 0x3060, Y, Y, N, 0xad8, -1, -1, -1, -1, 28, 2, 30, 2),
  1183. PINGROUP(spi2_mosi_pb4, SPI2, DTV, RSVD2, RSVD3, 0x3064, Y, Y, N, 0xaf4, -1, -1, -1, -1, 28, 2, 30, 2),
  1184. PINGROUP(spi2_miso_pb5, SPI2, DTV, RSVD2, RSVD3, 0x3068, Y, Y, N, 0xaf0, -1, -1, -1, -1, 28, 2, 30, 2),
  1185. PINGROUP(spi2_sck_pb6, SPI2, DTV, RSVD2, RSVD3, 0x306c, Y, Y, N, 0xaf8, -1, -1, -1, -1, 28, 2, 30, 2),
  1186. PINGROUP(spi2_cs0_pb7, SPI2, DTV, RSVD2, RSVD3, 0x3070, Y, Y, N, 0xae8, -1, -1, -1, -1, 28, 2, 30, 2),
  1187. PINGROUP(spi2_cs1_pdd0, SPI2, RSVD1, RSVD2, RSVD3, 0x3074, Y, Y, N, 0xaec, -1, -1, -1, -1, 28, 2, 30, 2),
  1188. PINGROUP(spi4_mosi_pc7, SPI4, RSVD1, RSVD2, RSVD3, 0x3078, Y, Y, N, 0xb04, -1, -1, -1, -1, 28, 2, 30, 2),
  1189. PINGROUP(spi4_miso_pd0, SPI4, RSVD1, RSVD2, RSVD3, 0x307c, Y, Y, N, 0xb00, -1, -1, -1, -1, 28, 2, 30, 2),
  1190. PINGROUP(spi4_sck_pc5, SPI4, RSVD1, RSVD2, RSVD3, 0x3080, Y, Y, N, 0xb08, -1, -1, -1, -1, 28, 2, 30, 2),
  1191. PINGROUP(spi4_cs0_pc6, SPI4, RSVD1, RSVD2, RSVD3, 0x3084, Y, Y, N, 0xafc, -1, -1, -1, -1, 28, 2, 30, 2),
  1192. PINGROUP(qspi_sck_pee0, QSPI, RSVD1, RSVD2, RSVD3, 0x3088, Y, Y, N, 0xa90, -1, -1, -1, -1, 28, 2, 30, 2),
  1193. PINGROUP(qspi_cs_n_pee1, QSPI, RSVD1, RSVD2, RSVD3, 0x308c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1194. PINGROUP(qspi_io0_pee2, QSPI, RSVD1, RSVD2, RSVD3, 0x3090, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1195. PINGROUP(qspi_io1_pee3, QSPI, RSVD1, RSVD2, RSVD3, 0x3094, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1196. PINGROUP(qspi_io2_pee4, QSPI, RSVD1, RSVD2, RSVD3, 0x3098, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1197. PINGROUP(qspi_io3_pee5, QSPI, RSVD1, RSVD2, RSVD3, 0x309c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1198. PINGROUP(dmic1_clk_pe0, DMIC1, I2S3, RSVD2, RSVD3, 0x30a4, N, N, N, 0x984, 12, 5, 20, 5, -1, -1, -1, -1),
  1199. PINGROUP(dmic1_dat_pe1, DMIC1, I2S3, RSVD2, RSVD3, 0x30a8, N, N, N, 0x988, 12, 5, 20, 5, -1, -1, -1, -1),
  1200. PINGROUP(dmic2_clk_pe2, DMIC2, I2S3, RSVD2, RSVD3, 0x30ac, N, N, N, 0x98c, 12, 5, 20, 5, -1, -1, -1, -1),
  1201. PINGROUP(dmic2_dat_pe3, DMIC2, I2S3, RSVD2, RSVD3, 0x30b0, N, N, N, 0x990, 12, 5, 20, 5, -1, -1, -1, -1),
  1202. PINGROUP(dmic3_clk_pe4, DMIC3, I2S5A, RSVD2, RSVD3, 0x30b4, N, N, N, 0x994, 12, 5, 20, 5, -1, -1, -1, -1),
  1203. PINGROUP(dmic3_dat_pe5, DMIC3, I2S5A, RSVD2, RSVD3, 0x30b8, N, N, N, 0x998, 12, 5, 20, 5, -1, -1, -1, -1),
  1204. PINGROUP(gen1_i2c_scl_pj1, I2C1, RSVD1, RSVD2, RSVD3, 0x30bc, N, N, Y, 0x9a8, 12, 5, 20, 5, -1, -1, -1, -1),
  1205. PINGROUP(gen1_i2c_sda_pj0, I2C1, RSVD1, RSVD2, RSVD3, 0x30c0, N, N, Y, 0x9ac, 12, 5, 20, 5, -1, -1, -1, -1),
  1206. PINGROUP(gen2_i2c_scl_pj2, I2C2, RSVD1, RSVD2, RSVD3, 0x30c4, N, N, Y, 0x9b0, 12, 5, 20, 5, -1, -1, -1, -1),
  1207. PINGROUP(gen2_i2c_sda_pj3, I2C2, RSVD1, RSVD2, RSVD3, 0x30c8, N, N, Y, 0x9b4, 12, 5, 20, 5, -1, -1, -1, -1),
  1208. PINGROUP(gen3_i2c_scl_pf0, I2C3, RSVD1, RSVD2, RSVD3, 0x30cc, N, N, Y, 0x9b8, 12, 5, 20, 5, -1, -1, -1, -1),
  1209. PINGROUP(gen3_i2c_sda_pf1, I2C3, RSVD1, RSVD2, RSVD3, 0x30d0, N, N, Y, 0x9bc, 12, 5, 20, 5, -1, -1, -1, -1),
  1210. PINGROUP(cam_i2c_scl_ps2, I2C3, I2CVI, RSVD2, RSVD3, 0x30d4, N, N, Y, 0x934, 12, 5, 20, 5, -1, -1, -1, -1),
  1211. PINGROUP(cam_i2c_sda_ps3, I2C3, I2CVI, RSVD2, RSVD3, 0x30d8, N, N, Y, 0x938, 12, 5, 20, 5, -1, -1, -1, -1),
  1212. PINGROUP(pwr_i2c_scl_py3, I2CPMU, RSVD1, RSVD2, RSVD3, 0x30dc, N, N, Y, 0xa6c, 12, 5, 20, 5, -1, -1, -1, -1),
  1213. PINGROUP(pwr_i2c_sda_py4, I2CPMU, RSVD1, RSVD2, RSVD3, 0x30e0, N, N, Y, 0xa70, 12, 5, 20, 5, -1, -1, -1, -1),
  1214. PINGROUP(uart1_tx_pu0, UARTA, RSVD1, RSVD2, RSVD3, 0x30e4, N, N, N, 0xb28, 12, 5, 20, 5, -1, -1, -1, -1),
  1215. PINGROUP(uart1_rx_pu1, UARTA, RSVD1, RSVD2, RSVD3, 0x30e8, N, N, N, 0xb24, 12, 5, 20, 5, -1, -1, -1, -1),
  1216. PINGROUP(uart1_rts_pu2, UARTA, RSVD1, RSVD2, RSVD3, 0x30ec, N, N, N, 0xb20, 12, 5, 20, 5, -1, -1, -1, -1),
  1217. PINGROUP(uart1_cts_pu3, UARTA, RSVD1, RSVD2, RSVD3, 0x30f0, N, N, N, 0xb1c, 12, 5, 20, 5, -1, -1, -1, -1),
  1218. PINGROUP(uart2_tx_pg0, UARTB, I2S4A, SPDIF, UART, 0x30f4, N, N, N, 0xb38, 12, 5, 20, 5, -1, -1, -1, -1),
  1219. PINGROUP(uart2_rx_pg1, UARTB, I2S4A, SPDIF, UART, 0x30f8, N, N, N, 0xb34, 12, 5, 20, 5, -1, -1, -1, -1),
  1220. PINGROUP(uart2_rts_pg2, UARTB, I2S4A, RSVD2, UART, 0x30fc, N, N, N, 0xb30, 12, 5, 20, 5, -1, -1, -1, -1),
  1221. PINGROUP(uart2_cts_pg3, UARTB, I2S4A, RSVD2, UART, 0x3100, N, N, N, 0xb2c, 12, 5, 20, 5, -1, -1, -1, -1),
  1222. PINGROUP(uart3_tx_pd1, UARTC, SPI4, RSVD2, RSVD3, 0x3104, N, N, N, 0xb48, 12, 5, 20, 5, -1, -1, -1, -1),
  1223. PINGROUP(uart3_rx_pd2, UARTC, SPI4, RSVD2, RSVD3, 0x3108, N, N, N, 0xb44, 12, 5, 20, 5, -1, -1, -1, -1),
  1224. PINGROUP(uart3_rts_pd3, UARTC, SPI4, RSVD2, RSVD3, 0x310c, N, N, N, 0xb40, 12, 5, 20, 5, -1, -1, -1, -1),
  1225. PINGROUP(uart3_cts_pd4, UARTC, SPI4, RSVD2, RSVD3, 0x3110, N, N, N, 0xb3c, 12, 5, 20, 5, -1, -1, -1, -1),
  1226. PINGROUP(uart4_tx_pi4, UARTD, UART, RSVD2, RSVD3, 0x3114, N, N, N, 0xb58, 12, 5, 20, 5, -1, -1, -1, -1),
  1227. PINGROUP(uart4_rx_pi5, UARTD, UART, RSVD2, RSVD3, 0x3118, N, N, N, 0xb54, 12, 5, 20, 5, -1, -1, -1, -1),
  1228. PINGROUP(uart4_rts_pi6, UARTD, UART, RSVD2, RSVD3, 0x311c, N, N, N, 0xb50, 12, 5, 20, 5, -1, -1, -1, -1),
  1229. PINGROUP(uart4_cts_pi7, UARTD, UART, RSVD2, RSVD3, 0x3120, N, N, N, 0xb4c, 12, 5, 20, 5, -1, -1, -1, -1),
  1230. PINGROUP(dap1_fs_pb0, I2S1, RSVD1, RSVD2, RSVD3, 0x3124, Y, Y, N, 0x95c, -1, -1, -1, -1, 28, 2, 30, 2),
  1231. PINGROUP(dap1_din_pb1, I2S1, RSVD1, RSVD2, RSVD3, 0x3128, Y, Y, N, 0x954, -1, -1, -1, -1, 28, 2, 30, 2),
  1232. PINGROUP(dap1_dout_pb2, I2S1, RSVD1, RSVD2, RSVD3, 0x312c, Y, Y, N, 0x958, -1, -1, -1, -1, 28, 2, 30, 2),
  1233. PINGROUP(dap1_sclk_pb3, I2S1, RSVD1, RSVD2, RSVD3, 0x3130, Y, Y, N, 0x960, -1, -1, -1, -1, 28, 2, 30, 2),
  1234. PINGROUP(dap2_fs_paa0, I2S2, RSVD1, RSVD2, RSVD3, 0x3134, Y, Y, N, 0x96c, -1, -1, -1, -1, 28, 2, 30, 2),
  1235. PINGROUP(dap2_din_paa2, I2S2, RSVD1, RSVD2, RSVD3, 0x3138, Y, Y, N, 0x964, -1, -1, -1, -1, 28, 2, 30, 2),
  1236. PINGROUP(dap2_dout_paa3, I2S2, RSVD1, RSVD2, RSVD3, 0x313c, Y, Y, N, 0x968, -1, -1, -1, -1, 28, 2, 30, 2),
  1237. PINGROUP(dap2_sclk_paa1, I2S2, RSVD1, RSVD2, RSVD3, 0x3140, Y, Y, N, 0x970, -1, -1, -1, -1, 28, 2, 30, 2),
  1238. PINGROUP(dap4_fs_pj4, I2S4B, RSVD1, RSVD2, RSVD3, 0x3144, N, N, N, 0x97c, 12, 5, 20, 5, -1, -1, -1, -1),
  1239. PINGROUP(dap4_din_pj5, I2S4B, RSVD1, RSVD2, RSVD3, 0x3148, N, N, N, 0x974, 12, 5, 20, 5, -1, -1, -1, -1),
  1240. PINGROUP(dap4_dout_pj6, I2S4B, RSVD1, RSVD2, RSVD3, 0x314c, N, N, N, 0x978, 12, 5, 20, 5, -1, -1, -1, -1),
  1241. PINGROUP(dap4_sclk_pj7, I2S4B, RSVD1, RSVD2, RSVD3, 0x3150, N, N, N, 0x980, 12, 5, 20, 5, -1, -1, -1, -1),
  1242. PINGROUP(cam1_mclk_ps0, EXTPERIPH3, RSVD1, RSVD2, RSVD3, 0x3154, N, N, N, 0x918, 12, 5, 20, 5, -1, -1, -1, -1),
  1243. PINGROUP(cam2_mclk_ps1, EXTPERIPH3, RSVD1, RSVD2, RSVD3, 0x3158, N, N, N, 0x924, 12, 5, 20, 5, -1, -1, -1, -1),
  1244. PINGROUP(jtag_rtck, JTAG, RSVD1, RSVD2, RSVD3, 0x315c, N, N, N, 0xa2c, 12, 5, 20, 5, -1, -1, -1, -1),
  1245. PINGROUP(clk_32k_in, CLK, RSVD1, RSVD2, RSVD3, 0x3160, N, N, N, 0x940, 12, 5, 20, 5, -1, -1, -1, -1),
  1246. PINGROUP(clk_32k_out_py5, SOC, BLINK, RSVD2, RSVD3, 0x3164, N, N, N, 0x944, 12, 5, 20, 5, -1, -1, -1, -1),
  1247. PINGROUP(batt_bcl, BCL, RSVD1, RSVD2, RSVD3, 0x3168, N, N, Y, 0x8f8, 12, 5, 20, 5, -1, -1, -1, -1),
  1248. PINGROUP(clk_req, SYS, RSVD1, RSVD2, RSVD3, 0x316c, N, N, N, 0x948, 12, 5, 20, 5, -1, -1, -1, -1),
  1249. PINGROUP(cpu_pwr_req, CPU, RSVD1, RSVD2, RSVD3, 0x3170, N, N, N, 0x950, 12, 5, 20, 5, -1, -1, -1, -1),
  1250. PINGROUP(pwr_int_n, PMI, RSVD1, RSVD2, RSVD3, 0x3174, N, N, N, 0xa74, 12, 5, 20, 5, -1, -1, -1, -1),
  1251. PINGROUP(shutdown, SHUTDOWN, RSVD1, RSVD2, RSVD3, 0x3178, N, N, N, 0xac8, 12, 5, 20, 5, -1, -1, -1, -1),
  1252. PINGROUP(core_pwr_req, CORE, RSVD1, RSVD2, RSVD3, 0x317c, N, N, N, 0x94c, 12, 5, 20, 5, -1, -1, -1, -1),
  1253. PINGROUP(aud_mclk_pbb0, AUD, RSVD1, RSVD2, RSVD3, 0x3180, N, N, N, 0x8f4, 12, 5, 20, 5, -1, -1, -1, -1),
  1254. PINGROUP(dvfs_pwm_pbb1, RSVD0, CLDVFS, SPI3, RSVD3, 0x3184, N, N, N, 0x9a4, 12, 5, 20, 5, -1, -1, -1, -1),
  1255. PINGROUP(dvfs_clk_pbb2, RSVD0, CLDVFS, SPI3, RSVD3, 0x3188, N, N, N, 0x9a0, 12, 5, 20, 5, -1, -1, -1, -1),
  1256. PINGROUP(gpio_x1_aud_pbb3, RSVD0, RSVD1, SPI3, RSVD3, 0x318c, N, N, N, 0xa14, 12, 5, 20, 5, -1, -1, -1, -1),
  1257. PINGROUP(gpio_x3_aud_pbb4, RSVD0, RSVD1, SPI3, RSVD3, 0x3190, N, N, N, 0xa18, 12, 5, 20, 5, -1, -1, -1, -1),
  1258. PINGROUP(pcc7, RSVD0, RSVD1, RSVD2, RSVD3, 0x3194, N, N, Y, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1259. PINGROUP(hdmi_cec_pcc0, CEC, RSVD1, RSVD2, RSVD3, 0x3198, N, N, Y, 0xa24, 12, 5, 20, 5, -1, -1, -1, -1),
  1260. PINGROUP(hdmi_int_dp_hpd_pcc1, DP, RSVD1, RSVD2, RSVD3, 0x319c, N, N, Y, 0xa28, 12, 5, 20, 5, -1, -1, -1, -1),
  1261. PINGROUP(spdif_out_pcc2, SPDIF, RSVD1, RSVD2, RSVD3, 0x31a0, N, N, N, 0xad0, 12, 5, 20, 5, -1, -1, -1, -1),
  1262. PINGROUP(spdif_in_pcc3, SPDIF, RSVD1, RSVD2, RSVD3, 0x31a4, N, N, N, 0xacc, 12, 5, 20, 5, -1, -1, -1, -1),
  1263. PINGROUP(usb_vbus_en0_pcc4, USB, RSVD1, RSVD2, RSVD3, 0x31a8, N, N, Y, 0xb5c, 12, 5, 20, 5, -1, -1, -1, -1),
  1264. PINGROUP(usb_vbus_en1_pcc5, USB, RSVD1, RSVD2, RSVD3, 0x31ac, N, N, Y, 0xb60, 12, 5, 20, 5, -1, -1, -1, -1),
  1265. PINGROUP(dp_hpd0_pcc6, DP, RSVD1, RSVD2, RSVD3, 0x31b0, N, N, N, 0x99c, 12, 5, 20, 5, -1, -1, -1, -1),
  1266. PINGROUP(wifi_en_ph0, RSVD0, RSVD1, RSVD2, RSVD3, 0x31b4, N, N, N, 0xb64, 12, 5, 20, 5, -1, -1, -1, -1),
  1267. PINGROUP(wifi_rst_ph1, RSVD0, RSVD1, RSVD2, RSVD3, 0x31b8, N, N, N, 0xb68, 12, 5, 20, 5, -1, -1, -1, -1),
  1268. PINGROUP(wifi_wake_ap_ph2, RSVD0, RSVD1, RSVD2, RSVD3, 0x31bc, N, N, N, 0xb6c, 12, 5, 20, 5, -1, -1, -1, -1),
  1269. PINGROUP(ap_wake_bt_ph3, RSVD0, UARTB, SPDIF, RSVD3, 0x31c0, N, N, N, 0x8ec, 12, 5, 20, 5, -1, -1, -1, -1),
  1270. PINGROUP(bt_rst_ph4, RSVD0, UARTB, SPDIF, RSVD3, 0x31c4, N, N, N, 0x8fc, 12, 5, 20, 5, -1, -1, -1, -1),
  1271. PINGROUP(bt_wake_ap_ph5, RSVD0, RSVD1, RSVD2, RSVD3, 0x31c8, N, N, N, 0x900, 12, 5, 20, 5, -1, -1, -1, -1),
  1272. PINGROUP(ap_wake_nfc_ph7, RSVD0, RSVD1, RSVD2, RSVD3, 0x31cc, N, N, N, 0x8f0, 12, 5, 20, 5, -1, -1, -1, -1),
  1273. PINGROUP(nfc_en_pi0, RSVD0, RSVD1, RSVD2, RSVD3, 0x31d0, N, N, N, 0xa50, 12, 5, 20, 5, -1, -1, -1, -1),
  1274. PINGROUP(nfc_int_pi1, RSVD0, RSVD1, RSVD2, RSVD3, 0x31d4, N, N, N, 0xa54, 12, 5, 20, 5, -1, -1, -1, -1),
  1275. PINGROUP(gps_en_pi2, RSVD0, RSVD1, RSVD2, RSVD3, 0x31d8, N, N, N, 0xa1c, 12, 5, 20, 5, -1, -1, -1, -1),
  1276. PINGROUP(gps_rst_pi3, RSVD0, RSVD1, RSVD2, RSVD3, 0x31dc, N, N, N, 0xa20, 12, 5, 20, 5, -1, -1, -1, -1),
  1277. PINGROUP(cam_rst_ps4, VGP1, RSVD1, RSVD2, RSVD3, 0x31e0, N, N, N, 0x93c, 12, 5, 20, 5, -1, -1, -1, -1),
  1278. PINGROUP(cam_af_en_ps5, VIMCLK, VGP2, RSVD2, RSVD3, 0x31e4, N, N, N, 0x92c, 12, 5, 20, 5, -1, -1, -1, -1),
  1279. PINGROUP(cam_flash_en_ps6, VIMCLK, VGP3, RSVD2, RSVD3, 0x31e8, N, N, N, 0x930, 12, 5, 20, 5, -1, -1, -1, -1),
  1280. PINGROUP(cam1_pwdn_ps7, VGP4, RSVD1, RSVD2, RSVD3, 0x31ec, N, N, N, 0x91c, 12, 5, 20, 5, -1, -1, -1, -1),
  1281. PINGROUP(cam2_pwdn_pt0, VGP5, RSVD1, RSVD2, RSVD3, 0x31f0, N, N, N, 0x928, 12, 5, 20, 5, -1, -1, -1, -1),
  1282. PINGROUP(cam1_strobe_pt1, VGP6, RSVD1, RSVD2, RSVD3, 0x31f4, N, N, N, 0x920, 12, 5, 20, 5, -1, -1, -1, -1),
  1283. PINGROUP(lcd_te_py2, DISPLAYA, RSVD1, RSVD2, RSVD3, 0x31f8, N, N, N, 0xa44, 12, 5, 20, 5, -1, -1, -1, -1),
  1284. PINGROUP(lcd_bl_pwm_pv0, DISPLAYA, PWM0, SOR0, RSVD3, 0x31fc, N, N, N, 0xa34, 12, 5, 20, 5, -1, -1, -1, -1),
  1285. PINGROUP(lcd_bl_en_pv1, RSVD0, RSVD1, RSVD2, RSVD3, 0x3200, N, N, N, 0xa30, 12, 5, 20, 5, -1, -1, -1, -1),
  1286. PINGROUP(lcd_rst_pv2, RSVD0, RSVD1, RSVD2, RSVD3, 0x3204, N, N, N, 0xa40, 12, 5, 20, 5, -1, -1, -1, -1),
  1287. PINGROUP(lcd_gpio1_pv3, DISPLAYB, RSVD1, RSVD2, RSVD3, 0x3208, N, N, N, 0xa38, 12, 5, 20, 5, -1, -1, -1, -1),
  1288. PINGROUP(lcd_gpio2_pv4, DISPLAYB, PWM1, RSVD2, SOR1, 0x320c, N, N, N, 0xa3c, 12, 5, 20, 5, -1, -1, -1, -1),
  1289. PINGROUP(ap_ready_pv5, RSVD0, RSVD1, RSVD2, RSVD3, 0x3210, N, N, N, 0x8e8, 12, 5, 20, 5, -1, -1, -1, -1),
  1290. PINGROUP(touch_rst_pv6, RSVD0, RSVD1, RSVD2, RSVD3, 0x3214, N, N, N, 0xb18, 12, 5, 20, 5, -1, -1, -1, -1),
  1291. PINGROUP(touch_clk_pv7, TOUCH, RSVD1, RSVD2, RSVD3, 0x3218, N, N, N, 0xb10, 12, 5, 20, 5, -1, -1, -1, -1),
  1292. PINGROUP(modem_wake_ap_px0, RSVD0, RSVD1, RSVD2, RSVD3, 0x321c, N, N, N, 0xa48, 12, 5, 20, 5, -1, -1, -1, -1),
  1293. PINGROUP(touch_int_px1, RSVD0, RSVD1, RSVD2, RSVD3, 0x3220, N, N, N, 0xb14, 12, 5, 20, 5, -1, -1, -1, -1),
  1294. PINGROUP(motion_int_px2, RSVD0, RSVD1, RSVD2, RSVD3, 0x3224, N, N, N, 0xa4c, 12, 5, 20, 5, -1, -1, -1, -1),
  1295. PINGROUP(als_prox_int_px3, RSVD0, RSVD1, RSVD2, RSVD3, 0x3228, N, N, N, 0x8e4, 12, 5, 20, 5, -1, -1, -1, -1),
  1296. PINGROUP(temp_alert_px4, RSVD0, RSVD1, RSVD2, RSVD3, 0x322c, N, N, N, 0xb0c, 12, 5, 20, 5, -1, -1, -1, -1),
  1297. PINGROUP(button_power_on_px5, RSVD0, RSVD1, RSVD2, RSVD3, 0x3230, N, N, N, 0x908, 12, 5, 20, 5, -1, -1, -1, -1),
  1298. PINGROUP(button_vol_up_px6, RSVD0, RSVD1, RSVD2, RSVD3, 0x3234, N, N, N, 0x914, 12, 5, 20, 5, -1, -1, -1, -1),
  1299. PINGROUP(button_vol_down_px7, RSVD0, RSVD1, RSVD2, RSVD3, 0x3238, N, N, N, 0x910, 12, 5, 20, 5, -1, -1, -1, -1),
  1300. PINGROUP(button_slide_sw_py0, RSVD0, RSVD1, RSVD2, RSVD3, 0x323c, N, N, N, 0x90c, 12, 5, 20, 5, -1, -1, -1, -1),
  1301. PINGROUP(button_home_py1, RSVD0, RSVD1, RSVD2, RSVD3, 0x3240, N, N, N, 0x904, 12, 5, 20, 5, -1, -1, -1, -1),
  1302. PINGROUP(pa6, SATA, RSVD1, RSVD2, RSVD3, 0x3244, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1303. PINGROUP(pe6, RSVD0, I2S5A, PWM2, RSVD3, 0x3248, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1304. PINGROUP(pe7, RSVD0, I2S5A, PWM3, RSVD3, 0x324c, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1305. PINGROUP(ph6, RSVD0, RSVD1, RSVD2, RSVD3, 0x3250, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1306. PINGROUP(pk0, IQC0, I2S5B, RSVD2, RSVD3, 0x3254, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1307. PINGROUP(pk1, IQC0, I2S5B, RSVD2, RSVD3, 0x3258, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1308. PINGROUP(pk2, IQC0, I2S5B, RSVD2, RSVD3, 0x325c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1309. PINGROUP(pk3, IQC0, I2S5B, RSVD2, RSVD3, 0x3260, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1310. PINGROUP(pk4, IQC1, RSVD1, RSVD2, RSVD3, 0x3264, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1311. PINGROUP(pk5, IQC1, RSVD1, RSVD2, RSVD3, 0x3268, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1312. PINGROUP(pk6, IQC1, RSVD1, RSVD2, RSVD3, 0x326c, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1313. PINGROUP(pk7, IQC1, RSVD1, RSVD2, RSVD3, 0x3270, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1314. PINGROUP(pl0, RSVD0, RSVD1, RSVD2, RSVD3, 0x3274, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1315. PINGROUP(pl1, SOC, RSVD1, RSVD2, RSVD3, 0x3278, Y, Y, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1316. PINGROUP(pz0, VIMCLK2, RSVD1, RSVD2, RSVD3, 0x327c, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1317. PINGROUP(pz1, VIMCLK2, SDMMC1, RSVD2, RSVD3, 0x3280, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1318. PINGROUP(pz2, SDMMC3, CCLA, RSVD2, RSVD3, 0x3284, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1319. PINGROUP(pz3, SDMMC3, RSVD1, RSVD2, RSVD3, 0x3288, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1320. PINGROUP(pz4, SDMMC1, RSVD1, RSVD2, RSVD3, 0x328c, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1321. PINGROUP(pz5, SOC, RSVD1, RSVD2, RSVD3, 0x3290, N, N, N, -1, -1, -1, -1, -1, -1, -1, -1, -1),
  1322. /* pg_name, r, drvdn_b, drvdn_w, drvup_b, drvup_w, slwr_b, slwr_w, slwf_b, slwf_w */
  1323. DRV_PINGROUP(pa6, 0x9c0, 12, 5, 20, 5, -1, -1, -1, -1),
  1324. DRV_PINGROUP(pcc7, 0x9c4, 12, 5, 20, 5, -1, -1, -1, -1),
  1325. DRV_PINGROUP(pe6, 0x9c8, 12, 5, 20, 5, -1, -1, -1, -1),
  1326. DRV_PINGROUP(pe7, 0x9cc, 12, 5, 20, 5, -1, -1, -1, -1),
  1327. DRV_PINGROUP(ph6, 0x9d0, 12, 5, 20, 5, -1, -1, -1, -1),
  1328. DRV_PINGROUP(pk0, 0x9d4, -1, -1, -1, -1, 28, 2, 30, 2),
  1329. DRV_PINGROUP(pk1, 0x9d8, -1, -1, -1, -1, 28, 2, 30, 2),
  1330. DRV_PINGROUP(pk2, 0x9dc, -1, -1, -1, -1, 28, 2, 30, 2),
  1331. DRV_PINGROUP(pk3, 0x9e0, -1, -1, -1, -1, 28, 2, 30, 2),
  1332. DRV_PINGROUP(pk4, 0x9e4, -1, -1, -1, -1, 28, 2, 30, 2),
  1333. DRV_PINGROUP(pk5, 0x9e8, -1, -1, -1, -1, 28, 2, 30, 2),
  1334. DRV_PINGROUP(pk6, 0x9ec, -1, -1, -1, -1, 28, 2, 30, 2),
  1335. DRV_PINGROUP(pk7, 0x9f0, -1, -1, -1, -1, 28, 2, 30, 2),
  1336. DRV_PINGROUP(pl0, 0x9f4, -1, -1, -1, -1, 28, 2, 30, 2),
  1337. DRV_PINGROUP(pl1, 0x9f8, -1, -1, -1, -1, 28, 2, 30, 2),
  1338. DRV_PINGROUP(pz0, 0x9fc, 12, 7, 20, 7, -1, -1, -1, -1),
  1339. DRV_PINGROUP(pz1, 0xa00, 12, 7, 20, 7, -1, -1, -1, -1),
  1340. DRV_PINGROUP(pz2, 0xa04, 12, 7, 20, 7, -1, -1, -1, -1),
  1341. DRV_PINGROUP(pz3, 0xa08, 12, 7, 20, 7, -1, -1, -1, -1),
  1342. DRV_PINGROUP(pz4, 0xa0c, 12, 7, 20, 7, -1, -1, -1, -1),
  1343. DRV_PINGROUP(pz5, 0xa10, 12, 7, 20, 7, -1, -1, -1, -1),
  1344. DRV_PINGROUP(sdmmc1, 0xa98, 12, 7, 20, 7, 28, 2, 30, 2),
  1345. DRV_PINGROUP(sdmmc2, 0xa9c, 2, 6, 8, 6, 28, 2, 30, 2),
  1346. DRV_PINGROUP(sdmmc3, 0xab0, 12, 7, 20, 7, 28, 2, 30, 2),
  1347. DRV_PINGROUP(sdmmc4, 0xab4, 2, 6, 8, 6, 28, 2, 30, 2),
  1348. };
  1349. static const struct tegra_pinctrl_soc_data tegra210_pinctrl = {
  1350. .ngpios = NUM_GPIOS,
  1351. .pins = tegra210_pins,
  1352. .npins = ARRAY_SIZE(tegra210_pins),
  1353. .functions = tegra210_functions,
  1354. .nfunctions = ARRAY_SIZE(tegra210_functions),
  1355. .groups = tegra210_groups,
  1356. .ngroups = ARRAY_SIZE(tegra210_groups),
  1357. .hsm_in_mux = true,
  1358. .schmitt_in_mux = true,
  1359. .drvtype_in_mux = true,
  1360. };
  1361. static int tegra210_pinctrl_probe(struct platform_device *pdev)
  1362. {
  1363. return tegra_pinctrl_probe(pdev, &tegra210_pinctrl);
  1364. }
  1365. static const struct of_device_id tegra210_pinctrl_of_match[] = {
  1366. { .compatible = "nvidia,tegra210-pinmux", },
  1367. { },
  1368. };
  1369. MODULE_DEVICE_TABLE(of, tegra210_pinctrl_of_match);
  1370. static struct platform_driver tegra210_pinctrl_driver = {
  1371. .driver = {
  1372. .name = "tegra210-pinctrl",
  1373. .of_match_table = tegra210_pinctrl_of_match,
  1374. },
  1375. .probe = tegra210_pinctrl_probe,
  1376. };
  1377. module_platform_driver(tegra210_pinctrl_driver);
  1378. MODULE_AUTHOR("NVIDIA");
  1379. MODULE_DESCRIPTION("NVIDIA Tegra210 pinctrl driver");
  1380. MODULE_LICENSE("GPL v2");