blob: 1c0c64cd60272fe038818aabd8be6dffe16546e6 [file] [log] [blame]
Swetha Chikkaboraiah9e9bf4b2018-03-06 11:51:26 +05301/* Copyright (c) 2015-2016, 2018, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <linux/module.h>
14#include <linux/of.h>
15#include <linux/platform_device.h>
16#include <linux/pinctrl/pinctrl.h>
17
18#include "pinctrl-msm.h"
19
20#define FUNCTION(fname) \
21 [msm_mux_##fname] = { \
22 .name = #fname, \
23 .groups = fname##_groups, \
24 .ngroups = ARRAY_SIZE(fname##_groups), \
25 }
26
27#define REG_BASE 0x0
28#define REG_SIZE 0x1000
29#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
30 { \
31 .name = "gpio" #id, \
32 .pins = gpio##id##_pins, \
33 .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \
34 .funcs = (int[]){ \
35 msm_mux_gpio, /* gpio mode */ \
36 msm_mux_##f1, \
37 msm_mux_##f2, \
38 msm_mux_##f3, \
39 msm_mux_##f4, \
40 msm_mux_##f5, \
41 msm_mux_##f6, \
42 msm_mux_##f7, \
43 msm_mux_##f8, \
44 msm_mux_##f9 \
45 }, \
46 .nfuncs = 10, \
47 .ctl_reg = REG_BASE + REG_SIZE * id, \
48 .io_reg = REG_BASE + 0x4 + REG_SIZE * id, \
49 .intr_cfg_reg = REG_BASE + 0x8 + REG_SIZE * id, \
50 .intr_status_reg = REG_BASE + 0xc + REG_SIZE * id, \
51 .intr_target_reg = REG_BASE + 0x8 + REG_SIZE * id, \
52 .mux_bit = 2, \
53 .pull_bit = 0, \
54 .drv_bit = 6, \
55 .oe_bit = 9, \
56 .in_bit = 0, \
57 .out_bit = 1, \
58 .intr_enable_bit = 0, \
59 .intr_status_bit = 0, \
60 .intr_target_bit = 5, \
61 .intr_target_kpss_val = 4, \
62 .intr_raw_status_bit = 4, \
63 .intr_polarity_bit = 1, \
64 .intr_detection_bit = 2, \
65 .intr_detection_width = 2, \
66 }
67
68#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \
69 { \
70 .name = #pg_name, \
71 .pins = pg_name##_pins, \
72 .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \
73 .ctl_reg = ctl, \
74 .io_reg = 0, \
75 .intr_cfg_reg = 0, \
76 .intr_status_reg = 0, \
77 .intr_target_reg = 0, \
78 .mux_bit = -1, \
79 .pull_bit = pull, \
80 .drv_bit = drv, \
81 .oe_bit = -1, \
82 .in_bit = -1, \
83 .out_bit = -1, \
84 .intr_enable_bit = -1, \
85 .intr_status_bit = -1, \
86 .intr_target_bit = -1, \
87 .intr_raw_status_bit = -1, \
88 .intr_polarity_bit = -1, \
89 .intr_detection_bit = -1, \
90 .intr_detection_width = -1, \
91 }
92static const struct pinctrl_pin_desc msm8917_pins[] = {
93 PINCTRL_PIN(0, "GPIO_0"),
94 PINCTRL_PIN(1, "GPIO_1"),
95 PINCTRL_PIN(2, "GPIO_2"),
96 PINCTRL_PIN(3, "GPIO_3"),
97 PINCTRL_PIN(4, "GPIO_4"),
98 PINCTRL_PIN(5, "GPIO_5"),
99 PINCTRL_PIN(6, "GPIO_6"),
100 PINCTRL_PIN(7, "GPIO_7"),
101 PINCTRL_PIN(8, "GPIO_8"),
102 PINCTRL_PIN(9, "GPIO_9"),
103 PINCTRL_PIN(10, "GPIO_10"),
104 PINCTRL_PIN(11, "GPIO_11"),
105 PINCTRL_PIN(12, "GPIO_12"),
106 PINCTRL_PIN(13, "GPIO_13"),
107 PINCTRL_PIN(14, "GPIO_14"),
108 PINCTRL_PIN(15, "GPIO_15"),
109 PINCTRL_PIN(16, "GPIO_16"),
110 PINCTRL_PIN(17, "GPIO_17"),
111 PINCTRL_PIN(18, "GPIO_18"),
112 PINCTRL_PIN(19, "GPIO_19"),
113 PINCTRL_PIN(20, "GPIO_20"),
114 PINCTRL_PIN(21, "GPIO_21"),
115 PINCTRL_PIN(22, "GPIO_22"),
116 PINCTRL_PIN(23, "GPIO_23"),
117 PINCTRL_PIN(24, "GPIO_24"),
118 PINCTRL_PIN(25, "GPIO_25"),
119 PINCTRL_PIN(26, "GPIO_26"),
120 PINCTRL_PIN(27, "GPIO_27"),
121 PINCTRL_PIN(28, "GPIO_28"),
122 PINCTRL_PIN(29, "GPIO_29"),
123 PINCTRL_PIN(30, "GPIO_30"),
124 PINCTRL_PIN(31, "GPIO_31"),
125 PINCTRL_PIN(32, "GPIO_32"),
126 PINCTRL_PIN(33, "GPIO_33"),
127 PINCTRL_PIN(34, "GPIO_34"),
128 PINCTRL_PIN(35, "GPIO_35"),
129 PINCTRL_PIN(36, "GPIO_36"),
130 PINCTRL_PIN(37, "GPIO_37"),
131 PINCTRL_PIN(38, "GPIO_38"),
132 PINCTRL_PIN(39, "GPIO_39"),
133 PINCTRL_PIN(40, "GPIO_40"),
134 PINCTRL_PIN(41, "GPIO_41"),
135 PINCTRL_PIN(42, "GPIO_42"),
136 PINCTRL_PIN(43, "GPIO_43"),
137 PINCTRL_PIN(44, "GPIO_44"),
138 PINCTRL_PIN(45, "GPIO_45"),
139 PINCTRL_PIN(46, "GPIO_46"),
140 PINCTRL_PIN(47, "GPIO_47"),
141 PINCTRL_PIN(48, "GPIO_48"),
142 PINCTRL_PIN(49, "GPIO_49"),
143 PINCTRL_PIN(50, "GPIO_50"),
144 PINCTRL_PIN(51, "GPIO_51"),
145 PINCTRL_PIN(52, "GPIO_52"),
146 PINCTRL_PIN(53, "GPIO_53"),
147 PINCTRL_PIN(54, "GPIO_54"),
148 PINCTRL_PIN(55, "GPIO_55"),
149 PINCTRL_PIN(56, "GPIO_56"),
150 PINCTRL_PIN(57, "GPIO_57"),
151 PINCTRL_PIN(58, "GPIO_58"),
152 PINCTRL_PIN(59, "GPIO_59"),
153 PINCTRL_PIN(60, "GPIO_60"),
154 PINCTRL_PIN(61, "GPIO_61"),
155 PINCTRL_PIN(62, "GPIO_62"),
156 PINCTRL_PIN(63, "GPIO_63"),
157 PINCTRL_PIN(64, "GPIO_64"),
158 PINCTRL_PIN(65, "GPIO_65"),
159 PINCTRL_PIN(66, "GPIO_66"),
160 PINCTRL_PIN(67, "GPIO_67"),
161 PINCTRL_PIN(68, "GPIO_68"),
162 PINCTRL_PIN(69, "GPIO_69"),
163 PINCTRL_PIN(70, "GPIO_70"),
164 PINCTRL_PIN(71, "GPIO_71"),
165 PINCTRL_PIN(72, "GPIO_72"),
166 PINCTRL_PIN(73, "GPIO_73"),
167 PINCTRL_PIN(74, "GPIO_74"),
168 PINCTRL_PIN(75, "GPIO_75"),
169 PINCTRL_PIN(76, "GPIO_76"),
170 PINCTRL_PIN(77, "GPIO_77"),
171 PINCTRL_PIN(78, "GPIO_78"),
172 PINCTRL_PIN(79, "GPIO_79"),
173 PINCTRL_PIN(80, "GPIO_80"),
174 PINCTRL_PIN(81, "GPIO_81"),
175 PINCTRL_PIN(82, "GPIO_82"),
176 PINCTRL_PIN(83, "GPIO_83"),
177 PINCTRL_PIN(84, "GPIO_84"),
178 PINCTRL_PIN(85, "GPIO_85"),
179 PINCTRL_PIN(86, "GPIO_86"),
180 PINCTRL_PIN(87, "GPIO_87"),
181 PINCTRL_PIN(88, "GPIO_88"),
182 PINCTRL_PIN(89, "GPIO_89"),
183 PINCTRL_PIN(90, "GPIO_90"),
184 PINCTRL_PIN(91, "GPIO_91"),
185 PINCTRL_PIN(92, "GPIO_92"),
186 PINCTRL_PIN(93, "GPIO_93"),
187 PINCTRL_PIN(94, "GPIO_94"),
188 PINCTRL_PIN(95, "GPIO_95"),
189 PINCTRL_PIN(96, "GPIO_96"),
190 PINCTRL_PIN(97, "GPIO_97"),
191 PINCTRL_PIN(98, "GPIO_98"),
192 PINCTRL_PIN(99, "GPIO_99"),
193 PINCTRL_PIN(100, "GPIO_100"),
194 PINCTRL_PIN(101, "GPIO_101"),
195 PINCTRL_PIN(102, "GPIO_102"),
196 PINCTRL_PIN(103, "GPIO_103"),
197 PINCTRL_PIN(104, "GPIO_104"),
198 PINCTRL_PIN(105, "GPIO_105"),
199 PINCTRL_PIN(106, "GPIO_106"),
200 PINCTRL_PIN(107, "GPIO_107"),
201 PINCTRL_PIN(108, "GPIO_108"),
202 PINCTRL_PIN(109, "GPIO_109"),
203 PINCTRL_PIN(110, "GPIO_110"),
204 PINCTRL_PIN(111, "GPIO_111"),
205 PINCTRL_PIN(112, "GPIO_112"),
206 PINCTRL_PIN(113, "GPIO_113"),
207 PINCTRL_PIN(114, "GPIO_114"),
208 PINCTRL_PIN(115, "GPIO_115"),
209 PINCTRL_PIN(116, "GPIO_116"),
210 PINCTRL_PIN(117, "GPIO_117"),
211 PINCTRL_PIN(118, "GPIO_118"),
212 PINCTRL_PIN(119, "GPIO_119"),
213 PINCTRL_PIN(120, "GPIO_120"),
214 PINCTRL_PIN(121, "GPIO_121"),
215 PINCTRL_PIN(122, "GPIO_122"),
216 PINCTRL_PIN(123, "GPIO_123"),
217 PINCTRL_PIN(124, "GPIO_124"),
218 PINCTRL_PIN(125, "GPIO_125"),
219 PINCTRL_PIN(126, "GPIO_126"),
220 PINCTRL_PIN(127, "GPIO_127"),
221 PINCTRL_PIN(128, "GPIO_128"),
222 PINCTRL_PIN(129, "GPIO_129"),
223 PINCTRL_PIN(130, "GPIO_130"),
224 PINCTRL_PIN(131, "GPIO_131"),
225 PINCTRL_PIN(132, "GPIO_132"),
226 PINCTRL_PIN(133, "GPIO_133"),
227 PINCTRL_PIN(134, "SDC1_CLK"),
228 PINCTRL_PIN(135, "SDC1_CMD"),
229 PINCTRL_PIN(136, "SDC1_DATA"),
230 PINCTRL_PIN(137, "SDC1_RCLK"),
231 PINCTRL_PIN(138, "SDC2_CLK"),
232 PINCTRL_PIN(139, "SDC2_CMD"),
233 PINCTRL_PIN(140, "SDC2_DATA"),
234 PINCTRL_PIN(141, "QDSD_CLK"),
235 PINCTRL_PIN(142, "QDSD_CMD"),
236 PINCTRL_PIN(143, "QDSD_DATA0"),
237 PINCTRL_PIN(144, "QDSD_DATA1"),
238 PINCTRL_PIN(145, "QDSD_DATA2"),
239 PINCTRL_PIN(146, "QDSD_DATA3"),
240};
241
242#define DECLARE_MSM_GPIO_PINS(pin) \
243 static const unsigned int gpio##pin##_pins[] = { pin }
244DECLARE_MSM_GPIO_PINS(0);
245DECLARE_MSM_GPIO_PINS(1);
246DECLARE_MSM_GPIO_PINS(2);
247DECLARE_MSM_GPIO_PINS(3);
248DECLARE_MSM_GPIO_PINS(4);
249DECLARE_MSM_GPIO_PINS(5);
250DECLARE_MSM_GPIO_PINS(6);
251DECLARE_MSM_GPIO_PINS(7);
252DECLARE_MSM_GPIO_PINS(8);
253DECLARE_MSM_GPIO_PINS(9);
254DECLARE_MSM_GPIO_PINS(10);
255DECLARE_MSM_GPIO_PINS(11);
256DECLARE_MSM_GPIO_PINS(12);
257DECLARE_MSM_GPIO_PINS(13);
258DECLARE_MSM_GPIO_PINS(14);
259DECLARE_MSM_GPIO_PINS(15);
260DECLARE_MSM_GPIO_PINS(16);
261DECLARE_MSM_GPIO_PINS(17);
262DECLARE_MSM_GPIO_PINS(18);
263DECLARE_MSM_GPIO_PINS(19);
264DECLARE_MSM_GPIO_PINS(20);
265DECLARE_MSM_GPIO_PINS(21);
266DECLARE_MSM_GPIO_PINS(22);
267DECLARE_MSM_GPIO_PINS(23);
268DECLARE_MSM_GPIO_PINS(24);
269DECLARE_MSM_GPIO_PINS(25);
270DECLARE_MSM_GPIO_PINS(26);
271DECLARE_MSM_GPIO_PINS(27);
272DECLARE_MSM_GPIO_PINS(28);
273DECLARE_MSM_GPIO_PINS(29);
274DECLARE_MSM_GPIO_PINS(30);
275DECLARE_MSM_GPIO_PINS(31);
276DECLARE_MSM_GPIO_PINS(32);
277DECLARE_MSM_GPIO_PINS(33);
278DECLARE_MSM_GPIO_PINS(34);
279DECLARE_MSM_GPIO_PINS(35);
280DECLARE_MSM_GPIO_PINS(36);
281DECLARE_MSM_GPIO_PINS(37);
282DECLARE_MSM_GPIO_PINS(38);
283DECLARE_MSM_GPIO_PINS(39);
284DECLARE_MSM_GPIO_PINS(40);
285DECLARE_MSM_GPIO_PINS(41);
286DECLARE_MSM_GPIO_PINS(42);
287DECLARE_MSM_GPIO_PINS(43);
288DECLARE_MSM_GPIO_PINS(44);
289DECLARE_MSM_GPIO_PINS(45);
290DECLARE_MSM_GPIO_PINS(46);
291DECLARE_MSM_GPIO_PINS(47);
292DECLARE_MSM_GPIO_PINS(48);
293DECLARE_MSM_GPIO_PINS(49);
294DECLARE_MSM_GPIO_PINS(50);
295DECLARE_MSM_GPIO_PINS(51);
296DECLARE_MSM_GPIO_PINS(52);
297DECLARE_MSM_GPIO_PINS(53);
298DECLARE_MSM_GPIO_PINS(54);
299DECLARE_MSM_GPIO_PINS(55);
300DECLARE_MSM_GPIO_PINS(56);
301DECLARE_MSM_GPIO_PINS(57);
302DECLARE_MSM_GPIO_PINS(58);
303DECLARE_MSM_GPIO_PINS(59);
304DECLARE_MSM_GPIO_PINS(60);
305DECLARE_MSM_GPIO_PINS(61);
306DECLARE_MSM_GPIO_PINS(62);
307DECLARE_MSM_GPIO_PINS(63);
308DECLARE_MSM_GPIO_PINS(64);
309DECLARE_MSM_GPIO_PINS(65);
310DECLARE_MSM_GPIO_PINS(66);
311DECLARE_MSM_GPIO_PINS(67);
312DECLARE_MSM_GPIO_PINS(68);
313DECLARE_MSM_GPIO_PINS(69);
314DECLARE_MSM_GPIO_PINS(70);
315DECLARE_MSM_GPIO_PINS(71);
316DECLARE_MSM_GPIO_PINS(72);
317DECLARE_MSM_GPIO_PINS(73);
318DECLARE_MSM_GPIO_PINS(74);
319DECLARE_MSM_GPIO_PINS(75);
320DECLARE_MSM_GPIO_PINS(76);
321DECLARE_MSM_GPIO_PINS(77);
322DECLARE_MSM_GPIO_PINS(78);
323DECLARE_MSM_GPIO_PINS(79);
324DECLARE_MSM_GPIO_PINS(80);
325DECLARE_MSM_GPIO_PINS(81);
326DECLARE_MSM_GPIO_PINS(82);
327DECLARE_MSM_GPIO_PINS(83);
328DECLARE_MSM_GPIO_PINS(84);
329DECLARE_MSM_GPIO_PINS(85);
330DECLARE_MSM_GPIO_PINS(86);
331DECLARE_MSM_GPIO_PINS(87);
332DECLARE_MSM_GPIO_PINS(88);
333DECLARE_MSM_GPIO_PINS(89);
334DECLARE_MSM_GPIO_PINS(90);
335DECLARE_MSM_GPIO_PINS(91);
336DECLARE_MSM_GPIO_PINS(92);
337DECLARE_MSM_GPIO_PINS(93);
338DECLARE_MSM_GPIO_PINS(94);
339DECLARE_MSM_GPIO_PINS(95);
340DECLARE_MSM_GPIO_PINS(96);
341DECLARE_MSM_GPIO_PINS(97);
342DECLARE_MSM_GPIO_PINS(98);
343DECLARE_MSM_GPIO_PINS(99);
344DECLARE_MSM_GPIO_PINS(100);
345DECLARE_MSM_GPIO_PINS(101);
346DECLARE_MSM_GPIO_PINS(102);
347DECLARE_MSM_GPIO_PINS(103);
348DECLARE_MSM_GPIO_PINS(104);
349DECLARE_MSM_GPIO_PINS(105);
350DECLARE_MSM_GPIO_PINS(106);
351DECLARE_MSM_GPIO_PINS(107);
352DECLARE_MSM_GPIO_PINS(108);
353DECLARE_MSM_GPIO_PINS(109);
354DECLARE_MSM_GPIO_PINS(110);
355DECLARE_MSM_GPIO_PINS(111);
356DECLARE_MSM_GPIO_PINS(112);
357DECLARE_MSM_GPIO_PINS(113);
358DECLARE_MSM_GPIO_PINS(114);
359DECLARE_MSM_GPIO_PINS(115);
360DECLARE_MSM_GPIO_PINS(116);
361DECLARE_MSM_GPIO_PINS(117);
362DECLARE_MSM_GPIO_PINS(118);
363DECLARE_MSM_GPIO_PINS(119);
364DECLARE_MSM_GPIO_PINS(120);
365DECLARE_MSM_GPIO_PINS(121);
366DECLARE_MSM_GPIO_PINS(122);
367DECLARE_MSM_GPIO_PINS(123);
368DECLARE_MSM_GPIO_PINS(124);
369DECLARE_MSM_GPIO_PINS(125);
370DECLARE_MSM_GPIO_PINS(126);
371DECLARE_MSM_GPIO_PINS(127);
372DECLARE_MSM_GPIO_PINS(128);
373DECLARE_MSM_GPIO_PINS(129);
374DECLARE_MSM_GPIO_PINS(130);
375DECLARE_MSM_GPIO_PINS(131);
376DECLARE_MSM_GPIO_PINS(132);
377DECLARE_MSM_GPIO_PINS(133);
378
379static const unsigned int sdc1_clk_pins[] = { 134 };
380static const unsigned int sdc1_cmd_pins[] = { 135 };
381static const unsigned int sdc1_data_pins[] = { 136 };
382static const unsigned int sdc1_rclk_pins[] = { 137 };
383static const unsigned int sdc2_clk_pins[] = { 138 };
384static const unsigned int sdc2_cmd_pins[] = { 139 };
385static const unsigned int sdc2_data_pins[] = { 140 };
386static const unsigned int qdsd_clk_pins[] = { 141 };
387static const unsigned int qdsd_cmd_pins[] = { 142 };
388static const unsigned int qdsd_data0_pins[] = { 143 };
389static const unsigned int qdsd_data1_pins[] = { 144 };
390static const unsigned int qdsd_data2_pins[] = { 145 };
391static const unsigned int qdsd_data3_pins[] = { 146 };
392
393enum msm8917_functions {
394 msm_mux_qdss_tracedata_b,
395 msm_mux_blsp_uart1,
396 msm_mux_gpio,
397 msm_mux_blsp_spi1,
398 msm_mux_adsp_ext,
399 msm_mux_blsp_i2c1,
400 msm_mux_prng_rosc,
401 msm_mux_qdss_cti_trig_out_b0,
402 msm_mux_blsp_spi2,
403 msm_mux_blsp_uart2,
404 msm_mux_blsp_uart3,
405 msm_mux_pbs0,
406 msm_mux_pbs1,
407 msm_mux_pwr_modem_enabled_b,
408 msm_mux_blsp_i2c3,
409 msm_mux_gcc_gp2_clk_b,
410 msm_mux_ldo_update,
411 msm_mux_atest_combodac_to_gpio_native,
412 msm_mux_ldo_en,
413 msm_mux_blsp_i2c2,
414 msm_mux_gcc_gp1_clk_b,
415 msm_mux_pbs2,
416 msm_mux_atest_gpsadc_dtest0_native,
417 msm_mux_blsp_spi3,
418 msm_mux_gcc_gp3_clk_b,
419 msm_mux_blsp_spi4,
420 msm_mux_blsp_uart4,
421 msm_mux_sec_mi2s,
422 msm_mux_pwr_nav_enabled_b,
423 msm_mux_codec_mad,
424 msm_mux_pwr_crypto_enabled_b,
425 msm_mux_blsp_i2c4,
426 msm_mux_blsp_spi5,
427 msm_mux_blsp_uart5,
428 msm_mux_qdss_traceclk_a,
429 msm_mux_atest_bbrx1,
430 msm_mux_m_voc,
431 msm_mux_qdss_cti_trig_in_a0,
432 msm_mux_qdss_cti_trig_in_b0,
433 msm_mux_blsp_i2c6,
434 msm_mux_qdss_traceclk_b,
435 msm_mux_atest_wlan0,
436 msm_mux_atest_bbrx0,
437 msm_mux_blsp_i2c5,
438 msm_mux_qdss_tracectl_a,
439 msm_mux_atest_gpsadc_dtest1_native,
440 msm_mux_qdss_tracedata_a,
441 msm_mux_blsp_spi6,
442 msm_mux_blsp_uart6,
443 msm_mux_qdss_tracectl_b,
444 msm_mux_atest_wlan1,
445 msm_mux_mdp_vsync,
446 msm_mux_pri_mi2s_mclk_a,
447 msm_mux_sec_mi2s_mclk_a,
448 msm_mux_cam_mclk,
449 msm_mux_cci_i2c,
450 msm_mux_pwr_modem_enabled_a,
451 msm_mux_cci_timer0,
452 msm_mux_cci_timer1,
453 msm_mux_cam1_standby,
454 msm_mux_pwr_nav_enabled_a,
455 msm_mux_cam1_rst,
456 msm_mux_pwr_crypto_enabled_a,
457 msm_mux_forced_usb,
458 msm_mux_qdss_cti_trig_out_b1,
459 msm_mux_cam2_rst,
460 msm_mux_webcam_standby,
461 msm_mux_cci_async,
462 msm_mux_webcam_rst,
463 msm_mux_ov_ldo,
464 msm_mux_sd_write,
465 msm_mux_accel_int,
466 msm_mux_gcc_gp1_clk_a,
467 msm_mux_alsp_int,
468 msm_mux_gcc_gp2_clk_a,
469 msm_mux_mag_int,
470 msm_mux_gcc_gp3_clk_a,
471 msm_mux_blsp6_spi,
472 msm_mux_fp_int,
473 msm_mux_qdss_cti_trig_in_b1,
474 msm_mux_uim_batt,
475 msm_mux_cam2_standby,
476 msm_mux_uim1_data,
477 msm_mux_uim1_clk,
478 msm_mux_uim1_reset,
479 msm_mux_uim1_present,
480 msm_mux_uim2_data,
481 msm_mux_uim2_clk,
482 msm_mux_uim2_reset,
483 msm_mux_uim2_present,
484 msm_mux_sensor_rst,
485 msm_mux_mipi_dsi0,
486 msm_mux_smb_int,
487 msm_mux_cam0_ldo,
488 msm_mux_us_euro,
489 msm_mux_atest_char3,
490 msm_mux_dbg_out,
491 msm_mux_bimc_dte0,
492 msm_mux_ts_resout,
493 msm_mux_ts_sample,
494 msm_mux_sec_mi2s_mclk_b,
495 msm_mux_pri_mi2s,
496 msm_mux_sdcard_det,
497 msm_mux_atest_char1,
498 msm_mux_ebi_cdc,
499 msm_mux_audio_reset,
500 msm_mux_atest_char0,
501 msm_mux_audio_ref,
502 msm_mux_cdc_pdm0,
503 msm_mux_pri_mi2s_mclk_b,
504 msm_mux_lpass_slimbus,
505 msm_mux_lpass_slimbus0,
506 msm_mux_lpass_slimbus1,
507 msm_mux_codec_int1,
508 msm_mux_codec_int2,
509 msm_mux_wcss_bt,
510 msm_mux_atest_char2,
511 msm_mux_ebi_ch0,
512 msm_mux_wcss_wlan2,
513 msm_mux_wcss_wlan1,
514 msm_mux_wcss_wlan0,
515 msm_mux_wcss_wlan,
516 msm_mux_wcss_fm,
517 msm_mux_ext_lpass,
518 msm_mux_cri_trng,
519 msm_mux_cri_trng1,
520 msm_mux_cri_trng0,
521 msm_mux_blsp_spi7,
522 msm_mux_blsp_uart7,
523 msm_mux_pri_mi2s_ws,
524 msm_mux_blsp_i2c7,
525 msm_mux_gcc_tlmm,
526 msm_mux_dmic0_clk,
527 msm_mux_dmic0_data,
528 msm_mux_key_volp,
529 msm_mux_qdss_cti_trig_in_a1,
530 msm_mux_us_emitter,
531 msm_mux_wsa_irq,
532 msm_mux_wsa_io,
533 msm_mux_blsp_spi8,
534 msm_mux_blsp_uart8,
535 msm_mux_blsp_i2c8,
536 msm_mux_gcc_plltest,
537 msm_mux_nav_pps_in_a,
538 msm_mux_pa_indicator,
539 msm_mux_modem_tsync,
540 msm_mux_nav_tsync,
541 msm_mux_nav_pps_in_b,
542 msm_mux_nav_pps,
543 msm_mux_gsm0_tx,
544 msm_mux_atest_char,
545 msm_mux_atest_tsens,
546 msm_mux_bimc_dte1,
547 msm_mux_ssbi_wtr1,
548 msm_mux_fp_gpio,
549 msm_mux_coex_uart,
550 msm_mux_key_snapshot,
551 msm_mux_key_focus,
552 msm_mux_nfc_pwr,
553 msm_mux_blsp8_spi,
554 msm_mux_qdss_cti_trig_out_a0,
555 msm_mux_qdss_cti_trig_out_a1,
556 msm_mux_NA,
557};
558
559static const char * const qdss_tracedata_b_groups[] = {
560 "gpio0", "gpio1", "gpio6", "gpio7", "gpio12", "gpio13", "gpio23",
561 "gpio42", "gpio43", "gpio44", "gpio47", "gpio66", "gpio86", "gpio87",
562 "gpio88", "gpio92",
563};
564static const char * const blsp_uart1_groups[] = {
565 "gpio0", "gpio1", "gpio2", "gpio3",
566};
567static const char * const gpio_groups[] = {
568 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
569 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
570 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
571 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
572 "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
573 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
574 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
575 "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
576 "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
577 "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
578 "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
579 "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
580 "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
581 "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
582 "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
583 "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
584 "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
585 "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
586 "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
587 "gpio129", "gpio130", "gpio131", "gpio132", "gpio133",
588};
589static const char * const blsp_spi1_groups[] = {
590 "gpio0", "gpio1", "gpio2", "gpio3",
591};
592static const char * const adsp_ext_groups[] = {
593 "gpio1",
594};
595static const char * const blsp_i2c1_groups[] = {
596 "gpio2", "gpio3",
597};
598static const char * const prng_rosc_groups[] = {
599 "gpio2",
600};
601static const char * const qdss_cti_trig_out_b0_groups[] = {
602 "gpio2",
603};
604static const char * const blsp_spi2_groups[] = {
605 "gpio4", "gpio5", "gpio6", "gpio7",
606};
607static const char * const blsp_uart2_groups[] = {
608 "gpio4", "gpio5", "gpio6", "gpio7",
609};
610static const char * const blsp_uart3_groups[] = {
611 "gpio8", "gpio9", "gpio10", "gpio11",
612};
613static const char * const pbs0_groups[] = {
614 "gpio8",
615};
616static const char * const pbs1_groups[] = {
617 "gpio9",
618};
619static const char * const pwr_modem_enabled_b_groups[] = {
620 "gpio9",
621};
622static const char * const blsp_i2c3_groups[] = {
623 "gpio10", "gpio11",
624};
625static const char * const gcc_gp2_clk_b_groups[] = {
626 "gpio10",
627};
628static const char * const ldo_update_groups[] = {
629 "gpio4",
630};
631static const char * const atest_combodac_to_gpio_native_groups[] = {
632 "gpio4", "gpio12", "gpio13", "gpio20", "gpio21", "gpio28", "gpio29",
633 "gpio30", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", "gpio44",
634 "gpio45", "gpio46", "gpio47", "gpio48", "gpio67", "gpio115",
635};
636static const char * const ldo_en_groups[] = {
637 "gpio5",
638};
639static const char * const blsp_i2c2_groups[] = {
640 "gpio6", "gpio7",
641};
642static const char * const gcc_gp1_clk_b_groups[] = {
643 "gpio6",
644};
645static const char * const pbs2_groups[] = {
646 "gpio7",
647};
648static const char * const atest_gpsadc_dtest0_native_groups[] = {
649 "gpio7",
650};
651static const char * const blsp_spi3_groups[] = {
652 "gpio8", "gpio9", "gpio10", "gpio11",
653};
654static const char * const gcc_gp3_clk_b_groups[] = {
655 "gpio11",
656};
657static const char * const blsp_spi4_groups[] = {
658 "gpio12", "gpio13", "gpio14", "gpio15",
659};
660static const char * const blsp_uart4_groups[] = {
661 "gpio12", "gpio13", "gpio14", "gpio15",
662};
663static const char * const sec_mi2s_groups[] = {
664 "gpio12", "gpio13", "gpio94", "gpio95",
665};
666static const char * const pwr_nav_enabled_b_groups[] = {
667 "gpio12",
668};
669static const char * const codec_mad_groups[] = {
670 "gpio13",
671};
672static const char * const pwr_crypto_enabled_b_groups[] = {
673 "gpio13",
674};
675static const char * const blsp_i2c4_groups[] = {
676 "gpio14", "gpio15",
677};
678static const char * const blsp_spi5_groups[] = {
679 "gpio16", "gpio17", "gpio18", "gpio19",
680};
681static const char * const blsp_uart5_groups[] = {
682 "gpio16", "gpio17", "gpio18", "gpio19",
683};
684static const char * const qdss_traceclk_a_groups[] = {
685 "gpio16",
686};
687static const char * const atest_bbrx1_groups[] = {
688 "gpio16",
689};
690static const char * const m_voc_groups[] = {
691 "gpio17", "gpio21",
692};
693static const char * const qdss_cti_trig_in_a0_groups[] = {
694 "gpio17",
695};
696static const char * const qdss_cti_trig_in_b0_groups[] = {
697 "gpio21",
698};
699static const char * const blsp_i2c6_groups[] = {
700 "gpio22", "gpio23",
701};
702static const char * const qdss_traceclk_b_groups[] = {
703 "gpio22",
704};
705static const char * const atest_wlan0_groups[] = {
706 "gpio22",
707};
708static const char * const atest_bbrx0_groups[] = {
709 "gpio17",
710};
711static const char * const blsp_i2c5_groups[] = {
712 "gpio18", "gpio19",
713};
714static const char * const qdss_tracectl_a_groups[] = {
715 "gpio18",
716};
717static const char * const atest_gpsadc_dtest1_native_groups[] = {
718 "gpio18",
719};
720static const char * const qdss_tracedata_a_groups[] = {
721 "gpio19", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31",
722 "gpio32", "gpio33", "gpio34", "gpio35", "gpio36", "gpio38", "gpio39",
723 "gpio40", "gpio50",
724};
725static const char * const blsp_spi6_groups[] = {
726 "gpio20", "gpio21", "gpio22", "gpio23",
727};
728static const char * const blsp_uart6_groups[] = {
729 "gpio20", "gpio21", "gpio22", "gpio23",
730};
731static const char * const qdss_tracectl_b_groups[] = {
732 "gpio20",
733};
734static const char * const atest_wlan1_groups[] = {
735 "gpio23",
736};
737static const char * const mdp_vsync_groups[] = {
738 "gpio24", "gpio25",
739};
740static const char * const pri_mi2s_mclk_a_groups[] = {
741 "gpio25",
742};
743static const char * const sec_mi2s_mclk_a_groups[] = {
744 "gpio25",
745};
746static const char * const cam_mclk_groups[] = {
747 "gpio26", "gpio27", "gpio28",
748};
749static const char * const cci_i2c_groups[] = {
750 "gpio29", "gpio30", "gpio31", "gpio32",
751};
752static const char * const pwr_modem_enabled_a_groups[] = {
753 "gpio29",
754};
755static const char * const cci_timer0_groups[] = {
756 "gpio33",
757};
758static const char * const cci_timer1_groups[] = {
759 "gpio34",
760};
761static const char * const cam1_standby_groups[] = {
762 "gpio35",
763};
764static const char * const pwr_nav_enabled_a_groups[] = {
765 "gpio35",
766};
767static const char * const cam1_rst_groups[] = {
768 "gpio36",
769};
770static const char * const pwr_crypto_enabled_a_groups[] = {
771 "gpio36",
772};
773static const char * const forced_usb_groups[] = {
774 "gpio37",
775};
776static const char * const qdss_cti_trig_out_b1_groups[] = {
777 "gpio37",
778};
779static const char * const cam2_rst_groups[] = {
780 "gpio38",
781};
782static const char * const webcam_standby_groups[] = {
783 "gpio39",
784};
785static const char * const cci_async_groups[] = {
786 "gpio39",
787};
788static const char * const webcam_rst_groups[] = {
789 "gpio40",
790};
791static const char * const ov_ldo_groups[] = {
792 "gpio41",
793};
794static const char * const sd_write_groups[] = {
795 "gpio41",
796};
797static const char * const accel_int_groups[] = {
798 "gpio42",
799};
800static const char * const gcc_gp1_clk_a_groups[] = {
801 "gpio42",
802};
803static const char * const alsp_int_groups[] = {
804 "gpio43",
805};
806static const char * const gcc_gp2_clk_a_groups[] = {
807 "gpio43",
808};
809static const char * const mag_int_groups[] = {
810 "gpio44",
811};
812static const char * const gcc_gp3_clk_a_groups[] = {
813 "gpio44",
814};
815static const char * const blsp6_spi_groups[] = {
816 "gpio47",
817};
818static const char * const fp_int_groups[] = {
819 "gpio48",
820};
821static const char * const qdss_cti_trig_in_b1_groups[] = {
822 "gpio48",
823};
824static const char * const uim_batt_groups[] = {
825 "gpio49",
826};
827static const char * const cam2_standby_groups[] = {
828 "gpio50",
829};
830static const char * const uim1_data_groups[] = {
831 "gpio51",
832};
833static const char * const uim1_clk_groups[] = {
834 "gpio52",
835};
836static const char * const uim1_reset_groups[] = {
837 "gpio53",
838};
839static const char * const uim1_present_groups[] = {
840 "gpio54",
841};
842static const char * const uim2_data_groups[] = {
843 "gpio55",
844};
845static const char * const uim2_clk_groups[] = {
846 "gpio56",
847};
848static const char * const uim2_reset_groups[] = {
849 "gpio57",
850};
851static const char * const uim2_present_groups[] = {
852 "gpio58",
853};
854static const char * const sensor_rst_groups[] = {
855 "gpio59",
856};
857static const char * const mipi_dsi0_groups[] = {
858 "gpio60",
859};
860static const char * const smb_int_groups[] = {
861 "gpio61",
862};
863static const char * const cam0_ldo_groups[] = {
864 "gpio62",
865};
866static const char * const us_euro_groups[] = {
867 "gpio63",
868};
869static const char * const atest_char3_groups[] = {
870 "gpio63",
871};
872static const char * const dbg_out_groups[] = {
873 "gpio63",
874};
875static const char * const bimc_dte0_groups[] = {
876 "gpio63", "gpio65",
877};
878static const char * const ts_resout_groups[] = {
879 "gpio64",
880};
881static const char * const ts_sample_groups[] = {
882 "gpio65",
883};
884static const char * const sec_mi2s_mclk_b_groups[] = {
885 "gpio66",
886};
887static const char * const pri_mi2s_groups[] = {
888 "gpio66", "gpio85", "gpio86", "gpio88", "gpio94", "gpio95",
889};
890static const char * const sdcard_det_groups[] = {
891 "gpio67",
892};
893static const char * const atest_char1_groups[] = {
894 "gpio67",
895};
896static const char * const ebi_cdc_groups[] = {
897 "gpio67", "gpio69", "gpio118", "gpio119", "gpio120", "gpio123",
898};
899static const char * const audio_reset_groups[] = {
900 "gpio68",
901};
902static const char * const atest_char0_groups[] = {
903 "gpio68",
904};
905static const char * const audio_ref_groups[] = {
906 "gpio69",
907};
908static const char * const cdc_pdm0_groups[] = {
909 "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74",
910};
911static const char * const pri_mi2s_mclk_b_groups[] = {
912 "gpio69",
913};
914static const char * const lpass_slimbus_groups[] = {
915 "gpio70",
916};
917static const char * const lpass_slimbus0_groups[] = {
918 "gpio71",
919};
920static const char * const lpass_slimbus1_groups[] = {
921 "gpio72",
922};
923static const char * const codec_int1_groups[] = {
924 "gpio73",
925};
926static const char * const codec_int2_groups[] = {
927 "gpio74",
928};
929static const char * const wcss_bt_groups[] = {
930 "gpio75", "gpio83", "gpio84",
931};
932static const char * const atest_char2_groups[] = {
933 "gpio75",
934};
935static const char * const ebi_ch0_groups[] = {
936 "gpio75",
937};
938static const char * const wcss_wlan2_groups[] = {
939 "gpio76",
940};
941static const char * const wcss_wlan1_groups[] = {
942 "gpio77",
943};
944static const char * const wcss_wlan0_groups[] = {
945 "gpio78",
946};
947static const char * const wcss_wlan_groups[] = {
948 "gpio79", "gpio80",
949};
950static const char * const wcss_fm_groups[] = {
951 "gpio81", "gpio82",
952};
953static const char * const ext_lpass_groups[] = {
954 "gpio81",
955};
956static const char * const cri_trng_groups[] = {
957 "gpio82",
958};
959static const char * const cri_trng1_groups[] = {
960 "gpio83",
961};
962static const char * const cri_trng0_groups[] = {
963 "gpio84",
964};
965static const char * const blsp_spi7_groups[] = {
966 "gpio85", "gpio86", "gpio87", "gpio88",
967};
968static const char * const blsp_uart7_groups[] = {
969 "gpio85", "gpio86", "gpio87", "gpio88",
970};
971static const char * const pri_mi2s_ws_groups[] = {
972 "gpio87",
973};
974static const char * const blsp_i2c7_groups[] = {
975 "gpio87", "gpio88",
976};
977static const char * const gcc_tlmm_groups[] = {
978 "gpio87",
979};
980static const char * const dmic0_clk_groups[] = {
981 "gpio89",
982};
983static const char * const dmic0_data_groups[] = {
984 "gpio90",
985};
986static const char * const key_volp_groups[] = {
987 "gpio91",
988};
989static const char * const qdss_cti_trig_in_a1_groups[] = {
990 "gpio91",
991};
992static const char * const us_emitter_groups[] = {
993 "gpio92",
994};
995static const char * const wsa_irq_groups[] = {
996 "gpio93",
997};
998static const char * const wsa_io_groups[] = {
999 "gpio94", "gpio95",
1000};
1001static const char * const blsp_spi8_groups[] = {
1002 "gpio96", "gpio97", "gpio98", "gpio99",
1003};
1004static const char * const blsp_uart8_groups[] = {
1005 "gpio96", "gpio97", "gpio98", "gpio99",
1006};
1007static const char * const blsp_i2c8_groups[] = {
1008 "gpio98", "gpio99",
1009};
1010static const char * const gcc_plltest_groups[] = {
1011 "gpio98", "gpio99",
1012};
1013static const char * const nav_pps_in_a_groups[] = {
1014 "gpio115",
1015};
1016static const char * const pa_indicator_groups[] = {
1017 "gpio116",
1018};
1019static const char * const modem_tsync_groups[] = {
1020 "gpio117",
1021};
1022static const char * const nav_tsync_groups[] = {
1023 "gpio117",
1024};
1025static const char * const nav_pps_in_b_groups[] = {
1026 "gpio117",
1027};
1028static const char * const nav_pps_groups[] = {
1029 "gpio117",
1030};
1031static const char * const gsm0_tx_groups[] = {
1032 "gpio119",
1033};
1034static const char * const atest_char_groups[] = {
1035 "gpio120",
1036};
1037static const char * const atest_tsens_groups[] = {
1038 "gpio120",
1039};
1040static const char * const bimc_dte1_groups[] = {
1041 "gpio121", "gpio122",
1042};
1043static const char * const ssbi_wtr1_groups[] = {
1044 "gpio122", "gpio123",
1045};
1046static const char * const fp_gpio_groups[] = {
1047 "gpio124",
1048};
1049static const char * const coex_uart_groups[] = {
1050 "gpio124", "gpio127",
1051};
1052static const char * const key_snapshot_groups[] = {
1053 "gpio127",
1054};
1055static const char * const key_focus_groups[] = {
1056 "gpio128",
1057};
1058static const char * const nfc_pwr_groups[] = {
1059 "gpio129",
1060};
1061static const char * const blsp8_spi_groups[] = {
1062 "gpio130",
1063};
1064static const char * const qdss_cti_trig_out_a0_groups[] = {
1065 "gpio132",
1066};
1067static const char * const qdss_cti_trig_out_a1_groups[] = {
1068 "gpio133",
1069};
1070
1071static const struct msm_function msm8917_functions[] = {
1072 FUNCTION(qdss_tracedata_b),
1073 FUNCTION(blsp_uart1),
1074 FUNCTION(gpio),
1075 FUNCTION(blsp_spi1),
1076 FUNCTION(adsp_ext),
1077 FUNCTION(blsp_i2c1),
1078 FUNCTION(prng_rosc),
1079 FUNCTION(qdss_cti_trig_out_b0),
1080 FUNCTION(blsp_spi2),
1081 FUNCTION(blsp_uart2),
1082 FUNCTION(blsp_uart3),
1083 FUNCTION(pbs0),
1084 FUNCTION(pbs1),
1085 FUNCTION(pwr_modem_enabled_b),
1086 FUNCTION(blsp_i2c3),
1087 FUNCTION(gcc_gp2_clk_b),
1088 FUNCTION(ldo_update),
1089 FUNCTION(atest_combodac_to_gpio_native),
1090 FUNCTION(ldo_en),
1091 FUNCTION(blsp_i2c2),
1092 FUNCTION(gcc_gp1_clk_b),
1093 FUNCTION(pbs2),
1094 FUNCTION(atest_gpsadc_dtest0_native),
1095 FUNCTION(blsp_spi3),
1096 FUNCTION(gcc_gp3_clk_b),
1097 FUNCTION(blsp_spi4),
1098 FUNCTION(blsp_uart4),
1099 FUNCTION(sec_mi2s),
1100 FUNCTION(pwr_nav_enabled_b),
1101 FUNCTION(codec_mad),
1102 FUNCTION(pwr_crypto_enabled_b),
1103 FUNCTION(blsp_i2c4),
1104 FUNCTION(blsp_spi5),
1105 FUNCTION(blsp_uart5),
1106 FUNCTION(qdss_traceclk_a),
1107 FUNCTION(atest_bbrx1),
1108 FUNCTION(m_voc),
1109 FUNCTION(qdss_cti_trig_in_a0),
1110 FUNCTION(qdss_cti_trig_in_b0),
1111 FUNCTION(blsp_i2c6),
1112 FUNCTION(qdss_traceclk_b),
1113 FUNCTION(atest_wlan0),
1114 FUNCTION(atest_bbrx0),
1115 FUNCTION(blsp_i2c5),
1116 FUNCTION(qdss_tracectl_a),
1117 FUNCTION(atest_gpsadc_dtest1_native),
1118 FUNCTION(qdss_tracedata_a),
1119 FUNCTION(blsp_spi6),
1120 FUNCTION(blsp_uart6),
1121 FUNCTION(qdss_tracectl_b),
1122 FUNCTION(atest_wlan1),
1123 FUNCTION(mdp_vsync),
1124 FUNCTION(pri_mi2s_mclk_a),
1125 FUNCTION(sec_mi2s_mclk_a),
1126 FUNCTION(cam_mclk),
1127 FUNCTION(cci_i2c),
1128 FUNCTION(pwr_modem_enabled_a),
1129 FUNCTION(cci_timer0),
1130 FUNCTION(cci_timer1),
1131 FUNCTION(cam1_standby),
1132 FUNCTION(pwr_nav_enabled_a),
1133 FUNCTION(cam1_rst),
1134 FUNCTION(pwr_crypto_enabled_a),
1135 FUNCTION(forced_usb),
1136 FUNCTION(qdss_cti_trig_out_b1),
1137 FUNCTION(cam2_rst),
1138 FUNCTION(webcam_standby),
1139 FUNCTION(cci_async),
1140 FUNCTION(webcam_rst),
1141 FUNCTION(ov_ldo),
1142 FUNCTION(sd_write),
1143 FUNCTION(accel_int),
1144 FUNCTION(gcc_gp1_clk_a),
1145 FUNCTION(alsp_int),
1146 FUNCTION(gcc_gp2_clk_a),
1147 FUNCTION(mag_int),
1148 FUNCTION(gcc_gp3_clk_a),
1149 FUNCTION(blsp6_spi),
1150 FUNCTION(fp_int),
1151 FUNCTION(qdss_cti_trig_in_b1),
1152 FUNCTION(uim_batt),
1153 FUNCTION(cam2_standby),
1154 FUNCTION(uim1_data),
1155 FUNCTION(uim1_clk),
1156 FUNCTION(uim1_reset),
1157 FUNCTION(uim1_present),
1158 FUNCTION(uim2_data),
1159 FUNCTION(uim2_clk),
1160 FUNCTION(uim2_reset),
1161 FUNCTION(uim2_present),
1162 FUNCTION(sensor_rst),
1163 FUNCTION(mipi_dsi0),
1164 FUNCTION(smb_int),
1165 FUNCTION(cam0_ldo),
1166 FUNCTION(us_euro),
1167 FUNCTION(atest_char3),
1168 FUNCTION(dbg_out),
1169 FUNCTION(bimc_dte0),
1170 FUNCTION(ts_resout),
1171 FUNCTION(ts_sample),
1172 FUNCTION(sec_mi2s_mclk_b),
1173 FUNCTION(pri_mi2s),
1174 FUNCTION(sdcard_det),
1175 FUNCTION(atest_char1),
1176 FUNCTION(ebi_cdc),
1177 FUNCTION(audio_reset),
1178 FUNCTION(atest_char0),
1179 FUNCTION(audio_ref),
1180 FUNCTION(cdc_pdm0),
1181 FUNCTION(pri_mi2s_mclk_b),
1182 FUNCTION(lpass_slimbus),
1183 FUNCTION(lpass_slimbus0),
1184 FUNCTION(lpass_slimbus1),
1185 FUNCTION(codec_int1),
1186 FUNCTION(codec_int2),
1187 FUNCTION(wcss_bt),
1188 FUNCTION(atest_char2),
1189 FUNCTION(ebi_ch0),
1190 FUNCTION(wcss_wlan2),
1191 FUNCTION(wcss_wlan1),
1192 FUNCTION(wcss_wlan0),
1193 FUNCTION(wcss_wlan),
1194 FUNCTION(wcss_fm),
1195 FUNCTION(ext_lpass),
1196 FUNCTION(cri_trng),
1197 FUNCTION(cri_trng1),
1198 FUNCTION(cri_trng0),
1199 FUNCTION(blsp_spi7),
1200 FUNCTION(blsp_uart7),
1201 FUNCTION(pri_mi2s_ws),
1202 FUNCTION(blsp_i2c7),
1203 FUNCTION(gcc_tlmm),
1204 FUNCTION(dmic0_clk),
1205 FUNCTION(dmic0_data),
1206 FUNCTION(key_volp),
1207 FUNCTION(qdss_cti_trig_in_a1),
1208 FUNCTION(us_emitter),
1209 FUNCTION(wsa_irq),
1210 FUNCTION(wsa_io),
1211 FUNCTION(blsp_spi8),
1212 FUNCTION(blsp_uart8),
1213 FUNCTION(blsp_i2c8),
1214 FUNCTION(gcc_plltest),
1215 FUNCTION(nav_pps_in_a),
1216 FUNCTION(pa_indicator),
1217 FUNCTION(modem_tsync),
1218 FUNCTION(nav_tsync),
1219 FUNCTION(nav_pps_in_b),
1220 FUNCTION(nav_pps),
1221 FUNCTION(gsm0_tx),
1222 FUNCTION(atest_char),
1223 FUNCTION(atest_tsens),
1224 FUNCTION(bimc_dte1),
1225 FUNCTION(ssbi_wtr1),
1226 FUNCTION(fp_gpio),
1227 FUNCTION(coex_uart),
1228 FUNCTION(key_snapshot),
1229 FUNCTION(key_focus),
1230 FUNCTION(nfc_pwr),
1231 FUNCTION(blsp8_spi),
1232 FUNCTION(qdss_cti_trig_out_a0),
1233 FUNCTION(qdss_cti_trig_out_a1),
1234};
1235
1236static const struct msm_pingroup msm8917_groups[] = {
1237 PINGROUP(0, blsp_spi1, blsp_uart1, qdss_tracedata_b, NA, NA, NA, NA,
1238 NA, NA),
1239 PINGROUP(1, blsp_spi1, blsp_uart1, adsp_ext, NA, NA, NA, NA, NA,
1240 qdss_tracedata_b),
1241 PINGROUP(2, blsp_spi1, blsp_uart1, blsp_i2c1, prng_rosc, NA, NA, NA,
1242 NA, NA),
1243 PINGROUP(3, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA, NA, NA),
1244 PINGROUP(4, blsp_spi2, blsp_uart2, ldo_update, NA,
1245 atest_combodac_to_gpio_native, NA, NA, NA, NA),
1246 PINGROUP(5, blsp_spi2, blsp_uart2, ldo_en, NA, NA, NA, NA, NA, NA),
1247 PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, gcc_gp1_clk_b,
1248 qdss_tracedata_b, NA, NA, NA, NA),
1249 PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, pbs2, NA,
1250 qdss_tracedata_b, NA, atest_gpsadc_dtest0_native, NA),
1251 PINGROUP(8, blsp_spi3, blsp_uart3, pbs0, NA, NA, NA, NA, NA, NA),
1252 PINGROUP(9, blsp_spi3, blsp_uart3, pbs1, pwr_modem_enabled_b, NA, NA,
1253 NA, NA, NA),
1254 PINGROUP(10, blsp_spi3, blsp_uart3, blsp_i2c3, gcc_gp2_clk_b, NA, NA,
1255 NA, NA, NA),
1256 PINGROUP(11, blsp_spi3, blsp_uart3, blsp_i2c3, gcc_gp3_clk_b, NA, NA,
1257 NA, NA, NA),
1258 PINGROUP(12, blsp_spi4, blsp_uart4, sec_mi2s, pwr_nav_enabled_b, NA,
1259 NA, NA, NA, NA),
1260 PINGROUP(13, blsp_spi4, blsp_uart4, sec_mi2s, pwr_crypto_enabled_b, NA,
1261 NA, NA, NA, NA),
1262 PINGROUP(14, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA, NA, NA, NA),
1263 PINGROUP(15, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA, NA, NA, NA),
1264 PINGROUP(16, blsp_spi5, blsp_uart5, NA, NA, NA, NA, qdss_traceclk_a,
1265 NA, atest_bbrx1),
1266 PINGROUP(17, blsp_spi5, blsp_uart5, m_voc, qdss_cti_trig_in_a0, NA,
1267 atest_bbrx0, NA, NA, NA),
1268 PINGROUP(18, blsp_spi5, blsp_uart5, blsp_i2c5, qdss_tracectl_a, NA,
1269 atest_gpsadc_dtest1_native, NA, NA, NA),
1270 PINGROUP(19, blsp_spi5, blsp_uart5, blsp_i2c5, qdss_tracedata_a, NA,
1271 NA, NA, NA, NA),
1272 PINGROUP(20, blsp_spi6, blsp_uart6, NA, NA, NA, NA, NA, NA,
1273 qdss_tracectl_b),
1274 PINGROUP(21, blsp_spi6, blsp_uart6, m_voc, NA, NA, NA, NA, NA,
1275 qdss_cti_trig_in_b0),
1276 PINGROUP(22, blsp_spi6, blsp_uart6, blsp_i2c6, qdss_traceclk_b, NA,
1277 atest_wlan0, NA, NA, NA),
1278 PINGROUP(23, blsp_spi6, blsp_uart6, blsp_i2c6, qdss_tracedata_b, NA,
1279 atest_wlan1, NA, NA, NA),
1280 PINGROUP(24, mdp_vsync, NA, NA, NA, NA, NA, NA, NA, NA),
1281 PINGROUP(25, mdp_vsync, pri_mi2s_mclk_a, sec_mi2s_mclk_a, NA, NA, NA,
1282 NA, NA, NA),
1283 PINGROUP(26, cam_mclk, NA, NA, NA, NA, NA, qdss_tracedata_a, NA, NA),
1284 PINGROUP(27, cam_mclk, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1285 PINGROUP(28, cam_mclk, NA, NA, NA, NA, NA, qdss_tracedata_a, NA,
1286 atest_combodac_to_gpio_native),
1287 PINGROUP(29, cci_i2c, pwr_modem_enabled_a, NA, NA, NA, NA, NA,
1288 qdss_tracedata_a, NA),
1289 PINGROUP(30, cci_i2c, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1290 PINGROUP(31, cci_i2c, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1291 PINGROUP(32, cci_i2c, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1292 PINGROUP(33, cci_timer0, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1293 PINGROUP(34, cci_timer1, NA, NA, NA, NA, NA, NA, NA, qdss_tracedata_a),
1294 PINGROUP(35, pwr_nav_enabled_a, NA, NA, NA, NA, NA, NA, NA,
1295 qdss_tracedata_a),
1296 PINGROUP(36, pwr_crypto_enabled_a, NA, NA, NA, NA, NA, NA, NA,
1297 qdss_tracedata_a),
1298 PINGROUP(37, NA, NA, NA, NA, NA, qdss_cti_trig_out_b1, NA, NA, NA),
1299 PINGROUP(38, NA, qdss_tracedata_a, NA, NA, NA, NA, NA, NA, NA),
1300 PINGROUP(39, cci_async, NA, NA, NA, NA, NA, qdss_tracedata_a, NA,
1301 atest_combodac_to_gpio_native),
1302 PINGROUP(40, NA, NA, NA, NA, qdss_tracedata_a, NA,
1303 atest_combodac_to_gpio_native, NA, NA),
1304 PINGROUP(41, sd_write, NA, NA, NA, NA, NA, NA, NA,
1305 atest_combodac_to_gpio_native),
1306 PINGROUP(42, gcc_gp1_clk_a, qdss_tracedata_b, NA,
1307 atest_combodac_to_gpio_native, NA, NA, NA, NA, NA),
1308 PINGROUP(43, gcc_gp2_clk_a, qdss_tracedata_b, NA,
1309 atest_combodac_to_gpio_native, NA, NA, NA, NA, NA),
1310 PINGROUP(44, gcc_gp3_clk_a, qdss_tracedata_b, NA,
1311 atest_combodac_to_gpio_native, NA, NA, NA, NA, NA),
1312 PINGROUP(45, NA, NA, atest_combodac_to_gpio_native, NA, NA, NA, NA, NA,
1313 NA),
1314 PINGROUP(46, NA, NA, atest_combodac_to_gpio_native, NA, NA, NA, NA, NA,
1315 NA),
1316 PINGROUP(47, blsp6_spi, NA, qdss_tracedata_b, NA,
1317 atest_combodac_to_gpio_native, NA, NA, NA, NA),
1318 PINGROUP(48, NA, qdss_cti_trig_in_b1, NA,
1319 atest_combodac_to_gpio_native, NA, NA, NA, NA, NA),
1320 PINGROUP(49, uim_batt, NA, NA, NA, NA, NA, NA, NA, NA),
1321 PINGROUP(50, qdss_tracedata_a, NA, NA, NA, NA, NA, NA, NA, NA),
1322 PINGROUP(51, uim1_data, NA, NA, NA, NA, NA, NA, NA, NA),
1323 PINGROUP(52, uim1_clk, NA, NA, NA, NA, NA, NA, NA, NA),
1324 PINGROUP(53, uim1_reset, NA, NA, NA, NA, NA, NA, NA, NA),
1325 PINGROUP(54, uim1_present, NA, NA, NA, NA, NA, NA, NA, NA),
1326 PINGROUP(55, uim2_data, NA, NA, NA, NA, NA, NA, NA, NA),
1327 PINGROUP(56, uim2_clk, NA, NA, NA, NA, NA, NA, NA, NA),
1328 PINGROUP(57, uim2_reset, NA, NA, NA, NA, NA, NA, NA, NA),
1329 PINGROUP(58, uim2_present, NA, NA, NA, NA, NA, NA, NA, NA),
1330 PINGROUP(59, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1331 PINGROUP(60, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1332 PINGROUP(61, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1333 PINGROUP(62, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1334 PINGROUP(63, atest_char3, dbg_out, bimc_dte0, NA, NA, NA, NA, NA, NA),
1335 PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1336 PINGROUP(65, bimc_dte0, NA, NA, NA, NA, NA, NA, NA, NA),
1337 PINGROUP(66, sec_mi2s_mclk_b, pri_mi2s, NA, qdss_tracedata_b, NA, NA,
1338 NA, NA, NA),
1339 PINGROUP(67, atest_char1, ebi_cdc, NA, atest_combodac_to_gpio_native,
1340 NA, NA, NA, NA, NA),
1341 PINGROUP(68, atest_char0, NA, NA, NA, NA, NA, NA, NA, NA),
1342 PINGROUP(69, audio_ref, cdc_pdm0, pri_mi2s_mclk_b, ebi_cdc, NA, NA, NA,
1343 NA, NA),
1344 PINGROUP(70, lpass_slimbus, cdc_pdm0, NA, NA, NA, NA, NA, NA, NA),
1345 PINGROUP(71, lpass_slimbus0, cdc_pdm0, NA, NA, NA, NA, NA, NA, NA),
1346 PINGROUP(72, lpass_slimbus1, cdc_pdm0, NA, NA, NA, NA, NA, NA, NA),
1347 PINGROUP(73, cdc_pdm0, NA, NA, NA, NA, NA, NA, NA, NA),
1348 PINGROUP(74, cdc_pdm0, NA, NA, NA, NA, NA, NA, NA, NA),
1349 PINGROUP(75, wcss_bt, atest_char2, NA, ebi_ch0, NA, NA, NA, NA, NA),
1350 PINGROUP(76, wcss_wlan2, NA, NA, NA, NA, NA, NA, NA, NA),
1351 PINGROUP(77, wcss_wlan1, NA, NA, NA, NA, NA, NA, NA, NA),
1352 PINGROUP(78, wcss_wlan0, NA, NA, NA, NA, NA, NA, NA, NA),
1353 PINGROUP(79, wcss_wlan, NA, NA, NA, NA, NA, NA, NA, NA),
1354 PINGROUP(80, wcss_wlan, NA, NA, NA, NA, NA, NA, NA, NA),
1355 PINGROUP(81, wcss_fm, ext_lpass, NA, NA, NA, NA, NA, NA, NA),
1356 PINGROUP(82, wcss_fm, cri_trng, NA, NA, NA, NA, NA, NA, NA),
1357 PINGROUP(83, wcss_bt, cri_trng1, NA, NA, NA, NA, NA, NA, NA),
1358 PINGROUP(84, wcss_bt, cri_trng0, NA, NA, NA, NA, NA, NA, NA),
1359 PINGROUP(85, pri_mi2s, blsp_spi7, blsp_uart7, NA, NA, NA, NA, NA, NA),
1360 PINGROUP(86, pri_mi2s, blsp_spi7, blsp_uart7, qdss_tracedata_b, NA, NA,
1361 NA, NA, NA),
1362 PINGROUP(87, pri_mi2s_ws, blsp_spi7, blsp_uart7, blsp_i2c7,
1363 qdss_tracedata_b, gcc_tlmm, NA, NA, NA),
1364 PINGROUP(88, pri_mi2s, blsp_spi7, blsp_uart7, blsp_i2c7, NA, NA, NA,
1365 NA, NA),
1366 PINGROUP(89, dmic0_clk, NA, NA, NA, NA, NA, NA, NA, NA),
1367 PINGROUP(90, dmic0_data, NA, NA, NA, NA, NA, NA, NA, NA),
1368 PINGROUP(91, NA, NA, NA, NA, NA, qdss_cti_trig_in_a1, NA, NA, NA),
1369 PINGROUP(92, NA, NA, NA, NA, NA, qdss_tracedata_b, NA, NA, NA),
1370 PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1371 PINGROUP(94, wsa_io, sec_mi2s, pri_mi2s, NA, NA, NA, NA, NA, NA),
1372 PINGROUP(95, wsa_io, sec_mi2s, pri_mi2s, NA, NA, NA, NA, NA, NA),
1373 PINGROUP(96, blsp_spi8, blsp_uart8, NA, NA, NA, NA, NA, NA, NA),
1374 PINGROUP(97, blsp_spi8, blsp_uart8, NA, NA, NA, NA, NA, NA, NA),
1375 PINGROUP(98, blsp_spi8, blsp_uart8, blsp_i2c8, gcc_plltest, NA, NA, NA,
1376 NA, NA),
1377 PINGROUP(99, blsp_spi8, blsp_uart8, blsp_i2c8, gcc_plltest, NA, NA, NA,
1378 NA, NA),
1379 PINGROUP(100, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1380 PINGROUP(101, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1381 PINGROUP(102, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1382 PINGROUP(103, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1383 PINGROUP(104, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1384 PINGROUP(105, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1385 PINGROUP(106, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1386 PINGROUP(107, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1387 PINGROUP(108, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1388 PINGROUP(109, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1389 PINGROUP(110, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1390 PINGROUP(111, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1391 PINGROUP(112, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1392 PINGROUP(113, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1393 PINGROUP(114, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1394 PINGROUP(115, NA, NA, nav_pps_in_a, NA, atest_combodac_to_gpio_native,
1395 NA, NA, NA, NA),
1396 PINGROUP(116, NA, pa_indicator, NA, NA, NA, NA, NA, NA, NA),
1397 PINGROUP(117, NA, modem_tsync, nav_tsync, nav_pps_in_b, nav_pps, NA,
1398 NA, NA, NA),
1399 PINGROUP(118, NA, ebi_cdc, NA, NA, NA, NA, NA, NA, NA),
1400 PINGROUP(119, gsm0_tx, NA, ebi_cdc, NA, NA, NA, NA, NA, NA),
1401 PINGROUP(120, NA, atest_char, ebi_cdc, NA, atest_tsens, NA, NA, NA, NA),
1402 PINGROUP(121, NA, NA, NA, bimc_dte1, NA, NA, NA, NA, NA),
1403 PINGROUP(122, NA, ssbi_wtr1, NA, NA, bimc_dte1, NA, NA, NA, NA),
1404 PINGROUP(123, NA, ssbi_wtr1, ebi_cdc, NA, NA, NA, NA, NA, NA),
1405 PINGROUP(124, coex_uart, NA, NA, NA, NA, NA, NA, NA, NA),
1406 PINGROUP(125, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1407 PINGROUP(126, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1408 PINGROUP(127, coex_uart, NA, NA, NA, NA, NA, NA, NA, NA),
1409 PINGROUP(128, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1410 PINGROUP(129, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1411 PINGROUP(130, blsp8_spi, NA, NA, NA, NA, NA, NA, NA, NA),
1412 PINGROUP(131, NA, NA, NA, NA, NA, NA, NA, NA, NA),
1413 PINGROUP(132, qdss_cti_trig_out_a0, NA, NA, NA, NA, NA, NA, NA, NA),
1414 PINGROUP(133, qdss_cti_trig_out_a1, NA, NA, NA, NA, NA, NA, NA, NA),
1415 SDC_QDSD_PINGROUP(sdc1_clk, 0x10a000, 13, 6),
1416 SDC_QDSD_PINGROUP(sdc1_cmd, 0x10a000, 11, 3),
1417 SDC_QDSD_PINGROUP(sdc1_data, 0x10a000, 9, 0),
1418 SDC_QDSD_PINGROUP(sdc1_rclk, 0x10a000, 15, 0),
1419 SDC_QDSD_PINGROUP(sdc2_clk, 0x109000, 14, 6),
1420 SDC_QDSD_PINGROUP(sdc2_cmd, 0x109000, 11, 3),
1421 SDC_QDSD_PINGROUP(sdc2_data, 0x109000, 9, 0),
1422 SDC_QDSD_PINGROUP(qdsd_clk, 0x19c000, 3, 0),
1423 SDC_QDSD_PINGROUP(qdsd_cmd, 0x19c000, 8, 5),
1424 SDC_QDSD_PINGROUP(qdsd_data0, 0x19c000, 13, 10),
1425 SDC_QDSD_PINGROUP(qdsd_data1, 0x19c000, 18, 15),
1426 SDC_QDSD_PINGROUP(qdsd_data2, 0x19c000, 23, 20),
1427 SDC_QDSD_PINGROUP(qdsd_data3, 0x19c000, 28, 25),
1428};
1429
1430static const struct msm_pinctrl_soc_data msm8917_pinctrl = {
1431 .pins = msm8917_pins,
1432 .npins = ARRAY_SIZE(msm8917_pins),
1433 .functions = msm8917_functions,
1434 .nfunctions = ARRAY_SIZE(msm8917_functions),
1435 .groups = msm8917_groups,
1436 .ngroups = ARRAY_SIZE(msm8917_groups),
1437 .ngpios = 134,
1438};
1439
1440static int msm8917_pinctrl_probe(struct platform_device *pdev)
1441{
1442 return msm_pinctrl_probe(pdev, &msm8917_pinctrl);
1443}
1444
1445static const struct of_device_id msm8917_pinctrl_of_match[] = {
1446 { .compatible = "qcom,msm8917-pinctrl", },
1447 { },
1448};
1449
1450static struct platform_driver msm8917_pinctrl_driver = {
1451 .driver = {
1452 .name = "msm8917-pinctrl",
1453 .owner = THIS_MODULE,
1454 .of_match_table = msm8917_pinctrl_of_match,
1455 },
1456 .probe = msm8917_pinctrl_probe,
1457 .remove = msm_pinctrl_remove,
1458};
1459
1460static int __init msm8917_pinctrl_init(void)
1461{
1462 return platform_driver_register(&msm8917_pinctrl_driver);
1463}
1464arch_initcall(msm8917_pinctrl_init);
1465
1466static void __exit msm8917_pinctrl_exit(void)
1467{
1468 platform_driver_unregister(&msm8917_pinctrl_driver);
1469}
1470module_exit(msm8917_pinctrl_exit);
1471
1472MODULE_DESCRIPTION("QTI msm8917 pinctrl driver");
1473MODULE_LICENSE("GPL v2");
1474MODULE_DEVICE_TABLE(of, msm8917_pinctrl_of_match);