xref: /OK3568_Linux_fs/kernel/drivers/pinctrl/qcom/pinctrl-sdm845.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #include <linux/acpi.h>
7*4882a593Smuzhiyun #include <linux/module.h>
8*4882a593Smuzhiyun #include <linux/of.h>
9*4882a593Smuzhiyun #include <linux/platform_device.h>
10*4882a593Smuzhiyun #include <linux/pinctrl/pinctrl.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include "pinctrl-msm.h"
13*4882a593Smuzhiyun 
14*4882a593Smuzhiyun #define FUNCTION(fname)					\
15*4882a593Smuzhiyun 	[msm_mux_##fname] = {				\
16*4882a593Smuzhiyun 		.name = #fname,				\
17*4882a593Smuzhiyun 		.groups = fname##_groups,		\
18*4882a593Smuzhiyun 		.ngroups = ARRAY_SIZE(fname##_groups),	\
19*4882a593Smuzhiyun 	}
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #define NORTH	0x00500000
22*4882a593Smuzhiyun #define SOUTH	0x00900000
23*4882a593Smuzhiyun #define EAST	0x00100000
24*4882a593Smuzhiyun #define REG_SIZE 0x1000
25*4882a593Smuzhiyun #define PINGROUP(id, base, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10)	\
26*4882a593Smuzhiyun 	{						\
27*4882a593Smuzhiyun 		.name = "gpio" #id,			\
28*4882a593Smuzhiyun 		.pins = gpio##id##_pins,		\
29*4882a593Smuzhiyun 		.npins = ARRAY_SIZE(gpio##id##_pins),	\
30*4882a593Smuzhiyun 		.funcs = (int[]){			\
31*4882a593Smuzhiyun 			msm_mux_gpio, /* gpio mode */	\
32*4882a593Smuzhiyun 			msm_mux_##f1,			\
33*4882a593Smuzhiyun 			msm_mux_##f2,			\
34*4882a593Smuzhiyun 			msm_mux_##f3,			\
35*4882a593Smuzhiyun 			msm_mux_##f4,			\
36*4882a593Smuzhiyun 			msm_mux_##f5,			\
37*4882a593Smuzhiyun 			msm_mux_##f6,			\
38*4882a593Smuzhiyun 			msm_mux_##f7,			\
39*4882a593Smuzhiyun 			msm_mux_##f8,			\
40*4882a593Smuzhiyun 			msm_mux_##f9,			\
41*4882a593Smuzhiyun 			msm_mux_##f10			\
42*4882a593Smuzhiyun 		},					\
43*4882a593Smuzhiyun 		.nfuncs = 11,				\
44*4882a593Smuzhiyun 		.ctl_reg = base + REG_SIZE * id,		\
45*4882a593Smuzhiyun 		.io_reg = base + 0x4 + REG_SIZE * id,		\
46*4882a593Smuzhiyun 		.intr_cfg_reg = base + 0x8 + REG_SIZE * id,	\
47*4882a593Smuzhiyun 		.intr_status_reg = base + 0xc + REG_SIZE * id,	\
48*4882a593Smuzhiyun 		.intr_target_reg = base + 0x8 + REG_SIZE * id,	\
49*4882a593Smuzhiyun 		.mux_bit = 2,			\
50*4882a593Smuzhiyun 		.pull_bit = 0,			\
51*4882a593Smuzhiyun 		.drv_bit = 6,			\
52*4882a593Smuzhiyun 		.oe_bit = 9,			\
53*4882a593Smuzhiyun 		.in_bit = 0,			\
54*4882a593Smuzhiyun 		.out_bit = 1,			\
55*4882a593Smuzhiyun 		.intr_enable_bit = 0,		\
56*4882a593Smuzhiyun 		.intr_status_bit = 0,		\
57*4882a593Smuzhiyun 		.intr_target_bit = 5,		\
58*4882a593Smuzhiyun 		.intr_target_kpss_val = 3,	\
59*4882a593Smuzhiyun 		.intr_raw_status_bit = 4,	\
60*4882a593Smuzhiyun 		.intr_polarity_bit = 1,		\
61*4882a593Smuzhiyun 		.intr_detection_bit = 2,	\
62*4882a593Smuzhiyun 		.intr_detection_width = 2,	\
63*4882a593Smuzhiyun 	}
64*4882a593Smuzhiyun 
65*4882a593Smuzhiyun #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)	\
66*4882a593Smuzhiyun 	{						\
67*4882a593Smuzhiyun 		.name = #pg_name,			\
68*4882a593Smuzhiyun 		.pins = pg_name##_pins,			\
69*4882a593Smuzhiyun 		.npins = ARRAY_SIZE(pg_name##_pins),	\
70*4882a593Smuzhiyun 		.ctl_reg = ctl,				\
71*4882a593Smuzhiyun 		.io_reg = 0,				\
72*4882a593Smuzhiyun 		.intr_cfg_reg = 0,			\
73*4882a593Smuzhiyun 		.intr_status_reg = 0,			\
74*4882a593Smuzhiyun 		.intr_target_reg = 0,			\
75*4882a593Smuzhiyun 		.mux_bit = -1,				\
76*4882a593Smuzhiyun 		.pull_bit = pull,			\
77*4882a593Smuzhiyun 		.drv_bit = drv,				\
78*4882a593Smuzhiyun 		.oe_bit = -1,				\
79*4882a593Smuzhiyun 		.in_bit = -1,				\
80*4882a593Smuzhiyun 		.out_bit = -1,				\
81*4882a593Smuzhiyun 		.intr_enable_bit = -1,			\
82*4882a593Smuzhiyun 		.intr_status_bit = -1,			\
83*4882a593Smuzhiyun 		.intr_target_bit = -1,			\
84*4882a593Smuzhiyun 		.intr_raw_status_bit = -1,		\
85*4882a593Smuzhiyun 		.intr_polarity_bit = -1,		\
86*4882a593Smuzhiyun 		.intr_detection_bit = -1,		\
87*4882a593Smuzhiyun 		.intr_detection_width = -1,		\
88*4882a593Smuzhiyun 	}
89*4882a593Smuzhiyun 
90*4882a593Smuzhiyun #define UFS_RESET(pg_name, offset)				\
91*4882a593Smuzhiyun 	{						\
92*4882a593Smuzhiyun 		.name = #pg_name,			\
93*4882a593Smuzhiyun 		.pins = pg_name##_pins,			\
94*4882a593Smuzhiyun 		.npins = ARRAY_SIZE(pg_name##_pins),	\
95*4882a593Smuzhiyun 		.ctl_reg = offset,			\
96*4882a593Smuzhiyun 		.io_reg = offset + 0x4,			\
97*4882a593Smuzhiyun 		.intr_cfg_reg = 0,			\
98*4882a593Smuzhiyun 		.intr_status_reg = 0,			\
99*4882a593Smuzhiyun 		.intr_target_reg = 0,			\
100*4882a593Smuzhiyun 		.mux_bit = -1,				\
101*4882a593Smuzhiyun 		.pull_bit = 3,				\
102*4882a593Smuzhiyun 		.drv_bit = 0,				\
103*4882a593Smuzhiyun 		.oe_bit = -1,				\
104*4882a593Smuzhiyun 		.in_bit = -1,				\
105*4882a593Smuzhiyun 		.out_bit = 0,				\
106*4882a593Smuzhiyun 		.intr_enable_bit = -1,			\
107*4882a593Smuzhiyun 		.intr_status_bit = -1,			\
108*4882a593Smuzhiyun 		.intr_target_bit = -1,			\
109*4882a593Smuzhiyun 		.intr_raw_status_bit = -1,		\
110*4882a593Smuzhiyun 		.intr_polarity_bit = -1,		\
111*4882a593Smuzhiyun 		.intr_detection_bit = -1,		\
112*4882a593Smuzhiyun 		.intr_detection_width = -1,		\
113*4882a593Smuzhiyun 	}
114*4882a593Smuzhiyun static const struct pinctrl_pin_desc sdm845_pins[] = {
115*4882a593Smuzhiyun 	PINCTRL_PIN(0, "GPIO_0"),
116*4882a593Smuzhiyun 	PINCTRL_PIN(1, "GPIO_1"),
117*4882a593Smuzhiyun 	PINCTRL_PIN(2, "GPIO_2"),
118*4882a593Smuzhiyun 	PINCTRL_PIN(3, "GPIO_3"),
119*4882a593Smuzhiyun 	PINCTRL_PIN(4, "GPIO_4"),
120*4882a593Smuzhiyun 	PINCTRL_PIN(5, "GPIO_5"),
121*4882a593Smuzhiyun 	PINCTRL_PIN(6, "GPIO_6"),
122*4882a593Smuzhiyun 	PINCTRL_PIN(7, "GPIO_7"),
123*4882a593Smuzhiyun 	PINCTRL_PIN(8, "GPIO_8"),
124*4882a593Smuzhiyun 	PINCTRL_PIN(9, "GPIO_9"),
125*4882a593Smuzhiyun 	PINCTRL_PIN(10, "GPIO_10"),
126*4882a593Smuzhiyun 	PINCTRL_PIN(11, "GPIO_11"),
127*4882a593Smuzhiyun 	PINCTRL_PIN(12, "GPIO_12"),
128*4882a593Smuzhiyun 	PINCTRL_PIN(13, "GPIO_13"),
129*4882a593Smuzhiyun 	PINCTRL_PIN(14, "GPIO_14"),
130*4882a593Smuzhiyun 	PINCTRL_PIN(15, "GPIO_15"),
131*4882a593Smuzhiyun 	PINCTRL_PIN(16, "GPIO_16"),
132*4882a593Smuzhiyun 	PINCTRL_PIN(17, "GPIO_17"),
133*4882a593Smuzhiyun 	PINCTRL_PIN(18, "GPIO_18"),
134*4882a593Smuzhiyun 	PINCTRL_PIN(19, "GPIO_19"),
135*4882a593Smuzhiyun 	PINCTRL_PIN(20, "GPIO_20"),
136*4882a593Smuzhiyun 	PINCTRL_PIN(21, "GPIO_21"),
137*4882a593Smuzhiyun 	PINCTRL_PIN(22, "GPIO_22"),
138*4882a593Smuzhiyun 	PINCTRL_PIN(23, "GPIO_23"),
139*4882a593Smuzhiyun 	PINCTRL_PIN(24, "GPIO_24"),
140*4882a593Smuzhiyun 	PINCTRL_PIN(25, "GPIO_25"),
141*4882a593Smuzhiyun 	PINCTRL_PIN(26, "GPIO_26"),
142*4882a593Smuzhiyun 	PINCTRL_PIN(27, "GPIO_27"),
143*4882a593Smuzhiyun 	PINCTRL_PIN(28, "GPIO_28"),
144*4882a593Smuzhiyun 	PINCTRL_PIN(29, "GPIO_29"),
145*4882a593Smuzhiyun 	PINCTRL_PIN(30, "GPIO_30"),
146*4882a593Smuzhiyun 	PINCTRL_PIN(31, "GPIO_31"),
147*4882a593Smuzhiyun 	PINCTRL_PIN(32, "GPIO_32"),
148*4882a593Smuzhiyun 	PINCTRL_PIN(33, "GPIO_33"),
149*4882a593Smuzhiyun 	PINCTRL_PIN(34, "GPIO_34"),
150*4882a593Smuzhiyun 	PINCTRL_PIN(35, "GPIO_35"),
151*4882a593Smuzhiyun 	PINCTRL_PIN(36, "GPIO_36"),
152*4882a593Smuzhiyun 	PINCTRL_PIN(37, "GPIO_37"),
153*4882a593Smuzhiyun 	PINCTRL_PIN(38, "GPIO_38"),
154*4882a593Smuzhiyun 	PINCTRL_PIN(39, "GPIO_39"),
155*4882a593Smuzhiyun 	PINCTRL_PIN(40, "GPIO_40"),
156*4882a593Smuzhiyun 	PINCTRL_PIN(41, "GPIO_41"),
157*4882a593Smuzhiyun 	PINCTRL_PIN(42, "GPIO_42"),
158*4882a593Smuzhiyun 	PINCTRL_PIN(43, "GPIO_43"),
159*4882a593Smuzhiyun 	PINCTRL_PIN(44, "GPIO_44"),
160*4882a593Smuzhiyun 	PINCTRL_PIN(45, "GPIO_45"),
161*4882a593Smuzhiyun 	PINCTRL_PIN(46, "GPIO_46"),
162*4882a593Smuzhiyun 	PINCTRL_PIN(47, "GPIO_47"),
163*4882a593Smuzhiyun 	PINCTRL_PIN(48, "GPIO_48"),
164*4882a593Smuzhiyun 	PINCTRL_PIN(49, "GPIO_49"),
165*4882a593Smuzhiyun 	PINCTRL_PIN(50, "GPIO_50"),
166*4882a593Smuzhiyun 	PINCTRL_PIN(51, "GPIO_51"),
167*4882a593Smuzhiyun 	PINCTRL_PIN(52, "GPIO_52"),
168*4882a593Smuzhiyun 	PINCTRL_PIN(53, "GPIO_53"),
169*4882a593Smuzhiyun 	PINCTRL_PIN(54, "GPIO_54"),
170*4882a593Smuzhiyun 	PINCTRL_PIN(55, "GPIO_55"),
171*4882a593Smuzhiyun 	PINCTRL_PIN(56, "GPIO_56"),
172*4882a593Smuzhiyun 	PINCTRL_PIN(57, "GPIO_57"),
173*4882a593Smuzhiyun 	PINCTRL_PIN(58, "GPIO_58"),
174*4882a593Smuzhiyun 	PINCTRL_PIN(59, "GPIO_59"),
175*4882a593Smuzhiyun 	PINCTRL_PIN(60, "GPIO_60"),
176*4882a593Smuzhiyun 	PINCTRL_PIN(61, "GPIO_61"),
177*4882a593Smuzhiyun 	PINCTRL_PIN(62, "GPIO_62"),
178*4882a593Smuzhiyun 	PINCTRL_PIN(63, "GPIO_63"),
179*4882a593Smuzhiyun 	PINCTRL_PIN(64, "GPIO_64"),
180*4882a593Smuzhiyun 	PINCTRL_PIN(65, "GPIO_65"),
181*4882a593Smuzhiyun 	PINCTRL_PIN(66, "GPIO_66"),
182*4882a593Smuzhiyun 	PINCTRL_PIN(67, "GPIO_67"),
183*4882a593Smuzhiyun 	PINCTRL_PIN(68, "GPIO_68"),
184*4882a593Smuzhiyun 	PINCTRL_PIN(69, "GPIO_69"),
185*4882a593Smuzhiyun 	PINCTRL_PIN(70, "GPIO_70"),
186*4882a593Smuzhiyun 	PINCTRL_PIN(71, "GPIO_71"),
187*4882a593Smuzhiyun 	PINCTRL_PIN(72, "GPIO_72"),
188*4882a593Smuzhiyun 	PINCTRL_PIN(73, "GPIO_73"),
189*4882a593Smuzhiyun 	PINCTRL_PIN(74, "GPIO_74"),
190*4882a593Smuzhiyun 	PINCTRL_PIN(75, "GPIO_75"),
191*4882a593Smuzhiyun 	PINCTRL_PIN(76, "GPIO_76"),
192*4882a593Smuzhiyun 	PINCTRL_PIN(77, "GPIO_77"),
193*4882a593Smuzhiyun 	PINCTRL_PIN(78, "GPIO_78"),
194*4882a593Smuzhiyun 	PINCTRL_PIN(79, "GPIO_79"),
195*4882a593Smuzhiyun 	PINCTRL_PIN(80, "GPIO_80"),
196*4882a593Smuzhiyun 	PINCTRL_PIN(81, "GPIO_81"),
197*4882a593Smuzhiyun 	PINCTRL_PIN(82, "GPIO_82"),
198*4882a593Smuzhiyun 	PINCTRL_PIN(83, "GPIO_83"),
199*4882a593Smuzhiyun 	PINCTRL_PIN(84, "GPIO_84"),
200*4882a593Smuzhiyun 	PINCTRL_PIN(85, "GPIO_85"),
201*4882a593Smuzhiyun 	PINCTRL_PIN(86, "GPIO_86"),
202*4882a593Smuzhiyun 	PINCTRL_PIN(87, "GPIO_87"),
203*4882a593Smuzhiyun 	PINCTRL_PIN(88, "GPIO_88"),
204*4882a593Smuzhiyun 	PINCTRL_PIN(89, "GPIO_89"),
205*4882a593Smuzhiyun 	PINCTRL_PIN(90, "GPIO_90"),
206*4882a593Smuzhiyun 	PINCTRL_PIN(91, "GPIO_91"),
207*4882a593Smuzhiyun 	PINCTRL_PIN(92, "GPIO_92"),
208*4882a593Smuzhiyun 	PINCTRL_PIN(93, "GPIO_93"),
209*4882a593Smuzhiyun 	PINCTRL_PIN(94, "GPIO_94"),
210*4882a593Smuzhiyun 	PINCTRL_PIN(95, "GPIO_95"),
211*4882a593Smuzhiyun 	PINCTRL_PIN(96, "GPIO_96"),
212*4882a593Smuzhiyun 	PINCTRL_PIN(97, "GPIO_97"),
213*4882a593Smuzhiyun 	PINCTRL_PIN(98, "GPIO_98"),
214*4882a593Smuzhiyun 	PINCTRL_PIN(99, "GPIO_99"),
215*4882a593Smuzhiyun 	PINCTRL_PIN(100, "GPIO_100"),
216*4882a593Smuzhiyun 	PINCTRL_PIN(101, "GPIO_101"),
217*4882a593Smuzhiyun 	PINCTRL_PIN(102, "GPIO_102"),
218*4882a593Smuzhiyun 	PINCTRL_PIN(103, "GPIO_103"),
219*4882a593Smuzhiyun 	PINCTRL_PIN(104, "GPIO_104"),
220*4882a593Smuzhiyun 	PINCTRL_PIN(105, "GPIO_105"),
221*4882a593Smuzhiyun 	PINCTRL_PIN(106, "GPIO_106"),
222*4882a593Smuzhiyun 	PINCTRL_PIN(107, "GPIO_107"),
223*4882a593Smuzhiyun 	PINCTRL_PIN(108, "GPIO_108"),
224*4882a593Smuzhiyun 	PINCTRL_PIN(109, "GPIO_109"),
225*4882a593Smuzhiyun 	PINCTRL_PIN(110, "GPIO_110"),
226*4882a593Smuzhiyun 	PINCTRL_PIN(111, "GPIO_111"),
227*4882a593Smuzhiyun 	PINCTRL_PIN(112, "GPIO_112"),
228*4882a593Smuzhiyun 	PINCTRL_PIN(113, "GPIO_113"),
229*4882a593Smuzhiyun 	PINCTRL_PIN(114, "GPIO_114"),
230*4882a593Smuzhiyun 	PINCTRL_PIN(115, "GPIO_115"),
231*4882a593Smuzhiyun 	PINCTRL_PIN(116, "GPIO_116"),
232*4882a593Smuzhiyun 	PINCTRL_PIN(117, "GPIO_117"),
233*4882a593Smuzhiyun 	PINCTRL_PIN(118, "GPIO_118"),
234*4882a593Smuzhiyun 	PINCTRL_PIN(119, "GPIO_119"),
235*4882a593Smuzhiyun 	PINCTRL_PIN(120, "GPIO_120"),
236*4882a593Smuzhiyun 	PINCTRL_PIN(121, "GPIO_121"),
237*4882a593Smuzhiyun 	PINCTRL_PIN(122, "GPIO_122"),
238*4882a593Smuzhiyun 	PINCTRL_PIN(123, "GPIO_123"),
239*4882a593Smuzhiyun 	PINCTRL_PIN(124, "GPIO_124"),
240*4882a593Smuzhiyun 	PINCTRL_PIN(125, "GPIO_125"),
241*4882a593Smuzhiyun 	PINCTRL_PIN(126, "GPIO_126"),
242*4882a593Smuzhiyun 	PINCTRL_PIN(127, "GPIO_127"),
243*4882a593Smuzhiyun 	PINCTRL_PIN(128, "GPIO_128"),
244*4882a593Smuzhiyun 	PINCTRL_PIN(129, "GPIO_129"),
245*4882a593Smuzhiyun 	PINCTRL_PIN(130, "GPIO_130"),
246*4882a593Smuzhiyun 	PINCTRL_PIN(131, "GPIO_131"),
247*4882a593Smuzhiyun 	PINCTRL_PIN(132, "GPIO_132"),
248*4882a593Smuzhiyun 	PINCTRL_PIN(133, "GPIO_133"),
249*4882a593Smuzhiyun 	PINCTRL_PIN(134, "GPIO_134"),
250*4882a593Smuzhiyun 	PINCTRL_PIN(135, "GPIO_135"),
251*4882a593Smuzhiyun 	PINCTRL_PIN(136, "GPIO_136"),
252*4882a593Smuzhiyun 	PINCTRL_PIN(137, "GPIO_137"),
253*4882a593Smuzhiyun 	PINCTRL_PIN(138, "GPIO_138"),
254*4882a593Smuzhiyun 	PINCTRL_PIN(139, "GPIO_139"),
255*4882a593Smuzhiyun 	PINCTRL_PIN(140, "GPIO_140"),
256*4882a593Smuzhiyun 	PINCTRL_PIN(141, "GPIO_141"),
257*4882a593Smuzhiyun 	PINCTRL_PIN(142, "GPIO_142"),
258*4882a593Smuzhiyun 	PINCTRL_PIN(143, "GPIO_143"),
259*4882a593Smuzhiyun 	PINCTRL_PIN(144, "GPIO_144"),
260*4882a593Smuzhiyun 	PINCTRL_PIN(145, "GPIO_145"),
261*4882a593Smuzhiyun 	PINCTRL_PIN(146, "GPIO_146"),
262*4882a593Smuzhiyun 	PINCTRL_PIN(147, "GPIO_147"),
263*4882a593Smuzhiyun 	PINCTRL_PIN(148, "GPIO_148"),
264*4882a593Smuzhiyun 	PINCTRL_PIN(149, "GPIO_149"),
265*4882a593Smuzhiyun 	PINCTRL_PIN(150, "UFS_RESET"),
266*4882a593Smuzhiyun 	PINCTRL_PIN(151, "SDC2_CLK"),
267*4882a593Smuzhiyun 	PINCTRL_PIN(152, "SDC2_CMD"),
268*4882a593Smuzhiyun 	PINCTRL_PIN(153, "SDC2_DATA"),
269*4882a593Smuzhiyun };
270*4882a593Smuzhiyun 
271*4882a593Smuzhiyun #define DECLARE_MSM_GPIO_PINS(pin) \
272*4882a593Smuzhiyun 	static const unsigned int gpio##pin##_pins[] = { pin }
273*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(0);
274*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(1);
275*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(2);
276*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(3);
277*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(4);
278*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(5);
279*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(6);
280*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(7);
281*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(8);
282*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(9);
283*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(10);
284*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(11);
285*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(12);
286*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(13);
287*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(14);
288*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(15);
289*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(16);
290*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(17);
291*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(18);
292*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(19);
293*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(20);
294*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(21);
295*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(22);
296*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(23);
297*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(24);
298*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(25);
299*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(26);
300*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(27);
301*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(28);
302*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(29);
303*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(30);
304*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(31);
305*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(32);
306*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(33);
307*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(34);
308*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(35);
309*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(36);
310*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(37);
311*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(38);
312*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(39);
313*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(40);
314*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(41);
315*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(42);
316*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(43);
317*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(44);
318*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(45);
319*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(46);
320*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(47);
321*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(48);
322*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(49);
323*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(50);
324*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(51);
325*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(52);
326*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(53);
327*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(54);
328*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(55);
329*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(56);
330*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(57);
331*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(58);
332*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(59);
333*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(60);
334*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(61);
335*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(62);
336*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(63);
337*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(64);
338*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(65);
339*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(66);
340*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(67);
341*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(68);
342*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(69);
343*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(70);
344*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(71);
345*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(72);
346*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(73);
347*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(74);
348*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(75);
349*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(76);
350*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(77);
351*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(78);
352*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(79);
353*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(80);
354*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(81);
355*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(82);
356*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(83);
357*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(84);
358*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(85);
359*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(86);
360*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(87);
361*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(88);
362*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(89);
363*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(90);
364*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(91);
365*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(92);
366*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(93);
367*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(94);
368*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(95);
369*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(96);
370*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(97);
371*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(98);
372*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(99);
373*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(100);
374*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(101);
375*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(102);
376*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(103);
377*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(104);
378*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(105);
379*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(106);
380*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(107);
381*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(108);
382*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(109);
383*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(110);
384*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(111);
385*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(112);
386*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(113);
387*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(114);
388*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(115);
389*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(116);
390*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(117);
391*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(118);
392*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(119);
393*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(120);
394*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(121);
395*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(122);
396*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(123);
397*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(124);
398*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(125);
399*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(126);
400*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(127);
401*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(128);
402*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(129);
403*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(130);
404*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(131);
405*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(132);
406*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(133);
407*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(134);
408*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(135);
409*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(136);
410*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(137);
411*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(138);
412*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(139);
413*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(140);
414*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(141);
415*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(142);
416*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(143);
417*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(144);
418*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(145);
419*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(146);
420*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(147);
421*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(148);
422*4882a593Smuzhiyun DECLARE_MSM_GPIO_PINS(149);
423*4882a593Smuzhiyun 
424*4882a593Smuzhiyun static const unsigned int ufs_reset_pins[] = { 150 };
425*4882a593Smuzhiyun static const unsigned int sdc2_clk_pins[] = { 151 };
426*4882a593Smuzhiyun static const unsigned int sdc2_cmd_pins[] = { 152 };
427*4882a593Smuzhiyun static const unsigned int sdc2_data_pins[] = { 153 };
428*4882a593Smuzhiyun 
429*4882a593Smuzhiyun enum sdm845_functions {
430*4882a593Smuzhiyun 	msm_mux_gpio,
431*4882a593Smuzhiyun 	msm_mux_adsp_ext,
432*4882a593Smuzhiyun 	msm_mux_agera_pll,
433*4882a593Smuzhiyun 	msm_mux_atest_char,
434*4882a593Smuzhiyun 	msm_mux_atest_tsens,
435*4882a593Smuzhiyun 	msm_mux_atest_tsens2,
436*4882a593Smuzhiyun 	msm_mux_atest_usb1,
437*4882a593Smuzhiyun 	msm_mux_atest_usb10,
438*4882a593Smuzhiyun 	msm_mux_atest_usb11,
439*4882a593Smuzhiyun 	msm_mux_atest_usb12,
440*4882a593Smuzhiyun 	msm_mux_atest_usb13,
441*4882a593Smuzhiyun 	msm_mux_atest_usb2,
442*4882a593Smuzhiyun 	msm_mux_atest_usb20,
443*4882a593Smuzhiyun 	msm_mux_atest_usb21,
444*4882a593Smuzhiyun 	msm_mux_atest_usb22,
445*4882a593Smuzhiyun 	msm_mux_atest_usb23,
446*4882a593Smuzhiyun 	msm_mux_audio_ref,
447*4882a593Smuzhiyun 	msm_mux_btfm_slimbus,
448*4882a593Smuzhiyun 	msm_mux_cam_mclk,
449*4882a593Smuzhiyun 	msm_mux_cci_async,
450*4882a593Smuzhiyun 	msm_mux_cci_i2c,
451*4882a593Smuzhiyun 	msm_mux_cci_timer0,
452*4882a593Smuzhiyun 	msm_mux_cci_timer1,
453*4882a593Smuzhiyun 	msm_mux_cci_timer2,
454*4882a593Smuzhiyun 	msm_mux_cci_timer3,
455*4882a593Smuzhiyun 	msm_mux_cci_timer4,
456*4882a593Smuzhiyun 	msm_mux_cri_trng,
457*4882a593Smuzhiyun 	msm_mux_cri_trng0,
458*4882a593Smuzhiyun 	msm_mux_cri_trng1,
459*4882a593Smuzhiyun 	msm_mux_dbg_out,
460*4882a593Smuzhiyun 	msm_mux_ddr_bist,
461*4882a593Smuzhiyun 	msm_mux_ddr_pxi0,
462*4882a593Smuzhiyun 	msm_mux_ddr_pxi1,
463*4882a593Smuzhiyun 	msm_mux_ddr_pxi2,
464*4882a593Smuzhiyun 	msm_mux_ddr_pxi3,
465*4882a593Smuzhiyun 	msm_mux_edp_hot,
466*4882a593Smuzhiyun 	msm_mux_edp_lcd,
467*4882a593Smuzhiyun 	msm_mux_gcc_gp1,
468*4882a593Smuzhiyun 	msm_mux_gcc_gp2,
469*4882a593Smuzhiyun 	msm_mux_gcc_gp3,
470*4882a593Smuzhiyun 	msm_mux_jitter_bist,
471*4882a593Smuzhiyun 	msm_mux_ldo_en,
472*4882a593Smuzhiyun 	msm_mux_ldo_update,
473*4882a593Smuzhiyun 	msm_mux_lpass_slimbus,
474*4882a593Smuzhiyun 	msm_mux_m_voc,
475*4882a593Smuzhiyun 	msm_mux_mdp_vsync,
476*4882a593Smuzhiyun 	msm_mux_mdp_vsync0,
477*4882a593Smuzhiyun 	msm_mux_mdp_vsync1,
478*4882a593Smuzhiyun 	msm_mux_mdp_vsync2,
479*4882a593Smuzhiyun 	msm_mux_mdp_vsync3,
480*4882a593Smuzhiyun 	msm_mux_mss_lte,
481*4882a593Smuzhiyun 	msm_mux_nav_pps,
482*4882a593Smuzhiyun 	msm_mux_pa_indicator,
483*4882a593Smuzhiyun 	msm_mux_pci_e0,
484*4882a593Smuzhiyun 	msm_mux_pci_e1,
485*4882a593Smuzhiyun 	msm_mux_phase_flag,
486*4882a593Smuzhiyun 	msm_mux_pll_bist,
487*4882a593Smuzhiyun 	msm_mux_pll_bypassnl,
488*4882a593Smuzhiyun 	msm_mux_pll_reset,
489*4882a593Smuzhiyun 	msm_mux_pri_mi2s,
490*4882a593Smuzhiyun 	msm_mux_pri_mi2s_ws,
491*4882a593Smuzhiyun 	msm_mux_prng_rosc,
492*4882a593Smuzhiyun 	msm_mux_qdss_cti,
493*4882a593Smuzhiyun 	msm_mux_qdss,
494*4882a593Smuzhiyun 	msm_mux_qlink_enable,
495*4882a593Smuzhiyun 	msm_mux_qlink_request,
496*4882a593Smuzhiyun 	msm_mux_qspi_clk,
497*4882a593Smuzhiyun 	msm_mux_qspi_cs,
498*4882a593Smuzhiyun 	msm_mux_qspi_data,
499*4882a593Smuzhiyun 	msm_mux_qua_mi2s,
500*4882a593Smuzhiyun 	msm_mux_qup0,
501*4882a593Smuzhiyun 	msm_mux_qup1,
502*4882a593Smuzhiyun 	msm_mux_qup10,
503*4882a593Smuzhiyun 	msm_mux_qup11,
504*4882a593Smuzhiyun 	msm_mux_qup12,
505*4882a593Smuzhiyun 	msm_mux_qup13,
506*4882a593Smuzhiyun 	msm_mux_qup14,
507*4882a593Smuzhiyun 	msm_mux_qup15,
508*4882a593Smuzhiyun 	msm_mux_qup2,
509*4882a593Smuzhiyun 	msm_mux_qup3,
510*4882a593Smuzhiyun 	msm_mux_qup4,
511*4882a593Smuzhiyun 	msm_mux_qup5,
512*4882a593Smuzhiyun 	msm_mux_qup6,
513*4882a593Smuzhiyun 	msm_mux_qup7,
514*4882a593Smuzhiyun 	msm_mux_qup8,
515*4882a593Smuzhiyun 	msm_mux_qup9,
516*4882a593Smuzhiyun 	msm_mux_qup_l4,
517*4882a593Smuzhiyun 	msm_mux_qup_l5,
518*4882a593Smuzhiyun 	msm_mux_qup_l6,
519*4882a593Smuzhiyun 	msm_mux_sd_write,
520*4882a593Smuzhiyun 	msm_mux_sdc4_clk,
521*4882a593Smuzhiyun 	msm_mux_sdc4_cmd,
522*4882a593Smuzhiyun 	msm_mux_sdc4_data,
523*4882a593Smuzhiyun 	msm_mux_sec_mi2s,
524*4882a593Smuzhiyun 	msm_mux_sp_cmu,
525*4882a593Smuzhiyun 	msm_mux_spkr_i2s,
526*4882a593Smuzhiyun 	msm_mux_ter_mi2s,
527*4882a593Smuzhiyun 	msm_mux_tgu_ch0,
528*4882a593Smuzhiyun 	msm_mux_tgu_ch1,
529*4882a593Smuzhiyun 	msm_mux_tgu_ch2,
530*4882a593Smuzhiyun 	msm_mux_tgu_ch3,
531*4882a593Smuzhiyun 	msm_mux_tsense_pwm1,
532*4882a593Smuzhiyun 	msm_mux_tsense_pwm2,
533*4882a593Smuzhiyun 	msm_mux_tsif1_clk,
534*4882a593Smuzhiyun 	msm_mux_tsif1_data,
535*4882a593Smuzhiyun 	msm_mux_tsif1_en,
536*4882a593Smuzhiyun 	msm_mux_tsif1_error,
537*4882a593Smuzhiyun 	msm_mux_tsif1_sync,
538*4882a593Smuzhiyun 	msm_mux_tsif2_clk,
539*4882a593Smuzhiyun 	msm_mux_tsif2_data,
540*4882a593Smuzhiyun 	msm_mux_tsif2_en,
541*4882a593Smuzhiyun 	msm_mux_tsif2_error,
542*4882a593Smuzhiyun 	msm_mux_tsif2_sync,
543*4882a593Smuzhiyun 	msm_mux_uim1_clk,
544*4882a593Smuzhiyun 	msm_mux_uim1_data,
545*4882a593Smuzhiyun 	msm_mux_uim1_present,
546*4882a593Smuzhiyun 	msm_mux_uim1_reset,
547*4882a593Smuzhiyun 	msm_mux_uim2_clk,
548*4882a593Smuzhiyun 	msm_mux_uim2_data,
549*4882a593Smuzhiyun 	msm_mux_uim2_present,
550*4882a593Smuzhiyun 	msm_mux_uim2_reset,
551*4882a593Smuzhiyun 	msm_mux_uim_batt,
552*4882a593Smuzhiyun 	msm_mux_usb_phy,
553*4882a593Smuzhiyun 	msm_mux_vfr_1,
554*4882a593Smuzhiyun 	msm_mux_vsense_trigger,
555*4882a593Smuzhiyun 	msm_mux_wlan1_adc0,
556*4882a593Smuzhiyun 	msm_mux_wlan1_adc1,
557*4882a593Smuzhiyun 	msm_mux_wlan2_adc0,
558*4882a593Smuzhiyun 	msm_mux_wlan2_adc1,
559*4882a593Smuzhiyun 	msm_mux__,
560*4882a593Smuzhiyun };
561*4882a593Smuzhiyun 
562*4882a593Smuzhiyun static const char * const ddr_pxi3_groups[] = {
563*4882a593Smuzhiyun 	"gpio12", "gpio13",
564*4882a593Smuzhiyun };
565*4882a593Smuzhiyun static const char * const cam_mclk_groups[] = {
566*4882a593Smuzhiyun 	"gpio13", "gpio14", "gpio15", "gpio16",
567*4882a593Smuzhiyun };
568*4882a593Smuzhiyun static const char * const pll_bypassnl_groups[] = {
569*4882a593Smuzhiyun 	"gpio13",
570*4882a593Smuzhiyun };
571*4882a593Smuzhiyun static const char * const qdss_groups[] = {
572*4882a593Smuzhiyun 	"gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19",
573*4882a593Smuzhiyun 	"gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26",
574*4882a593Smuzhiyun 	"gpio27", "gpio28", "gpio29", "gpio30", "gpio41", "gpio42", "gpio43",
575*4882a593Smuzhiyun 	"gpio44", "gpio75", "gpio76", "gpio77", "gpio79", "gpio80", "gpio93",
576*4882a593Smuzhiyun 	"gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
577*4882a593Smuzhiyun 	"gpio123", "gpio124",
578*4882a593Smuzhiyun };
579*4882a593Smuzhiyun static const char * const pll_reset_groups[] = {
580*4882a593Smuzhiyun 	"gpio14",
581*4882a593Smuzhiyun };
582*4882a593Smuzhiyun static const char * const cci_i2c_groups[] = {
583*4882a593Smuzhiyun 	"gpio17", "gpio18", "gpio19", "gpio20",
584*4882a593Smuzhiyun };
585*4882a593Smuzhiyun static const char * const qup1_groups[] = {
586*4882a593Smuzhiyun 	"gpio17", "gpio18", "gpio19", "gpio20",
587*4882a593Smuzhiyun };
588*4882a593Smuzhiyun static const char * const cci_timer0_groups[] = {
589*4882a593Smuzhiyun 	"gpio21",
590*4882a593Smuzhiyun };
591*4882a593Smuzhiyun static const char * const gcc_gp2_groups[] = {
592*4882a593Smuzhiyun 	"gpio21", "gpio58",
593*4882a593Smuzhiyun };
594*4882a593Smuzhiyun static const char * const cci_timer1_groups[] = {
595*4882a593Smuzhiyun 	"gpio22",
596*4882a593Smuzhiyun };
597*4882a593Smuzhiyun static const char * const gcc_gp3_groups[] = {
598*4882a593Smuzhiyun 	"gpio22", "gpio59",
599*4882a593Smuzhiyun };
600*4882a593Smuzhiyun static const char * const cci_timer2_groups[] = {
601*4882a593Smuzhiyun 	"gpio23",
602*4882a593Smuzhiyun };
603*4882a593Smuzhiyun static const char * const cci_timer3_groups[] = {
604*4882a593Smuzhiyun 	"gpio24",
605*4882a593Smuzhiyun };
606*4882a593Smuzhiyun static const char * const cci_async_groups[] = {
607*4882a593Smuzhiyun 	"gpio24", "gpio25", "gpio26",
608*4882a593Smuzhiyun };
609*4882a593Smuzhiyun static const char * const cci_timer4_groups[] = {
610*4882a593Smuzhiyun 	"gpio25",
611*4882a593Smuzhiyun };
612*4882a593Smuzhiyun static const char * const qup2_groups[] = {
613*4882a593Smuzhiyun 	"gpio27", "gpio28", "gpio29", "gpio30",
614*4882a593Smuzhiyun };
615*4882a593Smuzhiyun static const char * const phase_flag_groups[] = {
616*4882a593Smuzhiyun 	"gpio29", "gpio30", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
617*4882a593Smuzhiyun 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
618*4882a593Smuzhiyun 	"gpio64", "gpio74", "gpio75", "gpio76", "gpio77", "gpio89", "gpio90",
619*4882a593Smuzhiyun 	"gpio96", "gpio99", "gpio100", "gpio103", "gpio137", "gpio138",
620*4882a593Smuzhiyun 	"gpio139", "gpio140", "gpio141", "gpio142", "gpio143",
621*4882a593Smuzhiyun };
622*4882a593Smuzhiyun static const char * const qup11_groups[] = {
623*4882a593Smuzhiyun 	"gpio31", "gpio32", "gpio33", "gpio34",
624*4882a593Smuzhiyun };
625*4882a593Smuzhiyun static const char * const qup14_groups[] = {
626*4882a593Smuzhiyun 	"gpio31", "gpio32", "gpio33", "gpio34",
627*4882a593Smuzhiyun };
628*4882a593Smuzhiyun static const char * const pci_e0_groups[] = {
629*4882a593Smuzhiyun 	"gpio35", "gpio36",
630*4882a593Smuzhiyun };
631*4882a593Smuzhiyun static const char * const jitter_bist_groups[] = {
632*4882a593Smuzhiyun 	"gpio35",
633*4882a593Smuzhiyun };
634*4882a593Smuzhiyun static const char * const pll_bist_groups[] = {
635*4882a593Smuzhiyun 	"gpio36",
636*4882a593Smuzhiyun };
637*4882a593Smuzhiyun static const char * const atest_tsens_groups[] = {
638*4882a593Smuzhiyun 	"gpio36",
639*4882a593Smuzhiyun };
640*4882a593Smuzhiyun static const char * const agera_pll_groups[] = {
641*4882a593Smuzhiyun 	"gpio37",
642*4882a593Smuzhiyun };
643*4882a593Smuzhiyun static const char * const usb_phy_groups[] = {
644*4882a593Smuzhiyun 	"gpio38",
645*4882a593Smuzhiyun };
646*4882a593Smuzhiyun static const char * const lpass_slimbus_groups[] = {
647*4882a593Smuzhiyun 	"gpio39", "gpio70", "gpio71", "gpio72",
648*4882a593Smuzhiyun };
649*4882a593Smuzhiyun static const char * const sd_write_groups[] = {
650*4882a593Smuzhiyun 	"gpio40",
651*4882a593Smuzhiyun };
652*4882a593Smuzhiyun static const char * const tsif1_error_groups[] = {
653*4882a593Smuzhiyun 	"gpio40",
654*4882a593Smuzhiyun };
655*4882a593Smuzhiyun static const char * const qup3_groups[] = {
656*4882a593Smuzhiyun 	"gpio41", "gpio42", "gpio43", "gpio44",
657*4882a593Smuzhiyun };
658*4882a593Smuzhiyun static const char * const qup6_groups[] = {
659*4882a593Smuzhiyun 	"gpio45", "gpio46", "gpio47", "gpio48",
660*4882a593Smuzhiyun };
661*4882a593Smuzhiyun static const char * const qup12_groups[] = {
662*4882a593Smuzhiyun 	"gpio49", "gpio50", "gpio51", "gpio52",
663*4882a593Smuzhiyun };
664*4882a593Smuzhiyun static const char * const qup10_groups[] = {
665*4882a593Smuzhiyun 	"gpio53", "gpio54", "gpio55", "gpio56",
666*4882a593Smuzhiyun };
667*4882a593Smuzhiyun static const char * const qua_mi2s_groups[] = {
668*4882a593Smuzhiyun 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
669*4882a593Smuzhiyun };
670*4882a593Smuzhiyun static const char * const gcc_gp1_groups[] = {
671*4882a593Smuzhiyun 	"gpio57", "gpio78",
672*4882a593Smuzhiyun };
673*4882a593Smuzhiyun static const char * const cri_trng0_groups[] = {
674*4882a593Smuzhiyun 	"gpio60",
675*4882a593Smuzhiyun };
676*4882a593Smuzhiyun static const char * const cri_trng1_groups[] = {
677*4882a593Smuzhiyun 	"gpio61",
678*4882a593Smuzhiyun };
679*4882a593Smuzhiyun static const char * const cri_trng_groups[] = {
680*4882a593Smuzhiyun 	"gpio62",
681*4882a593Smuzhiyun };
682*4882a593Smuzhiyun static const char * const pri_mi2s_groups[] = {
683*4882a593Smuzhiyun 	"gpio64", "gpio65", "gpio67", "gpio68",
684*4882a593Smuzhiyun };
685*4882a593Smuzhiyun static const char * const sp_cmu_groups[] = {
686*4882a593Smuzhiyun 	"gpio64",
687*4882a593Smuzhiyun };
688*4882a593Smuzhiyun static const char * const qup8_groups[] = {
689*4882a593Smuzhiyun 	"gpio65", "gpio66", "gpio67", "gpio68",
690*4882a593Smuzhiyun };
691*4882a593Smuzhiyun static const char * const pri_mi2s_ws_groups[] = {
692*4882a593Smuzhiyun 	"gpio66",
693*4882a593Smuzhiyun };
694*4882a593Smuzhiyun static const char * const spkr_i2s_groups[] = {
695*4882a593Smuzhiyun 	"gpio69", "gpio70", "gpio71", "gpio72",
696*4882a593Smuzhiyun };
697*4882a593Smuzhiyun static const char * const audio_ref_groups[] = {
698*4882a593Smuzhiyun 	"gpio69",
699*4882a593Smuzhiyun };
700*4882a593Smuzhiyun static const char * const tsense_pwm1_groups[] = {
701*4882a593Smuzhiyun 	"gpio71",
702*4882a593Smuzhiyun };
703*4882a593Smuzhiyun static const char * const tsense_pwm2_groups[] = {
704*4882a593Smuzhiyun 	"gpio71",
705*4882a593Smuzhiyun };
706*4882a593Smuzhiyun static const char * const btfm_slimbus_groups[] = {
707*4882a593Smuzhiyun 	"gpio73", "gpio74",
708*4882a593Smuzhiyun };
709*4882a593Smuzhiyun static const char * const atest_usb2_groups[] = {
710*4882a593Smuzhiyun 	"gpio73",
711*4882a593Smuzhiyun };
712*4882a593Smuzhiyun static const char * const ter_mi2s_groups[] = {
713*4882a593Smuzhiyun 	"gpio74", "gpio75", "gpio76", "gpio77", "gpio78",
714*4882a593Smuzhiyun };
715*4882a593Smuzhiyun static const char * const atest_usb23_groups[] = {
716*4882a593Smuzhiyun 	"gpio74",
717*4882a593Smuzhiyun };
718*4882a593Smuzhiyun static const char * const atest_usb22_groups[] = {
719*4882a593Smuzhiyun 	"gpio75",
720*4882a593Smuzhiyun };
721*4882a593Smuzhiyun static const char * const atest_usb21_groups[] = {
722*4882a593Smuzhiyun 	"gpio76",
723*4882a593Smuzhiyun };
724*4882a593Smuzhiyun static const char * const atest_usb20_groups[] = {
725*4882a593Smuzhiyun 	"gpio77",
726*4882a593Smuzhiyun };
727*4882a593Smuzhiyun static const char * const sec_mi2s_groups[] = {
728*4882a593Smuzhiyun 	"gpio79", "gpio80", "gpio81", "gpio82", "gpio83",
729*4882a593Smuzhiyun };
730*4882a593Smuzhiyun static const char * const qup15_groups[] = {
731*4882a593Smuzhiyun 	"gpio81", "gpio82", "gpio83", "gpio84",
732*4882a593Smuzhiyun };
733*4882a593Smuzhiyun static const char * const qup5_groups[] = {
734*4882a593Smuzhiyun 	"gpio85", "gpio86", "gpio87", "gpio88",
735*4882a593Smuzhiyun };
736*4882a593Smuzhiyun static const char * const tsif1_clk_groups[] = {
737*4882a593Smuzhiyun 	"gpio89",
738*4882a593Smuzhiyun };
739*4882a593Smuzhiyun static const char * const qup4_groups[] = {
740*4882a593Smuzhiyun 	"gpio89", "gpio90", "gpio91", "gpio92",
741*4882a593Smuzhiyun };
742*4882a593Smuzhiyun static const char * const qspi_cs_groups[] = {
743*4882a593Smuzhiyun 	"gpio89", "gpio90",
744*4882a593Smuzhiyun };
745*4882a593Smuzhiyun static const char * const tgu_ch3_groups[] = {
746*4882a593Smuzhiyun 	"gpio89",
747*4882a593Smuzhiyun };
748*4882a593Smuzhiyun static const char * const tsif1_en_groups[] = {
749*4882a593Smuzhiyun 	"gpio90",
750*4882a593Smuzhiyun };
751*4882a593Smuzhiyun static const char * const mdp_vsync0_groups[] = {
752*4882a593Smuzhiyun 	"gpio90",
753*4882a593Smuzhiyun };
754*4882a593Smuzhiyun static const char * const mdp_vsync1_groups[] = {
755*4882a593Smuzhiyun 	"gpio90",
756*4882a593Smuzhiyun };
757*4882a593Smuzhiyun static const char * const mdp_vsync2_groups[] = {
758*4882a593Smuzhiyun 	"gpio90",
759*4882a593Smuzhiyun };
760*4882a593Smuzhiyun static const char * const mdp_vsync3_groups[] = {
761*4882a593Smuzhiyun 	"gpio90",
762*4882a593Smuzhiyun };
763*4882a593Smuzhiyun static const char * const tgu_ch0_groups[] = {
764*4882a593Smuzhiyun 	"gpio90",
765*4882a593Smuzhiyun };
766*4882a593Smuzhiyun static const char * const tsif1_data_groups[] = {
767*4882a593Smuzhiyun 	"gpio91",
768*4882a593Smuzhiyun };
769*4882a593Smuzhiyun static const char * const sdc4_cmd_groups[] = {
770*4882a593Smuzhiyun 	"gpio91",
771*4882a593Smuzhiyun };
772*4882a593Smuzhiyun static const char * const qspi_data_groups[] = {
773*4882a593Smuzhiyun 	"gpio91", "gpio92", "gpio93", "gpio94",
774*4882a593Smuzhiyun };
775*4882a593Smuzhiyun static const char * const tgu_ch1_groups[] = {
776*4882a593Smuzhiyun 	"gpio91",
777*4882a593Smuzhiyun };
778*4882a593Smuzhiyun static const char * const tsif2_error_groups[] = {
779*4882a593Smuzhiyun 	"gpio92",
780*4882a593Smuzhiyun };
781*4882a593Smuzhiyun static const char * const sdc4_data_groups[] = {
782*4882a593Smuzhiyun 	"gpio92",
783*4882a593Smuzhiyun 	"gpio94",
784*4882a593Smuzhiyun 	"gpio95",
785*4882a593Smuzhiyun 	"gpio96",
786*4882a593Smuzhiyun };
787*4882a593Smuzhiyun static const char * const vfr_1_groups[] = {
788*4882a593Smuzhiyun 	"gpio92",
789*4882a593Smuzhiyun };
790*4882a593Smuzhiyun static const char * const tgu_ch2_groups[] = {
791*4882a593Smuzhiyun 	"gpio92",
792*4882a593Smuzhiyun };
793*4882a593Smuzhiyun static const char * const tsif2_clk_groups[] = {
794*4882a593Smuzhiyun 	"gpio93",
795*4882a593Smuzhiyun };
796*4882a593Smuzhiyun static const char * const sdc4_clk_groups[] = {
797*4882a593Smuzhiyun 	"gpio93",
798*4882a593Smuzhiyun };
799*4882a593Smuzhiyun static const char * const qup7_groups[] = {
800*4882a593Smuzhiyun 	"gpio93", "gpio94", "gpio95", "gpio96",
801*4882a593Smuzhiyun };
802*4882a593Smuzhiyun static const char * const tsif2_en_groups[] = {
803*4882a593Smuzhiyun 	"gpio94",
804*4882a593Smuzhiyun };
805*4882a593Smuzhiyun static const char * const tsif2_data_groups[] = {
806*4882a593Smuzhiyun 	"gpio95",
807*4882a593Smuzhiyun };
808*4882a593Smuzhiyun static const char * const qspi_clk_groups[] = {
809*4882a593Smuzhiyun 	"gpio95",
810*4882a593Smuzhiyun };
811*4882a593Smuzhiyun static const char * const tsif2_sync_groups[] = {
812*4882a593Smuzhiyun 	"gpio96",
813*4882a593Smuzhiyun };
814*4882a593Smuzhiyun static const char * const ldo_en_groups[] = {
815*4882a593Smuzhiyun 	"gpio97",
816*4882a593Smuzhiyun };
817*4882a593Smuzhiyun static const char * const ldo_update_groups[] = {
818*4882a593Smuzhiyun 	"gpio98",
819*4882a593Smuzhiyun };
820*4882a593Smuzhiyun static const char * const pci_e1_groups[] = {
821*4882a593Smuzhiyun 	"gpio102", "gpio103",
822*4882a593Smuzhiyun };
823*4882a593Smuzhiyun static const char * const prng_rosc_groups[] = {
824*4882a593Smuzhiyun 	"gpio102",
825*4882a593Smuzhiyun };
826*4882a593Smuzhiyun static const char * const uim2_data_groups[] = {
827*4882a593Smuzhiyun 	"gpio105",
828*4882a593Smuzhiyun };
829*4882a593Smuzhiyun static const char * const qup13_groups[] = {
830*4882a593Smuzhiyun 	"gpio105", "gpio106", "gpio107", "gpio108",
831*4882a593Smuzhiyun };
832*4882a593Smuzhiyun static const char * const uim2_clk_groups[] = {
833*4882a593Smuzhiyun 	"gpio106",
834*4882a593Smuzhiyun };
835*4882a593Smuzhiyun static const char * const uim2_reset_groups[] = {
836*4882a593Smuzhiyun 	"gpio107",
837*4882a593Smuzhiyun };
838*4882a593Smuzhiyun static const char * const uim2_present_groups[] = {
839*4882a593Smuzhiyun 	"gpio108",
840*4882a593Smuzhiyun };
841*4882a593Smuzhiyun static const char * const uim1_data_groups[] = {
842*4882a593Smuzhiyun 	"gpio109",
843*4882a593Smuzhiyun };
844*4882a593Smuzhiyun static const char * const uim1_clk_groups[] = {
845*4882a593Smuzhiyun 	"gpio110",
846*4882a593Smuzhiyun };
847*4882a593Smuzhiyun static const char * const uim1_reset_groups[] = {
848*4882a593Smuzhiyun 	"gpio111",
849*4882a593Smuzhiyun };
850*4882a593Smuzhiyun static const char * const uim1_present_groups[] = {
851*4882a593Smuzhiyun 	"gpio112",
852*4882a593Smuzhiyun };
853*4882a593Smuzhiyun static const char * const uim_batt_groups[] = {
854*4882a593Smuzhiyun 	"gpio113",
855*4882a593Smuzhiyun };
856*4882a593Smuzhiyun static const char * const edp_hot_groups[] = {
857*4882a593Smuzhiyun 	"gpio113",
858*4882a593Smuzhiyun };
859*4882a593Smuzhiyun static const char * const nav_pps_groups[] = {
860*4882a593Smuzhiyun 	"gpio114", "gpio114", "gpio115", "gpio115", "gpio128", "gpio128",
861*4882a593Smuzhiyun 	"gpio129", "gpio129", "gpio143", "gpio143",
862*4882a593Smuzhiyun };
863*4882a593Smuzhiyun static const char * const atest_char_groups[] = {
864*4882a593Smuzhiyun 	"gpio117", "gpio118", "gpio119", "gpio120", "gpio121",
865*4882a593Smuzhiyun };
866*4882a593Smuzhiyun static const char * const adsp_ext_groups[] = {
867*4882a593Smuzhiyun 	"gpio118",
868*4882a593Smuzhiyun };
869*4882a593Smuzhiyun static const char * const qlink_request_groups[] = {
870*4882a593Smuzhiyun 	"gpio130",
871*4882a593Smuzhiyun };
872*4882a593Smuzhiyun static const char * const qlink_enable_groups[] = {
873*4882a593Smuzhiyun 	"gpio131",
874*4882a593Smuzhiyun };
875*4882a593Smuzhiyun static const char * const pa_indicator_groups[] = {
876*4882a593Smuzhiyun 	"gpio135",
877*4882a593Smuzhiyun };
878*4882a593Smuzhiyun static const char * const mss_lte_groups[] = {
879*4882a593Smuzhiyun 	"gpio144", "gpio145",
880*4882a593Smuzhiyun };
881*4882a593Smuzhiyun static const char * const qup0_groups[] = {
882*4882a593Smuzhiyun 	"gpio0", "gpio1", "gpio2", "gpio3",
883*4882a593Smuzhiyun };
884*4882a593Smuzhiyun static const char * const gpio_groups[] = {
885*4882a593Smuzhiyun 	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
886*4882a593Smuzhiyun 	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
887*4882a593Smuzhiyun 	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
888*4882a593Smuzhiyun 	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
889*4882a593Smuzhiyun 	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
890*4882a593Smuzhiyun 	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
891*4882a593Smuzhiyun 	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
892*4882a593Smuzhiyun 	"gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
893*4882a593Smuzhiyun 	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
894*4882a593Smuzhiyun 	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
895*4882a593Smuzhiyun 	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
896*4882a593Smuzhiyun 	"gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
897*4882a593Smuzhiyun 	"gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
898*4882a593Smuzhiyun 	"gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
899*4882a593Smuzhiyun 	"gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
900*4882a593Smuzhiyun 	"gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
901*4882a593Smuzhiyun 	"gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
902*4882a593Smuzhiyun 	"gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
903*4882a593Smuzhiyun 	"gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
904*4882a593Smuzhiyun 	"gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
905*4882a593Smuzhiyun 	"gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
906*4882a593Smuzhiyun 	"gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
907*4882a593Smuzhiyun 	"gpio147", "gpio148", "gpio149",
908*4882a593Smuzhiyun };
909*4882a593Smuzhiyun static const char * const qup9_groups[] = {
910*4882a593Smuzhiyun 	"gpio4", "gpio5", "gpio6", "gpio7",
911*4882a593Smuzhiyun };
912*4882a593Smuzhiyun static const char * const qdss_cti_groups[] = {
913*4882a593Smuzhiyun 	"gpio4", "gpio5", "gpio51", "gpio52", "gpio62", "gpio63", "gpio90",
914*4882a593Smuzhiyun 	"gpio91",
915*4882a593Smuzhiyun };
916*4882a593Smuzhiyun static const char * const ddr_pxi0_groups[] = {
917*4882a593Smuzhiyun 	"gpio6", "gpio7",
918*4882a593Smuzhiyun };
919*4882a593Smuzhiyun static const char * const ddr_bist_groups[] = {
920*4882a593Smuzhiyun 	"gpio7", "gpio8", "gpio9", "gpio10",
921*4882a593Smuzhiyun };
922*4882a593Smuzhiyun static const char * const atest_tsens2_groups[] = {
923*4882a593Smuzhiyun 	"gpio7",
924*4882a593Smuzhiyun };
925*4882a593Smuzhiyun static const char * const vsense_trigger_groups[] = {
926*4882a593Smuzhiyun 	"gpio7",
927*4882a593Smuzhiyun };
928*4882a593Smuzhiyun static const char * const atest_usb1_groups[] = {
929*4882a593Smuzhiyun 	"gpio7",
930*4882a593Smuzhiyun };
931*4882a593Smuzhiyun static const char * const qup_l4_groups[] = {
932*4882a593Smuzhiyun 	"gpio8", "gpio35", "gpio105", "gpio123",
933*4882a593Smuzhiyun };
934*4882a593Smuzhiyun static const char * const wlan1_adc1_groups[] = {
935*4882a593Smuzhiyun 	"gpio8",
936*4882a593Smuzhiyun };
937*4882a593Smuzhiyun static const char * const atest_usb13_groups[] = {
938*4882a593Smuzhiyun 	"gpio8",
939*4882a593Smuzhiyun };
940*4882a593Smuzhiyun static const char * const ddr_pxi1_groups[] = {
941*4882a593Smuzhiyun 	"gpio8", "gpio9",
942*4882a593Smuzhiyun };
943*4882a593Smuzhiyun static const char * const qup_l5_groups[] = {
944*4882a593Smuzhiyun 	"gpio9", "gpio36", "gpio106", "gpio124",
945*4882a593Smuzhiyun };
946*4882a593Smuzhiyun static const char * const wlan1_adc0_groups[] = {
947*4882a593Smuzhiyun 	"gpio9",
948*4882a593Smuzhiyun };
949*4882a593Smuzhiyun static const char * const atest_usb12_groups[] = {
950*4882a593Smuzhiyun 	"gpio9",
951*4882a593Smuzhiyun };
952*4882a593Smuzhiyun static const char * const mdp_vsync_groups[] = {
953*4882a593Smuzhiyun 	"gpio10", "gpio11", "gpio12", "gpio97", "gpio98",
954*4882a593Smuzhiyun };
955*4882a593Smuzhiyun static const char * const qup_l6_groups[] = {
956*4882a593Smuzhiyun 	"gpio10", "gpio37", "gpio107", "gpio125",
957*4882a593Smuzhiyun };
958*4882a593Smuzhiyun static const char * const wlan2_adc1_groups[] = {
959*4882a593Smuzhiyun 	"gpio10",
960*4882a593Smuzhiyun };
961*4882a593Smuzhiyun static const char * const atest_usb11_groups[] = {
962*4882a593Smuzhiyun 	"gpio10",
963*4882a593Smuzhiyun };
964*4882a593Smuzhiyun static const char * const ddr_pxi2_groups[] = {
965*4882a593Smuzhiyun 	"gpio10", "gpio11",
966*4882a593Smuzhiyun };
967*4882a593Smuzhiyun static const char * const edp_lcd_groups[] = {
968*4882a593Smuzhiyun 	"gpio11",
969*4882a593Smuzhiyun };
970*4882a593Smuzhiyun static const char * const dbg_out_groups[] = {
971*4882a593Smuzhiyun 	"gpio11",
972*4882a593Smuzhiyun };
973*4882a593Smuzhiyun static const char * const wlan2_adc0_groups[] = {
974*4882a593Smuzhiyun 	"gpio11",
975*4882a593Smuzhiyun };
976*4882a593Smuzhiyun static const char * const atest_usb10_groups[] = {
977*4882a593Smuzhiyun 	"gpio11",
978*4882a593Smuzhiyun };
979*4882a593Smuzhiyun static const char * const m_voc_groups[] = {
980*4882a593Smuzhiyun 	"gpio12",
981*4882a593Smuzhiyun };
982*4882a593Smuzhiyun static const char * const tsif1_sync_groups[] = {
983*4882a593Smuzhiyun 	"gpio12",
984*4882a593Smuzhiyun };
985*4882a593Smuzhiyun 
986*4882a593Smuzhiyun static const struct msm_function sdm845_functions[] = {
987*4882a593Smuzhiyun 	FUNCTION(gpio),
988*4882a593Smuzhiyun 	FUNCTION(adsp_ext),
989*4882a593Smuzhiyun 	FUNCTION(agera_pll),
990*4882a593Smuzhiyun 	FUNCTION(atest_char),
991*4882a593Smuzhiyun 	FUNCTION(atest_tsens),
992*4882a593Smuzhiyun 	FUNCTION(atest_tsens2),
993*4882a593Smuzhiyun 	FUNCTION(atest_usb1),
994*4882a593Smuzhiyun 	FUNCTION(atest_usb10),
995*4882a593Smuzhiyun 	FUNCTION(atest_usb11),
996*4882a593Smuzhiyun 	FUNCTION(atest_usb12),
997*4882a593Smuzhiyun 	FUNCTION(atest_usb13),
998*4882a593Smuzhiyun 	FUNCTION(atest_usb2),
999*4882a593Smuzhiyun 	FUNCTION(atest_usb20),
1000*4882a593Smuzhiyun 	FUNCTION(atest_usb21),
1001*4882a593Smuzhiyun 	FUNCTION(atest_usb22),
1002*4882a593Smuzhiyun 	FUNCTION(atest_usb23),
1003*4882a593Smuzhiyun 	FUNCTION(audio_ref),
1004*4882a593Smuzhiyun 	FUNCTION(btfm_slimbus),
1005*4882a593Smuzhiyun 	FUNCTION(cam_mclk),
1006*4882a593Smuzhiyun 	FUNCTION(cci_async),
1007*4882a593Smuzhiyun 	FUNCTION(cci_i2c),
1008*4882a593Smuzhiyun 	FUNCTION(cci_timer0),
1009*4882a593Smuzhiyun 	FUNCTION(cci_timer1),
1010*4882a593Smuzhiyun 	FUNCTION(cci_timer2),
1011*4882a593Smuzhiyun 	FUNCTION(cci_timer3),
1012*4882a593Smuzhiyun 	FUNCTION(cci_timer4),
1013*4882a593Smuzhiyun 	FUNCTION(cri_trng),
1014*4882a593Smuzhiyun 	FUNCTION(cri_trng0),
1015*4882a593Smuzhiyun 	FUNCTION(cri_trng1),
1016*4882a593Smuzhiyun 	FUNCTION(dbg_out),
1017*4882a593Smuzhiyun 	FUNCTION(ddr_bist),
1018*4882a593Smuzhiyun 	FUNCTION(ddr_pxi0),
1019*4882a593Smuzhiyun 	FUNCTION(ddr_pxi1),
1020*4882a593Smuzhiyun 	FUNCTION(ddr_pxi2),
1021*4882a593Smuzhiyun 	FUNCTION(ddr_pxi3),
1022*4882a593Smuzhiyun 	FUNCTION(edp_hot),
1023*4882a593Smuzhiyun 	FUNCTION(edp_lcd),
1024*4882a593Smuzhiyun 	FUNCTION(gcc_gp1),
1025*4882a593Smuzhiyun 	FUNCTION(gcc_gp2),
1026*4882a593Smuzhiyun 	FUNCTION(gcc_gp3),
1027*4882a593Smuzhiyun 	FUNCTION(jitter_bist),
1028*4882a593Smuzhiyun 	FUNCTION(ldo_en),
1029*4882a593Smuzhiyun 	FUNCTION(ldo_update),
1030*4882a593Smuzhiyun 	FUNCTION(lpass_slimbus),
1031*4882a593Smuzhiyun 	FUNCTION(m_voc),
1032*4882a593Smuzhiyun 	FUNCTION(mdp_vsync),
1033*4882a593Smuzhiyun 	FUNCTION(mdp_vsync0),
1034*4882a593Smuzhiyun 	FUNCTION(mdp_vsync1),
1035*4882a593Smuzhiyun 	FUNCTION(mdp_vsync2),
1036*4882a593Smuzhiyun 	FUNCTION(mdp_vsync3),
1037*4882a593Smuzhiyun 	FUNCTION(mss_lte),
1038*4882a593Smuzhiyun 	FUNCTION(nav_pps),
1039*4882a593Smuzhiyun 	FUNCTION(pa_indicator),
1040*4882a593Smuzhiyun 	FUNCTION(pci_e0),
1041*4882a593Smuzhiyun 	FUNCTION(pci_e1),
1042*4882a593Smuzhiyun 	FUNCTION(phase_flag),
1043*4882a593Smuzhiyun 	FUNCTION(pll_bist),
1044*4882a593Smuzhiyun 	FUNCTION(pll_bypassnl),
1045*4882a593Smuzhiyun 	FUNCTION(pll_reset),
1046*4882a593Smuzhiyun 	FUNCTION(pri_mi2s),
1047*4882a593Smuzhiyun 	FUNCTION(pri_mi2s_ws),
1048*4882a593Smuzhiyun 	FUNCTION(prng_rosc),
1049*4882a593Smuzhiyun 	FUNCTION(qdss_cti),
1050*4882a593Smuzhiyun 	FUNCTION(qdss),
1051*4882a593Smuzhiyun 	FUNCTION(qlink_enable),
1052*4882a593Smuzhiyun 	FUNCTION(qlink_request),
1053*4882a593Smuzhiyun 	FUNCTION(qspi_clk),
1054*4882a593Smuzhiyun 	FUNCTION(qspi_cs),
1055*4882a593Smuzhiyun 	FUNCTION(qspi_data),
1056*4882a593Smuzhiyun 	FUNCTION(qua_mi2s),
1057*4882a593Smuzhiyun 	FUNCTION(qup0),
1058*4882a593Smuzhiyun 	FUNCTION(qup1),
1059*4882a593Smuzhiyun 	FUNCTION(qup10),
1060*4882a593Smuzhiyun 	FUNCTION(qup11),
1061*4882a593Smuzhiyun 	FUNCTION(qup12),
1062*4882a593Smuzhiyun 	FUNCTION(qup13),
1063*4882a593Smuzhiyun 	FUNCTION(qup14),
1064*4882a593Smuzhiyun 	FUNCTION(qup15),
1065*4882a593Smuzhiyun 	FUNCTION(qup2),
1066*4882a593Smuzhiyun 	FUNCTION(qup3),
1067*4882a593Smuzhiyun 	FUNCTION(qup4),
1068*4882a593Smuzhiyun 	FUNCTION(qup5),
1069*4882a593Smuzhiyun 	FUNCTION(qup6),
1070*4882a593Smuzhiyun 	FUNCTION(qup7),
1071*4882a593Smuzhiyun 	FUNCTION(qup8),
1072*4882a593Smuzhiyun 	FUNCTION(qup9),
1073*4882a593Smuzhiyun 	FUNCTION(qup_l4),
1074*4882a593Smuzhiyun 	FUNCTION(qup_l5),
1075*4882a593Smuzhiyun 	FUNCTION(qup_l6),
1076*4882a593Smuzhiyun 	FUNCTION(sd_write),
1077*4882a593Smuzhiyun 	FUNCTION(sdc4_clk),
1078*4882a593Smuzhiyun 	FUNCTION(sdc4_cmd),
1079*4882a593Smuzhiyun 	FUNCTION(sdc4_data),
1080*4882a593Smuzhiyun 	FUNCTION(sec_mi2s),
1081*4882a593Smuzhiyun 	FUNCTION(sp_cmu),
1082*4882a593Smuzhiyun 	FUNCTION(spkr_i2s),
1083*4882a593Smuzhiyun 	FUNCTION(ter_mi2s),
1084*4882a593Smuzhiyun 	FUNCTION(tgu_ch0),
1085*4882a593Smuzhiyun 	FUNCTION(tgu_ch1),
1086*4882a593Smuzhiyun 	FUNCTION(tgu_ch2),
1087*4882a593Smuzhiyun 	FUNCTION(tgu_ch3),
1088*4882a593Smuzhiyun 	FUNCTION(tsense_pwm1),
1089*4882a593Smuzhiyun 	FUNCTION(tsense_pwm2),
1090*4882a593Smuzhiyun 	FUNCTION(tsif1_clk),
1091*4882a593Smuzhiyun 	FUNCTION(tsif1_data),
1092*4882a593Smuzhiyun 	FUNCTION(tsif1_en),
1093*4882a593Smuzhiyun 	FUNCTION(tsif1_error),
1094*4882a593Smuzhiyun 	FUNCTION(tsif1_sync),
1095*4882a593Smuzhiyun 	FUNCTION(tsif2_clk),
1096*4882a593Smuzhiyun 	FUNCTION(tsif2_data),
1097*4882a593Smuzhiyun 	FUNCTION(tsif2_en),
1098*4882a593Smuzhiyun 	FUNCTION(tsif2_error),
1099*4882a593Smuzhiyun 	FUNCTION(tsif2_sync),
1100*4882a593Smuzhiyun 	FUNCTION(uim1_clk),
1101*4882a593Smuzhiyun 	FUNCTION(uim1_data),
1102*4882a593Smuzhiyun 	FUNCTION(uim1_present),
1103*4882a593Smuzhiyun 	FUNCTION(uim1_reset),
1104*4882a593Smuzhiyun 	FUNCTION(uim2_clk),
1105*4882a593Smuzhiyun 	FUNCTION(uim2_data),
1106*4882a593Smuzhiyun 	FUNCTION(uim2_present),
1107*4882a593Smuzhiyun 	FUNCTION(uim2_reset),
1108*4882a593Smuzhiyun 	FUNCTION(uim_batt),
1109*4882a593Smuzhiyun 	FUNCTION(usb_phy),
1110*4882a593Smuzhiyun 	FUNCTION(vfr_1),
1111*4882a593Smuzhiyun 	FUNCTION(vsense_trigger),
1112*4882a593Smuzhiyun 	FUNCTION(wlan1_adc0),
1113*4882a593Smuzhiyun 	FUNCTION(wlan1_adc1),
1114*4882a593Smuzhiyun 	FUNCTION(wlan2_adc0),
1115*4882a593Smuzhiyun 	FUNCTION(wlan2_adc1),
1116*4882a593Smuzhiyun };
1117*4882a593Smuzhiyun 
1118*4882a593Smuzhiyun /* Every pin is maintained as a single group, and missing or non-existing pin
1119*4882a593Smuzhiyun  * would be maintained as dummy group to synchronize pin group index with
1120*4882a593Smuzhiyun  * pin descriptor registered with pinctrl core.
1121*4882a593Smuzhiyun  * Clients would not be able to request these dummy pin groups.
1122*4882a593Smuzhiyun  */
1123*4882a593Smuzhiyun static const struct msm_pingroup sdm845_groups[] = {
1124*4882a593Smuzhiyun 	PINGROUP(0, EAST, qup0, _, _, _, _, _, _, _, _, _),
1125*4882a593Smuzhiyun 	PINGROUP(1, EAST, qup0, _, _, _, _, _, _, _, _, _),
1126*4882a593Smuzhiyun 	PINGROUP(2, EAST, qup0, _, _, _, _, _, _, _, _, _),
1127*4882a593Smuzhiyun 	PINGROUP(3, EAST, qup0, _, _, _, _, _, _, _, _, _),
1128*4882a593Smuzhiyun 	PINGROUP(4, NORTH, qup9, qdss_cti, _, _, _, _, _, _, _, _),
1129*4882a593Smuzhiyun 	PINGROUP(5, NORTH, qup9, qdss_cti, _, _, _, _, _, _, _, _),
1130*4882a593Smuzhiyun 	PINGROUP(6, NORTH, qup9, _, ddr_pxi0, _, _, _, _, _, _, _),
1131*4882a593Smuzhiyun 	PINGROUP(7, NORTH, qup9, ddr_bist, _, atest_tsens2, vsense_trigger, atest_usb1, ddr_pxi0, _, _, _),
1132*4882a593Smuzhiyun 	PINGROUP(8, EAST, qup_l4, _, ddr_bist, _, _, wlan1_adc1, atest_usb13, ddr_pxi1, _, _),
1133*4882a593Smuzhiyun 	PINGROUP(9, EAST, qup_l5, ddr_bist, _, wlan1_adc0, atest_usb12, ddr_pxi1, _, _, _, _),
1134*4882a593Smuzhiyun 	PINGROUP(10, EAST, mdp_vsync, qup_l6, ddr_bist, wlan2_adc1, atest_usb11, ddr_pxi2, _, _, _, _),
1135*4882a593Smuzhiyun 	PINGROUP(11, EAST, mdp_vsync, edp_lcd, dbg_out, wlan2_adc0, atest_usb10, ddr_pxi2, _, _, _, _),
1136*4882a593Smuzhiyun 	PINGROUP(12, SOUTH, mdp_vsync, m_voc, tsif1_sync, ddr_pxi3, _, _, _, _, _, _),
1137*4882a593Smuzhiyun 	PINGROUP(13, SOUTH, cam_mclk, pll_bypassnl, qdss, ddr_pxi3, _, _, _, _, _, _),
1138*4882a593Smuzhiyun 	PINGROUP(14, SOUTH, cam_mclk, pll_reset, qdss, _, _, _, _, _, _, _),
1139*4882a593Smuzhiyun 	PINGROUP(15, SOUTH, cam_mclk, qdss, _, _, _, _, _, _, _, _),
1140*4882a593Smuzhiyun 	PINGROUP(16, SOUTH, cam_mclk, qdss, _, _, _, _, _, _, _, _),
1141*4882a593Smuzhiyun 	PINGROUP(17, SOUTH, cci_i2c, qup1, qdss, _, _, _, _, _, _, _),
1142*4882a593Smuzhiyun 	PINGROUP(18, SOUTH, cci_i2c, qup1, _, qdss, _, _, _, _, _, _),
1143*4882a593Smuzhiyun 	PINGROUP(19, SOUTH, cci_i2c, qup1, _, qdss, _, _, _, _, _, _),
1144*4882a593Smuzhiyun 	PINGROUP(20, SOUTH, cci_i2c, qup1, _, qdss, _, _, _, _, _, _),
1145*4882a593Smuzhiyun 	PINGROUP(21, SOUTH, cci_timer0, gcc_gp2, qdss, _, _, _, _, _, _, _),
1146*4882a593Smuzhiyun 	PINGROUP(22, SOUTH, cci_timer1, gcc_gp3, qdss, _, _, _, _, _, _, _),
1147*4882a593Smuzhiyun 	PINGROUP(23, SOUTH, cci_timer2, qdss, _, _, _, _, _, _, _, _),
1148*4882a593Smuzhiyun 	PINGROUP(24, SOUTH, cci_timer3, cci_async, qdss, _, _, _, _, _, _, _),
1149*4882a593Smuzhiyun 	PINGROUP(25, SOUTH, cci_timer4, cci_async, qdss, _, _, _, _, _, _, _),
1150*4882a593Smuzhiyun 	PINGROUP(26, SOUTH, cci_async, qdss, _, _, _, _, _, _, _, _),
1151*4882a593Smuzhiyun 	PINGROUP(27, EAST, qup2, qdss, _, _, _, _, _, _, _, _),
1152*4882a593Smuzhiyun 	PINGROUP(28, EAST, qup2, qdss, _, _, _, _, _, _, _, _),
1153*4882a593Smuzhiyun 	PINGROUP(29, EAST, qup2, _, phase_flag, qdss, _, _, _, _, _, _),
1154*4882a593Smuzhiyun 	PINGROUP(30, EAST, qup2, phase_flag, qdss, _, _, _, _, _, _, _),
1155*4882a593Smuzhiyun 	PINGROUP(31, NORTH, qup11, qup14, _, _, _, _, _, _, _, _),
1156*4882a593Smuzhiyun 	PINGROUP(32, NORTH, qup11, qup14, _, _, _, _, _, _, _, _),
1157*4882a593Smuzhiyun 	PINGROUP(33, NORTH, qup11, qup14, _, _, _, _, _, _, _, _),
1158*4882a593Smuzhiyun 	PINGROUP(34, NORTH, qup11, qup14, _, _, _, _, _, _, _, _),
1159*4882a593Smuzhiyun 	PINGROUP(35, SOUTH, pci_e0, qup_l4, jitter_bist, _, _, _, _, _, _, _),
1160*4882a593Smuzhiyun 	PINGROUP(36, SOUTH, pci_e0, qup_l5, pll_bist, _, atest_tsens, _, _, _, _, _),
1161*4882a593Smuzhiyun 	PINGROUP(37, SOUTH, qup_l6, agera_pll, _, _, _, _, _, _, _, _),
1162*4882a593Smuzhiyun 	PINGROUP(38, NORTH, usb_phy, _, _, _, _, _, _, _, _, _),
1163*4882a593Smuzhiyun 	PINGROUP(39, EAST, lpass_slimbus, _, _, _, _, _, _, _, _, _),
1164*4882a593Smuzhiyun 	PINGROUP(40, SOUTH, sd_write, tsif1_error, _, _, _, _, _, _, _, _),
1165*4882a593Smuzhiyun 	PINGROUP(41, EAST, qup3, _, qdss, _, _, _, _, _, _, _),
1166*4882a593Smuzhiyun 	PINGROUP(42, EAST, qup3, _, qdss, _, _, _, _, _, _, _),
1167*4882a593Smuzhiyun 	PINGROUP(43, EAST, qup3, _, qdss, _, _, _, _, _, _, _),
1168*4882a593Smuzhiyun 	PINGROUP(44, EAST, qup3, _, qdss, _, _, _, _, _, _, _),
1169*4882a593Smuzhiyun 	PINGROUP(45, EAST, qup6, _, _, _, _, _, _, _, _, _),
1170*4882a593Smuzhiyun 	PINGROUP(46, EAST, qup6, _, _, _, _, _, _, _, _, _),
1171*4882a593Smuzhiyun 	PINGROUP(47, EAST, qup6, _, _, _, _, _, _, _, _, _),
1172*4882a593Smuzhiyun 	PINGROUP(48, EAST, qup6, _, _, _, _, _, _, _, _, _),
1173*4882a593Smuzhiyun 	PINGROUP(49, NORTH, qup12, _, _, _, _, _, _, _, _, _),
1174*4882a593Smuzhiyun 	PINGROUP(50, NORTH, qup12, _, _, _, _, _, _, _, _, _),
1175*4882a593Smuzhiyun 	PINGROUP(51, NORTH, qup12, qdss_cti, _, _, _, _, _, _, _, _),
1176*4882a593Smuzhiyun 	PINGROUP(52, NORTH, qup12, phase_flag, qdss_cti, _, _, _, _, _, _, _),
1177*4882a593Smuzhiyun 	PINGROUP(53, NORTH, qup10, phase_flag, _, _, _, _, _, _, _, _),
1178*4882a593Smuzhiyun 	PINGROUP(54, NORTH, qup10, _, phase_flag, _, _, _, _, _, _, _),
1179*4882a593Smuzhiyun 	PINGROUP(55, NORTH, qup10, phase_flag, _, _, _, _, _, _, _, _),
1180*4882a593Smuzhiyun 	PINGROUP(56, NORTH, qup10, phase_flag, _, _, _, _, _, _, _, _),
1181*4882a593Smuzhiyun 	PINGROUP(57, NORTH, qua_mi2s, gcc_gp1, phase_flag, _, _, _, _, _, _, _),
1182*4882a593Smuzhiyun 	PINGROUP(58, NORTH, qua_mi2s, gcc_gp2, phase_flag, _, _, _, _, _, _, _),
1183*4882a593Smuzhiyun 	PINGROUP(59, NORTH, qua_mi2s, gcc_gp3, phase_flag, _, _, _, _, _, _, _),
1184*4882a593Smuzhiyun 	PINGROUP(60, NORTH, qua_mi2s, cri_trng0, phase_flag, _, _, _, _, _, _, _),
1185*4882a593Smuzhiyun 	PINGROUP(61, NORTH, qua_mi2s, cri_trng1, phase_flag, _, _, _, _, _, _, _),
1186*4882a593Smuzhiyun 	PINGROUP(62, NORTH, qua_mi2s, cri_trng, phase_flag, qdss_cti, _, _, _, _, _, _),
1187*4882a593Smuzhiyun 	PINGROUP(63, NORTH, qua_mi2s, _, phase_flag, qdss_cti, _, _, _, _, _, _),
1188*4882a593Smuzhiyun 	PINGROUP(64, NORTH, pri_mi2s, sp_cmu, phase_flag, _, _, _, _, _, _, _),
1189*4882a593Smuzhiyun 	PINGROUP(65, NORTH, pri_mi2s, qup8, _, _, _, _, _, _, _, _),
1190*4882a593Smuzhiyun 	PINGROUP(66, NORTH, pri_mi2s_ws, qup8, _, _, _, _, _, _, _, _),
1191*4882a593Smuzhiyun 	PINGROUP(67, NORTH, pri_mi2s, qup8, _, _, _, _, _, _, _, _),
1192*4882a593Smuzhiyun 	PINGROUP(68, NORTH, pri_mi2s, qup8, _, _, _, _, _, _, _, _),
1193*4882a593Smuzhiyun 	PINGROUP(69, EAST, spkr_i2s, audio_ref, _, _, _, _, _, _, _, _),
1194*4882a593Smuzhiyun 	PINGROUP(70, EAST, lpass_slimbus, spkr_i2s, _, _, _, _, _, _, _, _),
1195*4882a593Smuzhiyun 	PINGROUP(71, EAST, lpass_slimbus, spkr_i2s, tsense_pwm1, tsense_pwm2, _, _, _, _, _, _),
1196*4882a593Smuzhiyun 	PINGROUP(72, EAST, lpass_slimbus, spkr_i2s, _, _, _, _, _, _, _, _),
1197*4882a593Smuzhiyun 	PINGROUP(73, EAST, btfm_slimbus, atest_usb2, _, _, _, _, _, _, _, _),
1198*4882a593Smuzhiyun 	PINGROUP(74, EAST, btfm_slimbus, ter_mi2s, phase_flag, atest_usb23, _, _, _, _, _, _),
1199*4882a593Smuzhiyun 	PINGROUP(75, EAST, ter_mi2s, phase_flag, qdss, atest_usb22, _, _, _, _, _, _),
1200*4882a593Smuzhiyun 	PINGROUP(76, EAST, ter_mi2s, phase_flag, qdss, atest_usb21, _, _, _, _, _, _),
1201*4882a593Smuzhiyun 	PINGROUP(77, EAST, ter_mi2s, phase_flag, qdss, atest_usb20, _, _, _, _, _, _),
1202*4882a593Smuzhiyun 	PINGROUP(78, EAST, ter_mi2s, gcc_gp1, _, _, _, _, _, _, _, _),
1203*4882a593Smuzhiyun 	PINGROUP(79, NORTH, sec_mi2s, _, _, qdss, _, _, _, _, _, _),
1204*4882a593Smuzhiyun 	PINGROUP(80, NORTH, sec_mi2s, _, qdss, _, _, _, _, _, _, _),
1205*4882a593Smuzhiyun 	PINGROUP(81, NORTH, sec_mi2s, qup15, _, _, _, _, _, _, _, _),
1206*4882a593Smuzhiyun 	PINGROUP(82, NORTH, sec_mi2s, qup15, _, _, _, _, _, _, _, _),
1207*4882a593Smuzhiyun 	PINGROUP(83, NORTH, sec_mi2s, qup15, _, _, _, _, _, _, _, _),
1208*4882a593Smuzhiyun 	PINGROUP(84, NORTH, qup15, _, _, _, _, _, _, _, _, _),
1209*4882a593Smuzhiyun 	PINGROUP(85, EAST, qup5, _, _, _, _, _, _, _, _, _),
1210*4882a593Smuzhiyun 	PINGROUP(86, EAST, qup5, _, _, _, _, _, _, _, _, _),
1211*4882a593Smuzhiyun 	PINGROUP(87, EAST, qup5, _, _, _, _, _, _, _, _, _),
1212*4882a593Smuzhiyun 	PINGROUP(88, EAST, qup5, _, _, _, _, _, _, _, _, _),
1213*4882a593Smuzhiyun 	PINGROUP(89, SOUTH, tsif1_clk, qup4, qspi_cs, tgu_ch3, phase_flag, _, _, _, _, _),
1214*4882a593Smuzhiyun 	PINGROUP(90, SOUTH, tsif1_en, mdp_vsync0, qup4, qspi_cs, mdp_vsync1,
1215*4882a593Smuzhiyun 			    mdp_vsync2, mdp_vsync3, tgu_ch0, phase_flag, qdss_cti),
1216*4882a593Smuzhiyun 	PINGROUP(91, SOUTH, tsif1_data, sdc4_cmd, qup4, qspi_data, tgu_ch1, _, qdss_cti, _, _, _),
1217*4882a593Smuzhiyun 	PINGROUP(92, SOUTH, tsif2_error, sdc4_data, qup4, qspi_data, vfr_1, tgu_ch2, _, _, _, _),
1218*4882a593Smuzhiyun 	PINGROUP(93, SOUTH, tsif2_clk, sdc4_clk, qup7, qspi_data, _, qdss, _, _, _, _),
1219*4882a593Smuzhiyun 	PINGROUP(94, SOUTH, tsif2_en, sdc4_data, qup7, qspi_data, _, _, _, _, _, _),
1220*4882a593Smuzhiyun 	PINGROUP(95, SOUTH, tsif2_data, sdc4_data, qup7, qspi_clk, _, _, _, _, _, _),
1221*4882a593Smuzhiyun 	PINGROUP(96, SOUTH, tsif2_sync, sdc4_data, qup7, phase_flag, _, _, _, _, _, _),
1222*4882a593Smuzhiyun 	PINGROUP(97, NORTH, _, _, mdp_vsync, ldo_en, _, _, _, _, _, _),
1223*4882a593Smuzhiyun 	PINGROUP(98, NORTH, _, mdp_vsync, ldo_update, _, _, _, _, _, _, _),
1224*4882a593Smuzhiyun 	PINGROUP(99, NORTH, phase_flag, _, _, _, _, _, _, _, _, _),
1225*4882a593Smuzhiyun 	PINGROUP(100, NORTH, phase_flag, _, _, _, _, _, _, _, _, _),
1226*4882a593Smuzhiyun 	PINGROUP(101, NORTH, _, _, _, _, _, _, _, _, _, _),
1227*4882a593Smuzhiyun 	PINGROUP(102, NORTH, pci_e1, prng_rosc, _, _, _, _, _, _, _, _),
1228*4882a593Smuzhiyun 	PINGROUP(103, NORTH, pci_e1, phase_flag, _, _, _, _, _, _, _, _),
1229*4882a593Smuzhiyun 	PINGROUP(104, NORTH, _, _, _, _, _, _, _, _, _, _),
1230*4882a593Smuzhiyun 	PINGROUP(105, NORTH, uim2_data, qup13, qup_l4, _, _, _, _, _, _, _),
1231*4882a593Smuzhiyun 	PINGROUP(106, NORTH, uim2_clk, qup13, qup_l5, _, _, _, _, _, _, _),
1232*4882a593Smuzhiyun 	PINGROUP(107, NORTH, uim2_reset, qup13, qup_l6, _, _, _, _, _, _, _),
1233*4882a593Smuzhiyun 	PINGROUP(108, NORTH, uim2_present, qup13, _, _, _, _, _, _, _, _),
1234*4882a593Smuzhiyun 	PINGROUP(109, NORTH, uim1_data, _, _, _, _, _, _, _, _, _),
1235*4882a593Smuzhiyun 	PINGROUP(110, NORTH, uim1_clk, _, _, _, _, _, _, _, _, _),
1236*4882a593Smuzhiyun 	PINGROUP(111, NORTH, uim1_reset, _, _, _, _, _, _, _, _, _),
1237*4882a593Smuzhiyun 	PINGROUP(112, NORTH, uim1_present, _, _, _, _, _, _, _, _, _),
1238*4882a593Smuzhiyun 	PINGROUP(113, NORTH, uim_batt, edp_hot, _, _, _, _, _, _, _, _),
1239*4882a593Smuzhiyun 	PINGROUP(114, NORTH, _, nav_pps, nav_pps, _, _, _, _, _, _, _),
1240*4882a593Smuzhiyun 	PINGROUP(115, NORTH, _, nav_pps, nav_pps, _, _, _, _, _, _, _),
1241*4882a593Smuzhiyun 	PINGROUP(116, NORTH, _, _, _, _, _, _, _, _, _, _),
1242*4882a593Smuzhiyun 	PINGROUP(117, NORTH, _, qdss, atest_char, _, _, _, _, _, _, _),
1243*4882a593Smuzhiyun 	PINGROUP(118, NORTH, adsp_ext, _, qdss, atest_char, _, _, _, _, _, _),
1244*4882a593Smuzhiyun 	PINGROUP(119, NORTH, _, qdss, atest_char, _, _, _, _, _, _, _),
1245*4882a593Smuzhiyun 	PINGROUP(120, NORTH, _, qdss, atest_char, _, _, _, _, _, _, _),
1246*4882a593Smuzhiyun 	PINGROUP(121, NORTH, _, qdss, atest_char, _, _, _, _, _, _, _),
1247*4882a593Smuzhiyun 	PINGROUP(122, EAST, _, qdss, _, _, _, _, _, _, _, _),
1248*4882a593Smuzhiyun 	PINGROUP(123, EAST, qup_l4, _, qdss, _, _, _, _, _, _, _),
1249*4882a593Smuzhiyun 	PINGROUP(124, EAST, qup_l5, _, qdss, _, _, _, _, _, _, _),
1250*4882a593Smuzhiyun 	PINGROUP(125, EAST, qup_l6, _, _, _, _, _, _, _, _, _),
1251*4882a593Smuzhiyun 	PINGROUP(126, EAST, _, _, _, _, _, _, _, _, _, _),
1252*4882a593Smuzhiyun 	PINGROUP(127, NORTH, _, _, _, _, _, _, _, _, _, _),
1253*4882a593Smuzhiyun 	PINGROUP(128, NORTH, nav_pps, nav_pps, _, _, _, _, _, _, _, _),
1254*4882a593Smuzhiyun 	PINGROUP(129, NORTH, nav_pps, nav_pps, _, _, _, _, _, _, _, _),
1255*4882a593Smuzhiyun 	PINGROUP(130, NORTH, qlink_request, _, _, _, _, _, _, _, _, _),
1256*4882a593Smuzhiyun 	PINGROUP(131, NORTH, qlink_enable, _, _, _, _, _, _, _, _, _),
1257*4882a593Smuzhiyun 	PINGROUP(132, NORTH, _, _, _, _, _, _, _, _, _, _),
1258*4882a593Smuzhiyun 	PINGROUP(133, NORTH, _, _, _, _, _, _, _, _, _, _),
1259*4882a593Smuzhiyun 	PINGROUP(134, NORTH, _, _, _, _, _, _, _, _, _, _),
1260*4882a593Smuzhiyun 	PINGROUP(135, NORTH, _, pa_indicator, _, _, _, _, _, _, _, _),
1261*4882a593Smuzhiyun 	PINGROUP(136, NORTH, _, _, _, _, _, _, _, _, _, _),
1262*4882a593Smuzhiyun 	PINGROUP(137, NORTH, _, _, phase_flag, _, _, _, _, _, _, _),
1263*4882a593Smuzhiyun 	PINGROUP(138, NORTH, _, _, phase_flag, _, _, _, _, _, _, _),
1264*4882a593Smuzhiyun 	PINGROUP(139, NORTH, _, phase_flag, _, _, _, _, _, _, _, _),
1265*4882a593Smuzhiyun 	PINGROUP(140, NORTH, _, _, phase_flag, _, _, _, _, _, _, _),
1266*4882a593Smuzhiyun 	PINGROUP(141, NORTH, _, phase_flag, _, _, _, _, _, _, _, _),
1267*4882a593Smuzhiyun 	PINGROUP(142, NORTH, _, phase_flag, _, _, _, _, _, _, _, _),
1268*4882a593Smuzhiyun 	PINGROUP(143, NORTH, _, nav_pps, nav_pps, _, phase_flag, _, _, _, _, _),
1269*4882a593Smuzhiyun 	PINGROUP(144, NORTH, mss_lte, _, _, _, _, _, _, _, _, _),
1270*4882a593Smuzhiyun 	PINGROUP(145, NORTH, mss_lte, _, _, _, _, _, _, _, _, _),
1271*4882a593Smuzhiyun 	PINGROUP(146, NORTH, _, _, _, _, _, _, _, _, _, _),
1272*4882a593Smuzhiyun 	PINGROUP(147, NORTH, _, _, _, _, _, _, _, _, _, _),
1273*4882a593Smuzhiyun 	PINGROUP(148, NORTH, _, _, _, _, _, _, _, _, _, _),
1274*4882a593Smuzhiyun 	PINGROUP(149, NORTH, _, _, _, _, _, _, _, _, _, _),
1275*4882a593Smuzhiyun 	UFS_RESET(ufs_reset, 0x99f000),
1276*4882a593Smuzhiyun 	SDC_QDSD_PINGROUP(sdc2_clk, 0x99a000, 14, 6),
1277*4882a593Smuzhiyun 	SDC_QDSD_PINGROUP(sdc2_cmd, 0x99a000, 11, 3),
1278*4882a593Smuzhiyun 	SDC_QDSD_PINGROUP(sdc2_data, 0x99a000, 9, 0),
1279*4882a593Smuzhiyun };
1280*4882a593Smuzhiyun 
1281*4882a593Smuzhiyun static const int sdm845_acpi_reserved_gpios[] = {
1282*4882a593Smuzhiyun 	0, 1, 2, 3, 81, 82, 83, 84, -1
1283*4882a593Smuzhiyun };
1284*4882a593Smuzhiyun 
1285*4882a593Smuzhiyun static const struct msm_gpio_wakeirq_map sdm845_pdc_map[] = {
1286*4882a593Smuzhiyun 	{ 1, 30 }, { 3, 31 }, { 5, 32 }, { 10, 33 }, { 11, 34 },
1287*4882a593Smuzhiyun 	{ 20, 35 }, { 22, 36 }, { 24, 37 }, { 26, 38 }, { 30, 39 },
1288*4882a593Smuzhiyun 	{ 31, 117 }, { 32, 41 }, { 34, 42 }, { 36, 43 }, { 37, 44 },
1289*4882a593Smuzhiyun 	{ 38, 45 }, { 39, 46 }, { 40, 47 }, { 41, 115 }, { 43, 49 },
1290*4882a593Smuzhiyun 	{ 44, 50 }, { 46, 51 }, { 48, 52 }, { 49, 118 }, { 52, 54 },
1291*4882a593Smuzhiyun 	{ 53, 55 }, { 54, 56 }, { 56, 57 }, { 57, 58 }, { 58, 59 },
1292*4882a593Smuzhiyun 	{ 59, 60 }, { 60, 61 }, { 61, 62 }, { 62, 63 }, { 63, 64 },
1293*4882a593Smuzhiyun 	{ 64, 65 }, { 66, 66 }, { 68, 67 }, { 71, 68 }, { 73, 69 },
1294*4882a593Smuzhiyun 	{ 77, 70 }, { 78, 71 }, { 79, 72 }, { 80, 73 }, { 84, 74 },
1295*4882a593Smuzhiyun 	{ 85, 75 }, { 86, 76 }, { 88, 77 }, { 89, 116 }, { 91, 79 },
1296*4882a593Smuzhiyun 	{ 92, 80 }, { 95, 81 }, { 96, 82 }, { 97, 83 }, { 101, 84 },
1297*4882a593Smuzhiyun 	{ 103, 85 }, { 104, 86 }, { 115, 90 }, { 116, 91 }, { 117, 92 },
1298*4882a593Smuzhiyun 	{ 118, 93 }, { 119, 94 }, { 120, 95 }, { 121, 96 }, { 122, 97 },
1299*4882a593Smuzhiyun 	{ 123, 98 }, { 124, 99 }, { 125, 100 }, { 127, 102 }, { 128, 103 },
1300*4882a593Smuzhiyun 	{ 129, 104 }, { 130, 105 }, { 132, 106 }, { 133, 107 }, { 145, 108 },
1301*4882a593Smuzhiyun };
1302*4882a593Smuzhiyun 
1303*4882a593Smuzhiyun static const struct msm_pinctrl_soc_data sdm845_pinctrl = {
1304*4882a593Smuzhiyun 	.pins = sdm845_pins,
1305*4882a593Smuzhiyun 	.npins = ARRAY_SIZE(sdm845_pins),
1306*4882a593Smuzhiyun 	.functions = sdm845_functions,
1307*4882a593Smuzhiyun 	.nfunctions = ARRAY_SIZE(sdm845_functions),
1308*4882a593Smuzhiyun 	.groups = sdm845_groups,
1309*4882a593Smuzhiyun 	.ngroups = ARRAY_SIZE(sdm845_groups),
1310*4882a593Smuzhiyun 	.ngpios = 151,
1311*4882a593Smuzhiyun 	.wakeirq_map = sdm845_pdc_map,
1312*4882a593Smuzhiyun 	.nwakeirq_map = ARRAY_SIZE(sdm845_pdc_map),
1313*4882a593Smuzhiyun 	.wakeirq_dual_edge_errata = true,
1314*4882a593Smuzhiyun };
1315*4882a593Smuzhiyun 
1316*4882a593Smuzhiyun static const struct msm_pinctrl_soc_data sdm845_acpi_pinctrl = {
1317*4882a593Smuzhiyun 	.pins = sdm845_pins,
1318*4882a593Smuzhiyun 	.npins = ARRAY_SIZE(sdm845_pins),
1319*4882a593Smuzhiyun 	.groups = sdm845_groups,
1320*4882a593Smuzhiyun 	.ngroups = ARRAY_SIZE(sdm845_groups),
1321*4882a593Smuzhiyun 	.reserved_gpios = sdm845_acpi_reserved_gpios,
1322*4882a593Smuzhiyun 	.ngpios = 150,
1323*4882a593Smuzhiyun };
1324*4882a593Smuzhiyun 
sdm845_pinctrl_probe(struct platform_device * pdev)1325*4882a593Smuzhiyun static int sdm845_pinctrl_probe(struct platform_device *pdev)
1326*4882a593Smuzhiyun {
1327*4882a593Smuzhiyun 	int ret;
1328*4882a593Smuzhiyun 
1329*4882a593Smuzhiyun 	if (pdev->dev.of_node) {
1330*4882a593Smuzhiyun 		ret = msm_pinctrl_probe(pdev, &sdm845_pinctrl);
1331*4882a593Smuzhiyun 	} else if (has_acpi_companion(&pdev->dev)) {
1332*4882a593Smuzhiyun 		ret = msm_pinctrl_probe(pdev, &sdm845_acpi_pinctrl);
1333*4882a593Smuzhiyun 	} else {
1334*4882a593Smuzhiyun 		dev_err(&pdev->dev, "DT and ACPI disabled\n");
1335*4882a593Smuzhiyun 		return -EINVAL;
1336*4882a593Smuzhiyun 	}
1337*4882a593Smuzhiyun 
1338*4882a593Smuzhiyun 	return ret;
1339*4882a593Smuzhiyun }
1340*4882a593Smuzhiyun 
1341*4882a593Smuzhiyun #ifdef CONFIG_ACPI
1342*4882a593Smuzhiyun static const struct acpi_device_id sdm845_pinctrl_acpi_match[] = {
1343*4882a593Smuzhiyun 	{ "QCOM0217"},
1344*4882a593Smuzhiyun 	{ },
1345*4882a593Smuzhiyun };
1346*4882a593Smuzhiyun MODULE_DEVICE_TABLE(acpi, sdm845_pinctrl_acpi_match);
1347*4882a593Smuzhiyun #endif
1348*4882a593Smuzhiyun 
1349*4882a593Smuzhiyun static const struct of_device_id sdm845_pinctrl_of_match[] = {
1350*4882a593Smuzhiyun 	{ .compatible = "qcom,sdm845-pinctrl", },
1351*4882a593Smuzhiyun 	{ },
1352*4882a593Smuzhiyun };
1353*4882a593Smuzhiyun 
1354*4882a593Smuzhiyun static struct platform_driver sdm845_pinctrl_driver = {
1355*4882a593Smuzhiyun 	.driver = {
1356*4882a593Smuzhiyun 		.name = "sdm845-pinctrl",
1357*4882a593Smuzhiyun 		.pm = &msm_pinctrl_dev_pm_ops,
1358*4882a593Smuzhiyun 		.of_match_table = sdm845_pinctrl_of_match,
1359*4882a593Smuzhiyun 		.acpi_match_table = ACPI_PTR(sdm845_pinctrl_acpi_match),
1360*4882a593Smuzhiyun 	},
1361*4882a593Smuzhiyun 	.probe = sdm845_pinctrl_probe,
1362*4882a593Smuzhiyun 	.remove = msm_pinctrl_remove,
1363*4882a593Smuzhiyun };
1364*4882a593Smuzhiyun 
sdm845_pinctrl_init(void)1365*4882a593Smuzhiyun static int __init sdm845_pinctrl_init(void)
1366*4882a593Smuzhiyun {
1367*4882a593Smuzhiyun 	return platform_driver_register(&sdm845_pinctrl_driver);
1368*4882a593Smuzhiyun }
1369*4882a593Smuzhiyun arch_initcall(sdm845_pinctrl_init);
1370*4882a593Smuzhiyun 
sdm845_pinctrl_exit(void)1371*4882a593Smuzhiyun static void __exit sdm845_pinctrl_exit(void)
1372*4882a593Smuzhiyun {
1373*4882a593Smuzhiyun 	platform_driver_unregister(&sdm845_pinctrl_driver);
1374*4882a593Smuzhiyun }
1375*4882a593Smuzhiyun module_exit(sdm845_pinctrl_exit);
1376*4882a593Smuzhiyun 
1377*4882a593Smuzhiyun MODULE_DESCRIPTION("QTI sdm845 pinctrl driver");
1378*4882a593Smuzhiyun MODULE_LICENSE("GPL v2");
1379*4882a593Smuzhiyun MODULE_DEVICE_TABLE(of, sdm845_pinctrl_of_match);
1380