pinctrl-atlas6.c 31 KB

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