Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
0004  * Copyright (C) 2022, Kernkonzept GmbH.
0005  */
0006 
0007 #include <linux/module.h>
0008 #include <linux/of.h>
0009 #include <linux/platform_device.h>
0010 #include <linux/pinctrl/pinctrl.h>
0011 
0012 #include "pinctrl-msm.h"
0013 
0014 #define FUNCTION(fname)                 \
0015     [msm_mux_##fname] = {               \
0016         .name = #fname,             \
0017         .groups = fname##_groups,       \
0018         .ngroups = ARRAY_SIZE(fname##_groups),  \
0019     }
0020 
0021 #define REG_SIZE 0x1000
0022 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)    \
0023     {                       \
0024         .name = "gpio" #id,         \
0025         .pins = gpio##id##_pins,        \
0026         .npins = ARRAY_SIZE(gpio##id##_pins),   \
0027         .funcs = (int[]){           \
0028             msm_mux_gpio,           \
0029             msm_mux_##f1,           \
0030             msm_mux_##f2,           \
0031             msm_mux_##f3,           \
0032             msm_mux_##f4,           \
0033             msm_mux_##f5,           \
0034             msm_mux_##f6,           \
0035             msm_mux_##f7,           \
0036             msm_mux_##f8,           \
0037             msm_mux_##f9,           \
0038         },                  \
0039         .nfuncs = 10,               \
0040         .ctl_reg = REG_SIZE * id,       \
0041         .io_reg = 0x4 + REG_SIZE * id,      \
0042         .intr_cfg_reg = 0x8 + REG_SIZE * id,    \
0043         .intr_status_reg = 0xc + REG_SIZE * id, \
0044         .intr_target_reg = 0x8 + REG_SIZE * id, \
0045         .mux_bit = 2,               \
0046         .pull_bit = 0,              \
0047         .drv_bit = 6,               \
0048         .oe_bit = 9,                \
0049         .in_bit = 0,                \
0050         .out_bit = 1,               \
0051         .intr_enable_bit = 0,           \
0052         .intr_status_bit = 0,           \
0053         .intr_target_bit = 5,           \
0054         .intr_target_kpss_val = 4,      \
0055         .intr_raw_status_bit = 4,       \
0056         .intr_polarity_bit = 1,         \
0057         .intr_detection_bit = 2,        \
0058         .intr_detection_width = 2,      \
0059     }
0060 
0061 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)  \
0062     {                       \
0063         .name = #pg_name,           \
0064         .pins = pg_name##_pins,         \
0065         .npins = ARRAY_SIZE(pg_name##_pins),    \
0066         .ctl_reg = ctl,             \
0067         .io_reg = 0,                \
0068         .intr_cfg_reg = 0,          \
0069         .intr_status_reg = 0,           \
0070         .intr_target_reg = 0,           \
0071         .mux_bit = -1,              \
0072         .pull_bit = pull,           \
0073         .drv_bit = drv,             \
0074         .oe_bit = -1,               \
0075         .in_bit = -1,               \
0076         .out_bit = -1,              \
0077         .intr_enable_bit = -1,          \
0078         .intr_status_bit = -1,          \
0079         .intr_target_bit = -1,          \
0080         .intr_raw_status_bit = -1,      \
0081         .intr_polarity_bit = -1,        \
0082         .intr_detection_bit = -1,       \
0083         .intr_detection_width = -1,     \
0084     }
0085 static const struct pinctrl_pin_desc msm8909_pins[] = {
0086     PINCTRL_PIN(0, "GPIO_0"),
0087     PINCTRL_PIN(1, "GPIO_1"),
0088     PINCTRL_PIN(2, "GPIO_2"),
0089     PINCTRL_PIN(3, "GPIO_3"),
0090     PINCTRL_PIN(4, "GPIO_4"),
0091     PINCTRL_PIN(5, "GPIO_5"),
0092     PINCTRL_PIN(6, "GPIO_6"),
0093     PINCTRL_PIN(7, "GPIO_7"),
0094     PINCTRL_PIN(8, "GPIO_8"),
0095     PINCTRL_PIN(9, "GPIO_9"),
0096     PINCTRL_PIN(10, "GPIO_10"),
0097     PINCTRL_PIN(11, "GPIO_11"),
0098     PINCTRL_PIN(12, "GPIO_12"),
0099     PINCTRL_PIN(13, "GPIO_13"),
0100     PINCTRL_PIN(14, "GPIO_14"),
0101     PINCTRL_PIN(15, "GPIO_15"),
0102     PINCTRL_PIN(16, "GPIO_16"),
0103     PINCTRL_PIN(17, "GPIO_17"),
0104     PINCTRL_PIN(18, "GPIO_18"),
0105     PINCTRL_PIN(19, "GPIO_19"),
0106     PINCTRL_PIN(20, "GPIO_20"),
0107     PINCTRL_PIN(21, "GPIO_21"),
0108     PINCTRL_PIN(22, "GPIO_22"),
0109     PINCTRL_PIN(23, "GPIO_23"),
0110     PINCTRL_PIN(24, "GPIO_24"),
0111     PINCTRL_PIN(25, "GPIO_25"),
0112     PINCTRL_PIN(26, "GPIO_26"),
0113     PINCTRL_PIN(27, "GPIO_27"),
0114     PINCTRL_PIN(28, "GPIO_28"),
0115     PINCTRL_PIN(29, "GPIO_29"),
0116     PINCTRL_PIN(30, "GPIO_30"),
0117     PINCTRL_PIN(31, "GPIO_31"),
0118     PINCTRL_PIN(32, "GPIO_32"),
0119     PINCTRL_PIN(33, "GPIO_33"),
0120     PINCTRL_PIN(34, "GPIO_34"),
0121     PINCTRL_PIN(35, "GPIO_35"),
0122     PINCTRL_PIN(36, "GPIO_36"),
0123     PINCTRL_PIN(37, "GPIO_37"),
0124     PINCTRL_PIN(38, "GPIO_38"),
0125     PINCTRL_PIN(39, "GPIO_39"),
0126     PINCTRL_PIN(40, "GPIO_40"),
0127     PINCTRL_PIN(41, "GPIO_41"),
0128     PINCTRL_PIN(42, "GPIO_42"),
0129     PINCTRL_PIN(43, "GPIO_43"),
0130     PINCTRL_PIN(44, "GPIO_44"),
0131     PINCTRL_PIN(45, "GPIO_45"),
0132     PINCTRL_PIN(46, "GPIO_46"),
0133     PINCTRL_PIN(47, "GPIO_47"),
0134     PINCTRL_PIN(48, "GPIO_48"),
0135     PINCTRL_PIN(49, "GPIO_49"),
0136     PINCTRL_PIN(50, "GPIO_50"),
0137     PINCTRL_PIN(51, "GPIO_51"),
0138     PINCTRL_PIN(52, "GPIO_52"),
0139     PINCTRL_PIN(53, "GPIO_53"),
0140     PINCTRL_PIN(54, "GPIO_54"),
0141     PINCTRL_PIN(55, "GPIO_55"),
0142     PINCTRL_PIN(56, "GPIO_56"),
0143     PINCTRL_PIN(57, "GPIO_57"),
0144     PINCTRL_PIN(58, "GPIO_58"),
0145     PINCTRL_PIN(59, "GPIO_59"),
0146     PINCTRL_PIN(60, "GPIO_60"),
0147     PINCTRL_PIN(61, "GPIO_61"),
0148     PINCTRL_PIN(62, "GPIO_62"),
0149     PINCTRL_PIN(63, "GPIO_63"),
0150     PINCTRL_PIN(64, "GPIO_64"),
0151     PINCTRL_PIN(65, "GPIO_65"),
0152     PINCTRL_PIN(66, "GPIO_66"),
0153     PINCTRL_PIN(67, "GPIO_67"),
0154     PINCTRL_PIN(68, "GPIO_68"),
0155     PINCTRL_PIN(69, "GPIO_69"),
0156     PINCTRL_PIN(70, "GPIO_70"),
0157     PINCTRL_PIN(71, "GPIO_71"),
0158     PINCTRL_PIN(72, "GPIO_72"),
0159     PINCTRL_PIN(73, "GPIO_73"),
0160     PINCTRL_PIN(74, "GPIO_74"),
0161     PINCTRL_PIN(75, "GPIO_75"),
0162     PINCTRL_PIN(76, "GPIO_76"),
0163     PINCTRL_PIN(77, "GPIO_77"),
0164     PINCTRL_PIN(78, "GPIO_78"),
0165     PINCTRL_PIN(79, "GPIO_79"),
0166     PINCTRL_PIN(80, "GPIO_80"),
0167     PINCTRL_PIN(81, "GPIO_81"),
0168     PINCTRL_PIN(82, "GPIO_82"),
0169     PINCTRL_PIN(83, "GPIO_83"),
0170     PINCTRL_PIN(84, "GPIO_84"),
0171     PINCTRL_PIN(85, "GPIO_85"),
0172     PINCTRL_PIN(86, "GPIO_86"),
0173     PINCTRL_PIN(87, "GPIO_87"),
0174     PINCTRL_PIN(88, "GPIO_88"),
0175     PINCTRL_PIN(89, "GPIO_89"),
0176     PINCTRL_PIN(90, "GPIO_90"),
0177     PINCTRL_PIN(91, "GPIO_91"),
0178     PINCTRL_PIN(92, "GPIO_92"),
0179     PINCTRL_PIN(93, "GPIO_93"),
0180     PINCTRL_PIN(94, "GPIO_94"),
0181     PINCTRL_PIN(95, "GPIO_95"),
0182     PINCTRL_PIN(96, "GPIO_96"),
0183     PINCTRL_PIN(97, "GPIO_97"),
0184     PINCTRL_PIN(98, "GPIO_98"),
0185     PINCTRL_PIN(99, "GPIO_99"),
0186     PINCTRL_PIN(100, "GPIO_100"),
0187     PINCTRL_PIN(101, "GPIO_101"),
0188     PINCTRL_PIN(102, "GPIO_102"),
0189     PINCTRL_PIN(103, "GPIO_103"),
0190     PINCTRL_PIN(104, "GPIO_104"),
0191     PINCTRL_PIN(105, "GPIO_105"),
0192     PINCTRL_PIN(106, "GPIO_106"),
0193     PINCTRL_PIN(107, "GPIO_107"),
0194     PINCTRL_PIN(108, "GPIO_108"),
0195     PINCTRL_PIN(109, "GPIO_109"),
0196     PINCTRL_PIN(110, "GPIO_110"),
0197     PINCTRL_PIN(111, "GPIO_111"),
0198     PINCTRL_PIN(112, "GPIO_112"),
0199     PINCTRL_PIN(113, "SDC1_CLK"),
0200     PINCTRL_PIN(114, "SDC1_CMD"),
0201     PINCTRL_PIN(115, "SDC1_DATA"),
0202     PINCTRL_PIN(116, "SDC2_CLK"),
0203     PINCTRL_PIN(117, "SDC2_CMD"),
0204     PINCTRL_PIN(118, "SDC2_DATA"),
0205     PINCTRL_PIN(119, "QDSD_CLK"),
0206     PINCTRL_PIN(120, "QDSD_CMD"),
0207     PINCTRL_PIN(121, "QDSD_DATA0"),
0208     PINCTRL_PIN(122, "QDSD_DATA1"),
0209     PINCTRL_PIN(123, "QDSD_DATA2"),
0210     PINCTRL_PIN(124, "QDSD_DATA3"),
0211 };
0212 
0213 #define DECLARE_MSM_GPIO_PINS(pin) \
0214     static const unsigned int gpio##pin##_pins[] = { pin }
0215 DECLARE_MSM_GPIO_PINS(0);
0216 DECLARE_MSM_GPIO_PINS(1);
0217 DECLARE_MSM_GPIO_PINS(2);
0218 DECLARE_MSM_GPIO_PINS(3);
0219 DECLARE_MSM_GPIO_PINS(4);
0220 DECLARE_MSM_GPIO_PINS(5);
0221 DECLARE_MSM_GPIO_PINS(6);
0222 DECLARE_MSM_GPIO_PINS(7);
0223 DECLARE_MSM_GPIO_PINS(8);
0224 DECLARE_MSM_GPIO_PINS(9);
0225 DECLARE_MSM_GPIO_PINS(10);
0226 DECLARE_MSM_GPIO_PINS(11);
0227 DECLARE_MSM_GPIO_PINS(12);
0228 DECLARE_MSM_GPIO_PINS(13);
0229 DECLARE_MSM_GPIO_PINS(14);
0230 DECLARE_MSM_GPIO_PINS(15);
0231 DECLARE_MSM_GPIO_PINS(16);
0232 DECLARE_MSM_GPIO_PINS(17);
0233 DECLARE_MSM_GPIO_PINS(18);
0234 DECLARE_MSM_GPIO_PINS(19);
0235 DECLARE_MSM_GPIO_PINS(20);
0236 DECLARE_MSM_GPIO_PINS(21);
0237 DECLARE_MSM_GPIO_PINS(22);
0238 DECLARE_MSM_GPIO_PINS(23);
0239 DECLARE_MSM_GPIO_PINS(24);
0240 DECLARE_MSM_GPIO_PINS(25);
0241 DECLARE_MSM_GPIO_PINS(26);
0242 DECLARE_MSM_GPIO_PINS(27);
0243 DECLARE_MSM_GPIO_PINS(28);
0244 DECLARE_MSM_GPIO_PINS(29);
0245 DECLARE_MSM_GPIO_PINS(30);
0246 DECLARE_MSM_GPIO_PINS(31);
0247 DECLARE_MSM_GPIO_PINS(32);
0248 DECLARE_MSM_GPIO_PINS(33);
0249 DECLARE_MSM_GPIO_PINS(34);
0250 DECLARE_MSM_GPIO_PINS(35);
0251 DECLARE_MSM_GPIO_PINS(36);
0252 DECLARE_MSM_GPIO_PINS(37);
0253 DECLARE_MSM_GPIO_PINS(38);
0254 DECLARE_MSM_GPIO_PINS(39);
0255 DECLARE_MSM_GPIO_PINS(40);
0256 DECLARE_MSM_GPIO_PINS(41);
0257 DECLARE_MSM_GPIO_PINS(42);
0258 DECLARE_MSM_GPIO_PINS(43);
0259 DECLARE_MSM_GPIO_PINS(44);
0260 DECLARE_MSM_GPIO_PINS(45);
0261 DECLARE_MSM_GPIO_PINS(46);
0262 DECLARE_MSM_GPIO_PINS(47);
0263 DECLARE_MSM_GPIO_PINS(48);
0264 DECLARE_MSM_GPIO_PINS(49);
0265 DECLARE_MSM_GPIO_PINS(50);
0266 DECLARE_MSM_GPIO_PINS(51);
0267 DECLARE_MSM_GPIO_PINS(52);
0268 DECLARE_MSM_GPIO_PINS(53);
0269 DECLARE_MSM_GPIO_PINS(54);
0270 DECLARE_MSM_GPIO_PINS(55);
0271 DECLARE_MSM_GPIO_PINS(56);
0272 DECLARE_MSM_GPIO_PINS(57);
0273 DECLARE_MSM_GPIO_PINS(58);
0274 DECLARE_MSM_GPIO_PINS(59);
0275 DECLARE_MSM_GPIO_PINS(60);
0276 DECLARE_MSM_GPIO_PINS(61);
0277 DECLARE_MSM_GPIO_PINS(62);
0278 DECLARE_MSM_GPIO_PINS(63);
0279 DECLARE_MSM_GPIO_PINS(64);
0280 DECLARE_MSM_GPIO_PINS(65);
0281 DECLARE_MSM_GPIO_PINS(66);
0282 DECLARE_MSM_GPIO_PINS(67);
0283 DECLARE_MSM_GPIO_PINS(68);
0284 DECLARE_MSM_GPIO_PINS(69);
0285 DECLARE_MSM_GPIO_PINS(70);
0286 DECLARE_MSM_GPIO_PINS(71);
0287 DECLARE_MSM_GPIO_PINS(72);
0288 DECLARE_MSM_GPIO_PINS(73);
0289 DECLARE_MSM_GPIO_PINS(74);
0290 DECLARE_MSM_GPIO_PINS(75);
0291 DECLARE_MSM_GPIO_PINS(76);
0292 DECLARE_MSM_GPIO_PINS(77);
0293 DECLARE_MSM_GPIO_PINS(78);
0294 DECLARE_MSM_GPIO_PINS(79);
0295 DECLARE_MSM_GPIO_PINS(80);
0296 DECLARE_MSM_GPIO_PINS(81);
0297 DECLARE_MSM_GPIO_PINS(82);
0298 DECLARE_MSM_GPIO_PINS(83);
0299 DECLARE_MSM_GPIO_PINS(84);
0300 DECLARE_MSM_GPIO_PINS(85);
0301 DECLARE_MSM_GPIO_PINS(86);
0302 DECLARE_MSM_GPIO_PINS(87);
0303 DECLARE_MSM_GPIO_PINS(88);
0304 DECLARE_MSM_GPIO_PINS(89);
0305 DECLARE_MSM_GPIO_PINS(90);
0306 DECLARE_MSM_GPIO_PINS(91);
0307 DECLARE_MSM_GPIO_PINS(92);
0308 DECLARE_MSM_GPIO_PINS(93);
0309 DECLARE_MSM_GPIO_PINS(94);
0310 DECLARE_MSM_GPIO_PINS(95);
0311 DECLARE_MSM_GPIO_PINS(96);
0312 DECLARE_MSM_GPIO_PINS(97);
0313 DECLARE_MSM_GPIO_PINS(98);
0314 DECLARE_MSM_GPIO_PINS(99);
0315 DECLARE_MSM_GPIO_PINS(100);
0316 DECLARE_MSM_GPIO_PINS(101);
0317 DECLARE_MSM_GPIO_PINS(102);
0318 DECLARE_MSM_GPIO_PINS(103);
0319 DECLARE_MSM_GPIO_PINS(104);
0320 DECLARE_MSM_GPIO_PINS(105);
0321 DECLARE_MSM_GPIO_PINS(106);
0322 DECLARE_MSM_GPIO_PINS(107);
0323 DECLARE_MSM_GPIO_PINS(108);
0324 DECLARE_MSM_GPIO_PINS(109);
0325 DECLARE_MSM_GPIO_PINS(110);
0326 DECLARE_MSM_GPIO_PINS(111);
0327 DECLARE_MSM_GPIO_PINS(112);
0328 
0329 static const unsigned int sdc1_clk_pins[] = { 113 };
0330 static const unsigned int sdc1_cmd_pins[] = { 114 };
0331 static const unsigned int sdc1_data_pins[] = { 115 };
0332 static const unsigned int sdc2_clk_pins[] = { 116 };
0333 static const unsigned int sdc2_cmd_pins[] = { 117 };
0334 static const unsigned int sdc2_data_pins[] = { 118 };
0335 static const unsigned int qdsd_clk_pins[] = { 119 };
0336 static const unsigned int qdsd_cmd_pins[] = { 120 };
0337 static const unsigned int qdsd_data0_pins[] = { 121 };
0338 static const unsigned int qdsd_data1_pins[] = { 122 };
0339 static const unsigned int qdsd_data2_pins[] = { 123 };
0340 static const unsigned int qdsd_data3_pins[] = { 124 };
0341 
0342 enum msm8909_functions {
0343     msm_mux_gpio,
0344     msm_mux_adsp_ext,
0345     msm_mux_atest_bbrx0,
0346     msm_mux_atest_bbrx1,
0347     msm_mux_atest_char,
0348     msm_mux_atest_char0,
0349     msm_mux_atest_char1,
0350     msm_mux_atest_char2,
0351     msm_mux_atest_char3,
0352     msm_mux_atest_combodac,
0353     msm_mux_atest_gpsadc0,
0354     msm_mux_atest_gpsadc1,
0355     msm_mux_atest_wlan0,
0356     msm_mux_atest_wlan1,
0357     msm_mux_bimc_dte0,
0358     msm_mux_bimc_dte1,
0359     msm_mux_blsp_i2c1,
0360     msm_mux_blsp_i2c2,
0361     msm_mux_blsp_i2c3,
0362     msm_mux_blsp_i2c4,
0363     msm_mux_blsp_i2c5,
0364     msm_mux_blsp_i2c6,
0365     msm_mux_blsp_spi1,
0366     msm_mux_blsp_spi1_cs1,
0367     msm_mux_blsp_spi1_cs2,
0368     msm_mux_blsp_spi1_cs3,
0369     msm_mux_blsp_spi2,
0370     msm_mux_blsp_spi2_cs1,
0371     msm_mux_blsp_spi2_cs2,
0372     msm_mux_blsp_spi2_cs3,
0373     msm_mux_blsp_spi3,
0374     msm_mux_blsp_spi3_cs1,
0375     msm_mux_blsp_spi3_cs2,
0376     msm_mux_blsp_spi3_cs3,
0377     msm_mux_blsp_spi4,
0378     msm_mux_blsp_spi5,
0379     msm_mux_blsp_spi6,
0380     msm_mux_blsp_uart1,
0381     msm_mux_blsp_uart2,
0382     msm_mux_blsp_uim1,
0383     msm_mux_blsp_uim2,
0384     msm_mux_cam_mclk,
0385     msm_mux_cci_async,
0386     msm_mux_cci_timer0,
0387     msm_mux_cci_timer1,
0388     msm_mux_cci_timer2,
0389     msm_mux_cdc_pdm0,
0390     msm_mux_dbg_out,
0391     msm_mux_dmic0_clk,
0392     msm_mux_dmic0_data,
0393     msm_mux_ebi0_wrcdc,
0394     msm_mux_ebi2_a,
0395     msm_mux_ebi2_lcd,
0396     msm_mux_ext_lpass,
0397     msm_mux_gcc_gp1_clk_a,
0398     msm_mux_gcc_gp1_clk_b,
0399     msm_mux_gcc_gp2_clk_a,
0400     msm_mux_gcc_gp2_clk_b,
0401     msm_mux_gcc_gp3_clk_a,
0402     msm_mux_gcc_gp3_clk_b,
0403     msm_mux_gcc_plltest,
0404     msm_mux_gsm0_tx,
0405     msm_mux_ldo_en,
0406     msm_mux_ldo_update,
0407     msm_mux_m_voc,
0408     msm_mux_mdp_vsync,
0409     msm_mux_modem_tsync,
0410     msm_mux_nav_pps,
0411     msm_mux_nav_tsync,
0412     msm_mux_pa_indicator,
0413     msm_mux_pbs0,
0414     msm_mux_pbs1,
0415     msm_mux_pbs2,
0416     msm_mux_pri_mi2s_data0_a,
0417     msm_mux_pri_mi2s_data0_b,
0418     msm_mux_pri_mi2s_data1_a,
0419     msm_mux_pri_mi2s_data1_b,
0420     msm_mux_pri_mi2s_mclk_a,
0421     msm_mux_pri_mi2s_mclk_b,
0422     msm_mux_pri_mi2s_sck_a,
0423     msm_mux_pri_mi2s_sck_b,
0424     msm_mux_pri_mi2s_ws_a,
0425     msm_mux_pri_mi2s_ws_b,
0426     msm_mux_prng_rosc,
0427     msm_mux_pwr_crypto_enabled_a,
0428     msm_mux_pwr_crypto_enabled_b,
0429     msm_mux_pwr_modem_enabled_a,
0430     msm_mux_pwr_modem_enabled_b,
0431     msm_mux_pwr_nav_enabled_a,
0432     msm_mux_pwr_nav_enabled_b,
0433     msm_mux_qdss_cti_trig_in_a0,
0434     msm_mux_qdss_cti_trig_in_a1,
0435     msm_mux_qdss_cti_trig_in_b0,
0436     msm_mux_qdss_cti_trig_in_b1,
0437     msm_mux_qdss_cti_trig_out_a0,
0438     msm_mux_qdss_cti_trig_out_a1,
0439     msm_mux_qdss_cti_trig_out_b0,
0440     msm_mux_qdss_cti_trig_out_b1,
0441     msm_mux_qdss_traceclk_a,
0442     msm_mux_qdss_tracectl_a,
0443     msm_mux_qdss_tracedata_a,
0444     msm_mux_qdss_tracedata_b,
0445     msm_mux_sd_write,
0446     msm_mux_sec_mi2s,
0447     msm_mux_smb_int,
0448     msm_mux_ssbi0,
0449     msm_mux_ssbi1,
0450     msm_mux_uim1_clk,
0451     msm_mux_uim1_data,
0452     msm_mux_uim1_present,
0453     msm_mux_uim1_reset,
0454     msm_mux_uim2_clk,
0455     msm_mux_uim2_data,
0456     msm_mux_uim2_present,
0457     msm_mux_uim2_reset,
0458     msm_mux_uim3_clk,
0459     msm_mux_uim3_data,
0460     msm_mux_uim3_present,
0461     msm_mux_uim3_reset,
0462     msm_mux_uim_batt,
0463     msm_mux_wcss_bt,
0464     msm_mux_wcss_fm,
0465     msm_mux_wcss_wlan,
0466     msm_mux__,
0467 };
0468 
0469 static const char * const adsp_ext_groups[] = { "gpio38" };
0470 static const char * const atest_bbrx0_groups[] = { "gpio37" };
0471 static const char * const atest_bbrx1_groups[] = { "gpio36" };
0472 static const char * const atest_char0_groups[] = { "gpio62" };
0473 static const char * const atest_char1_groups[] = { "gpio61" };
0474 static const char * const atest_char2_groups[] = { "gpio60" };
0475 static const char * const atest_char3_groups[] = { "gpio59" };
0476 static const char * const atest_char_groups[] = { "gpio63" };
0477 static const char * const atest_combodac_groups[] = {
0478     "gpio32", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43",
0479     "gpio44", "gpio45", "gpio47", "gpio48", "gpio66", "gpio81", "gpio83",
0480     "gpio84", "gpio85", "gpio86", "gpio94", "gpio95", "gpio110"
0481 };
0482 static const char * const atest_gpsadc0_groups[] = { "gpio65" };
0483 static const char * const atest_gpsadc1_groups[] = { "gpio79" };
0484 static const char * const atest_wlan0_groups[] = { "gpio96" };
0485 static const char * const atest_wlan1_groups[] = { "gpio97" };
0486 static const char * const bimc_dte0_groups[] = { "gpio6", "gpio59" };
0487 static const char * const bimc_dte1_groups[] = { "gpio7", "gpio60" };
0488 static const char * const blsp_i2c1_groups[] = { "gpio6", "gpio7" };
0489 static const char * const blsp_i2c2_groups[] = { "gpio111", "gpio112" };
0490 static const char * const blsp_i2c3_groups[] = { "gpio29", "gpio30" };
0491 static const char * const blsp_i2c4_groups[] = { "gpio14", "gpio15" };
0492 static const char * const blsp_i2c5_groups[] = { "gpio18", "gpio19" };
0493 static const char * const blsp_i2c6_groups[] = { "gpio10", "gpio11" };
0494 static const char * const blsp_spi1_cs1_groups[] = { "gpio97" };
0495 static const char * const blsp_spi1_cs2_groups[] = { "gpio37" };
0496 static const char * const blsp_spi1_cs3_groups[] = { "gpio65" };
0497 static const char * const blsp_spi1_groups[] = {
0498     "gpio4", "gpio5", "gpio6", "gpio7"
0499 };
0500 static const char * const blsp_spi2_cs1_groups[] = { "gpio98" };
0501 static const char * const blsp_spi2_cs2_groups[] = { "gpio17" };
0502 static const char * const blsp_spi2_cs3_groups[] = { "gpio5" };
0503 static const char * const blsp_spi2_groups[] = {
0504     "gpio20", "gpio21", "gpio111", "gpio112"
0505 };
0506 static const char * const blsp_spi3_cs1_groups[] = { "gpio95" };
0507 static const char * const blsp_spi3_cs2_groups[] = { "gpio65" };
0508 static const char * const blsp_spi3_cs3_groups[] = { "gpio4" };
0509 static const char * const blsp_spi3_groups[] = {
0510     "gpio0", "gpio1", "gpio2", "gpio3"
0511 };
0512 static const char * const blsp_spi4_groups[] = {
0513     "gpio12", "gpio13", "gpio14", "gpio15"
0514 };
0515 static const char * const blsp_spi5_groups[] = {
0516     "gpio16", "gpio17", "gpio18", "gpio19"
0517 };
0518 static const char * const blsp_spi6_groups[] = {
0519     "gpio8", "gpio9", "gpio10", "gpio11"
0520 };
0521 static const char * const blsp_uart1_groups[] = {
0522     "gpio4", "gpio5", "gpio6", "gpio7"
0523 };
0524 static const char * const blsp_uart2_groups[] = {
0525     "gpio20", "gpio21", "gpio111", "gpio112"
0526 };
0527 static const char * const blsp_uim1_groups[] = { "gpio4", "gpio5" };
0528 static const char * const blsp_uim2_groups[] = { "gpio20", "gpio21" };
0529 static const char * const cam_mclk_groups[] = { "gpio26", "gpio27" };
0530 static const char * const cci_async_groups[] = { "gpio33" };
0531 static const char * const cci_timer0_groups[] = { "gpio31" };
0532 static const char * const cci_timer1_groups[] = { "gpio32" };
0533 static const char * const cci_timer2_groups[] = { "gpio38" };
0534 static const char * const cdc_pdm0_groups[] = {
0535     "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64"
0536 };
0537 static const char * const dbg_out_groups[] = { "gpio10" };
0538 static const char * const dmic0_clk_groups[] = { "gpio4" };
0539 static const char * const dmic0_data_groups[] = { "gpio5" };
0540 static const char * const ebi0_wrcdc_groups[] = { "gpio64" };
0541 static const char * const ebi2_a_groups[] = { "gpio99" };
0542 static const char * const ebi2_lcd_groups[] = {
0543     "gpio24", "gpio24", "gpio25", "gpio95"
0544 };
0545 static const char * const ext_lpass_groups[] = { "gpio45" };
0546 static const char * const gcc_gp1_clk_a_groups[] = { "gpio49" };
0547 static const char * const gcc_gp1_clk_b_groups[] = { "gpio14" };
0548 static const char * const gcc_gp2_clk_a_groups[] = { "gpio50" };
0549 static const char * const gcc_gp2_clk_b_groups[] = { "gpio12" };
0550 static const char * const gcc_gp3_clk_a_groups[] = { "gpio51" };
0551 static const char * const gcc_gp3_clk_b_groups[] = { "gpio13" };
0552 static const char * const gcc_plltest_groups[] = { "gpio66", "gpio67" };
0553 static const char * const gpio_groups[] = {
0554     "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
0555     "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
0556     "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
0557     "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
0558     "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
0559     "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
0560     "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
0561     "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
0562     "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
0563     "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
0564     "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
0565     "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
0566     "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
0567     "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
0568     "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
0569     "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
0570     "gpio111", "gpio112"
0571 };
0572 static const char * const gsm0_tx_groups[] = { "gpio85" };
0573 static const char * const ldo_en_groups[] = { "gpio99" };
0574 static const char * const ldo_update_groups[] = { "gpio98" };
0575 static const char * const m_voc_groups[] = { "gpio8", "gpio95" };
0576 static const char * const mdp_vsync_groups[] = { "gpio24", "gpio25" };
0577 static const char * const modem_tsync_groups[] = { "gpio83" };
0578 static const char * const nav_pps_groups[] = { "gpio83" };
0579 static const char * const nav_tsync_groups[] = { "gpio83" };
0580 static const char * const pa_indicator_groups[] = { "gpio82" };
0581 static const char * const pbs0_groups[] = { "gpio90" };
0582 static const char * const pbs1_groups[] = { "gpio91" };
0583 static const char * const pbs2_groups[] = { "gpio92" };
0584 static const char * const pri_mi2s_data0_a_groups[] = { "gpio62" };
0585 static const char * const pri_mi2s_data0_b_groups[] = { "gpio95" };
0586 static const char * const pri_mi2s_data1_a_groups[] = { "gpio63" };
0587 static const char * const pri_mi2s_data1_b_groups[] = { "gpio96" };
0588 static const char * const pri_mi2s_mclk_a_groups[] = { "gpio59" };
0589 static const char * const pri_mi2s_mclk_b_groups[] = { "gpio98" };
0590 static const char * const pri_mi2s_sck_a_groups[] = { "gpio60" };
0591 static const char * const pri_mi2s_sck_b_groups[] = { "gpio94" };
0592 static const char * const pri_mi2s_ws_a_groups[] = { "gpio61" };
0593 static const char * const pri_mi2s_ws_b_groups[] = { "gpio110" };
0594 static const char * const prng_rosc_groups[] = { "gpio43" };
0595 static const char * const pwr_crypto_enabled_a_groups[] = { "gpio35" };
0596 static const char * const pwr_crypto_enabled_b_groups[] = { "gpio96" };
0597 static const char * const pwr_modem_enabled_a_groups[] = { "gpio28" };
0598 static const char * const pwr_modem_enabled_b_groups[] = { "gpio94" };
0599 static const char * const pwr_nav_enabled_a_groups[] = { "gpio34" };
0600 static const char * const pwr_nav_enabled_b_groups[] = { "gpio95" };
0601 static const char * const qdss_cti_trig_in_a0_groups[] = { "gpio20" };
0602 static const char * const qdss_cti_trig_in_a1_groups[] = { "gpio49" };
0603 static const char * const qdss_cti_trig_in_b0_groups[] = { "gpio21" };
0604 static const char * const qdss_cti_trig_in_b1_groups[] = { "gpio50" };
0605 static const char * const qdss_cti_trig_out_a0_groups[] = { "gpio23" };
0606 static const char * const qdss_cti_trig_out_a1_groups[] = { "gpio52" };
0607 static const char * const qdss_cti_trig_out_b0_groups[] = { "gpio22" };
0608 static const char * const qdss_cti_trig_out_b1_groups[] = { "gpio51" };
0609 static const char * const qdss_traceclk_a_groups[] = { "gpio46" };
0610 static const char * const qdss_tracectl_a_groups[] = { "gpio45" };
0611 static const char * const qdss_tracedata_a_groups[] = {
0612     "gpio8", "gpio9", "gpio10", "gpio39", "gpio40", "gpio41", "gpio42",
0613     "gpio43", "gpio47", "gpio48", "gpio58", "gpio65", "gpio94", "gpio96",
0614     "gpio97"
0615 };
0616 static const char * const qdss_tracedata_b_groups[] = {
0617     "gpio14", "gpio16", "gpio17", "gpio29", "gpio30", "gpio31", "gpio32",
0618     "gpio33", "gpio34", "gpio35", "gpio36", "gpio37", "gpio93"
0619 };
0620 static const char * const sd_write_groups[] = { "gpio99" };
0621 static const char * const sec_mi2s_groups[] = {
0622     "gpio0", "gpio1", "gpio2", "gpio3", "gpio98"
0623 };
0624 static const char * const smb_int_groups[] = { "gpio58" };
0625 static const char * const ssbi0_groups[] = { "gpio88" };
0626 static const char * const ssbi1_groups[] = { "gpio89" };
0627 static const char * const uim1_clk_groups[] = { "gpio54" };
0628 static const char * const uim1_data_groups[] = { "gpio53" };
0629 static const char * const uim1_present_groups[] = { "gpio56" };
0630 static const char * const uim1_reset_groups[] = { "gpio55" };
0631 static const char * const uim2_clk_groups[] = { "gpio50" };
0632 static const char * const uim2_data_groups[] = { "gpio49" };
0633 static const char * const uim2_present_groups[] = { "gpio52" };
0634 static const char * const uim2_reset_groups[] = { "gpio51" };
0635 static const char * const uim3_clk_groups[] = { "gpio23" };
0636 static const char * const uim3_data_groups[] = { "gpio20" };
0637 static const char * const uim3_present_groups[] = { "gpio21" };
0638 static const char * const uim3_reset_groups[] = { "gpio22" };
0639 static const char * const uim_batt_groups[] = { "gpio57" };
0640 static const char * const wcss_bt_groups[] = { "gpio39", "gpio47", "gpio48" };
0641 static const char * const wcss_fm_groups[] = { "gpio45", "gpio46" };
0642 static const char * const wcss_wlan_groups[] = {
0643     "gpio40", "gpio41", "gpio42", "gpio43", "gpio44"
0644 };
0645 
0646 static const struct msm_function msm8909_functions[] = {
0647     FUNCTION(adsp_ext),
0648     FUNCTION(atest_bbrx0),
0649     FUNCTION(atest_bbrx1),
0650     FUNCTION(atest_char),
0651     FUNCTION(atest_char0),
0652     FUNCTION(atest_char1),
0653     FUNCTION(atest_char2),
0654     FUNCTION(atest_char3),
0655     FUNCTION(atest_combodac),
0656     FUNCTION(atest_gpsadc0),
0657     FUNCTION(atest_gpsadc1),
0658     FUNCTION(atest_wlan0),
0659     FUNCTION(atest_wlan1),
0660     FUNCTION(bimc_dte0),
0661     FUNCTION(bimc_dte1),
0662     FUNCTION(blsp_i2c1),
0663     FUNCTION(blsp_i2c2),
0664     FUNCTION(blsp_i2c3),
0665     FUNCTION(blsp_i2c4),
0666     FUNCTION(blsp_i2c5),
0667     FUNCTION(blsp_i2c6),
0668     FUNCTION(blsp_spi1),
0669     FUNCTION(blsp_spi1_cs1),
0670     FUNCTION(blsp_spi1_cs2),
0671     FUNCTION(blsp_spi1_cs3),
0672     FUNCTION(blsp_spi2),
0673     FUNCTION(blsp_spi2_cs1),
0674     FUNCTION(blsp_spi2_cs2),
0675     FUNCTION(blsp_spi2_cs3),
0676     FUNCTION(blsp_spi3),
0677     FUNCTION(blsp_spi3_cs1),
0678     FUNCTION(blsp_spi3_cs2),
0679     FUNCTION(blsp_spi3_cs3),
0680     FUNCTION(blsp_spi4),
0681     FUNCTION(blsp_spi5),
0682     FUNCTION(blsp_spi6),
0683     FUNCTION(blsp_uart1),
0684     FUNCTION(blsp_uart2),
0685     FUNCTION(blsp_uim1),
0686     FUNCTION(blsp_uim2),
0687     FUNCTION(cam_mclk),
0688     FUNCTION(cci_async),
0689     FUNCTION(cci_timer0),
0690     FUNCTION(cci_timer1),
0691     FUNCTION(cci_timer2),
0692     FUNCTION(cdc_pdm0),
0693     FUNCTION(dbg_out),
0694     FUNCTION(dmic0_clk),
0695     FUNCTION(dmic0_data),
0696     FUNCTION(ebi0_wrcdc),
0697     FUNCTION(ebi2_a),
0698     FUNCTION(ebi2_lcd),
0699     FUNCTION(ext_lpass),
0700     FUNCTION(gcc_gp1_clk_a),
0701     FUNCTION(gcc_gp1_clk_b),
0702     FUNCTION(gcc_gp2_clk_a),
0703     FUNCTION(gcc_gp2_clk_b),
0704     FUNCTION(gcc_gp3_clk_a),
0705     FUNCTION(gcc_gp3_clk_b),
0706     FUNCTION(gcc_plltest),
0707     FUNCTION(gpio),
0708     FUNCTION(gsm0_tx),
0709     FUNCTION(ldo_en),
0710     FUNCTION(ldo_update),
0711     FUNCTION(m_voc),
0712     FUNCTION(mdp_vsync),
0713     FUNCTION(modem_tsync),
0714     FUNCTION(nav_pps),
0715     FUNCTION(nav_tsync),
0716     FUNCTION(pa_indicator),
0717     FUNCTION(pbs0),
0718     FUNCTION(pbs1),
0719     FUNCTION(pbs2),
0720     FUNCTION(pri_mi2s_data0_a),
0721     FUNCTION(pri_mi2s_data0_b),
0722     FUNCTION(pri_mi2s_data1_a),
0723     FUNCTION(pri_mi2s_data1_b),
0724     FUNCTION(pri_mi2s_mclk_a),
0725     FUNCTION(pri_mi2s_mclk_b),
0726     FUNCTION(pri_mi2s_sck_a),
0727     FUNCTION(pri_mi2s_sck_b),
0728     FUNCTION(pri_mi2s_ws_a),
0729     FUNCTION(pri_mi2s_ws_b),
0730     FUNCTION(prng_rosc),
0731     FUNCTION(pwr_crypto_enabled_a),
0732     FUNCTION(pwr_crypto_enabled_b),
0733     FUNCTION(pwr_modem_enabled_a),
0734     FUNCTION(pwr_modem_enabled_b),
0735     FUNCTION(pwr_nav_enabled_a),
0736     FUNCTION(pwr_nav_enabled_b),
0737     FUNCTION(qdss_cti_trig_in_a0),
0738     FUNCTION(qdss_cti_trig_in_a1),
0739     FUNCTION(qdss_cti_trig_in_b0),
0740     FUNCTION(qdss_cti_trig_in_b1),
0741     FUNCTION(qdss_cti_trig_out_a0),
0742     FUNCTION(qdss_cti_trig_out_a1),
0743     FUNCTION(qdss_cti_trig_out_b0),
0744     FUNCTION(qdss_cti_trig_out_b1),
0745     FUNCTION(qdss_traceclk_a),
0746     FUNCTION(qdss_tracectl_a),
0747     FUNCTION(qdss_tracedata_a),
0748     FUNCTION(qdss_tracedata_b),
0749     FUNCTION(sd_write),
0750     FUNCTION(sec_mi2s),
0751     FUNCTION(smb_int),
0752     FUNCTION(ssbi0),
0753     FUNCTION(ssbi1),
0754     FUNCTION(uim1_clk),
0755     FUNCTION(uim1_data),
0756     FUNCTION(uim1_present),
0757     FUNCTION(uim1_reset),
0758     FUNCTION(uim2_clk),
0759     FUNCTION(uim2_data),
0760     FUNCTION(uim2_present),
0761     FUNCTION(uim2_reset),
0762     FUNCTION(uim3_clk),
0763     FUNCTION(uim3_data),
0764     FUNCTION(uim3_present),
0765     FUNCTION(uim3_reset),
0766     FUNCTION(uim_batt),
0767     FUNCTION(wcss_bt),
0768     FUNCTION(wcss_fm),
0769     FUNCTION(wcss_wlan),
0770 };
0771 
0772 static const struct msm_pingroup msm8909_groups[] = {
0773     PINGROUP(0, blsp_spi3, sec_mi2s, _, _, _, _, _, _, _),
0774     PINGROUP(1, blsp_spi3, sec_mi2s, _, _, _, _, _, _, _),
0775     PINGROUP(2, blsp_spi3, sec_mi2s, _, _, _, _, _, _, _),
0776     PINGROUP(3, blsp_spi3, sec_mi2s, _, _, _, _, _, _, _),
0777     PINGROUP(4, blsp_spi1, blsp_uart1, blsp_uim1, blsp_spi3_cs3, dmic0_clk, _, _, _, _),
0778     PINGROUP(5, blsp_spi1, blsp_uart1, blsp_uim1, blsp_spi2_cs3, dmic0_data, _, _, _, _),
0779     PINGROUP(6, blsp_spi1, blsp_uart1, blsp_i2c1, _, _, _, _, _, bimc_dte0),
0780     PINGROUP(7, blsp_spi1, blsp_uart1, blsp_i2c1, _, _, _, _, _, bimc_dte1),
0781     PINGROUP(8, blsp_spi6, m_voc, _, _, _, _, _, qdss_tracedata_a, _),
0782     PINGROUP(9, blsp_spi6, _, _, _, _, _, qdss_tracedata_a, _, _),
0783     PINGROUP(10, blsp_spi6, blsp_i2c6, dbg_out, qdss_tracedata_a, _, _, _, _, _),
0784     PINGROUP(11, blsp_spi6, blsp_i2c6, _, _, _, _, _, _, _),
0785     PINGROUP(12, blsp_spi4, gcc_gp2_clk_b, _, _, _, _, _, _, _),
0786     PINGROUP(13, blsp_spi4, gcc_gp3_clk_b, _, _, _, _, _, _, _),
0787     PINGROUP(14, blsp_spi4, blsp_i2c4, gcc_gp1_clk_b, _, _, _, _, _, qdss_tracedata_b),
0788     PINGROUP(15, blsp_spi4, blsp_i2c4, _, _, _, _, _, _, _),
0789     PINGROUP(16, blsp_spi5, _, _, _, _, _, qdss_tracedata_b, _, _),
0790     PINGROUP(17, blsp_spi5, blsp_spi2_cs2, _, _, _, _, _, qdss_tracedata_b, _),
0791     PINGROUP(18, blsp_spi5, blsp_i2c5, _, _, _, _, _, _, _),
0792     PINGROUP(19, blsp_spi5, blsp_i2c5, _, _, _, _, _, _, _),
0793     PINGROUP(20, uim3_data, blsp_spi2, blsp_uart2, blsp_uim2, _, qdss_cti_trig_in_a0, _, _, _),
0794     PINGROUP(21, uim3_present, blsp_spi2, blsp_uart2, blsp_uim2, _, qdss_cti_trig_in_b0, _, _, _),
0795     PINGROUP(22, uim3_reset, _, qdss_cti_trig_out_b0, _, _, _, _, _, _),
0796     PINGROUP(23, uim3_clk, qdss_cti_trig_out_a0, _, _, _, _, _, _, _),
0797     PINGROUP(24, mdp_vsync, ebi2_lcd, ebi2_lcd, _, _, _, _, _, _),
0798     PINGROUP(25, mdp_vsync, ebi2_lcd, _, _, _, _, _, _, _),
0799     PINGROUP(26, cam_mclk, _, _, _, _, _, _, _, _),
0800     PINGROUP(27, cam_mclk, _, _, _, _, _, _, _, _),
0801     PINGROUP(28, _, pwr_modem_enabled_a, _, _, _, _, _, _, _),
0802     PINGROUP(29, blsp_i2c3, _, _, _, _, _, qdss_tracedata_b, _, _),
0803     PINGROUP(30, blsp_i2c3, _, _, _, _, _, qdss_tracedata_b, _, _),
0804     PINGROUP(31, cci_timer0, _, _, _, _, _, _, qdss_tracedata_b, _),
0805     PINGROUP(32, cci_timer1, _, qdss_tracedata_b, _, atest_combodac, _, _, _, _),
0806     PINGROUP(33, cci_async, qdss_tracedata_b, _, _, _, _, _, _, _),
0807     PINGROUP(34, pwr_nav_enabled_a, qdss_tracedata_b, _, _, _, _, _, _, _),
0808     PINGROUP(35, pwr_crypto_enabled_a, qdss_tracedata_b, _, _, _, _, _, _, _),
0809     PINGROUP(36, qdss_tracedata_b, _, atest_bbrx1, _, _, _, _, _, _),
0810     PINGROUP(37, blsp_spi1_cs2, qdss_tracedata_b, _, atest_bbrx0, _, _, _, _, _),
0811     PINGROUP(38, cci_timer2, adsp_ext, _, atest_combodac, _, _, _, _, _),
0812     PINGROUP(39, wcss_bt, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0813     PINGROUP(40, wcss_wlan, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0814     PINGROUP(41, wcss_wlan, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0815     PINGROUP(42, wcss_wlan, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0816     PINGROUP(43, wcss_wlan, prng_rosc, qdss_tracedata_a, _, atest_combodac, _, _, _, _),
0817     PINGROUP(44, wcss_wlan, _, atest_combodac, _, _, _, _, _, _),
0818     PINGROUP(45, wcss_fm, ext_lpass, qdss_tracectl_a, _, atest_combodac, _, _, _, _),
0819     PINGROUP(46, wcss_fm, qdss_traceclk_a, _, _, _, _, _, _, _),
0820     PINGROUP(47, wcss_bt, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0821     PINGROUP(48, wcss_bt, qdss_tracedata_a, _, atest_combodac, _, _, _, _, _),
0822     PINGROUP(49, uim2_data, gcc_gp1_clk_a, qdss_cti_trig_in_a1, _, _, _, _, _, _),
0823     PINGROUP(50, uim2_clk, gcc_gp2_clk_a, qdss_cti_trig_in_b1, _, _, _, _, _, _),
0824     PINGROUP(51, uim2_reset, gcc_gp3_clk_a, qdss_cti_trig_out_b1, _, _, _, _, _, _),
0825     PINGROUP(52, uim2_present, qdss_cti_trig_out_a1, _, _, _, _, _, _, _),
0826     PINGROUP(53, uim1_data, _, _, _, _, _, _, _, _),
0827     PINGROUP(54, uim1_clk, _, _, _, _, _, _, _, _),
0828     PINGROUP(55, uim1_reset, _, _, _, _, _, _, _, _),
0829     PINGROUP(56, uim1_present, _, _, _, _, _, _, _, _),
0830     PINGROUP(57, uim_batt, _, _, _, _, _, _, _, _),
0831     PINGROUP(58, qdss_tracedata_a, smb_int, _, _, _, _, _, _, _),
0832     PINGROUP(59, cdc_pdm0, pri_mi2s_mclk_a, atest_char3, _, _, _, _, _, bimc_dte0),
0833     PINGROUP(60, cdc_pdm0, pri_mi2s_sck_a, atest_char2, _, _, _, _, _, bimc_dte1),
0834     PINGROUP(61, cdc_pdm0, pri_mi2s_ws_a, atest_char1, _, _, _, _, _, _),
0835     PINGROUP(62, cdc_pdm0, pri_mi2s_data0_a, atest_char0, _, _, _, _, _, _),
0836     PINGROUP(63, cdc_pdm0, pri_mi2s_data1_a, atest_char, _, _, _, _, _, _),
0837     PINGROUP(64, cdc_pdm0, _, _, _, _, _, ebi0_wrcdc, _, _),
0838     PINGROUP(65, blsp_spi3_cs2, blsp_spi1_cs3, qdss_tracedata_a, _, atest_gpsadc0, _, _, _, _),
0839     PINGROUP(66, _, gcc_plltest, _, atest_combodac, _, _, _, _, _),
0840     PINGROUP(67, _, gcc_plltest, _, _, _, _, _, _, _),
0841     PINGROUP(68, _, _, _, _, _, _, _, _, _),
0842     PINGROUP(69, _, _, _, _, _, _, _, _, _),
0843     PINGROUP(70, _, _, _, _, _, _, _, _, _),
0844     PINGROUP(71, _, _, _, _, _, _, _, _, _),
0845     PINGROUP(72, _, _, _, _, _, _, _, _, _),
0846     PINGROUP(73, _, _, _, _, _, _, _, _, _),
0847     PINGROUP(74, _, _, _, _, _, _, _, _, _),
0848     PINGROUP(75, _, _, _, _, _, _, _, _, _),
0849     PINGROUP(76, _, _, _, _, _, _, _, _, _),
0850     PINGROUP(77, _, _, _, _, _, _, _, _, _),
0851     PINGROUP(78, _, _, _, _, _, _, _, _, _),
0852     PINGROUP(79, _, _, atest_gpsadc1, _, _, _, _, _, _),
0853     PINGROUP(80, _, _, _, _, _, _, _, _, _),
0854     PINGROUP(81, _, _, _, atest_combodac, _, _, _, _, _),
0855     PINGROUP(82, _, pa_indicator, _, _, _, _, _, _, _),
0856     PINGROUP(83, _, modem_tsync, nav_tsync, nav_pps, _, atest_combodac, _, _, _),
0857     PINGROUP(84, _, _, atest_combodac, _, _, _, _, _, _),
0858     PINGROUP(85, gsm0_tx, _, _, atest_combodac, _, _, _, _, _),
0859     PINGROUP(86, _, _, atest_combodac, _, _, _, _, _, _),
0860     PINGROUP(87, _, _, _, _, _, _, _, _, _),
0861     PINGROUP(88, _, ssbi0, _, _, _, _, _, _, _),
0862     PINGROUP(89, _, ssbi1, _, _, _, _, _, _, _),
0863     PINGROUP(90, pbs0, _, _, _, _, _, _, _, _),
0864     PINGROUP(91, pbs1, _, _, _, _, _, _, _, _),
0865     PINGROUP(92, pbs2, _, _, _, _, _, _, _, _),
0866     PINGROUP(93, qdss_tracedata_b, _, _, _, _, _, _, _, _),
0867     PINGROUP(94, pri_mi2s_sck_b, pwr_modem_enabled_b, qdss_tracedata_a, _, atest_combodac, _, _, _, _),
0868     PINGROUP(95, blsp_spi3_cs1, pri_mi2s_data0_b, ebi2_lcd, m_voc, pwr_nav_enabled_b, _, atest_combodac, _, _),
0869     PINGROUP(96, pri_mi2s_data1_b, _, pwr_crypto_enabled_b, qdss_tracedata_a, _, atest_wlan0, _, _, _),
0870     PINGROUP(97, blsp_spi1_cs1, qdss_tracedata_a, _, atest_wlan1, _, _, _, _, _),
0871     PINGROUP(98, sec_mi2s, pri_mi2s_mclk_b, blsp_spi2_cs1, ldo_update, _, _, _, _, _),
0872     PINGROUP(99, ebi2_a, sd_write, ldo_en, _, _, _, _, _, _),
0873     PINGROUP(100, _, _, _, _, _, _, _, _, _),
0874     PINGROUP(101, _, _, _, _, _, _, _, _, _),
0875     PINGROUP(102, _, _, _, _, _, _, _, _, _),
0876     PINGROUP(103, _, _, _, _, _, _, _, _, _),
0877     PINGROUP(104, _, _, _, _, _, _, _, _, _),
0878     PINGROUP(105, _, _, _, _, _, _, _, _, _),
0879     PINGROUP(106, _, _, _, _, _, _, _, _, _),
0880     PINGROUP(107, _, _, _, _, _, _, _, _, _),
0881     PINGROUP(108, _, _, _, _, _, _, _, _, _),
0882     PINGROUP(109, _, _, _, _, _, _, _, _, _),
0883     PINGROUP(110, pri_mi2s_ws_b, _, atest_combodac, _, _, _, _, _, _),
0884     PINGROUP(111, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _),
0885     PINGROUP(112, blsp_spi2, blsp_uart2, blsp_i2c2, _, _, _, _, _, _),
0886     SDC_QDSD_PINGROUP(sdc1_clk, 0x10a000, 13, 6),
0887     SDC_QDSD_PINGROUP(sdc1_cmd, 0x10a000, 11, 3),
0888     SDC_QDSD_PINGROUP(sdc1_data, 0x10a000, 9, 0),
0889     SDC_QDSD_PINGROUP(sdc2_clk, 0x109000, 14, 6),
0890     SDC_QDSD_PINGROUP(sdc2_cmd, 0x109000, 11, 3),
0891     SDC_QDSD_PINGROUP(sdc2_data, 0x109000, 9, 0),
0892     SDC_QDSD_PINGROUP(qdsd_clk, 0x19c000, 3, 0),
0893     SDC_QDSD_PINGROUP(qdsd_cmd, 0x19c000, 8, 5),
0894     SDC_QDSD_PINGROUP(qdsd_data0, 0x19c000, 13, 10),
0895     SDC_QDSD_PINGROUP(qdsd_data1, 0x19c000, 18, 15),
0896     SDC_QDSD_PINGROUP(qdsd_data2, 0x19c000, 23, 20),
0897     SDC_QDSD_PINGROUP(qdsd_data3, 0x19c000, 28, 25),
0898 };
0899 
0900 static const struct msm_gpio_wakeirq_map msm8909_mpm_map[] = {
0901     { 65, 3 }, { 5, 4 }, { 11, 5 }, { 12, 6 }, { 64, 7 }, { 58, 8 },
0902     { 50, 9 }, { 13, 10 }, { 49, 11 }, { 20, 12 }, { 21, 13 }, { 25, 14 },
0903     { 46, 15 }, { 45, 16 }, { 28, 17 }, { 44, 18 }, { 31, 19 }, { 43, 20 },
0904     { 42, 21 }, { 34, 22 }, { 35, 23 }, { 36, 24 }, { 37, 25 }, { 38, 26 },
0905     { 39, 27 }, { 40, 28 }, { 41, 29 }, { 90, 30 }, { 91, 32 }, { 92, 33 },
0906     { 94, 34 }, { 95, 35 }, { 96, 36 }, { 97, 37 }, { 98, 38 },
0907     { 110, 39 }, { 111, 40 }, { 112, 41 }, { 105, 42 }, { 107, 43 },
0908     { 47, 50 }, { 48, 51 },
0909 };
0910 
0911 static const struct msm_pinctrl_soc_data msm8909_pinctrl = {
0912     .pins = msm8909_pins,
0913     .npins = ARRAY_SIZE(msm8909_pins),
0914     .functions = msm8909_functions,
0915     .nfunctions = ARRAY_SIZE(msm8909_functions),
0916     .groups = msm8909_groups,
0917     .ngroups = ARRAY_SIZE(msm8909_groups),
0918     .ngpios = 113,
0919     .wakeirq_map = msm8909_mpm_map,
0920     .nwakeirq_map = ARRAY_SIZE(msm8909_mpm_map),
0921 };
0922 
0923 static int msm8909_pinctrl_probe(struct platform_device *pdev)
0924 {
0925     return msm_pinctrl_probe(pdev, &msm8909_pinctrl);
0926 }
0927 
0928 static const struct of_device_id msm8909_pinctrl_of_match[] = {
0929     { .compatible = "qcom,msm8909-tlmm", },
0930     { },
0931 };
0932 MODULE_DEVICE_TABLE(of, msm8909_pinctrl_of_match);
0933 
0934 static struct platform_driver msm8909_pinctrl_driver = {
0935     .driver = {
0936         .name = "msm8909-pinctrl",
0937         .of_match_table = msm8909_pinctrl_of_match,
0938     },
0939     .probe = msm8909_pinctrl_probe,
0940     .remove = msm_pinctrl_remove,
0941 };
0942 
0943 static int __init msm8909_pinctrl_init(void)
0944 {
0945     return platform_driver_register(&msm8909_pinctrl_driver);
0946 }
0947 arch_initcall(msm8909_pinctrl_init);
0948 
0949 static void __exit msm8909_pinctrl_exit(void)
0950 {
0951     platform_driver_unregister(&msm8909_pinctrl_driver);
0952 }
0953 module_exit(msm8909_pinctrl_exit);
0954 
0955 MODULE_DESCRIPTION("Qualcomm MSM8909 TLMM pinctrl driver");
0956 MODULE_LICENSE("GPL");