pinctrl-ipq8074.c 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2017, The Linux Foundation. All rights reserved.
  4. */
  5. #include <linux/module.h>
  6. #include <linux/of.h>
  7. #include <linux/platform_device.h>
  8. #include "pinctrl-msm.h"
  9. #define REG_SIZE 0x1000
  10. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  11. { \
  12. .grp = PINCTRL_PINGROUP("gpio" #id, \
  13. gpio##id##_pins, \
  14. ARRAY_SIZE(gpio##id##_pins)), \
  15. .funcs = (int[]){ \
  16. msm_mux_gpio, /* gpio mode */ \
  17. msm_mux_##f1, \
  18. msm_mux_##f2, \
  19. msm_mux_##f3, \
  20. msm_mux_##f4, \
  21. msm_mux_##f5, \
  22. msm_mux_##f6, \
  23. msm_mux_##f7, \
  24. msm_mux_##f8, \
  25. msm_mux_##f9 \
  26. }, \
  27. .nfuncs = 10, \
  28. .ctl_reg = REG_SIZE * id, \
  29. .io_reg = 0x4 + REG_SIZE * id, \
  30. .intr_cfg_reg = 0x8 + REG_SIZE * id, \
  31. .intr_status_reg = 0xc + REG_SIZE * id, \
  32. .intr_target_reg = 0x8 + REG_SIZE * id, \
  33. .mux_bit = 2, \
  34. .pull_bit = 0, \
  35. .drv_bit = 6, \
  36. .oe_bit = 9, \
  37. .in_bit = 0, \
  38. .out_bit = 1, \
  39. .intr_enable_bit = 0, \
  40. .intr_status_bit = 0, \
  41. .intr_target_bit = 5, \
  42. .intr_target_kpss_val = 3, \
  43. .intr_raw_status_bit = 4, \
  44. .intr_polarity_bit = 1, \
  45. .intr_detection_bit = 2, \
  46. .intr_detection_width = 2, \
  47. }
  48. static const struct pinctrl_pin_desc ipq8074_pins[] = {
  49. PINCTRL_PIN(0, "GPIO_0"),
  50. PINCTRL_PIN(1, "GPIO_1"),
  51. PINCTRL_PIN(2, "GPIO_2"),
  52. PINCTRL_PIN(3, "GPIO_3"),
  53. PINCTRL_PIN(4, "GPIO_4"),
  54. PINCTRL_PIN(5, "GPIO_5"),
  55. PINCTRL_PIN(6, "GPIO_6"),
  56. PINCTRL_PIN(7, "GPIO_7"),
  57. PINCTRL_PIN(8, "GPIO_8"),
  58. PINCTRL_PIN(9, "GPIO_9"),
  59. PINCTRL_PIN(10, "GPIO_10"),
  60. PINCTRL_PIN(11, "GPIO_11"),
  61. PINCTRL_PIN(12, "GPIO_12"),
  62. PINCTRL_PIN(13, "GPIO_13"),
  63. PINCTRL_PIN(14, "GPIO_14"),
  64. PINCTRL_PIN(15, "GPIO_15"),
  65. PINCTRL_PIN(16, "GPIO_16"),
  66. PINCTRL_PIN(17, "GPIO_17"),
  67. PINCTRL_PIN(18, "GPIO_18"),
  68. PINCTRL_PIN(19, "GPIO_19"),
  69. PINCTRL_PIN(20, "GPIO_20"),
  70. PINCTRL_PIN(21, "GPIO_21"),
  71. PINCTRL_PIN(22, "GPIO_22"),
  72. PINCTRL_PIN(23, "GPIO_23"),
  73. PINCTRL_PIN(24, "GPIO_24"),
  74. PINCTRL_PIN(25, "GPIO_25"),
  75. PINCTRL_PIN(26, "GPIO_26"),
  76. PINCTRL_PIN(27, "GPIO_27"),
  77. PINCTRL_PIN(28, "GPIO_28"),
  78. PINCTRL_PIN(29, "GPIO_29"),
  79. PINCTRL_PIN(30, "GPIO_30"),
  80. PINCTRL_PIN(31, "GPIO_31"),
  81. PINCTRL_PIN(32, "GPIO_32"),
  82. PINCTRL_PIN(33, "GPIO_33"),
  83. PINCTRL_PIN(34, "GPIO_34"),
  84. PINCTRL_PIN(35, "GPIO_35"),
  85. PINCTRL_PIN(36, "GPIO_36"),
  86. PINCTRL_PIN(37, "GPIO_37"),
  87. PINCTRL_PIN(38, "GPIO_38"),
  88. PINCTRL_PIN(39, "GPIO_39"),
  89. PINCTRL_PIN(40, "GPIO_40"),
  90. PINCTRL_PIN(41, "GPIO_41"),
  91. PINCTRL_PIN(42, "GPIO_42"),
  92. PINCTRL_PIN(43, "GPIO_43"),
  93. PINCTRL_PIN(44, "GPIO_44"),
  94. PINCTRL_PIN(45, "GPIO_45"),
  95. PINCTRL_PIN(46, "GPIO_46"),
  96. PINCTRL_PIN(47, "GPIO_47"),
  97. PINCTRL_PIN(48, "GPIO_48"),
  98. PINCTRL_PIN(49, "GPIO_49"),
  99. PINCTRL_PIN(50, "GPIO_50"),
  100. PINCTRL_PIN(51, "GPIO_51"),
  101. PINCTRL_PIN(52, "GPIO_52"),
  102. PINCTRL_PIN(53, "GPIO_53"),
  103. PINCTRL_PIN(54, "GPIO_54"),
  104. PINCTRL_PIN(55, "GPIO_55"),
  105. PINCTRL_PIN(56, "GPIO_56"),
  106. PINCTRL_PIN(57, "GPIO_57"),
  107. PINCTRL_PIN(58, "GPIO_58"),
  108. PINCTRL_PIN(59, "GPIO_59"),
  109. PINCTRL_PIN(60, "GPIO_60"),
  110. PINCTRL_PIN(61, "GPIO_61"),
  111. PINCTRL_PIN(62, "GPIO_62"),
  112. PINCTRL_PIN(63, "GPIO_63"),
  113. PINCTRL_PIN(64, "GPIO_64"),
  114. PINCTRL_PIN(65, "GPIO_65"),
  115. PINCTRL_PIN(66, "GPIO_66"),
  116. PINCTRL_PIN(67, "GPIO_67"),
  117. PINCTRL_PIN(68, "GPIO_68"),
  118. PINCTRL_PIN(69, "GPIO_69"),
  119. };
  120. #define DECLARE_MSM_GPIO_PINS(pin) \
  121. static const unsigned int gpio##pin##_pins[] = { pin }
  122. DECLARE_MSM_GPIO_PINS(0);
  123. DECLARE_MSM_GPIO_PINS(1);
  124. DECLARE_MSM_GPIO_PINS(2);
  125. DECLARE_MSM_GPIO_PINS(3);
  126. DECLARE_MSM_GPIO_PINS(4);
  127. DECLARE_MSM_GPIO_PINS(5);
  128. DECLARE_MSM_GPIO_PINS(6);
  129. DECLARE_MSM_GPIO_PINS(7);
  130. DECLARE_MSM_GPIO_PINS(8);
  131. DECLARE_MSM_GPIO_PINS(9);
  132. DECLARE_MSM_GPIO_PINS(10);
  133. DECLARE_MSM_GPIO_PINS(11);
  134. DECLARE_MSM_GPIO_PINS(12);
  135. DECLARE_MSM_GPIO_PINS(13);
  136. DECLARE_MSM_GPIO_PINS(14);
  137. DECLARE_MSM_GPIO_PINS(15);
  138. DECLARE_MSM_GPIO_PINS(16);
  139. DECLARE_MSM_GPIO_PINS(17);
  140. DECLARE_MSM_GPIO_PINS(18);
  141. DECLARE_MSM_GPIO_PINS(19);
  142. DECLARE_MSM_GPIO_PINS(20);
  143. DECLARE_MSM_GPIO_PINS(21);
  144. DECLARE_MSM_GPIO_PINS(22);
  145. DECLARE_MSM_GPIO_PINS(23);
  146. DECLARE_MSM_GPIO_PINS(24);
  147. DECLARE_MSM_GPIO_PINS(25);
  148. DECLARE_MSM_GPIO_PINS(26);
  149. DECLARE_MSM_GPIO_PINS(27);
  150. DECLARE_MSM_GPIO_PINS(28);
  151. DECLARE_MSM_GPIO_PINS(29);
  152. DECLARE_MSM_GPIO_PINS(30);
  153. DECLARE_MSM_GPIO_PINS(31);
  154. DECLARE_MSM_GPIO_PINS(32);
  155. DECLARE_MSM_GPIO_PINS(33);
  156. DECLARE_MSM_GPIO_PINS(34);
  157. DECLARE_MSM_GPIO_PINS(35);
  158. DECLARE_MSM_GPIO_PINS(36);
  159. DECLARE_MSM_GPIO_PINS(37);
  160. DECLARE_MSM_GPIO_PINS(38);
  161. DECLARE_MSM_GPIO_PINS(39);
  162. DECLARE_MSM_GPIO_PINS(40);
  163. DECLARE_MSM_GPIO_PINS(41);
  164. DECLARE_MSM_GPIO_PINS(42);
  165. DECLARE_MSM_GPIO_PINS(43);
  166. DECLARE_MSM_GPIO_PINS(44);
  167. DECLARE_MSM_GPIO_PINS(45);
  168. DECLARE_MSM_GPIO_PINS(46);
  169. DECLARE_MSM_GPIO_PINS(47);
  170. DECLARE_MSM_GPIO_PINS(48);
  171. DECLARE_MSM_GPIO_PINS(49);
  172. DECLARE_MSM_GPIO_PINS(50);
  173. DECLARE_MSM_GPIO_PINS(51);
  174. DECLARE_MSM_GPIO_PINS(52);
  175. DECLARE_MSM_GPIO_PINS(53);
  176. DECLARE_MSM_GPIO_PINS(54);
  177. DECLARE_MSM_GPIO_PINS(55);
  178. DECLARE_MSM_GPIO_PINS(56);
  179. DECLARE_MSM_GPIO_PINS(57);
  180. DECLARE_MSM_GPIO_PINS(58);
  181. DECLARE_MSM_GPIO_PINS(59);
  182. DECLARE_MSM_GPIO_PINS(60);
  183. DECLARE_MSM_GPIO_PINS(61);
  184. DECLARE_MSM_GPIO_PINS(62);
  185. DECLARE_MSM_GPIO_PINS(63);
  186. DECLARE_MSM_GPIO_PINS(64);
  187. DECLARE_MSM_GPIO_PINS(65);
  188. DECLARE_MSM_GPIO_PINS(66);
  189. DECLARE_MSM_GPIO_PINS(67);
  190. DECLARE_MSM_GPIO_PINS(68);
  191. DECLARE_MSM_GPIO_PINS(69);
  192. enum ipq8074_functions {
  193. msm_mux_atest_char,
  194. msm_mux_atest_char0,
  195. msm_mux_atest_char1,
  196. msm_mux_atest_char2,
  197. msm_mux_atest_char3,
  198. msm_mux_audio_rxbclk,
  199. msm_mux_audio_rxd,
  200. msm_mux_audio_rxfsync,
  201. msm_mux_audio_rxmclk,
  202. msm_mux_audio_txbclk,
  203. msm_mux_audio_txd,
  204. msm_mux_audio_txfsync,
  205. msm_mux_audio_txmclk,
  206. msm_mux_blsp0_i2c,
  207. msm_mux_blsp0_spi,
  208. msm_mux_blsp0_uart,
  209. msm_mux_blsp1_i2c,
  210. msm_mux_blsp1_spi,
  211. msm_mux_blsp1_uart,
  212. msm_mux_blsp2_i2c,
  213. msm_mux_blsp2_spi,
  214. msm_mux_blsp2_uart,
  215. msm_mux_blsp3_i2c,
  216. msm_mux_blsp3_spi,
  217. msm_mux_blsp3_spi0,
  218. msm_mux_blsp3_spi1,
  219. msm_mux_blsp3_spi2,
  220. msm_mux_blsp3_spi3,
  221. msm_mux_blsp3_uart,
  222. msm_mux_blsp4_i2c0,
  223. msm_mux_blsp4_i2c1,
  224. msm_mux_blsp4_spi0,
  225. msm_mux_blsp4_spi1,
  226. msm_mux_blsp4_uart0,
  227. msm_mux_blsp4_uart1,
  228. msm_mux_blsp5_i2c,
  229. msm_mux_blsp5_spi,
  230. msm_mux_blsp5_uart,
  231. msm_mux_burn0,
  232. msm_mux_burn1,
  233. msm_mux_cri_trng,
  234. msm_mux_cri_trng0,
  235. msm_mux_cri_trng1,
  236. msm_mux_cxc0,
  237. msm_mux_cxc1,
  238. msm_mux_dbg_out,
  239. msm_mux_gcc_plltest,
  240. msm_mux_gcc_tlmm,
  241. msm_mux_gpio,
  242. msm_mux_ldo_en,
  243. msm_mux_ldo_update,
  244. msm_mux_led0,
  245. msm_mux_led1,
  246. msm_mux_led2,
  247. msm_mux_mac0_sa0,
  248. msm_mux_mac0_sa1,
  249. msm_mux_mac1_sa0,
  250. msm_mux_mac1_sa1,
  251. msm_mux_mac1_sa2,
  252. msm_mux_mac1_sa3,
  253. msm_mux_mac2_sa0,
  254. msm_mux_mac2_sa1,
  255. msm_mux_mdc,
  256. msm_mux_mdio,
  257. msm_mux_pcie0_clk,
  258. msm_mux_pcie0_rst,
  259. msm_mux_pcie0_wake,
  260. msm_mux_pcie1_clk,
  261. msm_mux_pcie1_rst,
  262. msm_mux_pcie1_wake,
  263. msm_mux_pcm_drx,
  264. msm_mux_pcm_dtx,
  265. msm_mux_pcm_fsync,
  266. msm_mux_pcm_pclk,
  267. msm_mux_pcm_zsi0,
  268. msm_mux_pcm_zsi1,
  269. msm_mux_prng_rosc,
  270. msm_mux_pta1_0,
  271. msm_mux_pta1_1,
  272. msm_mux_pta1_2,
  273. msm_mux_pta2_0,
  274. msm_mux_pta2_1,
  275. msm_mux_pta2_2,
  276. msm_mux_pwm0,
  277. msm_mux_pwm1,
  278. msm_mux_pwm2,
  279. msm_mux_pwm3,
  280. msm_mux_qdss_cti_trig_in_a0,
  281. msm_mux_qdss_cti_trig_in_a1,
  282. msm_mux_qdss_cti_trig_in_b0,
  283. msm_mux_qdss_cti_trig_in_b1,
  284. msm_mux_qdss_cti_trig_out_a0,
  285. msm_mux_qdss_cti_trig_out_a1,
  286. msm_mux_qdss_cti_trig_out_b0,
  287. msm_mux_qdss_cti_trig_out_b1,
  288. msm_mux_qdss_traceclk_a,
  289. msm_mux_qdss_traceclk_b,
  290. msm_mux_qdss_tracectl_a,
  291. msm_mux_qdss_tracectl_b,
  292. msm_mux_qdss_tracedata_a,
  293. msm_mux_qdss_tracedata_b,
  294. msm_mux_qpic,
  295. msm_mux_rx0,
  296. msm_mux_rx1,
  297. msm_mux_rx2,
  298. msm_mux_sd_card,
  299. msm_mux_sd_write,
  300. msm_mux_tsens_max,
  301. msm_mux_wci2a,
  302. msm_mux_wci2b,
  303. msm_mux_wci2c,
  304. msm_mux_wci2d,
  305. msm_mux_NA,
  306. };
  307. static const char * const qpic_groups[] = {
  308. "gpio0", /* LCD_TE */
  309. "gpio1", /* BUSY_N */
  310. "gpio2", /* LCD_RS_N */
  311. "gpio3", /* WE_N */
  312. "gpio4", /* OE_N */
  313. "gpio5", /* DATA[0] */
  314. "gpio6", /* DATA[1] */
  315. "gpio7", /* DATA[2] */
  316. "gpio8", /* DATA[3] */
  317. "gpio9", /* CS_CSR_LCD */
  318. "gpio10", /* CLE */
  319. "gpio11", /* NAND_CS_N */
  320. "gpio12", /* DATA[4] */
  321. "gpio13", /* DATA[5] */
  322. "gpio14", /* DATA[6] */
  323. "gpio15", /* DATA[7] */
  324. "gpio16", /* DATA[8] */
  325. "gpio17", /* ALE */
  326. };
  327. static const char * const blsp5_i2c_groups[] = {
  328. "gpio0", "gpio2",
  329. };
  330. static const char * const blsp5_spi_groups[] = {
  331. "gpio0", "gpio2", "gpio9", "gpio16",
  332. };
  333. static const char * const wci2a_groups[] = {
  334. "gpio0", "gpio2",
  335. };
  336. static const char * const blsp3_spi3_groups[] = {
  337. "gpio0", "gpio2", "gpio9",
  338. };
  339. static const char * const burn0_groups[] = {
  340. "gpio0",
  341. };
  342. static const char * const pcm_zsi0_groups[] = {
  343. "gpio1",
  344. };
  345. static const char * const blsp5_uart_groups[] = {
  346. "gpio0", "gpio2", "gpio9", "gpio16",
  347. };
  348. static const char * const mac1_sa2_groups[] = {
  349. "gpio1", "gpio11",
  350. };
  351. static const char * const blsp3_spi0_groups[] = {
  352. "gpio1", "gpio3", "gpio4",
  353. };
  354. static const char * const burn1_groups[] = {
  355. "gpio1",
  356. };
  357. static const char * const mac0_sa1_groups[] = {
  358. "gpio3", "gpio4",
  359. };
  360. static const char * const qdss_cti_trig_out_b0_groups[] = {
  361. "gpio3",
  362. };
  363. static const char * const qdss_cti_trig_in_b0_groups[] = {
  364. "gpio4",
  365. };
  366. static const char * const blsp4_uart0_groups[] = {
  367. "gpio5", "gpio6", "gpio7", "gpio8",
  368. };
  369. static const char * const blsp4_i2c0_groups[] = {
  370. "gpio5", "gpio6",
  371. };
  372. static const char * const blsp4_spi0_groups[] = {
  373. "gpio5", "gpio6", "gpio7", "gpio8",
  374. };
  375. static const char * const mac2_sa1_groups[] = {
  376. "gpio5", "gpio6",
  377. };
  378. static const char * const qdss_cti_trig_out_b1_groups[] = {
  379. "gpio5",
  380. };
  381. static const char * const qdss_cti_trig_in_b1_groups[] = {
  382. "gpio6",
  383. };
  384. static const char * const cxc0_groups[] = {
  385. "gpio9", "gpio16",
  386. };
  387. static const char * const mac1_sa3_groups[] = {
  388. "gpio9", "gpio16",
  389. };
  390. static const char * const qdss_cti_trig_in_a1_groups[] = {
  391. "gpio9",
  392. };
  393. static const char * const qdss_cti_trig_out_a1_groups[] = {
  394. "gpio10",
  395. };
  396. static const char * const wci2c_groups[] = {
  397. "gpio11", "gpio17",
  398. };
  399. static const char * const qdss_cti_trig_in_a0_groups[] = {
  400. "gpio11",
  401. };
  402. static const char * const qdss_cti_trig_out_a0_groups[] = {
  403. "gpio12",
  404. };
  405. static const char * const qdss_traceclk_b_groups[] = {
  406. "gpio14",
  407. };
  408. static const char * const qdss_tracectl_b_groups[] = {
  409. "gpio15",
  410. };
  411. static const char * const pcm_zsi1_groups[] = {
  412. "gpio16",
  413. };
  414. static const char * const qdss_tracedata_b_groups[] = {
  415. "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
  416. "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
  417. "gpio30", "gpio31",
  418. };
  419. static const char * const led0_groups[] = {
  420. "gpio18",
  421. };
  422. static const char * const pwm0_groups[] = {
  423. "gpio18", "gpio21", "gpio25", "gpio29", "gpio63",
  424. };
  425. static const char * const led1_groups[] = {
  426. "gpio19",
  427. };
  428. static const char * const pwm1_groups[] = {
  429. "gpio19", "gpio22", "gpio26", "gpio30", "gpio64",
  430. };
  431. static const char * const led2_groups[] = {
  432. "gpio20",
  433. };
  434. static const char * const pwm2_groups[] = {
  435. "gpio20", "gpio23", "gpio27", "gpio31", "gpio66",
  436. };
  437. static const char * const blsp4_uart1_groups[] = {
  438. "gpio21", "gpio22", "gpio23", "gpio24",
  439. };
  440. static const char * const blsp4_i2c1_groups[] = {
  441. "gpio21", "gpio22",
  442. };
  443. static const char * const blsp4_spi1_groups[] = {
  444. "gpio21", "gpio22", "gpio23", "gpio24",
  445. };
  446. static const char * const wci2d_groups[] = {
  447. "gpio21", "gpio22",
  448. };
  449. static const char * const mac1_sa1_groups[] = {
  450. "gpio21", "gpio22",
  451. };
  452. static const char * const blsp3_spi2_groups[] = {
  453. "gpio21", "gpio22", "gpio23",
  454. };
  455. static const char * const pwm3_groups[] = {
  456. "gpio24", "gpio28", "gpio32", "gpio67",
  457. };
  458. static const char * const audio_txmclk_groups[] = {
  459. "gpio25",
  460. };
  461. static const char * const audio_txbclk_groups[] = {
  462. "gpio26",
  463. };
  464. static const char * const audio_txfsync_groups[] = {
  465. "gpio27",
  466. };
  467. static const char * const audio_txd_groups[] = {
  468. "gpio28",
  469. };
  470. static const char * const audio_rxmclk_groups[] = {
  471. "gpio29",
  472. };
  473. static const char * const atest_char0_groups[] = {
  474. "gpio29",
  475. };
  476. static const char * const audio_rxbclk_groups[] = {
  477. "gpio30",
  478. };
  479. static const char * const atest_char1_groups[] = {
  480. "gpio30",
  481. };
  482. static const char * const audio_rxfsync_groups[] = {
  483. "gpio31",
  484. };
  485. static const char * const atest_char2_groups[] = {
  486. "gpio31",
  487. };
  488. static const char * const audio_rxd_groups[] = {
  489. "gpio32",
  490. };
  491. static const char * const atest_char3_groups[] = {
  492. "gpio32",
  493. };
  494. static const char * const pcm_drx_groups[] = {
  495. "gpio33",
  496. };
  497. static const char * const mac1_sa0_groups[] = {
  498. "gpio33", "gpio34",
  499. };
  500. static const char * const mac0_sa0_groups[] = {
  501. "gpio33", "gpio34",
  502. };
  503. static const char * const pcm_dtx_groups[] = {
  504. "gpio34",
  505. };
  506. static const char * const pcm_fsync_groups[] = {
  507. "gpio35",
  508. };
  509. static const char * const mac2_sa0_groups[] = {
  510. "gpio35", "gpio36",
  511. };
  512. static const char * const qdss_traceclk_a_groups[] = {
  513. "gpio35",
  514. };
  515. static const char * const pcm_pclk_groups[] = {
  516. "gpio36",
  517. };
  518. static const char * const qdss_tracectl_a_groups[] = {
  519. "gpio36",
  520. };
  521. static const char * const atest_char_groups[] = {
  522. "gpio37",
  523. };
  524. static const char * const qdss_tracedata_a_groups[] = {
  525. "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43",
  526. "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", "gpio50",
  527. "gpio51", "gpio52",
  528. };
  529. static const char * const blsp0_uart_groups[] = {
  530. "gpio38", "gpio39", "gpio40", "gpio41",
  531. };
  532. static const char * const blsp0_i2c_groups[] = {
  533. "gpio38", "gpio39",
  534. };
  535. static const char * const blsp0_spi_groups[] = {
  536. "gpio38", "gpio39", "gpio40", "gpio41",
  537. };
  538. static const char * const blsp1_uart_groups[] = {
  539. "gpio42", "gpio43", "gpio44", "gpio45",
  540. };
  541. static const char * const blsp1_i2c_groups[] = {
  542. "gpio42", "gpio43",
  543. };
  544. static const char * const blsp1_spi_groups[] = {
  545. "gpio42", "gpio43", "gpio44", "gpio45",
  546. };
  547. static const char * const blsp2_uart_groups[] = {
  548. "gpio46", "gpio47", "gpio48", "gpio49",
  549. };
  550. static const char * const blsp2_i2c_groups[] = {
  551. "gpio46", "gpio47",
  552. };
  553. static const char * const blsp2_spi_groups[] = {
  554. "gpio46", "gpio47", "gpio48", "gpio49",
  555. };
  556. static const char * const blsp3_uart_groups[] = {
  557. "gpio50", "gpio51", "gpio52", "gpio53",
  558. };
  559. static const char * const blsp3_i2c_groups[] = {
  560. "gpio50", "gpio51",
  561. };
  562. static const char * const blsp3_spi_groups[] = {
  563. "gpio50", "gpio51", "gpio52", "gpio53",
  564. };
  565. static const char * const pta2_0_groups[] = {
  566. "gpio54",
  567. };
  568. static const char * const wci2b_groups[] = {
  569. "gpio54", "gpio56",
  570. };
  571. static const char * const cxc1_groups[] = {
  572. "gpio54", "gpio56",
  573. };
  574. static const char * const blsp3_spi1_groups[] = {
  575. "gpio54", "gpio55", "gpio56",
  576. };
  577. static const char * const pta2_1_groups[] = {
  578. "gpio55",
  579. };
  580. static const char * const pta2_2_groups[] = {
  581. "gpio56",
  582. };
  583. static const char * const pcie0_clk_groups[] = {
  584. "gpio57",
  585. };
  586. static const char * const dbg_out_groups[] = {
  587. "gpio57",
  588. };
  589. static const char * const cri_trng0_groups[] = {
  590. "gpio57",
  591. };
  592. static const char * const pcie0_rst_groups[] = {
  593. "gpio58",
  594. };
  595. static const char * const cri_trng1_groups[] = {
  596. "gpio58",
  597. };
  598. static const char * const pcie0_wake_groups[] = {
  599. "gpio59",
  600. };
  601. static const char * const cri_trng_groups[] = {
  602. "gpio59",
  603. };
  604. static const char * const pcie1_clk_groups[] = {
  605. "gpio60",
  606. };
  607. static const char * const rx2_groups[] = {
  608. "gpio60",
  609. };
  610. static const char * const ldo_update_groups[] = {
  611. "gpio60",
  612. };
  613. static const char * const pcie1_rst_groups[] = {
  614. "gpio61",
  615. };
  616. static const char * const ldo_en_groups[] = {
  617. "gpio61",
  618. };
  619. static const char * const pcie1_wake_groups[] = {
  620. "gpio62",
  621. };
  622. static const char * const gcc_plltest_groups[] = {
  623. "gpio62", "gpio63",
  624. };
  625. static const char * const sd_card_groups[] = {
  626. "gpio63",
  627. };
  628. static const char * const pta1_1_groups[] = {
  629. "gpio64",
  630. };
  631. static const char * const rx1_groups[] = {
  632. "gpio64",
  633. };
  634. static const char * const pta1_2_groups[] = {
  635. "gpio65",
  636. };
  637. static const char * const gcc_tlmm_groups[] = {
  638. "gpio65",
  639. };
  640. static const char * const pta1_0_groups[] = {
  641. "gpio66",
  642. };
  643. static const char * const prng_rosc_groups[] = {
  644. "gpio66",
  645. };
  646. static const char * const sd_write_groups[] = {
  647. "gpio67",
  648. };
  649. static const char * const rx0_groups[] = {
  650. "gpio67",
  651. };
  652. static const char * const tsens_max_groups[] = {
  653. "gpio67",
  654. };
  655. static const char * const mdc_groups[] = {
  656. "gpio68",
  657. };
  658. static const char * const mdio_groups[] = {
  659. "gpio69",
  660. };
  661. static const char * const gpio_groups[] = {
  662. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  663. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  664. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  665. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  666. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  667. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  668. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  669. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  670. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  671. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69",
  672. };
  673. static const struct pinfunction ipq8074_functions[] = {
  674. MSM_PIN_FUNCTION(atest_char),
  675. MSM_PIN_FUNCTION(atest_char0),
  676. MSM_PIN_FUNCTION(atest_char1),
  677. MSM_PIN_FUNCTION(atest_char2),
  678. MSM_PIN_FUNCTION(atest_char3),
  679. MSM_PIN_FUNCTION(audio_rxbclk),
  680. MSM_PIN_FUNCTION(audio_rxd),
  681. MSM_PIN_FUNCTION(audio_rxfsync),
  682. MSM_PIN_FUNCTION(audio_rxmclk),
  683. MSM_PIN_FUNCTION(audio_txbclk),
  684. MSM_PIN_FUNCTION(audio_txd),
  685. MSM_PIN_FUNCTION(audio_txfsync),
  686. MSM_PIN_FUNCTION(audio_txmclk),
  687. MSM_PIN_FUNCTION(blsp0_i2c),
  688. MSM_PIN_FUNCTION(blsp0_spi),
  689. MSM_PIN_FUNCTION(blsp0_uart),
  690. MSM_PIN_FUNCTION(blsp1_i2c),
  691. MSM_PIN_FUNCTION(blsp1_spi),
  692. MSM_PIN_FUNCTION(blsp1_uart),
  693. MSM_PIN_FUNCTION(blsp2_i2c),
  694. MSM_PIN_FUNCTION(blsp2_spi),
  695. MSM_PIN_FUNCTION(blsp2_uart),
  696. MSM_PIN_FUNCTION(blsp3_i2c),
  697. MSM_PIN_FUNCTION(blsp3_spi),
  698. MSM_PIN_FUNCTION(blsp3_spi0),
  699. MSM_PIN_FUNCTION(blsp3_spi1),
  700. MSM_PIN_FUNCTION(blsp3_spi2),
  701. MSM_PIN_FUNCTION(blsp3_spi3),
  702. MSM_PIN_FUNCTION(blsp3_uart),
  703. MSM_PIN_FUNCTION(blsp4_i2c0),
  704. MSM_PIN_FUNCTION(blsp4_i2c1),
  705. MSM_PIN_FUNCTION(blsp4_spi0),
  706. MSM_PIN_FUNCTION(blsp4_spi1),
  707. MSM_PIN_FUNCTION(blsp4_uart0),
  708. MSM_PIN_FUNCTION(blsp4_uart1),
  709. MSM_PIN_FUNCTION(blsp5_i2c),
  710. MSM_PIN_FUNCTION(blsp5_spi),
  711. MSM_PIN_FUNCTION(blsp5_uart),
  712. MSM_PIN_FUNCTION(burn0),
  713. MSM_PIN_FUNCTION(burn1),
  714. MSM_PIN_FUNCTION(cri_trng),
  715. MSM_PIN_FUNCTION(cri_trng0),
  716. MSM_PIN_FUNCTION(cri_trng1),
  717. MSM_PIN_FUNCTION(cxc0),
  718. MSM_PIN_FUNCTION(cxc1),
  719. MSM_PIN_FUNCTION(dbg_out),
  720. MSM_PIN_FUNCTION(gcc_plltest),
  721. MSM_PIN_FUNCTION(gcc_tlmm),
  722. MSM_PIN_FUNCTION(gpio),
  723. MSM_PIN_FUNCTION(ldo_en),
  724. MSM_PIN_FUNCTION(ldo_update),
  725. MSM_PIN_FUNCTION(led0),
  726. MSM_PIN_FUNCTION(led1),
  727. MSM_PIN_FUNCTION(led2),
  728. MSM_PIN_FUNCTION(mac0_sa0),
  729. MSM_PIN_FUNCTION(mac0_sa1),
  730. MSM_PIN_FUNCTION(mac1_sa0),
  731. MSM_PIN_FUNCTION(mac1_sa1),
  732. MSM_PIN_FUNCTION(mac1_sa2),
  733. MSM_PIN_FUNCTION(mac1_sa3),
  734. MSM_PIN_FUNCTION(mac2_sa0),
  735. MSM_PIN_FUNCTION(mac2_sa1),
  736. MSM_PIN_FUNCTION(mdc),
  737. MSM_PIN_FUNCTION(mdio),
  738. MSM_PIN_FUNCTION(pcie0_clk),
  739. MSM_PIN_FUNCTION(pcie0_rst),
  740. MSM_PIN_FUNCTION(pcie0_wake),
  741. MSM_PIN_FUNCTION(pcie1_clk),
  742. MSM_PIN_FUNCTION(pcie1_rst),
  743. MSM_PIN_FUNCTION(pcie1_wake),
  744. MSM_PIN_FUNCTION(pcm_drx),
  745. MSM_PIN_FUNCTION(pcm_dtx),
  746. MSM_PIN_FUNCTION(pcm_fsync),
  747. MSM_PIN_FUNCTION(pcm_pclk),
  748. MSM_PIN_FUNCTION(pcm_zsi0),
  749. MSM_PIN_FUNCTION(pcm_zsi1),
  750. MSM_PIN_FUNCTION(prng_rosc),
  751. MSM_PIN_FUNCTION(pta1_0),
  752. MSM_PIN_FUNCTION(pta1_1),
  753. MSM_PIN_FUNCTION(pta1_2),
  754. MSM_PIN_FUNCTION(pta2_0),
  755. MSM_PIN_FUNCTION(pta2_1),
  756. MSM_PIN_FUNCTION(pta2_2),
  757. MSM_PIN_FUNCTION(pwm0),
  758. MSM_PIN_FUNCTION(pwm1),
  759. MSM_PIN_FUNCTION(pwm2),
  760. MSM_PIN_FUNCTION(pwm3),
  761. MSM_PIN_FUNCTION(qdss_cti_trig_in_a0),
  762. MSM_PIN_FUNCTION(qdss_cti_trig_in_a1),
  763. MSM_PIN_FUNCTION(qdss_cti_trig_in_b0),
  764. MSM_PIN_FUNCTION(qdss_cti_trig_in_b1),
  765. MSM_PIN_FUNCTION(qdss_cti_trig_out_a0),
  766. MSM_PIN_FUNCTION(qdss_cti_trig_out_a1),
  767. MSM_PIN_FUNCTION(qdss_cti_trig_out_b0),
  768. MSM_PIN_FUNCTION(qdss_cti_trig_out_b1),
  769. MSM_PIN_FUNCTION(qdss_traceclk_a),
  770. MSM_PIN_FUNCTION(qdss_traceclk_b),
  771. MSM_PIN_FUNCTION(qdss_tracectl_a),
  772. MSM_PIN_FUNCTION(qdss_tracectl_b),
  773. MSM_PIN_FUNCTION(qdss_tracedata_a),
  774. MSM_PIN_FUNCTION(qdss_tracedata_b),
  775. MSM_PIN_FUNCTION(qpic),
  776. MSM_PIN_FUNCTION(rx0),
  777. MSM_PIN_FUNCTION(rx1),
  778. MSM_PIN_FUNCTION(rx2),
  779. MSM_PIN_FUNCTION(sd_card),
  780. MSM_PIN_FUNCTION(sd_write),
  781. MSM_PIN_FUNCTION(tsens_max),
  782. MSM_PIN_FUNCTION(wci2a),
  783. MSM_PIN_FUNCTION(wci2b),
  784. MSM_PIN_FUNCTION(wci2c),
  785. MSM_PIN_FUNCTION(wci2d),
  786. };
  787. static const struct msm_pingroup ipq8074_groups[] = {
  788. PINGROUP(0, qpic, blsp5_uart, blsp5_i2c, blsp5_spi, wci2a,
  789. blsp3_spi3, NA, burn0, NA),
  790. PINGROUP(1, qpic, pcm_zsi0, mac1_sa2, blsp3_spi0, NA, burn1, NA, NA,
  791. NA),
  792. PINGROUP(2, qpic, blsp5_uart, blsp5_i2c, blsp5_spi, wci2a,
  793. blsp3_spi3, NA, NA, NA),
  794. PINGROUP(3, qpic, mac0_sa1, blsp3_spi0, qdss_cti_trig_out_b0, NA, NA,
  795. NA, NA, NA),
  796. PINGROUP(4, qpic, mac0_sa1, blsp3_spi0, qdss_cti_trig_in_b0, NA, NA,
  797. NA, NA, NA),
  798. PINGROUP(5, qpic, blsp4_uart0, blsp4_i2c0, blsp4_spi0, mac2_sa1,
  799. qdss_cti_trig_out_b1, NA, NA, NA),
  800. PINGROUP(6, qpic, blsp4_uart0, blsp4_i2c0, blsp4_spi0, mac2_sa1,
  801. qdss_cti_trig_in_b1, NA, NA, NA),
  802. PINGROUP(7, qpic, blsp4_uart0, blsp4_spi0, NA, NA, NA, NA, NA, NA),
  803. PINGROUP(8, qpic, blsp4_uart0, blsp4_spi0, NA, NA, NA, NA, NA, NA),
  804. PINGROUP(9, qpic, blsp5_uart, blsp5_spi, cxc0, mac1_sa3, blsp3_spi3,
  805. qdss_cti_trig_in_a1, NA, NA),
  806. PINGROUP(10, qpic, qdss_cti_trig_out_a1, NA, NA, NA, NA, NA, NA,
  807. NA),
  808. PINGROUP(11, qpic, wci2c, mac1_sa2, qdss_cti_trig_in_a0, NA, NA, NA,
  809. NA, NA),
  810. PINGROUP(12, qpic, qdss_cti_trig_out_a0, NA, NA, NA, NA, NA, NA,
  811. NA),
  812. PINGROUP(13, qpic, NA, NA, NA, NA, NA, NA, NA, NA),
  813. PINGROUP(14, qpic, qdss_traceclk_b, NA, NA, NA, NA, NA, NA, NA),
  814. PINGROUP(15, qpic, qdss_tracectl_b, NA, NA, NA, NA, NA, NA, NA),
  815. PINGROUP(16, qpic, blsp5_uart, pcm_zsi1, blsp5_spi, cxc0, mac1_sa3,
  816. qdss_tracedata_b, NA, NA),
  817. PINGROUP(17, qpic, wci2c, qdss_tracedata_b, NA, NA, NA, NA, NA, NA),
  818. PINGROUP(18, led0, pwm0, qdss_tracedata_b, NA, NA, NA, NA, NA, NA),
  819. PINGROUP(19, led1, pwm1, NA, qdss_tracedata_b, NA, NA, NA, NA, NA),
  820. PINGROUP(20, led2, pwm2, NA, qdss_tracedata_b, NA, NA, NA, NA, NA),
  821. PINGROUP(21, pwm0, blsp4_uart1, blsp4_i2c1, blsp4_spi1, wci2d, mac1_sa1,
  822. blsp3_spi2, NA, qdss_tracedata_b),
  823. PINGROUP(22, pwm1, blsp4_uart1, blsp4_i2c1, blsp4_spi1, wci2d, mac1_sa1,
  824. blsp3_spi2, NA, qdss_tracedata_b),
  825. PINGROUP(23, pwm2, blsp4_uart1, blsp4_spi1, blsp3_spi2, NA,
  826. qdss_tracedata_b, NA, NA, NA),
  827. PINGROUP(24, pwm3, blsp4_uart1, blsp4_spi1, NA, qdss_tracedata_b, NA,
  828. NA, NA, NA),
  829. PINGROUP(25, audio_txmclk, pwm0, NA, qdss_tracedata_b, NA, NA, NA, NA,
  830. NA),
  831. PINGROUP(26, audio_txbclk, pwm1, NA, qdss_tracedata_b, NA, NA, NA, NA,
  832. NA),
  833. PINGROUP(27, audio_txfsync, pwm2, NA, qdss_tracedata_b, NA, NA, NA,
  834. NA, NA),
  835. PINGROUP(28, audio_txd, pwm3, NA, qdss_tracedata_b, NA, NA, NA, NA,
  836. NA),
  837. PINGROUP(29, audio_rxmclk, pwm0, atest_char0, NA, qdss_tracedata_b,
  838. NA, NA, NA, NA),
  839. PINGROUP(30, audio_rxbclk, pwm1, atest_char1, NA, qdss_tracedata_b,
  840. NA, NA, NA, NA),
  841. PINGROUP(31, audio_rxfsync, pwm2, atest_char2, NA, qdss_tracedata_b,
  842. NA, NA, NA, NA),
  843. PINGROUP(32, audio_rxd, pwm3, atest_char3, NA, NA, NA, NA, NA, NA),
  844. PINGROUP(33, pcm_drx, mac1_sa0, mac0_sa0, NA, NA, NA, NA, NA, NA),
  845. PINGROUP(34, pcm_dtx, mac1_sa0, mac0_sa0, NA, NA, NA, NA, NA, NA),
  846. PINGROUP(35, pcm_fsync, mac2_sa0, qdss_traceclk_a, NA, NA, NA, NA, NA, NA),
  847. PINGROUP(36, pcm_pclk, mac2_sa0, NA, qdss_tracectl_a, NA, NA, NA, NA, NA),
  848. PINGROUP(37, atest_char, NA, qdss_tracedata_a, NA, NA, NA, NA, NA, NA),
  849. PINGROUP(38, blsp0_uart, blsp0_i2c, blsp0_spi, NA, qdss_tracedata_a,
  850. NA, NA, NA, NA),
  851. PINGROUP(39, blsp0_uart, blsp0_i2c, blsp0_spi, NA, qdss_tracedata_a,
  852. NA, NA, NA, NA),
  853. PINGROUP(40, blsp0_uart, blsp0_spi, NA, qdss_tracedata_a, NA, NA, NA,
  854. NA, NA),
  855. PINGROUP(41, blsp0_uart, blsp0_spi, NA, qdss_tracedata_a, NA, NA, NA,
  856. NA, NA),
  857. PINGROUP(42, blsp1_uart, blsp1_i2c, blsp1_spi, NA, qdss_tracedata_a,
  858. NA, NA, NA, NA),
  859. PINGROUP(43, blsp1_uart, blsp1_i2c, blsp1_spi, NA, qdss_tracedata_a,
  860. NA, NA, NA, NA),
  861. PINGROUP(44, blsp1_uart, blsp1_spi, NA, qdss_tracedata_a, NA, NA, NA,
  862. NA, NA),
  863. PINGROUP(45, blsp1_uart, blsp1_spi, qdss_tracedata_a, NA, NA, NA, NA,
  864. NA, NA),
  865. PINGROUP(46, blsp2_uart, blsp2_i2c, blsp2_spi, qdss_tracedata_a, NA,
  866. NA, NA, NA, NA),
  867. PINGROUP(47, blsp2_uart, blsp2_i2c, blsp2_spi, NA, qdss_tracedata_a,
  868. NA, NA, NA, NA),
  869. PINGROUP(48, blsp2_uart, blsp2_spi, NA, qdss_tracedata_a, NA, NA, NA,
  870. NA, NA),
  871. PINGROUP(49, blsp2_uart, blsp2_spi, NA, qdss_tracedata_a, NA, NA, NA,
  872. NA, NA),
  873. PINGROUP(50, blsp3_uart, blsp3_i2c, blsp3_spi, NA, qdss_tracedata_a,
  874. NA, NA, NA, NA),
  875. PINGROUP(51, blsp3_uart, blsp3_i2c, blsp3_spi, NA, qdss_tracedata_a,
  876. NA, NA, NA, NA),
  877. PINGROUP(52, blsp3_uart, blsp3_spi, NA, qdss_tracedata_a, NA, NA, NA,
  878. NA, NA),
  879. PINGROUP(53, blsp3_uart, blsp3_spi, NA, NA, NA, NA, NA, NA, NA),
  880. PINGROUP(54, pta2_0, wci2b, cxc1, blsp3_spi1, NA, NA, NA, NA, NA),
  881. PINGROUP(55, pta2_1, blsp3_spi1, NA, NA, NA, NA, NA, NA, NA),
  882. PINGROUP(56, pta2_2, wci2b, cxc1, blsp3_spi1, NA, NA, NA, NA, NA),
  883. PINGROUP(57, pcie0_clk, NA, dbg_out, cri_trng0, NA, NA, NA, NA, NA),
  884. PINGROUP(58, pcie0_rst, NA, cri_trng1, NA, NA, NA, NA, NA, NA),
  885. PINGROUP(59, pcie0_wake, NA, cri_trng, NA, NA, NA, NA, NA, NA),
  886. PINGROUP(60, pcie1_clk, rx2, ldo_update, NA, NA, NA, NA, NA, NA),
  887. PINGROUP(61, pcie1_rst, ldo_en, NA, NA, NA, NA, NA, NA, NA),
  888. PINGROUP(62, pcie1_wake, gcc_plltest, NA, NA, NA, NA, NA, NA, NA),
  889. PINGROUP(63, sd_card, pwm0, NA, gcc_plltest, NA, NA, NA, NA, NA),
  890. PINGROUP(64, pta1_1, pwm1, NA, rx1, NA, NA, NA, NA, NA),
  891. PINGROUP(65, pta1_2, NA, gcc_tlmm, NA, NA, NA, NA, NA, NA),
  892. PINGROUP(66, pta1_0, pwm2, prng_rosc, NA, NA, NA, NA, NA, NA),
  893. PINGROUP(67, sd_write, pwm3, rx0, tsens_max, NA, NA, NA, NA, NA),
  894. PINGROUP(68, mdc, NA, NA, NA, NA, NA, NA, NA, NA),
  895. PINGROUP(69, mdio, NA, NA, NA, NA, NA, NA, NA, NA),
  896. };
  897. static const struct msm_pinctrl_soc_data ipq8074_pinctrl = {
  898. .pins = ipq8074_pins,
  899. .npins = ARRAY_SIZE(ipq8074_pins),
  900. .functions = ipq8074_functions,
  901. .nfunctions = ARRAY_SIZE(ipq8074_functions),
  902. .groups = ipq8074_groups,
  903. .ngroups = ARRAY_SIZE(ipq8074_groups),
  904. .ngpios = 70,
  905. };
  906. static int ipq8074_pinctrl_probe(struct platform_device *pdev)
  907. {
  908. return msm_pinctrl_probe(pdev, &ipq8074_pinctrl);
  909. }
  910. static const struct of_device_id ipq8074_pinctrl_of_match[] = {
  911. { .compatible = "qcom,ipq8074-pinctrl", },
  912. { },
  913. };
  914. static struct platform_driver ipq8074_pinctrl_driver = {
  915. .driver = {
  916. .name = "ipq8074-pinctrl",
  917. .of_match_table = ipq8074_pinctrl_of_match,
  918. },
  919. .probe = ipq8074_pinctrl_probe,
  920. .remove_new = msm_pinctrl_remove,
  921. };
  922. static int __init ipq8074_pinctrl_init(void)
  923. {
  924. return platform_driver_register(&ipq8074_pinctrl_driver);
  925. }
  926. arch_initcall(ipq8074_pinctrl_init);
  927. static void __exit ipq8074_pinctrl_exit(void)
  928. {
  929. platform_driver_unregister(&ipq8074_pinctrl_driver);
  930. }
  931. module_exit(ipq8074_pinctrl_exit);
  932. MODULE_DESCRIPTION("Qualcomm ipq8074 pinctrl driver");
  933. MODULE_LICENSE("GPL v2");
  934. MODULE_DEVICE_TABLE(of, ipq8074_pinctrl_of_match);