xref: /linux/drivers/pinctrl/qcom/pinctrl-sdx75.c (revision f9bff0e31881d03badf191d3b0005839391f5f2b)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  */
5 
6 #include <linux/module.h>
7 #include <linux/of.h>
8 #include <linux/of_device.h>
9 #include <linux/platform_device.h>
10 #include "pinctrl-msm.h"
11 
12 #define REG_BASE	0x100000
13 #define REG_SIZE	0x1000
14 
15 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10)		\
16 	{								\
17 		.grp = PINCTRL_PINGROUP("gpio"#id, gpio##id##_pins,	\
18 			(unsigned int)ARRAY_SIZE(gpio##id##_pins)),	\
19 		.ctl_reg = REG_BASE + REG_SIZE * id,			\
20 		.io_reg = REG_BASE + 0x4 + REG_SIZE * id,		\
21 		.intr_cfg_reg = REG_BASE + 0x8 + REG_SIZE * id,		\
22 		.intr_status_reg = REG_BASE + 0xc + REG_SIZE * id,	\
23 		.intr_target_reg = REG_BASE + 0x8 + REG_SIZE * id,	\
24 		.mux_bit = 2,						\
25 		.pull_bit = 0,						\
26 		.drv_bit = 6,						\
27 		.egpio_enable = 12,					\
28 		.egpio_present = 11,					\
29 		.oe_bit = 9,						\
30 		.in_bit = 0,						\
31 		.out_bit = 1,						\
32 		.intr_enable_bit = 0,					\
33 		.intr_status_bit = 0,					\
34 		.intr_target_bit = 5,					\
35 		.intr_target_kpss_val = 3,				\
36 		.intr_raw_status_bit = 4,				\
37 		.intr_polarity_bit = 1,					\
38 		.intr_detection_bit = 2,				\
39 		.intr_detection_width = 2,				\
40 		.funcs = (int[]){					\
41 			msm_mux_gpio, /* gpio mode */			\
42 			msm_mux_##f1,					\
43 			msm_mux_##f2,					\
44 			msm_mux_##f3,					\
45 			msm_mux_##f4,					\
46 			msm_mux_##f5,					\
47 			msm_mux_##f6,					\
48 			msm_mux_##f7,					\
49 			msm_mux_##f8,					\
50 			msm_mux_##f9,					\
51 			msm_mux_##f10					\
52 		},							\
53 		.nfuncs = 11,						\
54 	}
55 
56 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)			\
57 	{								\
58 		.grp = PINCTRL_PINGROUP(#pg_name, pg_name##_pins,	\
59 			(unsigned int)ARRAY_SIZE(pg_name##_pins)),	\
60 		.ctl_reg = ctl,						\
61 		.io_reg = 0,						\
62 		.intr_cfg_reg = 0,					\
63 		.intr_status_reg = 0,					\
64 		.intr_target_reg = 0,					\
65 		.mux_bit = -1,						\
66 		.pull_bit = pull,					\
67 		.drv_bit = drv,						\
68 		.oe_bit = -1,						\
69 		.in_bit = -1,						\
70 		.out_bit = -1,						\
71 		.intr_enable_bit = -1,					\
72 		.intr_status_bit = -1,					\
73 		.intr_target_bit = -1,					\
74 		.intr_raw_status_bit = -1,				\
75 		.intr_polarity_bit = -1,				\
76 		.intr_detection_bit = -1,				\
77 		.intr_detection_width = -1,				\
78 	}
79 
80 static const struct pinctrl_pin_desc sdx75_pins[] = {
81 	PINCTRL_PIN(0, "GPIO_0"),
82 	PINCTRL_PIN(1, "GPIO_1"),
83 	PINCTRL_PIN(2, "GPIO_2"),
84 	PINCTRL_PIN(3, "GPIO_3"),
85 	PINCTRL_PIN(4, "GPIO_4"),
86 	PINCTRL_PIN(5, "GPIO_5"),
87 	PINCTRL_PIN(6, "GPIO_6"),
88 	PINCTRL_PIN(7, "GPIO_7"),
89 	PINCTRL_PIN(8, "GPIO_8"),
90 	PINCTRL_PIN(9, "GPIO_9"),
91 	PINCTRL_PIN(10, "GPIO_10"),
92 	PINCTRL_PIN(11, "GPIO_11"),
93 	PINCTRL_PIN(12, "GPIO_12"),
94 	PINCTRL_PIN(13, "GPIO_13"),
95 	PINCTRL_PIN(14, "GPIO_14"),
96 	PINCTRL_PIN(15, "GPIO_15"),
97 	PINCTRL_PIN(16, "GPIO_16"),
98 	PINCTRL_PIN(17, "GPIO_17"),
99 	PINCTRL_PIN(18, "GPIO_18"),
100 	PINCTRL_PIN(19, "GPIO_19"),
101 	PINCTRL_PIN(20, "GPIO_20"),
102 	PINCTRL_PIN(21, "GPIO_21"),
103 	PINCTRL_PIN(22, "GPIO_22"),
104 	PINCTRL_PIN(23, "GPIO_23"),
105 	PINCTRL_PIN(24, "GPIO_24"),
106 	PINCTRL_PIN(25, "GPIO_25"),
107 	PINCTRL_PIN(26, "GPIO_26"),
108 	PINCTRL_PIN(27, "GPIO_27"),
109 	PINCTRL_PIN(28, "GPIO_28"),
110 	PINCTRL_PIN(29, "GPIO_29"),
111 	PINCTRL_PIN(30, "GPIO_30"),
112 	PINCTRL_PIN(31, "GPIO_31"),
113 	PINCTRL_PIN(32, "GPIO_32"),
114 	PINCTRL_PIN(33, "GPIO_33"),
115 	PINCTRL_PIN(34, "GPIO_34"),
116 	PINCTRL_PIN(35, "GPIO_35"),
117 	PINCTRL_PIN(36, "GPIO_36"),
118 	PINCTRL_PIN(37, "GPIO_37"),
119 	PINCTRL_PIN(38, "GPIO_38"),
120 	PINCTRL_PIN(39, "GPIO_39"),
121 	PINCTRL_PIN(40, "GPIO_40"),
122 	PINCTRL_PIN(41, "GPIO_41"),
123 	PINCTRL_PIN(42, "GPIO_42"),
124 	PINCTRL_PIN(43, "GPIO_43"),
125 	PINCTRL_PIN(44, "GPIO_44"),
126 	PINCTRL_PIN(45, "GPIO_45"),
127 	PINCTRL_PIN(46, "GPIO_46"),
128 	PINCTRL_PIN(47, "GPIO_47"),
129 	PINCTRL_PIN(48, "GPIO_48"),
130 	PINCTRL_PIN(49, "GPIO_49"),
131 	PINCTRL_PIN(50, "GPIO_50"),
132 	PINCTRL_PIN(51, "GPIO_51"),
133 	PINCTRL_PIN(52, "GPIO_52"),
134 	PINCTRL_PIN(53, "GPIO_53"),
135 	PINCTRL_PIN(54, "GPIO_54"),
136 	PINCTRL_PIN(55, "GPIO_55"),
137 	PINCTRL_PIN(56, "GPIO_56"),
138 	PINCTRL_PIN(57, "GPIO_57"),
139 	PINCTRL_PIN(58, "GPIO_58"),
140 	PINCTRL_PIN(59, "GPIO_59"),
141 	PINCTRL_PIN(60, "GPIO_60"),
142 	PINCTRL_PIN(61, "GPIO_61"),
143 	PINCTRL_PIN(62, "GPIO_62"),
144 	PINCTRL_PIN(63, "GPIO_63"),
145 	PINCTRL_PIN(64, "GPIO_64"),
146 	PINCTRL_PIN(65, "GPIO_65"),
147 	PINCTRL_PIN(66, "GPIO_66"),
148 	PINCTRL_PIN(67, "GPIO_67"),
149 	PINCTRL_PIN(68, "GPIO_68"),
150 	PINCTRL_PIN(69, "GPIO_69"),
151 	PINCTRL_PIN(70, "GPIO_70"),
152 	PINCTRL_PIN(71, "GPIO_71"),
153 	PINCTRL_PIN(72, "GPIO_72"),
154 	PINCTRL_PIN(73, "GPIO_73"),
155 	PINCTRL_PIN(74, "GPIO_74"),
156 	PINCTRL_PIN(75, "GPIO_75"),
157 	PINCTRL_PIN(76, "GPIO_76"),
158 	PINCTRL_PIN(77, "GPIO_77"),
159 	PINCTRL_PIN(78, "GPIO_78"),
160 	PINCTRL_PIN(79, "GPIO_79"),
161 	PINCTRL_PIN(80, "GPIO_80"),
162 	PINCTRL_PIN(81, "GPIO_81"),
163 	PINCTRL_PIN(82, "GPIO_82"),
164 	PINCTRL_PIN(83, "GPIO_83"),
165 	PINCTRL_PIN(84, "GPIO_84"),
166 	PINCTRL_PIN(85, "GPIO_85"),
167 	PINCTRL_PIN(86, "GPIO_86"),
168 	PINCTRL_PIN(87, "GPIO_87"),
169 	PINCTRL_PIN(88, "GPIO_88"),
170 	PINCTRL_PIN(89, "GPIO_89"),
171 	PINCTRL_PIN(90, "GPIO_90"),
172 	PINCTRL_PIN(91, "GPIO_91"),
173 	PINCTRL_PIN(92, "GPIO_92"),
174 	PINCTRL_PIN(93, "GPIO_93"),
175 	PINCTRL_PIN(94, "GPIO_94"),
176 	PINCTRL_PIN(95, "GPIO_95"),
177 	PINCTRL_PIN(96, "GPIO_96"),
178 	PINCTRL_PIN(97, "GPIO_97"),
179 	PINCTRL_PIN(98, "GPIO_98"),
180 	PINCTRL_PIN(99, "GPIO_99"),
181 	PINCTRL_PIN(100, "GPIO_100"),
182 	PINCTRL_PIN(101, "GPIO_101"),
183 	PINCTRL_PIN(102, "GPIO_102"),
184 	PINCTRL_PIN(103, "GPIO_103"),
185 	PINCTRL_PIN(104, "GPIO_104"),
186 	PINCTRL_PIN(105, "GPIO_105"),
187 	PINCTRL_PIN(106, "GPIO_106"),
188 	PINCTRL_PIN(107, "GPIO_107"),
189 	PINCTRL_PIN(108, "GPIO_108"),
190 	PINCTRL_PIN(109, "GPIO_109"),
191 	PINCTRL_PIN(110, "GPIO_110"),
192 	PINCTRL_PIN(111, "GPIO_111"),
193 	PINCTRL_PIN(112, "GPIO_112"),
194 	PINCTRL_PIN(113, "GPIO_113"),
195 	PINCTRL_PIN(114, "GPIO_114"),
196 	PINCTRL_PIN(115, "GPIO_115"),
197 	PINCTRL_PIN(116, "GPIO_116"),
198 	PINCTRL_PIN(117, "GPIO_117"),
199 	PINCTRL_PIN(118, "GPIO_118"),
200 	PINCTRL_PIN(119, "GPIO_119"),
201 	PINCTRL_PIN(120, "GPIO_120"),
202 	PINCTRL_PIN(121, "GPIO_121"),
203 	PINCTRL_PIN(122, "GPIO_122"),
204 	PINCTRL_PIN(123, "GPIO_123"),
205 	PINCTRL_PIN(124, "GPIO_124"),
206 	PINCTRL_PIN(125, "GPIO_125"),
207 	PINCTRL_PIN(126, "GPIO_126"),
208 	PINCTRL_PIN(127, "GPIO_127"),
209 	PINCTRL_PIN(128, "GPIO_128"),
210 	PINCTRL_PIN(129, "GPIO_129"),
211 	PINCTRL_PIN(130, "GPIO_130"),
212 	PINCTRL_PIN(131, "GPIO_131"),
213 	PINCTRL_PIN(132, "GPIO_132"),
214 	PINCTRL_PIN(133, "SDC1_RCLK"),
215 	PINCTRL_PIN(134, "SDC1_CLK"),
216 	PINCTRL_PIN(135, "SDC1_CMD"),
217 	PINCTRL_PIN(136, "SDC1_DATA"),
218 	PINCTRL_PIN(137, "SDC2_CLK"),
219 	PINCTRL_PIN(138, "SDC2_CMD"),
220 	PINCTRL_PIN(139, "SDC2_DATA"),
221 };
222 
223 #define DECLARE_MSM_GPIO_PINS(pin)			 \
224 	static const unsigned int gpio##pin##_pins[] = {pin}
225 DECLARE_MSM_GPIO_PINS(0);
226 DECLARE_MSM_GPIO_PINS(1);
227 DECLARE_MSM_GPIO_PINS(2);
228 DECLARE_MSM_GPIO_PINS(3);
229 DECLARE_MSM_GPIO_PINS(4);
230 DECLARE_MSM_GPIO_PINS(5);
231 DECLARE_MSM_GPIO_PINS(6);
232 DECLARE_MSM_GPIO_PINS(7);
233 DECLARE_MSM_GPIO_PINS(8);
234 DECLARE_MSM_GPIO_PINS(9);
235 DECLARE_MSM_GPIO_PINS(10);
236 DECLARE_MSM_GPIO_PINS(11);
237 DECLARE_MSM_GPIO_PINS(12);
238 DECLARE_MSM_GPIO_PINS(13);
239 DECLARE_MSM_GPIO_PINS(14);
240 DECLARE_MSM_GPIO_PINS(15);
241 DECLARE_MSM_GPIO_PINS(16);
242 DECLARE_MSM_GPIO_PINS(17);
243 DECLARE_MSM_GPIO_PINS(18);
244 DECLARE_MSM_GPIO_PINS(19);
245 DECLARE_MSM_GPIO_PINS(20);
246 DECLARE_MSM_GPIO_PINS(21);
247 DECLARE_MSM_GPIO_PINS(22);
248 DECLARE_MSM_GPIO_PINS(23);
249 DECLARE_MSM_GPIO_PINS(24);
250 DECLARE_MSM_GPIO_PINS(25);
251 DECLARE_MSM_GPIO_PINS(26);
252 DECLARE_MSM_GPIO_PINS(27);
253 DECLARE_MSM_GPIO_PINS(28);
254 DECLARE_MSM_GPIO_PINS(29);
255 DECLARE_MSM_GPIO_PINS(30);
256 DECLARE_MSM_GPIO_PINS(31);
257 DECLARE_MSM_GPIO_PINS(32);
258 DECLARE_MSM_GPIO_PINS(33);
259 DECLARE_MSM_GPIO_PINS(34);
260 DECLARE_MSM_GPIO_PINS(35);
261 DECLARE_MSM_GPIO_PINS(36);
262 DECLARE_MSM_GPIO_PINS(37);
263 DECLARE_MSM_GPIO_PINS(38);
264 DECLARE_MSM_GPIO_PINS(39);
265 DECLARE_MSM_GPIO_PINS(40);
266 DECLARE_MSM_GPIO_PINS(41);
267 DECLARE_MSM_GPIO_PINS(42);
268 DECLARE_MSM_GPIO_PINS(43);
269 DECLARE_MSM_GPIO_PINS(44);
270 DECLARE_MSM_GPIO_PINS(45);
271 DECLARE_MSM_GPIO_PINS(46);
272 DECLARE_MSM_GPIO_PINS(47);
273 DECLARE_MSM_GPIO_PINS(48);
274 DECLARE_MSM_GPIO_PINS(49);
275 DECLARE_MSM_GPIO_PINS(50);
276 DECLARE_MSM_GPIO_PINS(51);
277 DECLARE_MSM_GPIO_PINS(52);
278 DECLARE_MSM_GPIO_PINS(53);
279 DECLARE_MSM_GPIO_PINS(54);
280 DECLARE_MSM_GPIO_PINS(55);
281 DECLARE_MSM_GPIO_PINS(56);
282 DECLARE_MSM_GPIO_PINS(57);
283 DECLARE_MSM_GPIO_PINS(58);
284 DECLARE_MSM_GPIO_PINS(59);
285 DECLARE_MSM_GPIO_PINS(60);
286 DECLARE_MSM_GPIO_PINS(61);
287 DECLARE_MSM_GPIO_PINS(62);
288 DECLARE_MSM_GPIO_PINS(63);
289 DECLARE_MSM_GPIO_PINS(64);
290 DECLARE_MSM_GPIO_PINS(65);
291 DECLARE_MSM_GPIO_PINS(66);
292 DECLARE_MSM_GPIO_PINS(67);
293 DECLARE_MSM_GPIO_PINS(68);
294 DECLARE_MSM_GPIO_PINS(69);
295 DECLARE_MSM_GPIO_PINS(70);
296 DECLARE_MSM_GPIO_PINS(71);
297 DECLARE_MSM_GPIO_PINS(72);
298 DECLARE_MSM_GPIO_PINS(73);
299 DECLARE_MSM_GPIO_PINS(74);
300 DECLARE_MSM_GPIO_PINS(75);
301 DECLARE_MSM_GPIO_PINS(76);
302 DECLARE_MSM_GPIO_PINS(77);
303 DECLARE_MSM_GPIO_PINS(78);
304 DECLARE_MSM_GPIO_PINS(79);
305 DECLARE_MSM_GPIO_PINS(80);
306 DECLARE_MSM_GPIO_PINS(81);
307 DECLARE_MSM_GPIO_PINS(82);
308 DECLARE_MSM_GPIO_PINS(83);
309 DECLARE_MSM_GPIO_PINS(84);
310 DECLARE_MSM_GPIO_PINS(85);
311 DECLARE_MSM_GPIO_PINS(86);
312 DECLARE_MSM_GPIO_PINS(87);
313 DECLARE_MSM_GPIO_PINS(88);
314 DECLARE_MSM_GPIO_PINS(89);
315 DECLARE_MSM_GPIO_PINS(90);
316 DECLARE_MSM_GPIO_PINS(91);
317 DECLARE_MSM_GPIO_PINS(92);
318 DECLARE_MSM_GPIO_PINS(93);
319 DECLARE_MSM_GPIO_PINS(94);
320 DECLARE_MSM_GPIO_PINS(95);
321 DECLARE_MSM_GPIO_PINS(96);
322 DECLARE_MSM_GPIO_PINS(97);
323 DECLARE_MSM_GPIO_PINS(98);
324 DECLARE_MSM_GPIO_PINS(99);
325 DECLARE_MSM_GPIO_PINS(100);
326 DECLARE_MSM_GPIO_PINS(101);
327 DECLARE_MSM_GPIO_PINS(102);
328 DECLARE_MSM_GPIO_PINS(103);
329 DECLARE_MSM_GPIO_PINS(104);
330 DECLARE_MSM_GPIO_PINS(105);
331 DECLARE_MSM_GPIO_PINS(106);
332 DECLARE_MSM_GPIO_PINS(107);
333 DECLARE_MSM_GPIO_PINS(108);
334 DECLARE_MSM_GPIO_PINS(109);
335 DECLARE_MSM_GPIO_PINS(110);
336 DECLARE_MSM_GPIO_PINS(111);
337 DECLARE_MSM_GPIO_PINS(112);
338 DECLARE_MSM_GPIO_PINS(113);
339 DECLARE_MSM_GPIO_PINS(114);
340 DECLARE_MSM_GPIO_PINS(115);
341 DECLARE_MSM_GPIO_PINS(116);
342 DECLARE_MSM_GPIO_PINS(117);
343 DECLARE_MSM_GPIO_PINS(118);
344 DECLARE_MSM_GPIO_PINS(119);
345 DECLARE_MSM_GPIO_PINS(120);
346 DECLARE_MSM_GPIO_PINS(121);
347 DECLARE_MSM_GPIO_PINS(122);
348 DECLARE_MSM_GPIO_PINS(123);
349 DECLARE_MSM_GPIO_PINS(124);
350 DECLARE_MSM_GPIO_PINS(125);
351 DECLARE_MSM_GPIO_PINS(126);
352 DECLARE_MSM_GPIO_PINS(127);
353 DECLARE_MSM_GPIO_PINS(128);
354 DECLARE_MSM_GPIO_PINS(129);
355 DECLARE_MSM_GPIO_PINS(130);
356 DECLARE_MSM_GPIO_PINS(131);
357 DECLARE_MSM_GPIO_PINS(132);
358 
359 static const unsigned int sdc1_rclk_pins[] = {133};
360 static const unsigned int sdc1_clk_pins[] = {134};
361 static const unsigned int sdc1_cmd_pins[] = {135};
362 static const unsigned int sdc1_data_pins[] = {136};
363 static const unsigned int sdc2_clk_pins[] = {137};
364 static const unsigned int sdc2_cmd_pins[] = {138};
365 static const unsigned int sdc2_data_pins[] = {139};
366 
367 enum sdx75_functions {
368 	msm_mux_adsp_ext,
369 	msm_mux_atest_char,
370 	msm_mux_audio_ref_clk,
371 	msm_mux_bimc_dte,
372 	msm_mux_char_exec,
373 	msm_mux_coex_uart2,
374 	msm_mux_coex_uart,
375 	msm_mux_cri_trng,
376 	msm_mux_cri_trng0,
377 	msm_mux_cri_trng1,
378 	msm_mux_dbg_out_clk,
379 	msm_mux_ddr_bist,
380 	msm_mux_ddr_pxi0,
381 	msm_mux_ebi0_wrcdc,
382 	msm_mux_ebi2_a,
383 	msm_mux_ebi2_lcd,
384 	msm_mux_ebi2_lcd_te,
385 	msm_mux_emac0_mcg,
386 	msm_mux_emac0_ptp,
387 	msm_mux_emac1_mcg,
388 	msm_mux_emac1_ptp,
389 	msm_mux_emac_cdc,
390 	msm_mux_emac_pps_in,
391 	msm_mux_eth0_mdc,
392 	msm_mux_eth0_mdio,
393 	msm_mux_eth1_mdc,
394 	msm_mux_eth1_mdio,
395 	msm_mux_ext_dbg,
396 	msm_mux_gcc_125_clk,
397 	msm_mux_gcc_gp1_clk,
398 	msm_mux_gcc_gp2_clk,
399 	msm_mux_gcc_gp3_clk,
400 	msm_mux_gcc_plltest,
401 	msm_mux_gpio,
402 	msm_mux_i2s_mclk,
403 	msm_mux_jitter_bist,
404 	msm_mux_ldo_en,
405 	msm_mux_ldo_update,
406 	msm_mux_m_voc,
407 	msm_mux_mgpi_clk,
408 	msm_mux_native_char,
409 	msm_mux_native_tsens,
410 	msm_mux_native_tsense,
411 	msm_mux_nav_dr_sync,
412 	msm_mux_nav_gpio,
413 	msm_mux_pa_indicator,
414 	msm_mux_pci_e,
415 	msm_mux_pcie0_clkreq_n,
416 	msm_mux_pcie1_clkreq_n,
417 	msm_mux_pcie2_clkreq_n,
418 	msm_mux_pll_bist_sync,
419 	msm_mux_pll_clk_aux,
420 	msm_mux_pll_ref_clk,
421 	msm_mux_pri_mi2s,
422 	msm_mux_prng_rosc,
423 	msm_mux_qdss_cti,
424 	msm_mux_qdss_gpio,
425 	msm_mux_qlink0_b_en,
426 	msm_mux_qlink0_b_req,
427 	msm_mux_qlink0_l_en,
428 	msm_mux_qlink0_l_req,
429 	msm_mux_qlink0_wmss,
430 	msm_mux_qlink1_l_en,
431 	msm_mux_qlink1_l_req,
432 	msm_mux_qlink1_wmss,
433 	msm_mux_qup_se0,
434 	msm_mux_qup_se1_l2_mira,
435 	msm_mux_qup_se1_l2_mirb,
436 	msm_mux_qup_se1_l3_mira,
437 	msm_mux_qup_se1_l3_mirb,
438 	msm_mux_qup_se2,
439 	msm_mux_qup_se3,
440 	msm_mux_qup_se4,
441 	msm_mux_qup_se5,
442 	msm_mux_qup_se6,
443 	msm_mux_qup_se7,
444 	msm_mux_qup_se8,
445 	msm_mux_rgmii_rx_ctl,
446 	msm_mux_rgmii_rxc,
447 	msm_mux_rgmii_rxd,
448 	msm_mux_rgmii_tx_ctl,
449 	msm_mux_rgmii_txc,
450 	msm_mux_rgmii_txd,
451 	msm_mux_sd_card,
452 	msm_mux_sdc1_tb,
453 	msm_mux_sdc2_tb_trig,
454 	msm_mux_sec_mi2s,
455 	msm_mux_sgmii_phy_intr0_n,
456 	msm_mux_sgmii_phy_intr1_n,
457 	msm_mux_spmi_coex,
458 	msm_mux_spmi_vgi,
459 	msm_mux_tgu_ch0_trigout,
460 	msm_mux_tmess_prng0,
461 	msm_mux_tmess_prng1,
462 	msm_mux_tmess_prng2,
463 	msm_mux_tmess_prng3,
464 	msm_mux_tri_mi2s,
465 	msm_mux_uim1_clk,
466 	msm_mux_uim1_data,
467 	msm_mux_uim1_present,
468 	msm_mux_uim1_reset,
469 	msm_mux_uim2_clk,
470 	msm_mux_uim2_data,
471 	msm_mux_uim2_present,
472 	msm_mux_uim2_reset,
473 	msm_mux_usb2phy_ac_en,
474 	msm_mux_vsense_trigger_mirnat,
475 	msm_mux__,
476 };
477 
478 static const char *const gpio_groups[] = {
479 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
480 	"gpio7", "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13",
481 	"gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20",
482 	"gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27",
483 	"gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34",
484 	"gpio35", "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41",
485 	"gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48",
486 	"gpio49", "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55",
487 	"gpio56", "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62",
488 	"gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69",
489 	"gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76",
490 	"gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83",
491 	"gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
492 	"gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97",
493 	"gpio98", "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
494 	"gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", "gpio111",
495 	"gpio112", "gpio113", "gpio114", "gpio115", "gpio116", "gpio117", "gpio118",
496 	"gpio119", "gpio120", "gpio121", "gpio122", "gpio123", "gpio124", "gpio125",
497 	"gpio126", "gpio127", "gpio128", "gpio129", "gpio130", "gpio131", "gpio132",
498 };
499 static const char *const adsp_ext_groups[] = {
500 	"gpio59", "gpio68",
501 };
502 static const char *const atest_char_groups[] = {
503 	"gpio24", "gpio25", "gpio26", "gpio41", "gpio63",
504 };
505 static const char *const audio_ref_clk_groups[] = {
506 	"gpio126",
507 };
508 static const char *const bimc_dte_groups[] = {
509 	"gpio14", "gpio15", "gpio61", "gpio59",
510 };
511 static const char *const char_exec_groups[] = {
512 	"gpio6", "gpio7",
513 };
514 static const char *const coex_uart2_groups[] = {
515 	"gpio48", "gpio49", "gpio90", "gpio91",
516 };
517 static const char *const coex_uart_groups[] = {
518 	"gpio46", "gpio47",
519 };
520 static const char *const cri_trng_groups[] = {
521 	"gpio36",
522 };
523 static const char *const cri_trng0_groups[] = {
524 	"gpio31",
525 };
526 static const char *const cri_trng1_groups[] = {
527 	"gpio32",
528 };
529 static const char *const dbg_out_clk_groups[] = {
530 	"gpio26",
531 };
532 static const char *const ddr_bist_groups[] = {
533 	"gpio46", "gpio47", "gpio48", "gpio49",
534 };
535 static const char *const ddr_pxi0_groups[] = {
536 	"gpio45", "gpio46",
537 };
538 static const char *const ebi0_wrcdc_groups[] = {
539 	"gpio0", "gpio2",
540 };
541 static const char *const ebi2_a_groups[] = {
542 	"gpio100",
543 };
544 static const char *const ebi2_lcd_groups[] = {
545 	"gpio99", "gpio101",
546 };
547 static const char *const ebi2_lcd_te_groups[] = {
548 	"gpio98",
549 };
550 static const char *const emac0_mcg_groups[] = {
551 	"gpio83", "gpio84", "gpio85", "gpio89",
552 };
553 static const char *const emac0_ptp_groups[] = {
554 	"gpio35", "gpio83", "gpio84", "gpio85", "gpio89", "gpio119", "gpio123",
555 };
556 static const char *const emac1_mcg_groups[] = {
557 	"gpio90", "gpio92", "gpio93", "gpio122",
558 };
559 static const char *const emac1_ptp_groups[] = {
560 	"gpio112", "gpio113", "gpio114", "gpio115",
561 };
562 static const char *const emac_cdc_groups[] = {
563 	"gpio38", "gpio39",
564 };
565 static const char *const emac_pps_in_groups[] = {
566 	"gpio127",
567 };
568 static const char *const eth0_mdc_groups[] = {
569 	"gpio94",
570 };
571 static const char *const eth0_mdio_groups[] = {
572 	"gpio95",
573 };
574 static const char *const eth1_mdc_groups[] = {
575 	"gpio106",
576 };
577 static const char *const eth1_mdio_groups[] = {
578 	"gpio107",
579 };
580 static const char *const ext_dbg_groups[] = {
581 	"gpio12", "gpio13", "gpio14", "gpio15",
582 };
583 static const char *const gcc_125_clk_groups[] = {
584 	"gpio25",
585 };
586 static const char *const gcc_gp1_clk_groups[] = {
587 	"gpio39",
588 };
589 static const char *const gcc_gp2_clk_groups[] = {
590 	"gpio40",
591 };
592 static const char *const gcc_gp3_clk_groups[] = {
593 	"gpio41",
594 };
595 static const char *const gcc_plltest_groups[] = {
596 	"gpio81", "gpio82",
597 };
598 static const char *const i2s_mclk_groups[] = {
599 	"gpio74",
600 };
601 static const char *const jitter_bist_groups[] = {
602 	"gpio41",
603 };
604 static const char *const ldo_en_groups[] = {
605 	"gpio8",
606 };
607 static const char *const ldo_update_groups[] = {
608 	"gpio62",
609 };
610 static const char *const m_voc_groups[] = {
611 	"gpio62", "gpio63", "gpio64", "gpio65", "gpio71",
612 };
613 static const char *const mgpi_clk_groups[] = {
614 	"gpio39", "gpio40",
615 };
616 static const char *const native_char_groups[] = {
617 	"gpio29", "gpio33", "gpio57", "gpio66", "gpio67",
618 };
619 static const char *const native_tsens_groups[] = {
620 	"gpio38",
621 };
622 static const char *const native_tsense_groups[] = {
623 	"gpio64", "gpio76",
624 };
625 static const char *const nav_dr_sync_groups[] = {
626 	"gpio36",
627 };
628 static const char *const nav_gpio_groups[] = {
629 	"gpio35", "gpio36", "gpio104",
630 };
631 static const char *const pa_indicator_groups[] = {
632 	"gpio58",
633 };
634 static const char *const pci_e_groups[] = {
635 	"gpio42",
636 };
637 static const char *const pcie0_clkreq_n_groups[] = {
638 	"gpio43",
639 };
640 static const char *const pcie1_clkreq_n_groups[] = {
641 	"gpio124",
642 };
643 static const char *const pcie2_clkreq_n_groups[] = {
644 	"gpio121",
645 };
646 static const char *const pll_bist_sync_groups[] = {
647 	"gpio38",
648 };
649 static const char *const pll_clk_aux_groups[] = {
650 	"gpio40",
651 };
652 static const char *const pll_ref_clk_groups[] = {
653 	"gpio37",
654 };
655 static const char *const pri_mi2s_groups[] = {
656 	"gpio16", "gpio17", "gpio18", "gpio19",
657 };
658 static const char *const prng_rosc_groups[] = {
659 	"gpio27", "gpio36", "gpio37", "gpio38",
660 };
661 static const char *const qdss_cti_groups[] = {
662 	"gpio16", "gpio17", "gpio52", "gpio53", "gpio56",
663 	"gpio57", "gpio59", "gpio60", "gpio78", "gpio79",
664 };
665 static const char *const qdss_gpio_groups[] = {
666 	"gpio82", "gpio83", "gpio84", "gpio85", "gpio94",
667 	"gpio95", "gpio96", "gpio97", "gpio110", "gpio111",
668 	"gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
669 	"gpio117", "gpio118", "gpio119",
670 };
671 static const char *const qlink0_b_en_groups[] = {
672 	"gpio40",
673 };
674 static const char *const qlink0_b_req_groups[] = {
675 	"gpio41",
676 };
677 static const char *const qlink0_l_en_groups[] = {
678 	"gpio37",
679 };
680 static const char *const qlink0_l_req_groups[] = {
681 	"gpio38",
682 };
683 static const char *const qlink0_wmss_groups[] = {
684 	"gpio39",
685 };
686 static const char *const qlink1_l_en_groups[] = {
687 	"gpio26",
688 };
689 static const char *const qlink1_l_req_groups[] = {
690 	"gpio27",
691 };
692 static const char *const qlink1_wmss_groups[] = {
693 	"gpio28",
694 };
695 static const char *const qup_se0_groups[] = {
696 	"gpio8", "gpio9", "gpio10", "gpio11",
697 };
698 static const char *const qup_se1_l2_mira_groups[] = {
699 	"gpio12",
700 };
701 static const char *const qup_se1_l2_mirb_groups[] = {
702 	"gpio16",
703 };
704 static const char *const qup_se1_l3_mira_groups[] = {
705 	"gpio13",
706 };
707 static const char *const qup_se1_l3_mirb_groups[] = {
708 	"gpio17",
709 };
710 static const char *const qup_se2_groups[] = {
711 	"gpio14", "gpio15", "gpio16", "gpio17",
712 };
713 static const char *const qup_se3_groups[] = {
714 	"gpio52", "gpio53", "gpio54", "gpio55",
715 };
716 static const char *const qup_se4_groups[] = {
717 	"gpio64", "gpio65",
718 };
719 static const char *const qup_se5_groups[] = {
720 	"gpio110", "gpio111",
721 };
722 static const char *const qup_se6_groups[] = {
723 	"gpio112", "gpio113", "gpio114", "gpio115",
724 };
725 static const char *const qup_se7_groups[] = {
726 	"gpio116", "gpio117", "gpio118", "gpio119",
727 };
728 static const char *const qup_se8_groups[] = {
729 	"gpio124", "gpio125",
730 };
731 static const char *const rgmii_rx_ctl_groups[] = {
732 	"gpio93",
733 };
734 static const char *const rgmii_rxc_groups[] = {
735 	"gpio88",
736 };
737 static const char *const rgmii_rxd_groups[] = {
738 	"gpio89", "gpio90", "gpio91", "gpio92",
739 };
740 static const char *const rgmii_tx_ctl_groups[] = {
741 	"gpio87",
742 };
743 static const char *const rgmii_txc_groups[] = {
744 	"gpio82",
745 };
746 static const char *const rgmii_txd_groups[] = {
747 	"gpio83", "gpio84", "gpio85", "gpio86",
748 };
749 static const char *const sd_card_groups[] = {
750 	"gpio105",
751 };
752 static const char *const sdc1_tb_groups[] = {
753 	"gpio84", "gpio130",
754 };
755 static const char *const sdc2_tb_trig_groups[] = {
756 	"gpio129",
757 };
758 static const char *const sec_mi2s_groups[] = {
759 	"gpio20", "gpio21", "gpio22", "gpio23",
760 };
761 static const char *const sgmii_phy_intr0_n_groups[] = {
762 	"gpio97",
763 };
764 static const char *const sgmii_phy_intr1_n_groups[] = {
765 	"gpio109",
766 };
767 static const char *const spmi_coex_groups[] = {
768 	"gpio48", "gpio49",
769 };
770 static const char *const spmi_vgi_groups[] = {
771 	"gpio50", "gpio51",
772 };
773 static const char *const tgu_ch0_trigout_groups[] = {
774 	"gpio55",
775 };
776 static const char *const tmess_prng0_groups[] = {
777 	"gpio28",
778 };
779 static const char *const tmess_prng1_groups[] = {
780 	"gpio29",
781 };
782 static const char *const tmess_prng2_groups[] = {
783 	"gpio30",
784 };
785 static const char *const tmess_prng3_groups[] = {
786 	"gpio31",
787 };
788 static const char *const tri_mi2s_groups[] = {
789 	"gpio98", "gpio99", "gpio100", "gpio101",
790 };
791 static const char *const uim1_clk_groups[] = {
792 	"gpio7",
793 };
794 static const char *const uim1_data_groups[] = {
795 	"gpio4",
796 };
797 static const char *const uim1_present_groups[] = {
798 	"gpio5",
799 };
800 static const char *const uim1_reset_groups[] = {
801 	"gpio6",
802 };
803 static const char *const uim2_clk_groups[] = {
804 	"gpio3",
805 };
806 static const char *const uim2_data_groups[] = {
807 	"gpio0",
808 };
809 static const char *const uim2_present_groups[] = {
810 	"gpio1",
811 };
812 static const char *const uim2_reset_groups[] = {
813 	"gpio2",
814 };
815 static const char *const usb2phy_ac_en_groups[] = {
816 	"gpio80",
817 };
818 static const char *const vsense_trigger_mirnat_groups[] = {
819 	"gpio37",
820 };
821 
822 static const struct pinfunction sdx75_functions[] = {
823 	MSM_PIN_FUNCTION(adsp_ext),
824 	MSM_PIN_FUNCTION(atest_char),
825 	MSM_PIN_FUNCTION(audio_ref_clk),
826 	MSM_PIN_FUNCTION(bimc_dte),
827 	MSM_PIN_FUNCTION(char_exec),
828 	MSM_PIN_FUNCTION(coex_uart2),
829 	MSM_PIN_FUNCTION(coex_uart),
830 	MSM_PIN_FUNCTION(cri_trng),
831 	MSM_PIN_FUNCTION(cri_trng0),
832 	MSM_PIN_FUNCTION(cri_trng1),
833 	MSM_PIN_FUNCTION(dbg_out_clk),
834 	MSM_PIN_FUNCTION(ddr_bist),
835 	MSM_PIN_FUNCTION(ddr_pxi0),
836 	MSM_PIN_FUNCTION(ebi0_wrcdc),
837 	MSM_PIN_FUNCTION(ebi2_a),
838 	MSM_PIN_FUNCTION(ebi2_lcd),
839 	MSM_PIN_FUNCTION(ebi2_lcd_te),
840 	MSM_PIN_FUNCTION(emac0_mcg),
841 	MSM_PIN_FUNCTION(emac0_ptp),
842 	MSM_PIN_FUNCTION(emac1_mcg),
843 	MSM_PIN_FUNCTION(emac1_ptp),
844 	MSM_PIN_FUNCTION(emac_cdc),
845 	MSM_PIN_FUNCTION(emac_pps_in),
846 	MSM_PIN_FUNCTION(eth0_mdc),
847 	MSM_PIN_FUNCTION(eth0_mdio),
848 	MSM_PIN_FUNCTION(eth1_mdc),
849 	MSM_PIN_FUNCTION(eth1_mdio),
850 	MSM_PIN_FUNCTION(ext_dbg),
851 	MSM_PIN_FUNCTION(gcc_125_clk),
852 	MSM_PIN_FUNCTION(gcc_gp1_clk),
853 	MSM_PIN_FUNCTION(gcc_gp2_clk),
854 	MSM_PIN_FUNCTION(gcc_gp3_clk),
855 	MSM_PIN_FUNCTION(gcc_plltest),
856 	MSM_PIN_FUNCTION(gpio),
857 	MSM_PIN_FUNCTION(i2s_mclk),
858 	MSM_PIN_FUNCTION(jitter_bist),
859 	MSM_PIN_FUNCTION(ldo_en),
860 	MSM_PIN_FUNCTION(ldo_update),
861 	MSM_PIN_FUNCTION(m_voc),
862 	MSM_PIN_FUNCTION(mgpi_clk),
863 	MSM_PIN_FUNCTION(native_char),
864 	MSM_PIN_FUNCTION(native_tsens),
865 	MSM_PIN_FUNCTION(native_tsense),
866 	MSM_PIN_FUNCTION(nav_dr_sync),
867 	MSM_PIN_FUNCTION(nav_gpio),
868 	MSM_PIN_FUNCTION(pa_indicator),
869 	MSM_PIN_FUNCTION(pci_e),
870 	MSM_PIN_FUNCTION(pcie0_clkreq_n),
871 	MSM_PIN_FUNCTION(pcie1_clkreq_n),
872 	MSM_PIN_FUNCTION(pcie2_clkreq_n),
873 	MSM_PIN_FUNCTION(pll_bist_sync),
874 	MSM_PIN_FUNCTION(pll_clk_aux),
875 	MSM_PIN_FUNCTION(pll_ref_clk),
876 	MSM_PIN_FUNCTION(pri_mi2s),
877 	MSM_PIN_FUNCTION(prng_rosc),
878 	MSM_PIN_FUNCTION(qdss_cti),
879 	MSM_PIN_FUNCTION(qdss_gpio),
880 	MSM_PIN_FUNCTION(qlink0_b_en),
881 	MSM_PIN_FUNCTION(qlink0_b_req),
882 	MSM_PIN_FUNCTION(qlink0_l_en),
883 	MSM_PIN_FUNCTION(qlink0_l_req),
884 	MSM_PIN_FUNCTION(qlink1_l_en),
885 	MSM_PIN_FUNCTION(qlink1_l_req),
886 	MSM_PIN_FUNCTION(qlink0_wmss),
887 	MSM_PIN_FUNCTION(qlink1_wmss),
888 	MSM_PIN_FUNCTION(qup_se0),
889 	MSM_PIN_FUNCTION(qup_se1_l2_mira),
890 	MSM_PIN_FUNCTION(qup_se1_l2_mirb),
891 	MSM_PIN_FUNCTION(qup_se1_l3_mira),
892 	MSM_PIN_FUNCTION(qup_se1_l3_mirb),
893 	MSM_PIN_FUNCTION(qup_se2),
894 	MSM_PIN_FUNCTION(qup_se3),
895 	MSM_PIN_FUNCTION(qup_se4),
896 	MSM_PIN_FUNCTION(qup_se5),
897 	MSM_PIN_FUNCTION(qup_se6),
898 	MSM_PIN_FUNCTION(qup_se7),
899 	MSM_PIN_FUNCTION(qup_se8),
900 	MSM_PIN_FUNCTION(rgmii_rx_ctl),
901 	MSM_PIN_FUNCTION(rgmii_rxc),
902 	MSM_PIN_FUNCTION(rgmii_rxd),
903 	MSM_PIN_FUNCTION(rgmii_tx_ctl),
904 	MSM_PIN_FUNCTION(rgmii_txc),
905 	MSM_PIN_FUNCTION(rgmii_txd),
906 	MSM_PIN_FUNCTION(sd_card),
907 	MSM_PIN_FUNCTION(sdc1_tb),
908 	MSM_PIN_FUNCTION(sdc2_tb_trig),
909 	MSM_PIN_FUNCTION(sec_mi2s),
910 	MSM_PIN_FUNCTION(sgmii_phy_intr0_n),
911 	MSM_PIN_FUNCTION(sgmii_phy_intr1_n),
912 	MSM_PIN_FUNCTION(spmi_coex),
913 	MSM_PIN_FUNCTION(spmi_vgi),
914 	MSM_PIN_FUNCTION(tgu_ch0_trigout),
915 	MSM_PIN_FUNCTION(tmess_prng0),
916 	MSM_PIN_FUNCTION(tmess_prng1),
917 	MSM_PIN_FUNCTION(tmess_prng2),
918 	MSM_PIN_FUNCTION(tmess_prng3),
919 	MSM_PIN_FUNCTION(tri_mi2s),
920 	MSM_PIN_FUNCTION(uim1_clk),
921 	MSM_PIN_FUNCTION(uim1_data),
922 	MSM_PIN_FUNCTION(uim1_present),
923 	MSM_PIN_FUNCTION(uim1_reset),
924 	MSM_PIN_FUNCTION(uim2_clk),
925 	MSM_PIN_FUNCTION(uim2_data),
926 	MSM_PIN_FUNCTION(uim2_present),
927 	MSM_PIN_FUNCTION(uim2_reset),
928 	MSM_PIN_FUNCTION(usb2phy_ac_en),
929 	MSM_PIN_FUNCTION(vsense_trigger_mirnat),
930 };
931 
932 static const struct msm_pingroup sdx75_groups[] = {
933 	[0] = PINGROUP(0, uim2_data, ebi0_wrcdc, _, _, _, _, _, _, _, _),
934 	[1] = PINGROUP(1, uim2_present, _, _, _, _, _, _, _, _, _),
935 	[2] = PINGROUP(2, uim2_reset, ebi0_wrcdc, _, _, _, _, _, _, _, _),
936 	[3] = PINGROUP(3, uim2_clk, _, _, _, _, _, _, _, _, _),
937 	[4] = PINGROUP(4, uim1_data, _, _, _, _, _, _, _, _, _),
938 	[5] = PINGROUP(5, uim1_present, _, _, _, _, _, _, _, _, _),
939 	[6] = PINGROUP(6, uim1_reset, char_exec, _, _, _, _, _, _, _, _),
940 	[7] = PINGROUP(7, uim1_clk, char_exec, _, _, _, _, _, _, _, _),
941 	[8] = PINGROUP(8, qup_se0, ldo_en, _, _, _, _, _, _, _, _),
942 	[9] = PINGROUP(9, qup_se0, _, _, _, _, _, _, _, _, _),
943 	[10] = PINGROUP(10, qup_se0, _, _, _, _, _, _, _, _, _),
944 	[11] = PINGROUP(11, qup_se0, _, _, _, _, _, _, _, _, _),
945 	[12] = PINGROUP(12, qup_se1_l2_mira, ext_dbg, _, _, _, _, _, _, _, _),
946 	[13] = PINGROUP(13, qup_se1_l3_mira, ext_dbg, _, _, _, _, _, _,	_, _),
947 	[14] = PINGROUP(14, qup_se2, ext_dbg, bimc_dte, _, _, _, _, _, _, _),
948 	[15] = PINGROUP(15, qup_se2, ext_dbg, bimc_dte, _, _, _, _, _, _, _),
949 	[16] = PINGROUP(16, pri_mi2s, qup_se2, qup_se1_l2_mirb, qdss_cti, qdss_cti, _, _, _, _, _),
950 	[17] = PINGROUP(17, pri_mi2s, qup_se2, qup_se1_l3_mirb, qdss_cti, qdss_cti, _, _, _, _, _),
951 	[18] = PINGROUP(18, pri_mi2s, _, _, _, _, _, _, _, _, _),
952 	[19] = PINGROUP(19, pri_mi2s, _, _, _, _, _, _, _, _, _),
953 	[20] = PINGROUP(20, sec_mi2s, _, _, _, _, _, _, _, _, _),
954 	[21] = PINGROUP(21, sec_mi2s, _, _, _, _, _, _, _, _, _),
955 	[22] = PINGROUP(22, sec_mi2s, _, _, _, _, _, _, _, _, _),
956 	[23] = PINGROUP(23, sec_mi2s, _, _, _, _, _, _, _, _, _),
957 	[24] = PINGROUP(24, _, atest_char, _, _, _, _, _, _, _, _),
958 	[25] = PINGROUP(25, gcc_125_clk, _, atest_char, _, _, _, _, _,	_, _),
959 	[26] = PINGROUP(26, _, _, qlink1_l_en, dbg_out_clk, atest_char, _, _, _, _, _),
960 	[27] = PINGROUP(27, _, _, qlink1_l_req, prng_rosc, _, _, _, _,	_, _),
961 	[28] = PINGROUP(28, _, qlink1_wmss, tmess_prng0, _, _, _, _, _,	_, _),
962 	[29] = PINGROUP(29, _, _, _, native_char, tmess_prng1, _, _, _, _, _),
963 	[30] = PINGROUP(30, _, _, _, tmess_prng2, _, _, _, _, _, _),
964 	[31] = PINGROUP(31, _, _, cri_trng0, _, tmess_prng3, _, _, _, _, _),
965 	[32] = PINGROUP(32, _, _, cri_trng1, _, _, _, _, _, _, _),
966 	[33] = PINGROUP(33, _, _, native_char, _, _, _, _, _, _, _),
967 	[34] = PINGROUP(34, _, _, _, _, _, _, _, _, _, _),
968 	[35] = PINGROUP(35, nav_gpio, emac0_ptp, emac0_ptp, _, _, _, _, _, _, _),
969 	[36] = PINGROUP(36, nav_gpio, nav_dr_sync, nav_gpio, cri_trng, prng_rosc, _, _, _, _, _),
970 	[37] = PINGROUP(37, qlink0_l_en, _, pll_ref_clk, prng_rosc, vsense_trigger_mirnat, _, _, _, _, _),
971 	[38] = PINGROUP(38, qlink0_l_req, _, pll_bist_sync, prng_rosc, _, emac_cdc, _, native_tsens, _, _),
972 	[39] = PINGROUP(39, qlink0_wmss, _, mgpi_clk, gcc_gp1_clk, _, emac_cdc, _, _, _, _),
973 	[40] = PINGROUP(40, qlink0_b_en, _, mgpi_clk, pll_clk_aux, gcc_gp2_clk, _, _, _, _, _),
974 	[41] = PINGROUP(41, qlink0_b_req, _, jitter_bist, gcc_gp3_clk, _, _, atest_char, _, _, _),
975 	[42] = PINGROUP(42, pci_e, _, _, _, _, _, _, _, _, _),
976 	[43] = PINGROUP(43, pcie0_clkreq_n, _, _, _, _, _, _, _, _, _),
977 	[44] = PINGROUP(44, _, _, _, _, _, _, _, _, _, _),
978 	[45] = PINGROUP(45, ddr_pxi0, _, _, _, _, _, _, _, _, _),
979 	[46] = PINGROUP(46, coex_uart, ddr_bist, ddr_pxi0, _, _, _, _, _, _, _),
980 	[47] = PINGROUP(47, coex_uart, ddr_bist, _, _, _, _, _, _, _, _),
981 	[48] = PINGROUP(48, coex_uart2, spmi_coex, ddr_bist, _, _, _, _, _, _, _),
982 	[49] = PINGROUP(49, coex_uart2, spmi_coex, ddr_bist, _, _, _, _, _, _, _),
983 	[50] = PINGROUP(50, spmi_vgi, _, _, _, _, _, _, _, _, _),
984 	[51] = PINGROUP(51, spmi_vgi, _, _, _, _, _, _, _, _, _),
985 	[52] = PINGROUP(52, qup_se3, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
986 	[53] = PINGROUP(53, qup_se3, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
987 	[54] = PINGROUP(54, qup_se3, _, _, _, _, _, _, _, _, _),
988 	[55] = PINGROUP(55, qup_se3, tgu_ch0_trigout, _, _, _, _, _, _, _, _),
989 	[56] = PINGROUP(56, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
990 	[57] = PINGROUP(57, qdss_cti, qdss_cti, _, native_char, _, _, _, _, _, _),
991 	[58] = PINGROUP(58, _, pa_indicator, _, _, _, _, _, _, _, _),
992 	[59] = PINGROUP(59, adsp_ext, qdss_cti, _, bimc_dte, _, _, _, _, _, _),
993 	[60] = PINGROUP(60, qdss_cti, _, _, _, _, _, _, _, _, _),
994 	[61] = PINGROUP(61, _, bimc_dte, _, _, _, _, _, _, _, _),
995 	[62] = PINGROUP(62, m_voc, ldo_update, _, _, _, _, _, _, _, _),
996 	[63] = PINGROUP(63, m_voc, _, atest_char, _, _, _, _, _, _, _),
997 	[64] = PINGROUP(64, qup_se4, m_voc, _, native_tsense, _, _, _, _, _, _),
998 	[65] = PINGROUP(65, qup_se4, m_voc, _, _, _, _, _, _, _, _),
999 	[66] = PINGROUP(66, _, native_char, _, _, _, _, _, _, _, _),
1000 	[67] = PINGROUP(67, _, native_char, _, _, _, _, _, _, _, _),
1001 	[68] = PINGROUP(68, adsp_ext, _, _, _, _, _, _, _, _, _),
1002 	[69] = PINGROUP(69, _, _, _, _, _, _, _, _, _, _),
1003 	[70] = PINGROUP(70, _, _, _, _, _, _, _, _, _, _),
1004 	[71] = PINGROUP(71, m_voc, _, _, _, _, _, _, _, _, _),
1005 	[72] = PINGROUP(72, _, _, _, _, _, _, _, _, _, _),
1006 	[73] = PINGROUP(73, _, _, _, _, _, _, _, _, _, _),
1007 	[74] = PINGROUP(74, i2s_mclk, _, _, _, _, _, _, _, _, _),
1008 	[75] = PINGROUP(75, _, _, _, _, _, _, _, _, _, _),
1009 	[76] = PINGROUP(76, native_tsense, _, _, _, _, _, _, _, _, _),
1010 	[77] = PINGROUP(77, _, _, _, _, _, _, _, _, _, _),
1011 	[78] = PINGROUP(78, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
1012 	[79] = PINGROUP(79, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
1013 	[80] = PINGROUP(80, usb2phy_ac_en, _, _, _, _, _, _, _, _, _),
1014 	[81] = PINGROUP(81, gcc_plltest, _, _, _, _, _, _, _, _, _),
1015 	[82] = PINGROUP(82, rgmii_txc, gcc_plltest, qdss_gpio, _, _, _, _, _, _, _),
1016 	[83] = PINGROUP(83, rgmii_txd, emac0_ptp, emac0_ptp, emac0_mcg, qdss_gpio, _, _, _, _, _),
1017 	[84] = PINGROUP(84, rgmii_txd, emac0_ptp, emac0_mcg, qdss_gpio, _, sdc1_tb, _, _, _, _),
1018 	[85] = PINGROUP(85, rgmii_txd, emac0_ptp, emac0_mcg, qdss_gpio, _, _, _, _, _, _),
1019 	[86] = PINGROUP(86, rgmii_txd, _, _, _, _, _, _, _, _, _),
1020 	[87] = PINGROUP(87, rgmii_tx_ctl, _, _, _, _, _, _, _, _, _),
1021 	[88] = PINGROUP(88, rgmii_rxc, _, _, _, _, _, _, _, _, _),
1022 	[89] = PINGROUP(89, rgmii_rxd, emac0_ptp, emac0_ptp, emac0_mcg, _, _, _, _, _, _),
1023 	[90] = PINGROUP(90, rgmii_rxd, coex_uart2, emac1_mcg, _, _, _, _, _, _, _),
1024 	[91] = PINGROUP(91, rgmii_rxd, coex_uart2, _, _, _, _, _, _, _, _),
1025 	[92] = PINGROUP(92, rgmii_rxd, emac1_mcg, _, _, _, _, _, _, _, _),
1026 	[93] = PINGROUP(93, rgmii_rx_ctl, emac1_mcg, _, _, _, _, _, _, _, _),
1027 	[94] = PINGROUP(94, eth0_mdc, qdss_gpio, _, _, _, _, _, _, _, _),
1028 	[95] = PINGROUP(95, eth0_mdio, qdss_gpio, _, _, _, _, _, _, _, _),
1029 	[96] = PINGROUP(96, qdss_gpio, _, _, _, _, _, _, _, _, _),
1030 	[97] = PINGROUP(97, sgmii_phy_intr0_n, _, qdss_gpio, _, _, _, _, _, _, _),
1031 	[98] = PINGROUP(98, tri_mi2s, ebi2_lcd_te, _, _, _, _, _, _, _, _),
1032 	[99] = PINGROUP(99, tri_mi2s, ebi2_lcd, _, _, _, _, _, _, _, _),
1033 	[100] = PINGROUP(100, tri_mi2s, ebi2_a, _, _, _, _, _, _, _, _),
1034 	[101] = PINGROUP(101, tri_mi2s, ebi2_lcd, _, _, _, _, _, _, _, _),
1035 	[102] = PINGROUP(102, _, _, _, _, _, _, _, _, _, _),
1036 	[103] =	PINGROUP(103, _, _, _, _, _, _, _, _, _, _),
1037 	[104] = PINGROUP(104, nav_gpio, _, _, _, _, _, _, _, _, _),
1038 	[105] = PINGROUP(105, sd_card, _, _, _, _, _, _, _, _, _),
1039 	[106] = PINGROUP(106, eth1_mdc, _, _, _, _, _, _, _, _, _),
1040 	[107] = PINGROUP(107, eth1_mdio, _, _, _, _, _, _, _, _, _),
1041 	[108] =	PINGROUP(108, _, _, _, _, _, _, _, _, _, _),
1042 	[109] = PINGROUP(109, sgmii_phy_intr1_n, _, _, _, _, _, _, _, _, _),
1043 	[110] = PINGROUP(110, qup_se5, qdss_gpio, _, _, _, _, _, _, _, _),
1044 	[111] = PINGROUP(111, qup_se5, qdss_gpio, _, _, _, _, _, _, _, _),
1045 	[112] = PINGROUP(112, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
1046 	[113] = PINGROUP(113, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
1047 	[114] = PINGROUP(114, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
1048 	[115] = PINGROUP(115, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
1049 	[116] = PINGROUP(116, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
1050 	[117] = PINGROUP(117, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
1051 	[118] = PINGROUP(118, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
1052 	[119] = PINGROUP(119, qup_se7, emac0_ptp, qdss_gpio, _, _, _, _, _, _, _),
1053 	[120] = PINGROUP(120, _, _, _, _, _, _, _, _, _, _),
1054 	[121] = PINGROUP(121, pcie2_clkreq_n, _, _, _, _, _, _, _, _, _),
1055 	[122] = PINGROUP(122, emac1_mcg, _, _, _, _, _, _, _, _, _),
1056 	[123] = PINGROUP(123, emac0_ptp, emac0_ptp, emac0_ptp, emac0_ptp, _, _, _, _, _, _),
1057 	[124] = PINGROUP(124, pcie1_clkreq_n, qup_se8, _, _, _, _, _, _, _, _),
1058 	[125] = PINGROUP(125, qup_se8, _, _, _, _, _, _, _, _, _),
1059 	[126] = PINGROUP(126, audio_ref_clk, _, _, _, _, _, _, _, _, _),
1060 	[127] = PINGROUP(127, emac_pps_in, _, _, _, _, _, _, _, _, _),
1061 	[128] =	PINGROUP(128, _, _, _, _, _, _, _, _, _, _),
1062 	[129] = PINGROUP(129, sdc2_tb_trig, _, _, _, _, _, _, _, _, _),
1063 	[130] = PINGROUP(130, sdc1_tb, _, _, _, _, _, _, _, _, _),
1064 	[131] = PINGROUP(131, _, _, _, _, _, _, _, _, _, _),
1065 	[132] =	PINGROUP(132, _, _, _, _, _, _, _, _, _, _),
1066 	[133] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x19a000, 16, 0),
1067 	[134] = SDC_QDSD_PINGROUP(sdc1_clk, 0x19a000, 14, 6),
1068 	[135] = SDC_QDSD_PINGROUP(sdc1_cmd, 0x19a000, 11, 3),
1069 	[136] = SDC_QDSD_PINGROUP(sdc1_data, 0x19a000, 9, 0),
1070 	[137] = SDC_QDSD_PINGROUP(sdc2_clk, 0x19b000, 14, 6),
1071 	[138] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x19b000, 11, 3),
1072 	[139] = SDC_QDSD_PINGROUP(sdc2_data, 0x19b000, 9, 0),
1073 };
1074 
1075 static const struct msm_gpio_wakeirq_map sdx75_pdc_map[] = {
1076 	{ 1, 57 }, { 2, 91 }, {5, 52 }, { 6, 109 }, { 9, 129 }, { 11, 62 },
1077 	{ 13, 84 }, { 15, 87 }, { 17, 88 }, { 18, 89 }, { 19, 90 }, { 20, 92 },
1078 	{ 21, 93 }, { 22, 94 }, { 23, 95 }, { 25, 96 }, { 27, 97 }, { 35, 58 },
1079 	{ 36, 53 }, { 38, 98 }, { 39, 99 }, { 40, 100 }, { 41, 101 }, { 42, 54 },
1080 	{ 43, 56 }, { 44, 71 }, { 46, 60 }, { 47, 61 }, { 49, 47 }, { 50, 126 },
1081 	{ 51, 55 }, { 52, 102 }, { 53, 141 }, { 54, 104 }, { 55, 105 }, { 56, 106 },
1082 	{ 57, 107 }, { 59, 108 }, { 60, 110 }, { 62, 111 }, { 63, 112 }, { 64, 113 },
1083 	{ 65, 114 }, { 67, 115 }, { 68, 116 }, { 69, 117 }, { 70, 118 }, { 71, 119 },
1084 	{ 72, 120 }, { 75, 121 }, { 76, 122 }, { 78, 123 }, { 79, 124 }, { 80, 125 },
1085 	{ 81, 50 }, { 85, 127 }, { 87, 128 }, { 91, 130 }, { 92, 131 }, { 93, 132 },
1086 	{ 94, 133 }, { 95, 134 }, { 97, 135 }, { 98, 136 }, { 101, 64 }, { 103, 51 },
1087 	{ 105, 65 }, { 106, 66 }, { 107, 67 }, { 108, 68 }, { 109, 69 }, { 111, 70 },
1088 	{ 113, 59 }, { 115, 72 }, { 116, 73 }, { 117, 74 }, { 118, 75 }, { 119, 76 },
1089 	{ 120, 77 }, { 121, 78 }, { 123, 79 }, { 124, 80 }, { 125, 63 }, { 127, 81 },
1090 	{ 128, 82 }, { 129, 83 }, { 130, 85 }, { 132, 86 },
1091 };
1092 
1093 static const struct msm_pinctrl_soc_data sdx75_pinctrl = {
1094 	.pins = sdx75_pins,
1095 	.npins = ARRAY_SIZE(sdx75_pins),
1096 	.functions = sdx75_functions,
1097 	.nfunctions = ARRAY_SIZE(sdx75_functions),
1098 	.groups = sdx75_groups,
1099 	.ngroups = ARRAY_SIZE(sdx75_groups),
1100 	.ngpios = 133,
1101 	.wakeirq_map = sdx75_pdc_map,
1102 	.nwakeirq_map = ARRAY_SIZE(sdx75_pdc_map),
1103 };
1104 
1105 static const struct of_device_id sdx75_pinctrl_of_match[] = {
1106 	{ .compatible = "qcom,sdx75-tlmm", .data = &sdx75_pinctrl },
1107 	{ }
1108 };
1109 MODULE_DEVICE_TABLE(of, sdx75_pinctrl_of_match);
1110 
1111 static int sdx75_pinctrl_probe(struct platform_device *pdev)
1112 {
1113 	const struct msm_pinctrl_soc_data *pinctrl_data;
1114 
1115 	pinctrl_data = of_device_get_match_data(&pdev->dev);
1116 	if (!pinctrl_data)
1117 		return -EINVAL;
1118 
1119 	return msm_pinctrl_probe(pdev, pinctrl_data);
1120 }
1121 
1122 static struct platform_driver sdx75_pinctrl_driver = {
1123 	.driver = {
1124 		.name = "sdx75-tlmm",
1125 		.of_match_table = sdx75_pinctrl_of_match,
1126 	},
1127 	.probe = sdx75_pinctrl_probe,
1128 	.remove = msm_pinctrl_remove,
1129 };
1130 
1131 static int __init sdx75_pinctrl_init(void)
1132 {
1133 	return platform_driver_register(&sdx75_pinctrl_driver);
1134 }
1135 arch_initcall(sdx75_pinctrl_init);
1136 
1137 static void __exit sdx75_pinctrl_exit(void)
1138 {
1139 	platform_driver_unregister(&sdx75_pinctrl_driver);
1140 }
1141 module_exit(sdx75_pinctrl_exit);
1142 
1143 MODULE_DESCRIPTION("QTI sdx75 pinctrl driver");
1144 MODULE_LICENSE("GPL");
1145