pinctrl-mdm9607.c 32 KB

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