pinctrl-adi2-bf60x.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. /*
  2. * Pinctrl Driver for ADI GPIO2 controller
  3. *
  4. * Copyright 2007-2013 Analog Devices Inc.
  5. *
  6. * Licensed under the GPLv2 or later
  7. */
  8. #include <asm/portmux.h>
  9. #include "pinctrl-adi2.h"
  10. static const struct pinctrl_pin_desc adi_pads[] = {
  11. PINCTRL_PIN(0, "PA0"),
  12. PINCTRL_PIN(1, "PA1"),
  13. PINCTRL_PIN(2, "PA2"),
  14. PINCTRL_PIN(3, "PG3"),
  15. PINCTRL_PIN(4, "PA4"),
  16. PINCTRL_PIN(5, "PA5"),
  17. PINCTRL_PIN(6, "PA6"),
  18. PINCTRL_PIN(7, "PA7"),
  19. PINCTRL_PIN(8, "PA8"),
  20. PINCTRL_PIN(9, "PA9"),
  21. PINCTRL_PIN(10, "PA10"),
  22. PINCTRL_PIN(11, "PA11"),
  23. PINCTRL_PIN(12, "PA12"),
  24. PINCTRL_PIN(13, "PA13"),
  25. PINCTRL_PIN(14, "PA14"),
  26. PINCTRL_PIN(15, "PA15"),
  27. PINCTRL_PIN(16, "PB0"),
  28. PINCTRL_PIN(17, "PB1"),
  29. PINCTRL_PIN(18, "PB2"),
  30. PINCTRL_PIN(19, "PB3"),
  31. PINCTRL_PIN(20, "PB4"),
  32. PINCTRL_PIN(21, "PB5"),
  33. PINCTRL_PIN(22, "PB6"),
  34. PINCTRL_PIN(23, "PB7"),
  35. PINCTRL_PIN(24, "PB8"),
  36. PINCTRL_PIN(25, "PB9"),
  37. PINCTRL_PIN(26, "PB10"),
  38. PINCTRL_PIN(27, "PB11"),
  39. PINCTRL_PIN(28, "PB12"),
  40. PINCTRL_PIN(29, "PB13"),
  41. PINCTRL_PIN(30, "PB14"),
  42. PINCTRL_PIN(31, "PB15"),
  43. PINCTRL_PIN(32, "PC0"),
  44. PINCTRL_PIN(33, "PC1"),
  45. PINCTRL_PIN(34, "PC2"),
  46. PINCTRL_PIN(35, "PC3"),
  47. PINCTRL_PIN(36, "PC4"),
  48. PINCTRL_PIN(37, "PC5"),
  49. PINCTRL_PIN(38, "PC6"),
  50. PINCTRL_PIN(39, "PC7"),
  51. PINCTRL_PIN(40, "PC8"),
  52. PINCTRL_PIN(41, "PC9"),
  53. PINCTRL_PIN(42, "PC10"),
  54. PINCTRL_PIN(43, "PC11"),
  55. PINCTRL_PIN(44, "PC12"),
  56. PINCTRL_PIN(45, "PC13"),
  57. PINCTRL_PIN(46, "PC14"),
  58. PINCTRL_PIN(47, "PC15"),
  59. PINCTRL_PIN(48, "PD0"),
  60. PINCTRL_PIN(49, "PD1"),
  61. PINCTRL_PIN(50, "PD2"),
  62. PINCTRL_PIN(51, "PD3"),
  63. PINCTRL_PIN(52, "PD4"),
  64. PINCTRL_PIN(53, "PD5"),
  65. PINCTRL_PIN(54, "PD6"),
  66. PINCTRL_PIN(55, "PD7"),
  67. PINCTRL_PIN(56, "PD8"),
  68. PINCTRL_PIN(57, "PD9"),
  69. PINCTRL_PIN(58, "PD10"),
  70. PINCTRL_PIN(59, "PD11"),
  71. PINCTRL_PIN(60, "PD12"),
  72. PINCTRL_PIN(61, "PD13"),
  73. PINCTRL_PIN(62, "PD14"),
  74. PINCTRL_PIN(63, "PD15"),
  75. PINCTRL_PIN(64, "PE0"),
  76. PINCTRL_PIN(65, "PE1"),
  77. PINCTRL_PIN(66, "PE2"),
  78. PINCTRL_PIN(67, "PE3"),
  79. PINCTRL_PIN(68, "PE4"),
  80. PINCTRL_PIN(69, "PE5"),
  81. PINCTRL_PIN(70, "PE6"),
  82. PINCTRL_PIN(71, "PE7"),
  83. PINCTRL_PIN(72, "PE8"),
  84. PINCTRL_PIN(73, "PE9"),
  85. PINCTRL_PIN(74, "PE10"),
  86. PINCTRL_PIN(75, "PE11"),
  87. PINCTRL_PIN(76, "PE12"),
  88. PINCTRL_PIN(77, "PE13"),
  89. PINCTRL_PIN(78, "PE14"),
  90. PINCTRL_PIN(79, "PE15"),
  91. PINCTRL_PIN(80, "PF0"),
  92. PINCTRL_PIN(81, "PF1"),
  93. PINCTRL_PIN(82, "PF2"),
  94. PINCTRL_PIN(83, "PF3"),
  95. PINCTRL_PIN(84, "PF4"),
  96. PINCTRL_PIN(85, "PF5"),
  97. PINCTRL_PIN(86, "PF6"),
  98. PINCTRL_PIN(87, "PF7"),
  99. PINCTRL_PIN(88, "PF8"),
  100. PINCTRL_PIN(89, "PF9"),
  101. PINCTRL_PIN(90, "PF10"),
  102. PINCTRL_PIN(91, "PF11"),
  103. PINCTRL_PIN(92, "PF12"),
  104. PINCTRL_PIN(93, "PF13"),
  105. PINCTRL_PIN(94, "PF14"),
  106. PINCTRL_PIN(95, "PF15"),
  107. PINCTRL_PIN(96, "PG0"),
  108. PINCTRL_PIN(97, "PG1"),
  109. PINCTRL_PIN(98, "PG2"),
  110. PINCTRL_PIN(99, "PG3"),
  111. PINCTRL_PIN(100, "PG4"),
  112. PINCTRL_PIN(101, "PG5"),
  113. PINCTRL_PIN(102, "PG6"),
  114. PINCTRL_PIN(103, "PG7"),
  115. PINCTRL_PIN(104, "PG8"),
  116. PINCTRL_PIN(105, "PG9"),
  117. PINCTRL_PIN(106, "PG10"),
  118. PINCTRL_PIN(107, "PG11"),
  119. PINCTRL_PIN(108, "PG12"),
  120. PINCTRL_PIN(109, "PG13"),
  121. PINCTRL_PIN(110, "PG14"),
  122. PINCTRL_PIN(111, "PG15"),
  123. };
  124. static const unsigned uart0_pins[] = {
  125. GPIO_PD7, GPIO_PD8,
  126. };
  127. static const unsigned uart0_ctsrts_pins[] = {
  128. GPIO_PD9, GPIO_PD10,
  129. };
  130. static const unsigned uart1_pins[] = {
  131. GPIO_PG15, GPIO_PG14,
  132. };
  133. static const unsigned uart1_ctsrts_pins[] = {
  134. GPIO_PG10, GPIO_PG13,
  135. };
  136. static const unsigned rsi0_pins[] = {
  137. GPIO_PG3, GPIO_PG2, GPIO_PG0, GPIO_PE15, GPIO_PG5, GPIO_PG6,
  138. };
  139. static const unsigned eth0_pins[] = {
  140. GPIO_PC6, GPIO_PC7, GPIO_PC2, GPIO_PC0, GPIO_PC3, GPIO_PC1,
  141. GPIO_PB13, GPIO_PD6, GPIO_PC5, GPIO_PC4, GPIO_PB14, GPIO_PB15,
  142. };
  143. static const unsigned eth1_pins[] = {
  144. GPIO_PE10, GPIO_PE11, GPIO_PG3, GPIO_PG0, GPIO_PG2, GPIO_PE15,
  145. GPIO_PG5, GPIO_PE12, GPIO_PE13, GPIO_PE14, GPIO_PG6, GPIO_PC9,
  146. };
  147. static const unsigned spi0_pins[] = {
  148. GPIO_PD4, GPIO_PD2, GPIO_PD3,
  149. };
  150. static const unsigned spi1_pins[] = {
  151. GPIO_PD5, GPIO_PD14, GPIO_PD13,
  152. };
  153. static const unsigned twi0_pins[] = {
  154. };
  155. static const unsigned twi1_pins[] = {
  156. };
  157. static const unsigned rotary_pins[] = {
  158. GPIO_PG7, GPIO_PG11, GPIO_PG12,
  159. };
  160. static const unsigned can0_pins[] = {
  161. GPIO_PG1, GPIO_PG4,
  162. };
  163. static const unsigned smc0_pins[] = {
  164. GPIO_PA0, GPIO_PA1, GPIO_PA2, GPIO_PA3, GPIO_PA4, GPIO_PA5, GPIO_PA6,
  165. GPIO_PA7, GPIO_PA8, GPIO_PA9, GPIO_PB2, GPIO_PA10, GPIO_PA11,
  166. GPIO_PB3, GPIO_PA12, GPIO_PA13, GPIO_PA14, GPIO_PA15, GPIO_PB6,
  167. GPIO_PB7, GPIO_PB8, GPIO_PB10, GPIO_PB11, GPIO_PB0,
  168. };
  169. static const unsigned sport0_pins[] = {
  170. GPIO_PB5, GPIO_PB4, GPIO_PB9, GPIO_PB8, GPIO_PB7, GPIO_PB11,
  171. };
  172. static const unsigned sport1_pins[] = {
  173. GPIO_PE2, GPIO_PE5, GPIO_PD15, GPIO_PE4, GPIO_PE3, GPIO_PE1,
  174. };
  175. static const unsigned sport2_pins[] = {
  176. GPIO_PG4, GPIO_PG1, GPIO_PG9, GPIO_PG10, GPIO_PG7, GPIO_PB12,
  177. };
  178. static const unsigned ppi0_8b_pins[] = {
  179. GPIO_PF0, GPIO_PF1, GPIO_PF2, GPIO_PF3, GPIO_PF4, GPIO_PF5, GPIO_PF6,
  180. GPIO_PF7, GPIO_PF13, GPIO_PF14, GPIO_PF15,
  181. GPIO_PE6, GPIO_PE7, GPIO_PE8, GPIO_PE9,
  182. };
  183. static const unsigned ppi0_16b_pins[] = {
  184. GPIO_PF0, GPIO_PF1, GPIO_PF2, GPIO_PF3, GPIO_PF4, GPIO_PF5, GPIO_PF6,
  185. GPIO_PF7, GPIO_PF9, GPIO_PF10, GPIO_PF11, GPIO_PF12,
  186. GPIO_PF13, GPIO_PF14, GPIO_PF15,
  187. GPIO_PE6, GPIO_PE7, GPIO_PE8, GPIO_PE9,
  188. };
  189. static const unsigned ppi0_24b_pins[] = {
  190. GPIO_PF0, GPIO_PF1, GPIO_PF2, GPIO_PF3, GPIO_PF4, GPIO_PF5, GPIO_PF6,
  191. GPIO_PF7, GPIO_PF8, GPIO_PF9, GPIO_PF10, GPIO_PF11, GPIO_PF12,
  192. GPIO_PF13, GPIO_PF14, GPIO_PF15, GPIO_PE0, GPIO_PE1, GPIO_PE2,
  193. GPIO_PE3, GPIO_PE4, GPIO_PE5, GPIO_PE6, GPIO_PE7, GPIO_PE8,
  194. GPIO_PE9, GPIO_PD12, GPIO_PD15,
  195. };
  196. static const unsigned ppi1_8b_pins[] = {
  197. GPIO_PC0, GPIO_PC1, GPIO_PC2, GPIO_PC3, GPIO_PC4, GPIO_PC5, GPIO_PC6,
  198. GPIO_PC7, GPIO_PC8, GPIO_PB13, GPIO_PB14, GPIO_PB15, GPIO_PD6,
  199. };
  200. static const unsigned ppi1_16b_pins[] = {
  201. GPIO_PC0, GPIO_PC1, GPIO_PC2, GPIO_PC3, GPIO_PC4, GPIO_PC5, GPIO_PC6,
  202. GPIO_PC7, GPIO_PC9, GPIO_PC10, GPIO_PC11, GPIO_PC12,
  203. GPIO_PC13, GPIO_PC14, GPIO_PC15,
  204. GPIO_PB13, GPIO_PB14, GPIO_PB15, GPIO_PD6,
  205. };
  206. static const unsigned ppi2_8b_pins[] = {
  207. GPIO_PA0, GPIO_PA1, GPIO_PA2, GPIO_PA3, GPIO_PA4, GPIO_PA5, GPIO_PA6,
  208. GPIO_PA7, GPIO_PB0, GPIO_PB1, GPIO_PB2, GPIO_PB3,
  209. };
  210. static const unsigned ppi2_16b_pins[] = {
  211. GPIO_PA0, GPIO_PA1, GPIO_PA2, GPIO_PA3, GPIO_PA4, GPIO_PA5, GPIO_PA6,
  212. GPIO_PA7, GPIO_PA8, GPIO_PA9, GPIO_PA10, GPIO_PA11, GPIO_PA12,
  213. GPIO_PA13, GPIO_PA14, GPIO_PA15, GPIO_PB0, GPIO_PB1, GPIO_PB2,
  214. };
  215. static const unsigned lp0_pins[] = {
  216. GPIO_PB0, GPIO_PB1, GPIO_PA0, GPIO_PA1, GPIO_PA2, GPIO_PA3,
  217. GPIO_PA4, GPIO_PA5, GPIO_PA6, GPIO_PA7,
  218. };
  219. static const unsigned lp1_pins[] = {
  220. GPIO_PB3, GPIO_PB2, GPIO_PA8, GPIO_PA9, GPIO_PA10, GPIO_PA11,
  221. GPIO_PA12, GPIO_PA13, GPIO_PA14, GPIO_PA15,
  222. };
  223. static const unsigned lp2_pins[] = {
  224. GPIO_PE6, GPIO_PE7, GPIO_PF0, GPIO_PF1, GPIO_PF2, GPIO_PF3,
  225. GPIO_PF4, GPIO_PF5, GPIO_PF6, GPIO_PF7,
  226. };
  227. static const unsigned lp3_pins[] = {
  228. GPIO_PE9, GPIO_PE8, GPIO_PF8, GPIO_PF9, GPIO_PF10, GPIO_PF11,
  229. GPIO_PF12, GPIO_PF13, GPIO_PF14, GPIO_PF15,
  230. };
  231. static const unsigned short uart0_mux[] = {
  232. P_UART0_TX, P_UART0_RX,
  233. 0
  234. };
  235. static const unsigned short uart0_ctsrts_mux[] = {
  236. P_UART0_RTS, P_UART0_CTS,
  237. 0
  238. };
  239. static const unsigned short uart1_mux[] = {
  240. P_UART1_TX, P_UART1_RX,
  241. 0
  242. };
  243. static const unsigned short uart1_ctsrts_mux[] = {
  244. P_UART1_RTS, P_UART1_CTS,
  245. 0
  246. };
  247. static const unsigned short rsi0_mux[] = {
  248. P_RSI_DATA0, P_RSI_DATA1, P_RSI_DATA2, P_RSI_DATA3,
  249. P_RSI_CMD, P_RSI_CLK, 0
  250. };
  251. static const unsigned short eth0_mux[] = P_RMII0;
  252. static const unsigned short eth1_mux[] = P_RMII1;
  253. static const unsigned short spi0_mux[] = {
  254. P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0
  255. };
  256. static const unsigned short spi1_mux[] = {
  257. P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0
  258. };
  259. static const unsigned short twi0_mux[] = {
  260. P_TWI0_SCL, P_TWI0_SDA, 0
  261. };
  262. static const unsigned short twi1_mux[] = {
  263. P_TWI1_SCL, P_TWI1_SDA, 0
  264. };
  265. static const unsigned short rotary_mux[] = {
  266. P_CNT_CUD, P_CNT_CDG, P_CNT_CZM, 0
  267. };
  268. static const unsigned short sport0_mux[] = {
  269. P_SPORT0_ACLK, P_SPORT0_AFS, P_SPORT0_AD0, P_SPORT0_BCLK,
  270. P_SPORT0_BFS, P_SPORT0_BD0, 0,
  271. };
  272. static const unsigned short sport1_mux[] = {
  273. P_SPORT1_ACLK, P_SPORT1_AFS, P_SPORT1_AD0, P_SPORT1_BCLK,
  274. P_SPORT1_BFS, P_SPORT1_BD0, 0,
  275. };
  276. static const unsigned short sport2_mux[] = {
  277. P_SPORT2_ACLK, P_SPORT2_AFS, P_SPORT2_AD0, P_SPORT2_BCLK,
  278. P_SPORT2_BFS, P_SPORT2_BD0, 0,
  279. };
  280. static const unsigned short can0_mux[] = {
  281. P_CAN0_RX, P_CAN0_TX, 0
  282. };
  283. static const unsigned short smc0_mux[] = {
  284. P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  285. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
  286. P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
  287. };
  288. static const unsigned short ppi0_8b_mux[] = {
  289. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  290. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  291. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  292. 0,
  293. };
  294. static const unsigned short ppi0_16b_mux[] = {
  295. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  296. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  297. P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
  298. P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
  299. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  300. 0,
  301. };
  302. static const unsigned short ppi0_24b_mux[] = {
  303. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  304. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  305. P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
  306. P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
  307. P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19,
  308. P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23,
  309. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  310. 0,
  311. };
  312. static const unsigned short ppi1_8b_mux[] = {
  313. P_PPI1_D0, P_PPI1_D1, P_PPI1_D2, P_PPI1_D3,
  314. P_PPI1_D4, P_PPI1_D5, P_PPI1_D6, P_PPI1_D7,
  315. P_PPI1_CLK, P_PPI1_FS1, P_PPI1_FS2,
  316. 0,
  317. };
  318. static const unsigned short ppi1_16b_mux[] = {
  319. P_PPI1_D0, P_PPI1_D1, P_PPI1_D2, P_PPI1_D3,
  320. P_PPI1_D4, P_PPI1_D5, P_PPI1_D6, P_PPI1_D7,
  321. P_PPI1_D8, P_PPI1_D9, P_PPI1_D10, P_PPI1_D11,
  322. P_PPI1_D12, P_PPI1_D13, P_PPI1_D14, P_PPI1_D15,
  323. P_PPI1_CLK, P_PPI1_FS1, P_PPI1_FS2,
  324. 0,
  325. };
  326. static const unsigned short ppi2_8b_mux[] = {
  327. P_PPI2_D0, P_PPI2_D1, P_PPI2_D2, P_PPI2_D3,
  328. P_PPI2_D4, P_PPI2_D5, P_PPI2_D6, P_PPI2_D7,
  329. P_PPI2_CLK, P_PPI2_FS1, P_PPI2_FS2,
  330. 0,
  331. };
  332. static const unsigned short ppi2_16b_mux[] = {
  333. P_PPI2_D0, P_PPI2_D1, P_PPI2_D2, P_PPI2_D3,
  334. P_PPI2_D4, P_PPI2_D5, P_PPI2_D6, P_PPI2_D7,
  335. P_PPI2_D8, P_PPI2_D9, P_PPI2_D10, P_PPI2_D11,
  336. P_PPI2_D12, P_PPI2_D13, P_PPI2_D14, P_PPI2_D15,
  337. P_PPI2_CLK, P_PPI2_FS1, P_PPI2_FS2,
  338. 0,
  339. };
  340. static const unsigned short lp0_mux[] = {
  341. P_LP0_CLK, P_LP0_ACK, P_LP0_D0, P_LP0_D1, P_LP0_D2,
  342. P_LP0_D3, P_LP0_D4, P_LP0_D5, P_LP0_D6, P_LP0_D7,
  343. 0
  344. };
  345. static const unsigned short lp1_mux[] = {
  346. P_LP1_CLK, P_LP1_ACK, P_LP1_D0, P_LP1_D1, P_LP1_D2,
  347. P_LP1_D3, P_LP1_D4, P_LP1_D5, P_LP1_D6, P_LP1_D7,
  348. 0
  349. };
  350. static const unsigned short lp2_mux[] = {
  351. P_LP2_CLK, P_LP2_ACK, P_LP2_D0, P_LP2_D1, P_LP2_D2,
  352. P_LP2_D3, P_LP2_D4, P_LP2_D5, P_LP2_D6, P_LP2_D7,
  353. 0
  354. };
  355. static const unsigned short lp3_mux[] = {
  356. P_LP3_CLK, P_LP3_ACK, P_LP3_D0, P_LP3_D1, P_LP3_D2,
  357. P_LP3_D3, P_LP3_D4, P_LP3_D5, P_LP3_D6, P_LP3_D7,
  358. 0
  359. };
  360. static const struct adi_pin_group adi_pin_groups[] = {
  361. ADI_PIN_GROUP("uart0grp", uart0_pins, uart0_mux),
  362. ADI_PIN_GROUP("uart0ctsrtsgrp", uart0_ctsrts_pins, uart0_ctsrts_mux),
  363. ADI_PIN_GROUP("uart1grp", uart1_pins, uart1_mux),
  364. ADI_PIN_GROUP("uart1ctsrtsgrp", uart1_ctsrts_pins, uart1_ctsrts_mux),
  365. ADI_PIN_GROUP("rsi0grp", rsi0_pins, rsi0_mux),
  366. ADI_PIN_GROUP("eth0grp", eth0_pins, eth0_mux),
  367. ADI_PIN_GROUP("eth1grp", eth1_pins, eth1_mux),
  368. ADI_PIN_GROUP("spi0grp", spi0_pins, spi0_mux),
  369. ADI_PIN_GROUP("spi1grp", spi1_pins, spi1_mux),
  370. ADI_PIN_GROUP("twi0grp", twi0_pins, twi0_mux),
  371. ADI_PIN_GROUP("twi1grp", twi1_pins, twi1_mux),
  372. ADI_PIN_GROUP("rotarygrp", rotary_pins, rotary_mux),
  373. ADI_PIN_GROUP("can0grp", can0_pins, can0_mux),
  374. ADI_PIN_GROUP("smc0grp", smc0_pins, smc0_mux),
  375. ADI_PIN_GROUP("sport0grp", sport0_pins, sport0_mux),
  376. ADI_PIN_GROUP("sport1grp", sport1_pins, sport1_mux),
  377. ADI_PIN_GROUP("sport2grp", sport2_pins, sport2_mux),
  378. ADI_PIN_GROUP("ppi0_8bgrp", ppi0_8b_pins, ppi0_8b_mux),
  379. ADI_PIN_GROUP("ppi0_16bgrp", ppi0_16b_pins, ppi0_16b_mux),
  380. ADI_PIN_GROUP("ppi0_24bgrp", ppi0_24b_pins, ppi0_24b_mux),
  381. ADI_PIN_GROUP("ppi1_8bgrp", ppi1_8b_pins, ppi1_8b_mux),
  382. ADI_PIN_GROUP("ppi1_16bgrp", ppi1_16b_pins, ppi1_16b_mux),
  383. ADI_PIN_GROUP("ppi2_8bgrp", ppi2_8b_pins, ppi2_8b_mux),
  384. ADI_PIN_GROUP("ppi2_16bgrp", ppi2_16b_pins, ppi2_16b_mux),
  385. ADI_PIN_GROUP("lp0grp", lp0_pins, lp0_mux),
  386. ADI_PIN_GROUP("lp1grp", lp1_pins, lp1_mux),
  387. ADI_PIN_GROUP("lp2grp", lp2_pins, lp2_mux),
  388. ADI_PIN_GROUP("lp3grp", lp3_pins, lp3_mux),
  389. };
  390. static const char * const uart0grp[] = { "uart0grp" };
  391. static const char * const uart0ctsrtsgrp[] = { "uart0ctsrtsgrp" };
  392. static const char * const uart1grp[] = { "uart1grp" };
  393. static const char * const uart1ctsrtsgrp[] = { "uart1ctsrtsgrp" };
  394. static const char * const rsi0grp[] = { "rsi0grp" };
  395. static const char * const eth0grp[] = { "eth0grp" };
  396. static const char * const eth1grp[] = { "eth1grp" };
  397. static const char * const spi0grp[] = { "spi0grp" };
  398. static const char * const spi1grp[] = { "spi1grp" };
  399. static const char * const twi0grp[] = { "twi0grp" };
  400. static const char * const twi1grp[] = { "twi1grp" };
  401. static const char * const rotarygrp[] = { "rotarygrp" };
  402. static const char * const can0grp[] = { "can0grp" };
  403. static const char * const smc0grp[] = { "smc0grp" };
  404. static const char * const sport0grp[] = { "sport0grp" };
  405. static const char * const sport1grp[] = { "sport1grp" };
  406. static const char * const sport2grp[] = { "sport2grp" };
  407. static const char * const ppi0grp[] = { "ppi0_8bgrp",
  408. "ppi0_16bgrp",
  409. "ppi0_24bgrp" };
  410. static const char * const ppi1grp[] = { "ppi1_8bgrp",
  411. "ppi1_16bgrp" };
  412. static const char * const ppi2grp[] = { "ppi2_8bgrp",
  413. "ppi2_16bgrp" };
  414. static const char * const lp0grp[] = { "lp0grp" };
  415. static const char * const lp1grp[] = { "lp1grp" };
  416. static const char * const lp2grp[] = { "lp2grp" };
  417. static const char * const lp3grp[] = { "lp3grp" };
  418. static const struct adi_pmx_func adi_pmx_functions[] = {
  419. ADI_PMX_FUNCTION("uart0", uart0grp),
  420. ADI_PMX_FUNCTION("uart0_ctsrts", uart0ctsrtsgrp),
  421. ADI_PMX_FUNCTION("uart1", uart1grp),
  422. ADI_PMX_FUNCTION("uart1_ctsrts", uart1ctsrtsgrp),
  423. ADI_PMX_FUNCTION("rsi0", rsi0grp),
  424. ADI_PMX_FUNCTION("eth0", eth0grp),
  425. ADI_PMX_FUNCTION("eth1", eth1grp),
  426. ADI_PMX_FUNCTION("spi0", spi0grp),
  427. ADI_PMX_FUNCTION("spi1", spi1grp),
  428. ADI_PMX_FUNCTION("twi0", twi0grp),
  429. ADI_PMX_FUNCTION("twi1", twi1grp),
  430. ADI_PMX_FUNCTION("rotary", rotarygrp),
  431. ADI_PMX_FUNCTION("can0", can0grp),
  432. ADI_PMX_FUNCTION("smc0", smc0grp),
  433. ADI_PMX_FUNCTION("sport0", sport0grp),
  434. ADI_PMX_FUNCTION("sport1", sport1grp),
  435. ADI_PMX_FUNCTION("sport2", sport2grp),
  436. ADI_PMX_FUNCTION("ppi0", ppi0grp),
  437. ADI_PMX_FUNCTION("ppi1", ppi1grp),
  438. ADI_PMX_FUNCTION("ppi2", ppi2grp),
  439. ADI_PMX_FUNCTION("lp0", lp0grp),
  440. ADI_PMX_FUNCTION("lp1", lp1grp),
  441. ADI_PMX_FUNCTION("lp2", lp2grp),
  442. ADI_PMX_FUNCTION("lp3", lp3grp),
  443. };
  444. static const struct adi_pinctrl_soc_data adi_bf60x_soc = {
  445. .functions = adi_pmx_functions,
  446. .nfunctions = ARRAY_SIZE(adi_pmx_functions),
  447. .groups = adi_pin_groups,
  448. .ngroups = ARRAY_SIZE(adi_pin_groups),
  449. .pins = adi_pads,
  450. .npins = ARRAY_SIZE(adi_pads),
  451. };
  452. void adi_pinctrl_soc_init(const struct adi_pinctrl_soc_data **soc)
  453. {
  454. *soc = &adi_bf60x_soc;
  455. }