pinctrl-amlogic-t7.c 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611
  1. // SPDX-License-Identifier: (GPL-2.0-only OR MIT)
  2. /*
  3. * Pin controller and GPIO driver for Amlogic T7 SoC.
  4. *
  5. * Copyright (c) 2023 Amlogic, Inc. All rights reserved.
  6. * Author: Huqiang Qin <huqiang.qin@amlogic.com>
  7. */
  8. #include <dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h>
  9. #include "pinctrl-meson.h"
  10. #include "pinctrl-meson-axg-pmx.h"
  11. static const struct pinctrl_pin_desc t7_periphs_pins[] = {
  12. MESON_PIN(GPIOB_0),
  13. MESON_PIN(GPIOB_1),
  14. MESON_PIN(GPIOB_2),
  15. MESON_PIN(GPIOB_3),
  16. MESON_PIN(GPIOB_4),
  17. MESON_PIN(GPIOB_5),
  18. MESON_PIN(GPIOB_6),
  19. MESON_PIN(GPIOB_7),
  20. MESON_PIN(GPIOB_8),
  21. MESON_PIN(GPIOB_9),
  22. MESON_PIN(GPIOB_10),
  23. MESON_PIN(GPIOB_11),
  24. MESON_PIN(GPIOB_12),
  25. MESON_PIN(GPIOC_0),
  26. MESON_PIN(GPIOC_1),
  27. MESON_PIN(GPIOC_2),
  28. MESON_PIN(GPIOC_3),
  29. MESON_PIN(GPIOC_4),
  30. MESON_PIN(GPIOC_5),
  31. MESON_PIN(GPIOC_6),
  32. MESON_PIN(GPIOX_0),
  33. MESON_PIN(GPIOX_1),
  34. MESON_PIN(GPIOX_2),
  35. MESON_PIN(GPIOX_3),
  36. MESON_PIN(GPIOX_4),
  37. MESON_PIN(GPIOX_5),
  38. MESON_PIN(GPIOX_6),
  39. MESON_PIN(GPIOX_7),
  40. MESON_PIN(GPIOX_8),
  41. MESON_PIN(GPIOX_9),
  42. MESON_PIN(GPIOX_10),
  43. MESON_PIN(GPIOX_11),
  44. MESON_PIN(GPIOX_12),
  45. MESON_PIN(GPIOX_13),
  46. MESON_PIN(GPIOX_14),
  47. MESON_PIN(GPIOX_15),
  48. MESON_PIN(GPIOX_16),
  49. MESON_PIN(GPIOX_17),
  50. MESON_PIN(GPIOX_18),
  51. MESON_PIN(GPIOX_19),
  52. MESON_PIN(GPIOW_0),
  53. MESON_PIN(GPIOW_1),
  54. MESON_PIN(GPIOW_2),
  55. MESON_PIN(GPIOW_3),
  56. MESON_PIN(GPIOW_4),
  57. MESON_PIN(GPIOW_5),
  58. MESON_PIN(GPIOW_6),
  59. MESON_PIN(GPIOW_7),
  60. MESON_PIN(GPIOW_8),
  61. MESON_PIN(GPIOW_9),
  62. MESON_PIN(GPIOW_10),
  63. MESON_PIN(GPIOW_11),
  64. MESON_PIN(GPIOW_12),
  65. MESON_PIN(GPIOW_13),
  66. MESON_PIN(GPIOW_14),
  67. MESON_PIN(GPIOW_15),
  68. MESON_PIN(GPIOW_16),
  69. MESON_PIN(GPIOD_0),
  70. MESON_PIN(GPIOD_1),
  71. MESON_PIN(GPIOD_2),
  72. MESON_PIN(GPIOD_3),
  73. MESON_PIN(GPIOD_4),
  74. MESON_PIN(GPIOD_5),
  75. MESON_PIN(GPIOD_6),
  76. MESON_PIN(GPIOD_7),
  77. MESON_PIN(GPIOD_8),
  78. MESON_PIN(GPIOD_9),
  79. MESON_PIN(GPIOD_10),
  80. MESON_PIN(GPIOD_11),
  81. MESON_PIN(GPIOD_12),
  82. MESON_PIN(GPIOE_0),
  83. MESON_PIN(GPIOE_1),
  84. MESON_PIN(GPIOE_2),
  85. MESON_PIN(GPIOE_3),
  86. MESON_PIN(GPIOE_4),
  87. MESON_PIN(GPIOE_5),
  88. MESON_PIN(GPIOE_6),
  89. MESON_PIN(GPIOZ_0),
  90. MESON_PIN(GPIOZ_1),
  91. MESON_PIN(GPIOZ_2),
  92. MESON_PIN(GPIOZ_3),
  93. MESON_PIN(GPIOZ_4),
  94. MESON_PIN(GPIOZ_5),
  95. MESON_PIN(GPIOZ_6),
  96. MESON_PIN(GPIOZ_7),
  97. MESON_PIN(GPIOZ_8),
  98. MESON_PIN(GPIOZ_9),
  99. MESON_PIN(GPIOZ_10),
  100. MESON_PIN(GPIOZ_11),
  101. MESON_PIN(GPIOZ_12),
  102. MESON_PIN(GPIOZ_13),
  103. MESON_PIN(GPIOT_0),
  104. MESON_PIN(GPIOT_1),
  105. MESON_PIN(GPIOT_2),
  106. MESON_PIN(GPIOT_3),
  107. MESON_PIN(GPIOT_4),
  108. MESON_PIN(GPIOT_5),
  109. MESON_PIN(GPIOT_6),
  110. MESON_PIN(GPIOT_7),
  111. MESON_PIN(GPIOT_8),
  112. MESON_PIN(GPIOT_9),
  113. MESON_PIN(GPIOT_10),
  114. MESON_PIN(GPIOT_11),
  115. MESON_PIN(GPIOT_12),
  116. MESON_PIN(GPIOT_13),
  117. MESON_PIN(GPIOT_14),
  118. MESON_PIN(GPIOT_15),
  119. MESON_PIN(GPIOT_16),
  120. MESON_PIN(GPIOT_17),
  121. MESON_PIN(GPIOT_18),
  122. MESON_PIN(GPIOT_19),
  123. MESON_PIN(GPIOT_20),
  124. MESON_PIN(GPIOT_21),
  125. MESON_PIN(GPIOT_22),
  126. MESON_PIN(GPIOT_23),
  127. MESON_PIN(GPIOM_0),
  128. MESON_PIN(GPIOM_1),
  129. MESON_PIN(GPIOM_2),
  130. MESON_PIN(GPIOM_3),
  131. MESON_PIN(GPIOM_4),
  132. MESON_PIN(GPIOM_5),
  133. MESON_PIN(GPIOM_6),
  134. MESON_PIN(GPIOM_7),
  135. MESON_PIN(GPIOM_8),
  136. MESON_PIN(GPIOM_9),
  137. MESON_PIN(GPIOM_10),
  138. MESON_PIN(GPIOM_11),
  139. MESON_PIN(GPIOM_12),
  140. MESON_PIN(GPIOM_13),
  141. MESON_PIN(GPIOY_0),
  142. MESON_PIN(GPIOY_1),
  143. MESON_PIN(GPIOY_2),
  144. MESON_PIN(GPIOY_3),
  145. MESON_PIN(GPIOY_4),
  146. MESON_PIN(GPIOY_5),
  147. MESON_PIN(GPIOY_6),
  148. MESON_PIN(GPIOY_7),
  149. MESON_PIN(GPIOY_8),
  150. MESON_PIN(GPIOY_9),
  151. MESON_PIN(GPIOY_10),
  152. MESON_PIN(GPIOY_11),
  153. MESON_PIN(GPIOY_12),
  154. MESON_PIN(GPIOY_13),
  155. MESON_PIN(GPIOY_14),
  156. MESON_PIN(GPIOY_15),
  157. MESON_PIN(GPIOY_16),
  158. MESON_PIN(GPIOY_17),
  159. MESON_PIN(GPIOY_18),
  160. MESON_PIN(GPIOH_0),
  161. MESON_PIN(GPIOH_1),
  162. MESON_PIN(GPIOH_2),
  163. MESON_PIN(GPIOH_3),
  164. MESON_PIN(GPIOH_4),
  165. MESON_PIN(GPIOH_5),
  166. MESON_PIN(GPIOH_6),
  167. MESON_PIN(GPIOH_7),
  168. MESON_PIN(GPIO_TEST_N),
  169. };
  170. /* Bank B func1 */
  171. static const unsigned int emmc_nand_d0_pins[] = { GPIOB_0 };
  172. static const unsigned int emmc_nand_d1_pins[] = { GPIOB_1 };
  173. static const unsigned int emmc_nand_d2_pins[] = { GPIOB_2 };
  174. static const unsigned int emmc_nand_d3_pins[] = { GPIOB_3 };
  175. static const unsigned int emmc_nand_d4_pins[] = { GPIOB_4 };
  176. static const unsigned int emmc_nand_d5_pins[] = { GPIOB_5 };
  177. static const unsigned int emmc_nand_d6_pins[] = { GPIOB_6 };
  178. static const unsigned int emmc_nand_d7_pins[] = { GPIOB_7 };
  179. static const unsigned int emmc_clk_pins[] = { GPIOB_8 };
  180. static const unsigned int emmc_cmd_pins[] = { GPIOB_10 };
  181. static const unsigned int emmc_nand_ds_pins[] = { GPIOB_11 };
  182. /* Bank B func2 */
  183. static const unsigned int nor_hold_pins[] = { GPIOB_3 };
  184. static const unsigned int nor_d_pins[] = { GPIOB_4 };
  185. static const unsigned int nor_q_pins[] = { GPIOB_5 };
  186. static const unsigned int nor_c_pins[] = { GPIOB_6 };
  187. static const unsigned int nor_wp_pins[] = { GPIOB_7 };
  188. static const unsigned int nor_cs_pins[] = { GPIOB_12 };
  189. /* Bank C func1 */
  190. static const unsigned int sdcard_d0_pins[] = { GPIOC_0 };
  191. static const unsigned int sdcard_d1_pins[] = { GPIOC_1 };
  192. static const unsigned int sdcard_d2_pins[] = { GPIOC_2 };
  193. static const unsigned int sdcard_d3_pins[] = { GPIOC_3 };
  194. static const unsigned int sdcard_clk_pins[] = { GPIOC_4 };
  195. static const unsigned int sdcard_cmd_pins[] = { GPIOC_5 };
  196. static const unsigned int gen_clk_out_c_pins[] = { GPIOC_6 };
  197. /* Bank C func2 */
  198. static const unsigned int jtag_b_tdo_pins[] = { GPIOC_0 };
  199. static const unsigned int jtag_b_tdi_pins[] = { GPIOC_1 };
  200. static const unsigned int uart_ao_a_rx_c_pins[] = { GPIOC_2 };
  201. static const unsigned int uart_ao_a_tx_c_pins[] = { GPIOC_3 };
  202. static const unsigned int jtag_b_clk_pins[] = { GPIOC_4 };
  203. static const unsigned int jtag_b_tms_pins[] = { GPIOC_5 };
  204. /* Bank C func3 */
  205. static const unsigned int spi1_mosi_c_pins[] = { GPIOC_0 };
  206. static const unsigned int spi1_miso_c_pins[] = { GPIOC_1 };
  207. static const unsigned int spi1_sclk_c_pins[] = { GPIOC_2 };
  208. static const unsigned int spi1_ss0_c_pins[] = { GPIOC_3 };
  209. /* Bank X func1 */
  210. static const unsigned int sdio_d0_pins[] = { GPIOX_0 };
  211. static const unsigned int sdio_d1_pins[] = { GPIOX_1 };
  212. static const unsigned int sdio_d2_pins[] = { GPIOX_2 };
  213. static const unsigned int sdio_d3_pins[] = { GPIOX_3 };
  214. static const unsigned int sdio_clk_pins[] = { GPIOX_4 };
  215. static const unsigned int sdio_cmd_pins[] = { GPIOX_5 };
  216. static const unsigned int pwm_b_pins[] = { GPIOX_6 };
  217. static const unsigned int pwm_c_pins[] = { GPIOX_7 };
  218. static const unsigned int tdm_d0_pins[] = { GPIOX_8 };
  219. static const unsigned int tdm_d1_pins[] = { GPIOX_9 };
  220. static const unsigned int tdm_fs0_pins[] = { GPIOX_10 };
  221. static const unsigned int tdm_sclk0_pins[] = { GPIOX_11 };
  222. static const unsigned int uart_c_tx_pins[] = { GPIOX_12 };
  223. static const unsigned int uart_c_rx_pins[] = { GPIOX_13 };
  224. static const unsigned int uart_c_cts_pins[] = { GPIOX_14 };
  225. static const unsigned int uart_c_rts_pins[] = { GPIOX_15 };
  226. static const unsigned int pwm_a_pins[] = { GPIOX_16 };
  227. static const unsigned int i2c2_sda_x_pins[] = { GPIOX_17 };
  228. static const unsigned int i2c2_sck_x_pins[] = { GPIOX_18 };
  229. static const unsigned int pwm_d_pins[] = { GPIOX_19 };
  230. /* Bank X func2 */
  231. static const unsigned int clk12_24_x_pins[] = { GPIOX_14 };
  232. /* Bank W func1 */
  233. static const unsigned int hdmirx_a_hpd_pins[] = { GPIOW_0 };
  234. static const unsigned int hdmirx_a_det_pins[] = { GPIOW_1 };
  235. static const unsigned int hdmirx_a_sda_pins[] = { GPIOW_2 };
  236. static const unsigned int hdmirx_a_sck_pins[] = { GPIOW_3 };
  237. static const unsigned int hdmirx_c_hpd_pins[] = { GPIOW_4 };
  238. static const unsigned int hdmirx_c_det_pins[] = { GPIOW_5 };
  239. static const unsigned int hdmirx_c_sda_pins[] = { GPIOW_6 };
  240. static const unsigned int hdmirx_c_sck_pins[] = { GPIOW_7 };
  241. static const unsigned int hdmirx_b_hpd_pins[] = { GPIOW_8 };
  242. static const unsigned int hdmirx_b_det_pins[] = { GPIOW_9 };
  243. static const unsigned int hdmirx_b_sda_pins[] = { GPIOW_10 };
  244. static const unsigned int hdmirx_b_sck_pins[] = { GPIOW_11 };
  245. static const unsigned int cec_a_pins[] = { GPIOW_12 };
  246. static const unsigned int hdmitx_sda_w13_pins[] = { GPIOW_13 };
  247. static const unsigned int hdmitx_sck_w14_pins[] = { GPIOW_14 };
  248. static const unsigned int hdmitx_hpd_in_pins[] = { GPIOW_15 };
  249. static const unsigned int cec_b_pins[] = { GPIOW_16 };
  250. /* Bank W func2 */
  251. static const unsigned int uart_ao_a_tx_w2_pins[] = { GPIOW_2 };
  252. static const unsigned int uart_ao_a_rx_w3_pins[] = { GPIOW_3 };
  253. static const unsigned int uart_ao_a_tx_w6_pins[] = { GPIOW_6 };
  254. static const unsigned int uart_ao_a_rx_w7_pins[] = { GPIOW_7 };
  255. static const unsigned int uart_ao_a_tx_w10_pins[] = { GPIOW_10 };
  256. static const unsigned int uart_ao_a_rx_w11_pins[] = { GPIOW_11 };
  257. /* Bank W func3 */
  258. static const unsigned int hdmitx_sda_w2_pins[] = { GPIOW_2 };
  259. static const unsigned int hdmitx_sck_w3_pins[] = { GPIOW_3 };
  260. /* Bank D func1 */
  261. static const unsigned int uart_ao_a_tx_d0_pins[] = { GPIOD_0 };
  262. static const unsigned int uart_ao_a_rx_d1_pins[] = { GPIOD_1 };
  263. static const unsigned int i2c0_ao_sck_d_pins[] = { GPIOD_2 };
  264. static const unsigned int i2c0_ao_sda_d_pins[] = { GPIOD_3 };
  265. static const unsigned int remote_out_d4_pins[] = { GPIOD_4 };
  266. static const unsigned int remote_in_pins[] = { GPIOD_5 };
  267. static const unsigned int jtag_a_clk_pins[] = { GPIOD_6 };
  268. static const unsigned int jtag_a_tms_pins[] = { GPIOD_7 };
  269. static const unsigned int jtag_a_tdi_pins[] = { GPIOD_8 };
  270. static const unsigned int jtag_a_tdo_pins[] = { GPIOD_9 };
  271. static const unsigned int gen_clk_out_d_pins[] = { GPIOD_10 };
  272. static const unsigned int pwm_ao_g_d11_pins[] = { GPIOD_11 };
  273. static const unsigned int wd_rsto_pins[] = { GPIOD_12 };
  274. /* Bank D func2 */
  275. static const unsigned int i2c0_slave_ao_sck_pins[] = { GPIOD_2 };
  276. static const unsigned int i2c0_slave_ao_sda_pins[] = { GPIOD_3 };
  277. static const unsigned int rtc_clk_in_pins[] = { GPIOD_4 };
  278. static const unsigned int pwm_ao_h_d5_pins[] = { GPIOD_5 };
  279. static const unsigned int pwm_ao_c_d_pins[] = { GPIOD_6 };
  280. static const unsigned int pwm_ao_g_d7_pins[] = { GPIOD_7 };
  281. static const unsigned int spdif_out_d_pins[] = { GPIOD_8 };
  282. static const unsigned int spdif_in_d_pins[] = { GPIOD_9 };
  283. static const unsigned int pwm_ao_h_d10_pins[] = { GPIOD_10 };
  284. /* Bank D func3 */
  285. static const unsigned int uart_ao_b_tx_pins[] = { GPIOD_2 };
  286. static const unsigned int uart_ao_b_rx_pins[] = { GPIOD_3 };
  287. static const unsigned int uart_ao_b_cts_pins[] = { GPIOD_4 };
  288. static const unsigned int pwm_ao_c_hiz_pins[] = { GPIOD_6 };
  289. static const unsigned int pwm_ao_g_hiz_pins[] = { GPIOD_7 };
  290. static const unsigned int uart_ao_b_rts_pins[] = { GPIOD_10 };
  291. /* Bank D func4 */
  292. static const unsigned int remote_out_d6_pins[] = { GPIOD_6 };
  293. /* Bank E func1 */
  294. static const unsigned int pwm_ao_a_pins[] = { GPIOE_0 };
  295. static const unsigned int pwm_ao_b_pins[] = { GPIOE_1 };
  296. static const unsigned int pwm_ao_c_e_pins[] = { GPIOE_2 };
  297. static const unsigned int pwm_ao_d_pins[] = { GPIOE_3 };
  298. static const unsigned int pwm_ao_e_pins[] = { GPIOE_4 };
  299. static const unsigned int pwm_ao_f_pins[] = { GPIOE_5 };
  300. static const unsigned int pwm_ao_g_e_pins[] = { GPIOE_6 };
  301. /* Bank E func2 */
  302. static const unsigned int i2c0_ao_sck_e_pins[] = { GPIOE_0 };
  303. static const unsigned int i2c0_ao_sda_e_pins[] = { GPIOE_1 };
  304. static const unsigned int clk25m_pins[] = { GPIOE_2 };
  305. static const unsigned int i2c1_ao_sck_pins[] = { GPIOE_3 };
  306. static const unsigned int i2c1_ao_sda_pins[] = { GPIOE_4 };
  307. static const unsigned int rtc_clk_out_pins[] = { GPIOD_5 };
  308. /* Bank E func3 */
  309. static const unsigned int clk12_24_e_pins[] = { GPIOE_4 };
  310. /* Bank Z func1 */
  311. static const unsigned int eth_mdio_pins[] = { GPIOZ_0 };
  312. static const unsigned int eth_mdc_pins[] = { GPIOZ_1 };
  313. static const unsigned int eth_rgmii_rx_clk_pins[] = { GPIOZ_2 };
  314. static const unsigned int eth_rx_dv_pins[] = { GPIOZ_3 };
  315. static const unsigned int eth_rxd0_pins[] = { GPIOZ_4 };
  316. static const unsigned int eth_rxd1_pins[] = { GPIOZ_5 };
  317. static const unsigned int eth_rxd2_rgmii_pins[] = { GPIOZ_6 };
  318. static const unsigned int eth_rxd3_rgmii_pins[] = { GPIOZ_7 };
  319. static const unsigned int eth_rgmii_tx_clk_pins[] = { GPIOZ_8 };
  320. static const unsigned int eth_txen_pins[] = { GPIOZ_9 };
  321. static const unsigned int eth_txd0_pins[] = { GPIOZ_10 };
  322. static const unsigned int eth_txd1_pins[] = { GPIOZ_11 };
  323. static const unsigned int eth_txd2_rgmii_pins[] = { GPIOZ_12 };
  324. static const unsigned int eth_txd3_rgmii_pins[] = { GPIOZ_13 };
  325. /* Bank Z func2 */
  326. static const unsigned int iso7816_clk_z_pins[] = { GPIOZ_0 };
  327. static const unsigned int iso7816_data_z_pins[] = { GPIOZ_1 };
  328. static const unsigned int tsin_b_valid_pins[] = { GPIOZ_2 };
  329. static const unsigned int tsin_b_sop_pins[] = { GPIOZ_3 };
  330. static const unsigned int tsin_b_din0_pins[] = { GPIOZ_4 };
  331. static const unsigned int tsin_b_clk_pins[] = { GPIOZ_5 };
  332. static const unsigned int tsin_b_fail_pins[] = { GPIOZ_6 };
  333. static const unsigned int tsin_b_din1_pins[] = { GPIOZ_7 };
  334. static const unsigned int tsin_b_din2_pins[] = { GPIOZ_8 };
  335. static const unsigned int tsin_b_din3_pins[] = { GPIOZ_9 };
  336. static const unsigned int tsin_b_din4_pins[] = { GPIOZ_10 };
  337. static const unsigned int tsin_b_din5_pins[] = { GPIOZ_11 };
  338. static const unsigned int tsin_b_din6_pins[] = { GPIOZ_12 };
  339. static const unsigned int tsin_b_din7_pins[] = { GPIOZ_13 };
  340. /* Bank Z func3 */
  341. static const unsigned int tsin_c_z_valid_pins[] = { GPIOZ_6 };
  342. static const unsigned int tsin_c_z_sop_pins[] = { GPIOZ_7 };
  343. static const unsigned int tsin_c_z_din0_pins[] = { GPIOZ_8 };
  344. static const unsigned int tsin_c_z_clk_pins[] = { GPIOZ_9 };
  345. static const unsigned int tsin_d_z_valid_pins[] = { GPIOZ_10 };
  346. static const unsigned int tsin_d_z_sop_pins[] = { GPIOZ_11 };
  347. static const unsigned int tsin_d_z_din0_pins[] = { GPIOZ_12 };
  348. static const unsigned int tsin_d_z_clk_pins[] = { GPIOZ_13 };
  349. /* Bank Z func4 */
  350. static const unsigned int spi4_mosi_pins[] = { GPIOZ_0 };
  351. static const unsigned int spi4_miso_pins[] = { GPIOZ_1 };
  352. static const unsigned int spi4_sclk_pins[] = { GPIOZ_2 };
  353. static const unsigned int spi4_ss0_pins[] = { GPIOZ_3 };
  354. static const unsigned int spi5_mosi_pins[] = { GPIOZ_4 };
  355. static const unsigned int spi5_miso_pins[] = { GPIOZ_5 };
  356. static const unsigned int spi5_sclk_pins[] = { GPIOZ_6 };
  357. static const unsigned int spi5_ss0_pins[] = { GPIOZ_7 };
  358. /* Bank T func1 */
  359. static const unsigned int mclk1_pins[] = { GPIOT_0 };
  360. static const unsigned int tdm_sclk1_pins[] = { GPIOT_1 };
  361. static const unsigned int tdm_fs1_pins[] = { GPIOT_2 };
  362. static const unsigned int tdm_d2_pins[] = { GPIOT_3 };
  363. static const unsigned int tdm_d3_pins[] = { GPIOT_4 };
  364. static const unsigned int tdm_d4_pins[] = { GPIOT_5 };
  365. static const unsigned int tdm_d5_pins[] = { GPIOT_6 };
  366. static const unsigned int tdm_d6_pins[] = { GPIOT_7 };
  367. static const unsigned int tdm_d7_pins[] = { GPIOT_8 };
  368. static const unsigned int tdm_d8_pins[] = { GPIOT_9 };
  369. static const unsigned int tdm_d9_pins[] = { GPIOT_10 };
  370. static const unsigned int tdm_d10_pins[] = { GPIOT_11 };
  371. static const unsigned int tdm_d11_pins[] = { GPIOT_12 };
  372. static const unsigned int mclk2_pins[] = { GPIOT_13 };
  373. static const unsigned int tdm_sclk2_pins[] = { GPIOT_14 };
  374. static const unsigned int tdm_fs2_pins[] = { GPIOT_15 };
  375. static const unsigned int i2c1_sck_pins[] = { GPIOT_16 };
  376. static const unsigned int i2c1_sda_pins[] = { GPIOT_17 };
  377. static const unsigned int spi0_mosi_pins[] = { GPIOT_18 };
  378. static const unsigned int spi0_miso_pins[] = { GPIOT_19 };
  379. static const unsigned int spi0_sclk_pins[] = { GPIOT_20 };
  380. static const unsigned int spi0_ss0_pins[] = { GPIOT_21 };
  381. static const unsigned int spi0_ss1_pins[] = { GPIOT_22 };
  382. static const unsigned int spi0_ss2_pins[] = { GPIOT_23 };
  383. /* Bank T func2 */
  384. static const unsigned int spdif_in_t_pins[] = { GPIOT_3 };
  385. static const unsigned int spdif_out_t_pins[] = { GPIOT_4 };
  386. static const unsigned int iso7816_clk_t_pins[] = { GPIOT_5 };
  387. static const unsigned int iso7816_data_t_pins[] = { GPIOT_6 };
  388. static const unsigned int tsin_a_sop_t_pins[] = { GPIOT_7 };
  389. static const unsigned int tsin_a_din0_t_pins[] = { GPIOT_8 };
  390. static const unsigned int tsin_a_clk_t_pins[] = { GPIOT_9 };
  391. static const unsigned int tsin_a_valid_t_pins[] = { GPIOT_10 };
  392. static const unsigned int i2c0_sck_t_pins[] = { GPIOT_20 };
  393. static const unsigned int i2c0_sda_t_pins[] = { GPIOT_21 };
  394. static const unsigned int i2c2_sck_t_pins[] = { GPIOT_22 };
  395. static const unsigned int i2c2_sda_t_pins[] = { GPIOT_23 };
  396. /* Bank T func3 */
  397. static const unsigned int spi3_mosi_pins[] = { GPIOT_6 };
  398. static const unsigned int spi3_miso_pins[] = { GPIOT_7 };
  399. static const unsigned int spi3_sclk_pins[] = { GPIOT_8 };
  400. static const unsigned int spi3_ss0_pins[] = { GPIOT_9 };
  401. /* Bank M func1 */
  402. static const unsigned int tdm_d12_pins[] = { GPIOM_0 };
  403. static const unsigned int tdm_d13_pins[] = { GPIOM_1 };
  404. static const unsigned int tdm_d14_pins[] = { GPIOM_2 };
  405. static const unsigned int tdm_d15_pins[] = { GPIOM_3 };
  406. static const unsigned int tdm_sclk3_pins[] = { GPIOM_4 };
  407. static const unsigned int tdm_fs3_pins[] = { GPIOM_5 };
  408. static const unsigned int i2c3_sda_m_pins[] = { GPIOM_6 };
  409. static const unsigned int i2c3_sck_m_pins[] = { GPIOM_7 };
  410. static const unsigned int spi1_mosi_m_pins[] = { GPIOM_8 };
  411. static const unsigned int spi1_miso_m_pins[] = { GPIOM_9 };
  412. static const unsigned int spi1_sclk_m_pins[] = { GPIOM_10 };
  413. static const unsigned int spi1_ss0_m_pins[] = { GPIOM_11 };
  414. static const unsigned int spi1_ss1_m_pins[] = { GPIOM_12 };
  415. static const unsigned int spi1_ss2_m_pins[] = { GPIOM_13 };
  416. /* Bank M func2 */
  417. static const unsigned int pdm_din1_m0_pins[] = { GPIOM_0 };
  418. static const unsigned int pdm_din2_pins[] = { GPIOM_1 };
  419. static const unsigned int pdm_din3_pins[] = { GPIOM_2 };
  420. static const unsigned int pdm_dclk_pins[] = { GPIOM_3 };
  421. static const unsigned int pdm_din0_pins[] = { GPIOM_4 };
  422. static const unsigned int pdm_din1_m5_pins[] = { GPIOM_5 };
  423. static const unsigned int uart_d_tx_m_pins[] = { GPIOM_8 };
  424. static const unsigned int uart_d_rx_m_pins[] = { GPIOM_9 };
  425. static const unsigned int uart_d_cts_m_pins[] = { GPIOM_10 };
  426. static const unsigned int uart_d_rts_m_pins[] = { GPIOM_11 };
  427. static const unsigned int i2c2_sda_m_pins[] = { GPIOM_12 };
  428. static const unsigned int i2c2_sck_m_pins[] = { GPIOM_13 };
  429. /* Bank Y func1 */
  430. static const unsigned int spi2_mosi_pins[] = { GPIOY_0 };
  431. static const unsigned int spi2_miso_pins[] = { GPIOY_1 };
  432. static const unsigned int spi2_sclk_pins[] = { GPIOY_2 };
  433. static const unsigned int spi2_ss0_pins[] = { GPIOY_3 };
  434. static const unsigned int spi2_ss1_pins[] = { GPIOY_4 };
  435. static const unsigned int spi2_ss2_pins[] = { GPIOY_5 };
  436. static const unsigned int uart_e_tx_pins[] = { GPIOY_6 };
  437. static const unsigned int uart_e_rx_pins[] = { GPIOY_7 };
  438. static const unsigned int uart_e_cts_pins[] = { GPIOY_8 };
  439. static const unsigned int uart_e_rts_pins[] = { GPIOY_9 };
  440. static const unsigned int uart_d_cts_y_pins[] = { GPIOY_10 };
  441. static const unsigned int uart_d_rts_y_pins[] = { GPIOY_11 };
  442. static const unsigned int uart_d_tx_y_pins[] = { GPIOY_12 };
  443. static const unsigned int uart_d_rx_y_pins[] = { GPIOY_13 };
  444. static const unsigned int i2c4_sck_y_pins[] = { GPIOY_15 };
  445. static const unsigned int i2c4_sda_y_pins[] = { GPIOY_16 };
  446. static const unsigned int i2c5_sck_pins[] = { GPIOY_17 };
  447. static const unsigned int i2c5_sda_pins[] = { GPIOY_18 };
  448. /* Bank Y func2 */
  449. static const unsigned int tsin_c_y_sop_pins[] = { GPIOY_4 };
  450. static const unsigned int tsin_c_y_din0_pins[] = { GPIOY_5 };
  451. static const unsigned int tsin_c_y_clk_pins[] = { GPIOY_6 };
  452. static const unsigned int tsin_c_y_valid_pins[] = { GPIOY_7 };
  453. static const unsigned int tsin_d_y_sop_pins[] = { GPIOY_8 };
  454. static const unsigned int tsin_d_y_din0_pins[] = { GPIOY_9 };
  455. static const unsigned int tsin_d_y_clk_pins[] = { GPIOY_10 };
  456. static const unsigned int tsin_d_y_valid_pins[] = { GPIOY_11 };
  457. static const unsigned int pcieck_reqn_y_pins[] = { GPIOY_18 };
  458. /* Bank Y func3 */
  459. static const unsigned int pwm_e_pins[] = { GPIOY_1 };
  460. static const unsigned int hsync_pins[] = { GPIOY_4 };
  461. static const unsigned int vsync_pins[] = { GPIOY_5 };
  462. static const unsigned int pwm_f_pins[] = { GPIOY_8 };
  463. static const unsigned int sync_3d_out_pins[] = { GPIOY_9 };
  464. static const unsigned int vx1_a_htpdn_pins[] = { GPIOY_10 };
  465. static const unsigned int vx1_b_htpdn_pins[] = { GPIOY_11 };
  466. static const unsigned int vx1_a_lockn_pins[] = { GPIOY_12 };
  467. static const unsigned int vx1_b_lockn_pins[] = { GPIOY_13 };
  468. static const unsigned int pwm_vs_y_pins[] = { GPIOY_14 };
  469. /* Bank Y func4 */
  470. static const unsigned int edp_a_hpd_pins[] = { GPIOY_10 };
  471. static const unsigned int edp_b_hpd_pins[] = { GPIOY_11 };
  472. /* Bank H func1 */
  473. static const unsigned int mic_mute_key_pins[] = { GPIOH_0 };
  474. static const unsigned int mic_mute_led_pins[] = { GPIOH_1 };
  475. static const unsigned int i2c3_sck_h_pins[] = { GPIOH_2 };
  476. static const unsigned int i2c3_sda_h_pins[] = { GPIOH_3 };
  477. static const unsigned int i2c4_sck_h_pins[] = { GPIOH_4 };
  478. static const unsigned int i2c4_sda_h_pins[] = { GPIOH_5 };
  479. static const unsigned int eth_link_led_pins[] = { GPIOH_6 };
  480. static const unsigned int eth_act_led_pins[] = { GPIOH_7 };
  481. /* Bank H func2 */
  482. static const unsigned int pwm_vs_h_pins[] = { GPIOH_1 };
  483. static const unsigned int uart_f_tx_pins[] = { GPIOH_2 };
  484. static const unsigned int uart_f_rx_pins[] = { GPIOH_3 };
  485. static const unsigned int uart_f_cts_pins[] = { GPIOH_4 };
  486. static const unsigned int uart_f_rts_pins[] = { GPIOH_5 };
  487. static const unsigned int i2c0_sda_h_pins[] = { GPIOH_6 };
  488. static const unsigned int i2c0_sck_h_pins[] = { GPIOH_7 };
  489. /* Bank H func3 */
  490. static const unsigned int pcieck_reqn_h_pins[] = { GPIOH_2 };
  491. static const struct meson_pmx_group t7_periphs_groups[] = {
  492. GPIO_GROUP(GPIOB_0),
  493. GPIO_GROUP(GPIOB_1),
  494. GPIO_GROUP(GPIOB_2),
  495. GPIO_GROUP(GPIOB_3),
  496. GPIO_GROUP(GPIOB_4),
  497. GPIO_GROUP(GPIOB_5),
  498. GPIO_GROUP(GPIOB_6),
  499. GPIO_GROUP(GPIOB_7),
  500. GPIO_GROUP(GPIOB_8),
  501. GPIO_GROUP(GPIOB_9),
  502. GPIO_GROUP(GPIOB_10),
  503. GPIO_GROUP(GPIOB_11),
  504. GPIO_GROUP(GPIOB_12),
  505. GPIO_GROUP(GPIOC_0),
  506. GPIO_GROUP(GPIOC_1),
  507. GPIO_GROUP(GPIOC_2),
  508. GPIO_GROUP(GPIOC_3),
  509. GPIO_GROUP(GPIOC_4),
  510. GPIO_GROUP(GPIOC_5),
  511. GPIO_GROUP(GPIOC_6),
  512. GPIO_GROUP(GPIOX_0),
  513. GPIO_GROUP(GPIOX_1),
  514. GPIO_GROUP(GPIOX_2),
  515. GPIO_GROUP(GPIOX_3),
  516. GPIO_GROUP(GPIOX_4),
  517. GPIO_GROUP(GPIOX_5),
  518. GPIO_GROUP(GPIOX_6),
  519. GPIO_GROUP(GPIOX_7),
  520. GPIO_GROUP(GPIOX_8),
  521. GPIO_GROUP(GPIOX_9),
  522. GPIO_GROUP(GPIOX_10),
  523. GPIO_GROUP(GPIOX_11),
  524. GPIO_GROUP(GPIOX_12),
  525. GPIO_GROUP(GPIOX_13),
  526. GPIO_GROUP(GPIOX_14),
  527. GPIO_GROUP(GPIOX_15),
  528. GPIO_GROUP(GPIOX_16),
  529. GPIO_GROUP(GPIOX_17),
  530. GPIO_GROUP(GPIOX_18),
  531. GPIO_GROUP(GPIOX_19),
  532. GPIO_GROUP(GPIOW_0),
  533. GPIO_GROUP(GPIOW_1),
  534. GPIO_GROUP(GPIOW_2),
  535. GPIO_GROUP(GPIOW_3),
  536. GPIO_GROUP(GPIOW_4),
  537. GPIO_GROUP(GPIOW_5),
  538. GPIO_GROUP(GPIOW_6),
  539. GPIO_GROUP(GPIOW_7),
  540. GPIO_GROUP(GPIOW_8),
  541. GPIO_GROUP(GPIOW_9),
  542. GPIO_GROUP(GPIOW_10),
  543. GPIO_GROUP(GPIOW_11),
  544. GPIO_GROUP(GPIOW_12),
  545. GPIO_GROUP(GPIOW_13),
  546. GPIO_GROUP(GPIOW_14),
  547. GPIO_GROUP(GPIOW_15),
  548. GPIO_GROUP(GPIOW_16),
  549. GPIO_GROUP(GPIOD_0),
  550. GPIO_GROUP(GPIOD_1),
  551. GPIO_GROUP(GPIOD_2),
  552. GPIO_GROUP(GPIOD_3),
  553. GPIO_GROUP(GPIOD_4),
  554. GPIO_GROUP(GPIOD_5),
  555. GPIO_GROUP(GPIOD_6),
  556. GPIO_GROUP(GPIOD_7),
  557. GPIO_GROUP(GPIOD_8),
  558. GPIO_GROUP(GPIOD_9),
  559. GPIO_GROUP(GPIOD_10),
  560. GPIO_GROUP(GPIOD_11),
  561. GPIO_GROUP(GPIOD_12),
  562. GPIO_GROUP(GPIOE_0),
  563. GPIO_GROUP(GPIOE_1),
  564. GPIO_GROUP(GPIOE_2),
  565. GPIO_GROUP(GPIOE_3),
  566. GPIO_GROUP(GPIOE_4),
  567. GPIO_GROUP(GPIOE_5),
  568. GPIO_GROUP(GPIOE_6),
  569. GPIO_GROUP(GPIOZ_0),
  570. GPIO_GROUP(GPIOZ_1),
  571. GPIO_GROUP(GPIOZ_2),
  572. GPIO_GROUP(GPIOZ_3),
  573. GPIO_GROUP(GPIOZ_4),
  574. GPIO_GROUP(GPIOZ_5),
  575. GPIO_GROUP(GPIOZ_6),
  576. GPIO_GROUP(GPIOZ_7),
  577. GPIO_GROUP(GPIOZ_8),
  578. GPIO_GROUP(GPIOZ_9),
  579. GPIO_GROUP(GPIOZ_10),
  580. GPIO_GROUP(GPIOZ_11),
  581. GPIO_GROUP(GPIOZ_12),
  582. GPIO_GROUP(GPIOZ_13),
  583. GPIO_GROUP(GPIOT_0),
  584. GPIO_GROUP(GPIOT_1),
  585. GPIO_GROUP(GPIOT_2),
  586. GPIO_GROUP(GPIOT_3),
  587. GPIO_GROUP(GPIOT_4),
  588. GPIO_GROUP(GPIOT_5),
  589. GPIO_GROUP(GPIOT_6),
  590. GPIO_GROUP(GPIOT_7),
  591. GPIO_GROUP(GPIOT_8),
  592. GPIO_GROUP(GPIOT_9),
  593. GPIO_GROUP(GPIOT_10),
  594. GPIO_GROUP(GPIOT_11),
  595. GPIO_GROUP(GPIOT_12),
  596. GPIO_GROUP(GPIOT_13),
  597. GPIO_GROUP(GPIOT_14),
  598. GPIO_GROUP(GPIOT_15),
  599. GPIO_GROUP(GPIOT_16),
  600. GPIO_GROUP(GPIOT_17),
  601. GPIO_GROUP(GPIOT_18),
  602. GPIO_GROUP(GPIOT_19),
  603. GPIO_GROUP(GPIOT_20),
  604. GPIO_GROUP(GPIOT_21),
  605. GPIO_GROUP(GPIOT_22),
  606. GPIO_GROUP(GPIOT_23),
  607. GPIO_GROUP(GPIOM_0),
  608. GPIO_GROUP(GPIOM_1),
  609. GPIO_GROUP(GPIOM_2),
  610. GPIO_GROUP(GPIOM_3),
  611. GPIO_GROUP(GPIOM_4),
  612. GPIO_GROUP(GPIOM_5),
  613. GPIO_GROUP(GPIOM_6),
  614. GPIO_GROUP(GPIOM_7),
  615. GPIO_GROUP(GPIOM_8),
  616. GPIO_GROUP(GPIOM_9),
  617. GPIO_GROUP(GPIOM_10),
  618. GPIO_GROUP(GPIOM_11),
  619. GPIO_GROUP(GPIOM_12),
  620. GPIO_GROUP(GPIOM_13),
  621. GPIO_GROUP(GPIOY_0),
  622. GPIO_GROUP(GPIOY_1),
  623. GPIO_GROUP(GPIOY_2),
  624. GPIO_GROUP(GPIOY_3),
  625. GPIO_GROUP(GPIOY_4),
  626. GPIO_GROUP(GPIOY_5),
  627. GPIO_GROUP(GPIOY_6),
  628. GPIO_GROUP(GPIOY_7),
  629. GPIO_GROUP(GPIOY_8),
  630. GPIO_GROUP(GPIOY_9),
  631. GPIO_GROUP(GPIOY_10),
  632. GPIO_GROUP(GPIOY_11),
  633. GPIO_GROUP(GPIOY_12),
  634. GPIO_GROUP(GPIOY_13),
  635. GPIO_GROUP(GPIOY_14),
  636. GPIO_GROUP(GPIOY_15),
  637. GPIO_GROUP(GPIOY_16),
  638. GPIO_GROUP(GPIOY_17),
  639. GPIO_GROUP(GPIOY_18),
  640. GPIO_GROUP(GPIOH_0),
  641. GPIO_GROUP(GPIOH_1),
  642. GPIO_GROUP(GPIOH_2),
  643. GPIO_GROUP(GPIOH_3),
  644. GPIO_GROUP(GPIOH_4),
  645. GPIO_GROUP(GPIOH_5),
  646. GPIO_GROUP(GPIOH_6),
  647. GPIO_GROUP(GPIOH_7),
  648. GPIO_GROUP(GPIO_TEST_N),
  649. /* Bank B func1 */
  650. GROUP(emmc_nand_d0, 1),
  651. GROUP(emmc_nand_d1, 1),
  652. GROUP(emmc_nand_d2, 1),
  653. GROUP(emmc_nand_d3, 1),
  654. GROUP(emmc_nand_d4, 1),
  655. GROUP(emmc_nand_d5, 1),
  656. GROUP(emmc_nand_d6, 1),
  657. GROUP(emmc_nand_d7, 1),
  658. GROUP(emmc_clk, 1),
  659. GROUP(emmc_cmd, 1),
  660. GROUP(emmc_nand_ds, 1),
  661. /* Bank B func1 */
  662. GROUP(nor_hold, 2),
  663. GROUP(nor_d, 2),
  664. GROUP(nor_q, 2),
  665. GROUP(nor_c, 2),
  666. GROUP(nor_wp, 2),
  667. GROUP(nor_cs, 2),
  668. /* Bank C func1 */
  669. GROUP(sdcard_d0, 1),
  670. GROUP(sdcard_d1, 1),
  671. GROUP(sdcard_d2, 1),
  672. GROUP(sdcard_d3, 1),
  673. GROUP(sdcard_clk, 1),
  674. GROUP(sdcard_cmd, 1),
  675. GROUP(gen_clk_out_c, 1),
  676. /* Bank C func2 */
  677. GROUP(jtag_b_tdo, 2),
  678. GROUP(jtag_b_tdi, 2),
  679. GROUP(uart_ao_a_rx_c, 2),
  680. GROUP(uart_ao_a_tx_c, 2),
  681. GROUP(jtag_b_clk, 2),
  682. GROUP(jtag_b_tms, 2),
  683. /* Bank C func3 */
  684. GROUP(spi1_mosi_c, 3),
  685. GROUP(spi1_miso_c, 3),
  686. GROUP(spi1_sclk_c, 3),
  687. GROUP(spi1_ss0_c, 3),
  688. /* Bank X func1 */
  689. GROUP(sdio_d0, 1),
  690. GROUP(sdio_d1, 1),
  691. GROUP(sdio_d2, 1),
  692. GROUP(sdio_d3, 1),
  693. GROUP(sdio_clk, 1),
  694. GROUP(sdio_cmd, 1),
  695. GROUP(pwm_b, 1),
  696. GROUP(pwm_c, 1),
  697. GROUP(tdm_d0, 1),
  698. GROUP(tdm_d1, 1),
  699. GROUP(tdm_fs0, 1),
  700. GROUP(tdm_sclk0, 1),
  701. GROUP(uart_c_tx, 1),
  702. GROUP(uart_c_rx, 1),
  703. GROUP(uart_c_cts, 1),
  704. GROUP(uart_c_rts, 1),
  705. GROUP(pwm_a, 1),
  706. GROUP(i2c2_sda_x, 1),
  707. GROUP(i2c2_sck_x, 1),
  708. GROUP(pwm_d, 1),
  709. /* Bank X func2 */
  710. GROUP(clk12_24_x, 2),
  711. /* Bank W func1 */
  712. GROUP(hdmirx_a_hpd, 1),
  713. GROUP(hdmirx_a_det, 1),
  714. GROUP(hdmirx_a_sda, 1),
  715. GROUP(hdmirx_a_sck, 1),
  716. GROUP(hdmirx_c_hpd, 1),
  717. GROUP(hdmirx_c_det, 1),
  718. GROUP(hdmirx_c_sda, 1),
  719. GROUP(hdmirx_c_sck, 1),
  720. GROUP(hdmirx_b_hpd, 1),
  721. GROUP(hdmirx_b_det, 1),
  722. GROUP(hdmirx_b_sda, 1),
  723. GROUP(hdmirx_b_sck, 1),
  724. GROUP(cec_a, 1),
  725. GROUP(hdmitx_sda_w13, 1),
  726. GROUP(hdmitx_sck_w14, 1),
  727. GROUP(hdmitx_hpd_in, 1),
  728. GROUP(cec_b, 1),
  729. /* Bank W func2 */
  730. GROUP(uart_ao_a_tx_w2, 2),
  731. GROUP(uart_ao_a_rx_w3, 2),
  732. GROUP(uart_ao_a_tx_w6, 2),
  733. GROUP(uart_ao_a_rx_w7, 2),
  734. GROUP(uart_ao_a_tx_w10, 2),
  735. GROUP(uart_ao_a_rx_w11, 2),
  736. /* Bank W func3 */
  737. GROUP(hdmitx_sda_w2, 3),
  738. GROUP(hdmitx_sck_w3, 3),
  739. /* Bank D func1 */
  740. GROUP(uart_ao_a_tx_d0, 1),
  741. GROUP(uart_ao_a_rx_d1, 1),
  742. GROUP(i2c0_ao_sck_d, 1),
  743. GROUP(i2c0_ao_sda_d, 1),
  744. GROUP(remote_out_d4, 1),
  745. GROUP(remote_in, 1),
  746. GROUP(jtag_a_clk, 1),
  747. GROUP(jtag_a_tms, 1),
  748. GROUP(jtag_a_tdi, 1),
  749. GROUP(jtag_a_tdo, 1),
  750. GROUP(gen_clk_out_d, 1),
  751. GROUP(pwm_ao_g_d11, 1),
  752. GROUP(wd_rsto, 1),
  753. /* Bank D func2 */
  754. GROUP(i2c0_slave_ao_sck, 2),
  755. GROUP(i2c0_slave_ao_sda, 2),
  756. GROUP(rtc_clk_in, 2),
  757. GROUP(pwm_ao_h_d5, 2),
  758. GROUP(pwm_ao_c_d, 2),
  759. GROUP(pwm_ao_g_d7, 2),
  760. GROUP(spdif_out_d, 2),
  761. GROUP(spdif_in_d, 2),
  762. GROUP(pwm_ao_h_d10, 2),
  763. /* Bank D func3 */
  764. GROUP(uart_ao_b_tx, 3),
  765. GROUP(uart_ao_b_rx, 3),
  766. GROUP(uart_ao_b_cts, 3),
  767. GROUP(pwm_ao_c_hiz, 3),
  768. GROUP(pwm_ao_g_hiz, 3),
  769. GROUP(uart_ao_b_rts, 3),
  770. /* Bank D func4 */
  771. GROUP(remote_out_d6, 4),
  772. /* Bank E func1 */
  773. GROUP(pwm_ao_a, 1),
  774. GROUP(pwm_ao_b, 1),
  775. GROUP(pwm_ao_c_e, 1),
  776. GROUP(pwm_ao_d, 1),
  777. GROUP(pwm_ao_e, 1),
  778. GROUP(pwm_ao_f, 1),
  779. GROUP(pwm_ao_g_e, 1),
  780. /* Bank E func2 */
  781. GROUP(i2c0_ao_sck_e, 2),
  782. GROUP(i2c0_ao_sda_e, 2),
  783. GROUP(clk25m, 2),
  784. GROUP(i2c1_ao_sck, 2),
  785. GROUP(i2c1_ao_sda, 2),
  786. GROUP(rtc_clk_out, 2),
  787. /* Bank E func3 */
  788. GROUP(clk12_24_e, 3),
  789. /* Bank Z func1 */
  790. GROUP(eth_mdio, 1),
  791. GROUP(eth_mdc, 1),
  792. GROUP(eth_rgmii_rx_clk, 1),
  793. GROUP(eth_rx_dv, 1),
  794. GROUP(eth_rxd0, 1),
  795. GROUP(eth_rxd1, 1),
  796. GROUP(eth_rxd2_rgmii, 1),
  797. GROUP(eth_rxd3_rgmii, 1),
  798. GROUP(eth_rgmii_tx_clk, 1),
  799. GROUP(eth_txen, 1),
  800. GROUP(eth_txd0, 1),
  801. GROUP(eth_txd1, 1),
  802. GROUP(eth_txd2_rgmii, 1),
  803. GROUP(eth_txd3_rgmii, 1),
  804. /* Bank Z func2 */
  805. GROUP(iso7816_clk_z, 2),
  806. GROUP(iso7816_data_z, 2),
  807. GROUP(tsin_b_valid, 2),
  808. GROUP(tsin_b_sop, 2),
  809. GROUP(tsin_b_din0, 2),
  810. GROUP(tsin_b_clk, 2),
  811. GROUP(tsin_b_fail, 2),
  812. GROUP(tsin_b_din1, 2),
  813. GROUP(tsin_b_din2, 2),
  814. GROUP(tsin_b_din3, 2),
  815. GROUP(tsin_b_din4, 2),
  816. GROUP(tsin_b_din5, 2),
  817. GROUP(tsin_b_din6, 2),
  818. GROUP(tsin_b_din7, 2),
  819. /* Bank Z func3 */
  820. GROUP(tsin_c_z_valid, 3),
  821. GROUP(tsin_c_z_sop, 3),
  822. GROUP(tsin_c_z_din0, 3),
  823. GROUP(tsin_c_z_clk, 3),
  824. GROUP(tsin_d_z_valid, 3),
  825. GROUP(tsin_d_z_sop, 3),
  826. GROUP(tsin_d_z_din0, 3),
  827. GROUP(tsin_d_z_clk, 3),
  828. /* Bank Z func4 */
  829. GROUP(spi4_mosi, 4),
  830. GROUP(spi4_miso, 4),
  831. GROUP(spi4_sclk, 4),
  832. GROUP(spi4_ss0, 4),
  833. GROUP(spi5_mosi, 4),
  834. GROUP(spi5_miso, 4),
  835. GROUP(spi5_sclk, 4),
  836. GROUP(spi5_ss0, 4),
  837. /* Bank T func1 */
  838. GROUP(mclk1, 1),
  839. GROUP(tdm_sclk1, 1),
  840. GROUP(tdm_fs1, 1),
  841. GROUP(tdm_d2, 1),
  842. GROUP(tdm_d3, 1),
  843. GROUP(tdm_d4, 1),
  844. GROUP(tdm_d5, 1),
  845. GROUP(tdm_d6, 1),
  846. GROUP(tdm_d7, 1),
  847. GROUP(tdm_d8, 1),
  848. GROUP(tdm_d9, 1),
  849. GROUP(tdm_d10, 1),
  850. GROUP(tdm_d11, 1),
  851. GROUP(mclk2, 1),
  852. GROUP(tdm_sclk2, 1),
  853. GROUP(tdm_fs2, 1),
  854. GROUP(i2c1_sck, 1),
  855. GROUP(i2c1_sda, 1),
  856. GROUP(spi0_mosi, 1),
  857. GROUP(spi0_miso, 1),
  858. GROUP(spi0_sclk, 1),
  859. GROUP(spi0_ss0, 1),
  860. GROUP(spi0_ss1, 1),
  861. GROUP(spi0_ss2, 1),
  862. /* Bank T func2 */
  863. GROUP(spdif_in_t, 2),
  864. GROUP(spdif_out_t, 2),
  865. GROUP(iso7816_clk_t, 2),
  866. GROUP(iso7816_data_t, 2),
  867. GROUP(tsin_a_sop_t, 2),
  868. GROUP(tsin_a_din0_t, 2),
  869. GROUP(tsin_a_clk_t, 2),
  870. GROUP(tsin_a_valid_t, 2),
  871. GROUP(i2c0_sck_t, 2),
  872. GROUP(i2c0_sda_t, 2),
  873. GROUP(i2c2_sck_t, 2),
  874. GROUP(i2c2_sda_t, 2),
  875. /* Bank T func3 */
  876. GROUP(spi3_mosi, 3),
  877. GROUP(spi3_miso, 3),
  878. GROUP(spi3_sclk, 3),
  879. GROUP(spi3_ss0, 3),
  880. /* Bank M func1 */
  881. GROUP(tdm_d12, 1),
  882. GROUP(tdm_d13, 1),
  883. GROUP(tdm_d14, 1),
  884. GROUP(tdm_d15, 1),
  885. GROUP(tdm_sclk3, 1),
  886. GROUP(tdm_fs3, 1),
  887. GROUP(i2c3_sda_m, 1),
  888. GROUP(i2c3_sck_m, 1),
  889. GROUP(spi1_mosi_m, 1),
  890. GROUP(spi1_miso_m, 1),
  891. GROUP(spi1_sclk_m, 1),
  892. GROUP(spi1_ss0_m, 1),
  893. GROUP(spi1_ss1_m, 1),
  894. GROUP(spi1_ss2_m, 1),
  895. /* Bank M func2 */
  896. GROUP(pdm_din1_m0, 2),
  897. GROUP(pdm_din2, 2),
  898. GROUP(pdm_din3, 2),
  899. GROUP(pdm_dclk, 2),
  900. GROUP(pdm_din0, 2),
  901. GROUP(pdm_din1_m5, 2),
  902. GROUP(uart_d_tx_m, 2),
  903. GROUP(uart_d_rx_m, 2),
  904. GROUP(uart_d_cts_m, 2),
  905. GROUP(uart_d_rts_m, 2),
  906. GROUP(i2c2_sda_m, 2),
  907. GROUP(i2c2_sck_m, 2),
  908. /* Bank Y func1 */
  909. GROUP(spi2_mosi, 1),
  910. GROUP(spi2_miso, 1),
  911. GROUP(spi2_sclk, 1),
  912. GROUP(spi2_ss0, 1),
  913. GROUP(spi2_ss1, 1),
  914. GROUP(spi2_ss2, 1),
  915. GROUP(uart_e_tx, 1),
  916. GROUP(uart_e_rx, 1),
  917. GROUP(uart_e_cts, 1),
  918. GROUP(uart_e_rts, 1),
  919. GROUP(uart_d_cts_y, 1),
  920. GROUP(uart_d_rts_y, 1),
  921. GROUP(uart_d_tx_y, 1),
  922. GROUP(uart_d_rx_y, 1),
  923. GROUP(i2c4_sck_y, 1),
  924. GROUP(i2c4_sda_y, 1),
  925. GROUP(i2c5_sck, 1),
  926. GROUP(i2c5_sda, 1),
  927. /* Bank Y func2 */
  928. GROUP(tsin_c_y_sop, 2),
  929. GROUP(tsin_c_y_din0, 2),
  930. GROUP(tsin_c_y_clk, 2),
  931. GROUP(tsin_c_y_valid, 2),
  932. GROUP(tsin_d_y_sop, 2),
  933. GROUP(tsin_d_y_din0, 2),
  934. GROUP(tsin_d_y_clk, 2),
  935. GROUP(tsin_d_y_valid, 2),
  936. GROUP(pcieck_reqn_y, 2),
  937. /* Bank Y func3 */
  938. GROUP(pwm_e, 3),
  939. GROUP(hsync, 3),
  940. GROUP(vsync, 3),
  941. GROUP(pwm_f, 3),
  942. GROUP(sync_3d_out, 3),
  943. GROUP(vx1_a_htpdn, 3),
  944. GROUP(vx1_b_htpdn, 3),
  945. GROUP(vx1_a_lockn, 3),
  946. GROUP(vx1_b_lockn, 3),
  947. GROUP(pwm_vs_y, 3),
  948. /* Bank Y func4 */
  949. GROUP(edp_a_hpd, 4),
  950. GROUP(edp_b_hpd, 4),
  951. /* Bank H func1 */
  952. GROUP(mic_mute_key, 1),
  953. GROUP(mic_mute_led, 1),
  954. GROUP(i2c3_sck_h, 1),
  955. GROUP(i2c3_sda_h, 1),
  956. GROUP(i2c4_sck_h, 1),
  957. GROUP(i2c4_sda_h, 1),
  958. GROUP(eth_link_led, 1),
  959. GROUP(eth_act_led, 1),
  960. /* Bank H func2 */
  961. GROUP(pwm_vs_h, 2),
  962. GROUP(uart_f_tx, 2),
  963. GROUP(uart_f_rx, 2),
  964. GROUP(uart_f_cts, 2),
  965. GROUP(uart_f_rts, 2),
  966. GROUP(i2c0_sda_h, 2),
  967. GROUP(i2c0_sck_h, 2),
  968. /* Bank H func3 */
  969. GROUP(pcieck_reqn_h, 3),
  970. };
  971. static const char * const gpio_periphs_groups[] = {
  972. "GPIOB_0", "GPIOB_1", "GPIOB_2", "GPIOB_3", "GPIOB_4", "GPIOB_5",
  973. "GPIOB_6", "GPIOB_7", "GPIOB_8", "GPIOB_9", "GPIOB_10",
  974. "GPIOB_11", "GPIOB_12",
  975. "GPIOC_0", "GPIOC_1", "GPIOC_2", "GPIOC_3", "GPIOC_4", "GPIOC_5",
  976. "GPIOC_6",
  977. "GPIOX_0", "GPIOX_1", "GPIOX_2", "GPIOX_3", "GPIOX_4", "GPIOX_5",
  978. "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9", "GPIOX_10", "GPIOX_11",
  979. "GPIOX_12", "GPIOX_13", "GPIOX_14", "GPIOX_15", "GPIOX_16", "GPIOX_17",
  980. "GPIOX_18", "GPIOX_19",
  981. "GPIOW_0", "GPIOW_1", "GPIOW_2", "GPIOW_3", "GPIOW_4", "GPIOW_5",
  982. "GPIOW_6", "GPIOW_7", "GPIOW_8", "GPIOW_9", "GPIOW_10", "GPIOW_11",
  983. "GPIOW_12", "GPIOW_13", "GPIOW_14", "GPIOW_15", "GPIOW_16",
  984. "GPIOD_0", "GPIOD_1", "GPIOD_2", "GPIOD_3", "GPIOD_4", "GPIOD_5",
  985. "GPIOD_6", "GPIOD_7", "GPIOD_8", "GPIOD_9", "GPIOD_10", "GPIOD_11",
  986. "GPIOD_12",
  987. "GPIOE_0", "GPIOE_1", "GPIOE_2", "GPIOE_3", "GPIOE_4", "GPIOE_5",
  988. "GPIOE_6",
  989. "GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4", "GPIOZ_5",
  990. "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9", "GPIOZ_10", "GPIOZ_11",
  991. "GPIOZ_12", "GPIOZ_13",
  992. "GPIOT_0", "GPIOT_1", "GPIOT_2", "GPIOT_3", "GPIOT_4", "GPIOT_5",
  993. "GPIOT_6", "GPIOT_7", "GPIOT_8", "GPIOT_9", "GPIOT_10", "GPIOT_11",
  994. "GPIOT_12", "GPIOT_13", "GPIOT_14", "GPIOT_15", "GPIOT_16",
  995. "GPIOT_17", "GPIOT_18", "GPIOT_19", "GPIOT_20", "GPIOT_21",
  996. "GPIOT_22", "GPIOT_23",
  997. "GPIOM_0", "GPIOM_1", "GPIOM_2", "GPIOM_3", "GPIOM_4", "GPIOM_5",
  998. "GPIOM_6", "GPIOM_7", "GPIOM_8", "GPIOM_9", "GPIOM_10", "GPIOM_11",
  999. "GPIOM_12", "GPIOM_13",
  1000. "GPIOY_0", "GPIOY_1", "GPIOY_2", "GPIOY_3", "GPIOY_4", "GPIOY_5",
  1001. "GPIOY_6", "GPIOY_7", "GPIOY_8", "GPIOY_9", "GPIOY_10", "GPIOY_11",
  1002. "GPIOY_12", "GPIOY_13", "GPIOY_14", "GPIOY_15", "GPIOY_16",
  1003. "GPIOY_17", "GPIOY_18",
  1004. "GPIOH_0", "GPIOH_1", "GPIOH_2", "GPIOH_3", "GPIOH_4", "GPIOH_5",
  1005. "GPIOH_6", "GPIOH_7",
  1006. "GPIO_TEST_N",
  1007. };
  1008. static const char * const emmc_groups[] = {
  1009. "emmc_nand_d0", "emmc_nand_d1", "emmc_nand_d2", "emmc_nand_d3",
  1010. "emmc_nand_d4", "emmc_nand_d5", "emmc_nand_d6", "emmc_nand_d7",
  1011. "emmc_clk", "emmc_cmd", "emmc_nand_ds",
  1012. };
  1013. static const char * const nor_groups[] = {
  1014. "nor_hold", "nor_d", "nor_q", "nor_c", "nor_wp", "nor_cs",
  1015. };
  1016. static const char * const sdcard_groups[] = {
  1017. "sdcard_d0", "sdcard_d1", "sdcard_d2", "sdcard_d3", "sdcard_clk",
  1018. "sdcard_cmd",
  1019. };
  1020. static const char * const sdio_groups[] = {
  1021. "sdio_d0", "sdio_d1", "sdio_d2", "sdio_d3", "sdio_clk", "sdio_cmd",
  1022. };
  1023. static const char * const gen_clk_groups[] = {
  1024. "gen_clk_out_c", "gen_clk_out_d",
  1025. };
  1026. static const char * const jtag_a_groups[] = {
  1027. "jtag_a_clk", "jtag_a_tms", "jtag_a_tdi", "jtag_a_tdo",
  1028. };
  1029. static const char * const jtag_b_groups[] = {
  1030. "jtag_b_tdo", "jtag_b_tdi", "jtag_b_clk", "jtag_b_tms",
  1031. };
  1032. static const char * const uart_c_groups[] = {
  1033. "uart_c_tx", "uart_c_rx", "uart_c_cts", "uart_c_rts",
  1034. };
  1035. static const char * const uart_d_groups[] = {
  1036. "uart_d_tx_m", "uart_d_rx_m", "uart_d_cts_m", "uart_d_rts_m",
  1037. "uart_d_rts_y", "uart_d_tx_y", "uart_d_rx_y", "uart_d_cts_y",
  1038. };
  1039. static const char * const uart_e_groups[] = {
  1040. "uart_e_tx", "uart_e_rx", "uart_e_cts", "uart_e_rts",
  1041. };
  1042. static const char * const uart_f_groups[] = {
  1043. "uart_f_tx", "uart_f_rx", "uart_f_cts", "uart_f_rts",
  1044. };
  1045. static const char * const uart_ao_a_groups[] = {
  1046. "uart_ao_a_rx_c", "uart_ao_a_tx_c", "uart_ao_a_tx_w2",
  1047. "uart_ao_a_rx_w3", "uart_ao_a_tx_w6", "uart_ao_a_rx_w7",
  1048. "uart_ao_a_tx_w10", "uart_ao_a_rx_w11", "uart_ao_a_tx_d0",
  1049. "uart_ao_a_rx_d1",
  1050. };
  1051. static const char * const uart_ao_b_groups[] = {
  1052. "uart_ao_b_tx", "uart_ao_b_rx", "uart_ao_b_cts", "uart_ao_b_rts",
  1053. };
  1054. static const char * const spi0_groups[] = {
  1055. "spi0_mosi", "spi0_miso", "spi0_sclk", "spi0_ss0", "spi0_ss1",
  1056. "spi0_ss2",
  1057. };
  1058. static const char * const spi1_groups[] = {
  1059. "spi1_mosi_c", "spi1_miso_c", "spi1_sclk_c", "spi1_ss0_c",
  1060. "spi1_mosi_m", "spi1_miso_m", "spi1_sclk_m", "spi1_ss0_m",
  1061. "spi1_ss1_m", "spi1_ss2_m",
  1062. };
  1063. static const char * const spi2_groups[] = {
  1064. "spi2_mosi", "spi2_miso", "spi2_sclk", "spi2_ss0", "spi2_ss1",
  1065. "spi2_ss2",
  1066. };
  1067. static const char * const spi3_groups[] = {
  1068. "spi3_mosi", "spi3_miso", "spi3_sclk", "spi3_ss0",
  1069. };
  1070. static const char * const spi4_groups[] = {
  1071. "spi4_mosi", "spi4_miso", "spi4_sclk", "spi4_ss0",
  1072. };
  1073. static const char * const spi5_groups[] = {
  1074. "spi5_mosi", "spi5_miso", "spi5_sclk", "spi5_ss0",
  1075. };
  1076. static const char * const pwm_a_groups[] = {
  1077. "pwm_a",
  1078. };
  1079. static const char * const pwm_b_groups[] = {
  1080. "pwm_b",
  1081. };
  1082. static const char * const pwm_c_groups[] = {
  1083. "pwm_c",
  1084. };
  1085. static const char * const pwm_d_groups[] = {
  1086. "pwm_d",
  1087. };
  1088. static const char * const pwm_e_groups[] = {
  1089. "pwm_e",
  1090. };
  1091. static const char * const pwm_f_groups[] = {
  1092. "pwm_f",
  1093. };
  1094. static const char * const pwm_ao_c_hiz_groups[] = {
  1095. "pwm_ao_c_hiz",
  1096. };
  1097. static const char * const pwm_ao_g_hiz_groups[] = {
  1098. "pwm_ao_g_hiz",
  1099. };
  1100. static const char * const pwm_ao_a_groups[] = {
  1101. "pwm_ao_a",
  1102. };
  1103. static const char * const pwm_ao_b_groups[] = {
  1104. "pwm_ao_b",
  1105. };
  1106. static const char * const pwm_ao_c_groups[] = {
  1107. "pwm_ao_c_d", "pwm_ao_c_e",
  1108. };
  1109. static const char * const pwm_ao_d_groups[] = {
  1110. "pwm_ao_d",
  1111. };
  1112. static const char * const pwm_ao_e_groups[] = {
  1113. "pwm_ao_e",
  1114. };
  1115. static const char * const pwm_ao_f_groups[] = {
  1116. "pwm_ao_f",
  1117. };
  1118. static const char * const pwm_ao_h_groups[] = {
  1119. "pwm_ao_h_d5", "pwm_ao_h_d10",
  1120. };
  1121. static const char * const pwm_ao_g_groups[] = {
  1122. "pwm_ao_g_d11", "pwm_ao_g_d7", "pwm_ao_g_e",
  1123. };
  1124. static const char * const pwm_vs_groups[] = {
  1125. "pwm_vs_y", "pwm_vs_h",
  1126. };
  1127. static const char * const tdm_groups[] = {
  1128. "tdm_d0", "tdm_d1", "tdm_fs0", "tdm_sclk0", "tdm_sclk1", "tdm_fs1",
  1129. "tdm_d2", "tdm_d3", "tdm_d4", "tdm_d5", "tdm_d6", "tdm_d7",
  1130. "tdm_d8", "tdm_d9", "tdm_d10", "tdm_d11", "tdm_sclk2", "tdm_fs2",
  1131. "tdm_d12", "tdm_d13", "tdm_d14", "tdm_d15", "tdm_sclk3", "tdm_fs3",
  1132. };
  1133. static const char * const i2c0_slave_ao_groups[] = {
  1134. "i2c0_slave_ao_sck", "i2c0_slave_ao_sda",
  1135. };
  1136. static const char * const i2c0_ao_groups[] = {
  1137. "i2c0_ao_sck_d", "i2c0_ao_sda_d",
  1138. "i2c0_ao_sck_e", "i2c0_ao_sda_e",
  1139. };
  1140. static const char * const i2c1_ao_groups[] = {
  1141. "i2c1_ao_sck", "i2c1_ao_sda",
  1142. };
  1143. static const char * const i2c0_groups[] = {
  1144. "i2c0_sck_t", "i2c0_sda_t", "i2c0_sck_h", "i2c0_sda_h",
  1145. };
  1146. static const char * const i2c1_groups[] = {
  1147. "i2c1_sck", "i2c1_sda",
  1148. };
  1149. static const char * const i2c2_groups[] = {
  1150. "i2c2_sda_x", "i2c2_sck_x",
  1151. "i2c2_sda_t", "i2c2_sck_t",
  1152. "i2c2_sda_m", "i2c2_sck_m",
  1153. };
  1154. static const char * const i2c3_groups[] = {
  1155. "i2c3_sda_m", "i2c3_sck_m", "i2c3_sck_h", "i2c3_sda_h",
  1156. };
  1157. static const char * const i2c4_groups[] = {
  1158. "i2c4_sck_y", "i2c4_sda_y", "i2c4_sck_h", "i2c4_sda_h",
  1159. };
  1160. static const char * const i2c5_groups[] = {
  1161. "i2c5_sck", "i2c5_sda",
  1162. };
  1163. static const char * const clk12_24_groups[] = {
  1164. "clk12_24_x", "clk12_24_e",
  1165. };
  1166. static const char * const hdmirx_a_groups[] = {
  1167. "hdmirx_a_hpd", "hdmirx_a_det", "hdmirx_a_sda", "hdmirx_a_sck",
  1168. };
  1169. static const char * const hdmirx_b_groups[] = {
  1170. "hdmirx_b_hpd", "hdmirx_b_det", "hdmirx_b_sda", "hdmirx_b_sck",
  1171. };
  1172. static const char * const hdmirx_c_groups[] = {
  1173. "hdmirx_c_hpd", "hdmirx_c_det", "hdmirx_c_sda", "hdmirx_c_sck",
  1174. };
  1175. static const char * const cec_a_groups[] = {
  1176. "cec_a",
  1177. };
  1178. static const char * const cec_b_groups[] = {
  1179. "cec_b",
  1180. };
  1181. static const char * const hdmitx_groups[] = {
  1182. "hdmitx_sda_w13", "hdmitx_sck_w14", "hdmitx_hpd_in",
  1183. "hdmitx_sda_w2", "hdmitx_sck_w3",
  1184. };
  1185. static const char * const remote_out_groups[] = {
  1186. "remote_out_d4", "remote_out_d6",
  1187. };
  1188. static const char * const remote_in_groups[] = {
  1189. "remote_in",
  1190. };
  1191. static const char * const wd_rsto_groups[] = {
  1192. "wd_rsto",
  1193. };
  1194. static const char * const rtc_clk_groups[] = {
  1195. "rtc_clk_in", "rtc_clk_out",
  1196. };
  1197. static const char * const spdif_out_groups[] = {
  1198. "spdif_out_d", "spdif_out_t",
  1199. };
  1200. static const char * const spdif_in_groups[] = {
  1201. "spdif_in_d", "spdif_in_t",
  1202. };
  1203. static const char * const clk25m_groups[] = {
  1204. "clk25m",
  1205. };
  1206. static const char * const eth_groups[] = {
  1207. "eth_mdio", "eth_mdc", "eth_rgmii_rx_clk", "eth_rx_dv", "eth_rxd0",
  1208. "eth_rxd1", "eth_rxd2_rgmii", "eth_rxd3_rgmii", "eth_rgmii_tx_clk",
  1209. "eth_txen", "eth_txd0", "eth_txd1", "eth_txd2_rgmii",
  1210. "eth_txd3_rgmii", "eth_link_led", "eth_act_led",
  1211. };
  1212. static const char * const iso7816_groups[] = {
  1213. "iso7816_clk_z", "iso7816_data_z",
  1214. "iso7816_clk_t", "iso7816_data_t",
  1215. };
  1216. static const char * const tsin_a_groups[] = {
  1217. "tsin_a_sop_t", "tsin_a_din0_t", "tsin_a_clk_t", "tsin_a_valid_t",
  1218. };
  1219. static const char * const tsin_b_groups[] = {
  1220. "tsin_b_valid", "tsin_b_sop", "tsin_b_din0", "tsin_b_clk",
  1221. "tsin_b_fail", "tsin_b_din1", "tsin_b_din2", "tsin_b_din3",
  1222. "tsin_b_din4", "tsin_b_din5", "tsin_b_din6", "tsin_b_din7",
  1223. };
  1224. static const char * const tsin_c_groups[] = {
  1225. "tsin_c_z_valid", "tsin_c_z_sop", "tsin_c_z_din0", "tsin_c_z_clk",
  1226. "tsin_c_y_sop", "tsin_c_y_din0", "tsin_c_y_clk", "tsin_c_y_valid",
  1227. };
  1228. static const char * const tsin_d_groups[] = {
  1229. "tsin_d_z_valid", "tsin_d_z_sop", "tsin_d_z_din0", "tsin_d_z_clk",
  1230. "tsin_d_y_sop", "tsin_d_y_din0", "tsin_d_y_clk", "tsin_d_y_valid",
  1231. };
  1232. static const char * const mclk_groups[] = {
  1233. "mclk1", "mclk2",
  1234. };
  1235. static const char * const pdm_groups[] = {
  1236. "pdm_din1_m0", "pdm_din2", "pdm_din3", "pdm_dclk", "pdm_din0",
  1237. "pdm_din1_m5",
  1238. };
  1239. static const char * const pcieck_groups[] = {
  1240. "pcieck_reqn_y", "pcieck_reqn_h",
  1241. };
  1242. static const char * const hsync_groups[] = {
  1243. "hsync",
  1244. };
  1245. static const char * const vsync_groups[] = {
  1246. "vsync",
  1247. };
  1248. static const char * const sync_3d_groups[] = {
  1249. "sync_3d_out",
  1250. };
  1251. static const char * const vx1_a_groups[] = {
  1252. "vx1_a_htpdn", "vx1_a_lockn",
  1253. };
  1254. static const char * const vx1_b_groups[] = {
  1255. "vx1_b_htpdn", "vx1_b_lockn",
  1256. };
  1257. static const char * const edp_a_groups[] = {
  1258. "edp_a_hpd",
  1259. };
  1260. static const char * const edp_b_groups[] = {
  1261. "edp_b_hpd",
  1262. };
  1263. static const char * const mic_mute_groups[] = {
  1264. "mic_mute_key", "mic_mute_led",
  1265. };
  1266. static const struct meson_pmx_func t7_periphs_functions[] = {
  1267. FUNCTION(gpio_periphs),
  1268. FUNCTION(emmc),
  1269. FUNCTION(nor),
  1270. FUNCTION(sdcard),
  1271. FUNCTION(sdio),
  1272. FUNCTION(gen_clk),
  1273. FUNCTION(jtag_a),
  1274. FUNCTION(jtag_b),
  1275. FUNCTION(uart_c),
  1276. FUNCTION(uart_d),
  1277. FUNCTION(uart_e),
  1278. FUNCTION(uart_f),
  1279. FUNCTION(uart_ao_a),
  1280. FUNCTION(uart_ao_b),
  1281. FUNCTION(spi0),
  1282. FUNCTION(spi1),
  1283. FUNCTION(spi2),
  1284. FUNCTION(spi3),
  1285. FUNCTION(spi4),
  1286. FUNCTION(spi5),
  1287. FUNCTION(pwm_a),
  1288. FUNCTION(pwm_b),
  1289. FUNCTION(pwm_c),
  1290. FUNCTION(pwm_d),
  1291. FUNCTION(pwm_e),
  1292. FUNCTION(pwm_f),
  1293. FUNCTION(pwm_ao_c_hiz),
  1294. FUNCTION(pwm_ao_g_hiz),
  1295. FUNCTION(pwm_ao_a),
  1296. FUNCTION(pwm_ao_b),
  1297. FUNCTION(pwm_ao_c),
  1298. FUNCTION(pwm_ao_d),
  1299. FUNCTION(pwm_ao_e),
  1300. FUNCTION(pwm_ao_f),
  1301. FUNCTION(pwm_ao_h),
  1302. FUNCTION(pwm_ao_g),
  1303. FUNCTION(pwm_vs),
  1304. FUNCTION(tdm),
  1305. FUNCTION(i2c0_slave_ao),
  1306. FUNCTION(i2c0_ao),
  1307. FUNCTION(i2c1_ao),
  1308. FUNCTION(i2c0),
  1309. FUNCTION(i2c1),
  1310. FUNCTION(i2c2),
  1311. FUNCTION(i2c3),
  1312. FUNCTION(i2c4),
  1313. FUNCTION(i2c5),
  1314. FUNCTION(clk12_24),
  1315. FUNCTION(hdmirx_a),
  1316. FUNCTION(hdmirx_b),
  1317. FUNCTION(hdmirx_c),
  1318. FUNCTION(cec_a),
  1319. FUNCTION(cec_b),
  1320. FUNCTION(hdmitx),
  1321. FUNCTION(remote_out),
  1322. FUNCTION(remote_in),
  1323. FUNCTION(wd_rsto),
  1324. FUNCTION(rtc_clk),
  1325. FUNCTION(spdif_out),
  1326. FUNCTION(spdif_in),
  1327. FUNCTION(clk25m),
  1328. FUNCTION(eth),
  1329. FUNCTION(iso7816),
  1330. FUNCTION(tsin_a),
  1331. FUNCTION(tsin_b),
  1332. FUNCTION(tsin_c),
  1333. FUNCTION(tsin_d),
  1334. FUNCTION(mclk),
  1335. FUNCTION(pdm),
  1336. FUNCTION(pcieck),
  1337. FUNCTION(hsync),
  1338. FUNCTION(vsync),
  1339. FUNCTION(sync_3d),
  1340. FUNCTION(vx1_a),
  1341. FUNCTION(vx1_b),
  1342. FUNCTION(edp_a),
  1343. FUNCTION(edp_b),
  1344. FUNCTION(mic_mute),
  1345. };
  1346. static const struct meson_bank t7_periphs_banks[] = {
  1347. /* name first last irq pullen pull dir out in ds */
  1348. BANK_DS("D", GPIOD_0, GPIOD_12, 57, 69,
  1349. 0x03, 0, 0x04, 0, 0x02, 0, 0x01, 0, 0x00, 0, 0x07, 0),
  1350. BANK_DS("E", GPIOE_0, GPIOE_6, 70, 76,
  1351. 0x0b, 0, 0x0c, 0, 0x0a, 0, 0x09, 0, 0x08, 0, 0x0f, 0),
  1352. BANK_DS("Z", GPIOZ_0, GPIOZ_13, 77, 90,
  1353. 0x13, 0, 0x14, 0, 0x12, 0, 0x11, 0, 0x10, 0, 0x17, 0),
  1354. BANK_DS("H", GPIOH_0, GPIOH_7, 148, 155,
  1355. 0x1b, 0, 0x1c, 0, 0x1a, 0, 0x19, 0, 0x18, 0, 0x1f, 0),
  1356. BANK_DS("C", GPIOC_0, GPIOC_6, 13, 19,
  1357. 0x23, 0, 0x24, 0, 0x22, 0, 0x21, 0, 0x20, 0, 0x27, 0),
  1358. BANK_DS("B", GPIOB_0, GPIOB_12, 0, 12,
  1359. 0x2b, 0, 0x2c, 0, 0x2a, 0, 0x29, 0, 0x28, 0, 0x2f, 0),
  1360. BANK_DS("X", GPIOX_0, GPIOX_19, 20, 39,
  1361. 0x33, 0, 0x34, 0, 0x32, 0, 0x31, 0, 0x30, 0, 0x37, 0),
  1362. BANK_DS("T", GPIOT_0, GPIOT_23, 91, 114,
  1363. 0x43, 0, 0x44, 0, 0x42, 0, 0x41, 0, 0x40, 0, 0x47, 0),
  1364. BANK_DS("Y", GPIOY_0, GPIOY_18, 129, 147,
  1365. 0x53, 0, 0x54, 0, 0x52, 0, 0x51, 0, 0x50, 0, 0x57, 0),
  1366. BANK_DS("W", GPIOW_0, GPIOW_16, 40, 56,
  1367. 0x63, 0, 0x64, 0, 0x62, 0, 0x61, 0, 0x60, 0, 0x67, 0),
  1368. BANK_DS("M", GPIOM_0, GPIOM_13, 115, 128,
  1369. 0x73, 0, 0x74, 0, 0x72, 0, 0x71, 0, 0x70, 0, 0x77, 0),
  1370. BANK_DS("TEST_N", GPIO_TEST_N, GPIO_TEST_N, 156, 156,
  1371. 0x83, 0, 0x84, 0, 0x82, 0, 0x81, 0, 0x80, 0, 0x87, 0),
  1372. };
  1373. static const struct meson_pmx_bank t7_periphs_pmx_banks[] = {
  1374. /* name first last reg offset */
  1375. BANK_PMX("D", GPIOD_0, GPIOD_12, 0x0a, 0),
  1376. BANK_PMX("E", GPIOE_0, GPIOE_6, 0x0c, 0),
  1377. BANK_PMX("Z", GPIOZ_0, GPIOZ_13, 0x05, 0),
  1378. BANK_PMX("H", GPIOH_0, GPIOH_7, 0x08, 0),
  1379. BANK_PMX("C", GPIOC_0, GPIOC_6, 0x07, 0),
  1380. BANK_PMX("B", GPIOB_0, GPIOB_12, 0x00, 0),
  1381. BANK_PMX("X", GPIOX_0, GPIOX_19, 0x02, 0),
  1382. BANK_PMX("T", GPIOT_0, GPIOT_23, 0x0f, 0),
  1383. BANK_PMX("Y", GPIOY_0, GPIOY_18, 0x13, 0),
  1384. BANK_PMX("W", GPIOW_0, GPIOW_16, 0x16, 0),
  1385. BANK_PMX("M", GPIOM_0, GPIOM_13, 0x0d, 0),
  1386. BANK_PMX("TEST_N", GPIO_TEST_N, GPIO_TEST_N, 0x09, 0),
  1387. };
  1388. static const struct meson_axg_pmx_data t7_periphs_pmx_banks_data = {
  1389. .pmx_banks = t7_periphs_pmx_banks,
  1390. .num_pmx_banks = ARRAY_SIZE(t7_periphs_pmx_banks),
  1391. };
  1392. static const struct meson_pinctrl_data t7_periphs_pinctrl_data = {
  1393. .name = "periphs-banks",
  1394. .pins = t7_periphs_pins,
  1395. .groups = t7_periphs_groups,
  1396. .funcs = t7_periphs_functions,
  1397. .banks = t7_periphs_banks,
  1398. .num_pins = ARRAY_SIZE(t7_periphs_pins),
  1399. .num_groups = ARRAY_SIZE(t7_periphs_groups),
  1400. .num_funcs = ARRAY_SIZE(t7_periphs_functions),
  1401. .num_banks = ARRAY_SIZE(t7_periphs_banks),
  1402. .pmx_ops = &meson_axg_pmx_ops,
  1403. .pmx_data = &t7_periphs_pmx_banks_data,
  1404. .parse_dt = &meson_a1_parse_dt_extra,
  1405. };
  1406. static const struct of_device_id t7_pinctrl_dt_match[] = {
  1407. {
  1408. .compatible = "amlogic,t7-periphs-pinctrl",
  1409. .data = &t7_periphs_pinctrl_data,
  1410. },
  1411. { }
  1412. };
  1413. MODULE_DEVICE_TABLE(of, t7_pinctrl_dt_match);
  1414. static struct platform_driver t7_pinctrl_driver = {
  1415. .probe = meson_pinctrl_probe,
  1416. .driver = {
  1417. .name = "amlogic-t7-pinctrl",
  1418. .of_match_table = t7_pinctrl_dt_match,
  1419. },
  1420. };
  1421. module_platform_driver(t7_pinctrl_driver);
  1422. MODULE_AUTHOR("Huqiang Qin <huqiang.qin@amlogic.com>");
  1423. MODULE_DESCRIPTION("Pin controller and GPIO driver for Amlogic T7 SoC");
  1424. MODULE_LICENSE("Dual BSD/GPL");