Linux 5.1.15
[linux/fpc-iii.git] / drivers / pinctrl / qcom / pinctrl-msm8960.c
blobed23e367fe89e02d5bb8ad14d4e571d6752ff30c
1 /*
2 * Copyright (c) 2014, Sony Mobile Communications AB.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include <linux/module.h>
15 #include <linux/of.h>
16 #include <linux/platform_device.h>
17 #include <linux/pinctrl/pinctrl.h>
18 #include <linux/pinctrl/pinmux.h>
20 #include "pinctrl-msm.h"
22 static const struct pinctrl_pin_desc msm8960_pins[] = {
23 PINCTRL_PIN(0, "GPIO_0"),
24 PINCTRL_PIN(1, "GPIO_1"),
25 PINCTRL_PIN(2, "GPIO_2"),
26 PINCTRL_PIN(3, "GPIO_3"),
27 PINCTRL_PIN(4, "GPIO_4"),
28 PINCTRL_PIN(5, "GPIO_5"),
29 PINCTRL_PIN(6, "GPIO_6"),
30 PINCTRL_PIN(7, "GPIO_7"),
31 PINCTRL_PIN(8, "GPIO_8"),
32 PINCTRL_PIN(9, "GPIO_9"),
33 PINCTRL_PIN(10, "GPIO_10"),
34 PINCTRL_PIN(11, "GPIO_11"),
35 PINCTRL_PIN(12, "GPIO_12"),
36 PINCTRL_PIN(13, "GPIO_13"),
37 PINCTRL_PIN(14, "GPIO_14"),
38 PINCTRL_PIN(15, "GPIO_15"),
39 PINCTRL_PIN(16, "GPIO_16"),
40 PINCTRL_PIN(17, "GPIO_17"),
41 PINCTRL_PIN(18, "GPIO_18"),
42 PINCTRL_PIN(19, "GPIO_19"),
43 PINCTRL_PIN(20, "GPIO_20"),
44 PINCTRL_PIN(21, "GPIO_21"),
45 PINCTRL_PIN(22, "GPIO_22"),
46 PINCTRL_PIN(23, "GPIO_23"),
47 PINCTRL_PIN(24, "GPIO_24"),
48 PINCTRL_PIN(25, "GPIO_25"),
49 PINCTRL_PIN(26, "GPIO_26"),
50 PINCTRL_PIN(27, "GPIO_27"),
51 PINCTRL_PIN(28, "GPIO_28"),
52 PINCTRL_PIN(29, "GPIO_29"),
53 PINCTRL_PIN(30, "GPIO_30"),
54 PINCTRL_PIN(31, "GPIO_31"),
55 PINCTRL_PIN(32, "GPIO_32"),
56 PINCTRL_PIN(33, "GPIO_33"),
57 PINCTRL_PIN(34, "GPIO_34"),
58 PINCTRL_PIN(35, "GPIO_35"),
59 PINCTRL_PIN(36, "GPIO_36"),
60 PINCTRL_PIN(37, "GPIO_37"),
61 PINCTRL_PIN(38, "GPIO_38"),
62 PINCTRL_PIN(39, "GPIO_39"),
63 PINCTRL_PIN(40, "GPIO_40"),
64 PINCTRL_PIN(41, "GPIO_41"),
65 PINCTRL_PIN(42, "GPIO_42"),
66 PINCTRL_PIN(43, "GPIO_43"),
67 PINCTRL_PIN(44, "GPIO_44"),
68 PINCTRL_PIN(45, "GPIO_45"),
69 PINCTRL_PIN(46, "GPIO_46"),
70 PINCTRL_PIN(47, "GPIO_47"),
71 PINCTRL_PIN(48, "GPIO_48"),
72 PINCTRL_PIN(49, "GPIO_49"),
73 PINCTRL_PIN(50, "GPIO_50"),
74 PINCTRL_PIN(51, "GPIO_51"),
75 PINCTRL_PIN(52, "GPIO_52"),
76 PINCTRL_PIN(53, "GPIO_53"),
77 PINCTRL_PIN(54, "GPIO_54"),
78 PINCTRL_PIN(55, "GPIO_55"),
79 PINCTRL_PIN(56, "GPIO_56"),
80 PINCTRL_PIN(57, "GPIO_57"),
81 PINCTRL_PIN(58, "GPIO_58"),
82 PINCTRL_PIN(59, "GPIO_59"),
83 PINCTRL_PIN(60, "GPIO_60"),
84 PINCTRL_PIN(61, "GPIO_61"),
85 PINCTRL_PIN(62, "GPIO_62"),
86 PINCTRL_PIN(63, "GPIO_63"),
87 PINCTRL_PIN(64, "GPIO_64"),
88 PINCTRL_PIN(65, "GPIO_65"),
89 PINCTRL_PIN(66, "GPIO_66"),
90 PINCTRL_PIN(67, "GPIO_67"),
91 PINCTRL_PIN(68, "GPIO_68"),
92 PINCTRL_PIN(69, "GPIO_69"),
93 PINCTRL_PIN(70, "GPIO_70"),
94 PINCTRL_PIN(71, "GPIO_71"),
95 PINCTRL_PIN(72, "GPIO_72"),
96 PINCTRL_PIN(73, "GPIO_73"),
97 PINCTRL_PIN(74, "GPIO_74"),
98 PINCTRL_PIN(75, "GPIO_75"),
99 PINCTRL_PIN(76, "GPIO_76"),
100 PINCTRL_PIN(77, "GPIO_77"),
101 PINCTRL_PIN(78, "GPIO_78"),
102 PINCTRL_PIN(79, "GPIO_79"),
103 PINCTRL_PIN(80, "GPIO_80"),
104 PINCTRL_PIN(81, "GPIO_81"),
105 PINCTRL_PIN(82, "GPIO_82"),
106 PINCTRL_PIN(83, "GPIO_83"),
107 PINCTRL_PIN(84, "GPIO_84"),
108 PINCTRL_PIN(85, "GPIO_85"),
109 PINCTRL_PIN(86, "GPIO_86"),
110 PINCTRL_PIN(87, "GPIO_87"),
111 PINCTRL_PIN(88, "GPIO_88"),
112 PINCTRL_PIN(89, "GPIO_89"),
113 PINCTRL_PIN(90, "GPIO_90"),
114 PINCTRL_PIN(91, "GPIO_91"),
115 PINCTRL_PIN(92, "GPIO_92"),
116 PINCTRL_PIN(93, "GPIO_93"),
117 PINCTRL_PIN(94, "GPIO_94"),
118 PINCTRL_PIN(95, "GPIO_95"),
119 PINCTRL_PIN(96, "GPIO_96"),
120 PINCTRL_PIN(97, "GPIO_97"),
121 PINCTRL_PIN(98, "GPIO_98"),
122 PINCTRL_PIN(99, "GPIO_99"),
123 PINCTRL_PIN(100, "GPIO_100"),
124 PINCTRL_PIN(101, "GPIO_101"),
125 PINCTRL_PIN(102, "GPIO_102"),
126 PINCTRL_PIN(103, "GPIO_103"),
127 PINCTRL_PIN(104, "GPIO_104"),
128 PINCTRL_PIN(105, "GPIO_105"),
129 PINCTRL_PIN(106, "GPIO_106"),
130 PINCTRL_PIN(107, "GPIO_107"),
131 PINCTRL_PIN(108, "GPIO_108"),
132 PINCTRL_PIN(109, "GPIO_109"),
133 PINCTRL_PIN(110, "GPIO_110"),
134 PINCTRL_PIN(111, "GPIO_111"),
135 PINCTRL_PIN(112, "GPIO_112"),
136 PINCTRL_PIN(113, "GPIO_113"),
137 PINCTRL_PIN(114, "GPIO_114"),
138 PINCTRL_PIN(115, "GPIO_115"),
139 PINCTRL_PIN(116, "GPIO_116"),
140 PINCTRL_PIN(117, "GPIO_117"),
141 PINCTRL_PIN(118, "GPIO_118"),
142 PINCTRL_PIN(119, "GPIO_119"),
143 PINCTRL_PIN(120, "GPIO_120"),
144 PINCTRL_PIN(121, "GPIO_121"),
145 PINCTRL_PIN(122, "GPIO_122"),
146 PINCTRL_PIN(123, "GPIO_123"),
147 PINCTRL_PIN(124, "GPIO_124"),
148 PINCTRL_PIN(125, "GPIO_125"),
149 PINCTRL_PIN(126, "GPIO_126"),
150 PINCTRL_PIN(127, "GPIO_127"),
151 PINCTRL_PIN(128, "GPIO_128"),
152 PINCTRL_PIN(129, "GPIO_129"),
153 PINCTRL_PIN(130, "GPIO_130"),
154 PINCTRL_PIN(131, "GPIO_131"),
155 PINCTRL_PIN(132, "GPIO_132"),
156 PINCTRL_PIN(133, "GPIO_133"),
157 PINCTRL_PIN(134, "GPIO_134"),
158 PINCTRL_PIN(135, "GPIO_135"),
159 PINCTRL_PIN(136, "GPIO_136"),
160 PINCTRL_PIN(137, "GPIO_137"),
161 PINCTRL_PIN(138, "GPIO_138"),
162 PINCTRL_PIN(139, "GPIO_139"),
163 PINCTRL_PIN(140, "GPIO_140"),
164 PINCTRL_PIN(141, "GPIO_141"),
165 PINCTRL_PIN(142, "GPIO_142"),
166 PINCTRL_PIN(143, "GPIO_143"),
167 PINCTRL_PIN(144, "GPIO_144"),
168 PINCTRL_PIN(145, "GPIO_145"),
169 PINCTRL_PIN(146, "GPIO_146"),
170 PINCTRL_PIN(147, "GPIO_147"),
171 PINCTRL_PIN(148, "GPIO_148"),
172 PINCTRL_PIN(149, "GPIO_149"),
173 PINCTRL_PIN(150, "GPIO_150"),
174 PINCTRL_PIN(151, "GPIO_151"),
176 PINCTRL_PIN(152, "SDC1_CLK"),
177 PINCTRL_PIN(153, "SDC1_CMD"),
178 PINCTRL_PIN(154, "SDC1_DATA"),
179 PINCTRL_PIN(155, "SDC3_CLK"),
180 PINCTRL_PIN(156, "SDC3_CMD"),
181 PINCTRL_PIN(157, "SDC3_DATA"),
184 #define DECLARE_MSM_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin }
185 DECLARE_MSM_GPIO_PINS(0);
186 DECLARE_MSM_GPIO_PINS(1);
187 DECLARE_MSM_GPIO_PINS(2);
188 DECLARE_MSM_GPIO_PINS(3);
189 DECLARE_MSM_GPIO_PINS(4);
190 DECLARE_MSM_GPIO_PINS(5);
191 DECLARE_MSM_GPIO_PINS(6);
192 DECLARE_MSM_GPIO_PINS(7);
193 DECLARE_MSM_GPIO_PINS(8);
194 DECLARE_MSM_GPIO_PINS(9);
195 DECLARE_MSM_GPIO_PINS(10);
196 DECLARE_MSM_GPIO_PINS(11);
197 DECLARE_MSM_GPIO_PINS(12);
198 DECLARE_MSM_GPIO_PINS(13);
199 DECLARE_MSM_GPIO_PINS(14);
200 DECLARE_MSM_GPIO_PINS(15);
201 DECLARE_MSM_GPIO_PINS(16);
202 DECLARE_MSM_GPIO_PINS(17);
203 DECLARE_MSM_GPIO_PINS(18);
204 DECLARE_MSM_GPIO_PINS(19);
205 DECLARE_MSM_GPIO_PINS(20);
206 DECLARE_MSM_GPIO_PINS(21);
207 DECLARE_MSM_GPIO_PINS(22);
208 DECLARE_MSM_GPIO_PINS(23);
209 DECLARE_MSM_GPIO_PINS(24);
210 DECLARE_MSM_GPIO_PINS(25);
211 DECLARE_MSM_GPIO_PINS(26);
212 DECLARE_MSM_GPIO_PINS(27);
213 DECLARE_MSM_GPIO_PINS(28);
214 DECLARE_MSM_GPIO_PINS(29);
215 DECLARE_MSM_GPIO_PINS(30);
216 DECLARE_MSM_GPIO_PINS(31);
217 DECLARE_MSM_GPIO_PINS(32);
218 DECLARE_MSM_GPIO_PINS(33);
219 DECLARE_MSM_GPIO_PINS(34);
220 DECLARE_MSM_GPIO_PINS(35);
221 DECLARE_MSM_GPIO_PINS(36);
222 DECLARE_MSM_GPIO_PINS(37);
223 DECLARE_MSM_GPIO_PINS(38);
224 DECLARE_MSM_GPIO_PINS(39);
225 DECLARE_MSM_GPIO_PINS(40);
226 DECLARE_MSM_GPIO_PINS(41);
227 DECLARE_MSM_GPIO_PINS(42);
228 DECLARE_MSM_GPIO_PINS(43);
229 DECLARE_MSM_GPIO_PINS(44);
230 DECLARE_MSM_GPIO_PINS(45);
231 DECLARE_MSM_GPIO_PINS(46);
232 DECLARE_MSM_GPIO_PINS(47);
233 DECLARE_MSM_GPIO_PINS(48);
234 DECLARE_MSM_GPIO_PINS(49);
235 DECLARE_MSM_GPIO_PINS(50);
236 DECLARE_MSM_GPIO_PINS(51);
237 DECLARE_MSM_GPIO_PINS(52);
238 DECLARE_MSM_GPIO_PINS(53);
239 DECLARE_MSM_GPIO_PINS(54);
240 DECLARE_MSM_GPIO_PINS(55);
241 DECLARE_MSM_GPIO_PINS(56);
242 DECLARE_MSM_GPIO_PINS(57);
243 DECLARE_MSM_GPIO_PINS(58);
244 DECLARE_MSM_GPIO_PINS(59);
245 DECLARE_MSM_GPIO_PINS(60);
246 DECLARE_MSM_GPIO_PINS(61);
247 DECLARE_MSM_GPIO_PINS(62);
248 DECLARE_MSM_GPIO_PINS(63);
249 DECLARE_MSM_GPIO_PINS(64);
250 DECLARE_MSM_GPIO_PINS(65);
251 DECLARE_MSM_GPIO_PINS(66);
252 DECLARE_MSM_GPIO_PINS(67);
253 DECLARE_MSM_GPIO_PINS(68);
254 DECLARE_MSM_GPIO_PINS(69);
255 DECLARE_MSM_GPIO_PINS(70);
256 DECLARE_MSM_GPIO_PINS(71);
257 DECLARE_MSM_GPIO_PINS(72);
258 DECLARE_MSM_GPIO_PINS(73);
259 DECLARE_MSM_GPIO_PINS(74);
260 DECLARE_MSM_GPIO_PINS(75);
261 DECLARE_MSM_GPIO_PINS(76);
262 DECLARE_MSM_GPIO_PINS(77);
263 DECLARE_MSM_GPIO_PINS(78);
264 DECLARE_MSM_GPIO_PINS(79);
265 DECLARE_MSM_GPIO_PINS(80);
266 DECLARE_MSM_GPIO_PINS(81);
267 DECLARE_MSM_GPIO_PINS(82);
268 DECLARE_MSM_GPIO_PINS(83);
269 DECLARE_MSM_GPIO_PINS(84);
270 DECLARE_MSM_GPIO_PINS(85);
271 DECLARE_MSM_GPIO_PINS(86);
272 DECLARE_MSM_GPIO_PINS(87);
273 DECLARE_MSM_GPIO_PINS(88);
274 DECLARE_MSM_GPIO_PINS(89);
275 DECLARE_MSM_GPIO_PINS(90);
276 DECLARE_MSM_GPIO_PINS(91);
277 DECLARE_MSM_GPIO_PINS(92);
278 DECLARE_MSM_GPIO_PINS(93);
279 DECLARE_MSM_GPIO_PINS(94);
280 DECLARE_MSM_GPIO_PINS(95);
281 DECLARE_MSM_GPIO_PINS(96);
282 DECLARE_MSM_GPIO_PINS(97);
283 DECLARE_MSM_GPIO_PINS(98);
284 DECLARE_MSM_GPIO_PINS(99);
285 DECLARE_MSM_GPIO_PINS(100);
286 DECLARE_MSM_GPIO_PINS(101);
287 DECLARE_MSM_GPIO_PINS(102);
288 DECLARE_MSM_GPIO_PINS(103);
289 DECLARE_MSM_GPIO_PINS(104);
290 DECLARE_MSM_GPIO_PINS(105);
291 DECLARE_MSM_GPIO_PINS(106);
292 DECLARE_MSM_GPIO_PINS(107);
293 DECLARE_MSM_GPIO_PINS(108);
294 DECLARE_MSM_GPIO_PINS(109);
295 DECLARE_MSM_GPIO_PINS(110);
296 DECLARE_MSM_GPIO_PINS(111);
297 DECLARE_MSM_GPIO_PINS(112);
298 DECLARE_MSM_GPIO_PINS(113);
299 DECLARE_MSM_GPIO_PINS(114);
300 DECLARE_MSM_GPIO_PINS(115);
301 DECLARE_MSM_GPIO_PINS(116);
302 DECLARE_MSM_GPIO_PINS(117);
303 DECLARE_MSM_GPIO_PINS(118);
304 DECLARE_MSM_GPIO_PINS(119);
305 DECLARE_MSM_GPIO_PINS(120);
306 DECLARE_MSM_GPIO_PINS(121);
307 DECLARE_MSM_GPIO_PINS(122);
308 DECLARE_MSM_GPIO_PINS(123);
309 DECLARE_MSM_GPIO_PINS(124);
310 DECLARE_MSM_GPIO_PINS(125);
311 DECLARE_MSM_GPIO_PINS(126);
312 DECLARE_MSM_GPIO_PINS(127);
313 DECLARE_MSM_GPIO_PINS(128);
314 DECLARE_MSM_GPIO_PINS(129);
315 DECLARE_MSM_GPIO_PINS(130);
316 DECLARE_MSM_GPIO_PINS(131);
317 DECLARE_MSM_GPIO_PINS(132);
318 DECLARE_MSM_GPIO_PINS(133);
319 DECLARE_MSM_GPIO_PINS(134);
320 DECLARE_MSM_GPIO_PINS(135);
321 DECLARE_MSM_GPIO_PINS(136);
322 DECLARE_MSM_GPIO_PINS(137);
323 DECLARE_MSM_GPIO_PINS(138);
324 DECLARE_MSM_GPIO_PINS(139);
325 DECLARE_MSM_GPIO_PINS(140);
326 DECLARE_MSM_GPIO_PINS(141);
327 DECLARE_MSM_GPIO_PINS(142);
328 DECLARE_MSM_GPIO_PINS(143);
329 DECLARE_MSM_GPIO_PINS(144);
330 DECLARE_MSM_GPIO_PINS(145);
331 DECLARE_MSM_GPIO_PINS(146);
332 DECLARE_MSM_GPIO_PINS(147);
333 DECLARE_MSM_GPIO_PINS(148);
334 DECLARE_MSM_GPIO_PINS(149);
335 DECLARE_MSM_GPIO_PINS(150);
336 DECLARE_MSM_GPIO_PINS(151);
338 static const unsigned int sdc1_clk_pins[] = { 152 };
339 static const unsigned int sdc1_cmd_pins[] = { 153 };
340 static const unsigned int sdc1_data_pins[] = { 154 };
341 static const unsigned int sdc3_clk_pins[] = { 155 };
342 static const unsigned int sdc3_cmd_pins[] = { 156 };
343 static const unsigned int sdc3_data_pins[] = { 157 };
345 #define FUNCTION(fname) \
346 [MSM_MUX_##fname] = { \
347 .name = #fname, \
348 .groups = fname##_groups, \
349 .ngroups = ARRAY_SIZE(fname##_groups), \
352 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11) \
354 .name = "gpio" #id, \
355 .pins = gpio##id##_pins, \
356 .npins = ARRAY_SIZE(gpio##id##_pins), \
357 .funcs = (int[]){ \
358 MSM_MUX_gpio, \
359 MSM_MUX_##f1, \
360 MSM_MUX_##f2, \
361 MSM_MUX_##f3, \
362 MSM_MUX_##f4, \
363 MSM_MUX_##f5, \
364 MSM_MUX_##f6, \
365 MSM_MUX_##f7, \
366 MSM_MUX_##f8, \
367 MSM_MUX_##f9, \
368 MSM_MUX_##f10, \
369 MSM_MUX_##f11 \
370 }, \
371 .nfuncs = 12, \
372 .ctl_reg = 0x1000 + 0x10 * id, \
373 .io_reg = 0x1004 + 0x10 * id, \
374 .intr_cfg_reg = 0x1008 + 0x10 * id, \
375 .intr_status_reg = 0x100c + 0x10 * id, \
376 .intr_target_reg = 0x400 + 0x4 * id, \
377 .mux_bit = 2, \
378 .pull_bit = 0, \
379 .drv_bit = 6, \
380 .oe_bit = 9, \
381 .in_bit = 0, \
382 .out_bit = 1, \
383 .intr_enable_bit = 0, \
384 .intr_status_bit = 0, \
385 .intr_ack_high = 1, \
386 .intr_target_bit = 0, \
387 .intr_target_kpss_val = 4, \
388 .intr_raw_status_bit = 3, \
389 .intr_polarity_bit = 1, \
390 .intr_detection_bit = 2, \
391 .intr_detection_width = 1, \
394 #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
396 .name = #pg_name, \
397 .pins = pg_name##_pins, \
398 .npins = ARRAY_SIZE(pg_name##_pins), \
399 .ctl_reg = ctl, \
400 .io_reg = 0, \
401 .intr_cfg_reg = 0, \
402 .intr_status_reg = 0, \
403 .intr_target_reg = 0, \
404 .mux_bit = -1, \
405 .pull_bit = pull, \
406 .drv_bit = drv, \
407 .oe_bit = -1, \
408 .in_bit = -1, \
409 .out_bit = -1, \
410 .intr_enable_bit = -1, \
411 .intr_status_bit = -1, \
412 .intr_target_bit = -1, \
413 .intr_target_kpss_val = -1, \
414 .intr_raw_status_bit = -1, \
415 .intr_polarity_bit = -1, \
416 .intr_detection_bit = -1, \
417 .intr_detection_width = -1, \
420 enum msm8960_functions {
421 MSM_MUX_audio_pcm,
422 MSM_MUX_bt,
423 MSM_MUX_cam_mclk0,
424 MSM_MUX_cam_mclk1,
425 MSM_MUX_cam_mclk2,
426 MSM_MUX_codec_mic_i2s,
427 MSM_MUX_codec_spkr_i2s,
428 MSM_MUX_ext_gps,
429 MSM_MUX_fm,
430 MSM_MUX_gps_blanking,
431 MSM_MUX_gps_pps_in,
432 MSM_MUX_gps_pps_out,
433 MSM_MUX_gp_clk_0a,
434 MSM_MUX_gp_clk_0b,
435 MSM_MUX_gp_clk_1a,
436 MSM_MUX_gp_clk_1b,
437 MSM_MUX_gp_clk_2a,
438 MSM_MUX_gp_clk_2b,
439 MSM_MUX_gp_mn,
440 MSM_MUX_gp_pdm_0a,
441 MSM_MUX_gp_pdm_0b,
442 MSM_MUX_gp_pdm_1a,
443 MSM_MUX_gp_pdm_1b,
444 MSM_MUX_gp_pdm_2a,
445 MSM_MUX_gp_pdm_2b,
446 MSM_MUX_gpio,
447 MSM_MUX_gsbi1,
448 MSM_MUX_gsbi1_spi_cs1_n,
449 MSM_MUX_gsbi1_spi_cs2a_n,
450 MSM_MUX_gsbi1_spi_cs2b_n,
451 MSM_MUX_gsbi1_spi_cs3_n,
452 MSM_MUX_gsbi2,
453 MSM_MUX_gsbi2_spi_cs1_n,
454 MSM_MUX_gsbi2_spi_cs2_n,
455 MSM_MUX_gsbi2_spi_cs3_n,
456 MSM_MUX_gsbi3,
457 MSM_MUX_gsbi4,
458 MSM_MUX_gsbi4_3d_cam_i2c_l,
459 MSM_MUX_gsbi4_3d_cam_i2c_r,
460 MSM_MUX_gsbi5,
461 MSM_MUX_gsbi5_3d_cam_i2c_l,
462 MSM_MUX_gsbi5_3d_cam_i2c_r,
463 MSM_MUX_gsbi6,
464 MSM_MUX_gsbi7,
465 MSM_MUX_gsbi8,
466 MSM_MUX_gsbi9,
467 MSM_MUX_gsbi10,
468 MSM_MUX_gsbi11,
469 MSM_MUX_gsbi11_spi_cs1a_n,
470 MSM_MUX_gsbi11_spi_cs1b_n,
471 MSM_MUX_gsbi11_spi_cs2a_n,
472 MSM_MUX_gsbi11_spi_cs2b_n,
473 MSM_MUX_gsbi11_spi_cs3_n,
474 MSM_MUX_gsbi12,
475 MSM_MUX_hdmi_cec,
476 MSM_MUX_hdmi_ddc_clock,
477 MSM_MUX_hdmi_ddc_data,
478 MSM_MUX_hdmi_hot_plug_detect,
479 MSM_MUX_hsic,
480 MSM_MUX_mdp_vsync,
481 MSM_MUX_mi2s,
482 MSM_MUX_mic_i2s,
483 MSM_MUX_pmb_clk,
484 MSM_MUX_pmb_ext_ctrl,
485 MSM_MUX_ps_hold,
486 MSM_MUX_rpm_wdog,
487 MSM_MUX_sdc2,
488 MSM_MUX_sdc4,
489 MSM_MUX_sdc5,
490 MSM_MUX_slimbus1,
491 MSM_MUX_slimbus2,
492 MSM_MUX_spkr_i2s,
493 MSM_MUX_ssbi1,
494 MSM_MUX_ssbi2,
495 MSM_MUX_ssbi_ext_gps,
496 MSM_MUX_ssbi_pmic2,
497 MSM_MUX_ssbi_qpa1,
498 MSM_MUX_ssbi_ts,
499 MSM_MUX_tsif1,
500 MSM_MUX_tsif2,
501 MSM_MUX_ts_eoc,
502 MSM_MUX_usb_fs1,
503 MSM_MUX_usb_fs1_oe,
504 MSM_MUX_usb_fs1_oe_n,
505 MSM_MUX_usb_fs2,
506 MSM_MUX_usb_fs2_oe,
507 MSM_MUX_usb_fs2_oe_n,
508 MSM_MUX_vfe_camif_timer1_a,
509 MSM_MUX_vfe_camif_timer1_b,
510 MSM_MUX_vfe_camif_timer2,
511 MSM_MUX_vfe_camif_timer3_a,
512 MSM_MUX_vfe_camif_timer3_b,
513 MSM_MUX_vfe_camif_timer4_a,
514 MSM_MUX_vfe_camif_timer4_b,
515 MSM_MUX_vfe_camif_timer4_c,
516 MSM_MUX_vfe_camif_timer5_a,
517 MSM_MUX_vfe_camif_timer5_b,
518 MSM_MUX_vfe_camif_timer6_a,
519 MSM_MUX_vfe_camif_timer6_b,
520 MSM_MUX_vfe_camif_timer6_c,
521 MSM_MUX_vfe_camif_timer7_a,
522 MSM_MUX_vfe_camif_timer7_b,
523 MSM_MUX_vfe_camif_timer7_c,
524 MSM_MUX_wlan,
525 MSM_MUX_NA,
528 static const char * const audio_pcm_groups[] = {
529 "gpio63", "gpio64", "gpio65", "gpio66"
532 static const char * const bt_groups[] = {
533 "gpio28", "gpio29", "gpio83"
536 static const char * const cam_mclk0_groups[] = {
537 "gpio5"
540 static const char * const cam_mclk1_groups[] = {
541 "gpio4"
544 static const char * const cam_mclk2_groups[] = {
545 "gpio2"
548 static const char * const codec_mic_i2s_groups[] = {
549 "gpio54", "gpio55", "gpio56", "gpio57", "gpio58"
552 static const char * const codec_spkr_i2s_groups[] = {
553 "gpio59", "gpio60", "gpio61", "gpio62"
556 static const char * const ext_gps_groups[] = {
557 "gpio22", "gpio23", "gpio24", "gpio25"
560 static const char * const fm_groups[] = {
561 "gpio26", "gpio27"
564 static const char * const gps_blanking_groups[] = {
565 "gpio137"
568 static const char * const gps_pps_in_groups[] = {
569 "gpio37"
572 static const char * const gps_pps_out_groups[] = {
573 "gpio37"
576 static const char * const gp_clk_0a_groups[] = {
577 "gpio3"
580 static const char * const gp_clk_0b_groups[] = {
581 "gpio54"
584 static const char * const gp_clk_1a_groups[] = {
585 "gpio4"
588 static const char * const gp_clk_1b_groups[] = {
589 "gpio70"
592 static const char * const gp_clk_2a_groups[] = {
593 "gpio52"
596 static const char * const gp_clk_2b_groups[] = {
597 "gpio37"
600 static const char * const gp_mn_groups[] = {
601 "gpio2"
604 static const char * const gp_pdm_0a_groups[] = {
605 "gpio58"
608 static const char * const gp_pdm_0b_groups[] = {
609 "gpio39"
612 static const char * const gp_pdm_1a_groups[] = {
613 "gpio94"
616 static const char * const gp_pdm_1b_groups[] = {
617 "gpio64"
620 static const char * const gp_pdm_2a_groups[] = {
621 "gpio69"
624 static const char * const gp_pdm_2b_groups[] = {
625 "gpio53"
628 static const char * const gpio_groups[] = {
629 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
630 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
631 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
632 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
633 "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
634 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
635 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
636 "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
637 "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
638 "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
639 "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
640 "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
641 "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
642 "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
643 "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
644 "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
645 "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
646 "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
647 "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
648 "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
649 "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
650 "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
651 "gpio147", "gpio148", "gpio149", "gpio150", "gpio151"
654 static const char * const gsbi1_groups[] = {
655 "gpio6", "gpio7", "gpio8", "gpio9"
658 static const char * const gsbi1_spi_cs1_n_groups[] = {
659 "gpio14"
662 static const char * const gsbi1_spi_cs2a_n_groups[] = {
663 "gpio15"
666 static const char * const gsbi1_spi_cs2b_n_groups[] = {
667 "gpio17"
670 static const char * const gsbi1_spi_cs3_n_groups[] = {
671 "gpio16"
674 static const char * const gsbi2_groups[] = {
675 "gpio10", "gpio11", "gpio12", "gpio13"
678 static const char * const gsbi2_spi_cs1_n_groups[] = {
679 "gpio52"
682 static const char * const gsbi2_spi_cs2_n_groups[] = {
683 "gpio68"
686 static const char * const gsbi2_spi_cs3_n_groups[] = {
687 "gpio56"
690 static const char * const gsbi3_groups[] = {
691 "gpio14", "gpio15", "gpio16", "gpio17"
694 static const char * const gsbi4_groups[] = {
695 "gpio18", "gpio19", "gpio20", "gpio21"
698 static const char * const gsbi4_3d_cam_i2c_l_groups[] = {
699 "gpio18", "gpio19"
702 static const char * const gsbi4_3d_cam_i2c_r_groups[] = {
703 "gpio20", "gpio21"
706 static const char * const gsbi5_groups[] = {
707 "gpio22", "gpio23", "gpio24", "gpio25"
710 static const char * const gsbi5_3d_cam_i2c_l_groups[] = {
711 "gpio22", "gpio23"
714 static const char * const gsbi5_3d_cam_i2c_r_groups[] = {
715 "gpio24", "gpio25"
718 static const char * const gsbi6_groups[] = {
719 "gpio26", "gpio27", "gpio28", "gpio29"
722 static const char * const gsbi7_groups[] = {
723 "gpio30", "gpio31", "gpio32", "gpio33"
726 static const char * const gsbi8_groups[] = {
727 "gpio34", "gpio35", "gpio36", "gpio37"
730 static const char * const gsbi9_groups[] = {
731 "gpio93", "gpio94", "gpio95", "gpio96"
734 static const char * const gsbi10_groups[] = {
735 "gpio71", "gpio72", "gpio73", "gpio74"
738 static const char * const gsbi11_groups[] = {
739 "gpio38", "gpio39", "gpio40", "gpio41"
742 static const char * const gsbi11_spi_cs1a_n_groups[] = {
743 "gpio36"
746 static const char * const gsbi11_spi_cs1b_n_groups[] = {
747 "gpio18"
750 static const char * const gsbi11_spi_cs2a_n_groups[] = {
751 "gpio37"
754 static const char * const gsbi11_spi_cs2b_n_groups[] = {
755 "gpio19"
758 static const char * const gsbi11_spi_cs3_n_groups[] = {
759 "gpio76"
762 static const char * const gsbi12_groups[] = {
763 "gpio42", "gpio43", "gpio44", "gpio45"
766 static const char * const hdmi_cec_groups[] = {
767 "gpio99"
770 static const char * const hdmi_ddc_clock_groups[] = {
771 "gpio100"
774 static const char * const hdmi_ddc_data_groups[] = {
775 "gpio101"
778 static const char * const hdmi_hot_plug_detect_groups[] = {
779 "gpio102"
782 static const char * const hsic_groups[] = {
783 "gpio150", "gpio151"
786 static const char * const mdp_vsync_groups[] = {
787 "gpio0", "gpio1", "gpio19"
790 static const char * const mi2s_groups[] = {
791 "gpio47", "gpio48", "gpio49", "gpio50", "gpio51", "gpio52", "gpio53"
794 static const char * const mic_i2s_groups[] = {
795 "gpio71", "gpio72", "gpio73", "gpio74"
798 static const char * const pmb_clk_groups[] = {
799 "gpio21", "gpio86", "gpio112"
802 static const char * const pmb_ext_ctrl_groups[] = {
803 "gpio4", "gpio5"
806 static const char * const ps_hold_groups[] = {
807 "gpio108"
810 static const char * const rpm_wdog_groups[] = {
811 "gpio12"
814 static const char * const sdc2_groups[] = {
815 "gpio89", "gpio90", "gpio91", "gpio92", "gpio93", "gpio94", "gpio95",
816 "gpio96", "gpio97", "gpio98"
819 static const char * const sdc4_groups[] = {
820 "gpio83", "gpio84", "gpio85", "gpio86", "gpio87", "gpio88"
823 static const char * const sdc5_groups[] = {
824 "gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82"
827 static const char * const slimbus1_groups[] = {
828 "gpio50", "gpio51", "gpio60", "gpio61"
831 static const char * const slimbus2_groups[] = {
832 "gpio42", "gpio43"
835 static const char * const spkr_i2s_groups[] = {
836 "gpio67", "gpio68", "gpio69", "gpio70"
839 static const char * const ssbi1_groups[] = {
840 "gpio141", "gpio143"
843 static const char * const ssbi2_groups[] = {
844 "gpio140", "gpio142"
847 static const char * const ssbi_ext_gps_groups[] = {
848 "gpio23"
851 static const char * const ssbi_pmic2_groups[] = {
852 "gpio149"
855 static const char * const ssbi_qpa1_groups[] = {
856 "gpio131"
859 static const char * const ssbi_ts_groups[] = {
860 "gpio10"
863 static const char * const tsif1_groups[] = {
864 "gpio75", "gpio76", "gpio77", "gpio82"
867 static const char * const tsif2_groups[] = {
868 "gpio78", "gpio79", "gpio80", "gpio81"
871 static const char * const ts_eoc_groups[] = {
872 "gpio11"
875 static const char * const usb_fs1_groups[] = {
876 "gpio32", "gpio33"
879 static const char * const usb_fs1_oe_groups[] = {
880 "gpio31"
883 static const char * const usb_fs1_oe_n_groups[] = {
884 "gpio31"
887 static const char * const usb_fs2_groups[] = {
888 "gpio34", "gpio35"
891 static const char * const usb_fs2_oe_groups[] = {
892 "gpio36"
895 static const char * const usb_fs2_oe_n_groups[] = {
896 "gpio36"
899 static const char * const vfe_camif_timer1_a_groups[] = {
900 "gpio2"
903 static const char * const vfe_camif_timer1_b_groups[] = {
904 "gpio38"
907 static const char * const vfe_camif_timer2_groups[] = {
908 "gpio3"
911 static const char * const vfe_camif_timer3_a_groups[] = {
912 "gpio4"
915 static const char * const vfe_camif_timer3_b_groups[] = {
916 "gpio151"
919 static const char * const vfe_camif_timer4_a_groups[] = {
920 "gpio65"
923 static const char * const vfe_camif_timer4_b_groups[] = {
924 "gpio150"
927 static const char * const vfe_camif_timer4_c_groups[] = {
928 "gpio10"
931 static const char * const vfe_camif_timer5_a_groups[] = {
932 "gpio66"
935 static const char * const vfe_camif_timer5_b_groups[] = {
936 "gpio39"
939 static const char * const vfe_camif_timer6_a_groups[] = {
940 "gpio71"
943 static const char * const vfe_camif_timer6_b_groups[] = {
944 "gpio0"
947 static const char * const vfe_camif_timer6_c_groups[] = {
948 "gpio18"
951 static const char * const vfe_camif_timer7_a_groups[] = {
952 "gpio67"
955 static const char * const vfe_camif_timer7_b_groups[] = {
956 "gpio1"
959 static const char * const vfe_camif_timer7_c_groups[] = {
960 "gpio19"
963 static const char * const wlan_groups[] = {
964 "gpio84", "gpio85", "gpio86", "gpio87", "gpio88"
967 static const struct msm_function msm8960_functions[] = {
968 FUNCTION(audio_pcm),
969 FUNCTION(bt),
970 FUNCTION(cam_mclk0),
971 FUNCTION(cam_mclk1),
972 FUNCTION(cam_mclk2),
973 FUNCTION(codec_mic_i2s),
974 FUNCTION(codec_spkr_i2s),
975 FUNCTION(ext_gps),
976 FUNCTION(fm),
977 FUNCTION(gps_blanking),
978 FUNCTION(gps_pps_in),
979 FUNCTION(gps_pps_out),
980 FUNCTION(gp_clk_0a),
981 FUNCTION(gp_clk_0b),
982 FUNCTION(gp_clk_1a),
983 FUNCTION(gp_clk_1b),
984 FUNCTION(gp_clk_2a),
985 FUNCTION(gp_clk_2b),
986 FUNCTION(gp_mn),
987 FUNCTION(gp_pdm_0a),
988 FUNCTION(gp_pdm_0b),
989 FUNCTION(gp_pdm_1a),
990 FUNCTION(gp_pdm_1b),
991 FUNCTION(gp_pdm_2a),
992 FUNCTION(gp_pdm_2b),
993 FUNCTION(gpio),
994 FUNCTION(gsbi1),
995 FUNCTION(gsbi1_spi_cs1_n),
996 FUNCTION(gsbi1_spi_cs2a_n),
997 FUNCTION(gsbi1_spi_cs2b_n),
998 FUNCTION(gsbi1_spi_cs3_n),
999 FUNCTION(gsbi2),
1000 FUNCTION(gsbi2_spi_cs1_n),
1001 FUNCTION(gsbi2_spi_cs2_n),
1002 FUNCTION(gsbi2_spi_cs3_n),
1003 FUNCTION(gsbi3),
1004 FUNCTION(gsbi4),
1005 FUNCTION(gsbi4_3d_cam_i2c_l),
1006 FUNCTION(gsbi4_3d_cam_i2c_r),
1007 FUNCTION(gsbi5),
1008 FUNCTION(gsbi5_3d_cam_i2c_l),
1009 FUNCTION(gsbi5_3d_cam_i2c_r),
1010 FUNCTION(gsbi6),
1011 FUNCTION(gsbi7),
1012 FUNCTION(gsbi8),
1013 FUNCTION(gsbi9),
1014 FUNCTION(gsbi10),
1015 FUNCTION(gsbi11),
1016 FUNCTION(gsbi11_spi_cs1a_n),
1017 FUNCTION(gsbi11_spi_cs1b_n),
1018 FUNCTION(gsbi11_spi_cs2a_n),
1019 FUNCTION(gsbi11_spi_cs2b_n),
1020 FUNCTION(gsbi11_spi_cs3_n),
1021 FUNCTION(gsbi12),
1022 FUNCTION(hdmi_cec),
1023 FUNCTION(hdmi_ddc_clock),
1024 FUNCTION(hdmi_ddc_data),
1025 FUNCTION(hdmi_hot_plug_detect),
1026 FUNCTION(hsic),
1027 FUNCTION(mdp_vsync),
1028 FUNCTION(mi2s),
1029 FUNCTION(mic_i2s),
1030 FUNCTION(pmb_clk),
1031 FUNCTION(pmb_ext_ctrl),
1032 FUNCTION(ps_hold),
1033 FUNCTION(rpm_wdog),
1034 FUNCTION(sdc2),
1035 FUNCTION(sdc4),
1036 FUNCTION(sdc5),
1037 FUNCTION(slimbus1),
1038 FUNCTION(slimbus2),
1039 FUNCTION(spkr_i2s),
1040 FUNCTION(ssbi1),
1041 FUNCTION(ssbi2),
1042 FUNCTION(ssbi_ext_gps),
1043 FUNCTION(ssbi_pmic2),
1044 FUNCTION(ssbi_qpa1),
1045 FUNCTION(ssbi_ts),
1046 FUNCTION(tsif1),
1047 FUNCTION(tsif2),
1048 FUNCTION(ts_eoc),
1049 FUNCTION(usb_fs1),
1050 FUNCTION(usb_fs1_oe),
1051 FUNCTION(usb_fs1_oe_n),
1052 FUNCTION(usb_fs2),
1053 FUNCTION(usb_fs2_oe),
1054 FUNCTION(usb_fs2_oe_n),
1055 FUNCTION(vfe_camif_timer1_a),
1056 FUNCTION(vfe_camif_timer1_b),
1057 FUNCTION(vfe_camif_timer2),
1058 FUNCTION(vfe_camif_timer3_a),
1059 FUNCTION(vfe_camif_timer3_b),
1060 FUNCTION(vfe_camif_timer4_a),
1061 FUNCTION(vfe_camif_timer4_b),
1062 FUNCTION(vfe_camif_timer4_c),
1063 FUNCTION(vfe_camif_timer5_a),
1064 FUNCTION(vfe_camif_timer5_b),
1065 FUNCTION(vfe_camif_timer6_a),
1066 FUNCTION(vfe_camif_timer6_b),
1067 FUNCTION(vfe_camif_timer6_c),
1068 FUNCTION(vfe_camif_timer7_a),
1069 FUNCTION(vfe_camif_timer7_b),
1070 FUNCTION(vfe_camif_timer7_c),
1071 FUNCTION(wlan),
1074 static const struct msm_pingroup msm8960_groups[] = {
1075 PINGROUP(0, mdp_vsync, vfe_camif_timer6_b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1076 PINGROUP(1, mdp_vsync, vfe_camif_timer7_b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1077 PINGROUP(2, vfe_camif_timer1_a, gp_mn, NA, cam_mclk2, NA, NA, NA, NA, NA, NA, NA),
1078 PINGROUP(3, vfe_camif_timer2, gp_clk_0a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1079 PINGROUP(4, vfe_camif_timer3_a, cam_mclk1, gp_clk_1a, pmb_ext_ctrl, NA, NA, NA, NA, NA, NA, NA),
1080 PINGROUP(5, cam_mclk0, pmb_ext_ctrl, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1081 PINGROUP(6, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1082 PINGROUP(7, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1083 PINGROUP(8, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1084 PINGROUP(9, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1085 PINGROUP(10, gsbi2, ssbi_ts, NA, vfe_camif_timer4_c, NA, NA, NA, NA, NA, NA, NA),
1086 PINGROUP(11, gsbi2, ts_eoc, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1087 PINGROUP(12, gsbi2, rpm_wdog, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1088 PINGROUP(13, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1089 PINGROUP(14, gsbi3, gsbi1_spi_cs1_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1090 PINGROUP(15, gsbi3, gsbi1_spi_cs2a_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1091 PINGROUP(16, gsbi3, gsbi1_spi_cs3_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1092 PINGROUP(17, gsbi3, gsbi1_spi_cs2b_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1093 PINGROUP(18, gsbi4, gsbi11_spi_cs1b_n, NA, NA, gsbi4_3d_cam_i2c_l, vfe_camif_timer6_c, NA, NA, NA, NA, NA),
1094 PINGROUP(19, gsbi4, gsbi11_spi_cs2b_n, NA, mdp_vsync, NA, gsbi4_3d_cam_i2c_l, vfe_camif_timer7_c, NA, NA, NA, NA),
1095 PINGROUP(20, gsbi4, gsbi4_3d_cam_i2c_r, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1096 PINGROUP(21, gsbi4, pmb_clk, gsbi4_3d_cam_i2c_r, NA, NA, NA, NA, NA, NA, NA, NA),
1097 PINGROUP(22, gsbi5, ext_gps, NA, NA, NA, NA, NA, NA, NA, gsbi5_3d_cam_i2c_l, NA),
1098 PINGROUP(23, gsbi5, ssbi_ext_gps, NA, NA, NA, NA, NA, NA, NA, gsbi5_3d_cam_i2c_l, NA),
1099 PINGROUP(24, gsbi5, ext_gps, NA, NA, NA, NA, NA, NA, NA, gsbi5_3d_cam_i2c_r, NA),
1100 PINGROUP(25, gsbi5, ext_gps, NA, NA, NA, NA, NA, NA, NA, gsbi5_3d_cam_i2c_r, NA),
1101 PINGROUP(26, fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1102 PINGROUP(27, fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1103 PINGROUP(28, bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1104 PINGROUP(29, bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1105 PINGROUP(30, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1106 PINGROUP(31, gsbi7, usb_fs1_oe, usb_fs1_oe_n, NA, NA, NA, NA, NA, NA, NA, NA),
1107 PINGROUP(32, gsbi7, usb_fs1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1108 PINGROUP(33, gsbi7, usb_fs1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1109 PINGROUP(34, gsbi8, usb_fs2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1110 PINGROUP(35, gsbi8, usb_fs2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1111 PINGROUP(36, gsbi8, usb_fs2_oe, usb_fs2_oe_n, gsbi11_spi_cs1a_n, NA, NA, NA, NA, NA, NA, NA),
1112 PINGROUP(37, gsbi8, gps_pps_out, gps_pps_in, gsbi11_spi_cs2a_n, gp_clk_2b, NA, NA, NA, NA, NA, NA),
1113 PINGROUP(38, gsbi11, NA, NA, NA, NA, NA, NA, NA, NA, vfe_camif_timer1_b, NA),
1114 PINGROUP(39, gsbi11, gp_pdm_0b, NA, NA, NA, NA, NA, NA, NA, NA, vfe_camif_timer5_b),
1115 PINGROUP(40, gsbi11, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1116 PINGROUP(41, gsbi11, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1117 PINGROUP(42, gsbi12, slimbus2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1118 PINGROUP(43, gsbi12, slimbus2, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1119 PINGROUP(44, gsbi12, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1120 PINGROUP(45, gsbi12, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1121 PINGROUP(46, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1122 PINGROUP(47, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1123 PINGROUP(48, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1124 PINGROUP(49, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1125 PINGROUP(50, mi2s, slimbus1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1126 PINGROUP(51, mi2s, slimbus1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1127 PINGROUP(52, mi2s, gp_clk_2a, gsbi2_spi_cs1_n, NA, NA, NA, NA, NA, NA, NA, NA),
1128 PINGROUP(53, mi2s, gp_pdm_2b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1129 PINGROUP(54, codec_mic_i2s, gp_clk_0b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1130 PINGROUP(55, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1131 PINGROUP(56, codec_mic_i2s, gsbi2_spi_cs3_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1132 PINGROUP(57, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1133 PINGROUP(58, codec_mic_i2s, gp_pdm_0a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1134 PINGROUP(59, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1135 PINGROUP(60, slimbus1, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1136 PINGROUP(61, slimbus1, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1137 PINGROUP(62, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1138 PINGROUP(63, audio_pcm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1139 PINGROUP(64, audio_pcm, gp_pdm_1b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1140 PINGROUP(65, audio_pcm, vfe_camif_timer4_a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1141 PINGROUP(66, audio_pcm, vfe_camif_timer5_a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1142 PINGROUP(67, spkr_i2s, vfe_camif_timer7_a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1143 PINGROUP(68, spkr_i2s, gsbi2_spi_cs2_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1144 PINGROUP(69, spkr_i2s, gp_pdm_2a, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1145 PINGROUP(70, spkr_i2s, gp_clk_1b, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1146 PINGROUP(71, mic_i2s, gsbi10, vfe_camif_timer6_a, NA, NA, NA, NA, NA, NA, NA, NA),
1147 PINGROUP(72, mic_i2s, gsbi10, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1148 PINGROUP(73, mic_i2s, gsbi10, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1149 PINGROUP(74, mic_i2s, gsbi10, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1150 PINGROUP(75, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1151 PINGROUP(76, tsif1, gsbi11_spi_cs3_n, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1152 PINGROUP(77, tsif1, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1153 PINGROUP(78, tsif2, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1154 PINGROUP(79, tsif2, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1155 PINGROUP(80, tsif2, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1156 PINGROUP(81, tsif2, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1157 PINGROUP(82, tsif1, sdc5, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1158 PINGROUP(83, bt, sdc4, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1159 PINGROUP(84, wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1160 PINGROUP(85, wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1161 PINGROUP(86, wlan, sdc4, pmb_clk, NA, NA, NA, NA, NA, NA, NA, NA),
1162 PINGROUP(87, wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1163 PINGROUP(88, wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1164 PINGROUP(89, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1165 PINGROUP(90, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1166 PINGROUP(91, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1167 PINGROUP(92, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1168 PINGROUP(93, sdc2, gsbi9, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1169 PINGROUP(94, sdc2, gsbi9, gp_pdm_1a, NA, NA, NA, NA, NA, NA, NA, NA),
1170 PINGROUP(95, sdc2, gsbi9, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1171 PINGROUP(96, sdc2, gsbi9, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1172 PINGROUP(97, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1173 PINGROUP(98, sdc2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1174 PINGROUP(99, hdmi_cec, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1175 PINGROUP(100, hdmi_ddc_clock, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1176 PINGROUP(101, hdmi_ddc_data, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1177 PINGROUP(102, hdmi_hot_plug_detect, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1178 PINGROUP(103, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1179 PINGROUP(104, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1180 PINGROUP(105, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1181 PINGROUP(106, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1182 PINGROUP(107, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1183 PINGROUP(108, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1184 PINGROUP(109, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1185 PINGROUP(110, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1186 PINGROUP(111, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1187 PINGROUP(112, NA, pmb_clk, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1188 PINGROUP(113, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1189 PINGROUP(114, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1190 PINGROUP(115, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1191 PINGROUP(116, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1192 PINGROUP(117, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1193 PINGROUP(118, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1194 PINGROUP(119, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1195 PINGROUP(120, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1196 PINGROUP(121, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1197 PINGROUP(122, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1198 PINGROUP(123, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1199 PINGROUP(124, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1200 PINGROUP(125, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1201 PINGROUP(126, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1202 PINGROUP(127, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1203 PINGROUP(128, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1204 PINGROUP(129, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1205 PINGROUP(130, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1206 PINGROUP(131, NA, ssbi_qpa1, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1207 PINGROUP(132, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1208 PINGROUP(133, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1209 PINGROUP(134, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1210 PINGROUP(135, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1211 PINGROUP(136, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1212 PINGROUP(137, gps_blanking, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1213 PINGROUP(138, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1214 PINGROUP(139, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1215 PINGROUP(140, ssbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1216 PINGROUP(141, ssbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1217 PINGROUP(142, ssbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1218 PINGROUP(143, ssbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1219 PINGROUP(144, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1220 PINGROUP(145, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1221 PINGROUP(146, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1222 PINGROUP(147, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1223 PINGROUP(148, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1224 PINGROUP(149, ssbi_pmic2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1225 PINGROUP(150, hsic, NA, vfe_camif_timer4_b, NA, NA, NA, NA, NA, NA, NA, NA),
1226 PINGROUP(151, hsic, NA, vfe_camif_timer3_b, NA, NA, NA, NA, NA, NA, NA, NA),
1228 SDC_PINGROUP(sdc1_clk, 0x20a0, 13, 6),
1229 SDC_PINGROUP(sdc1_cmd, 0x20a0, 11, 3),
1230 SDC_PINGROUP(sdc1_data, 0x20a0, 9, 0),
1232 SDC_PINGROUP(sdc3_clk, 0x20a4, 14, 6),
1233 SDC_PINGROUP(sdc3_cmd, 0x20a4, 11, 3),
1234 SDC_PINGROUP(sdc3_data, 0x20a4, 9, 0),
1237 #define NUM_GPIO_PINGROUPS 152
1239 static const struct msm_pinctrl_soc_data msm8960_pinctrl = {
1240 .pins = msm8960_pins,
1241 .npins = ARRAY_SIZE(msm8960_pins),
1242 .functions = msm8960_functions,
1243 .nfunctions = ARRAY_SIZE(msm8960_functions),
1244 .groups = msm8960_groups,
1245 .ngroups = ARRAY_SIZE(msm8960_groups),
1246 .ngpios = NUM_GPIO_PINGROUPS,
1249 static int msm8960_pinctrl_probe(struct platform_device *pdev)
1251 return msm_pinctrl_probe(pdev, &msm8960_pinctrl);
1254 static const struct of_device_id msm8960_pinctrl_of_match[] = {
1255 { .compatible = "qcom,msm8960-pinctrl", },
1256 { },
1259 static struct platform_driver msm8960_pinctrl_driver = {
1260 .driver = {
1261 .name = "msm8960-pinctrl",
1262 .of_match_table = msm8960_pinctrl_of_match,
1264 .probe = msm8960_pinctrl_probe,
1265 .remove = msm_pinctrl_remove,
1268 static int __init msm8960_pinctrl_init(void)
1270 return platform_driver_register(&msm8960_pinctrl_driver);
1272 arch_initcall(msm8960_pinctrl_init);
1274 static void __exit msm8960_pinctrl_exit(void)
1276 platform_driver_unregister(&msm8960_pinctrl_driver);
1278 module_exit(msm8960_pinctrl_exit);
1280 MODULE_AUTHOR("Bjorn Andersson <bjorn.andersson@sonymobile.com>");
1281 MODULE_DESCRIPTION("Qualcomm MSM8960 pinctrl driver");
1282 MODULE_LICENSE("GPL v2");
1283 MODULE_DEVICE_TABLE(of, msm8960_pinctrl_of_match);