pinctrl-mdm9607.c 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2021, Konrad Dybcio <[email protected]>
  4. *
  5. * based on pinctrl-msm8916.c
  6. */
  7. #include <linux/module.h>
  8. #include <linux/of.h>
  9. #include <linux/platform_device.h>
  10. #include <linux/pinctrl/pinctrl.h>
  11. #include "pinctrl-msm.h"
  12. static const struct pinctrl_pin_desc mdm9607_pins[] = {
  13. PINCTRL_PIN(0, "GPIO_0"),
  14. PINCTRL_PIN(1, "GPIO_1"),
  15. PINCTRL_PIN(2, "GPIO_2"),
  16. PINCTRL_PIN(3, "GPIO_3"),
  17. PINCTRL_PIN(4, "GPIO_4"),
  18. PINCTRL_PIN(5, "GPIO_5"),
  19. PINCTRL_PIN(6, "GPIO_6"),
  20. PINCTRL_PIN(7, "GPIO_7"),
  21. PINCTRL_PIN(8, "GPIO_8"),
  22. PINCTRL_PIN(9, "GPIO_9"),
  23. PINCTRL_PIN(10, "GPIO_10"),
  24. PINCTRL_PIN(11, "GPIO_11"),
  25. PINCTRL_PIN(12, "GPIO_12"),
  26. PINCTRL_PIN(13, "GPIO_13"),
  27. PINCTRL_PIN(14, "GPIO_14"),
  28. PINCTRL_PIN(15, "GPIO_15"),
  29. PINCTRL_PIN(16, "GPIO_16"),
  30. PINCTRL_PIN(17, "GPIO_17"),
  31. PINCTRL_PIN(18, "GPIO_18"),
  32. PINCTRL_PIN(19, "GPIO_19"),
  33. PINCTRL_PIN(20, "GPIO_20"),
  34. PINCTRL_PIN(21, "GPIO_21"),
  35. PINCTRL_PIN(22, "GPIO_22"),
  36. PINCTRL_PIN(23, "GPIO_23"),
  37. PINCTRL_PIN(24, "GPIO_24"),
  38. PINCTRL_PIN(25, "GPIO_25"),
  39. PINCTRL_PIN(26, "GPIO_26"),
  40. PINCTRL_PIN(27, "GPIO_27"),
  41. PINCTRL_PIN(28, "GPIO_28"),
  42. PINCTRL_PIN(29, "GPIO_29"),
  43. PINCTRL_PIN(30, "GPIO_30"),
  44. PINCTRL_PIN(31, "GPIO_31"),
  45. PINCTRL_PIN(32, "GPIO_32"),
  46. PINCTRL_PIN(33, "GPIO_33"),
  47. PINCTRL_PIN(34, "GPIO_34"),
  48. PINCTRL_PIN(35, "GPIO_35"),
  49. PINCTRL_PIN(36, "GPIO_36"),
  50. PINCTRL_PIN(37, "GPIO_37"),
  51. PINCTRL_PIN(38, "GPIO_38"),
  52. PINCTRL_PIN(39, "GPIO_39"),
  53. PINCTRL_PIN(40, "GPIO_40"),
  54. PINCTRL_PIN(41, "GPIO_41"),
  55. PINCTRL_PIN(42, "GPIO_42"),
  56. PINCTRL_PIN(43, "GPIO_43"),
  57. PINCTRL_PIN(44, "GPIO_44"),
  58. PINCTRL_PIN(45, "GPIO_45"),
  59. PINCTRL_PIN(46, "GPIO_46"),
  60. PINCTRL_PIN(47, "GPIO_47"),
  61. PINCTRL_PIN(48, "GPIO_48"),
  62. PINCTRL_PIN(49, "GPIO_49"),
  63. PINCTRL_PIN(50, "GPIO_50"),
  64. PINCTRL_PIN(51, "GPIO_51"),
  65. PINCTRL_PIN(52, "GPIO_52"),
  66. PINCTRL_PIN(53, "GPIO_53"),
  67. PINCTRL_PIN(54, "GPIO_54"),
  68. PINCTRL_PIN(55, "GPIO_55"),
  69. PINCTRL_PIN(56, "GPIO_56"),
  70. PINCTRL_PIN(57, "GPIO_57"),
  71. PINCTRL_PIN(58, "GPIO_58"),
  72. PINCTRL_PIN(59, "GPIO_59"),
  73. PINCTRL_PIN(60, "GPIO_60"),
  74. PINCTRL_PIN(61, "GPIO_61"),
  75. PINCTRL_PIN(62, "GPIO_62"),
  76. PINCTRL_PIN(63, "GPIO_63"),
  77. PINCTRL_PIN(64, "GPIO_64"),
  78. PINCTRL_PIN(65, "GPIO_65"),
  79. PINCTRL_PIN(66, "GPIO_66"),
  80. PINCTRL_PIN(67, "GPIO_67"),
  81. PINCTRL_PIN(68, "GPIO_68"),
  82. PINCTRL_PIN(69, "GPIO_69"),
  83. PINCTRL_PIN(70, "GPIO_70"),
  84. PINCTRL_PIN(71, "GPIO_71"),
  85. PINCTRL_PIN(72, "GPIO_72"),
  86. PINCTRL_PIN(73, "GPIO_73"),
  87. PINCTRL_PIN(74, "GPIO_74"),
  88. PINCTRL_PIN(75, "GPIO_75"),
  89. PINCTRL_PIN(76, "GPIO_76"),
  90. PINCTRL_PIN(77, "GPIO_77"),
  91. PINCTRL_PIN(78, "GPIO_78"),
  92. PINCTRL_PIN(79, "GPIO_79"),
  93. PINCTRL_PIN(80, "SDC1_CLK"),
  94. PINCTRL_PIN(81, "SDC1_CMD"),
  95. PINCTRL_PIN(82, "SDC1_DATA"),
  96. PINCTRL_PIN(83, "SDC2_CLK"),
  97. PINCTRL_PIN(84, "SDC2_CMD"),
  98. PINCTRL_PIN(85, "SDC2_DATA"),
  99. PINCTRL_PIN(86, "QDSD_CLK"),
  100. PINCTRL_PIN(87, "QDSD_CMD"),
  101. PINCTRL_PIN(88, "QDSD_DATA0"),
  102. PINCTRL_PIN(89, "QDSD_DATA1"),
  103. PINCTRL_PIN(90, "QDSD_DATA2"),
  104. PINCTRL_PIN(91, "QDSD_DATA3"),
  105. };
  106. #define DECLARE_MSM_GPIO_PINS(pin) \
  107. static const unsigned int gpio##pin##_pins[] = { pin }
  108. DECLARE_MSM_GPIO_PINS(0);
  109. DECLARE_MSM_GPIO_PINS(1);
  110. DECLARE_MSM_GPIO_PINS(2);
  111. DECLARE_MSM_GPIO_PINS(3);
  112. DECLARE_MSM_GPIO_PINS(4);
  113. DECLARE_MSM_GPIO_PINS(5);
  114. DECLARE_MSM_GPIO_PINS(6);
  115. DECLARE_MSM_GPIO_PINS(7);
  116. DECLARE_MSM_GPIO_PINS(8);
  117. DECLARE_MSM_GPIO_PINS(9);
  118. DECLARE_MSM_GPIO_PINS(10);
  119. DECLARE_MSM_GPIO_PINS(11);
  120. DECLARE_MSM_GPIO_PINS(12);
  121. DECLARE_MSM_GPIO_PINS(13);
  122. DECLARE_MSM_GPIO_PINS(14);
  123. DECLARE_MSM_GPIO_PINS(15);
  124. DECLARE_MSM_GPIO_PINS(16);
  125. DECLARE_MSM_GPIO_PINS(17);
  126. DECLARE_MSM_GPIO_PINS(18);
  127. DECLARE_MSM_GPIO_PINS(19);
  128. DECLARE_MSM_GPIO_PINS(20);
  129. DECLARE_MSM_GPIO_PINS(21);
  130. DECLARE_MSM_GPIO_PINS(22);
  131. DECLARE_MSM_GPIO_PINS(23);
  132. DECLARE_MSM_GPIO_PINS(24);
  133. DECLARE_MSM_GPIO_PINS(25);
  134. DECLARE_MSM_GPIO_PINS(26);
  135. DECLARE_MSM_GPIO_PINS(27);
  136. DECLARE_MSM_GPIO_PINS(28);
  137. DECLARE_MSM_GPIO_PINS(29);
  138. DECLARE_MSM_GPIO_PINS(30);
  139. DECLARE_MSM_GPIO_PINS(31);
  140. DECLARE_MSM_GPIO_PINS(32);
  141. DECLARE_MSM_GPIO_PINS(33);
  142. DECLARE_MSM_GPIO_PINS(34);
  143. DECLARE_MSM_GPIO_PINS(35);
  144. DECLARE_MSM_GPIO_PINS(36);
  145. DECLARE_MSM_GPIO_PINS(37);
  146. DECLARE_MSM_GPIO_PINS(38);
  147. DECLARE_MSM_GPIO_PINS(39);
  148. DECLARE_MSM_GPIO_PINS(40);
  149. DECLARE_MSM_GPIO_PINS(41);
  150. DECLARE_MSM_GPIO_PINS(42);
  151. DECLARE_MSM_GPIO_PINS(43);
  152. DECLARE_MSM_GPIO_PINS(44);
  153. DECLARE_MSM_GPIO_PINS(45);
  154. DECLARE_MSM_GPIO_PINS(46);
  155. DECLARE_MSM_GPIO_PINS(47);
  156. DECLARE_MSM_GPIO_PINS(48);
  157. DECLARE_MSM_GPIO_PINS(49);
  158. DECLARE_MSM_GPIO_PINS(50);
  159. DECLARE_MSM_GPIO_PINS(51);
  160. DECLARE_MSM_GPIO_PINS(52);
  161. DECLARE_MSM_GPIO_PINS(53);
  162. DECLARE_MSM_GPIO_PINS(54);
  163. DECLARE_MSM_GPIO_PINS(55);
  164. DECLARE_MSM_GPIO_PINS(56);
  165. DECLARE_MSM_GPIO_PINS(57);
  166. DECLARE_MSM_GPIO_PINS(58);
  167. DECLARE_MSM_GPIO_PINS(59);
  168. DECLARE_MSM_GPIO_PINS(60);
  169. DECLARE_MSM_GPIO_PINS(61);
  170. DECLARE_MSM_GPIO_PINS(62);
  171. DECLARE_MSM_GPIO_PINS(63);
  172. DECLARE_MSM_GPIO_PINS(64);
  173. DECLARE_MSM_GPIO_PINS(65);
  174. DECLARE_MSM_GPIO_PINS(66);
  175. DECLARE_MSM_GPIO_PINS(67);
  176. DECLARE_MSM_GPIO_PINS(68);
  177. DECLARE_MSM_GPIO_PINS(69);
  178. DECLARE_MSM_GPIO_PINS(70);
  179. DECLARE_MSM_GPIO_PINS(71);
  180. DECLARE_MSM_GPIO_PINS(72);
  181. DECLARE_MSM_GPIO_PINS(73);
  182. DECLARE_MSM_GPIO_PINS(74);
  183. DECLARE_MSM_GPIO_PINS(75);
  184. DECLARE_MSM_GPIO_PINS(76);
  185. DECLARE_MSM_GPIO_PINS(77);
  186. DECLARE_MSM_GPIO_PINS(78);
  187. DECLARE_MSM_GPIO_PINS(79);
  188. static const unsigned int sdc1_clk_pins[] = { 80 };
  189. static const unsigned int sdc1_cmd_pins[] = { 81 };
  190. static const unsigned int sdc1_data_pins[] = { 82 };
  191. static const unsigned int sdc2_clk_pins[] = { 83 };
  192. static const unsigned int sdc2_cmd_pins[] = { 84 };
  193. static const unsigned int sdc2_data_pins[] = { 85 };
  194. static const unsigned int qdsd_clk_pins[] = { 86 };
  195. static const unsigned int qdsd_cmd_pins[] = { 87 };
  196. static const unsigned int qdsd_data0_pins[] = { 88 };
  197. static const unsigned int qdsd_data1_pins[] = { 89 };
  198. static const unsigned int qdsd_data2_pins[] = { 90 };
  199. static const unsigned int qdsd_data3_pins[] = { 91 };
  200. #define FUNCTION(fname) \
  201. [msm_mux_##fname] = { \
  202. .name = #fname, \
  203. .groups = fname##_groups, \
  204. .ngroups = ARRAY_SIZE(fname##_groups), \
  205. }
  206. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  207. { \
  208. .name = "gpio" #id, \
  209. .pins = gpio##id##_pins, \
  210. .npins = ARRAY_SIZE(gpio##id##_pins), \
  211. .funcs = (int[]){ \
  212. msm_mux_gpio, \
  213. msm_mux_##f1, \
  214. msm_mux_##f2, \
  215. msm_mux_##f3, \
  216. msm_mux_##f4, \
  217. msm_mux_##f5, \
  218. msm_mux_##f6, \
  219. msm_mux_##f7, \
  220. msm_mux_##f8, \
  221. msm_mux_##f9 \
  222. }, \
  223. .nfuncs = 10, \
  224. .ctl_reg = 0x1000 * id, \
  225. .io_reg = 0x4 + 0x1000 * id, \
  226. .intr_cfg_reg = 0x8 + 0x1000 * id, \
  227. .intr_status_reg = 0xc + 0x1000 * id, \
  228. .intr_target_reg = 0x8 + 0x1000 * id, \
  229. .mux_bit = 2, \
  230. .pull_bit = 0, \
  231. .drv_bit = 6, \
  232. .oe_bit = 9, \
  233. .in_bit = 0, \
  234. .out_bit = 1, \
  235. .intr_enable_bit = 0, \
  236. .intr_status_bit = 0, \
  237. .intr_target_bit = 5, \
  238. .intr_target_kpss_val = 4, \
  239. .intr_raw_status_bit = 4, \
  240. .intr_polarity_bit = 1, \
  241. .intr_detection_bit = 2, \
  242. .intr_detection_width = 2, \
  243. }
  244. #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
  245. { \
  246. .name = #pg_name, \
  247. .pins = pg_name##_pins, \
  248. .npins = ARRAY_SIZE(pg_name##_pins), \
  249. .ctl_reg = ctl, \
  250. .io_reg = 0, \
  251. .intr_cfg_reg = 0, \
  252. .intr_status_reg = 0, \
  253. .intr_target_reg = 0, \
  254. .mux_bit = -1, \
  255. .pull_bit = pull, \
  256. .drv_bit = drv, \
  257. .oe_bit = -1, \
  258. .in_bit = -1, \
  259. .out_bit = -1, \
  260. .intr_enable_bit = -1, \
  261. .intr_status_bit = -1, \
  262. .intr_target_bit = -1, \
  263. .intr_target_kpss_val = -1, \
  264. .intr_raw_status_bit = -1, \
  265. .intr_polarity_bit = -1, \
  266. .intr_detection_bit = -1, \
  267. .intr_detection_width = -1, \
  268. }
  269. enum mdm9607_functions {
  270. msm_mux_adsp_ext,
  271. msm_mux_atest_bbrx0,
  272. msm_mux_atest_bbrx1,
  273. msm_mux_atest_char,
  274. msm_mux_atest_char0,
  275. msm_mux_atest_char1,
  276. msm_mux_atest_char2,
  277. msm_mux_atest_char3,
  278. msm_mux_atest_combodac_to_gpio_native,
  279. msm_mux_atest_gpsadc_dtest0_native,
  280. msm_mux_atest_gpsadc_dtest1_native,
  281. msm_mux_atest_tsens,
  282. msm_mux_backlight_en_b,
  283. msm_mux_bimc_dte0,
  284. msm_mux_bimc_dte1,
  285. msm_mux_blsp1_spi,
  286. msm_mux_blsp2_spi,
  287. msm_mux_blsp3_spi,
  288. msm_mux_blsp_i2c1,
  289. msm_mux_blsp_i2c2,
  290. msm_mux_blsp_i2c3,
  291. msm_mux_blsp_i2c4,
  292. msm_mux_blsp_i2c5,
  293. msm_mux_blsp_i2c6,
  294. msm_mux_blsp_spi1,
  295. msm_mux_blsp_spi2,
  296. msm_mux_blsp_spi3,
  297. msm_mux_blsp_spi4,
  298. msm_mux_blsp_spi5,
  299. msm_mux_blsp_spi6,
  300. msm_mux_blsp_uart1,
  301. msm_mux_blsp_uart2,
  302. msm_mux_blsp_uart3,
  303. msm_mux_blsp_uart4,
  304. msm_mux_blsp_uart5,
  305. msm_mux_blsp_uart6,
  306. msm_mux_blsp_uim1,
  307. msm_mux_blsp_uim2,
  308. msm_mux_codec_int,
  309. msm_mux_codec_rst,
  310. msm_mux_coex_uart,
  311. msm_mux_cri_trng,
  312. msm_mux_cri_trng0,
  313. msm_mux_cri_trng1,
  314. msm_mux_dbg_out,
  315. msm_mux_ebi0_wrcdc,
  316. msm_mux_ebi2_a,
  317. msm_mux_ebi2_a_d_8_b,
  318. msm_mux_ebi2_lcd,
  319. msm_mux_ebi2_lcd_cs_n_b,
  320. msm_mux_ebi2_lcd_te_b,
  321. msm_mux_eth_irq,
  322. msm_mux_eth_rst,
  323. msm_mux_gcc_gp1_clk_a,
  324. msm_mux_gcc_gp1_clk_b,
  325. msm_mux_gcc_gp2_clk_a,
  326. msm_mux_gcc_gp2_clk_b,
  327. msm_mux_gcc_gp3_clk_a,
  328. msm_mux_gcc_gp3_clk_b,
  329. msm_mux_gcc_plltest,
  330. msm_mux_gcc_tlmm,
  331. msm_mux_gmac_mdio,
  332. msm_mux_gpio,
  333. msm_mux_gsm0_tx,
  334. msm_mux_lcd_rst,
  335. msm_mux_ldo_en,
  336. msm_mux_ldo_update,
  337. msm_mux_m_voc,
  338. msm_mux_modem_tsync,
  339. msm_mux_nav_ptp_pps_in_a,
  340. msm_mux_nav_ptp_pps_in_b,
  341. msm_mux_nav_tsync_out_a,
  342. msm_mux_nav_tsync_out_b,
  343. msm_mux_pa_indicator,
  344. msm_mux_pbs0,
  345. msm_mux_pbs1,
  346. msm_mux_pbs2,
  347. msm_mux_pri_mi2s_data0_a,
  348. msm_mux_pri_mi2s_data1_a,
  349. msm_mux_pri_mi2s_mclk_a,
  350. msm_mux_pri_mi2s_sck_a,
  351. msm_mux_pri_mi2s_ws_a,
  352. msm_mux_prng_rosc,
  353. msm_mux_ptp_pps_out_a,
  354. msm_mux_ptp_pps_out_b,
  355. msm_mux_pwr_crypto_enabled_a,
  356. msm_mux_pwr_crypto_enabled_b,
  357. msm_mux_pwr_modem_enabled_a,
  358. msm_mux_pwr_modem_enabled_b,
  359. msm_mux_pwr_nav_enabled_a,
  360. msm_mux_pwr_nav_enabled_b,
  361. msm_mux_qdss_cti_trig_in_a0,
  362. msm_mux_qdss_cti_trig_in_a1,
  363. msm_mux_qdss_cti_trig_in_b0,
  364. msm_mux_qdss_cti_trig_in_b1,
  365. msm_mux_qdss_cti_trig_out_a0,
  366. msm_mux_qdss_cti_trig_out_a1,
  367. msm_mux_qdss_cti_trig_out_b0,
  368. msm_mux_qdss_cti_trig_out_b1,
  369. msm_mux_qdss_traceclk_a,
  370. msm_mux_qdss_traceclk_b,
  371. msm_mux_qdss_tracectl_a,
  372. msm_mux_qdss_tracectl_b,
  373. msm_mux_qdss_tracedata_a,
  374. msm_mux_qdss_tracedata_b,
  375. msm_mux_rcm_marker1,
  376. msm_mux_rcm_marker2,
  377. msm_mux_sd_write,
  378. msm_mux_sec_mi2s,
  379. msm_mux_sensor_en,
  380. msm_mux_sensor_int2,
  381. msm_mux_sensor_int3,
  382. msm_mux_sensor_rst,
  383. msm_mux_ssbi1,
  384. msm_mux_ssbi2,
  385. msm_mux_touch_rst,
  386. msm_mux_ts_int,
  387. msm_mux_uim1_clk,
  388. msm_mux_uim1_data,
  389. msm_mux_uim1_present,
  390. msm_mux_uim1_reset,
  391. msm_mux_uim2_clk,
  392. msm_mux_uim2_data,
  393. msm_mux_uim2_present,
  394. msm_mux_uim2_reset,
  395. msm_mux_uim_batt,
  396. msm_mux_wlan_en1,
  397. msm_mux__,
  398. };
  399. static const char * const gpio_groups[] = {
  400. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  401. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  402. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  403. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  404. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  405. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  406. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  407. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  408. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  409. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  410. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  411. "gpio78", "gpio79",
  412. };
  413. static const char * const blsp_spi3_groups[] = {
  414. "gpio0", "gpio1", "gpio2", "gpio3",
  415. };
  416. static const char * const blsp_uart3_groups[] = {
  417. "gpio0", "gpio1", "gpio2", "gpio3",
  418. };
  419. static const char * const qdss_tracedata_a_groups[] = {
  420. "gpio0", "gpio1", "gpio4", "gpio5", "gpio20", "gpio21", "gpio22",
  421. "gpio23", "gpio24", "gpio25", "gpio26", "gpio75", "gpio76", "gpio77",
  422. "gpio78", "gpio79",
  423. };
  424. static const char * const bimc_dte1_groups[] = {
  425. "gpio1", "gpio24",
  426. };
  427. static const char * const blsp_i2c3_groups[] = {
  428. "gpio2", "gpio3",
  429. };
  430. static const char * const qdss_traceclk_a_groups[] = {
  431. "gpio2",
  432. };
  433. static const char * const bimc_dte0_groups[] = {
  434. "gpio2", "gpio15",
  435. };
  436. static const char * const qdss_cti_trig_in_a1_groups[] = {
  437. "gpio3",
  438. };
  439. static const char * const blsp_spi2_groups[] = {
  440. "gpio4", "gpio5", "gpio6", "gpio7",
  441. };
  442. static const char * const blsp_uart2_groups[] = {
  443. "gpio4", "gpio5", "gpio6", "gpio7",
  444. };
  445. static const char * const blsp_uim2_groups[] = {
  446. "gpio4", "gpio5",
  447. };
  448. static const char * const blsp_i2c2_groups[] = {
  449. "gpio6", "gpio7",
  450. };
  451. static const char * const qdss_tracectl_a_groups[] = {
  452. "gpio6",
  453. };
  454. static const char * const sensor_int2_groups[] = {
  455. "gpio8",
  456. };
  457. static const char * const blsp_spi5_groups[] = {
  458. "gpio8", "gpio9", "gpio10", "gpio11",
  459. };
  460. static const char * const blsp_uart5_groups[] = {
  461. "gpio8", "gpio9", "gpio10", "gpio11",
  462. };
  463. static const char * const ebi2_lcd_groups[] = {
  464. "gpio8", "gpio11", "gpio74", "gpio78",
  465. };
  466. static const char * const m_voc_groups[] = {
  467. "gpio8", "gpio78",
  468. };
  469. static const char * const sensor_int3_groups[] = {
  470. "gpio9",
  471. };
  472. static const char * const sensor_en_groups[] = {
  473. "gpio10",
  474. };
  475. static const char * const blsp_i2c5_groups[] = {
  476. "gpio10", "gpio11",
  477. };
  478. static const char * const ebi2_a_groups[] = {
  479. "gpio10",
  480. };
  481. static const char * const qdss_tracedata_b_groups[] = {
  482. "gpio10", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", "gpio46",
  483. "gpio47", "gpio48", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55",
  484. "gpio58", "gpio59",
  485. };
  486. static const char * const sensor_rst_groups[] = {
  487. "gpio11",
  488. };
  489. static const char * const blsp2_spi_groups[] = {
  490. "gpio11", "gpio13", "gpio77",
  491. };
  492. static const char * const blsp_spi1_groups[] = {
  493. "gpio12", "gpio13", "gpio14", "gpio15",
  494. };
  495. static const char * const blsp_uart1_groups[] = {
  496. "gpio12", "gpio13", "gpio14", "gpio15",
  497. };
  498. static const char * const blsp_uim1_groups[] = {
  499. "gpio12", "gpio13",
  500. };
  501. static const char * const blsp3_spi_groups[] = {
  502. "gpio12", "gpio26", "gpio76",
  503. };
  504. static const char * const gcc_gp2_clk_b_groups[] = {
  505. "gpio12",
  506. };
  507. static const char * const gcc_gp3_clk_b_groups[] = {
  508. "gpio13",
  509. };
  510. static const char * const blsp_i2c1_groups[] = {
  511. "gpio14", "gpio15",
  512. };
  513. static const char * const gcc_gp1_clk_b_groups[] = {
  514. "gpio14",
  515. };
  516. static const char * const blsp_spi4_groups[] = {
  517. "gpio16", "gpio17", "gpio18", "gpio19",
  518. };
  519. static const char * const blsp_uart4_groups[] = {
  520. "gpio16", "gpio17", "gpio18", "gpio19",
  521. };
  522. static const char * const rcm_marker1_groups[] = {
  523. "gpio18",
  524. };
  525. static const char * const blsp_i2c4_groups[] = {
  526. "gpio18", "gpio19",
  527. };
  528. static const char * const qdss_cti_trig_out_a1_groups[] = {
  529. "gpio18",
  530. };
  531. static const char * const rcm_marker2_groups[] = {
  532. "gpio19",
  533. };
  534. static const char * const qdss_cti_trig_out_a0_groups[] = {
  535. "gpio19",
  536. };
  537. static const char * const blsp_spi6_groups[] = {
  538. "gpio20", "gpio21", "gpio22", "gpio23",
  539. };
  540. static const char * const blsp_uart6_groups[] = {
  541. "gpio20", "gpio21", "gpio22", "gpio23",
  542. };
  543. static const char * const pri_mi2s_ws_a_groups[] = {
  544. "gpio20",
  545. };
  546. static const char * const ebi2_lcd_te_b_groups[] = {
  547. "gpio20",
  548. };
  549. static const char * const blsp1_spi_groups[] = {
  550. "gpio20", "gpio21", "gpio78",
  551. };
  552. static const char * const backlight_en_b_groups[] = {
  553. "gpio21",
  554. };
  555. static const char * const pri_mi2s_data0_a_groups[] = {
  556. "gpio21",
  557. };
  558. static const char * const pri_mi2s_data1_a_groups[] = {
  559. "gpio22",
  560. };
  561. static const char * const blsp_i2c6_groups[] = {
  562. "gpio22", "gpio23",
  563. };
  564. static const char * const ebi2_a_d_8_b_groups[] = {
  565. "gpio22",
  566. };
  567. static const char * const pri_mi2s_sck_a_groups[] = {
  568. "gpio23",
  569. };
  570. static const char * const ebi2_lcd_cs_n_b_groups[] = {
  571. "gpio23",
  572. };
  573. static const char * const touch_rst_groups[] = {
  574. "gpio24",
  575. };
  576. static const char * const pri_mi2s_mclk_a_groups[] = {
  577. "gpio24",
  578. };
  579. static const char * const pwr_nav_enabled_a_groups[] = {
  580. "gpio24",
  581. };
  582. static const char * const ts_int_groups[] = {
  583. "gpio25",
  584. };
  585. static const char * const sd_write_groups[] = {
  586. "gpio25",
  587. };
  588. static const char * const pwr_crypto_enabled_a_groups[] = {
  589. "gpio25",
  590. };
  591. static const char * const codec_rst_groups[] = {
  592. "gpio26",
  593. };
  594. static const char * const adsp_ext_groups[] = {
  595. "gpio26",
  596. };
  597. static const char * const atest_combodac_to_gpio_native_groups[] = {
  598. "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
  599. "gpio33", "gpio34", "gpio35", "gpio41", "gpio45", "gpio49", "gpio50",
  600. "gpio51", "gpio52", "gpio54", "gpio55", "gpio57", "gpio59",
  601. };
  602. static const char * const uim2_data_groups[] = {
  603. "gpio27",
  604. };
  605. static const char * const gmac_mdio_groups[] = {
  606. "gpio27", "gpio28",
  607. };
  608. static const char * const gcc_gp1_clk_a_groups[] = {
  609. "gpio27",
  610. };
  611. static const char * const uim2_clk_groups[] = {
  612. "gpio28",
  613. };
  614. static const char * const gcc_gp2_clk_a_groups[] = {
  615. "gpio28",
  616. };
  617. static const char * const eth_irq_groups[] = {
  618. "gpio29",
  619. };
  620. static const char * const uim2_reset_groups[] = {
  621. "gpio29",
  622. };
  623. static const char * const gcc_gp3_clk_a_groups[] = {
  624. "gpio29",
  625. };
  626. static const char * const eth_rst_groups[] = {
  627. "gpio30",
  628. };
  629. static const char * const uim2_present_groups[] = {
  630. "gpio30",
  631. };
  632. static const char * const prng_rosc_groups[] = {
  633. "gpio30",
  634. };
  635. static const char * const uim1_data_groups[] = {
  636. "gpio31",
  637. };
  638. static const char * const uim1_clk_groups[] = {
  639. "gpio32",
  640. };
  641. static const char * const uim1_reset_groups[] = {
  642. "gpio33",
  643. };
  644. static const char * const uim1_present_groups[] = {
  645. "gpio34",
  646. };
  647. static const char * const gcc_plltest_groups[] = {
  648. "gpio34", "gpio35",
  649. };
  650. static const char * const uim_batt_groups[] = {
  651. "gpio35",
  652. };
  653. static const char * const coex_uart_groups[] = {
  654. "gpio36", "gpio37",
  655. };
  656. static const char * const codec_int_groups[] = {
  657. "gpio38",
  658. };
  659. static const char * const qdss_cti_trig_in_a0_groups[] = {
  660. "gpio38",
  661. };
  662. static const char * const atest_bbrx1_groups[] = {
  663. "gpio39",
  664. };
  665. static const char * const cri_trng0_groups[] = {
  666. "gpio40",
  667. };
  668. static const char * const atest_bbrx0_groups[] = {
  669. "gpio40",
  670. };
  671. static const char * const cri_trng_groups[] = {
  672. "gpio42",
  673. };
  674. static const char * const qdss_cti_trig_in_b0_groups[] = {
  675. "gpio44",
  676. };
  677. static const char * const atest_gpsadc_dtest0_native_groups[] = {
  678. "gpio44",
  679. };
  680. static const char * const qdss_cti_trig_out_b0_groups[] = {
  681. "gpio45",
  682. };
  683. static const char * const qdss_tracectl_b_groups[] = {
  684. "gpio49",
  685. };
  686. static const char * const qdss_traceclk_b_groups[] = {
  687. "gpio50",
  688. };
  689. static const char * const pa_indicator_groups[] = {
  690. "gpio51",
  691. };
  692. static const char * const modem_tsync_groups[] = {
  693. "gpio53",
  694. };
  695. static const char * const nav_tsync_out_a_groups[] = {
  696. "gpio53",
  697. };
  698. static const char * const nav_ptp_pps_in_a_groups[] = {
  699. "gpio53",
  700. };
  701. static const char * const ptp_pps_out_a_groups[] = {
  702. "gpio53",
  703. };
  704. static const char * const gsm0_tx_groups[] = {
  705. "gpio55",
  706. };
  707. static const char * const qdss_cti_trig_in_b1_groups[] = {
  708. "gpio56",
  709. };
  710. static const char * const cri_trng1_groups[] = {
  711. "gpio57",
  712. };
  713. static const char * const qdss_cti_trig_out_b1_groups[] = {
  714. "gpio57",
  715. };
  716. static const char * const ssbi1_groups[] = {
  717. "gpio58",
  718. };
  719. static const char * const atest_gpsadc_dtest1_native_groups[] = {
  720. "gpio58",
  721. };
  722. static const char * const ssbi2_groups[] = {
  723. "gpio59",
  724. };
  725. static const char * const atest_char3_groups[] = {
  726. "gpio60",
  727. };
  728. static const char * const atest_char2_groups[] = {
  729. "gpio61",
  730. };
  731. static const char * const atest_char1_groups[] = {
  732. "gpio62",
  733. };
  734. static const char * const atest_char0_groups[] = {
  735. "gpio63",
  736. };
  737. static const char * const atest_char_groups[] = {
  738. "gpio64",
  739. };
  740. static const char * const ebi0_wrcdc_groups[] = {
  741. "gpio70",
  742. };
  743. static const char * const ldo_update_groups[] = {
  744. "gpio72",
  745. };
  746. static const char * const gcc_tlmm_groups[] = {
  747. "gpio72",
  748. };
  749. static const char * const ldo_en_groups[] = {
  750. "gpio73",
  751. };
  752. static const char * const dbg_out_groups[] = {
  753. "gpio73",
  754. };
  755. static const char * const atest_tsens_groups[] = {
  756. "gpio73",
  757. };
  758. static const char * const lcd_rst_groups[] = {
  759. "gpio74",
  760. };
  761. static const char * const wlan_en1_groups[] = {
  762. "gpio75",
  763. };
  764. static const char * const nav_tsync_out_b_groups[] = {
  765. "gpio75",
  766. };
  767. static const char * const nav_ptp_pps_in_b_groups[] = {
  768. "gpio75",
  769. };
  770. static const char * const ptp_pps_out_b_groups[] = {
  771. "gpio75",
  772. };
  773. static const char * const pbs0_groups[] = {
  774. "gpio76",
  775. };
  776. static const char * const sec_mi2s_groups[] = {
  777. "gpio76", "gpio77", "gpio78", "gpio79",
  778. };
  779. static const char * const pwr_modem_enabled_a_groups[] = {
  780. "gpio76",
  781. };
  782. static const char * const pbs1_groups[] = {
  783. "gpio77",
  784. };
  785. static const char * const pwr_modem_enabled_b_groups[] = {
  786. "gpio77",
  787. };
  788. static const char * const pbs2_groups[] = {
  789. "gpio78",
  790. };
  791. static const char * const pwr_nav_enabled_b_groups[] = {
  792. "gpio78",
  793. };
  794. static const char * const pwr_crypto_enabled_b_groups[] = {
  795. "gpio79",
  796. };
  797. static const struct msm_function mdm9607_functions[] = {
  798. FUNCTION(adsp_ext),
  799. FUNCTION(atest_bbrx0),
  800. FUNCTION(atest_bbrx1),
  801. FUNCTION(atest_char),
  802. FUNCTION(atest_char0),
  803. FUNCTION(atest_char1),
  804. FUNCTION(atest_char2),
  805. FUNCTION(atest_char3),
  806. FUNCTION(atest_combodac_to_gpio_native),
  807. FUNCTION(atest_gpsadc_dtest0_native),
  808. FUNCTION(atest_gpsadc_dtest1_native),
  809. FUNCTION(atest_tsens),
  810. FUNCTION(backlight_en_b),
  811. FUNCTION(bimc_dte0),
  812. FUNCTION(bimc_dte1),
  813. FUNCTION(blsp1_spi),
  814. FUNCTION(blsp2_spi),
  815. FUNCTION(blsp3_spi),
  816. FUNCTION(blsp_i2c1),
  817. FUNCTION(blsp_i2c2),
  818. FUNCTION(blsp_i2c3),
  819. FUNCTION(blsp_i2c4),
  820. FUNCTION(blsp_i2c5),
  821. FUNCTION(blsp_i2c6),
  822. FUNCTION(blsp_spi1),
  823. FUNCTION(blsp_spi2),
  824. FUNCTION(blsp_spi3),
  825. FUNCTION(blsp_spi4),
  826. FUNCTION(blsp_spi5),
  827. FUNCTION(blsp_spi6),
  828. FUNCTION(blsp_uart1),
  829. FUNCTION(blsp_uart2),
  830. FUNCTION(blsp_uart3),
  831. FUNCTION(blsp_uart4),
  832. FUNCTION(blsp_uart5),
  833. FUNCTION(blsp_uart6),
  834. FUNCTION(blsp_uim1),
  835. FUNCTION(blsp_uim2),
  836. FUNCTION(codec_int),
  837. FUNCTION(codec_rst),
  838. FUNCTION(coex_uart),
  839. FUNCTION(cri_trng),
  840. FUNCTION(cri_trng0),
  841. FUNCTION(cri_trng1),
  842. FUNCTION(dbg_out),
  843. FUNCTION(ebi0_wrcdc),
  844. FUNCTION(ebi2_a),
  845. FUNCTION(ebi2_a_d_8_b),
  846. FUNCTION(ebi2_lcd),
  847. FUNCTION(ebi2_lcd_cs_n_b),
  848. FUNCTION(ebi2_lcd_te_b),
  849. FUNCTION(eth_irq),
  850. FUNCTION(eth_rst),
  851. FUNCTION(gcc_gp1_clk_a),
  852. FUNCTION(gcc_gp1_clk_b),
  853. FUNCTION(gcc_gp2_clk_a),
  854. FUNCTION(gcc_gp2_clk_b),
  855. FUNCTION(gcc_gp3_clk_a),
  856. FUNCTION(gcc_gp3_clk_b),
  857. FUNCTION(gcc_plltest),
  858. FUNCTION(gcc_tlmm),
  859. FUNCTION(gmac_mdio),
  860. FUNCTION(gpio),
  861. FUNCTION(gsm0_tx),
  862. FUNCTION(lcd_rst),
  863. FUNCTION(ldo_en),
  864. FUNCTION(ldo_update),
  865. FUNCTION(m_voc),
  866. FUNCTION(modem_tsync),
  867. FUNCTION(nav_ptp_pps_in_a),
  868. FUNCTION(nav_ptp_pps_in_b),
  869. FUNCTION(nav_tsync_out_a),
  870. FUNCTION(nav_tsync_out_b),
  871. FUNCTION(pa_indicator),
  872. FUNCTION(pbs0),
  873. FUNCTION(pbs1),
  874. FUNCTION(pbs2),
  875. FUNCTION(pri_mi2s_data0_a),
  876. FUNCTION(pri_mi2s_data1_a),
  877. FUNCTION(pri_mi2s_mclk_a),
  878. FUNCTION(pri_mi2s_sck_a),
  879. FUNCTION(pri_mi2s_ws_a),
  880. FUNCTION(prng_rosc),
  881. FUNCTION(ptp_pps_out_a),
  882. FUNCTION(ptp_pps_out_b),
  883. FUNCTION(pwr_crypto_enabled_a),
  884. FUNCTION(pwr_crypto_enabled_b),
  885. FUNCTION(pwr_modem_enabled_a),
  886. FUNCTION(pwr_modem_enabled_b),
  887. FUNCTION(pwr_nav_enabled_a),
  888. FUNCTION(pwr_nav_enabled_b),
  889. FUNCTION(qdss_cti_trig_in_a0),
  890. FUNCTION(qdss_cti_trig_in_a1),
  891. FUNCTION(qdss_cti_trig_in_b0),
  892. FUNCTION(qdss_cti_trig_in_b1),
  893. FUNCTION(qdss_cti_trig_out_a0),
  894. FUNCTION(qdss_cti_trig_out_a1),
  895. FUNCTION(qdss_cti_trig_out_b0),
  896. FUNCTION(qdss_cti_trig_out_b1),
  897. FUNCTION(qdss_traceclk_a),
  898. FUNCTION(qdss_traceclk_b),
  899. FUNCTION(qdss_tracectl_a),
  900. FUNCTION(qdss_tracectl_b),
  901. FUNCTION(qdss_tracedata_a),
  902. FUNCTION(qdss_tracedata_b),
  903. FUNCTION(rcm_marker1),
  904. FUNCTION(rcm_marker2),
  905. FUNCTION(sd_write),
  906. FUNCTION(sec_mi2s),
  907. FUNCTION(sensor_en),
  908. FUNCTION(sensor_int2),
  909. FUNCTION(sensor_int3),
  910. FUNCTION(sensor_rst),
  911. FUNCTION(ssbi1),
  912. FUNCTION(ssbi2),
  913. FUNCTION(touch_rst),
  914. FUNCTION(ts_int),
  915. FUNCTION(uim1_clk),
  916. FUNCTION(uim1_data),
  917. FUNCTION(uim1_present),
  918. FUNCTION(uim1_reset),
  919. FUNCTION(uim2_clk),
  920. FUNCTION(uim2_data),
  921. FUNCTION(uim2_present),
  922. FUNCTION(uim2_reset),
  923. FUNCTION(uim_batt),
  924. FUNCTION(wlan_en1)
  925. };
  926. static const struct msm_pingroup mdm9607_groups[] = {
  927. PINGROUP(0, blsp_uart3, blsp_spi3, _, _, _, _, _, qdss_tracedata_a, _),
  928. PINGROUP(1, blsp_uart3, blsp_spi3, _, _, _, _, _, qdss_tracedata_a, bimc_dte1),
  929. PINGROUP(2, blsp_uart3, blsp_i2c3, blsp_spi3, _, _, _, _, _, qdss_traceclk_a),
  930. PINGROUP(3, blsp_uart3, blsp_i2c3, blsp_spi3, _, _, _, _, _, _),
  931. PINGROUP(4, blsp_spi2, blsp_uart2, blsp_uim2, _, _, _, _, qdss_tracedata_a, _),
  932. PINGROUP(5, blsp_spi2, blsp_uart2, blsp_uim2, _, _, _, _, qdss_tracedata_a, _),
  933. PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _),
  934. PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _),
  935. PINGROUP(8, blsp_spi5, blsp_uart5, ebi2_lcd, m_voc, _, _, _, _, _),
  936. PINGROUP(9, blsp_spi5, blsp_uart5, _, _, _, _, _, _, _),
  937. PINGROUP(10, blsp_spi5, blsp_i2c5, blsp_uart5, ebi2_a, _, _, qdss_tracedata_b, _, _),
  938. PINGROUP(11, blsp_spi5, blsp_i2c5, blsp_uart5, blsp2_spi, ebi2_lcd, _, _, _, _),
  939. PINGROUP(12, blsp_spi1, blsp_uart1, blsp_uim1, blsp3_spi, gcc_gp2_clk_b, _, _, _, _),
  940. PINGROUP(13, blsp_spi1, blsp_uart1, blsp_uim1, blsp2_spi, gcc_gp3_clk_b, _, _, _, _),
  941. PINGROUP(14, blsp_spi1, blsp_uart1, blsp_i2c1, gcc_gp1_clk_b, _, _, _, _, _),
  942. PINGROUP(15, blsp_spi1, blsp_uart1, blsp_i2c1, _, _, _, _, _, _),
  943. PINGROUP(16, blsp_spi4, blsp_uart4, _, _, _, _, _, _, _),
  944. PINGROUP(17, blsp_spi4, blsp_uart4, _, _, _, _, _, _, _),
  945. PINGROUP(18, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _),
  946. PINGROUP(19, blsp_spi4, blsp_uart4, blsp_i2c4, _, _, _, _, _, _),
  947. PINGROUP(20, blsp_spi6, blsp_uart6, pri_mi2s_ws_a, ebi2_lcd_te_b, blsp1_spi, _, _, _,
  948. qdss_tracedata_a),
  949. PINGROUP(21, blsp_spi6, blsp_uart6, pri_mi2s_data0_a, blsp1_spi, _, _, _, _, _),
  950. PINGROUP(22, blsp_spi6, blsp_uart6, pri_mi2s_data1_a, blsp_i2c6, ebi2_a_d_8_b, _, _, _, _),
  951. PINGROUP(23, blsp_spi6, blsp_uart6, pri_mi2s_sck_a, blsp_i2c6, ebi2_lcd_cs_n_b, _, _, _, _),
  952. PINGROUP(24, pri_mi2s_mclk_a, _, pwr_nav_enabled_a, _, _, _, _, qdss_tracedata_a,
  953. bimc_dte1),
  954. PINGROUP(25, sd_write, _, pwr_crypto_enabled_a, _, _, _, _, qdss_tracedata_a, _),
  955. PINGROUP(26, blsp3_spi, adsp_ext, _, qdss_tracedata_a, _, atest_combodac_to_gpio_native, _,
  956. _, _),
  957. PINGROUP(27, uim2_data, gmac_mdio, gcc_gp1_clk_a, _, _, atest_combodac_to_gpio_native, _, _,
  958. _),
  959. PINGROUP(28, uim2_clk, gmac_mdio, gcc_gp2_clk_a, _, _, atest_combodac_to_gpio_native, _, _,
  960. _),
  961. PINGROUP(29, uim2_reset, gcc_gp3_clk_a, _, _, atest_combodac_to_gpio_native, _, _, _, _),
  962. PINGROUP(30, uim2_present, prng_rosc, _, _, atest_combodac_to_gpio_native, _, _, _, _),
  963. PINGROUP(31, uim1_data, _, _, atest_combodac_to_gpio_native, _, _, _, _, _),
  964. PINGROUP(32, uim1_clk, _, _, atest_combodac_to_gpio_native, _, _, _, _, _),
  965. PINGROUP(33, uim1_reset, _, _, atest_combodac_to_gpio_native, _, _, _, _, _),
  966. PINGROUP(34, uim1_present, gcc_plltest, _, _, atest_combodac_to_gpio_native, _, _, _, _),
  967. PINGROUP(35, uim_batt, gcc_plltest, _, atest_combodac_to_gpio_native, _, _, _, _, _),
  968. PINGROUP(36, coex_uart, _, _, _, _, _, _, _, _),
  969. PINGROUP(37, coex_uart, _, _, _, _, _, _, _, _),
  970. PINGROUP(38, _, _, _, qdss_cti_trig_in_a0, _, _, _, _, _),
  971. PINGROUP(39, _, _, _, qdss_tracedata_b, _, atest_bbrx1, _, _, _),
  972. PINGROUP(40, _, cri_trng0, _, _, _, _, qdss_tracedata_b, _, atest_bbrx0),
  973. PINGROUP(41, _, _, _, _, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _),
  974. PINGROUP(42, _, cri_trng, _, _, qdss_tracedata_b, _, _, _, _),
  975. PINGROUP(43, _, _, _, _, qdss_tracedata_b, _, _, _, _),
  976. PINGROUP(44, _, _, qdss_cti_trig_in_b0, _, atest_gpsadc_dtest0_native, _, _, _, _),
  977. PINGROUP(45, _, _, qdss_cti_trig_out_b0, _, atest_combodac_to_gpio_native, _, _, _, _),
  978. PINGROUP(46, _, _, qdss_tracedata_b, _, _, _, _, _, _),
  979. PINGROUP(47, _, _, qdss_tracedata_b, _, _, _, _, _, _),
  980. PINGROUP(48, _, _, qdss_tracedata_b, _, _, _, _, _, _),
  981. PINGROUP(49, _, _, qdss_tracectl_b, _, atest_combodac_to_gpio_native, _, _, _, _),
  982. PINGROUP(50, _, _, qdss_traceclk_b, _, atest_combodac_to_gpio_native, _, _, _, _),
  983. PINGROUP(51, _, pa_indicator, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _,
  984. _),
  985. PINGROUP(52, _, _, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _),
  986. PINGROUP(53, _, modem_tsync, nav_tsync_out_a, nav_ptp_pps_in_a, ptp_pps_out_a,
  987. qdss_tracedata_b, _, _, _),
  988. PINGROUP(54, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _, _, _),
  989. PINGROUP(55, gsm0_tx, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _, _),
  990. PINGROUP(56, _, _, qdss_cti_trig_in_b1, _, _, _, _, _, _),
  991. PINGROUP(57, _, cri_trng1, _, qdss_cti_trig_out_b1, _, atest_combodac_to_gpio_native, _, _,
  992. _),
  993. PINGROUP(58, _, ssbi1, _, qdss_tracedata_b, _, atest_gpsadc_dtest1_native, _, _, _),
  994. PINGROUP(59, _, ssbi2, _, qdss_tracedata_b, _, atest_combodac_to_gpio_native, _, _, _),
  995. PINGROUP(60, atest_char3, _, _, _, _, _, _, _, _),
  996. PINGROUP(61, atest_char2, _, _, _, _, _, _, _, _),
  997. PINGROUP(62, atest_char1, _, _, _, _, _, _, _, _),
  998. PINGROUP(63, atest_char0, _, _, _, _, _, _, _, _),
  999. PINGROUP(64, atest_char, _, _, _, _, _, _, _, _),
  1000. PINGROUP(65, _, _, _, _, _, _, _, _, _),
  1001. PINGROUP(66, _, _, _, _, _, _, _, _, _),
  1002. PINGROUP(67, _, _, _, _, _, _, _, _, _),
  1003. PINGROUP(68, _, _, _, _, _, _, _, _, _),
  1004. PINGROUP(69, _, _, _, _, _, _, _, _, _),
  1005. PINGROUP(70, _, _, ebi0_wrcdc, _, _, _, _, _, _),
  1006. PINGROUP(71, _, _, _, _, _, _, _, _, _),
  1007. PINGROUP(72, ldo_update, _, gcc_tlmm, _, _, _, _, _, _),
  1008. PINGROUP(73, ldo_en, dbg_out, _, _, _, atest_tsens, _, _, _),
  1009. PINGROUP(74, ebi2_lcd, _, _, _, _, _, _, _, _),
  1010. PINGROUP(75, nav_tsync_out_b, nav_ptp_pps_in_b, ptp_pps_out_b, _, qdss_tracedata_a, _, _, _,
  1011. _),
  1012. PINGROUP(76, pbs0, sec_mi2s, blsp3_spi, pwr_modem_enabled_a, _, qdss_tracedata_a, _, _, _),
  1013. PINGROUP(77, pbs1, sec_mi2s, blsp2_spi, pwr_modem_enabled_b, _, qdss_tracedata_a, _, _, _),
  1014. PINGROUP(78, pbs2, sec_mi2s, blsp1_spi, ebi2_lcd, m_voc, pwr_nav_enabled_b, _,
  1015. qdss_tracedata_a, _),
  1016. PINGROUP(79, sec_mi2s, _, pwr_crypto_enabled_b, _, qdss_tracedata_a, _, _, _, _),
  1017. SDC_PINGROUP(sdc1_clk, 0x10a000, 13, 6),
  1018. SDC_PINGROUP(sdc1_cmd, 0x10a000, 11, 3),
  1019. SDC_PINGROUP(sdc1_data, 0x10a000, 9, 0),
  1020. SDC_PINGROUP(sdc2_clk, 0x109000, 14, 6),
  1021. SDC_PINGROUP(sdc2_cmd, 0x109000, 11, 3),
  1022. SDC_PINGROUP(sdc2_data, 0x109000, 9, 0),
  1023. SDC_PINGROUP(qdsd_clk, 0x19c000, 3, 0),
  1024. SDC_PINGROUP(qdsd_cmd, 0x19c000, 8, 5),
  1025. SDC_PINGROUP(qdsd_data0, 0x19c000, 13, 10),
  1026. SDC_PINGROUP(qdsd_data1, 0x19c000, 18, 15),
  1027. SDC_PINGROUP(qdsd_data2, 0x19c000, 23, 20),
  1028. SDC_PINGROUP(qdsd_data3, 0x19c000, 28, 25),
  1029. };
  1030. static const struct msm_pinctrl_soc_data mdm9607_pinctrl = {
  1031. .pins = mdm9607_pins,
  1032. .npins = ARRAY_SIZE(mdm9607_pins),
  1033. .functions = mdm9607_functions,
  1034. .nfunctions = ARRAY_SIZE(mdm9607_functions),
  1035. .groups = mdm9607_groups,
  1036. .ngroups = ARRAY_SIZE(mdm9607_groups),
  1037. .ngpios = 80,
  1038. };
  1039. static int mdm9607_pinctrl_probe(struct platform_device *pdev)
  1040. {
  1041. return msm_pinctrl_probe(pdev, &mdm9607_pinctrl);
  1042. }
  1043. static const struct of_device_id mdm9607_pinctrl_of_match[] = {
  1044. { .compatible = "qcom,mdm9607-tlmm", },
  1045. { }
  1046. };
  1047. static struct platform_driver mdm9607_pinctrl_driver = {
  1048. .driver = {
  1049. .name = "mdm9607-pinctrl",
  1050. .of_match_table = mdm9607_pinctrl_of_match,
  1051. },
  1052. .probe = mdm9607_pinctrl_probe,
  1053. .remove = msm_pinctrl_remove,
  1054. };
  1055. static int __init mdm9607_pinctrl_init(void)
  1056. {
  1057. return platform_driver_register(&mdm9607_pinctrl_driver);
  1058. }
  1059. arch_initcall(mdm9607_pinctrl_init);
  1060. static void __exit mdm9607_pinctrl_exit(void)
  1061. {
  1062. platform_driver_unregister(&mdm9607_pinctrl_driver);
  1063. }
  1064. module_exit(mdm9607_pinctrl_exit);
  1065. MODULE_DESCRIPTION("Qualcomm mdm9607 pinctrl driver");
  1066. MODULE_LICENSE("GPL v2");
  1067. MODULE_DEVICE_TABLE(of, mdm9607_pinctrl_of_match);