pinctrl-brcmstb-bcm2712.c 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Driver for Broadcom brcmstb GPIO units (pinctrl only)
  4. *
  5. * Copyright (C) 2024-2025 Ivan T. Ivanov, Andrea della Porta
  6. * Copyright (C) 2021-3 Raspberry Pi Ltd.
  7. * Copyright (C) 2012 Chris Boot, Simon Arlott, Stephen Warren
  8. *
  9. * Based heavily on the BCM2835 GPIO & pinctrl driver, which was inspired by:
  10. * pinctrl-nomadik.c, please see original file for copyright information
  11. * pinctrl-tegra.c, please see original file for copyright information
  12. */
  13. #include <linux/pinctrl/pinctrl.h>
  14. #include <linux/of.h>
  15. #include "pinctrl-brcmstb.h"
  16. #define BRCMSTB_FSEL_COUNT 8
  17. #define BRCMSTB_FSEL_MASK 0xf
  18. #define BRCMSTB_PIN(i, f1, f2, f3, f4, f5, f6, f7, f8) \
  19. [i] = { \
  20. .funcs = (u8[]) { \
  21. func_##f1, \
  22. func_##f2, \
  23. func_##f3, \
  24. func_##f4, \
  25. func_##f5, \
  26. func_##f6, \
  27. func_##f7, \
  28. func_##f8, \
  29. }, \
  30. .n_funcs = BRCMSTB_FSEL_COUNT, \
  31. .func_mask = BRCMSTB_FSEL_MASK, \
  32. }
  33. enum bcm2712_funcs {
  34. func_gpio,
  35. func_alt1,
  36. func_alt2,
  37. func_alt3,
  38. func_alt4,
  39. func_alt5,
  40. func_alt6,
  41. func_alt7,
  42. func_alt8,
  43. func_aon_cpu_standbyb,
  44. func_aon_fp_4sec_resetb,
  45. func_aon_gpclk,
  46. func_aon_pwm,
  47. func_arm_jtag,
  48. func_aud_fs_clk0,
  49. func_avs_pmu_bsc,
  50. func_bsc_m0,
  51. func_bsc_m1,
  52. func_bsc_m2,
  53. func_bsc_m3,
  54. func_clk_observe,
  55. func_ctl_hdmi_5v,
  56. func_enet0,
  57. func_enet0_mii,
  58. func_enet0_rgmii,
  59. func_ext_sc_clk,
  60. func_fl0,
  61. func_fl1,
  62. func_gpclk0,
  63. func_gpclk1,
  64. func_gpclk2,
  65. func_hdmi_tx0_auto_i2c,
  66. func_hdmi_tx0_bsc,
  67. func_hdmi_tx1_auto_i2c,
  68. func_hdmi_tx1_bsc,
  69. func_i2s_in,
  70. func_i2s_out,
  71. func_ir_in,
  72. func_mtsif,
  73. func_mtsif_alt,
  74. func_mtsif_alt1,
  75. func_pdm,
  76. func_pkt,
  77. func_pm_led_out,
  78. func_sc0,
  79. func_sd0,
  80. func_sd2,
  81. func_sd_card_a,
  82. func_sd_card_b,
  83. func_sd_card_c,
  84. func_sd_card_d,
  85. func_sd_card_e,
  86. func_sd_card_f,
  87. func_sd_card_g,
  88. func_spdif_out,
  89. func_spi_m,
  90. func_spi_s,
  91. func_sr_edm_sense,
  92. func_te0,
  93. func_te1,
  94. func_tsio,
  95. func_uart0,
  96. func_uart1,
  97. func_uart2,
  98. func_usb_pwr,
  99. func_usb_vbus,
  100. func_uui,
  101. func_vc_i2c0,
  102. func_vc_i2c3,
  103. func_vc_i2c4,
  104. func_vc_i2c5,
  105. func_vc_i2csl,
  106. func_vc_pcm,
  107. func_vc_pwm0,
  108. func_vc_pwm1,
  109. func_vc_spi0,
  110. func_vc_spi3,
  111. func_vc_spi4,
  112. func_vc_spi5,
  113. func_vc_uart0,
  114. func_vc_uart2,
  115. func_vc_uart3,
  116. func_vc_uart4,
  117. func__,
  118. func_count = func__
  119. };
  120. static const struct pin_regs bcm2712_c0_gpio_pin_regs[] = {
  121. GPIO_REGS(0, 0, 0, 7, 7),
  122. GPIO_REGS(1, 0, 1, 7, 8),
  123. GPIO_REGS(2, 0, 2, 7, 9),
  124. GPIO_REGS(3, 0, 3, 7, 10),
  125. GPIO_REGS(4, 0, 4, 7, 11),
  126. GPIO_REGS(5, 0, 5, 7, 12),
  127. GPIO_REGS(6, 0, 6, 7, 13),
  128. GPIO_REGS(7, 0, 7, 7, 14),
  129. GPIO_REGS(8, 1, 0, 8, 0),
  130. GPIO_REGS(9, 1, 1, 8, 1),
  131. GPIO_REGS(10, 1, 2, 8, 2),
  132. GPIO_REGS(11, 1, 3, 8, 3),
  133. GPIO_REGS(12, 1, 4, 8, 4),
  134. GPIO_REGS(13, 1, 5, 8, 5),
  135. GPIO_REGS(14, 1, 6, 8, 6),
  136. GPIO_REGS(15, 1, 7, 8, 7),
  137. GPIO_REGS(16, 2, 0, 8, 8),
  138. GPIO_REGS(17, 2, 1, 8, 9),
  139. GPIO_REGS(18, 2, 2, 8, 10),
  140. GPIO_REGS(19, 2, 3, 8, 11),
  141. GPIO_REGS(20, 2, 4, 8, 12),
  142. GPIO_REGS(21, 2, 5, 8, 13),
  143. GPIO_REGS(22, 2, 6, 8, 14),
  144. GPIO_REGS(23, 2, 7, 9, 0),
  145. GPIO_REGS(24, 3, 0, 9, 1),
  146. GPIO_REGS(25, 3, 1, 9, 2),
  147. GPIO_REGS(26, 3, 2, 9, 3),
  148. GPIO_REGS(27, 3, 3, 9, 4),
  149. GPIO_REGS(28, 3, 4, 9, 5),
  150. GPIO_REGS(29, 3, 5, 9, 6),
  151. GPIO_REGS(30, 3, 6, 9, 7),
  152. GPIO_REGS(31, 3, 7, 9, 8),
  153. GPIO_REGS(32, 4, 0, 9, 9),
  154. GPIO_REGS(33, 4, 1, 9, 10),
  155. GPIO_REGS(34, 4, 2, 9, 11),
  156. GPIO_REGS(35, 4, 3, 9, 12),
  157. GPIO_REGS(36, 4, 4, 9, 13),
  158. GPIO_REGS(37, 4, 5, 9, 14),
  159. GPIO_REGS(38, 4, 6, 10, 0),
  160. GPIO_REGS(39, 4, 7, 10, 1),
  161. GPIO_REGS(40, 5, 0, 10, 2),
  162. GPIO_REGS(41, 5, 1, 10, 3),
  163. GPIO_REGS(42, 5, 2, 10, 4),
  164. GPIO_REGS(43, 5, 3, 10, 5),
  165. GPIO_REGS(44, 5, 4, 10, 6),
  166. GPIO_REGS(45, 5, 5, 10, 7),
  167. GPIO_REGS(46, 5, 6, 10, 8),
  168. GPIO_REGS(47, 5, 7, 10, 9),
  169. GPIO_REGS(48, 6, 0, 10, 10),
  170. GPIO_REGS(49, 6, 1, 10, 11),
  171. GPIO_REGS(50, 6, 2, 10, 12),
  172. GPIO_REGS(51, 6, 3, 10, 13),
  173. GPIO_REGS(52, 6, 4, 10, 14),
  174. GPIO_REGS(53, 6, 5, 11, 0),
  175. EMMC_REGS(54, 11, 1), /* EMMC_CMD */
  176. EMMC_REGS(55, 11, 2), /* EMMC_DS */
  177. EMMC_REGS(56, 11, 3), /* EMMC_CLK */
  178. EMMC_REGS(57, 11, 4), /* EMMC_DAT0 */
  179. EMMC_REGS(58, 11, 5), /* EMMC_DAT1 */
  180. EMMC_REGS(59, 11, 6), /* EMMC_DAT2 */
  181. EMMC_REGS(60, 11, 7), /* EMMC_DAT3 */
  182. EMMC_REGS(61, 11, 8), /* EMMC_DAT4 */
  183. EMMC_REGS(62, 11, 9), /* EMMC_DAT5 */
  184. EMMC_REGS(63, 11, 10), /* EMMC_DAT6 */
  185. EMMC_REGS(64, 11, 11), /* EMMC_DAT7 */
  186. };
  187. static struct pin_regs bcm2712_c0_aon_gpio_pin_regs[] = {
  188. AON_GPIO_REGS(0, 3, 0, 6, 10),
  189. AON_GPIO_REGS(1, 3, 1, 6, 11),
  190. AON_GPIO_REGS(2, 3, 2, 6, 12),
  191. AON_GPIO_REGS(3, 3, 3, 6, 13),
  192. AON_GPIO_REGS(4, 3, 4, 6, 14),
  193. AON_GPIO_REGS(5, 3, 5, 7, 0),
  194. AON_GPIO_REGS(6, 3, 6, 7, 1),
  195. AON_GPIO_REGS(7, 3, 7, 7, 2),
  196. AON_GPIO_REGS(8, 4, 0, 7, 3),
  197. AON_GPIO_REGS(9, 4, 1, 7, 4),
  198. AON_GPIO_REGS(10, 4, 2, 7, 5),
  199. AON_GPIO_REGS(11, 4, 3, 7, 6),
  200. AON_GPIO_REGS(12, 4, 4, 7, 7),
  201. AON_GPIO_REGS(13, 4, 5, 7, 8),
  202. AON_GPIO_REGS(14, 4, 6, 7, 9),
  203. AON_GPIO_REGS(15, 4, 7, 7, 10),
  204. AON_GPIO_REGS(16, 5, 0, 7, 11),
  205. AON_SGPIO_REGS(0, 0, 0),
  206. AON_SGPIO_REGS(1, 0, 1),
  207. AON_SGPIO_REGS(2, 0, 2),
  208. AON_SGPIO_REGS(3, 0, 3),
  209. AON_SGPIO_REGS(4, 1, 0),
  210. AON_SGPIO_REGS(5, 2, 0),
  211. };
  212. static const struct pinctrl_pin_desc bcm2712_c0_gpio_pins[] = {
  213. GPIO_PIN(0),
  214. GPIO_PIN(1),
  215. GPIO_PIN(2),
  216. GPIO_PIN(3),
  217. GPIO_PIN(4),
  218. GPIO_PIN(5),
  219. GPIO_PIN(6),
  220. GPIO_PIN(7),
  221. GPIO_PIN(8),
  222. GPIO_PIN(9),
  223. GPIO_PIN(10),
  224. GPIO_PIN(11),
  225. GPIO_PIN(12),
  226. GPIO_PIN(13),
  227. GPIO_PIN(14),
  228. GPIO_PIN(15),
  229. GPIO_PIN(16),
  230. GPIO_PIN(17),
  231. GPIO_PIN(18),
  232. GPIO_PIN(19),
  233. GPIO_PIN(20),
  234. GPIO_PIN(21),
  235. GPIO_PIN(22),
  236. GPIO_PIN(23),
  237. GPIO_PIN(24),
  238. GPIO_PIN(25),
  239. GPIO_PIN(26),
  240. GPIO_PIN(27),
  241. GPIO_PIN(28),
  242. GPIO_PIN(29),
  243. GPIO_PIN(30),
  244. GPIO_PIN(31),
  245. GPIO_PIN(32),
  246. GPIO_PIN(33),
  247. GPIO_PIN(34),
  248. GPIO_PIN(35),
  249. GPIO_PIN(36),
  250. GPIO_PIN(37),
  251. GPIO_PIN(38),
  252. GPIO_PIN(39),
  253. GPIO_PIN(40),
  254. GPIO_PIN(41),
  255. GPIO_PIN(42),
  256. GPIO_PIN(43),
  257. GPIO_PIN(44),
  258. GPIO_PIN(45),
  259. GPIO_PIN(46),
  260. GPIO_PIN(47),
  261. GPIO_PIN(48),
  262. GPIO_PIN(49),
  263. GPIO_PIN(50),
  264. GPIO_PIN(51),
  265. GPIO_PIN(52),
  266. GPIO_PIN(53),
  267. PINCTRL_PIN(54, "emmc_cmd"),
  268. PINCTRL_PIN(55, "emmc_ds"),
  269. PINCTRL_PIN(56, "emmc_clk"),
  270. PINCTRL_PIN(57, "emmc_dat0"),
  271. PINCTRL_PIN(58, "emmc_dat1"),
  272. PINCTRL_PIN(59, "emmc_dat2"),
  273. PINCTRL_PIN(60, "emmc_dat3"),
  274. PINCTRL_PIN(61, "emmc_dat4"),
  275. PINCTRL_PIN(62, "emmc_dat5"),
  276. PINCTRL_PIN(63, "emmc_dat6"),
  277. PINCTRL_PIN(64, "emmc_dat7"),
  278. };
  279. static struct pinctrl_pin_desc bcm2712_c0_aon_gpio_pins[] = {
  280. AON_GPIO_PIN(0), AON_GPIO_PIN(1), AON_GPIO_PIN(2), AON_GPIO_PIN(3),
  281. AON_GPIO_PIN(4), AON_GPIO_PIN(5), AON_GPIO_PIN(6), AON_GPIO_PIN(7),
  282. AON_GPIO_PIN(8), AON_GPIO_PIN(9), AON_GPIO_PIN(10), AON_GPIO_PIN(11),
  283. AON_GPIO_PIN(12), AON_GPIO_PIN(13), AON_GPIO_PIN(14), AON_GPIO_PIN(15),
  284. AON_GPIO_PIN(16), AON_SGPIO_PIN(0), AON_SGPIO_PIN(1), AON_SGPIO_PIN(2),
  285. AON_SGPIO_PIN(3), AON_SGPIO_PIN(4), AON_SGPIO_PIN(5),
  286. };
  287. static const struct pin_regs bcm2712_d0_gpio_pin_regs[] = {
  288. GPIO_REGS(1, 0, 0, 4, 5),
  289. GPIO_REGS(2, 0, 1, 4, 6),
  290. GPIO_REGS(3, 0, 2, 4, 7),
  291. GPIO_REGS(4, 0, 3, 4, 8),
  292. GPIO_REGS(10, 0, 4, 4, 9),
  293. GPIO_REGS(11, 0, 5, 4, 10),
  294. GPIO_REGS(12, 0, 6, 4, 11),
  295. GPIO_REGS(13, 0, 7, 4, 12),
  296. GPIO_REGS(14, 1, 0, 4, 13),
  297. GPIO_REGS(15, 1, 1, 4, 14),
  298. GPIO_REGS(18, 1, 2, 5, 0),
  299. GPIO_REGS(19, 1, 3, 5, 1),
  300. GPIO_REGS(20, 1, 4, 5, 2),
  301. GPIO_REGS(21, 1, 5, 5, 3),
  302. GPIO_REGS(22, 1, 6, 5, 4),
  303. GPIO_REGS(23, 1, 7, 5, 5),
  304. GPIO_REGS(24, 2, 0, 5, 6),
  305. GPIO_REGS(25, 2, 1, 5, 7),
  306. GPIO_REGS(26, 2, 2, 5, 8),
  307. GPIO_REGS(27, 2, 3, 5, 9),
  308. GPIO_REGS(28, 2, 4, 5, 10),
  309. GPIO_REGS(29, 2, 5, 5, 11),
  310. GPIO_REGS(30, 2, 6, 5, 12),
  311. GPIO_REGS(31, 2, 7, 5, 13),
  312. GPIO_REGS(32, 3, 0, 5, 14),
  313. GPIO_REGS(33, 3, 1, 6, 0),
  314. GPIO_REGS(34, 3, 2, 6, 1),
  315. GPIO_REGS(35, 3, 3, 6, 2),
  316. EMMC_REGS(36, 6, 3), /* EMMC_CMD */
  317. EMMC_REGS(37, 6, 4), /* EMMC_DS */
  318. EMMC_REGS(38, 6, 5), /* EMMC_CLK */
  319. EMMC_REGS(39, 6, 6), /* EMMC_DAT0 */
  320. EMMC_REGS(40, 6, 7), /* EMMC_DAT1 */
  321. EMMC_REGS(41, 6, 8), /* EMMC_DAT2 */
  322. EMMC_REGS(42, 6, 9), /* EMMC_DAT3 */
  323. EMMC_REGS(43, 6, 10), /* EMMC_DAT4 */
  324. EMMC_REGS(44, 6, 11), /* EMMC_DAT5 */
  325. EMMC_REGS(45, 6, 12), /* EMMC_DAT6 */
  326. EMMC_REGS(46, 6, 13), /* EMMC_DAT7 */
  327. };
  328. static struct pin_regs bcm2712_d0_aon_gpio_pin_regs[] = {
  329. AON_GPIO_REGS(0, 3, 0, 5, 9),
  330. AON_GPIO_REGS(1, 3, 1, 5, 10),
  331. AON_GPIO_REGS(2, 3, 2, 5, 11),
  332. AON_GPIO_REGS(3, 3, 3, 5, 12),
  333. AON_GPIO_REGS(4, 3, 4, 5, 13),
  334. AON_GPIO_REGS(5, 3, 5, 5, 14),
  335. AON_GPIO_REGS(6, 3, 6, 6, 0),
  336. AON_GPIO_REGS(8, 3, 7, 6, 1),
  337. AON_GPIO_REGS(9, 4, 0, 6, 2),
  338. AON_GPIO_REGS(12, 4, 1, 6, 3),
  339. AON_GPIO_REGS(13, 4, 2, 6, 4),
  340. AON_GPIO_REGS(14, 4, 3, 6, 5),
  341. AON_SGPIO_REGS(0, 0, 0),
  342. AON_SGPIO_REGS(1, 0, 1),
  343. AON_SGPIO_REGS(2, 0, 2),
  344. AON_SGPIO_REGS(3, 0, 3),
  345. AON_SGPIO_REGS(4, 1, 0),
  346. AON_SGPIO_REGS(5, 2, 0),
  347. };
  348. static const struct pinctrl_pin_desc bcm2712_d0_gpio_pins[] = {
  349. GPIO_PIN(1),
  350. GPIO_PIN(2),
  351. GPIO_PIN(3),
  352. GPIO_PIN(4),
  353. GPIO_PIN(10),
  354. GPIO_PIN(11),
  355. GPIO_PIN(12),
  356. GPIO_PIN(13),
  357. GPIO_PIN(14),
  358. GPIO_PIN(15),
  359. GPIO_PIN(18),
  360. GPIO_PIN(19),
  361. GPIO_PIN(20),
  362. GPIO_PIN(21),
  363. GPIO_PIN(22),
  364. GPIO_PIN(23),
  365. GPIO_PIN(24),
  366. GPIO_PIN(25),
  367. GPIO_PIN(26),
  368. GPIO_PIN(27),
  369. GPIO_PIN(28),
  370. GPIO_PIN(29),
  371. GPIO_PIN(30),
  372. GPIO_PIN(31),
  373. GPIO_PIN(32),
  374. GPIO_PIN(33),
  375. GPIO_PIN(34),
  376. GPIO_PIN(35),
  377. PINCTRL_PIN(36, "emmc_cmd"),
  378. PINCTRL_PIN(37, "emmc_ds"),
  379. PINCTRL_PIN(38, "emmc_clk"),
  380. PINCTRL_PIN(39, "emmc_dat0"),
  381. PINCTRL_PIN(40, "emmc_dat1"),
  382. PINCTRL_PIN(41, "emmc_dat2"),
  383. PINCTRL_PIN(42, "emmc_dat3"),
  384. PINCTRL_PIN(43, "emmc_dat4"),
  385. PINCTRL_PIN(44, "emmc_dat5"),
  386. PINCTRL_PIN(45, "emmc_dat6"),
  387. PINCTRL_PIN(46, "emmc_dat7"),
  388. };
  389. static struct pinctrl_pin_desc bcm2712_d0_aon_gpio_pins[] = {
  390. AON_GPIO_PIN(0), AON_GPIO_PIN(1), AON_GPIO_PIN(2), AON_GPIO_PIN(3),
  391. AON_GPIO_PIN(4), AON_GPIO_PIN(5), AON_GPIO_PIN(6), AON_GPIO_PIN(8),
  392. AON_GPIO_PIN(9), AON_GPIO_PIN(12), AON_GPIO_PIN(13), AON_GPIO_PIN(14),
  393. AON_SGPIO_PIN(0), AON_SGPIO_PIN(1), AON_SGPIO_PIN(2),
  394. AON_SGPIO_PIN(3), AON_SGPIO_PIN(4), AON_SGPIO_PIN(5),
  395. };
  396. static const char * const bcm2712_func_names[] = {
  397. BRCMSTB_FUNC(gpio),
  398. BRCMSTB_FUNC(alt1),
  399. BRCMSTB_FUNC(alt2),
  400. BRCMSTB_FUNC(alt3),
  401. BRCMSTB_FUNC(alt4),
  402. BRCMSTB_FUNC(alt5),
  403. BRCMSTB_FUNC(alt6),
  404. BRCMSTB_FUNC(alt7),
  405. BRCMSTB_FUNC(alt8),
  406. BRCMSTB_FUNC(aon_cpu_standbyb),
  407. BRCMSTB_FUNC(aon_fp_4sec_resetb),
  408. BRCMSTB_FUNC(aon_gpclk),
  409. BRCMSTB_FUNC(aon_pwm),
  410. BRCMSTB_FUNC(arm_jtag),
  411. BRCMSTB_FUNC(aud_fs_clk0),
  412. BRCMSTB_FUNC(avs_pmu_bsc),
  413. BRCMSTB_FUNC(bsc_m0),
  414. BRCMSTB_FUNC(bsc_m1),
  415. BRCMSTB_FUNC(bsc_m2),
  416. BRCMSTB_FUNC(bsc_m3),
  417. BRCMSTB_FUNC(clk_observe),
  418. BRCMSTB_FUNC(ctl_hdmi_5v),
  419. BRCMSTB_FUNC(enet0),
  420. BRCMSTB_FUNC(enet0_mii),
  421. BRCMSTB_FUNC(enet0_rgmii),
  422. BRCMSTB_FUNC(ext_sc_clk),
  423. BRCMSTB_FUNC(fl0),
  424. BRCMSTB_FUNC(fl1),
  425. BRCMSTB_FUNC(gpclk0),
  426. BRCMSTB_FUNC(gpclk1),
  427. BRCMSTB_FUNC(gpclk2),
  428. BRCMSTB_FUNC(hdmi_tx0_auto_i2c),
  429. BRCMSTB_FUNC(hdmi_tx0_bsc),
  430. BRCMSTB_FUNC(hdmi_tx1_auto_i2c),
  431. BRCMSTB_FUNC(hdmi_tx1_bsc),
  432. BRCMSTB_FUNC(i2s_in),
  433. BRCMSTB_FUNC(i2s_out),
  434. BRCMSTB_FUNC(ir_in),
  435. BRCMSTB_FUNC(mtsif),
  436. BRCMSTB_FUNC(mtsif_alt),
  437. BRCMSTB_FUNC(mtsif_alt1),
  438. BRCMSTB_FUNC(pdm),
  439. BRCMSTB_FUNC(pkt),
  440. BRCMSTB_FUNC(pm_led_out),
  441. BRCMSTB_FUNC(sc0),
  442. BRCMSTB_FUNC(sd0),
  443. BRCMSTB_FUNC(sd2),
  444. BRCMSTB_FUNC(sd_card_a),
  445. BRCMSTB_FUNC(sd_card_b),
  446. BRCMSTB_FUNC(sd_card_c),
  447. BRCMSTB_FUNC(sd_card_d),
  448. BRCMSTB_FUNC(sd_card_e),
  449. BRCMSTB_FUNC(sd_card_f),
  450. BRCMSTB_FUNC(sd_card_g),
  451. BRCMSTB_FUNC(spdif_out),
  452. BRCMSTB_FUNC(spi_m),
  453. BRCMSTB_FUNC(spi_s),
  454. BRCMSTB_FUNC(sr_edm_sense),
  455. BRCMSTB_FUNC(te0),
  456. BRCMSTB_FUNC(te1),
  457. BRCMSTB_FUNC(tsio),
  458. BRCMSTB_FUNC(uart0),
  459. BRCMSTB_FUNC(uart1),
  460. BRCMSTB_FUNC(uart2),
  461. BRCMSTB_FUNC(usb_pwr),
  462. BRCMSTB_FUNC(usb_vbus),
  463. BRCMSTB_FUNC(uui),
  464. BRCMSTB_FUNC(vc_i2c0),
  465. BRCMSTB_FUNC(vc_i2c3),
  466. BRCMSTB_FUNC(vc_i2c4),
  467. BRCMSTB_FUNC(vc_i2c5),
  468. BRCMSTB_FUNC(vc_i2csl),
  469. BRCMSTB_FUNC(vc_pcm),
  470. BRCMSTB_FUNC(vc_pwm0),
  471. BRCMSTB_FUNC(vc_pwm1),
  472. BRCMSTB_FUNC(vc_spi0),
  473. BRCMSTB_FUNC(vc_spi3),
  474. BRCMSTB_FUNC(vc_spi4),
  475. BRCMSTB_FUNC(vc_spi5),
  476. BRCMSTB_FUNC(vc_uart0),
  477. BRCMSTB_FUNC(vc_uart2),
  478. BRCMSTB_FUNC(vc_uart3),
  479. BRCMSTB_FUNC(vc_uart4),
  480. };
  481. static const struct brcmstb_pin_funcs bcm2712_c0_aon_gpio_pin_funcs[] = {
  482. BRCMSTB_PIN(0, ir_in, vc_spi0, vc_uart3, vc_i2c3, te0, vc_i2c0, _, _),
  483. BRCMSTB_PIN(1, vc_pwm0, vc_spi0, vc_uart3, vc_i2c3, te1, aon_pwm, vc_i2c0, vc_pwm1),
  484. BRCMSTB_PIN(2, vc_pwm0, vc_spi0, vc_uart3, ctl_hdmi_5v, fl0, aon_pwm, ir_in, vc_pwm1),
  485. BRCMSTB_PIN(3, ir_in, vc_spi0, vc_uart3, aon_fp_4sec_resetb, fl1, sd_card_g, aon_gpclk, _),
  486. BRCMSTB_PIN(4, gpclk0, vc_spi0, vc_i2csl, aon_gpclk, pm_led_out, aon_pwm, sd_card_g, vc_pwm0),
  487. BRCMSTB_PIN(5, gpclk1, ir_in, vc_i2csl, clk_observe, aon_pwm, sd_card_g, vc_pwm0, _),
  488. BRCMSTB_PIN(6, uart1, vc_uart4, gpclk2, ctl_hdmi_5v, vc_uart0, vc_spi3, _, _),
  489. BRCMSTB_PIN(7, uart1, vc_uart4, gpclk0, aon_pwm, vc_uart0, vc_spi3, _, _),
  490. BRCMSTB_PIN(8, uart1, vc_uart4, vc_i2csl, ctl_hdmi_5v, vc_uart0, vc_spi3, _, _),
  491. BRCMSTB_PIN(9, uart1, vc_uart4, vc_i2csl, aon_pwm, vc_uart0, vc_spi3, _, _),
  492. BRCMSTB_PIN(10, tsio, ctl_hdmi_5v, sc0, spdif_out, vc_spi5, usb_pwr, aon_gpclk, sd_card_f),
  493. BRCMSTB_PIN(11, tsio, uart0, sc0, aud_fs_clk0, vc_spi5, usb_vbus, vc_uart2, sd_card_f),
  494. BRCMSTB_PIN(12, tsio, uart0, vc_uart0, tsio, vc_spi5, usb_pwr, vc_uart2, sd_card_f),
  495. BRCMSTB_PIN(13, bsc_m1, uart0, vc_uart0, uui, vc_spi5, arm_jtag, vc_uart2, vc_i2c3),
  496. BRCMSTB_PIN(14, bsc_m1, uart0, vc_uart0, uui, vc_spi5, arm_jtag, vc_uart2, vc_i2c3),
  497. BRCMSTB_PIN(15, ir_in, aon_fp_4sec_resetb, vc_uart0, pm_led_out, ctl_hdmi_5v, aon_pwm, aon_gpclk, _),
  498. BRCMSTB_PIN(16, aon_cpu_standbyb, gpclk0, pm_led_out, ctl_hdmi_5v, vc_pwm0, usb_pwr, aud_fs_clk0, _),
  499. };
  500. static const struct brcmstb_pin_funcs bcm2712_c0_gpio_pin_funcs[] = {
  501. BRCMSTB_PIN(0, bsc_m3, vc_i2c0, gpclk0, enet0, vc_pwm1, vc_spi0, ir_in, _),
  502. BRCMSTB_PIN(1, bsc_m3, vc_i2c0, gpclk1, enet0, vc_pwm1, sr_edm_sense, vc_spi0, vc_uart3),
  503. BRCMSTB_PIN(2, pdm, i2s_in, gpclk2, vc_spi4, pkt, vc_spi0, vc_uart3, _),
  504. BRCMSTB_PIN(3, pdm, i2s_in, vc_spi4, pkt, vc_spi0, vc_uart3, _, _),
  505. BRCMSTB_PIN(4, pdm, i2s_in, arm_jtag, vc_spi4, pkt, vc_spi0, vc_uart3, _),
  506. BRCMSTB_PIN(5, pdm, vc_i2c3, arm_jtag, sd_card_e, vc_spi4, pkt, vc_pcm, vc_i2c5),
  507. BRCMSTB_PIN(6, pdm, vc_i2c3, arm_jtag, sd_card_e, vc_spi4, pkt, vc_pcm, vc_i2c5),
  508. BRCMSTB_PIN(7, i2s_out, spdif_out, arm_jtag, sd_card_e, vc_i2c3, enet0_rgmii, vc_pcm, vc_spi4),
  509. BRCMSTB_PIN(8, i2s_out, aud_fs_clk0, arm_jtag, sd_card_e, vc_i2c3, enet0_mii, vc_pcm, vc_spi4),
  510. BRCMSTB_PIN(9, i2s_out, aud_fs_clk0, arm_jtag, sd_card_e, enet0_mii, sd_card_c, vc_spi4, _),
  511. BRCMSTB_PIN(10, bsc_m3, mtsif_alt1, i2s_in, i2s_out, vc_spi5, enet0_mii, sd_card_c, vc_spi4),
  512. BRCMSTB_PIN(11, bsc_m3, mtsif_alt1, i2s_in, i2s_out, vc_spi5, enet0_mii, sd_card_c, vc_spi4),
  513. BRCMSTB_PIN(12, spi_s, mtsif_alt1, i2s_in, i2s_out, vc_spi5, vc_i2csl, sd0, sd_card_d),
  514. BRCMSTB_PIN(13, spi_s, mtsif_alt1, i2s_out, usb_vbus, vc_spi5, vc_i2csl, sd0, sd_card_d),
  515. BRCMSTB_PIN(14, spi_s, vc_i2csl, enet0_rgmii, arm_jtag, vc_spi5, vc_pwm0, vc_i2c4, sd_card_d),
  516. BRCMSTB_PIN(15, spi_s, vc_i2csl, vc_spi3, arm_jtag, vc_pwm0, vc_i2c4, gpclk0, _),
  517. BRCMSTB_PIN(16, sd_card_b, i2s_out, vc_spi3, i2s_in, sd0, enet0_rgmii, gpclk1, _),
  518. BRCMSTB_PIN(17, sd_card_b, i2s_out, vc_spi3, i2s_in, ext_sc_clk, sd0, enet0_rgmii, gpclk2),
  519. BRCMSTB_PIN(18, sd_card_b, i2s_out, vc_spi3, i2s_in, sd0, enet0_rgmii, vc_pwm1, _),
  520. BRCMSTB_PIN(19, sd_card_b, usb_pwr, vc_spi3, pkt, spdif_out, sd0, ir_in, vc_pwm1),
  521. BRCMSTB_PIN(20, sd_card_b, uui, vc_uart0, arm_jtag, uart2, usb_pwr, vc_pcm, vc_uart4),
  522. BRCMSTB_PIN(21, usb_pwr, uui, vc_uart0, arm_jtag, uart2, sd_card_b, vc_pcm, vc_uart4),
  523. BRCMSTB_PIN(22, usb_pwr, enet0, vc_uart0, mtsif, uart2, usb_vbus, vc_pcm, vc_i2c5),
  524. BRCMSTB_PIN(23, usb_vbus, enet0, vc_uart0, mtsif, uart2, i2s_out, vc_pcm, vc_i2c5),
  525. BRCMSTB_PIN(24, mtsif, pkt, uart0, enet0_rgmii, enet0_rgmii, vc_i2c4, vc_uart3, _),
  526. BRCMSTB_PIN(25, mtsif, pkt, sc0, uart0, enet0_rgmii, enet0_rgmii, vc_i2c4, vc_uart3),
  527. BRCMSTB_PIN(26, mtsif, pkt, sc0, uart0, enet0_rgmii, vc_uart4, vc_spi5, _),
  528. BRCMSTB_PIN(27, mtsif, pkt, sc0, uart0, enet0_rgmii, vc_uart4, vc_spi5, _),
  529. BRCMSTB_PIN(28, mtsif, pkt, sc0, enet0_rgmii, vc_uart4, vc_spi5, _, _),
  530. BRCMSTB_PIN(29, mtsif, pkt, sc0, enet0_rgmii, vc_uart4, vc_spi5, _, _),
  531. BRCMSTB_PIN(30, mtsif, pkt, sc0, sd2, enet0_rgmii, gpclk0, vc_pwm0, _),
  532. BRCMSTB_PIN(31, mtsif, pkt, sc0, sd2, enet0_rgmii, vc_spi3, vc_pwm0, _),
  533. BRCMSTB_PIN(32, mtsif, pkt, sc0, sd2, enet0_rgmii, vc_spi3, vc_uart3, _),
  534. BRCMSTB_PIN(33, mtsif, pkt, sd2, enet0_rgmii, vc_spi3, vc_uart3, _, _),
  535. BRCMSTB_PIN(34, mtsif, pkt, ext_sc_clk, sd2, enet0_rgmii, vc_spi3, vc_i2c5, _),
  536. BRCMSTB_PIN(35, mtsif, pkt, sd2, enet0_rgmii, vc_spi3, vc_i2c5, _, _),
  537. BRCMSTB_PIN(36, sd0, mtsif, sc0, i2s_in, vc_uart3, vc_uart2, _, _),
  538. BRCMSTB_PIN(37, sd0, mtsif, sc0, vc_spi0, i2s_in, vc_uart3, vc_uart2, _),
  539. BRCMSTB_PIN(38, sd0, mtsif_alt, sc0, vc_spi0, i2s_in, vc_uart3, vc_uart2, _),
  540. BRCMSTB_PIN(39, sd0, mtsif_alt, sc0, vc_spi0, vc_uart3, vc_uart2, _, _),
  541. BRCMSTB_PIN(40, sd0, mtsif_alt, sc0, vc_spi0, bsc_m3, _, _, _),
  542. BRCMSTB_PIN(41, sd0, mtsif_alt, sc0, vc_spi0, bsc_m3, _, _, _),
  543. BRCMSTB_PIN(42, vc_spi0, mtsif_alt, vc_i2c0, sd_card_a, mtsif_alt1, arm_jtag, pdm, spi_m),
  544. BRCMSTB_PIN(43, vc_spi0, mtsif_alt, vc_i2c0, sd_card_a, mtsif_alt1, arm_jtag, pdm, spi_m),
  545. BRCMSTB_PIN(44, vc_spi0, mtsif_alt, enet0, sd_card_a, mtsif_alt1, arm_jtag, pdm, spi_m),
  546. BRCMSTB_PIN(45, vc_spi0, mtsif_alt, enet0, sd_card_a, mtsif_alt1, arm_jtag, pdm, spi_m),
  547. BRCMSTB_PIN(46, vc_spi0, mtsif_alt, sd_card_a, mtsif_alt1, arm_jtag, pdm, spi_m, _),
  548. BRCMSTB_PIN(47, enet0, mtsif_alt, i2s_out, mtsif_alt1, arm_jtag, _, _, _),
  549. BRCMSTB_PIN(48, sc0, usb_pwr, spdif_out, mtsif, _, _, _, _),
  550. BRCMSTB_PIN(49, sc0, usb_pwr, aud_fs_clk0, mtsif, _, _, _, _),
  551. BRCMSTB_PIN(50, sc0, usb_vbus, sc0, _, _, _, _, _),
  552. BRCMSTB_PIN(51, sc0, enet0, sc0, sr_edm_sense, _, _, _, _),
  553. BRCMSTB_PIN(52, sc0, enet0, vc_pwm1, _, _, _, _, _),
  554. BRCMSTB_PIN(53, sc0, enet0_rgmii, ext_sc_clk, _, _, _, _, _),
  555. };
  556. static const struct brcmstb_pin_funcs bcm2712_d0_aon_gpio_pin_funcs[] = {
  557. BRCMSTB_PIN(0, ir_in, vc_spi0, vc_uart0, vc_i2c3, uart0, vc_i2c0, _, _),
  558. BRCMSTB_PIN(1, vc_pwm0, vc_spi0, vc_uart0, vc_i2c3, uart0, aon_pwm, vc_i2c0, vc_pwm1),
  559. BRCMSTB_PIN(2, vc_pwm0, vc_spi0, vc_uart0, ctl_hdmi_5v, uart0, aon_pwm, ir_in, vc_pwm1),
  560. BRCMSTB_PIN(3, ir_in, vc_spi0, vc_uart0, uart0, sd_card_g, aon_gpclk, _, _),
  561. BRCMSTB_PIN(4, gpclk0, vc_spi0, pm_led_out, aon_pwm, sd_card_g, vc_pwm0, _, _),
  562. BRCMSTB_PIN(5, gpclk1, ir_in, aon_pwm, sd_card_g, vc_pwm0, _, _, _),
  563. BRCMSTB_PIN(6, uart1, vc_uart2, ctl_hdmi_5v, gpclk2, vc_spi3, _, _, _),
  564. BRCMSTB_PIN(7, _, _, _, _, _, _, _, _), /* non-existent on D0 silicon */
  565. BRCMSTB_PIN(8, uart1, vc_uart2, ctl_hdmi_5v, vc_spi0, vc_spi3, _, _, _),
  566. BRCMSTB_PIN(9, uart1, vc_uart2, vc_uart0, aon_pwm, vc_spi0, vc_uart2, vc_spi3, _),
  567. BRCMSTB_PIN(10, _, _, _, _, _, _, _, _), /* non-existent on D0 silicon */
  568. BRCMSTB_PIN(11, _, _, _, _, _, _, _, _), /* non-existent on D0 silicon */
  569. BRCMSTB_PIN(12, uart1, vc_uart2, vc_uart0, vc_spi0, usb_pwr, vc_uart2, vc_spi3, _),
  570. BRCMSTB_PIN(13, bsc_m1, vc_uart0, uui, vc_spi0, arm_jtag, vc_uart2, vc_i2c3, _),
  571. BRCMSTB_PIN(14, bsc_m1, aon_gpclk, vc_uart0, uui, vc_spi0, arm_jtag, vc_uart2, vc_i2c3),
  572. };
  573. static const struct brcmstb_pin_funcs bcm2712_d0_gpio_pin_funcs[] = {
  574. BRCMSTB_PIN(1, vc_i2c0, usb_pwr, gpclk0, sd_card_e, vc_spi3, sr_edm_sense, vc_spi0, vc_uart0),
  575. BRCMSTB_PIN(2, vc_i2c0, usb_pwr, gpclk1, sd_card_e, vc_spi3, clk_observe, vc_spi0, vc_uart0),
  576. BRCMSTB_PIN(3, vc_i2c3, usb_vbus, gpclk2, sd_card_e, vc_spi3, vc_spi0, vc_uart0, _),
  577. BRCMSTB_PIN(4, vc_i2c3, vc_pwm1, vc_spi3, sd_card_e, vc_spi3, vc_spi0, vc_uart0, _),
  578. BRCMSTB_PIN(10, bsc_m3, vc_pwm1, vc_spi3, sd_card_e, vc_spi3, gpclk0, _, _),
  579. BRCMSTB_PIN(11, bsc_m3, vc_spi3, clk_observe, sd_card_c, gpclk1, _, _, _),
  580. BRCMSTB_PIN(12, spi_s, vc_spi3, sd_card_c, sd_card_d, _, _, _, _),
  581. BRCMSTB_PIN(13, spi_s, vc_spi3, sd_card_c, sd_card_d, _, _, _, _),
  582. BRCMSTB_PIN(14, spi_s, uui, arm_jtag, vc_pwm0, vc_i2c0, sd_card_d, _, _),
  583. BRCMSTB_PIN(15, spi_s, uui, arm_jtag, vc_pwm0, vc_i2c0, gpclk0, _, _),
  584. BRCMSTB_PIN(18, sd_card_f, vc_pwm1, _, _, _, _, _, _),
  585. BRCMSTB_PIN(19, sd_card_f, usb_pwr, vc_pwm1, _, _, _, _, _),
  586. BRCMSTB_PIN(20, vc_i2c3, uui, vc_uart0, arm_jtag, vc_uart2, _, _, _),
  587. BRCMSTB_PIN(21, vc_i2c3, uui, vc_uart0, arm_jtag, vc_uart2, _, _, _),
  588. BRCMSTB_PIN(22, sd_card_f, vc_uart0, vc_i2c3, _, _, _, _, _),
  589. BRCMSTB_PIN(23, vc_uart0, vc_i2c3, _, _, _, _, _, _),
  590. BRCMSTB_PIN(24, sd_card_b, vc_spi0, arm_jtag, uart0, usb_pwr, vc_uart2, vc_uart0, _),
  591. BRCMSTB_PIN(25, sd_card_b, vc_spi0, arm_jtag, uart0, usb_pwr, vc_uart2, vc_uart0, _),
  592. BRCMSTB_PIN(26, sd_card_b, vc_spi0, arm_jtag, uart0, usb_vbus, vc_uart2, vc_spi0, _),
  593. BRCMSTB_PIN(27, sd_card_b, vc_spi0, arm_jtag, uart0, vc_uart2, vc_spi0, _, _),
  594. BRCMSTB_PIN(28, sd_card_b, vc_spi0, arm_jtag, vc_i2c0, vc_spi0, _, _, _),
  595. BRCMSTB_PIN(29, arm_jtag, vc_i2c0, vc_spi0, _, _, _, _, _),
  596. BRCMSTB_PIN(30, sd2, gpclk0, vc_pwm0, _, _, _, _, _),
  597. BRCMSTB_PIN(31, sd2, vc_spi3, vc_pwm0, _, _, _, _, _),
  598. BRCMSTB_PIN(32, sd2, vc_spi3, vc_uart3, _, _, _, _, _),
  599. BRCMSTB_PIN(33, sd2, vc_spi3, vc_uart3, _, _, _, _, _),
  600. BRCMSTB_PIN(34, sd2, vc_spi3, vc_i2c5, _, _, _, _, _),
  601. BRCMSTB_PIN(35, sd2, vc_spi3, vc_i2c5, _, _, _, _, _),
  602. };
  603. static const struct pinctrl_desc bcm2712_c0_pinctrl_desc = {
  604. .name = "pinctrl-bcm2712",
  605. .pins = bcm2712_c0_gpio_pins,
  606. .npins = ARRAY_SIZE(bcm2712_c0_gpio_pins),
  607. };
  608. static const struct pinctrl_desc bcm2712_c0_aon_pinctrl_desc = {
  609. .name = "aon-pinctrl-bcm2712",
  610. .pins = bcm2712_c0_aon_gpio_pins,
  611. .npins = ARRAY_SIZE(bcm2712_c0_aon_gpio_pins),
  612. };
  613. static const struct pinctrl_desc bcm2712_d0_pinctrl_desc = {
  614. .name = "pinctrl-bcm2712",
  615. .pins = bcm2712_d0_gpio_pins,
  616. .npins = ARRAY_SIZE(bcm2712_d0_gpio_pins),
  617. };
  618. static const struct pinctrl_desc bcm2712_d0_aon_pinctrl_desc = {
  619. .name = "aon-pinctrl-bcm2712",
  620. .pins = bcm2712_d0_aon_gpio_pins,
  621. .npins = ARRAY_SIZE(bcm2712_d0_aon_gpio_pins),
  622. };
  623. static const struct pinctrl_gpio_range bcm2712_c0_pinctrl_gpio_range = {
  624. .name = "pinctrl-bcm2712",
  625. .npins = ARRAY_SIZE(bcm2712_c0_gpio_pins),
  626. };
  627. static const struct pinctrl_gpio_range bcm2712_c0_aon_pinctrl_gpio_range = {
  628. .name = "aon-pinctrl-bcm2712",
  629. .npins = ARRAY_SIZE(bcm2712_c0_aon_gpio_pins),
  630. };
  631. static const struct pinctrl_gpio_range bcm2712_d0_pinctrl_gpio_range = {
  632. .name = "pinctrl-bcm2712",
  633. .npins = ARRAY_SIZE(bcm2712_d0_gpio_pins),
  634. };
  635. static const struct pinctrl_gpio_range bcm2712_d0_aon_pinctrl_gpio_range = {
  636. .name = "aon-pinctrl-bcm2712",
  637. .npins = ARRAY_SIZE(bcm2712_d0_aon_gpio_pins),
  638. };
  639. static const struct brcmstb_pdata bcm2712_c0_pdata = {
  640. .pctl_desc = &bcm2712_c0_pinctrl_desc,
  641. .gpio_range = &bcm2712_c0_pinctrl_gpio_range,
  642. .pin_regs = bcm2712_c0_gpio_pin_regs,
  643. .pin_funcs = bcm2712_c0_gpio_pin_funcs,
  644. .func_count = func_count,
  645. .func_gpio = func_gpio,
  646. .func_names = bcm2712_func_names,
  647. };
  648. static const struct brcmstb_pdata bcm2712_c0_aon_pdata = {
  649. .pctl_desc = &bcm2712_c0_aon_pinctrl_desc,
  650. .gpio_range = &bcm2712_c0_aon_pinctrl_gpio_range,
  651. .pin_regs = bcm2712_c0_aon_gpio_pin_regs,
  652. .pin_funcs = bcm2712_c0_aon_gpio_pin_funcs,
  653. .func_count = func_count,
  654. .func_gpio = func_gpio,
  655. .func_names = bcm2712_func_names,
  656. };
  657. static const struct brcmstb_pdata bcm2712_d0_pdata = {
  658. .pctl_desc = &bcm2712_d0_pinctrl_desc,
  659. .gpio_range = &bcm2712_d0_pinctrl_gpio_range,
  660. .pin_regs = bcm2712_d0_gpio_pin_regs,
  661. .pin_funcs = bcm2712_d0_gpio_pin_funcs,
  662. .func_count = func_count,
  663. .func_gpio = func_gpio,
  664. .func_names = bcm2712_func_names,
  665. };
  666. static const struct brcmstb_pdata bcm2712_d0_aon_pdata = {
  667. .pctl_desc = &bcm2712_d0_aon_pinctrl_desc,
  668. .gpio_range = &bcm2712_d0_aon_pinctrl_gpio_range,
  669. .pin_regs = bcm2712_d0_aon_gpio_pin_regs,
  670. .pin_funcs = bcm2712_d0_aon_gpio_pin_funcs,
  671. .func_count = func_count,
  672. .func_gpio = func_gpio,
  673. .func_names = bcm2712_func_names,
  674. };
  675. static int bcm2712_pinctrl_probe(struct platform_device *pdev)
  676. {
  677. return brcmstb_pinctrl_probe(pdev);
  678. }
  679. static const struct of_device_id bcm2712_pinctrl_match[] = {
  680. {
  681. .compatible = "brcm,bcm2712c0-pinctrl",
  682. .data = &bcm2712_c0_pdata
  683. },
  684. {
  685. .compatible = "brcm,bcm2712c0-aon-pinctrl",
  686. .data = &bcm2712_c0_aon_pdata
  687. },
  688. {
  689. .compatible = "brcm,bcm2712d0-pinctrl",
  690. .data = &bcm2712_d0_pdata
  691. },
  692. {
  693. .compatible = "brcm,bcm2712d0-aon-pinctrl",
  694. .data = &bcm2712_d0_aon_pdata
  695. },
  696. { /* sentinel */ }
  697. };
  698. MODULE_DEVICE_TABLE(of, bcm2712_pinctrl_match);
  699. static struct platform_driver bcm2712_pinctrl_driver = {
  700. .probe = bcm2712_pinctrl_probe,
  701. .driver = {
  702. .name = "pinctrl-bcm2712",
  703. .of_match_table = bcm2712_pinctrl_match,
  704. .suppress_bind_attrs = true,
  705. },
  706. };
  707. module_platform_driver(bcm2712_pinctrl_driver);
  708. MODULE_AUTHOR("Phil Elwell");
  709. MODULE_AUTHOR("Jonathan Bell");
  710. MODULE_AUTHOR("Ivan T. Ivanov");
  711. MODULE_AUTHOR("Andrea della Porta");
  712. MODULE_DESCRIPTION("Broadcom BCM2712 pinctrl driver");
  713. MODULE_LICENSE("GPL");