197fb5e8dSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-only
2e260d2bbSVaradarajan Narayanan /*
3e260d2bbSVaradarajan Narayanan * Copyright (c) 2015, The Linux Foundation. All rights reserved.
4e260d2bbSVaradarajan Narayanan */
5e260d2bbSVaradarajan Narayanan
6e260d2bbSVaradarajan Narayanan #include <linux/module.h>
7e260d2bbSVaradarajan Narayanan #include <linux/of.h>
8e260d2bbSVaradarajan Narayanan #include <linux/platform_device.h>
9e260d2bbSVaradarajan Narayanan
10e260d2bbSVaradarajan Narayanan #include "pinctrl-msm.h"
11e260d2bbSVaradarajan Narayanan
12e260d2bbSVaradarajan Narayanan static const struct pinctrl_pin_desc ipq4019_pins[] = {
13e260d2bbSVaradarajan Narayanan PINCTRL_PIN(0, "GPIO_0"),
14e260d2bbSVaradarajan Narayanan PINCTRL_PIN(1, "GPIO_1"),
15e260d2bbSVaradarajan Narayanan PINCTRL_PIN(2, "GPIO_2"),
16e260d2bbSVaradarajan Narayanan PINCTRL_PIN(3, "GPIO_3"),
17e260d2bbSVaradarajan Narayanan PINCTRL_PIN(4, "GPIO_4"),
18e260d2bbSVaradarajan Narayanan PINCTRL_PIN(5, "GPIO_5"),
19e260d2bbSVaradarajan Narayanan PINCTRL_PIN(6, "GPIO_6"),
20e260d2bbSVaradarajan Narayanan PINCTRL_PIN(7, "GPIO_7"),
21e260d2bbSVaradarajan Narayanan PINCTRL_PIN(8, "GPIO_8"),
22e260d2bbSVaradarajan Narayanan PINCTRL_PIN(9, "GPIO_9"),
23e260d2bbSVaradarajan Narayanan PINCTRL_PIN(10, "GPIO_10"),
24e260d2bbSVaradarajan Narayanan PINCTRL_PIN(11, "GPIO_11"),
25e260d2bbSVaradarajan Narayanan PINCTRL_PIN(12, "GPIO_12"),
26e260d2bbSVaradarajan Narayanan PINCTRL_PIN(13, "GPIO_13"),
27e260d2bbSVaradarajan Narayanan PINCTRL_PIN(14, "GPIO_14"),
28e260d2bbSVaradarajan Narayanan PINCTRL_PIN(15, "GPIO_15"),
29e260d2bbSVaradarajan Narayanan PINCTRL_PIN(16, "GPIO_16"),
30e260d2bbSVaradarajan Narayanan PINCTRL_PIN(17, "GPIO_17"),
31e260d2bbSVaradarajan Narayanan PINCTRL_PIN(18, "GPIO_18"),
32e260d2bbSVaradarajan Narayanan PINCTRL_PIN(19, "GPIO_19"),
33e260d2bbSVaradarajan Narayanan PINCTRL_PIN(20, "GPIO_20"),
34e260d2bbSVaradarajan Narayanan PINCTRL_PIN(21, "GPIO_21"),
35e260d2bbSVaradarajan Narayanan PINCTRL_PIN(22, "GPIO_22"),
36e260d2bbSVaradarajan Narayanan PINCTRL_PIN(23, "GPIO_23"),
37e260d2bbSVaradarajan Narayanan PINCTRL_PIN(24, "GPIO_24"),
38e260d2bbSVaradarajan Narayanan PINCTRL_PIN(25, "GPIO_25"),
39e260d2bbSVaradarajan Narayanan PINCTRL_PIN(26, "GPIO_26"),
40e260d2bbSVaradarajan Narayanan PINCTRL_PIN(27, "GPIO_27"),
41e260d2bbSVaradarajan Narayanan PINCTRL_PIN(28, "GPIO_28"),
42e260d2bbSVaradarajan Narayanan PINCTRL_PIN(29, "GPIO_29"),
43e260d2bbSVaradarajan Narayanan PINCTRL_PIN(30, "GPIO_30"),
44e260d2bbSVaradarajan Narayanan PINCTRL_PIN(31, "GPIO_31"),
45e260d2bbSVaradarajan Narayanan PINCTRL_PIN(32, "GPIO_32"),
46e260d2bbSVaradarajan Narayanan PINCTRL_PIN(33, "GPIO_33"),
47e260d2bbSVaradarajan Narayanan PINCTRL_PIN(34, "GPIO_34"),
48e260d2bbSVaradarajan Narayanan PINCTRL_PIN(35, "GPIO_35"),
49e260d2bbSVaradarajan Narayanan PINCTRL_PIN(36, "GPIO_36"),
50e260d2bbSVaradarajan Narayanan PINCTRL_PIN(37, "GPIO_37"),
51e260d2bbSVaradarajan Narayanan PINCTRL_PIN(38, "GPIO_38"),
52e260d2bbSVaradarajan Narayanan PINCTRL_PIN(39, "GPIO_39"),
53e260d2bbSVaradarajan Narayanan PINCTRL_PIN(40, "GPIO_40"),
54e260d2bbSVaradarajan Narayanan PINCTRL_PIN(41, "GPIO_41"),
55e260d2bbSVaradarajan Narayanan PINCTRL_PIN(42, "GPIO_42"),
56e260d2bbSVaradarajan Narayanan PINCTRL_PIN(43, "GPIO_43"),
57e260d2bbSVaradarajan Narayanan PINCTRL_PIN(44, "GPIO_44"),
58e260d2bbSVaradarajan Narayanan PINCTRL_PIN(45, "GPIO_45"),
59e260d2bbSVaradarajan Narayanan PINCTRL_PIN(46, "GPIO_46"),
60e260d2bbSVaradarajan Narayanan PINCTRL_PIN(47, "GPIO_47"),
61e260d2bbSVaradarajan Narayanan PINCTRL_PIN(48, "GPIO_48"),
62e260d2bbSVaradarajan Narayanan PINCTRL_PIN(49, "GPIO_49"),
63e260d2bbSVaradarajan Narayanan PINCTRL_PIN(50, "GPIO_50"),
64e260d2bbSVaradarajan Narayanan PINCTRL_PIN(51, "GPIO_51"),
65e260d2bbSVaradarajan Narayanan PINCTRL_PIN(52, "GPIO_52"),
66e260d2bbSVaradarajan Narayanan PINCTRL_PIN(53, "GPIO_53"),
67e260d2bbSVaradarajan Narayanan PINCTRL_PIN(54, "GPIO_54"),
68e260d2bbSVaradarajan Narayanan PINCTRL_PIN(55, "GPIO_55"),
69e260d2bbSVaradarajan Narayanan PINCTRL_PIN(56, "GPIO_56"),
70e260d2bbSVaradarajan Narayanan PINCTRL_PIN(57, "GPIO_57"),
71e260d2bbSVaradarajan Narayanan PINCTRL_PIN(58, "GPIO_58"),
72e260d2bbSVaradarajan Narayanan PINCTRL_PIN(59, "GPIO_59"),
73e260d2bbSVaradarajan Narayanan PINCTRL_PIN(60, "GPIO_60"),
74e260d2bbSVaradarajan Narayanan PINCTRL_PIN(61, "GPIO_61"),
75e260d2bbSVaradarajan Narayanan PINCTRL_PIN(62, "GPIO_62"),
76e260d2bbSVaradarajan Narayanan PINCTRL_PIN(63, "GPIO_63"),
77e260d2bbSVaradarajan Narayanan PINCTRL_PIN(64, "GPIO_64"),
78e260d2bbSVaradarajan Narayanan PINCTRL_PIN(65, "GPIO_65"),
79e260d2bbSVaradarajan Narayanan PINCTRL_PIN(66, "GPIO_66"),
80e260d2bbSVaradarajan Narayanan PINCTRL_PIN(67, "GPIO_67"),
81e260d2bbSVaradarajan Narayanan PINCTRL_PIN(68, "GPIO_68"),
82e260d2bbSVaradarajan Narayanan PINCTRL_PIN(69, "GPIO_69"),
83e260d2bbSVaradarajan Narayanan PINCTRL_PIN(70, "GPIO_70"),
84e260d2bbSVaradarajan Narayanan PINCTRL_PIN(71, "GPIO_71"),
85e260d2bbSVaradarajan Narayanan PINCTRL_PIN(72, "GPIO_72"),
86e260d2bbSVaradarajan Narayanan PINCTRL_PIN(73, "GPIO_73"),
87e260d2bbSVaradarajan Narayanan PINCTRL_PIN(74, "GPIO_74"),
88e260d2bbSVaradarajan Narayanan PINCTRL_PIN(75, "GPIO_75"),
89e260d2bbSVaradarajan Narayanan PINCTRL_PIN(76, "GPIO_76"),
90e260d2bbSVaradarajan Narayanan PINCTRL_PIN(77, "GPIO_77"),
91e260d2bbSVaradarajan Narayanan PINCTRL_PIN(78, "GPIO_78"),
92e260d2bbSVaradarajan Narayanan PINCTRL_PIN(79, "GPIO_79"),
93e260d2bbSVaradarajan Narayanan PINCTRL_PIN(80, "GPIO_80"),
94e260d2bbSVaradarajan Narayanan PINCTRL_PIN(81, "GPIO_81"),
95e260d2bbSVaradarajan Narayanan PINCTRL_PIN(82, "GPIO_82"),
96e260d2bbSVaradarajan Narayanan PINCTRL_PIN(83, "GPIO_83"),
97e260d2bbSVaradarajan Narayanan PINCTRL_PIN(84, "GPIO_84"),
98e260d2bbSVaradarajan Narayanan PINCTRL_PIN(85, "GPIO_85"),
99e260d2bbSVaradarajan Narayanan PINCTRL_PIN(86, "GPIO_86"),
100e260d2bbSVaradarajan Narayanan PINCTRL_PIN(87, "GPIO_87"),
101e260d2bbSVaradarajan Narayanan PINCTRL_PIN(88, "GPIO_88"),
102e260d2bbSVaradarajan Narayanan PINCTRL_PIN(89, "GPIO_89"),
103e260d2bbSVaradarajan Narayanan PINCTRL_PIN(90, "GPIO_90"),
104e260d2bbSVaradarajan Narayanan PINCTRL_PIN(91, "GPIO_91"),
105e260d2bbSVaradarajan Narayanan PINCTRL_PIN(92, "GPIO_92"),
106e260d2bbSVaradarajan Narayanan PINCTRL_PIN(93, "GPIO_93"),
107e260d2bbSVaradarajan Narayanan PINCTRL_PIN(94, "GPIO_94"),
108e260d2bbSVaradarajan Narayanan PINCTRL_PIN(95, "GPIO_95"),
109e260d2bbSVaradarajan Narayanan PINCTRL_PIN(96, "GPIO_96"),
110e260d2bbSVaradarajan Narayanan PINCTRL_PIN(97, "GPIO_97"),
111e260d2bbSVaradarajan Narayanan PINCTRL_PIN(98, "GPIO_98"),
112e260d2bbSVaradarajan Narayanan PINCTRL_PIN(99, "GPIO_99"),
113e260d2bbSVaradarajan Narayanan };
114e260d2bbSVaradarajan Narayanan
115e260d2bbSVaradarajan Narayanan #define DECLARE_QCA_GPIO_PINS(pin) \
116e260d2bbSVaradarajan Narayanan static const unsigned int gpio##pin##_pins[] = { pin }
117e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(0);
118e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(1);
119e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(2);
120e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(3);
121e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(4);
122e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(5);
123e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(6);
124e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(7);
125e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(8);
126e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(9);
127e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(10);
128e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(11);
129e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(12);
130e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(13);
131e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(14);
132e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(15);
133e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(16);
134e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(17);
135e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(18);
136e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(19);
137e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(20);
138e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(21);
139e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(22);
140e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(23);
141e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(24);
142e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(25);
143e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(26);
144e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(27);
145e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(28);
146e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(29);
147e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(30);
148e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(31);
149e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(32);
150e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(33);
151e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(34);
152e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(35);
153e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(36);
154e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(37);
155e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(38);
156e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(39);
157e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(40);
158e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(41);
159e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(42);
160e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(43);
161e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(44);
162e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(45);
163e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(46);
164e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(47);
165e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(48);
166e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(49);
167e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(50);
168e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(51);
169e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(52);
170e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(53);
171e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(54);
172e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(55);
173e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(56);
174e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(57);
175e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(58);
176e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(59);
177e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(60);
178e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(61);
179e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(62);
180e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(63);
181e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(64);
182e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(65);
183e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(66);
184e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(67);
185e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(68);
186e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(69);
187e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(70);
188e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(71);
189e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(72);
190e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(73);
191e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(74);
192e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(75);
193e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(76);
194e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(77);
195e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(78);
196e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(79);
197e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(80);
198e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(81);
199e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(82);
200e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(83);
201e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(84);
202e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(85);
203e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(86);
204e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(87);
205e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(88);
206e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(89);
207e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(90);
208e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(91);
209e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(92);
210e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(93);
211e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(94);
212e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(95);
213e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(96);
214e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(97);
215e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(98);
216e260d2bbSVaradarajan Narayanan DECLARE_QCA_GPIO_PINS(99);
217e260d2bbSVaradarajan Narayanan
218e260d2bbSVaradarajan Narayanan #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14) \
219e260d2bbSVaradarajan Narayanan { \
220*6a16d1a5SRohit Agarwal .grp = PINCTRL_PINGROUP("gpio" #id, \
221*6a16d1a5SRohit Agarwal gpio##id##_pins, \
222*6a16d1a5SRohit Agarwal ARRAY_SIZE(gpio##id##_pins)), \
223e260d2bbSVaradarajan Narayanan .funcs = (int[]){ \
224cdbac734SMatthew McClintock qca_mux_gpio, /* gpio mode */ \
225e260d2bbSVaradarajan Narayanan qca_mux_##f1, \
226e260d2bbSVaradarajan Narayanan qca_mux_##f2, \
227e260d2bbSVaradarajan Narayanan qca_mux_##f3, \
228e260d2bbSVaradarajan Narayanan qca_mux_##f4, \
229e260d2bbSVaradarajan Narayanan qca_mux_##f5, \
230e260d2bbSVaradarajan Narayanan qca_mux_##f6, \
231e260d2bbSVaradarajan Narayanan qca_mux_##f7, \
232e260d2bbSVaradarajan Narayanan qca_mux_##f8, \
233e260d2bbSVaradarajan Narayanan qca_mux_##f9, \
234e260d2bbSVaradarajan Narayanan qca_mux_##f10, \
235e260d2bbSVaradarajan Narayanan qca_mux_##f11, \
236e260d2bbSVaradarajan Narayanan qca_mux_##f12, \
237e260d2bbSVaradarajan Narayanan qca_mux_##f13, \
238e260d2bbSVaradarajan Narayanan qca_mux_##f14 \
239e260d2bbSVaradarajan Narayanan }, \
240e260d2bbSVaradarajan Narayanan .nfuncs = 15, \
241a9b0b1feSMatthew McClintock .ctl_reg = 0x0 + 0x1000 * id, \
242a9b0b1feSMatthew McClintock .io_reg = 0x4 + 0x1000 * id, \
243a9b0b1feSMatthew McClintock .intr_cfg_reg = 0x8 + 0x1000 * id, \
244a9b0b1feSMatthew McClintock .intr_status_reg = 0xc + 0x1000 * id, \
245a9b0b1feSMatthew McClintock .intr_target_reg = 0x8 + 0x1000 * id, \
246e260d2bbSVaradarajan Narayanan .mux_bit = 2, \
247e260d2bbSVaradarajan Narayanan .pull_bit = 0, \
248e260d2bbSVaradarajan Narayanan .drv_bit = 6, \
24913355ca3SJaiganesh Narayanan .od_bit = 12, \
250e260d2bbSVaradarajan Narayanan .oe_bit = 9, \
251e260d2bbSVaradarajan Narayanan .in_bit = 0, \
252e260d2bbSVaradarajan Narayanan .out_bit = 1, \
253e260d2bbSVaradarajan Narayanan .intr_enable_bit = 0, \
254e260d2bbSVaradarajan Narayanan .intr_status_bit = 0, \
255e260d2bbSVaradarajan Narayanan .intr_target_bit = 5, \
256e260d2bbSVaradarajan Narayanan .intr_raw_status_bit = 4, \
257e260d2bbSVaradarajan Narayanan .intr_polarity_bit = 1, \
258e260d2bbSVaradarajan Narayanan .intr_detection_bit = 2, \
259e260d2bbSVaradarajan Narayanan .intr_detection_width = 2, \
260e260d2bbSVaradarajan Narayanan }
261e260d2bbSVaradarajan Narayanan
262e260d2bbSVaradarajan Narayanan
263e260d2bbSVaradarajan Narayanan enum ipq4019_functions {
264e260d2bbSVaradarajan Narayanan qca_mux_gpio,
26577a65959SRam Chandra Jangir qca_mux_aud_pin,
26677a65959SRam Chandra Jangir qca_mux_audio_pwm,
267e260d2bbSVaradarajan Narayanan qca_mux_blsp_i2c0,
268e260d2bbSVaradarajan Narayanan qca_mux_blsp_i2c1,
269e260d2bbSVaradarajan Narayanan qca_mux_blsp_spi0,
27077a65959SRam Chandra Jangir qca_mux_blsp_spi1,
27177a65959SRam Chandra Jangir qca_mux_blsp_uart0,
27277a65959SRam Chandra Jangir qca_mux_blsp_uart1,
27377a65959SRam Chandra Jangir qca_mux_chip_rst,
27477a65959SRam Chandra Jangir qca_mux_i2s_rx,
27577a65959SRam Chandra Jangir qca_mux_i2s_spdif_in,
27677a65959SRam Chandra Jangir qca_mux_i2s_spdif_out,
27777a65959SRam Chandra Jangir qca_mux_i2s_td,
27877a65959SRam Chandra Jangir qca_mux_i2s_tx,
27977a65959SRam Chandra Jangir qca_mux_jtag,
28077a65959SRam Chandra Jangir qca_mux_led0,
28177a65959SRam Chandra Jangir qca_mux_led1,
28277a65959SRam Chandra Jangir qca_mux_led2,
28377a65959SRam Chandra Jangir qca_mux_led3,
28477a65959SRam Chandra Jangir qca_mux_led4,
28577a65959SRam Chandra Jangir qca_mux_led5,
28677a65959SRam Chandra Jangir qca_mux_led6,
28777a65959SRam Chandra Jangir qca_mux_led7,
28877a65959SRam Chandra Jangir qca_mux_led8,
28977a65959SRam Chandra Jangir qca_mux_led9,
29077a65959SRam Chandra Jangir qca_mux_led10,
29177a65959SRam Chandra Jangir qca_mux_led11,
29277a65959SRam Chandra Jangir qca_mux_mdc,
29377a65959SRam Chandra Jangir qca_mux_mdio,
29477a65959SRam Chandra Jangir qca_mux_pcie,
29577a65959SRam Chandra Jangir qca_mux_pmu,
29677a65959SRam Chandra Jangir qca_mux_prng_rosc,
29777a65959SRam Chandra Jangir qca_mux_qpic,
29877a65959SRam Chandra Jangir qca_mux_rgmii,
29977a65959SRam Chandra Jangir qca_mux_rmii,
30077a65959SRam Chandra Jangir qca_mux_sdio,
30177a65959SRam Chandra Jangir qca_mux_smart0,
30277a65959SRam Chandra Jangir qca_mux_smart1,
30377a65959SRam Chandra Jangir qca_mux_smart2,
30477a65959SRam Chandra Jangir qca_mux_smart3,
30577a65959SRam Chandra Jangir qca_mux_tm,
30677a65959SRam Chandra Jangir qca_mux_wifi0,
30777a65959SRam Chandra Jangir qca_mux_wifi1,
308e260d2bbSVaradarajan Narayanan qca_mux_NA,
309e260d2bbSVaradarajan Narayanan };
310e260d2bbSVaradarajan Narayanan
311e260d2bbSVaradarajan Narayanan static const char * const gpio_groups[] = {
312e260d2bbSVaradarajan Narayanan "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
313e260d2bbSVaradarajan Narayanan "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
314e260d2bbSVaradarajan Narayanan "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
315e260d2bbSVaradarajan Narayanan "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
316e260d2bbSVaradarajan Narayanan "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
317e260d2bbSVaradarajan Narayanan "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
318e260d2bbSVaradarajan Narayanan "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
319e260d2bbSVaradarajan Narayanan "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
320e260d2bbSVaradarajan Narayanan "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
321e260d2bbSVaradarajan Narayanan "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
322e260d2bbSVaradarajan Narayanan "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
323e260d2bbSVaradarajan Narayanan "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
324e260d2bbSVaradarajan Narayanan "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
325e260d2bbSVaradarajan Narayanan "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
326e260d2bbSVaradarajan Narayanan "gpio99",
327e260d2bbSVaradarajan Narayanan };
32877a65959SRam Chandra Jangir static const char * const aud_pin_groups[] = {
32977a65959SRam Chandra Jangir "gpio48", "gpio49", "gpio50", "gpio51",
33077a65959SRam Chandra Jangir };
33177a65959SRam Chandra Jangir static const char * const audio_pwm_groups[] = {
33277a65959SRam Chandra Jangir "gpio30", "gpio31", "gpio32", "gpio33", "gpio64", "gpio65", "gpio66",
33377a65959SRam Chandra Jangir "gpio67",
334e260d2bbSVaradarajan Narayanan };
335e260d2bbSVaradarajan Narayanan static const char * const blsp_i2c0_groups[] = {
336e260d2bbSVaradarajan Narayanan "gpio10", "gpio11", "gpio20", "gpio21", "gpio58", "gpio59",
337e260d2bbSVaradarajan Narayanan };
338e260d2bbSVaradarajan Narayanan static const char * const blsp_i2c1_groups[] = {
339e260d2bbSVaradarajan Narayanan "gpio12", "gpio13", "gpio34", "gpio35",
340e260d2bbSVaradarajan Narayanan };
34177a65959SRam Chandra Jangir static const char * const blsp_spi0_groups[] = {
34277a65959SRam Chandra Jangir "gpio12", "gpio13", "gpio14", "gpio15", "gpio45", "gpio54", "gpio55",
34377a65959SRam Chandra Jangir "gpio56", "gpio57",
344e260d2bbSVaradarajan Narayanan };
345e260d2bbSVaradarajan Narayanan static const char * const blsp_spi1_groups[] = {
346e260d2bbSVaradarajan Narayanan "gpio44", "gpio45", "gpio46", "gpio47",
347e260d2bbSVaradarajan Narayanan };
34877a65959SRam Chandra Jangir static const char * const blsp_uart0_groups[] = {
34977a65959SRam Chandra Jangir "gpio16", "gpio17", "gpio60", "gpio61",
35077a65959SRam Chandra Jangir };
35177a65959SRam Chandra Jangir static const char * const blsp_uart1_groups[] = {
35277a65959SRam Chandra Jangir "gpio8", "gpio9", "gpio10", "gpio11",
35377a65959SRam Chandra Jangir };
35477a65959SRam Chandra Jangir static const char * const chip_rst_groups[] = {
35577a65959SRam Chandra Jangir "gpio62",
35677a65959SRam Chandra Jangir };
35777a65959SRam Chandra Jangir static const char * const i2s_rx_groups[] = {
35877a65959SRam Chandra Jangir "gpio0", "gpio1", "gpio2", "gpio20", "gpio21", "gpio22", "gpio23",
35977a65959SRam Chandra Jangir "gpio58", "gpio60", "gpio61", "gpio63",
36077a65959SRam Chandra Jangir };
36177a65959SRam Chandra Jangir static const char * const i2s_spdif_in_groups[] = {
36277a65959SRam Chandra Jangir "gpio34", "gpio59", "gpio63",
36377a65959SRam Chandra Jangir };
36477a65959SRam Chandra Jangir static const char * const i2s_spdif_out_groups[] = {
36577a65959SRam Chandra Jangir "gpio35", "gpio62", "gpio63",
36677a65959SRam Chandra Jangir };
36777a65959SRam Chandra Jangir static const char * const i2s_td_groups[] = {
36877a65959SRam Chandra Jangir "gpio27", "gpio28", "gpio29", "gpio54", "gpio55", "gpio56", "gpio63",
36977a65959SRam Chandra Jangir };
37077a65959SRam Chandra Jangir static const char * const i2s_tx_groups[] = {
37177a65959SRam Chandra Jangir "gpio24", "gpio25", "gpio26", "gpio52", "gpio53", "gpio57", "gpio60",
37277a65959SRam Chandra Jangir "gpio61",
37377a65959SRam Chandra Jangir };
37477a65959SRam Chandra Jangir static const char * const jtag_groups[] = {
37577a65959SRam Chandra Jangir "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5",
37677a65959SRam Chandra Jangir };
37777a65959SRam Chandra Jangir static const char * const led0_groups[] = {
37877a65959SRam Chandra Jangir "gpio16", "gpio36", "gpio60",
37977a65959SRam Chandra Jangir };
38077a65959SRam Chandra Jangir static const char * const led1_groups[] = {
38177a65959SRam Chandra Jangir "gpio17", "gpio37", "gpio61",
38277a65959SRam Chandra Jangir };
38377a65959SRam Chandra Jangir static const char * const led2_groups[] = {
38477a65959SRam Chandra Jangir "gpio36", "gpio38", "gpio58",
38577a65959SRam Chandra Jangir };
38677a65959SRam Chandra Jangir static const char * const led3_groups[] = {
38777a65959SRam Chandra Jangir "gpio39",
38877a65959SRam Chandra Jangir };
38977a65959SRam Chandra Jangir static const char * const led4_groups[] = {
39077a65959SRam Chandra Jangir "gpio40",
39177a65959SRam Chandra Jangir };
39277a65959SRam Chandra Jangir static const char * const led5_groups[] = {
39377a65959SRam Chandra Jangir "gpio44",
39477a65959SRam Chandra Jangir };
39577a65959SRam Chandra Jangir static const char * const led6_groups[] = {
39677a65959SRam Chandra Jangir "gpio45",
39777a65959SRam Chandra Jangir };
39877a65959SRam Chandra Jangir static const char * const led7_groups[] = {
39977a65959SRam Chandra Jangir "gpio46",
40077a65959SRam Chandra Jangir };
40177a65959SRam Chandra Jangir static const char * const led8_groups[] = {
40277a65959SRam Chandra Jangir "gpio47",
40377a65959SRam Chandra Jangir };
40477a65959SRam Chandra Jangir static const char * const led9_groups[] = {
40577a65959SRam Chandra Jangir "gpio48",
40677a65959SRam Chandra Jangir };
40777a65959SRam Chandra Jangir static const char * const led10_groups[] = {
40877a65959SRam Chandra Jangir "gpio49",
40977a65959SRam Chandra Jangir };
41077a65959SRam Chandra Jangir static const char * const led11_groups[] = {
41177a65959SRam Chandra Jangir "gpio50",
41277a65959SRam Chandra Jangir };
41377a65959SRam Chandra Jangir static const char * const mdc_groups[] = {
41477a65959SRam Chandra Jangir "gpio7", "gpio52",
41577a65959SRam Chandra Jangir };
41677a65959SRam Chandra Jangir static const char * const mdio_groups[] = {
41777a65959SRam Chandra Jangir "gpio6", "gpio53",
41877a65959SRam Chandra Jangir };
41977a65959SRam Chandra Jangir static const char * const pcie_groups[] = {
42077a65959SRam Chandra Jangir "gpio39", "gpio52",
42177a65959SRam Chandra Jangir };
42277a65959SRam Chandra Jangir static const char * const pmu_groups[] = {
42377a65959SRam Chandra Jangir "gpio54", "gpio55",
42477a65959SRam Chandra Jangir };
42577a65959SRam Chandra Jangir static const char * const prng_rosc_groups[] = {
42677a65959SRam Chandra Jangir "gpio53",
42777a65959SRam Chandra Jangir };
42877a65959SRam Chandra Jangir static const char * const qpic_groups[] = {
42977a65959SRam Chandra Jangir "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58",
43077a65959SRam Chandra Jangir "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65",
43177a65959SRam Chandra Jangir "gpio66", "gpio67", "gpio68", "gpio69",
43277a65959SRam Chandra Jangir };
43377a65959SRam Chandra Jangir static const char * const rgmii_groups[] = {
43477a65959SRam Chandra Jangir "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
43577a65959SRam Chandra Jangir "gpio29", "gpio30", "gpio31", "gpio32", "gpio33",
43677a65959SRam Chandra Jangir };
43777a65959SRam Chandra Jangir static const char * const rmii_groups[] = {
43877a65959SRam Chandra Jangir "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
43977a65959SRam Chandra Jangir "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
44077a65959SRam Chandra Jangir "gpio50", "gpio51",
44177a65959SRam Chandra Jangir };
44277a65959SRam Chandra Jangir static const char * const sdio_groups[] = {
44377a65959SRam Chandra Jangir "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
44477a65959SRam Chandra Jangir "gpio30", "gpio31", "gpio32",
44577a65959SRam Chandra Jangir };
44677a65959SRam Chandra Jangir static const char * const smart0_groups[] = {
44777a65959SRam Chandra Jangir "gpio0", "gpio1", "gpio2", "gpio5", "gpio44", "gpio45", "gpio46",
44877a65959SRam Chandra Jangir "gpio47",
44977a65959SRam Chandra Jangir };
45077a65959SRam Chandra Jangir static const char * const smart1_groups[] = {
45177a65959SRam Chandra Jangir "gpio8", "gpio9", "gpio16", "gpio17", "gpio58", "gpio59", "gpio60",
45277a65959SRam Chandra Jangir "gpio61",
45377a65959SRam Chandra Jangir };
45477a65959SRam Chandra Jangir static const char * const smart2_groups[] = {
45577a65959SRam Chandra Jangir "gpio40", "gpio41", "gpio48", "gpio49",
45677a65959SRam Chandra Jangir };
45777a65959SRam Chandra Jangir static const char * const smart3_groups[] = {
45877a65959SRam Chandra Jangir "gpio58", "gpio59", "gpio60", "gpio61",
45977a65959SRam Chandra Jangir };
46077a65959SRam Chandra Jangir static const char * const tm_groups[] = {
46177a65959SRam Chandra Jangir "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58",
46277a65959SRam Chandra Jangir "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
46377a65959SRam Chandra Jangir };
46477a65959SRam Chandra Jangir static const char * const wifi0_groups[] = {
46577a65959SRam Chandra Jangir "gpio37", "gpio40", "gpio41", "gpio42", "gpio50", "gpio51", "gpio52",
46677a65959SRam Chandra Jangir "gpio53", "gpio56", "gpio57", "gpio58", "gpio98",
46777a65959SRam Chandra Jangir };
46877a65959SRam Chandra Jangir static const char * const wifi1_groups[] = {
46977a65959SRam Chandra Jangir "gpio37", "gpio40", "gpio41", "gpio43", "gpio50", "gpio51", "gpio52",
47077a65959SRam Chandra Jangir "gpio53", "gpio56", "gpio57", "gpio58", "gpio98",
47177a65959SRam Chandra Jangir };
472e260d2bbSVaradarajan Narayanan
473c7a291dbSRohit Agarwal static const struct pinfunction ipq4019_functions[] = {
474c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(aud_pin),
475c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(audio_pwm),
476c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_i2c0),
477c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_i2c1),
478c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_spi0),
479c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_spi1),
480c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_uart0),
481c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(blsp_uart1),
482c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(chip_rst),
483c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(gpio),
484c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(i2s_rx),
485c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(i2s_spdif_in),
486c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(i2s_spdif_out),
487c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(i2s_td),
488c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(i2s_tx),
489c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(jtag),
490c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led0),
491c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led1),
492c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led2),
493c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led3),
494c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led4),
495c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led5),
496c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led6),
497c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led7),
498c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led8),
499c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led9),
500c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led10),
501c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(led11),
502c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(mdc),
503c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(mdio),
504c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(pcie),
505c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(pmu),
506c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(prng_rosc),
507c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(qpic),
508c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(rgmii),
509c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(rmii),
510c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(sdio),
511c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(smart0),
512c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(smart1),
513c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(smart2),
514c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(smart3),
515c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(tm),
516c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(wifi0),
517c7a291dbSRohit Agarwal QCA_PIN_FUNCTION(wifi1),
518e260d2bbSVaradarajan Narayanan };
519e260d2bbSVaradarajan Narayanan
520e260d2bbSVaradarajan Narayanan static const struct msm_pingroup ipq4019_groups[] = {
52177a65959SRam Chandra Jangir PINGROUP(0, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52277a65959SRam Chandra Jangir NA, NA),
52377a65959SRam Chandra Jangir PINGROUP(1, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52477a65959SRam Chandra Jangir NA, NA),
52577a65959SRam Chandra Jangir PINGROUP(2, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52677a65959SRam Chandra Jangir NA, NA),
52777a65959SRam Chandra Jangir PINGROUP(3, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
52877a65959SRam Chandra Jangir PINGROUP(4, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
52977a65959SRam Chandra Jangir PINGROUP(5, jtag, smart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
53077a65959SRam Chandra Jangir NA),
53177a65959SRam Chandra Jangir PINGROUP(6, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
53277a65959SRam Chandra Jangir PINGROUP(7, mdc, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
53377a65959SRam Chandra Jangir PINGROUP(8, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA,
53477a65959SRam Chandra Jangir NA, NA, NA),
53577a65959SRam Chandra Jangir PINGROUP(9, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA,
53677a65959SRam Chandra Jangir NA, NA, NA),
53777a65959SRam Chandra Jangir PINGROUP(10, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA,
53877a65959SRam Chandra Jangir NA, NA, NA),
53977a65959SRam Chandra Jangir PINGROUP(11, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA,
54077a65959SRam Chandra Jangir NA, NA, NA),
54177a65959SRam Chandra Jangir PINGROUP(12, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54277a65959SRam Chandra Jangir NA, NA, NA),
54377a65959SRam Chandra Jangir PINGROUP(13, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54477a65959SRam Chandra Jangir NA, NA, NA),
54577a65959SRam Chandra Jangir PINGROUP(14, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54677a65959SRam Chandra Jangir NA),
54777a65959SRam Chandra Jangir PINGROUP(15, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54877a65959SRam Chandra Jangir NA),
54977a65959SRam Chandra Jangir PINGROUP(16, blsp_uart0, led0, smart1, NA, NA, NA, NA, NA, NA, NA, NA,
55077a65959SRam Chandra Jangir NA, NA, NA),
55177a65959SRam Chandra Jangir PINGROUP(17, blsp_uart0, led1, smart1, NA, NA, NA, NA, NA, NA, NA, NA,
55277a65959SRam Chandra Jangir NA, NA, NA),
553e260d2bbSVaradarajan Narayanan PINGROUP(18, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
554e260d2bbSVaradarajan Narayanan PINGROUP(19, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
55577a65959SRam Chandra Jangir PINGROUP(20, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
55677a65959SRam Chandra Jangir NA, NA),
55777a65959SRam Chandra Jangir PINGROUP(21, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
55877a65959SRam Chandra Jangir NA, NA),
55977a65959SRam Chandra Jangir PINGROUP(22, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56077a65959SRam Chandra Jangir NA),
56177a65959SRam Chandra Jangir PINGROUP(23, sdio, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56277a65959SRam Chandra Jangir NA, NA),
56377a65959SRam Chandra Jangir PINGROUP(24, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56477a65959SRam Chandra Jangir NA, NA),
56577a65959SRam Chandra Jangir PINGROUP(25, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56677a65959SRam Chandra Jangir NA, NA),
56777a65959SRam Chandra Jangir PINGROUP(26, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56877a65959SRam Chandra Jangir NA, NA),
56977a65959SRam Chandra Jangir PINGROUP(27, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57077a65959SRam Chandra Jangir NA, NA),
57177a65959SRam Chandra Jangir PINGROUP(28, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57277a65959SRam Chandra Jangir NA, NA),
57377a65959SRam Chandra Jangir PINGROUP(29, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57477a65959SRam Chandra Jangir NA, NA),
57577a65959SRam Chandra Jangir PINGROUP(30, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
57677a65959SRam Chandra Jangir NA, NA, NA),
57777a65959SRam Chandra Jangir PINGROUP(31, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
57877a65959SRam Chandra Jangir NA, NA, NA),
57977a65959SRam Chandra Jangir PINGROUP(32, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
58077a65959SRam Chandra Jangir NA, NA, NA),
58177a65959SRam Chandra Jangir PINGROUP(33, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
58277a65959SRam Chandra Jangir NA, NA),
58377a65959SRam Chandra Jangir PINGROUP(34, blsp_i2c1, i2s_spdif_in, NA, NA, NA, NA, NA, NA, NA, NA,
58477a65959SRam Chandra Jangir NA, NA, NA, NA),
58577a65959SRam Chandra Jangir PINGROUP(35, blsp_i2c1, i2s_spdif_out, NA, NA, NA, NA, NA, NA, NA, NA,
58677a65959SRam Chandra Jangir NA, NA, NA, NA),
58777a65959SRam Chandra Jangir PINGROUP(36, rmii, led2, led0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
58877a65959SRam Chandra Jangir NA),
58977a65959SRam Chandra Jangir PINGROUP(37, rmii, wifi0, wifi1, led1, NA, NA, NA, NA, NA, NA, NA, NA,
59077a65959SRam Chandra Jangir NA, NA),
59177a65959SRam Chandra Jangir PINGROUP(38, rmii, led2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
59277a65959SRam Chandra Jangir NA),
59377a65959SRam Chandra Jangir PINGROUP(39, rmii, pcie, led3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
59477a65959SRam Chandra Jangir NA),
59577a65959SRam Chandra Jangir PINGROUP(40, rmii, wifi0, wifi1, smart2, led4, NA, NA, NA, NA, NA, NA,
59677a65959SRam Chandra Jangir NA, NA, NA),
59777a65959SRam Chandra Jangir PINGROUP(41, rmii, wifi0, wifi1, smart2, NA, NA, NA, NA, NA, NA, NA,
59877a65959SRam Chandra Jangir NA, NA, NA),
59977a65959SRam Chandra Jangir PINGROUP(42, rmii, wifi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
60077a65959SRam Chandra Jangir NA),
60177a65959SRam Chandra Jangir PINGROUP(43, rmii, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
60277a65959SRam Chandra Jangir NA),
60377a65959SRam Chandra Jangir PINGROUP(44, rmii, blsp_spi1, smart0, led5, NA, NA, NA, NA, NA, NA, NA,
60477a65959SRam Chandra Jangir NA, NA, NA),
60577a65959SRam Chandra Jangir PINGROUP(45, rmii, blsp_spi1, blsp_spi0, smart0, led6, NA, NA, NA, NA,
60677a65959SRam Chandra Jangir NA, NA, NA, NA, NA),
60777a65959SRam Chandra Jangir PINGROUP(46, rmii, blsp_spi1, smart0, led7, NA, NA, NA, NA, NA, NA, NA,
60877a65959SRam Chandra Jangir NA, NA, NA),
60977a65959SRam Chandra Jangir PINGROUP(47, rmii, blsp_spi1, smart0, led8, NA, NA, NA, NA, NA, NA, NA,
61077a65959SRam Chandra Jangir NA, NA, NA),
61177a65959SRam Chandra Jangir PINGROUP(48, rmii, aud_pin, smart2, led9, NA, NA, NA, NA, NA, NA, NA,
61277a65959SRam Chandra Jangir NA, NA, NA),
61377a65959SRam Chandra Jangir PINGROUP(49, rmii, aud_pin, smart2, led10, NA, NA, NA, NA, NA, NA, NA,
61477a65959SRam Chandra Jangir NA, NA, NA),
61577a65959SRam Chandra Jangir PINGROUP(50, rmii, aud_pin, wifi0, wifi1, led11, NA, NA, NA, NA, NA,
61677a65959SRam Chandra Jangir NA, NA, NA, NA),
61777a65959SRam Chandra Jangir PINGROUP(51, rmii, aud_pin, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA,
61877a65959SRam Chandra Jangir NA, NA, NA),
61977a65959SRam Chandra Jangir PINGROUP(52, qpic, mdc, pcie, i2s_tx, NA, NA, NA, tm, wifi0, wifi1, NA,
62077a65959SRam Chandra Jangir NA, NA, NA),
62177a65959SRam Chandra Jangir PINGROUP(53, qpic, mdio, i2s_tx, prng_rosc, NA, tm, wifi0, wifi1, NA,
62277a65959SRam Chandra Jangir NA, NA, NA, NA, NA),
62377a65959SRam Chandra Jangir PINGROUP(54, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA,
62477a65959SRam Chandra Jangir NA, NA, NA),
62577a65959SRam Chandra Jangir PINGROUP(55, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA,
62677a65959SRam Chandra Jangir NA, NA, NA),
62777a65959SRam Chandra Jangir PINGROUP(56, qpic, blsp_spi0, i2s_td, NA, NA, tm, wifi0, wifi1, NA, NA,
62877a65959SRam Chandra Jangir NA, NA, NA, NA),
62977a65959SRam Chandra Jangir PINGROUP(57, qpic, blsp_spi0, i2s_tx, NA, NA, tm, wifi0, wifi1, NA, NA,
63077a65959SRam Chandra Jangir NA, NA, NA, NA),
63177a65959SRam Chandra Jangir PINGROUP(58, qpic, led2, blsp_i2c0, smart3, smart1, i2s_rx, NA, NA, tm,
63277a65959SRam Chandra Jangir wifi0, wifi1, NA, NA, NA),
63377a65959SRam Chandra Jangir PINGROUP(59, qpic, blsp_i2c0, smart3, smart1, i2s_spdif_in, NA, NA, NA,
63477a65959SRam Chandra Jangir NA, NA, tm, NA, NA, NA),
63577a65959SRam Chandra Jangir PINGROUP(60, qpic, blsp_uart0, smart1, smart3, led0, i2s_tx, i2s_rx,
63677a65959SRam Chandra Jangir NA, NA, NA, NA, NA, tm, NA),
63777a65959SRam Chandra Jangir PINGROUP(61, qpic, blsp_uart0, smart1, smart3, led1, i2s_tx, i2s_rx,
63877a65959SRam Chandra Jangir NA, NA, NA, NA, NA, tm, NA),
63977a65959SRam Chandra Jangir PINGROUP(62, qpic, chip_rst, NA, NA, i2s_spdif_out, NA, NA, NA, NA, NA,
64077a65959SRam Chandra Jangir tm, NA, NA, NA),
64177a65959SRam Chandra Jangir PINGROUP(63, qpic, NA, NA, NA, i2s_td, i2s_rx, i2s_spdif_out,
64277a65959SRam Chandra Jangir i2s_spdif_in, NA, NA, NA, NA, tm, NA),
64377a65959SRam Chandra Jangir PINGROUP(64, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64477a65959SRam Chandra Jangir NA, NA),
64577a65959SRam Chandra Jangir PINGROUP(65, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64677a65959SRam Chandra Jangir NA, NA),
64777a65959SRam Chandra Jangir PINGROUP(66, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64877a65959SRam Chandra Jangir NA, NA),
64977a65959SRam Chandra Jangir PINGROUP(67, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
65077a65959SRam Chandra Jangir NA, NA),
65177a65959SRam Chandra Jangir PINGROUP(68, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65277a65959SRam Chandra Jangir PINGROUP(69, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
653d7402de4SChristian Lamparter PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
654d7402de4SChristian Lamparter PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
655d7402de4SChristian Lamparter PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
656d7402de4SChristian Lamparter PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
657d7402de4SChristian Lamparter PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
658d7402de4SChristian Lamparter PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
659d7402de4SChristian Lamparter PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
660d7402de4SChristian Lamparter PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
661d7402de4SChristian Lamparter PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
662d7402de4SChristian Lamparter PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
663d7402de4SChristian Lamparter PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
664d7402de4SChristian Lamparter PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
665d7402de4SChristian Lamparter PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
666d7402de4SChristian Lamparter PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
667d7402de4SChristian Lamparter PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
668d7402de4SChristian Lamparter PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
669d7402de4SChristian Lamparter PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
670d7402de4SChristian Lamparter PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
671d7402de4SChristian Lamparter PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
672d7402de4SChristian Lamparter PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
673d7402de4SChristian Lamparter PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
674d7402de4SChristian Lamparter PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
675d7402de4SChristian Lamparter PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
676d7402de4SChristian Lamparter PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
677d7402de4SChristian Lamparter PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
678d7402de4SChristian Lamparter PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
679d7402de4SChristian Lamparter PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
680d7402de4SChristian Lamparter PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
68177a65959SRam Chandra Jangir PINGROUP(98, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
68277a65959SRam Chandra Jangir NA),
683d7402de4SChristian Lamparter PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
684e260d2bbSVaradarajan Narayanan };
685e260d2bbSVaradarajan Narayanan
686e260d2bbSVaradarajan Narayanan static const struct msm_pinctrl_soc_data ipq4019_pinctrl = {
687e260d2bbSVaradarajan Narayanan .pins = ipq4019_pins,
688e260d2bbSVaradarajan Narayanan .npins = ARRAY_SIZE(ipq4019_pins),
689e260d2bbSVaradarajan Narayanan .functions = ipq4019_functions,
690e260d2bbSVaradarajan Narayanan .nfunctions = ARRAY_SIZE(ipq4019_functions),
691e260d2bbSVaradarajan Narayanan .groups = ipq4019_groups,
692e260d2bbSVaradarajan Narayanan .ngroups = ARRAY_SIZE(ipq4019_groups),
6935303f782SMatthew McClintock .ngpios = 100,
69483cf5faeSRam Chandra Jangir .pull_no_keeper = true,
695e260d2bbSVaradarajan Narayanan };
696e260d2bbSVaradarajan Narayanan
ipq4019_pinctrl_probe(struct platform_device * pdev)697e260d2bbSVaradarajan Narayanan static int ipq4019_pinctrl_probe(struct platform_device *pdev)
698e260d2bbSVaradarajan Narayanan {
699e260d2bbSVaradarajan Narayanan return msm_pinctrl_probe(pdev, &ipq4019_pinctrl);
700e260d2bbSVaradarajan Narayanan }
701e260d2bbSVaradarajan Narayanan
702e260d2bbSVaradarajan Narayanan static const struct of_device_id ipq4019_pinctrl_of_match[] = {
703e260d2bbSVaradarajan Narayanan { .compatible = "qcom,ipq4019-pinctrl", },
704e260d2bbSVaradarajan Narayanan { },
705e260d2bbSVaradarajan Narayanan };
706e260d2bbSVaradarajan Narayanan
707e260d2bbSVaradarajan Narayanan static struct platform_driver ipq4019_pinctrl_driver = {
708e260d2bbSVaradarajan Narayanan .driver = {
709e260d2bbSVaradarajan Narayanan .name = "ipq4019-pinctrl",
710e260d2bbSVaradarajan Narayanan .of_match_table = ipq4019_pinctrl_of_match,
711e260d2bbSVaradarajan Narayanan },
712e260d2bbSVaradarajan Narayanan .probe = ipq4019_pinctrl_probe,
713e260d2bbSVaradarajan Narayanan .remove = msm_pinctrl_remove,
714e260d2bbSVaradarajan Narayanan };
715e260d2bbSVaradarajan Narayanan
ipq4019_pinctrl_init(void)716e260d2bbSVaradarajan Narayanan static int __init ipq4019_pinctrl_init(void)
717e260d2bbSVaradarajan Narayanan {
718e260d2bbSVaradarajan Narayanan return platform_driver_register(&ipq4019_pinctrl_driver);
719e260d2bbSVaradarajan Narayanan }
720e260d2bbSVaradarajan Narayanan arch_initcall(ipq4019_pinctrl_init);
721e260d2bbSVaradarajan Narayanan
ipq4019_pinctrl_exit(void)722e260d2bbSVaradarajan Narayanan static void __exit ipq4019_pinctrl_exit(void)
723e260d2bbSVaradarajan Narayanan {
724e260d2bbSVaradarajan Narayanan platform_driver_unregister(&ipq4019_pinctrl_driver);
725e260d2bbSVaradarajan Narayanan }
726e260d2bbSVaradarajan Narayanan module_exit(ipq4019_pinctrl_exit);
727e260d2bbSVaradarajan Narayanan
728e260d2bbSVaradarajan Narayanan MODULE_DESCRIPTION("Qualcomm ipq4019 pinctrl driver");
729e260d2bbSVaradarajan Narayanan MODULE_LICENSE("GPL v2");
730e260d2bbSVaradarajan Narayanan MODULE_DEVICE_TABLE(of, ipq4019_pinctrl_of_match);
731