1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
6 #include <linux/module.h>
8 #include <linux/platform_device.h>
9 #include <linux/pinctrl/pinctrl.h>
11 #include "pinctrl-msm.h"
13 #define FUNCTION(fname) \
14 [msm_mux_##fname] = { \
16 .groups = fname##_groups, \
17 .ngroups = ARRAY_SIZE(fname##_groups), \
20 #define REG_SIZE 0x1000
21 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
24 .pins = gpio##id##_pins, \
25 .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \
27 msm_mux_gpio, /* gpio mode */ \
39 .ctl_reg = REG_SIZE * id, \
40 .io_reg = 0x4 + REG_SIZE * id, \
41 .intr_cfg_reg = 0x8 + REG_SIZE * id, \
42 .intr_status_reg = 0xc + REG_SIZE * id, \
43 .intr_target_reg = 0x8 + REG_SIZE * id, \
50 .intr_enable_bit = 0, \
51 .intr_status_bit = 0, \
52 .intr_target_bit = 5, \
53 .intr_raw_status_bit = 4, \
54 .intr_polarity_bit = 1, \
55 .intr_detection_bit = 2, \
56 .intr_detection_width = 2, \
59 static const struct pinctrl_pin_desc ipq8074_pins
[] = {
60 PINCTRL_PIN(0, "GPIO_0"),
61 PINCTRL_PIN(1, "GPIO_1"),
62 PINCTRL_PIN(2, "GPIO_2"),
63 PINCTRL_PIN(3, "GPIO_3"),
64 PINCTRL_PIN(4, "GPIO_4"),
65 PINCTRL_PIN(5, "GPIO_5"),
66 PINCTRL_PIN(6, "GPIO_6"),
67 PINCTRL_PIN(7, "GPIO_7"),
68 PINCTRL_PIN(8, "GPIO_8"),
69 PINCTRL_PIN(9, "GPIO_9"),
70 PINCTRL_PIN(10, "GPIO_10"),
71 PINCTRL_PIN(11, "GPIO_11"),
72 PINCTRL_PIN(12, "GPIO_12"),
73 PINCTRL_PIN(13, "GPIO_13"),
74 PINCTRL_PIN(14, "GPIO_14"),
75 PINCTRL_PIN(15, "GPIO_15"),
76 PINCTRL_PIN(16, "GPIO_16"),
77 PINCTRL_PIN(17, "GPIO_17"),
78 PINCTRL_PIN(18, "GPIO_18"),
79 PINCTRL_PIN(19, "GPIO_19"),
80 PINCTRL_PIN(20, "GPIO_20"),
81 PINCTRL_PIN(21, "GPIO_21"),
82 PINCTRL_PIN(22, "GPIO_22"),
83 PINCTRL_PIN(23, "GPIO_23"),
84 PINCTRL_PIN(24, "GPIO_24"),
85 PINCTRL_PIN(25, "GPIO_25"),
86 PINCTRL_PIN(26, "GPIO_26"),
87 PINCTRL_PIN(27, "GPIO_27"),
88 PINCTRL_PIN(28, "GPIO_28"),
89 PINCTRL_PIN(29, "GPIO_29"),
90 PINCTRL_PIN(30, "GPIO_30"),
91 PINCTRL_PIN(31, "GPIO_31"),
92 PINCTRL_PIN(32, "GPIO_32"),
93 PINCTRL_PIN(33, "GPIO_33"),
94 PINCTRL_PIN(34, "GPIO_34"),
95 PINCTRL_PIN(35, "GPIO_35"),
96 PINCTRL_PIN(36, "GPIO_36"),
97 PINCTRL_PIN(37, "GPIO_37"),
98 PINCTRL_PIN(38, "GPIO_38"),
99 PINCTRL_PIN(39, "GPIO_39"),
100 PINCTRL_PIN(40, "GPIO_40"),
101 PINCTRL_PIN(41, "GPIO_41"),
102 PINCTRL_PIN(42, "GPIO_42"),
103 PINCTRL_PIN(43, "GPIO_43"),
104 PINCTRL_PIN(44, "GPIO_44"),
105 PINCTRL_PIN(45, "GPIO_45"),
106 PINCTRL_PIN(46, "GPIO_46"),
107 PINCTRL_PIN(47, "GPIO_47"),
108 PINCTRL_PIN(48, "GPIO_48"),
109 PINCTRL_PIN(49, "GPIO_49"),
110 PINCTRL_PIN(50, "GPIO_50"),
111 PINCTRL_PIN(51, "GPIO_51"),
112 PINCTRL_PIN(52, "GPIO_52"),
113 PINCTRL_PIN(53, "GPIO_53"),
114 PINCTRL_PIN(54, "GPIO_54"),
115 PINCTRL_PIN(55, "GPIO_55"),
116 PINCTRL_PIN(56, "GPIO_56"),
117 PINCTRL_PIN(57, "GPIO_57"),
118 PINCTRL_PIN(58, "GPIO_58"),
119 PINCTRL_PIN(59, "GPIO_59"),
120 PINCTRL_PIN(60, "GPIO_60"),
121 PINCTRL_PIN(61, "GPIO_61"),
122 PINCTRL_PIN(62, "GPIO_62"),
123 PINCTRL_PIN(63, "GPIO_63"),
124 PINCTRL_PIN(64, "GPIO_64"),
125 PINCTRL_PIN(65, "GPIO_65"),
126 PINCTRL_PIN(66, "GPIO_66"),
127 PINCTRL_PIN(67, "GPIO_67"),
128 PINCTRL_PIN(68, "GPIO_68"),
129 PINCTRL_PIN(69, "GPIO_69"),
132 #define DECLARE_MSM_GPIO_PINS(pin) \
133 static const unsigned int gpio##pin##_pins[] = { pin }
134 DECLARE_MSM_GPIO_PINS(0);
135 DECLARE_MSM_GPIO_PINS(1);
136 DECLARE_MSM_GPIO_PINS(2);
137 DECLARE_MSM_GPIO_PINS(3);
138 DECLARE_MSM_GPIO_PINS(4);
139 DECLARE_MSM_GPIO_PINS(5);
140 DECLARE_MSM_GPIO_PINS(6);
141 DECLARE_MSM_GPIO_PINS(7);
142 DECLARE_MSM_GPIO_PINS(8);
143 DECLARE_MSM_GPIO_PINS(9);
144 DECLARE_MSM_GPIO_PINS(10);
145 DECLARE_MSM_GPIO_PINS(11);
146 DECLARE_MSM_GPIO_PINS(12);
147 DECLARE_MSM_GPIO_PINS(13);
148 DECLARE_MSM_GPIO_PINS(14);
149 DECLARE_MSM_GPIO_PINS(15);
150 DECLARE_MSM_GPIO_PINS(16);
151 DECLARE_MSM_GPIO_PINS(17);
152 DECLARE_MSM_GPIO_PINS(18);
153 DECLARE_MSM_GPIO_PINS(19);
154 DECLARE_MSM_GPIO_PINS(20);
155 DECLARE_MSM_GPIO_PINS(21);
156 DECLARE_MSM_GPIO_PINS(22);
157 DECLARE_MSM_GPIO_PINS(23);
158 DECLARE_MSM_GPIO_PINS(24);
159 DECLARE_MSM_GPIO_PINS(25);
160 DECLARE_MSM_GPIO_PINS(26);
161 DECLARE_MSM_GPIO_PINS(27);
162 DECLARE_MSM_GPIO_PINS(28);
163 DECLARE_MSM_GPIO_PINS(29);
164 DECLARE_MSM_GPIO_PINS(30);
165 DECLARE_MSM_GPIO_PINS(31);
166 DECLARE_MSM_GPIO_PINS(32);
167 DECLARE_MSM_GPIO_PINS(33);
168 DECLARE_MSM_GPIO_PINS(34);
169 DECLARE_MSM_GPIO_PINS(35);
170 DECLARE_MSM_GPIO_PINS(36);
171 DECLARE_MSM_GPIO_PINS(37);
172 DECLARE_MSM_GPIO_PINS(38);
173 DECLARE_MSM_GPIO_PINS(39);
174 DECLARE_MSM_GPIO_PINS(40);
175 DECLARE_MSM_GPIO_PINS(41);
176 DECLARE_MSM_GPIO_PINS(42);
177 DECLARE_MSM_GPIO_PINS(43);
178 DECLARE_MSM_GPIO_PINS(44);
179 DECLARE_MSM_GPIO_PINS(45);
180 DECLARE_MSM_GPIO_PINS(46);
181 DECLARE_MSM_GPIO_PINS(47);
182 DECLARE_MSM_GPIO_PINS(48);
183 DECLARE_MSM_GPIO_PINS(49);
184 DECLARE_MSM_GPIO_PINS(50);
185 DECLARE_MSM_GPIO_PINS(51);
186 DECLARE_MSM_GPIO_PINS(52);
187 DECLARE_MSM_GPIO_PINS(53);
188 DECLARE_MSM_GPIO_PINS(54);
189 DECLARE_MSM_GPIO_PINS(55);
190 DECLARE_MSM_GPIO_PINS(56);
191 DECLARE_MSM_GPIO_PINS(57);
192 DECLARE_MSM_GPIO_PINS(58);
193 DECLARE_MSM_GPIO_PINS(59);
194 DECLARE_MSM_GPIO_PINS(60);
195 DECLARE_MSM_GPIO_PINS(61);
196 DECLARE_MSM_GPIO_PINS(62);
197 DECLARE_MSM_GPIO_PINS(63);
198 DECLARE_MSM_GPIO_PINS(64);
199 DECLARE_MSM_GPIO_PINS(65);
200 DECLARE_MSM_GPIO_PINS(66);
201 DECLARE_MSM_GPIO_PINS(67);
202 DECLARE_MSM_GPIO_PINS(68);
203 DECLARE_MSM_GPIO_PINS(69);
205 enum ipq8074_functions
{
211 msm_mux_audio_rxbclk
,
213 msm_mux_audio_rxfsync
,
214 msm_mux_audio_rxmclk
,
215 msm_mux_audio_txbclk
,
217 msm_mux_audio_txfsync
,
218 msm_mux_audio_txmclk
,
293 msm_mux_qdss_cti_trig_in_a0
,
294 msm_mux_qdss_cti_trig_in_a1
,
295 msm_mux_qdss_cti_trig_in_b0
,
296 msm_mux_qdss_cti_trig_in_b1
,
297 msm_mux_qdss_cti_trig_out_a0
,
298 msm_mux_qdss_cti_trig_out_a1
,
299 msm_mux_qdss_cti_trig_out_b0
,
300 msm_mux_qdss_cti_trig_out_b1
,
301 msm_mux_qdss_traceclk_a
,
302 msm_mux_qdss_traceclk_b
,
303 msm_mux_qdss_tracectl_a
,
304 msm_mux_qdss_tracectl_b
,
305 msm_mux_qdss_tracedata_a
,
306 msm_mux_qdss_tracedata_b
,
321 static const char * const qpic_groups
[] = {
322 "gpio0", /* LCD_TE */
323 "gpio1", /* BUSY_N */
324 "gpio2", /* LCD_RS_N */
327 "gpio5", /* DATA[0] */
328 "gpio6", /* DATA[1] */
329 "gpio7", /* DATA[2] */
330 "gpio8", /* DATA[3] */
331 "gpio9", /* CS_CSR_LCD */
333 "gpio11", /* NAND_CS_N */
334 "gpio12", /* DATA[4] */
335 "gpio13", /* DATA[5] */
336 "gpio14", /* DATA[6] */
337 "gpio15", /* DATA[7] */
338 "gpio16", /* DATA[8] */
342 static const char * const blsp5_i2c_groups
[] = {
346 static const char * const blsp5_spi_groups
[] = {
347 "gpio0", "gpio2", "gpio9", "gpio16",
350 static const char * const wci2a_groups
[] = {
354 static const char * const blsp3_spi3_groups
[] = {
355 "gpio0", "gpio2", "gpio9",
358 static const char * const burn0_groups
[] = {
362 static const char * const pcm_zsi0_groups
[] = {
366 static const char * const blsp5_uart_groups
[] = {
367 "gpio0", "gpio2", "gpio9", "gpio16",
370 static const char * const mac1_sa2_groups
[] = {
374 static const char * const blsp3_spi0_groups
[] = {
375 "gpio1", "gpio3", "gpio4",
378 static const char * const burn1_groups
[] = {
382 static const char * const mac0_sa1_groups
[] = {
386 static const char * const qdss_cti_trig_out_b0_groups
[] = {
390 static const char * const qdss_cti_trig_in_b0_groups
[] = {
394 static const char * const blsp4_uart0_groups
[] = {
395 "gpio5", "gpio6", "gpio7", "gpio8",
398 static const char * const blsp4_i2c0_groups
[] = {
402 static const char * const blsp4_spi0_groups
[] = {
403 "gpio5", "gpio6", "gpio7", "gpio8",
406 static const char * const mac2_sa1_groups
[] = {
410 static const char * const qdss_cti_trig_out_b1_groups
[] = {
414 static const char * const qdss_cti_trig_in_b1_groups
[] = {
418 static const char * const cxc0_groups
[] = {
422 static const char * const mac1_sa3_groups
[] = {
426 static const char * const qdss_cti_trig_in_a1_groups
[] = {
430 static const char * const qdss_cti_trig_out_a1_groups
[] = {
434 static const char * const wci2c_groups
[] = {
438 static const char * const qdss_cti_trig_in_a0_groups
[] = {
442 static const char * const qdss_cti_trig_out_a0_groups
[] = {
446 static const char * const qdss_traceclk_b_groups
[] = {
450 static const char * const qdss_tracectl_b_groups
[] = {
454 static const char * const pcm_zsi1_groups
[] = {
458 static const char * const qdss_tracedata_b_groups
[] = {
459 "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
460 "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
464 static const char * const led0_groups
[] = {
468 static const char * const pwm0_groups
[] = {
469 "gpio18", "gpio21", "gpio25", "gpio29", "gpio63",
472 static const char * const led1_groups
[] = {
476 static const char * const pwm1_groups
[] = {
477 "gpio19", "gpio22", "gpio26", "gpio30", "gpio64",
480 static const char * const led2_groups
[] = {
484 static const char * const pwm2_groups
[] = {
485 "gpio20", "gpio23", "gpio27", "gpio31", "gpio66",
488 static const char * const blsp4_uart1_groups
[] = {
489 "gpio21", "gpio22", "gpio23", "gpio24",
492 static const char * const blsp4_i2c1_groups
[] = {
496 static const char * const blsp4_spi1_groups
[] = {
497 "gpio21", "gpio22", "gpio23", "gpio24",
500 static const char * const wci2d_groups
[] = {
504 static const char * const mac1_sa1_groups
[] = {
508 static const char * const blsp3_spi2_groups
[] = {
509 "gpio21", "gpio22", "gpio23",
512 static const char * const pwm3_groups
[] = {
513 "gpio24", "gpio28", "gpio32", "gpio67",
516 static const char * const audio_txmclk_groups
[] = {
520 static const char * const audio_txbclk_groups
[] = {
524 static const char * const audio_txfsync_groups
[] = {
528 static const char * const audio_txd_groups
[] = {
532 static const char * const audio_rxmclk_groups
[] = {
536 static const char * const atest_char0_groups
[] = {
540 static const char * const audio_rxbclk_groups
[] = {
544 static const char * const atest_char1_groups
[] = {
548 static const char * const audio_rxfsync_groups
[] = {
552 static const char * const atest_char2_groups
[] = {
556 static const char * const audio_rxd_groups
[] = {
560 static const char * const atest_char3_groups
[] = {
564 static const char * const pcm_drx_groups
[] = {
568 static const char * const mac1_sa0_groups
[] = {
572 static const char * const mac0_sa0_groups
[] = {
576 static const char * const pcm_dtx_groups
[] = {
580 static const char * const pcm_fsync_groups
[] = {
584 static const char * const mac2_sa0_groups
[] = {
588 static const char * const qdss_traceclk_a_groups
[] = {
592 static const char * const pcm_pclk_groups
[] = {
596 static const char * const qdss_tracectl_a_groups
[] = {
600 static const char * const atest_char_groups
[] = {
604 static const char * const qdss_tracedata_a_groups
[] = {
605 "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43",
606 "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", "gpio50",
610 static const char * const blsp0_uart_groups
[] = {
611 "gpio38", "gpio39", "gpio40", "gpio41",
614 static const char * const blsp0_i2c_groups
[] = {
618 static const char * const blsp0_spi_groups
[] = {
619 "gpio38", "gpio39", "gpio40", "gpio41",
622 static const char * const blsp1_uart_groups
[] = {
623 "gpio42", "gpio43", "gpio44", "gpio45",
626 static const char * const blsp1_i2c_groups
[] = {
630 static const char * const blsp1_spi_groups
[] = {
631 "gpio42", "gpio43", "gpio44", "gpio45",
634 static const char * const blsp2_uart_groups
[] = {
635 "gpio46", "gpio47", "gpio48", "gpio49",
638 static const char * const blsp2_i2c_groups
[] = {
642 static const char * const blsp2_spi_groups
[] = {
643 "gpio46", "gpio47", "gpio48", "gpio49",
646 static const char * const blsp3_uart_groups
[] = {
647 "gpio50", "gpio51", "gpio52", "gpio53",
650 static const char * const blsp3_i2c_groups
[] = {
654 static const char * const blsp3_spi_groups
[] = {
655 "gpio50", "gpio51", "gpio52", "gpio53",
658 static const char * const pta2_0_groups
[] = {
662 static const char * const wci2b_groups
[] = {
666 static const char * const cxc1_groups
[] = {
670 static const char * const blsp3_spi1_groups
[] = {
671 "gpio54", "gpio55", "gpio56",
674 static const char * const pta2_1_groups
[] = {
678 static const char * const pta2_2_groups
[] = {
682 static const char * const pcie0_clk_groups
[] = {
686 static const char * const dbg_out_groups
[] = {
690 static const char * const cri_trng0_groups
[] = {
694 static const char * const pcie0_rst_groups
[] = {
698 static const char * const cri_trng1_groups
[] = {
702 static const char * const pcie0_wake_groups
[] = {
706 static const char * const cri_trng_groups
[] = {
710 static const char * const pcie1_clk_groups
[] = {
714 static const char * const rx2_groups
[] = {
718 static const char * const ldo_update_groups
[] = {
722 static const char * const pcie1_rst_groups
[] = {
726 static const char * const ldo_en_groups
[] = {
730 static const char * const pcie1_wake_groups
[] = {
734 static const char * const gcc_plltest_groups
[] = {
738 static const char * const sd_card_groups
[] = {
742 static const char * const pta1_1_groups
[] = {
746 static const char * const rx1_groups
[] = {
750 static const char * const pta1_2_groups
[] = {
754 static const char * const gcc_tlmm_groups
[] = {
758 static const char * const pta1_0_groups
[] = {
762 static const char * const prng_rosc_groups
[] = {
766 static const char * const sd_write_groups
[] = {
770 static const char * const rx0_groups
[] = {
774 static const char * const tsens_max_groups
[] = {
778 static const char * const mdc_groups
[] = {
782 static const char * const mdio_groups
[] = {
786 static const char * const gpio_groups
[] = {
787 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
788 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
789 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
790 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
791 "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
792 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
793 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
794 "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
795 "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
796 "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69",
799 static const struct msm_function ipq8074_functions
[] = {
800 FUNCTION(atest_char
),
801 FUNCTION(atest_char0
),
802 FUNCTION(atest_char1
),
803 FUNCTION(atest_char2
),
804 FUNCTION(atest_char3
),
805 FUNCTION(audio_rxbclk
),
807 FUNCTION(audio_rxfsync
),
808 FUNCTION(audio_rxmclk
),
809 FUNCTION(audio_txbclk
),
811 FUNCTION(audio_txfsync
),
812 FUNCTION(audio_txmclk
),
815 FUNCTION(blsp0_uart
),
818 FUNCTION(blsp1_uart
),
821 FUNCTION(blsp2_uart
),
824 FUNCTION(blsp3_spi0
),
825 FUNCTION(blsp3_spi1
),
826 FUNCTION(blsp3_spi2
),
827 FUNCTION(blsp3_spi3
),
828 FUNCTION(blsp3_uart
),
829 FUNCTION(blsp4_i2c0
),
830 FUNCTION(blsp4_i2c1
),
831 FUNCTION(blsp4_spi0
),
832 FUNCTION(blsp4_spi1
),
833 FUNCTION(blsp4_uart0
),
834 FUNCTION(blsp4_uart1
),
837 FUNCTION(blsp5_uart
),
846 FUNCTION(gcc_plltest
),
850 FUNCTION(ldo_update
),
866 FUNCTION(pcie0_wake
),
869 FUNCTION(pcie1_wake
),
887 FUNCTION(qdss_cti_trig_in_a0
),
888 FUNCTION(qdss_cti_trig_in_a1
),
889 FUNCTION(qdss_cti_trig_in_b0
),
890 FUNCTION(qdss_cti_trig_in_b1
),
891 FUNCTION(qdss_cti_trig_out_a0
),
892 FUNCTION(qdss_cti_trig_out_a1
),
893 FUNCTION(qdss_cti_trig_out_b0
),
894 FUNCTION(qdss_cti_trig_out_b1
),
895 FUNCTION(qdss_traceclk_a
),
896 FUNCTION(qdss_traceclk_b
),
897 FUNCTION(qdss_tracectl_a
),
898 FUNCTION(qdss_tracectl_b
),
899 FUNCTION(qdss_tracedata_a
),
900 FUNCTION(qdss_tracedata_b
),
914 static const struct msm_pingroup ipq8074_groups
[] = {
915 PINGROUP(0, qpic
, blsp5_uart
, blsp5_i2c
, blsp5_spi
, wci2a
,
916 blsp3_spi3
, NA
, burn0
, NA
),
917 PINGROUP(1, qpic
, pcm_zsi0
, mac1_sa2
, blsp3_spi0
, NA
, burn1
, NA
, NA
,
919 PINGROUP(2, qpic
, blsp5_uart
, blsp5_i2c
, blsp5_spi
, wci2a
,
920 blsp3_spi3
, NA
, NA
, NA
),
921 PINGROUP(3, qpic
, mac0_sa1
, blsp3_spi0
, qdss_cti_trig_out_b0
, NA
, NA
,
923 PINGROUP(4, qpic
, mac0_sa1
, blsp3_spi0
, qdss_cti_trig_in_b0
, NA
, NA
,
925 PINGROUP(5, qpic
, blsp4_uart0
, blsp4_i2c0
, blsp4_spi0
, mac2_sa1
,
926 qdss_cti_trig_out_b1
, NA
, NA
, NA
),
927 PINGROUP(6, qpic
, blsp4_uart0
, blsp4_i2c0
, blsp4_spi0
, mac2_sa1
,
928 qdss_cti_trig_in_b1
, NA
, NA
, NA
),
929 PINGROUP(7, qpic
, blsp4_uart0
, blsp4_spi0
, NA
, NA
, NA
, NA
, NA
, NA
),
930 PINGROUP(8, qpic
, blsp4_uart0
, blsp4_spi0
, NA
, NA
, NA
, NA
, NA
, NA
),
931 PINGROUP(9, qpic
, blsp5_uart
, blsp5_spi
, cxc0
, mac1_sa3
, blsp3_spi3
,
932 qdss_cti_trig_in_a1
, NA
, NA
),
933 PINGROUP(10, qpic
, qdss_cti_trig_out_a1
, NA
, NA
, NA
, NA
, NA
, NA
,
935 PINGROUP(11, qpic
, wci2c
, mac1_sa2
, qdss_cti_trig_in_a0
, NA
, NA
, NA
,
937 PINGROUP(12, qpic
, qdss_cti_trig_out_a0
, NA
, NA
, NA
, NA
, NA
, NA
,
939 PINGROUP(13, qpic
, NA
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
940 PINGROUP(14, qpic
, qdss_traceclk_b
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
941 PINGROUP(15, qpic
, qdss_tracectl_b
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
942 PINGROUP(16, qpic
, blsp5_uart
, pcm_zsi1
, blsp5_spi
, cxc0
, mac1_sa3
,
943 qdss_tracedata_b
, NA
, NA
),
944 PINGROUP(17, qpic
, wci2c
, qdss_tracedata_b
, NA
, NA
, NA
, NA
, NA
, NA
),
945 PINGROUP(18, led0
, pwm0
, qdss_tracedata_b
, NA
, NA
, NA
, NA
, NA
, NA
),
946 PINGROUP(19, led1
, pwm1
, NA
, qdss_tracedata_b
, NA
, NA
, NA
, NA
, NA
),
947 PINGROUP(20, led2
, pwm2
, NA
, qdss_tracedata_b
, NA
, NA
, NA
, NA
, NA
),
948 PINGROUP(21, pwm0
, blsp4_uart1
, blsp4_i2c1
, blsp4_spi1
, wci2d
, mac1_sa1
,
949 blsp3_spi2
, NA
, qdss_tracedata_b
),
950 PINGROUP(22, pwm1
, blsp4_uart1
, blsp4_i2c1
, blsp4_spi1
, wci2d
, mac1_sa1
,
951 blsp3_spi2
, NA
, qdss_tracedata_b
),
952 PINGROUP(23, pwm2
, blsp4_uart1
, blsp4_spi1
, blsp3_spi2
, NA
,
953 qdss_tracedata_b
, NA
, NA
, NA
),
954 PINGROUP(24, pwm3
, blsp4_uart1
, blsp4_spi1
, NA
, qdss_tracedata_b
, NA
,
956 PINGROUP(25, audio_txmclk
, pwm0
, NA
, qdss_tracedata_b
, NA
, NA
, NA
, NA
,
958 PINGROUP(26, audio_txbclk
, pwm1
, NA
, qdss_tracedata_b
, NA
, NA
, NA
, NA
,
960 PINGROUP(27, audio_txfsync
, pwm2
, NA
, qdss_tracedata_b
, NA
, NA
, NA
,
962 PINGROUP(28, audio_txd
, pwm3
, NA
, qdss_tracedata_b
, NA
, NA
, NA
, NA
,
964 PINGROUP(29, audio_rxmclk
, pwm0
, atest_char0
, NA
, qdss_tracedata_b
,
966 PINGROUP(30, audio_rxbclk
, pwm1
, atest_char1
, NA
, qdss_tracedata_b
,
968 PINGROUP(31, audio_rxfsync
, pwm2
, atest_char2
, NA
, qdss_tracedata_b
,
970 PINGROUP(32, audio_rxd
, pwm3
, atest_char3
, NA
, NA
, NA
, NA
, NA
, NA
),
971 PINGROUP(33, pcm_drx
, mac1_sa0
, mac0_sa0
, NA
, NA
, NA
, NA
, NA
, NA
),
972 PINGROUP(34, pcm_dtx
, mac1_sa0
, mac0_sa0
, NA
, NA
, NA
, NA
, NA
, NA
),
973 PINGROUP(35, pcm_fsync
, mac2_sa0
, qdss_traceclk_a
, NA
, NA
, NA
, NA
, NA
, NA
),
974 PINGROUP(36, pcm_pclk
, mac2_sa0
, NA
, qdss_tracectl_a
, NA
, NA
, NA
, NA
, NA
),
975 PINGROUP(37, atest_char
, NA
, qdss_tracedata_a
, NA
, NA
, NA
, NA
, NA
, NA
),
976 PINGROUP(38, blsp0_uart
, blsp0_i2c
, blsp0_spi
, NA
, qdss_tracedata_a
,
978 PINGROUP(39, blsp0_uart
, blsp0_i2c
, blsp0_spi
, NA
, qdss_tracedata_a
,
980 PINGROUP(40, blsp0_uart
, blsp0_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
982 PINGROUP(41, blsp0_uart
, blsp0_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
984 PINGROUP(42, blsp1_uart
, blsp1_i2c
, blsp1_spi
, NA
, qdss_tracedata_a
,
986 PINGROUP(43, blsp1_uart
, blsp1_i2c
, blsp1_spi
, NA
, qdss_tracedata_a
,
988 PINGROUP(44, blsp1_uart
, blsp1_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
990 PINGROUP(45, blsp1_uart
, blsp1_spi
, qdss_tracedata_a
, NA
, NA
, NA
, NA
,
992 PINGROUP(46, blsp2_uart
, blsp2_i2c
, blsp2_spi
, qdss_tracedata_a
, NA
,
994 PINGROUP(47, blsp2_uart
, blsp2_i2c
, blsp2_spi
, NA
, qdss_tracedata_a
,
996 PINGROUP(48, blsp2_uart
, blsp2_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
998 PINGROUP(49, blsp2_uart
, blsp2_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
1000 PINGROUP(50, blsp3_uart
, blsp3_i2c
, blsp3_spi
, NA
, qdss_tracedata_a
,
1002 PINGROUP(51, blsp3_uart
, blsp3_i2c
, blsp3_spi
, NA
, qdss_tracedata_a
,
1004 PINGROUP(52, blsp3_uart
, blsp3_spi
, NA
, qdss_tracedata_a
, NA
, NA
, NA
,
1006 PINGROUP(53, blsp3_uart
, blsp3_spi
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1007 PINGROUP(54, pta2_0
, wci2b
, cxc1
, blsp3_spi1
, NA
, NA
, NA
, NA
, NA
),
1008 PINGROUP(55, pta2_1
, blsp3_spi1
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1009 PINGROUP(56, pta2_2
, wci2b
, cxc1
, blsp3_spi1
, NA
, NA
, NA
, NA
, NA
),
1010 PINGROUP(57, pcie0_clk
, NA
, dbg_out
, cri_trng0
, NA
, NA
, NA
, NA
, NA
),
1011 PINGROUP(58, pcie0_rst
, NA
, cri_trng1
, NA
, NA
, NA
, NA
, NA
, NA
),
1012 PINGROUP(59, pcie0_wake
, NA
, cri_trng
, NA
, NA
, NA
, NA
, NA
, NA
),
1013 PINGROUP(60, pcie1_clk
, rx2
, ldo_update
, NA
, NA
, NA
, NA
, NA
, NA
),
1014 PINGROUP(61, pcie1_rst
, ldo_en
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1015 PINGROUP(62, pcie1_wake
, gcc_plltest
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1016 PINGROUP(63, sd_card
, pwm0
, NA
, gcc_plltest
, NA
, NA
, NA
, NA
, NA
),
1017 PINGROUP(64, pta1_1
, pwm1
, NA
, rx1
, NA
, NA
, NA
, NA
, NA
),
1018 PINGROUP(65, pta1_2
, NA
, gcc_tlmm
, NA
, NA
, NA
, NA
, NA
, NA
),
1019 PINGROUP(66, pta1_0
, pwm2
, prng_rosc
, NA
, NA
, NA
, NA
, NA
, NA
),
1020 PINGROUP(67, sd_write
, pwm3
, rx0
, tsens_max
, NA
, NA
, NA
, NA
, NA
),
1021 PINGROUP(68, mdc
, NA
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1022 PINGROUP(69, mdio
, NA
, NA
, NA
, NA
, NA
, NA
, NA
, NA
),
1025 static const struct msm_pinctrl_soc_data ipq8074_pinctrl
= {
1026 .pins
= ipq8074_pins
,
1027 .npins
= ARRAY_SIZE(ipq8074_pins
),
1028 .functions
= ipq8074_functions
,
1029 .nfunctions
= ARRAY_SIZE(ipq8074_functions
),
1030 .groups
= ipq8074_groups
,
1031 .ngroups
= ARRAY_SIZE(ipq8074_groups
),
1035 static int ipq8074_pinctrl_probe(struct platform_device
*pdev
)
1037 return msm_pinctrl_probe(pdev
, &ipq8074_pinctrl
);
1040 static const struct of_device_id ipq8074_pinctrl_of_match
[] = {
1041 { .compatible
= "qcom,ipq8074-pinctrl", },
1045 static struct platform_driver ipq8074_pinctrl_driver
= {
1047 .name
= "ipq8074-pinctrl",
1048 .of_match_table
= ipq8074_pinctrl_of_match
,
1050 .probe
= ipq8074_pinctrl_probe
,
1051 .remove
= msm_pinctrl_remove
,
1054 static int __init
ipq8074_pinctrl_init(void)
1056 return platform_driver_register(&ipq8074_pinctrl_driver
);
1058 arch_initcall(ipq8074_pinctrl_init
);
1060 static void __exit
ipq8074_pinctrl_exit(void)
1062 platform_driver_unregister(&ipq8074_pinctrl_driver
);
1064 module_exit(ipq8074_pinctrl_exit
);
1066 MODULE_DESCRIPTION("Qualcomm ipq8074 pinctrl driver");
1067 MODULE_LICENSE("GPL v2");
1068 MODULE_DEVICE_TABLE(of
, ipq8074_pinctrl_of_match
);