xref: /linux/drivers/pinctrl/qcom/pinctrl-ipq6018.c (revision bba2c3615bd6cfee7456d1130f2e6b01b3f4e9ba)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4  */
5 
6 #include <linux/module.h>
7 #include <linux/of.h>
8 #include <linux/platform_device.h>
9 
10 #include "pinctrl-msm.h"
11 
12 #define REG_SIZE 0x1000
13 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)	\
14 	{					        \
15 		.grp = PINCTRL_PINGROUP("gpio" #id, 	\
16 			gpio##id##_pins, 		\
17 			ARRAY_SIZE(gpio##id##_pins)),	\
18 		.funcs = (int[]){			\
19 			msm_mux_gpio, /* gpio mode */	\
20 			msm_mux_##f1,			\
21 			msm_mux_##f2,			\
22 			msm_mux_##f3,			\
23 			msm_mux_##f4,			\
24 			msm_mux_##f5,			\
25 			msm_mux_##f6,			\
26 			msm_mux_##f7,			\
27 			msm_mux_##f8,			\
28 			msm_mux_##f9			\
29 		},				        \
30 		.nfuncs = 10,				\
31 		.ctl_reg = REG_SIZE * id,			\
32 		.io_reg = 0x4 + REG_SIZE * id,		\
33 		.intr_cfg_reg = 0x8 + REG_SIZE * id,		\
34 		.intr_status_reg = 0xc + REG_SIZE * id,	\
35 		.mux_bit = 2,			\
36 		.pull_bit = 0,			\
37 		.drv_bit = 6,			\
38 		.oe_bit = 9,			\
39 		.in_bit = 0,			\
40 		.out_bit = 1,			\
41 		.intr_enable_bit = 0,		\
42 		.intr_status_bit = 0,		\
43 		.intr_target_bit = 5,		\
44 		.intr_target_kpss_val = 3,	\
45 		.intr_raw_status_bit = 4,	\
46 		.intr_polarity_bit = 1,		\
47 		.intr_detection_bit = 2,	\
48 		.intr_detection_width = 2,	\
49 	}
50 
51 static const struct pinctrl_pin_desc ipq6018_pins[] = {
52 	PINCTRL_PIN(0, "GPIO_0"),
53 	PINCTRL_PIN(1, "GPIO_1"),
54 	PINCTRL_PIN(2, "GPIO_2"),
55 	PINCTRL_PIN(3, "GPIO_3"),
56 	PINCTRL_PIN(4, "GPIO_4"),
57 	PINCTRL_PIN(5, "GPIO_5"),
58 	PINCTRL_PIN(6, "GPIO_6"),
59 	PINCTRL_PIN(7, "GPIO_7"),
60 	PINCTRL_PIN(8, "GPIO_8"),
61 	PINCTRL_PIN(9, "GPIO_9"),
62 	PINCTRL_PIN(10, "GPIO_10"),
63 	PINCTRL_PIN(11, "GPIO_11"),
64 	PINCTRL_PIN(12, "GPIO_12"),
65 	PINCTRL_PIN(13, "GPIO_13"),
66 	PINCTRL_PIN(14, "GPIO_14"),
67 	PINCTRL_PIN(15, "GPIO_15"),
68 	PINCTRL_PIN(16, "GPIO_16"),
69 	PINCTRL_PIN(17, "GPIO_17"),
70 	PINCTRL_PIN(18, "GPIO_18"),
71 	PINCTRL_PIN(19, "GPIO_19"),
72 	PINCTRL_PIN(20, "GPIO_20"),
73 	PINCTRL_PIN(21, "GPIO_21"),
74 	PINCTRL_PIN(22, "GPIO_22"),
75 	PINCTRL_PIN(23, "GPIO_23"),
76 	PINCTRL_PIN(24, "GPIO_24"),
77 	PINCTRL_PIN(25, "GPIO_25"),
78 	PINCTRL_PIN(26, "GPIO_26"),
79 	PINCTRL_PIN(27, "GPIO_27"),
80 	PINCTRL_PIN(28, "GPIO_28"),
81 	PINCTRL_PIN(29, "GPIO_29"),
82 	PINCTRL_PIN(30, "GPIO_30"),
83 	PINCTRL_PIN(31, "GPIO_31"),
84 	PINCTRL_PIN(32, "GPIO_32"),
85 	PINCTRL_PIN(33, "GPIO_33"),
86 	PINCTRL_PIN(34, "GPIO_34"),
87 	PINCTRL_PIN(35, "GPIO_35"),
88 	PINCTRL_PIN(36, "GPIO_36"),
89 	PINCTRL_PIN(37, "GPIO_37"),
90 	PINCTRL_PIN(38, "GPIO_38"),
91 	PINCTRL_PIN(39, "GPIO_39"),
92 	PINCTRL_PIN(40, "GPIO_40"),
93 	PINCTRL_PIN(41, "GPIO_41"),
94 	PINCTRL_PIN(42, "GPIO_42"),
95 	PINCTRL_PIN(43, "GPIO_43"),
96 	PINCTRL_PIN(44, "GPIO_44"),
97 	PINCTRL_PIN(45, "GPIO_45"),
98 	PINCTRL_PIN(46, "GPIO_46"),
99 	PINCTRL_PIN(47, "GPIO_47"),
100 	PINCTRL_PIN(48, "GPIO_48"),
101 	PINCTRL_PIN(49, "GPIO_49"),
102 	PINCTRL_PIN(50, "GPIO_50"),
103 	PINCTRL_PIN(51, "GPIO_51"),
104 	PINCTRL_PIN(52, "GPIO_52"),
105 	PINCTRL_PIN(53, "GPIO_53"),
106 	PINCTRL_PIN(54, "GPIO_54"),
107 	PINCTRL_PIN(55, "GPIO_55"),
108 	PINCTRL_PIN(56, "GPIO_56"),
109 	PINCTRL_PIN(57, "GPIO_57"),
110 	PINCTRL_PIN(58, "GPIO_58"),
111 	PINCTRL_PIN(59, "GPIO_59"),
112 	PINCTRL_PIN(60, "GPIO_60"),
113 	PINCTRL_PIN(61, "GPIO_61"),
114 	PINCTRL_PIN(62, "GPIO_62"),
115 	PINCTRL_PIN(63, "GPIO_63"),
116 	PINCTRL_PIN(64, "GPIO_64"),
117 	PINCTRL_PIN(65, "GPIO_65"),
118 	PINCTRL_PIN(66, "GPIO_66"),
119 	PINCTRL_PIN(67, "GPIO_67"),
120 	PINCTRL_PIN(68, "GPIO_68"),
121 	PINCTRL_PIN(69, "GPIO_69"),
122 	PINCTRL_PIN(70, "GPIO_70"),
123 	PINCTRL_PIN(71, "GPIO_71"),
124 	PINCTRL_PIN(72, "GPIO_72"),
125 	PINCTRL_PIN(73, "GPIO_73"),
126 	PINCTRL_PIN(74, "GPIO_74"),
127 	PINCTRL_PIN(75, "GPIO_75"),
128 	PINCTRL_PIN(76, "GPIO_76"),
129 	PINCTRL_PIN(77, "GPIO_77"),
130 	PINCTRL_PIN(78, "GPIO_78"),
131 	PINCTRL_PIN(79, "GPIO_79"),
132 };
133 
134 #define DECLARE_MSM_GPIO_PINS(pin) \
135 	static const unsigned int gpio##pin##_pins[] = { pin }
136 DECLARE_MSM_GPIO_PINS(0);
137 DECLARE_MSM_GPIO_PINS(1);
138 DECLARE_MSM_GPIO_PINS(2);
139 DECLARE_MSM_GPIO_PINS(3);
140 DECLARE_MSM_GPIO_PINS(4);
141 DECLARE_MSM_GPIO_PINS(5);
142 DECLARE_MSM_GPIO_PINS(6);
143 DECLARE_MSM_GPIO_PINS(7);
144 DECLARE_MSM_GPIO_PINS(8);
145 DECLARE_MSM_GPIO_PINS(9);
146 DECLARE_MSM_GPIO_PINS(10);
147 DECLARE_MSM_GPIO_PINS(11);
148 DECLARE_MSM_GPIO_PINS(12);
149 DECLARE_MSM_GPIO_PINS(13);
150 DECLARE_MSM_GPIO_PINS(14);
151 DECLARE_MSM_GPIO_PINS(15);
152 DECLARE_MSM_GPIO_PINS(16);
153 DECLARE_MSM_GPIO_PINS(17);
154 DECLARE_MSM_GPIO_PINS(18);
155 DECLARE_MSM_GPIO_PINS(19);
156 DECLARE_MSM_GPIO_PINS(20);
157 DECLARE_MSM_GPIO_PINS(21);
158 DECLARE_MSM_GPIO_PINS(22);
159 DECLARE_MSM_GPIO_PINS(23);
160 DECLARE_MSM_GPIO_PINS(24);
161 DECLARE_MSM_GPIO_PINS(25);
162 DECLARE_MSM_GPIO_PINS(26);
163 DECLARE_MSM_GPIO_PINS(27);
164 DECLARE_MSM_GPIO_PINS(28);
165 DECLARE_MSM_GPIO_PINS(29);
166 DECLARE_MSM_GPIO_PINS(30);
167 DECLARE_MSM_GPIO_PINS(31);
168 DECLARE_MSM_GPIO_PINS(32);
169 DECLARE_MSM_GPIO_PINS(33);
170 DECLARE_MSM_GPIO_PINS(34);
171 DECLARE_MSM_GPIO_PINS(35);
172 DECLARE_MSM_GPIO_PINS(36);
173 DECLARE_MSM_GPIO_PINS(37);
174 DECLARE_MSM_GPIO_PINS(38);
175 DECLARE_MSM_GPIO_PINS(39);
176 DECLARE_MSM_GPIO_PINS(40);
177 DECLARE_MSM_GPIO_PINS(41);
178 DECLARE_MSM_GPIO_PINS(42);
179 DECLARE_MSM_GPIO_PINS(43);
180 DECLARE_MSM_GPIO_PINS(44);
181 DECLARE_MSM_GPIO_PINS(45);
182 DECLARE_MSM_GPIO_PINS(46);
183 DECLARE_MSM_GPIO_PINS(47);
184 DECLARE_MSM_GPIO_PINS(48);
185 DECLARE_MSM_GPIO_PINS(49);
186 DECLARE_MSM_GPIO_PINS(50);
187 DECLARE_MSM_GPIO_PINS(51);
188 DECLARE_MSM_GPIO_PINS(52);
189 DECLARE_MSM_GPIO_PINS(53);
190 DECLARE_MSM_GPIO_PINS(54);
191 DECLARE_MSM_GPIO_PINS(55);
192 DECLARE_MSM_GPIO_PINS(56);
193 DECLARE_MSM_GPIO_PINS(57);
194 DECLARE_MSM_GPIO_PINS(58);
195 DECLARE_MSM_GPIO_PINS(59);
196 DECLARE_MSM_GPIO_PINS(60);
197 DECLARE_MSM_GPIO_PINS(61);
198 DECLARE_MSM_GPIO_PINS(62);
199 DECLARE_MSM_GPIO_PINS(63);
200 DECLARE_MSM_GPIO_PINS(64);
201 DECLARE_MSM_GPIO_PINS(65);
202 DECLARE_MSM_GPIO_PINS(66);
203 DECLARE_MSM_GPIO_PINS(67);
204 DECLARE_MSM_GPIO_PINS(68);
205 DECLARE_MSM_GPIO_PINS(69);
206 DECLARE_MSM_GPIO_PINS(70);
207 DECLARE_MSM_GPIO_PINS(71);
208 DECLARE_MSM_GPIO_PINS(72);
209 DECLARE_MSM_GPIO_PINS(73);
210 DECLARE_MSM_GPIO_PINS(74);
211 DECLARE_MSM_GPIO_PINS(75);
212 DECLARE_MSM_GPIO_PINS(76);
213 DECLARE_MSM_GPIO_PINS(77);
214 DECLARE_MSM_GPIO_PINS(78);
215 DECLARE_MSM_GPIO_PINS(79);
216 
217 enum ipq6018_functions {
218 	msm_mux_atest_char,
219 	msm_mux_atest_char0,
220 	msm_mux_atest_char1,
221 	msm_mux_atest_char2,
222 	msm_mux_atest_char3,
223 	msm_mux_audio0,
224 	msm_mux_audio1,
225 	msm_mux_audio2,
226 	msm_mux_audio3,
227 	msm_mux_audio_rxbclk,
228 	msm_mux_audio_rxfsync,
229 	msm_mux_audio_rxmclk,
230 	msm_mux_audio_rxmclkin,
231 	msm_mux_audio_txbclk,
232 	msm_mux_audio_txfsync,
233 	msm_mux_audio_txmclk,
234 	msm_mux_audio_txmclkin,
235 	msm_mux_blsp0_i2c,
236 	msm_mux_blsp0_spi,
237 	msm_mux_blsp0_uart,
238 	msm_mux_blsp1_i2c,
239 	msm_mux_blsp1_spi,
240 	msm_mux_blsp1_uart,
241 	msm_mux_blsp2_i2c,
242 	msm_mux_blsp2_spi,
243 	msm_mux_blsp2_uart,
244 	msm_mux_blsp3_i2c,
245 	msm_mux_blsp3_spi,
246 	msm_mux_blsp3_uart,
247 	msm_mux_blsp4_i2c,
248 	msm_mux_blsp4_spi,
249 	msm_mux_blsp4_uart,
250 	msm_mux_blsp5_i2c,
251 	msm_mux_blsp5_uart,
252 	msm_mux_burn0,
253 	msm_mux_burn1,
254 	msm_mux_cri_trng,
255 	msm_mux_cri_trng0,
256 	msm_mux_cri_trng1,
257 	msm_mux_cxc0,
258 	msm_mux_cxc1,
259 	msm_mux_dbg_out,
260 	msm_mux_gcc_plltest,
261 	msm_mux_gcc_tlmm,
262 	msm_mux_gpio,
263 	msm_mux_lpass_aud,
264 	msm_mux_lpass_aud0,
265 	msm_mux_lpass_aud1,
266 	msm_mux_lpass_aud2,
267 	msm_mux_lpass_pcm,
268 	msm_mux_lpass_pdm,
269 	msm_mux_mac00,
270 	msm_mux_mac01,
271 	msm_mux_mac10,
272 	msm_mux_mac11,
273 	msm_mux_mac12,
274 	msm_mux_mac13,
275 	msm_mux_mac20,
276 	msm_mux_mac21,
277 	msm_mux_mdc,
278 	msm_mux_mdio,
279 	msm_mux_pcie0_clk,
280 	msm_mux_pcie0_rst,
281 	msm_mux_pcie0_wake,
282 	msm_mux_prng_rosc,
283 	msm_mux_pta1_0,
284 	msm_mux_pta1_1,
285 	msm_mux_pta1_2,
286 	msm_mux_pta2_0,
287 	msm_mux_pta2_1,
288 	msm_mux_pta2_2,
289 	msm_mux_pwm00,
290 	msm_mux_pwm01,
291 	msm_mux_pwm02,
292 	msm_mux_pwm03,
293 	msm_mux_pwm04,
294 	msm_mux_pwm10,
295 	msm_mux_pwm11,
296 	msm_mux_pwm12,
297 	msm_mux_pwm13,
298 	msm_mux_pwm14,
299 	msm_mux_pwm20,
300 	msm_mux_pwm21,
301 	msm_mux_pwm22,
302 	msm_mux_pwm23,
303 	msm_mux_pwm24,
304 	msm_mux_pwm30,
305 	msm_mux_pwm31,
306 	msm_mux_pwm32,
307 	msm_mux_pwm33,
308 	msm_mux_qdss_cti_trig_in_a0,
309 	msm_mux_qdss_cti_trig_in_a1,
310 	msm_mux_qdss_cti_trig_out_a0,
311 	msm_mux_qdss_cti_trig_out_a1,
312 	msm_mux_qdss_cti_trig_in_b0,
313 	msm_mux_qdss_cti_trig_in_b1,
314 	msm_mux_qdss_cti_trig_out_b0,
315 	msm_mux_qdss_cti_trig_out_b1,
316 	msm_mux_qdss_traceclk_a,
317 	msm_mux_qdss_tracectl_a,
318 	msm_mux_qdss_tracedata_a,
319 	msm_mux_qdss_traceclk_b,
320 	msm_mux_qdss_tracectl_b,
321 	msm_mux_qdss_tracedata_b,
322 	msm_mux_qpic_pad,
323 	msm_mux_rx0,
324 	msm_mux_rx1,
325 	msm_mux_rx_swrm,
326 	msm_mux_rx_swrm0,
327 	msm_mux_rx_swrm1,
328 	msm_mux_sd_card,
329 	msm_mux_sd_write,
330 	msm_mux_tsens_max,
331 	msm_mux_tx_swrm,
332 	msm_mux_tx_swrm0,
333 	msm_mux_tx_swrm1,
334 	msm_mux_tx_swrm2,
335 	msm_mux_wci20,
336 	msm_mux_wci21,
337 	msm_mux_wci22,
338 	msm_mux_wci23,
339 	msm_mux_wsa_swrm,
340 	msm_mux__,
341 };
342 
343 static const char * const blsp3_uart_groups[] = {
344 	"gpio73", "gpio74", "gpio75", "gpio76",
345 };
346 
347 static const char * const blsp3_i2c_groups[] = {
348 	"gpio73", "gpio74",
349 };
350 
351 static const char * const blsp3_spi_groups[] = {
352 	"gpio73", "gpio74", "gpio75", "gpio76", "gpio77", "gpio78", "gpio79",
353 };
354 
355 static const char * const wci20_groups[] = {
356 	"gpio0", "gpio2",
357 };
358 
359 static const char * const qpic_pad_groups[] = {
360 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio9", "gpio10",
361 	"gpio11", "gpio17", "gpio15", "gpio12", "gpio13", "gpio14", "gpio5",
362 	"gpio6", "gpio7", "gpio8",
363 };
364 
365 static const char * const burn0_groups[] = {
366 	"gpio0",
367 };
368 
369 static const char * const mac12_groups[] = {
370 	"gpio1", "gpio11",
371 };
372 
373 static const char * const qdss_tracectl_b_groups[] = {
374 	"gpio1",
375 };
376 
377 static const char * const burn1_groups[] = {
378 	"gpio1",
379 };
380 
381 static const char * const qdss_traceclk_b_groups[] = {
382 	"gpio0",
383 };
384 
385 static const char * const qdss_tracedata_b_groups[] = {
386 	"gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio8", "gpio9",
387 	"gpio10", "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio16",
388 	"gpio17",
389 };
390 
391 static const char * const mac01_groups[] = {
392 	"gpio3", "gpio4",
393 };
394 
395 static const char * const mac21_groups[] = {
396 	"gpio5", "gpio6",
397 };
398 
399 static const char * const atest_char_groups[] = {
400 	"gpio9",
401 };
402 
403 static const char * const cxc0_groups[] = {
404 	"gpio9", "gpio16",
405 };
406 
407 static const char * const mac13_groups[] = {
408 	"gpio9", "gpio16",
409 };
410 
411 static const char * const dbg_out_groups[] = {
412 	"gpio9",
413 };
414 
415 static const char * const wci22_groups[] = {
416 	"gpio11", "gpio17",
417 };
418 
419 static const char * const pwm00_groups[] = {
420 	"gpio18",
421 };
422 
423 static const char * const atest_char0_groups[] = {
424 	"gpio18",
425 };
426 
427 static const char * const wci23_groups[] = {
428 	"gpio18", "gpio19",
429 };
430 
431 static const char * const mac11_groups[] = {
432 	"gpio18", "gpio19",
433 };
434 
435 static const char * const pwm10_groups[] = {
436 	"gpio19",
437 };
438 
439 static const char * const atest_char1_groups[] = {
440 	"gpio19",
441 };
442 
443 static const char * const pwm20_groups[] = {
444 	"gpio20",
445 };
446 
447 static const char * const atest_char2_groups[] = {
448 	"gpio20",
449 };
450 
451 static const char * const pwm30_groups[] = {
452 	"gpio21",
453 };
454 
455 static const char * const atest_char3_groups[] = {
456 	"gpio21",
457 };
458 
459 static const char * const audio_txmclk_groups[] = {
460 	"gpio22",
461 };
462 
463 static const char * const audio_txmclkin_groups[] = {
464 	"gpio22",
465 };
466 
467 static const char * const pwm02_groups[] = {
468 	"gpio22",
469 };
470 
471 static const char * const tx_swrm0_groups[] = {
472 	"gpio22",
473 };
474 
475 static const char * const qdss_cti_trig_out_b0_groups[] = {
476 	"gpio22",
477 };
478 
479 static const char * const audio_txbclk_groups[] = {
480 	"gpio23",
481 };
482 
483 static const char * const pwm12_groups[] = {
484 	"gpio23",
485 };
486 
487 static const char * const wsa_swrm_groups[] = {
488 	"gpio23", "gpio24",
489 };
490 
491 static const char * const tx_swrm1_groups[] = {
492 	"gpio23",
493 };
494 
495 static const char * const qdss_cti_trig_in_b0_groups[] = {
496 	"gpio23",
497 };
498 
499 static const char * const audio_txfsync_groups[] = {
500 	"gpio24",
501 };
502 
503 static const char * const pwm22_groups[] = {
504 	"gpio24",
505 };
506 
507 static const char * const tx_swrm2_groups[] = {
508 	"gpio24",
509 };
510 
511 static const char * const qdss_cti_trig_out_b1_groups[] = {
512 	"gpio24",
513 };
514 
515 static const char * const audio0_groups[] = {
516 	"gpio25", "gpio32",
517 };
518 
519 static const char * const pwm32_groups[] = {
520 	"gpio25",
521 };
522 
523 static const char * const tx_swrm_groups[] = {
524 	"gpio25",
525 };
526 
527 static const char * const qdss_cti_trig_in_b1_groups[] = {
528 	"gpio25",
529 };
530 
531 static const char * const audio1_groups[] = {
532 	"gpio26", "gpio33",
533 };
534 
535 static const char * const pwm04_groups[] = {
536 	"gpio26",
537 };
538 
539 static const char * const audio2_groups[] = {
540 	"gpio27",
541 };
542 
543 static const char * const pwm14_groups[] = {
544 	"gpio27",
545 };
546 
547 static const char * const audio3_groups[] = {
548 	"gpio28",
549 };
550 
551 static const char * const pwm24_groups[] = {
552 	"gpio28",
553 };
554 
555 static const char * const audio_rxmclk_groups[] = {
556 	"gpio29",
557 };
558 
559 static const char * const audio_rxmclkin_groups[] = {
560 	"gpio29",
561 };
562 
563 static const char * const pwm03_groups[] = {
564 	"gpio29",
565 };
566 
567 static const char * const lpass_pdm_groups[] = {
568 	"gpio29", "gpio30", "gpio31", "gpio32",
569 };
570 
571 static const char * const lpass_aud_groups[] = {
572 	"gpio29",
573 };
574 
575 static const char * const qdss_cti_trig_in_a1_groups[] = {
576 	"gpio29",
577 };
578 
579 static const char * const audio_rxbclk_groups[] = {
580 	"gpio30",
581 };
582 
583 static const char * const pwm13_groups[] = {
584 	"gpio30",
585 };
586 
587 static const char * const lpass_aud0_groups[] = {
588 	"gpio30",
589 };
590 
591 static const char * const rx_swrm_groups[] = {
592 	"gpio30",
593 };
594 
595 static const char * const qdss_cti_trig_out_a1_groups[] = {
596 	"gpio30",
597 };
598 
599 static const char * const audio_rxfsync_groups[] = {
600 	"gpio31",
601 };
602 
603 static const char * const pwm23_groups[] = {
604 	"gpio31",
605 };
606 
607 static const char * const lpass_aud1_groups[] = {
608 	"gpio31",
609 };
610 
611 static const char * const rx_swrm0_groups[] = {
612 	"gpio31",
613 };
614 
615 static const char * const qdss_cti_trig_in_a0_groups[] = {
616 	"gpio31",
617 };
618 
619 static const char * const pwm33_groups[] = {
620 	"gpio32",
621 };
622 
623 static const char * const lpass_aud2_groups[] = {
624 	"gpio32",
625 };
626 
627 static const char * const rx_swrm1_groups[] = {
628 	"gpio32",
629 };
630 
631 static const char * const qdss_cti_trig_out_a0_groups[] = {
632 	"gpio32",
633 };
634 
635 static const char * const lpass_pcm_groups[] = {
636 	"gpio34", "gpio35", "gpio36", "gpio37",
637 };
638 
639 static const char * const mac10_groups[] = {
640 	"gpio34", "gpio35",
641 };
642 
643 static const char * const mac00_groups[] = {
644 	"gpio34", "gpio35",
645 };
646 
647 static const char * const mac20_groups[] = {
648 	"gpio36", "gpio37",
649 };
650 
651 static const char * const blsp0_uart_groups[] = {
652 	"gpio38", "gpio39", "gpio40", "gpio41",
653 };
654 
655 static const char * const blsp0_i2c_groups[] = {
656 	"gpio38", "gpio39",
657 };
658 
659 static const char * const blsp0_spi_groups[] = {
660 	"gpio38", "gpio39", "gpio40", "gpio41",
661 };
662 
663 static const char * const blsp2_uart_groups[] = {
664 	"gpio42", "gpio43", "gpio44", "gpio45",
665 };
666 
667 static const char * const blsp2_i2c_groups[] = {
668 	"gpio42", "gpio43",
669 };
670 
671 static const char * const blsp2_spi_groups[] = {
672 	"gpio42", "gpio43", "gpio44", "gpio45",
673 };
674 
675 static const char * const blsp5_i2c_groups[] = {
676 	"gpio46", "gpio47",
677 };
678 
679 static const char * const blsp5_uart_groups[] = {
680 	"gpio48", "gpio49",
681 };
682 
683 static const char * const qdss_traceclk_a_groups[] = {
684 	"gpio48",
685 };
686 
687 static const char * const qdss_tracectl_a_groups[] = {
688 	"gpio49",
689 };
690 
691 static const char * const pwm01_groups[] = {
692 	"gpio50",
693 };
694 
695 static const char * const pta1_1_groups[] = {
696 	"gpio51",
697 };
698 
699 static const char * const pwm11_groups[] = {
700 	"gpio51",
701 };
702 
703 static const char * const rx1_groups[] = {
704 	"gpio51",
705 };
706 
707 static const char * const pta1_2_groups[] = {
708 	"gpio52",
709 };
710 
711 static const char * const pwm21_groups[] = {
712 	"gpio52",
713 };
714 
715 static const char * const pta1_0_groups[] = {
716 	"gpio53",
717 };
718 
719 static const char * const pwm31_groups[] = {
720 	"gpio53",
721 };
722 
723 static const char * const prng_rosc_groups[] = {
724 	"gpio53",
725 };
726 
727 static const char * const blsp4_uart_groups[] = {
728 	"gpio55", "gpio56", "gpio57", "gpio58",
729 };
730 
731 static const char * const blsp4_i2c_groups[] = {
732 	"gpio55", "gpio56",
733 };
734 
735 static const char * const blsp4_spi_groups[] = {
736 	"gpio55", "gpio56", "gpio57", "gpio58",
737 };
738 
739 static const char * const pcie0_clk_groups[] = {
740 	"gpio59",
741 };
742 
743 static const char * const cri_trng0_groups[] = {
744 	"gpio59",
745 };
746 
747 static const char * const pcie0_rst_groups[] = {
748 	"gpio60",
749 };
750 
751 static const char * const cri_trng1_groups[] = {
752 	"gpio60",
753 };
754 
755 static const char * const pcie0_wake_groups[] = {
756 	"gpio61",
757 };
758 
759 static const char * const cri_trng_groups[] = {
760 	"gpio61",
761 };
762 
763 static const char * const sd_card_groups[] = {
764 	"gpio62",
765 };
766 
767 static const char * const sd_write_groups[] = {
768 	"gpio63",
769 };
770 
771 static const char * const rx0_groups[] = {
772 	"gpio63",
773 };
774 
775 static const char * const tsens_max_groups[] = {
776 	"gpio63",
777 };
778 
779 static const char * const mdc_groups[] = {
780 	"gpio64",
781 };
782 
783 static const char * const qdss_tracedata_a_groups[] = {
784 	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
785 	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
786 	"gpio78", "gpio79",
787 };
788 
789 static const char * const mdio_groups[] = {
790 	"gpio65",
791 };
792 
793 static const char * const pta2_0_groups[] = {
794 	"gpio66",
795 };
796 
797 static const char * const wci21_groups[] = {
798 	"gpio66", "gpio68",
799 };
800 
801 static const char * const cxc1_groups[] = {
802 	"gpio66", "gpio68",
803 };
804 
805 static const char * const pta2_1_groups[] = {
806 	"gpio67",
807 };
808 
809 static const char * const pta2_2_groups[] = {
810 	"gpio68",
811 };
812 
813 static const char * const blsp1_uart_groups[] = {
814 	"gpio69", "gpio70", "gpio71", "gpio72",
815 };
816 
817 static const char * const blsp1_i2c_groups[] = {
818 	"gpio69", "gpio70",
819 };
820 
821 static const char * const blsp1_spi_groups[] = {
822 	"gpio69", "gpio70", "gpio71", "gpio72",
823 };
824 
825 static const char * const gcc_plltest_groups[] = {
826 	"gpio69", "gpio71",
827 };
828 
829 static const char * const gcc_tlmm_groups[] = {
830 	"gpio70",
831 };
832 
833 static const char * const gpio_groups[] = {
834 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
835 	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
836 	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
837 	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
838 	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
839 	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
840 	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
841 	"gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
842 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
843 	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
844 	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
845 	"gpio78", "gpio79",
846 };
847 
848 static const struct pinfunction ipq6018_functions[] = {
849 	MSM_PIN_FUNCTION(atest_char),
850 	MSM_PIN_FUNCTION(atest_char0),
851 	MSM_PIN_FUNCTION(atest_char1),
852 	MSM_PIN_FUNCTION(atest_char2),
853 	MSM_PIN_FUNCTION(atest_char3),
854 	MSM_PIN_FUNCTION(audio0),
855 	MSM_PIN_FUNCTION(audio1),
856 	MSM_PIN_FUNCTION(audio2),
857 	MSM_PIN_FUNCTION(audio3),
858 	MSM_PIN_FUNCTION(audio_rxbclk),
859 	MSM_PIN_FUNCTION(audio_rxfsync),
860 	MSM_PIN_FUNCTION(audio_rxmclk),
861 	MSM_PIN_FUNCTION(audio_rxmclkin),
862 	MSM_PIN_FUNCTION(audio_txbclk),
863 	MSM_PIN_FUNCTION(audio_txfsync),
864 	MSM_PIN_FUNCTION(audio_txmclk),
865 	MSM_PIN_FUNCTION(audio_txmclkin),
866 	MSM_PIN_FUNCTION(blsp0_i2c),
867 	MSM_PIN_FUNCTION(blsp0_spi),
868 	MSM_PIN_FUNCTION(blsp0_uart),
869 	MSM_PIN_FUNCTION(blsp1_i2c),
870 	MSM_PIN_FUNCTION(blsp1_spi),
871 	MSM_PIN_FUNCTION(blsp1_uart),
872 	MSM_PIN_FUNCTION(blsp2_i2c),
873 	MSM_PIN_FUNCTION(blsp2_spi),
874 	MSM_PIN_FUNCTION(blsp2_uart),
875 	MSM_PIN_FUNCTION(blsp3_i2c),
876 	MSM_PIN_FUNCTION(blsp3_spi),
877 	MSM_PIN_FUNCTION(blsp3_uart),
878 	MSM_PIN_FUNCTION(blsp4_i2c),
879 	MSM_PIN_FUNCTION(blsp4_spi),
880 	MSM_PIN_FUNCTION(blsp4_uart),
881 	MSM_PIN_FUNCTION(blsp5_i2c),
882 	MSM_PIN_FUNCTION(blsp5_uart),
883 	MSM_PIN_FUNCTION(burn0),
884 	MSM_PIN_FUNCTION(burn1),
885 	MSM_PIN_FUNCTION(cri_trng),
886 	MSM_PIN_FUNCTION(cri_trng0),
887 	MSM_PIN_FUNCTION(cri_trng1),
888 	MSM_PIN_FUNCTION(cxc0),
889 	MSM_PIN_FUNCTION(cxc1),
890 	MSM_PIN_FUNCTION(dbg_out),
891 	MSM_PIN_FUNCTION(gcc_plltest),
892 	MSM_PIN_FUNCTION(gcc_tlmm),
893 	MSM_GPIO_PIN_FUNCTION(gpio),
894 	MSM_PIN_FUNCTION(lpass_aud),
895 	MSM_PIN_FUNCTION(lpass_aud0),
896 	MSM_PIN_FUNCTION(lpass_aud1),
897 	MSM_PIN_FUNCTION(lpass_aud2),
898 	MSM_PIN_FUNCTION(lpass_pcm),
899 	MSM_PIN_FUNCTION(lpass_pdm),
900 	MSM_PIN_FUNCTION(mac00),
901 	MSM_PIN_FUNCTION(mac01),
902 	MSM_PIN_FUNCTION(mac10),
903 	MSM_PIN_FUNCTION(mac11),
904 	MSM_PIN_FUNCTION(mac12),
905 	MSM_PIN_FUNCTION(mac13),
906 	MSM_PIN_FUNCTION(mac20),
907 	MSM_PIN_FUNCTION(mac21),
908 	MSM_PIN_FUNCTION(mdc),
909 	MSM_PIN_FUNCTION(mdio),
910 	MSM_PIN_FUNCTION(pcie0_clk),
911 	MSM_PIN_FUNCTION(pcie0_rst),
912 	MSM_PIN_FUNCTION(pcie0_wake),
913 	MSM_PIN_FUNCTION(prng_rosc),
914 	MSM_PIN_FUNCTION(pta1_0),
915 	MSM_PIN_FUNCTION(pta1_1),
916 	MSM_PIN_FUNCTION(pta1_2),
917 	MSM_PIN_FUNCTION(pta2_0),
918 	MSM_PIN_FUNCTION(pta2_1),
919 	MSM_PIN_FUNCTION(pta2_2),
920 	MSM_PIN_FUNCTION(pwm00),
921 	MSM_PIN_FUNCTION(pwm01),
922 	MSM_PIN_FUNCTION(pwm02),
923 	MSM_PIN_FUNCTION(pwm03),
924 	MSM_PIN_FUNCTION(pwm04),
925 	MSM_PIN_FUNCTION(pwm10),
926 	MSM_PIN_FUNCTION(pwm11),
927 	MSM_PIN_FUNCTION(pwm12),
928 	MSM_PIN_FUNCTION(pwm13),
929 	MSM_PIN_FUNCTION(pwm14),
930 	MSM_PIN_FUNCTION(pwm20),
931 	MSM_PIN_FUNCTION(pwm21),
932 	MSM_PIN_FUNCTION(pwm22),
933 	MSM_PIN_FUNCTION(pwm23),
934 	MSM_PIN_FUNCTION(pwm24),
935 	MSM_PIN_FUNCTION(pwm30),
936 	MSM_PIN_FUNCTION(pwm31),
937 	MSM_PIN_FUNCTION(pwm32),
938 	MSM_PIN_FUNCTION(pwm33),
939 	MSM_PIN_FUNCTION(qdss_cti_trig_in_a0),
940 	MSM_PIN_FUNCTION(qdss_cti_trig_in_a1),
941 	MSM_PIN_FUNCTION(qdss_cti_trig_out_a0),
942 	MSM_PIN_FUNCTION(qdss_cti_trig_out_a1),
943 	MSM_PIN_FUNCTION(qdss_cti_trig_in_b0),
944 	MSM_PIN_FUNCTION(qdss_cti_trig_in_b1),
945 	MSM_PIN_FUNCTION(qdss_cti_trig_out_b0),
946 	MSM_PIN_FUNCTION(qdss_cti_trig_out_b1),
947 	MSM_PIN_FUNCTION(qdss_traceclk_a),
948 	MSM_PIN_FUNCTION(qdss_tracectl_a),
949 	MSM_PIN_FUNCTION(qdss_tracedata_a),
950 	MSM_PIN_FUNCTION(qdss_traceclk_b),
951 	MSM_PIN_FUNCTION(qdss_tracectl_b),
952 	MSM_PIN_FUNCTION(qdss_tracedata_b),
953 	MSM_PIN_FUNCTION(qpic_pad),
954 	MSM_PIN_FUNCTION(rx0),
955 	MSM_PIN_FUNCTION(rx1),
956 	MSM_PIN_FUNCTION(rx_swrm),
957 	MSM_PIN_FUNCTION(rx_swrm0),
958 	MSM_PIN_FUNCTION(rx_swrm1),
959 	MSM_PIN_FUNCTION(sd_card),
960 	MSM_PIN_FUNCTION(sd_write),
961 	MSM_PIN_FUNCTION(tsens_max),
962 	MSM_PIN_FUNCTION(tx_swrm),
963 	MSM_PIN_FUNCTION(tx_swrm0),
964 	MSM_PIN_FUNCTION(tx_swrm1),
965 	MSM_PIN_FUNCTION(tx_swrm2),
966 	MSM_PIN_FUNCTION(wci20),
967 	MSM_PIN_FUNCTION(wci21),
968 	MSM_PIN_FUNCTION(wci22),
969 	MSM_PIN_FUNCTION(wci23),
970 	MSM_PIN_FUNCTION(wsa_swrm),
971 };
972 
973 static const struct msm_pingroup ipq6018_groups[] = {
974 	PINGROUP(0, qpic_pad, wci20, qdss_traceclk_b, _, burn0, _, _, _, _),
975 	PINGROUP(1, qpic_pad, mac12, qdss_tracectl_b, _, burn1, _, _, _, _),
976 	PINGROUP(2, qpic_pad, wci20, qdss_tracedata_b, _, _, _, _, _, _),
977 	PINGROUP(3, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
978 	PINGROUP(4, qpic_pad, mac01, qdss_tracedata_b, _, _, _, _, _, _),
979 	PINGROUP(5, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
980 	PINGROUP(6, qpic_pad, mac21, qdss_tracedata_b, _, _, _, _, _, _),
981 	PINGROUP(7, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
982 	PINGROUP(8, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
983 	PINGROUP(9, qpic_pad, atest_char, cxc0, mac13, dbg_out, qdss_tracedata_b, _, _, _),
984 	PINGROUP(10, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
985 	PINGROUP(11, qpic_pad, wci22, mac12, qdss_tracedata_b, _, _, _, _, _),
986 	PINGROUP(12, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
987 	PINGROUP(13, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
988 	PINGROUP(14, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
989 	PINGROUP(15, qpic_pad, qdss_tracedata_b, _, _, _, _, _, _, _),
990 	PINGROUP(16, qpic_pad, cxc0, mac13, qdss_tracedata_b, _, _, _, _, _),
991 	PINGROUP(17, qpic_pad, qdss_tracedata_b, wci22, _, _, _, _, _, _),
992 	PINGROUP(18, pwm00, atest_char0, wci23, mac11, _, _, _, _, _),
993 	PINGROUP(19, pwm10, atest_char1, wci23, mac11, _, _, _, _, _),
994 	PINGROUP(20, pwm20, atest_char2, _, _, _, _, _, _, _),
995 	PINGROUP(21, pwm30, atest_char3, _, _, _, _, _, _, _),
996 	PINGROUP(22, audio_txmclk, audio_txmclkin, pwm02, tx_swrm0, _, qdss_cti_trig_out_b0, _, _, _),
997 	PINGROUP(23, audio_txbclk, pwm12, wsa_swrm, tx_swrm1, _, qdss_cti_trig_in_b0, _, _, _),
998 	PINGROUP(24, audio_txfsync, pwm22, wsa_swrm, tx_swrm2, _, qdss_cti_trig_out_b1, _, _, _),
999 	PINGROUP(25, audio0, pwm32, tx_swrm, _, qdss_cti_trig_in_b1, _, _, _, _),
1000 	PINGROUP(26, audio1, pwm04, _, _, _, _, _, _, _),
1001 	PINGROUP(27, audio2, pwm14, _, _, _, _, _, _, _),
1002 	PINGROUP(28, audio3, pwm24, _, _, _, _, _, _, _),
1003 	PINGROUP(29, audio_rxmclk, audio_rxmclkin, pwm03, lpass_pdm, lpass_aud, qdss_cti_trig_in_a1, _, _, _),
1004 	PINGROUP(30, audio_rxbclk, pwm13, lpass_pdm, lpass_aud0, rx_swrm, _, qdss_cti_trig_out_a1, _, _),
1005 	PINGROUP(31, audio_rxfsync, pwm23, lpass_pdm, lpass_aud1, rx_swrm0, _, qdss_cti_trig_in_a0, _, _),
1006 	PINGROUP(32, audio0, pwm33, lpass_pdm, lpass_aud2, rx_swrm1, _, qdss_cti_trig_out_a0, _, _),
1007 	PINGROUP(33, audio1, _, _, _, _, _, _, _, _),
1008 	PINGROUP(34, lpass_pcm, mac10, mac00, _, _, _, _, _, _),
1009 	PINGROUP(35, lpass_pcm, mac10, mac00, _, _, _, _, _, _),
1010 	PINGROUP(36, lpass_pcm, mac20, _, _, _, _, _, _, _),
1011 	PINGROUP(37, lpass_pcm, mac20, _, _, _, _, _, _, _),
1012 	PINGROUP(38, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _),
1013 	PINGROUP(39, blsp0_uart, blsp0_i2c, blsp0_spi, _, _, _, _, _, _),
1014 	PINGROUP(40, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _),
1015 	PINGROUP(41, blsp0_uart, blsp0_spi, _, _, _, _, _, _, _),
1016 	PINGROUP(42, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _),
1017 	PINGROUP(43, blsp2_uart, blsp2_i2c, blsp2_spi, _, _, _, _, _, _),
1018 	PINGROUP(44, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _),
1019 	PINGROUP(45, blsp2_uart, blsp2_spi, _, _, _, _, _, _, _),
1020 	PINGROUP(46, blsp5_i2c, _, _, _, _, _, _, _, _),
1021 	PINGROUP(47, blsp5_i2c, _, _, _, _, _, _, _, _),
1022 	PINGROUP(48, blsp5_uart, _, qdss_traceclk_a, _, _, _, _, _, _),
1023 	PINGROUP(49, blsp5_uart, _, qdss_tracectl_a, _, _, _, _, _, _),
1024 	PINGROUP(50, pwm01, _, _, _, _, _, _, _, _),
1025 	PINGROUP(51, pta1_1, pwm11, _, rx1, _, _, _, _, _),
1026 	PINGROUP(52, pta1_2, pwm21, _, _, _, _, _, _, _),
1027 	PINGROUP(53, pta1_0, pwm31, prng_rosc, _, _, _, _, _, _),
1028 	PINGROUP(54, _, _, _, _, _, _, _, _, _),
1029 	PINGROUP(55, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _),
1030 	PINGROUP(56, blsp4_uart, blsp4_i2c, blsp4_spi, _, _, _, _, _, _),
1031 	PINGROUP(57, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _),
1032 	PINGROUP(58, blsp4_uart, blsp4_spi, _, _, _, _, _, _, _),
1033 	PINGROUP(59, pcie0_clk, _, _, cri_trng0, _, _, _, _, _),
1034 	PINGROUP(60, pcie0_rst, _, _, cri_trng1, _, _, _, _, _),
1035 	PINGROUP(61, pcie0_wake, _, _, cri_trng, _, _, _, _, _),
1036 	PINGROUP(62, sd_card, _, _, _, _, _, _, _, _),
1037 	PINGROUP(63, sd_write, rx0, _, tsens_max, _, _, _, _, _),
1038 	PINGROUP(64, mdc, _, qdss_tracedata_a, _, _, _, _, _, _),
1039 	PINGROUP(65, mdio, _, qdss_tracedata_a, _, _, _, _, _, _),
1040 	PINGROUP(66, pta2_0, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _),
1041 	PINGROUP(67, pta2_1, qdss_tracedata_a, _, _, _, _, _, _, _),
1042 	PINGROUP(68, pta2_2, wci21, cxc1, qdss_tracedata_a, _, _, _, _, _),
1043 	PINGROUP(69, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _),
1044 	PINGROUP(70, blsp1_uart, blsp1_i2c, blsp1_spi, gcc_tlmm, qdss_tracedata_a, _, _, _, _),
1045 	PINGROUP(71, blsp1_uart, blsp1_spi, gcc_plltest, qdss_tracedata_a, _, _, _, _, _),
1046 	PINGROUP(72, blsp1_uart, blsp1_spi, qdss_tracedata_a, _, _, _, _, _, _),
1047 	PINGROUP(73, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _),
1048 	PINGROUP(74, blsp3_uart, blsp3_i2c, blsp3_spi, _, qdss_tracedata_a, _, _, _, _),
1049 	PINGROUP(75, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _),
1050 	PINGROUP(76, blsp3_uart, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _),
1051 	PINGROUP(77, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
1052 	PINGROUP(78, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
1053 	PINGROUP(79, blsp3_spi, _, qdss_tracedata_a, _, _, _, _, _, _),
1054 };
1055 
1056 static const struct msm_pinctrl_soc_data ipq6018_pinctrl = {
1057 	.pins = ipq6018_pins,
1058 	.npins = ARRAY_SIZE(ipq6018_pins),
1059 	.functions = ipq6018_functions,
1060 	.nfunctions = ARRAY_SIZE(ipq6018_functions),
1061 	.groups = ipq6018_groups,
1062 	.ngroups = ARRAY_SIZE(ipq6018_groups),
1063 	.ngpios = 80,
1064 };
1065 
1066 static int ipq6018_pinctrl_probe(struct platform_device *pdev)
1067 {
1068 	return msm_pinctrl_probe(pdev, &ipq6018_pinctrl);
1069 }
1070 
1071 static const struct of_device_id ipq6018_pinctrl_of_match[] = {
1072 	{ .compatible = "qcom,ipq6018-pinctrl", },
1073 	{ },
1074 };
1075 MODULE_DEVICE_TABLE(of, ipq6018_pinctrl_of_match);
1076 
1077 static struct platform_driver ipq6018_pinctrl_driver = {
1078 	.driver = {
1079 		.name = "ipq6018-pinctrl",
1080 		.of_match_table = ipq6018_pinctrl_of_match,
1081 	},
1082 	.probe = ipq6018_pinctrl_probe,
1083 };
1084 
1085 static int __init ipq6018_pinctrl_init(void)
1086 {
1087 	return platform_driver_register(&ipq6018_pinctrl_driver);
1088 }
1089 arch_initcall(ipq6018_pinctrl_init);
1090 
1091 static void __exit ipq6018_pinctrl_exit(void)
1092 {
1093 	platform_driver_unregister(&ipq6018_pinctrl_driver);
1094 }
1095 module_exit(ipq6018_pinctrl_exit);
1096 
1097 MODULE_DESCRIPTION("QTI ipq6018 pinctrl driver");
1098 MODULE_LICENSE("GPL v2");
1099