pinctrl-prima2.c 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. /*
  2. * pinctrl pads, groups, functions for CSR SiRFprimaII
  3. *
  4. * Copyright (c) 2011 - 2014 Cambridge Silicon Radio Limited, a CSR plc group
  5. * company.
  6. *
  7. * Licensed under GPLv2 or later.
  8. */
  9. #include <linux/pinctrl/pinctrl.h>
  10. #include <linux/bitops.h>
  11. #include "pinctrl-sirf.h"
  12. /*
  13. * pad list for the pinmux subsystem
  14. * refer to CS-131858-DC-6A.xls
  15. */
  16. static const struct pinctrl_pin_desc sirfsoc_pads[] = {
  17. PINCTRL_PIN(0, "gpio0-0"),
  18. PINCTRL_PIN(1, "gpio0-1"),
  19. PINCTRL_PIN(2, "gpio0-2"),
  20. PINCTRL_PIN(3, "gpio0-3"),
  21. PINCTRL_PIN(4, "pwm0"),
  22. PINCTRL_PIN(5, "pwm1"),
  23. PINCTRL_PIN(6, "pwm2"),
  24. PINCTRL_PIN(7, "pwm3"),
  25. PINCTRL_PIN(8, "warm_rst_b"),
  26. PINCTRL_PIN(9, "odo_0"),
  27. PINCTRL_PIN(10, "odo_1"),
  28. PINCTRL_PIN(11, "dr_dir"),
  29. PINCTRL_PIN(12, "viprom_fa"),
  30. PINCTRL_PIN(13, "scl_1"),
  31. PINCTRL_PIN(14, "ntrst"),
  32. PINCTRL_PIN(15, "sda_1"),
  33. PINCTRL_PIN(16, "x_ldd[16]"),
  34. PINCTRL_PIN(17, "x_ldd[17]"),
  35. PINCTRL_PIN(18, "x_ldd[18]"),
  36. PINCTRL_PIN(19, "x_ldd[19]"),
  37. PINCTRL_PIN(20, "x_ldd[20]"),
  38. PINCTRL_PIN(21, "x_ldd[21]"),
  39. PINCTRL_PIN(22, "x_ldd[22]"),
  40. PINCTRL_PIN(23, "x_ldd[23], lcdrom_frdy"),
  41. PINCTRL_PIN(24, "gps_sgn"),
  42. PINCTRL_PIN(25, "gps_mag"),
  43. PINCTRL_PIN(26, "gps_clk"),
  44. PINCTRL_PIN(27, "sd_cd_b_1"),
  45. PINCTRL_PIN(28, "sd_vcc_on_1"),
  46. PINCTRL_PIN(29, "sd_wp_b_1"),
  47. PINCTRL_PIN(30, "sd_clk_3"),
  48. PINCTRL_PIN(31, "sd_cmd_3"),
  49. PINCTRL_PIN(32, "x_sd_dat_3[0]"),
  50. PINCTRL_PIN(33, "x_sd_dat_3[1]"),
  51. PINCTRL_PIN(34, "x_sd_dat_3[2]"),
  52. PINCTRL_PIN(35, "x_sd_dat_3[3]"),
  53. PINCTRL_PIN(36, "x_sd_clk_4"),
  54. PINCTRL_PIN(37, "x_sd_cmd_4"),
  55. PINCTRL_PIN(38, "x_sd_dat_4[0]"),
  56. PINCTRL_PIN(39, "x_sd_dat_4[1]"),
  57. PINCTRL_PIN(40, "x_sd_dat_4[2]"),
  58. PINCTRL_PIN(41, "x_sd_dat_4[3]"),
  59. PINCTRL_PIN(42, "x_cko_1"),
  60. PINCTRL_PIN(43, "x_ac97_bit_clk"),
  61. PINCTRL_PIN(44, "x_ac97_dout"),
  62. PINCTRL_PIN(45, "x_ac97_din"),
  63. PINCTRL_PIN(46, "x_ac97_sync"),
  64. PINCTRL_PIN(47, "x_txd_1"),
  65. PINCTRL_PIN(48, "x_txd_2"),
  66. PINCTRL_PIN(49, "x_rxd_1"),
  67. PINCTRL_PIN(50, "x_rxd_2"),
  68. PINCTRL_PIN(51, "x_usclk_0"),
  69. PINCTRL_PIN(52, "x_utxd_0"),
  70. PINCTRL_PIN(53, "x_urxd_0"),
  71. PINCTRL_PIN(54, "x_utfs_0"),
  72. PINCTRL_PIN(55, "x_urfs_0"),
  73. PINCTRL_PIN(56, "x_usclk_1"),
  74. PINCTRL_PIN(57, "x_utxd_1"),
  75. PINCTRL_PIN(58, "x_urxd_1"),
  76. PINCTRL_PIN(59, "x_utfs_1"),
  77. PINCTRL_PIN(60, "x_urfs_1"),
  78. PINCTRL_PIN(61, "x_usclk_2"),
  79. PINCTRL_PIN(62, "x_utxd_2"),
  80. PINCTRL_PIN(63, "x_urxd_2"),
  81. PINCTRL_PIN(64, "x_utfs_2"),
  82. PINCTRL_PIN(65, "x_urfs_2"),
  83. PINCTRL_PIN(66, "x_df_we_b"),
  84. PINCTRL_PIN(67, "x_df_re_b"),
  85. PINCTRL_PIN(68, "x_txd_0"),
  86. PINCTRL_PIN(69, "x_rxd_0"),
  87. PINCTRL_PIN(78, "x_cko_0"),
  88. PINCTRL_PIN(79, "x_vip_pxd[7]"),
  89. PINCTRL_PIN(80, "x_vip_pxd[6]"),
  90. PINCTRL_PIN(81, "x_vip_pxd[5]"),
  91. PINCTRL_PIN(82, "x_vip_pxd[4]"),
  92. PINCTRL_PIN(83, "x_vip_pxd[3]"),
  93. PINCTRL_PIN(84, "x_vip_pxd[2]"),
  94. PINCTRL_PIN(85, "x_vip_pxd[1]"),
  95. PINCTRL_PIN(86, "x_vip_pxd[0]"),
  96. PINCTRL_PIN(87, "x_vip_vsync"),
  97. PINCTRL_PIN(88, "x_vip_hsync"),
  98. PINCTRL_PIN(89, "x_vip_pxclk"),
  99. PINCTRL_PIN(90, "x_sda_0"),
  100. PINCTRL_PIN(91, "x_scl_0"),
  101. PINCTRL_PIN(92, "x_df_ry_by"),
  102. PINCTRL_PIN(93, "x_df_cs_b[1]"),
  103. PINCTRL_PIN(94, "x_df_cs_b[0]"),
  104. PINCTRL_PIN(95, "x_l_pclk"),
  105. PINCTRL_PIN(96, "x_l_lck"),
  106. PINCTRL_PIN(97, "x_l_fck"),
  107. PINCTRL_PIN(98, "x_l_de"),
  108. PINCTRL_PIN(99, "x_ldd[0]"),
  109. PINCTRL_PIN(100, "x_ldd[1]"),
  110. PINCTRL_PIN(101, "x_ldd[2]"),
  111. PINCTRL_PIN(102, "x_ldd[3]"),
  112. PINCTRL_PIN(103, "x_ldd[4]"),
  113. PINCTRL_PIN(104, "x_ldd[5]"),
  114. PINCTRL_PIN(105, "x_ldd[6]"),
  115. PINCTRL_PIN(106, "x_ldd[7]"),
  116. PINCTRL_PIN(107, "x_ldd[8]"),
  117. PINCTRL_PIN(108, "x_ldd[9]"),
  118. PINCTRL_PIN(109, "x_ldd[10]"),
  119. PINCTRL_PIN(110, "x_ldd[11]"),
  120. PINCTRL_PIN(111, "x_ldd[12]"),
  121. PINCTRL_PIN(112, "x_ldd[13]"),
  122. PINCTRL_PIN(113, "x_ldd[14]"),
  123. PINCTRL_PIN(114, "x_ldd[15]"),
  124. PINCTRL_PIN(115, "x_usb1_dp"),
  125. PINCTRL_PIN(116, "x_usb1_dn"),
  126. };
  127. static const struct sirfsoc_muxmask lcd_16bits_sirfsoc_muxmask[] = {
  128. {
  129. .group = 3,
  130. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) |
  131. BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
  132. BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16) |
  133. BIT(17) | BIT(18),
  134. }, {
  135. .group = 2,
  136. .mask = BIT(31),
  137. },
  138. };
  139. static const struct sirfsoc_padmux lcd_16bits_padmux = {
  140. .muxmask_counts = ARRAY_SIZE(lcd_16bits_sirfsoc_muxmask),
  141. .muxmask = lcd_16bits_sirfsoc_muxmask,
  142. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  143. .funcmask = BIT(4),
  144. .funcval = 0,
  145. };
  146. static const unsigned lcd_16bits_pins[] = { 95, 96, 97, 98, 99, 100, 101, 102,
  147. 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 };
  148. static const struct sirfsoc_muxmask lcd_18bits_muxmask[] = {
  149. {
  150. .group = 3,
  151. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) |
  152. BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
  153. BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16) |
  154. BIT(17) | BIT(18),
  155. }, {
  156. .group = 2,
  157. .mask = BIT(31),
  158. }, {
  159. .group = 0,
  160. .mask = BIT(16) | BIT(17),
  161. },
  162. };
  163. static const struct sirfsoc_padmux lcd_18bits_padmux = {
  164. .muxmask_counts = ARRAY_SIZE(lcd_18bits_muxmask),
  165. .muxmask = lcd_18bits_muxmask,
  166. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  167. .funcmask = BIT(4),
  168. .funcval = 0,
  169. };
  170. static const unsigned lcd_18bits_pins[] = { 16, 17, 95, 96, 97, 98, 99, 100,
  171. 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114};
  172. static const struct sirfsoc_muxmask lcd_24bits_muxmask[] = {
  173. {
  174. .group = 3,
  175. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) |
  176. BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
  177. BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16) |
  178. BIT(17) | BIT(18),
  179. }, {
  180. .group = 2,
  181. .mask = BIT(31),
  182. }, {
  183. .group = 0,
  184. .mask = BIT(16) | BIT(17) | BIT(18) | BIT(19) | BIT(20) |
  185. BIT(21) | BIT(22) | BIT(23),
  186. },
  187. };
  188. static const struct sirfsoc_padmux lcd_24bits_padmux = {
  189. .muxmask_counts = ARRAY_SIZE(lcd_24bits_muxmask),
  190. .muxmask = lcd_24bits_muxmask,
  191. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  192. .funcmask = BIT(4),
  193. .funcval = 0,
  194. };
  195. static const unsigned lcd_24bits_pins[] = { 16, 17, 18, 19, 20, 21, 22, 23,
  196. 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
  197. 110, 111, 112, 113, 114 };
  198. static const struct sirfsoc_muxmask lcdrom_muxmask[] = {
  199. {
  200. .group = 3,
  201. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) | BIT(5) |
  202. BIT(6) | BIT(7) | BIT(8) | BIT(9) | BIT(10) | BIT(11) |
  203. BIT(12) | BIT(13) | BIT(14) | BIT(15) | BIT(16) |
  204. BIT(17) | BIT(18),
  205. }, {
  206. .group = 2,
  207. .mask = BIT(31),
  208. }, {
  209. .group = 0,
  210. .mask = BIT(23),
  211. },
  212. };
  213. static const struct sirfsoc_padmux lcdrom_padmux = {
  214. .muxmask_counts = ARRAY_SIZE(lcdrom_muxmask),
  215. .muxmask = lcdrom_muxmask,
  216. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  217. .funcmask = BIT(4),
  218. .funcval = BIT(4),
  219. };
  220. static const unsigned lcdrom_pins[] = { 23, 95, 96, 97, 98, 99, 100, 101, 102,
  221. 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114 };
  222. static const struct sirfsoc_muxmask uart0_muxmask[] = {
  223. {
  224. .group = 2,
  225. .mask = BIT(4) | BIT(5),
  226. }, {
  227. .group = 1,
  228. .mask = BIT(23) | BIT(28),
  229. },
  230. };
  231. static const struct sirfsoc_padmux uart0_padmux = {
  232. .muxmask_counts = ARRAY_SIZE(uart0_muxmask),
  233. .muxmask = uart0_muxmask,
  234. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  235. .funcmask = BIT(9),
  236. .funcval = BIT(9),
  237. };
  238. static const unsigned uart0_pins[] = { 55, 60, 68, 69 };
  239. static const struct sirfsoc_muxmask uart0_nostreamctrl_muxmask[] = {
  240. {
  241. .group = 2,
  242. .mask = BIT(4) | BIT(5),
  243. },
  244. };
  245. static const struct sirfsoc_padmux uart0_nostreamctrl_padmux = {
  246. .muxmask_counts = ARRAY_SIZE(uart0_nostreamctrl_muxmask),
  247. .muxmask = uart0_nostreamctrl_muxmask,
  248. };
  249. static const unsigned uart0_nostreamctrl_pins[] = { 68, 69 };
  250. static const struct sirfsoc_muxmask uart1_muxmask[] = {
  251. {
  252. .group = 1,
  253. .mask = BIT(15) | BIT(17),
  254. },
  255. };
  256. static const struct sirfsoc_padmux uart1_padmux = {
  257. .muxmask_counts = ARRAY_SIZE(uart1_muxmask),
  258. .muxmask = uart1_muxmask,
  259. };
  260. static const unsigned uart1_pins[] = { 47, 49 };
  261. static const struct sirfsoc_muxmask uart2_muxmask[] = {
  262. {
  263. .group = 1,
  264. .mask = BIT(16) | BIT(18) | BIT(24) | BIT(27),
  265. },
  266. };
  267. static const struct sirfsoc_padmux uart2_padmux = {
  268. .muxmask_counts = ARRAY_SIZE(uart2_muxmask),
  269. .muxmask = uart2_muxmask,
  270. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  271. .funcmask = BIT(10),
  272. .funcval = BIT(10),
  273. };
  274. static const unsigned uart2_pins[] = { 48, 50, 56, 59 };
  275. static const struct sirfsoc_muxmask uart2_nostreamctrl_muxmask[] = {
  276. {
  277. .group = 1,
  278. .mask = BIT(16) | BIT(18),
  279. },
  280. };
  281. static const struct sirfsoc_padmux uart2_nostreamctrl_padmux = {
  282. .muxmask_counts = ARRAY_SIZE(uart2_nostreamctrl_muxmask),
  283. .muxmask = uart2_nostreamctrl_muxmask,
  284. };
  285. static const unsigned uart2_nostreamctrl_pins[] = { 48, 50 };
  286. static const struct sirfsoc_muxmask sdmmc3_muxmask[] = {
  287. {
  288. .group = 0,
  289. .mask = BIT(30) | BIT(31),
  290. }, {
  291. .group = 1,
  292. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
  293. },
  294. };
  295. static const struct sirfsoc_padmux sdmmc3_padmux = {
  296. .muxmask_counts = ARRAY_SIZE(sdmmc3_muxmask),
  297. .muxmask = sdmmc3_muxmask,
  298. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  299. .funcmask = BIT(7),
  300. .funcval = 0,
  301. };
  302. static const unsigned sdmmc3_pins[] = { 30, 31, 32, 33, 34, 35 };
  303. static const struct sirfsoc_muxmask spi0_muxmask[] = {
  304. {
  305. .group = 1,
  306. .mask = BIT(0) | BIT(1) | BIT(2) | BIT(3),
  307. },
  308. };
  309. static const struct sirfsoc_padmux spi0_padmux = {
  310. .muxmask_counts = ARRAY_SIZE(spi0_muxmask),
  311. .muxmask = spi0_muxmask,
  312. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  313. .funcmask = BIT(7),
  314. .funcval = BIT(7),
  315. };
  316. static const unsigned spi0_pins[] = { 32, 33, 34, 35 };
  317. static const struct sirfsoc_muxmask sdmmc4_muxmask[] = {
  318. {
  319. .group = 1,
  320. .mask = BIT(4) | BIT(5) | BIT(6) | BIT(7) | BIT(8) | BIT(9),
  321. },
  322. };
  323. static const struct sirfsoc_padmux sdmmc4_padmux = {
  324. .muxmask_counts = ARRAY_SIZE(sdmmc4_muxmask),
  325. .muxmask = sdmmc4_muxmask,
  326. };
  327. static const unsigned sdmmc4_pins[] = { 36, 37, 38, 39, 40, 41 };
  328. static const struct sirfsoc_muxmask cko1_muxmask[] = {
  329. {
  330. .group = 1,
  331. .mask = BIT(10),
  332. },
  333. };
  334. static const struct sirfsoc_padmux cko1_padmux = {
  335. .muxmask_counts = ARRAY_SIZE(cko1_muxmask),
  336. .muxmask = cko1_muxmask,
  337. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  338. .funcmask = BIT(3),
  339. .funcval = 0,
  340. };
  341. static const unsigned cko1_pins[] = { 42 };
  342. static const struct sirfsoc_muxmask i2s_mclk_muxmask[] = {
  343. {
  344. .group = 1,
  345. .mask = BIT(10),
  346. },
  347. };
  348. static const struct sirfsoc_padmux i2s_mclk_padmux = {
  349. .muxmask_counts = ARRAY_SIZE(i2s_mclk_muxmask),
  350. .muxmask = i2s_mclk_muxmask,
  351. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  352. .funcmask = BIT(3),
  353. .funcval = BIT(3),
  354. };
  355. static const unsigned i2s_mclk_pins[] = { 42 };
  356. static const struct sirfsoc_muxmask i2s_ext_clk_input_muxmask[] = {
  357. {
  358. .group = 1,
  359. .mask = BIT(19),
  360. },
  361. };
  362. static const struct sirfsoc_padmux i2s_ext_clk_input_padmux = {
  363. .muxmask_counts = ARRAY_SIZE(i2s_ext_clk_input_muxmask),
  364. .muxmask = i2s_ext_clk_input_muxmask,
  365. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  366. .funcmask = BIT(2),
  367. .funcval = BIT(2),
  368. };
  369. static const unsigned i2s_ext_clk_input_pins[] = { 51 };
  370. static const struct sirfsoc_muxmask i2s_muxmask[] = {
  371. {
  372. .group = 1,
  373. .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14),
  374. },
  375. };
  376. static const struct sirfsoc_padmux i2s_padmux = {
  377. .muxmask_counts = ARRAY_SIZE(i2s_muxmask),
  378. .muxmask = i2s_muxmask,
  379. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  380. };
  381. static const unsigned i2s_pins[] = { 43, 44, 45, 46 };
  382. static const struct sirfsoc_muxmask i2s_no_din_muxmask[] = {
  383. {
  384. .group = 1,
  385. .mask = BIT(11) | BIT(12) | BIT(14),
  386. },
  387. };
  388. static const struct sirfsoc_padmux i2s_no_din_padmux = {
  389. .muxmask_counts = ARRAY_SIZE(i2s_no_din_muxmask),
  390. .muxmask = i2s_no_din_muxmask,
  391. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  392. };
  393. static const unsigned i2s_no_din_pins[] = { 43, 44, 46 };
  394. static const struct sirfsoc_muxmask i2s_6chn_muxmask[] = {
  395. {
  396. .group = 1,
  397. .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14)
  398. | BIT(23) | BIT(28),
  399. },
  400. };
  401. static const struct sirfsoc_padmux i2s_6chn_padmux = {
  402. .muxmask_counts = ARRAY_SIZE(i2s_6chn_muxmask),
  403. .muxmask = i2s_6chn_muxmask,
  404. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  405. .funcmask = BIT(1) | BIT(9),
  406. .funcval = BIT(1) | BIT(9),
  407. };
  408. static const unsigned i2s_6chn_pins[] = { 43, 44, 45, 46, 55, 60 };
  409. static const struct sirfsoc_muxmask ac97_muxmask[] = {
  410. {
  411. .group = 1,
  412. .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14),
  413. },
  414. };
  415. static const struct sirfsoc_padmux ac97_padmux = {
  416. .muxmask_counts = ARRAY_SIZE(ac97_muxmask),
  417. .muxmask = ac97_muxmask,
  418. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  419. .funcmask = BIT(8),
  420. .funcval = 0,
  421. };
  422. static const unsigned ac97_pins[] = { 43, 44, 45, 46 };
  423. static const struct sirfsoc_muxmask spi1_muxmask[] = {
  424. {
  425. .group = 1,
  426. .mask = BIT(11) | BIT(12) | BIT(13) | BIT(14),
  427. },
  428. };
  429. static const struct sirfsoc_padmux spi1_padmux = {
  430. .muxmask_counts = ARRAY_SIZE(spi1_muxmask),
  431. .muxmask = spi1_muxmask,
  432. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  433. .funcmask = BIT(8),
  434. .funcval = BIT(8),
  435. };
  436. static const unsigned spi1_pins[] = { 43, 44, 45, 46 };
  437. static const struct sirfsoc_muxmask sdmmc1_muxmask[] = {
  438. {
  439. .group = 0,
  440. .mask = BIT(27) | BIT(28) | BIT(29),
  441. },
  442. };
  443. static const struct sirfsoc_padmux sdmmc1_padmux = {
  444. .muxmask_counts = ARRAY_SIZE(sdmmc1_muxmask),
  445. .muxmask = sdmmc1_muxmask,
  446. };
  447. static const unsigned sdmmc1_pins[] = { 27, 28, 29 };
  448. static const struct sirfsoc_muxmask gps_muxmask[] = {
  449. {
  450. .group = 0,
  451. .mask = BIT(24) | BIT(25) | BIT(26),
  452. },
  453. };
  454. static const struct sirfsoc_padmux gps_padmux = {
  455. .muxmask_counts = ARRAY_SIZE(gps_muxmask),
  456. .muxmask = gps_muxmask,
  457. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  458. .funcmask = BIT(12) | BIT(13) | BIT(14),
  459. .funcval = BIT(12),
  460. };
  461. static const unsigned gps_pins[] = { 24, 25, 26 };
  462. static const struct sirfsoc_muxmask sdmmc5_muxmask[] = {
  463. {
  464. .group = 0,
  465. .mask = BIT(24) | BIT(25) | BIT(26),
  466. },
  467. };
  468. static const struct sirfsoc_padmux sdmmc5_padmux = {
  469. .muxmask_counts = ARRAY_SIZE(sdmmc5_muxmask),
  470. .muxmask = sdmmc5_muxmask,
  471. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  472. .funcmask = BIT(13) | BIT(14),
  473. .funcval = BIT(13) | BIT(14),
  474. };
  475. static const unsigned sdmmc5_pins[] = { 24, 25, 26 };
  476. static const struct sirfsoc_muxmask usp0_muxmask[] = {
  477. {
  478. .group = 1,
  479. .mask = BIT(19) | BIT(20) | BIT(21) | BIT(22) | BIT(23),
  480. },
  481. };
  482. static const struct sirfsoc_padmux usp0_padmux = {
  483. .muxmask_counts = ARRAY_SIZE(usp0_muxmask),
  484. .muxmask = usp0_muxmask,
  485. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  486. .funcmask = BIT(1) | BIT(2) | BIT(6) | BIT(9),
  487. .funcval = 0,
  488. };
  489. static const unsigned usp0_pins[] = { 51, 52, 53, 54, 55 };
  490. static const struct sirfsoc_muxmask usp0_only_utfs_muxmask[] = {
  491. {
  492. .group = 1,
  493. .mask = BIT(19) | BIT(20) | BIT(21) | BIT(22),
  494. },
  495. };
  496. static const struct sirfsoc_padmux usp0_only_utfs_padmux = {
  497. .muxmask_counts = ARRAY_SIZE(usp0_only_utfs_muxmask),
  498. .muxmask = usp0_only_utfs_muxmask,
  499. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  500. .funcmask = BIT(1) | BIT(2) | BIT(6),
  501. .funcval = 0,
  502. };
  503. static const unsigned usp0_only_utfs_pins[] = { 51, 52, 53, 54 };
  504. static const struct sirfsoc_muxmask usp0_only_urfs_muxmask[] = {
  505. {
  506. .group = 1,
  507. .mask = BIT(19) | BIT(20) | BIT(21) | BIT(23),
  508. },
  509. };
  510. static const struct sirfsoc_padmux usp0_only_urfs_padmux = {
  511. .muxmask_counts = ARRAY_SIZE(usp0_only_urfs_muxmask),
  512. .muxmask = usp0_only_urfs_muxmask,
  513. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  514. .funcmask = BIT(1) | BIT(2) | BIT(9),
  515. .funcval = 0,
  516. };
  517. static const unsigned usp0_only_urfs_pins[] = { 51, 52, 53, 55 };
  518. static const struct sirfsoc_muxmask usp0_uart_nostreamctrl_muxmask[] = {
  519. {
  520. .group = 1,
  521. .mask = BIT(20) | BIT(21),
  522. },
  523. };
  524. static const struct sirfsoc_padmux usp0_uart_nostreamctrl_padmux = {
  525. .muxmask_counts = ARRAY_SIZE(usp0_uart_nostreamctrl_muxmask),
  526. .muxmask = usp0_uart_nostreamctrl_muxmask,
  527. };
  528. static const unsigned usp0_uart_nostreamctrl_pins[] = { 52, 53 };
  529. static const struct sirfsoc_muxmask usp1_muxmask[] = {
  530. {
  531. .group = 1,
  532. .mask = BIT(24) | BIT(25) | BIT(26) | BIT(27) | BIT(28),
  533. },
  534. };
  535. static const struct sirfsoc_padmux usp1_padmux = {
  536. .muxmask_counts = ARRAY_SIZE(usp1_muxmask),
  537. .muxmask = usp1_muxmask,
  538. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  539. .funcmask = BIT(1) | BIT(9) | BIT(10) | BIT(11),
  540. .funcval = 0,
  541. };
  542. static const unsigned usp1_pins[] = { 56, 57, 58, 59, 60 };
  543. static const struct sirfsoc_muxmask usp1_uart_nostreamctrl_muxmask[] = {
  544. {
  545. .group = 1,
  546. .mask = BIT(25) | BIT(26),
  547. },
  548. };
  549. static const struct sirfsoc_padmux usp1_uart_nostreamctrl_padmux = {
  550. .muxmask_counts = ARRAY_SIZE(usp1_uart_nostreamctrl_muxmask),
  551. .muxmask = usp1_uart_nostreamctrl_muxmask,
  552. };
  553. static const unsigned usp1_uart_nostreamctrl_pins[] = { 57, 58 };
  554. static const struct sirfsoc_muxmask usp2_muxmask[] = {
  555. {
  556. .group = 1,
  557. .mask = BIT(29) | BIT(30) | BIT(31),
  558. }, {
  559. .group = 2,
  560. .mask = BIT(0) | BIT(1),
  561. },
  562. };
  563. static const struct sirfsoc_padmux usp2_padmux = {
  564. .muxmask_counts = ARRAY_SIZE(usp2_muxmask),
  565. .muxmask = usp2_muxmask,
  566. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  567. .funcmask = BIT(13) | BIT(14),
  568. .funcval = 0,
  569. };
  570. static const unsigned usp2_pins[] = { 61, 62, 63, 64, 65 };
  571. static const struct sirfsoc_muxmask usp2_uart_nostreamctrl_muxmask[] = {
  572. {
  573. .group = 1,
  574. .mask = BIT(30) | BIT(31),
  575. },
  576. };
  577. static const struct sirfsoc_padmux usp2_uart_nostreamctrl_padmux = {
  578. .muxmask_counts = ARRAY_SIZE(usp2_uart_nostreamctrl_muxmask),
  579. .muxmask = usp2_uart_nostreamctrl_muxmask,
  580. };
  581. static const unsigned usp2_uart_nostreamctrl_pins[] = { 62, 63 };
  582. static const struct sirfsoc_muxmask nand_muxmask[] = {
  583. {
  584. .group = 2,
  585. .mask = BIT(2) | BIT(3) | BIT(28) | BIT(29) | BIT(30),
  586. },
  587. };
  588. static const struct sirfsoc_padmux nand_padmux = {
  589. .muxmask_counts = ARRAY_SIZE(nand_muxmask),
  590. .muxmask = nand_muxmask,
  591. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  592. .funcmask = BIT(5),
  593. .funcval = 0,
  594. };
  595. static const unsigned nand_pins[] = { 64, 65, 92, 93, 94 };
  596. static const struct sirfsoc_padmux sdmmc0_padmux = {
  597. .muxmask_counts = 0,
  598. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  599. .funcmask = BIT(5),
  600. .funcval = 0,
  601. };
  602. static const unsigned sdmmc0_pins[] = { };
  603. static const struct sirfsoc_muxmask sdmmc2_muxmask[] = {
  604. {
  605. .group = 2,
  606. .mask = BIT(2) | BIT(3),
  607. },
  608. };
  609. static const struct sirfsoc_padmux sdmmc2_padmux = {
  610. .muxmask_counts = ARRAY_SIZE(sdmmc2_muxmask),
  611. .muxmask = sdmmc2_muxmask,
  612. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  613. .funcmask = BIT(5),
  614. .funcval = BIT(5),
  615. };
  616. static const unsigned sdmmc2_pins[] = { 66, 67 };
  617. static const struct sirfsoc_muxmask cko0_muxmask[] = {
  618. {
  619. .group = 2,
  620. .mask = BIT(14),
  621. },
  622. };
  623. static const struct sirfsoc_padmux cko0_padmux = {
  624. .muxmask_counts = ARRAY_SIZE(cko0_muxmask),
  625. .muxmask = cko0_muxmask,
  626. };
  627. static const unsigned cko0_pins[] = { 78 };
  628. static const struct sirfsoc_muxmask vip_muxmask[] = {
  629. {
  630. .group = 2,
  631. .mask = BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19)
  632. | BIT(20) | BIT(21) | BIT(22) | BIT(23) | BIT(24) |
  633. BIT(25),
  634. },
  635. };
  636. static const struct sirfsoc_padmux vip_padmux = {
  637. .muxmask_counts = ARRAY_SIZE(vip_muxmask),
  638. .muxmask = vip_muxmask,
  639. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  640. .funcmask = BIT(0),
  641. .funcval = 0,
  642. };
  643. static const unsigned vip_pins[] = { 79, 80, 81, 82, 83, 84, 85, 86, 87,
  644. 88, 89 };
  645. static const struct sirfsoc_muxmask i2c0_muxmask[] = {
  646. {
  647. .group = 2,
  648. .mask = BIT(26) | BIT(27),
  649. },
  650. };
  651. static const struct sirfsoc_padmux i2c0_padmux = {
  652. .muxmask_counts = ARRAY_SIZE(i2c0_muxmask),
  653. .muxmask = i2c0_muxmask,
  654. };
  655. static const unsigned i2c0_pins[] = { 90, 91 };
  656. static const struct sirfsoc_muxmask i2c1_muxmask[] = {
  657. {
  658. .group = 0,
  659. .mask = BIT(13) | BIT(15),
  660. },
  661. };
  662. static const struct sirfsoc_padmux i2c1_padmux = {
  663. .muxmask_counts = ARRAY_SIZE(i2c1_muxmask),
  664. .muxmask = i2c1_muxmask,
  665. };
  666. static const unsigned i2c1_pins[] = { 13, 15 };
  667. static const struct sirfsoc_muxmask viprom_muxmask[] = {
  668. {
  669. .group = 2,
  670. .mask = BIT(15) | BIT(16) | BIT(17) | BIT(18) | BIT(19)
  671. | BIT(20) | BIT(21) | BIT(22) | BIT(23) | BIT(24) |
  672. BIT(25),
  673. }, {
  674. .group = 0,
  675. .mask = BIT(12),
  676. },
  677. };
  678. static const struct sirfsoc_padmux viprom_padmux = {
  679. .muxmask_counts = ARRAY_SIZE(viprom_muxmask),
  680. .muxmask = viprom_muxmask,
  681. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  682. .funcmask = BIT(0),
  683. .funcval = BIT(0),
  684. };
  685. static const unsigned viprom_pins[] = { 12, 79, 80, 81, 82, 83, 84, 85, 86,
  686. 87, 88, 89 };
  687. static const struct sirfsoc_muxmask pwm0_muxmask[] = {
  688. {
  689. .group = 0,
  690. .mask = BIT(4),
  691. },
  692. };
  693. static const struct sirfsoc_padmux pwm0_padmux = {
  694. .muxmask_counts = ARRAY_SIZE(pwm0_muxmask),
  695. .muxmask = pwm0_muxmask,
  696. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  697. .funcmask = BIT(12),
  698. .funcval = 0,
  699. };
  700. static const unsigned pwm0_pins[] = { 4 };
  701. static const struct sirfsoc_muxmask pwm1_muxmask[] = {
  702. {
  703. .group = 0,
  704. .mask = BIT(5),
  705. },
  706. };
  707. static const struct sirfsoc_padmux pwm1_padmux = {
  708. .muxmask_counts = ARRAY_SIZE(pwm1_muxmask),
  709. .muxmask = pwm1_muxmask,
  710. };
  711. static const unsigned pwm1_pins[] = { 5 };
  712. static const struct sirfsoc_muxmask pwm2_muxmask[] = {
  713. {
  714. .group = 0,
  715. .mask = BIT(6),
  716. },
  717. };
  718. static const struct sirfsoc_padmux pwm2_padmux = {
  719. .muxmask_counts = ARRAY_SIZE(pwm2_muxmask),
  720. .muxmask = pwm2_muxmask,
  721. };
  722. static const unsigned pwm2_pins[] = { 6 };
  723. static const struct sirfsoc_muxmask pwm3_muxmask[] = {
  724. {
  725. .group = 0,
  726. .mask = BIT(7),
  727. },
  728. };
  729. static const struct sirfsoc_padmux pwm3_padmux = {
  730. .muxmask_counts = ARRAY_SIZE(pwm3_muxmask),
  731. .muxmask = pwm3_muxmask,
  732. };
  733. static const unsigned pwm3_pins[] = { 7 };
  734. static const struct sirfsoc_muxmask warm_rst_muxmask[] = {
  735. {
  736. .group = 0,
  737. .mask = BIT(8),
  738. },
  739. };
  740. static const struct sirfsoc_padmux warm_rst_padmux = {
  741. .muxmask_counts = ARRAY_SIZE(warm_rst_muxmask),
  742. .muxmask = warm_rst_muxmask,
  743. };
  744. static const unsigned warm_rst_pins[] = { 8 };
  745. static const struct sirfsoc_muxmask usb0_utmi_drvbus_muxmask[] = {
  746. {
  747. .group = 1,
  748. .mask = BIT(22),
  749. },
  750. };
  751. static const struct sirfsoc_padmux usb0_utmi_drvbus_padmux = {
  752. .muxmask_counts = ARRAY_SIZE(usb0_utmi_drvbus_muxmask),
  753. .muxmask = usb0_utmi_drvbus_muxmask,
  754. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  755. .funcmask = BIT(6),
  756. .funcval = BIT(6), /* refer to PAD_UTMI_DRVVBUS0_ENABLE */
  757. };
  758. static const unsigned usb0_utmi_drvbus_pins[] = { 54 };
  759. static const struct sirfsoc_muxmask usb1_utmi_drvbus_muxmask[] = {
  760. {
  761. .group = 1,
  762. .mask = BIT(27),
  763. },
  764. };
  765. static const struct sirfsoc_padmux usb1_utmi_drvbus_padmux = {
  766. .muxmask_counts = ARRAY_SIZE(usb1_utmi_drvbus_muxmask),
  767. .muxmask = usb1_utmi_drvbus_muxmask,
  768. .ctrlreg = SIRFSOC_RSC_PIN_MUX,
  769. .funcmask = BIT(11),
  770. .funcval = BIT(11), /* refer to PAD_UTMI_DRVVBUS1_ENABLE */
  771. };
  772. static const unsigned usb1_utmi_drvbus_pins[] = { 59 };
  773. static const struct sirfsoc_padmux usb1_dp_dn_padmux = {
  774. .muxmask_counts = 0,
  775. .ctrlreg = SIRFSOC_RSC_USB_UART_SHARE,
  776. .funcmask = BIT(2),
  777. .funcval = BIT(2),
  778. };
  779. static const unsigned usb1_dp_dn_pins[] = { 115, 116 };
  780. static const struct sirfsoc_padmux uart1_route_io_usb1_padmux = {
  781. .muxmask_counts = 0,
  782. .ctrlreg = SIRFSOC_RSC_USB_UART_SHARE,
  783. .funcmask = BIT(2),
  784. .funcval = 0,
  785. };
  786. static const unsigned uart1_route_io_usb1_pins[] = { 115, 116 };
  787. static const struct sirfsoc_muxmask pulse_count_muxmask[] = {
  788. {
  789. .group = 0,
  790. .mask = BIT(9) | BIT(10) | BIT(11),
  791. },
  792. };
  793. static const struct sirfsoc_padmux pulse_count_padmux = {
  794. .muxmask_counts = ARRAY_SIZE(pulse_count_muxmask),
  795. .muxmask = pulse_count_muxmask,
  796. };
  797. static const unsigned pulse_count_pins[] = { 9, 10, 11 };
  798. static const struct sirfsoc_pin_group sirfsoc_pin_groups[] = {
  799. SIRFSOC_PIN_GROUP("lcd_16bitsgrp", lcd_16bits_pins),
  800. SIRFSOC_PIN_GROUP("lcd_18bitsgrp", lcd_18bits_pins),
  801. SIRFSOC_PIN_GROUP("lcd_24bitsgrp", lcd_24bits_pins),
  802. SIRFSOC_PIN_GROUP("lcdrom_grp", lcdrom_pins),
  803. SIRFSOC_PIN_GROUP("uart0grp", uart0_pins),
  804. SIRFSOC_PIN_GROUP("uart0_nostreamctrlgrp", uart0_nostreamctrl_pins),
  805. SIRFSOC_PIN_GROUP("uart1grp", uart1_pins),
  806. SIRFSOC_PIN_GROUP("uart2grp", uart2_pins),
  807. SIRFSOC_PIN_GROUP("uart2_nostreamctrlgrp", uart2_nostreamctrl_pins),
  808. SIRFSOC_PIN_GROUP("usp0grp", usp0_pins),
  809. SIRFSOC_PIN_GROUP("usp0_uart_nostreamctrl_grp",
  810. usp0_uart_nostreamctrl_pins),
  811. SIRFSOC_PIN_GROUP("usp0_only_utfs_grp", usp0_only_utfs_pins),
  812. SIRFSOC_PIN_GROUP("usp0_only_urfs_grp", usp0_only_urfs_pins),
  813. SIRFSOC_PIN_GROUP("usp1grp", usp1_pins),
  814. SIRFSOC_PIN_GROUP("usp1_uart_nostreamctrl_grp",
  815. usp1_uart_nostreamctrl_pins),
  816. SIRFSOC_PIN_GROUP("usp2grp", usp2_pins),
  817. SIRFSOC_PIN_GROUP("usp2_uart_nostreamctrl_grp",
  818. usp2_uart_nostreamctrl_pins),
  819. SIRFSOC_PIN_GROUP("i2c0grp", i2c0_pins),
  820. SIRFSOC_PIN_GROUP("i2c1grp", i2c1_pins),
  821. SIRFSOC_PIN_GROUP("pwm0grp", pwm0_pins),
  822. SIRFSOC_PIN_GROUP("pwm1grp", pwm1_pins),
  823. SIRFSOC_PIN_GROUP("pwm2grp", pwm2_pins),
  824. SIRFSOC_PIN_GROUP("pwm3grp", pwm3_pins),
  825. SIRFSOC_PIN_GROUP("vipgrp", vip_pins),
  826. SIRFSOC_PIN_GROUP("vipromgrp", viprom_pins),
  827. SIRFSOC_PIN_GROUP("warm_rstgrp", warm_rst_pins),
  828. SIRFSOC_PIN_GROUP("cko0grp", cko0_pins),
  829. SIRFSOC_PIN_GROUP("cko1grp", cko1_pins),
  830. SIRFSOC_PIN_GROUP("sdmmc0grp", sdmmc0_pins),
  831. SIRFSOC_PIN_GROUP("sdmmc1grp", sdmmc1_pins),
  832. SIRFSOC_PIN_GROUP("sdmmc2grp", sdmmc2_pins),
  833. SIRFSOC_PIN_GROUP("sdmmc3grp", sdmmc3_pins),
  834. SIRFSOC_PIN_GROUP("sdmmc4grp", sdmmc4_pins),
  835. SIRFSOC_PIN_GROUP("sdmmc5grp", sdmmc5_pins),
  836. SIRFSOC_PIN_GROUP("usb0_utmi_drvbusgrp", usb0_utmi_drvbus_pins),
  837. SIRFSOC_PIN_GROUP("usb1_utmi_drvbusgrp", usb1_utmi_drvbus_pins),
  838. SIRFSOC_PIN_GROUP("usb1_dp_dngrp", usb1_dp_dn_pins),
  839. SIRFSOC_PIN_GROUP("uart1_route_io_usb1grp", uart1_route_io_usb1_pins),
  840. SIRFSOC_PIN_GROUP("pulse_countgrp", pulse_count_pins),
  841. SIRFSOC_PIN_GROUP("i2smclkgrp", i2s_mclk_pins),
  842. SIRFSOC_PIN_GROUP("i2s_ext_clk_inputgrp", i2s_ext_clk_input_pins),
  843. SIRFSOC_PIN_GROUP("i2sgrp", i2s_pins),
  844. SIRFSOC_PIN_GROUP("i2s_no_dingrp", i2s_no_din_pins),
  845. SIRFSOC_PIN_GROUP("i2s_6chngrp", i2s_6chn_pins),
  846. SIRFSOC_PIN_GROUP("ac97grp", ac97_pins),
  847. SIRFSOC_PIN_GROUP("nandgrp", nand_pins),
  848. SIRFSOC_PIN_GROUP("spi0grp", spi0_pins),
  849. SIRFSOC_PIN_GROUP("spi1grp", spi1_pins),
  850. SIRFSOC_PIN_GROUP("gpsgrp", gps_pins),
  851. };
  852. static const char * const lcd_16bitsgrp[] = { "lcd_16bitsgrp" };
  853. static const char * const lcd_18bitsgrp[] = { "lcd_18bitsgrp" };
  854. static const char * const lcd_24bitsgrp[] = { "lcd_24bitsgrp" };
  855. static const char * const lcdromgrp[] = { "lcdromgrp" };
  856. static const char * const uart0grp[] = { "uart0grp" };
  857. static const char * const uart0_nostreamctrlgrp[] = { "uart0_nostreamctrlgrp" };
  858. static const char * const uart1grp[] = { "uart1grp" };
  859. static const char * const uart2grp[] = { "uart2grp" };
  860. static const char * const uart2_nostreamctrlgrp[] = { "uart2_nostreamctrlgrp" };
  861. static const char * const usp0grp[] = { "usp0grp" };
  862. static const char * const usp0_uart_nostreamctrl_grp[] = {
  863. "usp0_uart_nostreamctrl_grp"
  864. };
  865. static const char * const usp0_only_utfs_grp[] = { "usp0_only_utfs_grp" };
  866. static const char * const usp0_only_urfs_grp[] = { "usp0_only_urfs_grp" };
  867. static const char * const usp1grp[] = { "usp1grp" };
  868. static const char * const usp1_uart_nostreamctrl_grp[] = {
  869. "usp1_uart_nostreamctrl_grp"
  870. };
  871. static const char * const usp2grp[] = { "usp2grp" };
  872. static const char * const usp2_uart_nostreamctrl_grp[] = {
  873. "usp2_uart_nostreamctrl_grp"
  874. };
  875. static const char * const i2c0grp[] = { "i2c0grp" };
  876. static const char * const i2c1grp[] = { "i2c1grp" };
  877. static const char * const pwm0grp[] = { "pwm0grp" };
  878. static const char * const pwm1grp[] = { "pwm1grp" };
  879. static const char * const pwm2grp[] = { "pwm2grp" };
  880. static const char * const pwm3grp[] = { "pwm3grp" };
  881. static const char * const vipgrp[] = { "vipgrp" };
  882. static const char * const vipromgrp[] = { "vipromgrp" };
  883. static const char * const warm_rstgrp[] = { "warm_rstgrp" };
  884. static const char * const cko0grp[] = { "cko0grp" };
  885. static const char * const cko1grp[] = { "cko1grp" };
  886. static const char * const sdmmc0grp[] = { "sdmmc0grp" };
  887. static const char * const sdmmc1grp[] = { "sdmmc1grp" };
  888. static const char * const sdmmc2grp[] = { "sdmmc2grp" };
  889. static const char * const sdmmc3grp[] = { "sdmmc3grp" };
  890. static const char * const sdmmc4grp[] = { "sdmmc4grp" };
  891. static const char * const sdmmc5grp[] = { "sdmmc5grp" };
  892. static const char * const usb0_utmi_drvbusgrp[] = { "usb0_utmi_drvbusgrp" };
  893. static const char * const usb1_utmi_drvbusgrp[] = { "usb1_utmi_drvbusgrp" };
  894. static const char * const usb1_dp_dngrp[] = { "usb1_dp_dngrp" };
  895. static const char * const
  896. uart1_route_io_usb1grp[] = { "uart1_route_io_usb1grp" };
  897. static const char * const pulse_countgrp[] = { "pulse_countgrp" };
  898. static const char * const i2smclkgrp[] = { "i2smclkgrp" };
  899. static const char * const i2s_ext_clk_inputgrp[] = { "i2s_ext_clk_inputgrp" };
  900. static const char * const i2sgrp[] = { "i2sgrp" };
  901. static const char * const i2s_no_dingrp[] = { "i2s_no_dingrp" };
  902. static const char * const i2s_6chngrp[] = { "i2s_6chngrp" };
  903. static const char * const ac97grp[] = { "ac97grp" };
  904. static const char * const nandgrp[] = { "nandgrp" };
  905. static const char * const spi0grp[] = { "spi0grp" };
  906. static const char * const spi1grp[] = { "spi1grp" };
  907. static const char * const gpsgrp[] = { "gpsgrp" };
  908. static const struct sirfsoc_pmx_func sirfsoc_pmx_functions[] = {
  909. SIRFSOC_PMX_FUNCTION("lcd_16bits", lcd_16bitsgrp, lcd_16bits_padmux),
  910. SIRFSOC_PMX_FUNCTION("lcd_18bits", lcd_18bitsgrp, lcd_18bits_padmux),
  911. SIRFSOC_PMX_FUNCTION("lcd_24bits", lcd_24bitsgrp, lcd_24bits_padmux),
  912. SIRFSOC_PMX_FUNCTION("lcdrom", lcdromgrp, lcdrom_padmux),
  913. SIRFSOC_PMX_FUNCTION("uart0", uart0grp, uart0_padmux),
  914. SIRFSOC_PMX_FUNCTION("uart0_nostreamctrl",
  915. uart0_nostreamctrlgrp, uart0_nostreamctrl_padmux),
  916. SIRFSOC_PMX_FUNCTION("uart1", uart1grp, uart1_padmux),
  917. SIRFSOC_PMX_FUNCTION("uart2", uart2grp, uart2_padmux),
  918. SIRFSOC_PMX_FUNCTION("uart2_nostreamctrl",
  919. uart2_nostreamctrlgrp, uart2_nostreamctrl_padmux),
  920. SIRFSOC_PMX_FUNCTION("usp0", usp0grp, usp0_padmux),
  921. SIRFSOC_PMX_FUNCTION("usp0_uart_nostreamctrl",
  922. usp0_uart_nostreamctrl_grp, usp0_uart_nostreamctrl_padmux),
  923. SIRFSOC_PMX_FUNCTION("usp0_only_utfs",
  924. usp0_only_utfs_grp, usp0_only_utfs_padmux),
  925. SIRFSOC_PMX_FUNCTION("usp0_only_urfs",
  926. usp0_only_urfs_grp, usp0_only_urfs_padmux),
  927. SIRFSOC_PMX_FUNCTION("usp1", usp1grp, usp1_padmux),
  928. SIRFSOC_PMX_FUNCTION("usp1_uart_nostreamctrl",
  929. usp1_uart_nostreamctrl_grp, usp1_uart_nostreamctrl_padmux),
  930. SIRFSOC_PMX_FUNCTION("usp2", usp2grp, usp2_padmux),
  931. SIRFSOC_PMX_FUNCTION("usp2_uart_nostreamctrl",
  932. usp2_uart_nostreamctrl_grp, usp2_uart_nostreamctrl_padmux),
  933. SIRFSOC_PMX_FUNCTION("i2c0", i2c0grp, i2c0_padmux),
  934. SIRFSOC_PMX_FUNCTION("i2c1", i2c1grp, i2c1_padmux),
  935. SIRFSOC_PMX_FUNCTION("pwm0", pwm0grp, pwm0_padmux),
  936. SIRFSOC_PMX_FUNCTION("pwm1", pwm1grp, pwm1_padmux),
  937. SIRFSOC_PMX_FUNCTION("pwm2", pwm2grp, pwm2_padmux),
  938. SIRFSOC_PMX_FUNCTION("pwm3", pwm3grp, pwm3_padmux),
  939. SIRFSOC_PMX_FUNCTION("vip", vipgrp, vip_padmux),
  940. SIRFSOC_PMX_FUNCTION("viprom", vipromgrp, viprom_padmux),
  941. SIRFSOC_PMX_FUNCTION("warm_rst", warm_rstgrp, warm_rst_padmux),
  942. SIRFSOC_PMX_FUNCTION("cko0", cko0grp, cko0_padmux),
  943. SIRFSOC_PMX_FUNCTION("cko1", cko1grp, cko1_padmux),
  944. SIRFSOC_PMX_FUNCTION("sdmmc0", sdmmc0grp, sdmmc0_padmux),
  945. SIRFSOC_PMX_FUNCTION("sdmmc1", sdmmc1grp, sdmmc1_padmux),
  946. SIRFSOC_PMX_FUNCTION("sdmmc2", sdmmc2grp, sdmmc2_padmux),
  947. SIRFSOC_PMX_FUNCTION("sdmmc3", sdmmc3grp, sdmmc3_padmux),
  948. SIRFSOC_PMX_FUNCTION("sdmmc4", sdmmc4grp, sdmmc4_padmux),
  949. SIRFSOC_PMX_FUNCTION("sdmmc5", sdmmc5grp, sdmmc5_padmux),
  950. SIRFSOC_PMX_FUNCTION("usb0_utmi_drvbus",
  951. usb0_utmi_drvbusgrp, usb0_utmi_drvbus_padmux),
  952. SIRFSOC_PMX_FUNCTION("usb1_utmi_drvbus",
  953. usb1_utmi_drvbusgrp, usb1_utmi_drvbus_padmux),
  954. SIRFSOC_PMX_FUNCTION("usb1_dp_dn", usb1_dp_dngrp, usb1_dp_dn_padmux),
  955. SIRFSOC_PMX_FUNCTION("uart1_route_io_usb1",
  956. uart1_route_io_usb1grp, uart1_route_io_usb1_padmux),
  957. SIRFSOC_PMX_FUNCTION("pulse_count", pulse_countgrp, pulse_count_padmux),
  958. SIRFSOC_PMX_FUNCTION("i2s_mclk", i2smclkgrp, i2s_mclk_padmux),
  959. SIRFSOC_PMX_FUNCTION("i2s_ext_clk_input", i2s_ext_clk_inputgrp,
  960. i2s_ext_clk_input_padmux),
  961. SIRFSOC_PMX_FUNCTION("i2s", i2sgrp, i2s_padmux),
  962. SIRFSOC_PMX_FUNCTION("i2s_no_din", i2s_no_dingrp, i2s_no_din_padmux),
  963. SIRFSOC_PMX_FUNCTION("i2s_6chn", i2s_6chngrp, i2s_6chn_padmux),
  964. SIRFSOC_PMX_FUNCTION("ac97", ac97grp, ac97_padmux),
  965. SIRFSOC_PMX_FUNCTION("nand", nandgrp, nand_padmux),
  966. SIRFSOC_PMX_FUNCTION("spi0", spi0grp, spi0_padmux),
  967. SIRFSOC_PMX_FUNCTION("spi1", spi1grp, spi1_padmux),
  968. SIRFSOC_PMX_FUNCTION("gps", gpsgrp, gps_padmux),
  969. };
  970. struct sirfsoc_pinctrl_data prima2_pinctrl_data = {
  971. (struct pinctrl_pin_desc *)sirfsoc_pads,
  972. ARRAY_SIZE(sirfsoc_pads),
  973. (struct sirfsoc_pin_group *)sirfsoc_pin_groups,
  974. ARRAY_SIZE(sirfsoc_pin_groups),
  975. (struct sirfsoc_pmx_func *)sirfsoc_pmx_functions,
  976. ARRAY_SIZE(sirfsoc_pmx_functions),
  977. };