0001
0002
0003
0004
0005
0006 #include <linux/module.h>
0007 #include <linux/of.h>
0008 #include <linux/platform_device.h>
0009 #include <linux/pinctrl/pinctrl.h>
0010
0011 #include "pinctrl-msm.h"
0012
0013 static const struct pinctrl_pin_desc msm8660_pins[] = {
0014 PINCTRL_PIN(0, "GPIO_0"),
0015 PINCTRL_PIN(1, "GPIO_1"),
0016 PINCTRL_PIN(2, "GPIO_2"),
0017 PINCTRL_PIN(3, "GPIO_3"),
0018 PINCTRL_PIN(4, "GPIO_4"),
0019 PINCTRL_PIN(5, "GPIO_5"),
0020 PINCTRL_PIN(6, "GPIO_6"),
0021 PINCTRL_PIN(7, "GPIO_7"),
0022 PINCTRL_PIN(8, "GPIO_8"),
0023 PINCTRL_PIN(9, "GPIO_9"),
0024 PINCTRL_PIN(10, "GPIO_10"),
0025 PINCTRL_PIN(11, "GPIO_11"),
0026 PINCTRL_PIN(12, "GPIO_12"),
0027 PINCTRL_PIN(13, "GPIO_13"),
0028 PINCTRL_PIN(14, "GPIO_14"),
0029 PINCTRL_PIN(15, "GPIO_15"),
0030 PINCTRL_PIN(16, "GPIO_16"),
0031 PINCTRL_PIN(17, "GPIO_17"),
0032 PINCTRL_PIN(18, "GPIO_18"),
0033 PINCTRL_PIN(19, "GPIO_19"),
0034 PINCTRL_PIN(20, "GPIO_20"),
0035 PINCTRL_PIN(21, "GPIO_21"),
0036 PINCTRL_PIN(22, "GPIO_22"),
0037 PINCTRL_PIN(23, "GPIO_23"),
0038 PINCTRL_PIN(24, "GPIO_24"),
0039 PINCTRL_PIN(25, "GPIO_25"),
0040 PINCTRL_PIN(26, "GPIO_26"),
0041 PINCTRL_PIN(27, "GPIO_27"),
0042 PINCTRL_PIN(28, "GPIO_28"),
0043 PINCTRL_PIN(29, "GPIO_29"),
0044 PINCTRL_PIN(30, "GPIO_30"),
0045 PINCTRL_PIN(31, "GPIO_31"),
0046 PINCTRL_PIN(32, "GPIO_32"),
0047 PINCTRL_PIN(33, "GPIO_33"),
0048 PINCTRL_PIN(34, "GPIO_34"),
0049 PINCTRL_PIN(35, "GPIO_35"),
0050 PINCTRL_PIN(36, "GPIO_36"),
0051 PINCTRL_PIN(37, "GPIO_37"),
0052 PINCTRL_PIN(38, "GPIO_38"),
0053 PINCTRL_PIN(39, "GPIO_39"),
0054 PINCTRL_PIN(40, "GPIO_40"),
0055 PINCTRL_PIN(41, "GPIO_41"),
0056 PINCTRL_PIN(42, "GPIO_42"),
0057 PINCTRL_PIN(43, "GPIO_43"),
0058 PINCTRL_PIN(44, "GPIO_44"),
0059 PINCTRL_PIN(45, "GPIO_45"),
0060 PINCTRL_PIN(46, "GPIO_46"),
0061 PINCTRL_PIN(47, "GPIO_47"),
0062 PINCTRL_PIN(48, "GPIO_48"),
0063 PINCTRL_PIN(49, "GPIO_49"),
0064 PINCTRL_PIN(50, "GPIO_50"),
0065 PINCTRL_PIN(51, "GPIO_51"),
0066 PINCTRL_PIN(52, "GPIO_52"),
0067 PINCTRL_PIN(53, "GPIO_53"),
0068 PINCTRL_PIN(54, "GPIO_54"),
0069 PINCTRL_PIN(55, "GPIO_55"),
0070 PINCTRL_PIN(56, "GPIO_56"),
0071 PINCTRL_PIN(57, "GPIO_57"),
0072 PINCTRL_PIN(58, "GPIO_58"),
0073 PINCTRL_PIN(59, "GPIO_59"),
0074 PINCTRL_PIN(60, "GPIO_60"),
0075 PINCTRL_PIN(61, "GPIO_61"),
0076 PINCTRL_PIN(62, "GPIO_62"),
0077 PINCTRL_PIN(63, "GPIO_63"),
0078 PINCTRL_PIN(64, "GPIO_64"),
0079 PINCTRL_PIN(65, "GPIO_65"),
0080 PINCTRL_PIN(66, "GPIO_66"),
0081 PINCTRL_PIN(67, "GPIO_67"),
0082 PINCTRL_PIN(68, "GPIO_68"),
0083 PINCTRL_PIN(69, "GPIO_69"),
0084 PINCTRL_PIN(70, "GPIO_70"),
0085 PINCTRL_PIN(71, "GPIO_71"),
0086 PINCTRL_PIN(72, "GPIO_72"),
0087 PINCTRL_PIN(73, "GPIO_73"),
0088 PINCTRL_PIN(74, "GPIO_74"),
0089 PINCTRL_PIN(75, "GPIO_75"),
0090 PINCTRL_PIN(76, "GPIO_76"),
0091 PINCTRL_PIN(77, "GPIO_77"),
0092 PINCTRL_PIN(78, "GPIO_78"),
0093 PINCTRL_PIN(79, "GPIO_79"),
0094 PINCTRL_PIN(80, "GPIO_80"),
0095 PINCTRL_PIN(81, "GPIO_81"),
0096 PINCTRL_PIN(82, "GPIO_82"),
0097 PINCTRL_PIN(83, "GPIO_83"),
0098 PINCTRL_PIN(84, "GPIO_84"),
0099 PINCTRL_PIN(85, "GPIO_85"),
0100 PINCTRL_PIN(86, "GPIO_86"),
0101 PINCTRL_PIN(87, "GPIO_87"),
0102 PINCTRL_PIN(88, "GPIO_88"),
0103 PINCTRL_PIN(89, "GPIO_89"),
0104 PINCTRL_PIN(90, "GPIO_90"),
0105 PINCTRL_PIN(91, "GPIO_91"),
0106 PINCTRL_PIN(92, "GPIO_92"),
0107 PINCTRL_PIN(93, "GPIO_93"),
0108 PINCTRL_PIN(94, "GPIO_94"),
0109 PINCTRL_PIN(95, "GPIO_95"),
0110 PINCTRL_PIN(96, "GPIO_96"),
0111 PINCTRL_PIN(97, "GPIO_97"),
0112 PINCTRL_PIN(98, "GPIO_98"),
0113 PINCTRL_PIN(99, "GPIO_99"),
0114 PINCTRL_PIN(100, "GPIO_100"),
0115 PINCTRL_PIN(101, "GPIO_101"),
0116 PINCTRL_PIN(102, "GPIO_102"),
0117 PINCTRL_PIN(103, "GPIO_103"),
0118 PINCTRL_PIN(104, "GPIO_104"),
0119 PINCTRL_PIN(105, "GPIO_105"),
0120 PINCTRL_PIN(106, "GPIO_106"),
0121 PINCTRL_PIN(107, "GPIO_107"),
0122 PINCTRL_PIN(108, "GPIO_108"),
0123 PINCTRL_PIN(109, "GPIO_109"),
0124 PINCTRL_PIN(110, "GPIO_110"),
0125 PINCTRL_PIN(111, "GPIO_111"),
0126 PINCTRL_PIN(112, "GPIO_112"),
0127 PINCTRL_PIN(113, "GPIO_113"),
0128 PINCTRL_PIN(114, "GPIO_114"),
0129 PINCTRL_PIN(115, "GPIO_115"),
0130 PINCTRL_PIN(116, "GPIO_116"),
0131 PINCTRL_PIN(117, "GPIO_117"),
0132 PINCTRL_PIN(118, "GPIO_118"),
0133 PINCTRL_PIN(119, "GPIO_119"),
0134 PINCTRL_PIN(120, "GPIO_120"),
0135 PINCTRL_PIN(121, "GPIO_121"),
0136 PINCTRL_PIN(122, "GPIO_122"),
0137 PINCTRL_PIN(123, "GPIO_123"),
0138 PINCTRL_PIN(124, "GPIO_124"),
0139 PINCTRL_PIN(125, "GPIO_125"),
0140 PINCTRL_PIN(126, "GPIO_126"),
0141 PINCTRL_PIN(127, "GPIO_127"),
0142 PINCTRL_PIN(128, "GPIO_128"),
0143 PINCTRL_PIN(129, "GPIO_129"),
0144 PINCTRL_PIN(130, "GPIO_130"),
0145 PINCTRL_PIN(131, "GPIO_131"),
0146 PINCTRL_PIN(132, "GPIO_132"),
0147 PINCTRL_PIN(133, "GPIO_133"),
0148 PINCTRL_PIN(134, "GPIO_134"),
0149 PINCTRL_PIN(135, "GPIO_135"),
0150 PINCTRL_PIN(136, "GPIO_136"),
0151 PINCTRL_PIN(137, "GPIO_137"),
0152 PINCTRL_PIN(138, "GPIO_138"),
0153 PINCTRL_PIN(139, "GPIO_139"),
0154 PINCTRL_PIN(140, "GPIO_140"),
0155 PINCTRL_PIN(141, "GPIO_141"),
0156 PINCTRL_PIN(142, "GPIO_142"),
0157 PINCTRL_PIN(143, "GPIO_143"),
0158 PINCTRL_PIN(144, "GPIO_144"),
0159 PINCTRL_PIN(145, "GPIO_145"),
0160 PINCTRL_PIN(146, "GPIO_146"),
0161 PINCTRL_PIN(147, "GPIO_147"),
0162 PINCTRL_PIN(148, "GPIO_148"),
0163 PINCTRL_PIN(149, "GPIO_149"),
0164 PINCTRL_PIN(150, "GPIO_150"),
0165 PINCTRL_PIN(151, "GPIO_151"),
0166 PINCTRL_PIN(152, "GPIO_152"),
0167 PINCTRL_PIN(153, "GPIO_153"),
0168 PINCTRL_PIN(154, "GPIO_154"),
0169 PINCTRL_PIN(155, "GPIO_155"),
0170 PINCTRL_PIN(156, "GPIO_156"),
0171 PINCTRL_PIN(157, "GPIO_157"),
0172 PINCTRL_PIN(158, "GPIO_158"),
0173 PINCTRL_PIN(159, "GPIO_159"),
0174 PINCTRL_PIN(160, "GPIO_160"),
0175 PINCTRL_PIN(161, "GPIO_161"),
0176 PINCTRL_PIN(162, "GPIO_162"),
0177 PINCTRL_PIN(163, "GPIO_163"),
0178 PINCTRL_PIN(164, "GPIO_164"),
0179 PINCTRL_PIN(165, "GPIO_165"),
0180 PINCTRL_PIN(166, "GPIO_166"),
0181 PINCTRL_PIN(167, "GPIO_167"),
0182 PINCTRL_PIN(168, "GPIO_168"),
0183 PINCTRL_PIN(169, "GPIO_169"),
0184 PINCTRL_PIN(170, "GPIO_170"),
0185 PINCTRL_PIN(171, "GPIO_171"),
0186 PINCTRL_PIN(172, "GPIO_172"),
0187
0188 PINCTRL_PIN(173, "SDC4_CLK"),
0189 PINCTRL_PIN(174, "SDC4_CMD"),
0190 PINCTRL_PIN(175, "SDC4_DATA"),
0191 PINCTRL_PIN(176, "SDC3_CLK"),
0192 PINCTRL_PIN(177, "SDC3_CMD"),
0193 PINCTRL_PIN(178, "SDC3_DATA"),
0194 };
0195
0196 #define DECLARE_MSM_GPIO_PIN(pin) static const unsigned int gpio##pin##_pins[] = { pin }
0197 DECLARE_MSM_GPIO_PIN(0);
0198 DECLARE_MSM_GPIO_PIN(1);
0199 DECLARE_MSM_GPIO_PIN(2);
0200 DECLARE_MSM_GPIO_PIN(3);
0201 DECLARE_MSM_GPIO_PIN(4);
0202 DECLARE_MSM_GPIO_PIN(5);
0203 DECLARE_MSM_GPIO_PIN(6);
0204 DECLARE_MSM_GPIO_PIN(7);
0205 DECLARE_MSM_GPIO_PIN(8);
0206 DECLARE_MSM_GPIO_PIN(9);
0207 DECLARE_MSM_GPIO_PIN(10);
0208 DECLARE_MSM_GPIO_PIN(11);
0209 DECLARE_MSM_GPIO_PIN(12);
0210 DECLARE_MSM_GPIO_PIN(13);
0211 DECLARE_MSM_GPIO_PIN(14);
0212 DECLARE_MSM_GPIO_PIN(15);
0213 DECLARE_MSM_GPIO_PIN(16);
0214 DECLARE_MSM_GPIO_PIN(17);
0215 DECLARE_MSM_GPIO_PIN(18);
0216 DECLARE_MSM_GPIO_PIN(19);
0217 DECLARE_MSM_GPIO_PIN(20);
0218 DECLARE_MSM_GPIO_PIN(21);
0219 DECLARE_MSM_GPIO_PIN(22);
0220 DECLARE_MSM_GPIO_PIN(23);
0221 DECLARE_MSM_GPIO_PIN(24);
0222 DECLARE_MSM_GPIO_PIN(25);
0223 DECLARE_MSM_GPIO_PIN(26);
0224 DECLARE_MSM_GPIO_PIN(27);
0225 DECLARE_MSM_GPIO_PIN(28);
0226 DECLARE_MSM_GPIO_PIN(29);
0227 DECLARE_MSM_GPIO_PIN(30);
0228 DECLARE_MSM_GPIO_PIN(31);
0229 DECLARE_MSM_GPIO_PIN(32);
0230 DECLARE_MSM_GPIO_PIN(33);
0231 DECLARE_MSM_GPIO_PIN(34);
0232 DECLARE_MSM_GPIO_PIN(35);
0233 DECLARE_MSM_GPIO_PIN(36);
0234 DECLARE_MSM_GPIO_PIN(37);
0235 DECLARE_MSM_GPIO_PIN(38);
0236 DECLARE_MSM_GPIO_PIN(39);
0237 DECLARE_MSM_GPIO_PIN(40);
0238 DECLARE_MSM_GPIO_PIN(41);
0239 DECLARE_MSM_GPIO_PIN(42);
0240 DECLARE_MSM_GPIO_PIN(43);
0241 DECLARE_MSM_GPIO_PIN(44);
0242 DECLARE_MSM_GPIO_PIN(45);
0243 DECLARE_MSM_GPIO_PIN(46);
0244 DECLARE_MSM_GPIO_PIN(47);
0245 DECLARE_MSM_GPIO_PIN(48);
0246 DECLARE_MSM_GPIO_PIN(49);
0247 DECLARE_MSM_GPIO_PIN(50);
0248 DECLARE_MSM_GPIO_PIN(51);
0249 DECLARE_MSM_GPIO_PIN(52);
0250 DECLARE_MSM_GPIO_PIN(53);
0251 DECLARE_MSM_GPIO_PIN(54);
0252 DECLARE_MSM_GPIO_PIN(55);
0253 DECLARE_MSM_GPIO_PIN(56);
0254 DECLARE_MSM_GPIO_PIN(57);
0255 DECLARE_MSM_GPIO_PIN(58);
0256 DECLARE_MSM_GPIO_PIN(59);
0257 DECLARE_MSM_GPIO_PIN(60);
0258 DECLARE_MSM_GPIO_PIN(61);
0259 DECLARE_MSM_GPIO_PIN(62);
0260 DECLARE_MSM_GPIO_PIN(63);
0261 DECLARE_MSM_GPIO_PIN(64);
0262 DECLARE_MSM_GPIO_PIN(65);
0263 DECLARE_MSM_GPIO_PIN(66);
0264 DECLARE_MSM_GPIO_PIN(67);
0265 DECLARE_MSM_GPIO_PIN(68);
0266 DECLARE_MSM_GPIO_PIN(69);
0267 DECLARE_MSM_GPIO_PIN(70);
0268 DECLARE_MSM_GPIO_PIN(71);
0269 DECLARE_MSM_GPIO_PIN(72);
0270 DECLARE_MSM_GPIO_PIN(73);
0271 DECLARE_MSM_GPIO_PIN(74);
0272 DECLARE_MSM_GPIO_PIN(75);
0273 DECLARE_MSM_GPIO_PIN(76);
0274 DECLARE_MSM_GPIO_PIN(77);
0275 DECLARE_MSM_GPIO_PIN(78);
0276 DECLARE_MSM_GPIO_PIN(79);
0277 DECLARE_MSM_GPIO_PIN(80);
0278 DECLARE_MSM_GPIO_PIN(81);
0279 DECLARE_MSM_GPIO_PIN(82);
0280 DECLARE_MSM_GPIO_PIN(83);
0281 DECLARE_MSM_GPIO_PIN(84);
0282 DECLARE_MSM_GPIO_PIN(85);
0283 DECLARE_MSM_GPIO_PIN(86);
0284 DECLARE_MSM_GPIO_PIN(87);
0285 DECLARE_MSM_GPIO_PIN(88);
0286 DECLARE_MSM_GPIO_PIN(89);
0287 DECLARE_MSM_GPIO_PIN(90);
0288 DECLARE_MSM_GPIO_PIN(91);
0289 DECLARE_MSM_GPIO_PIN(92);
0290 DECLARE_MSM_GPIO_PIN(93);
0291 DECLARE_MSM_GPIO_PIN(94);
0292 DECLARE_MSM_GPIO_PIN(95);
0293 DECLARE_MSM_GPIO_PIN(96);
0294 DECLARE_MSM_GPIO_PIN(97);
0295 DECLARE_MSM_GPIO_PIN(98);
0296 DECLARE_MSM_GPIO_PIN(99);
0297 DECLARE_MSM_GPIO_PIN(100);
0298 DECLARE_MSM_GPIO_PIN(101);
0299 DECLARE_MSM_GPIO_PIN(102);
0300 DECLARE_MSM_GPIO_PIN(103);
0301 DECLARE_MSM_GPIO_PIN(104);
0302 DECLARE_MSM_GPIO_PIN(105);
0303 DECLARE_MSM_GPIO_PIN(106);
0304 DECLARE_MSM_GPIO_PIN(107);
0305 DECLARE_MSM_GPIO_PIN(108);
0306 DECLARE_MSM_GPIO_PIN(109);
0307 DECLARE_MSM_GPIO_PIN(110);
0308 DECLARE_MSM_GPIO_PIN(111);
0309 DECLARE_MSM_GPIO_PIN(112);
0310 DECLARE_MSM_GPIO_PIN(113);
0311 DECLARE_MSM_GPIO_PIN(114);
0312 DECLARE_MSM_GPIO_PIN(115);
0313 DECLARE_MSM_GPIO_PIN(116);
0314 DECLARE_MSM_GPIO_PIN(117);
0315 DECLARE_MSM_GPIO_PIN(118);
0316 DECLARE_MSM_GPIO_PIN(119);
0317 DECLARE_MSM_GPIO_PIN(120);
0318 DECLARE_MSM_GPIO_PIN(121);
0319 DECLARE_MSM_GPIO_PIN(122);
0320 DECLARE_MSM_GPIO_PIN(123);
0321 DECLARE_MSM_GPIO_PIN(124);
0322 DECLARE_MSM_GPIO_PIN(125);
0323 DECLARE_MSM_GPIO_PIN(126);
0324 DECLARE_MSM_GPIO_PIN(127);
0325 DECLARE_MSM_GPIO_PIN(128);
0326 DECLARE_MSM_GPIO_PIN(129);
0327 DECLARE_MSM_GPIO_PIN(130);
0328 DECLARE_MSM_GPIO_PIN(131);
0329 DECLARE_MSM_GPIO_PIN(132);
0330 DECLARE_MSM_GPIO_PIN(133);
0331 DECLARE_MSM_GPIO_PIN(134);
0332 DECLARE_MSM_GPIO_PIN(135);
0333 DECLARE_MSM_GPIO_PIN(136);
0334 DECLARE_MSM_GPIO_PIN(137);
0335 DECLARE_MSM_GPIO_PIN(138);
0336 DECLARE_MSM_GPIO_PIN(139);
0337 DECLARE_MSM_GPIO_PIN(140);
0338 DECLARE_MSM_GPIO_PIN(141);
0339 DECLARE_MSM_GPIO_PIN(142);
0340 DECLARE_MSM_GPIO_PIN(143);
0341 DECLARE_MSM_GPIO_PIN(144);
0342 DECLARE_MSM_GPIO_PIN(145);
0343 DECLARE_MSM_GPIO_PIN(146);
0344 DECLARE_MSM_GPIO_PIN(147);
0345 DECLARE_MSM_GPIO_PIN(148);
0346 DECLARE_MSM_GPIO_PIN(149);
0347 DECLARE_MSM_GPIO_PIN(150);
0348 DECLARE_MSM_GPIO_PIN(151);
0349 DECLARE_MSM_GPIO_PIN(152);
0350 DECLARE_MSM_GPIO_PIN(153);
0351 DECLARE_MSM_GPIO_PIN(154);
0352 DECLARE_MSM_GPIO_PIN(155);
0353 DECLARE_MSM_GPIO_PIN(156);
0354 DECLARE_MSM_GPIO_PIN(157);
0355 DECLARE_MSM_GPIO_PIN(158);
0356 DECLARE_MSM_GPIO_PIN(159);
0357 DECLARE_MSM_GPIO_PIN(160);
0358 DECLARE_MSM_GPIO_PIN(161);
0359 DECLARE_MSM_GPIO_PIN(162);
0360 DECLARE_MSM_GPIO_PIN(163);
0361 DECLARE_MSM_GPIO_PIN(164);
0362 DECLARE_MSM_GPIO_PIN(165);
0363 DECLARE_MSM_GPIO_PIN(166);
0364 DECLARE_MSM_GPIO_PIN(167);
0365 DECLARE_MSM_GPIO_PIN(168);
0366 DECLARE_MSM_GPIO_PIN(169);
0367 DECLARE_MSM_GPIO_PIN(170);
0368 DECLARE_MSM_GPIO_PIN(171);
0369 DECLARE_MSM_GPIO_PIN(172);
0370
0371 static const unsigned int sdc4_clk_pins[] = { 173 };
0372 static const unsigned int sdc4_cmd_pins[] = { 174 };
0373 static const unsigned int sdc4_data_pins[] = { 175 };
0374 static const unsigned int sdc3_clk_pins[] = { 176 };
0375 static const unsigned int sdc3_cmd_pins[] = { 177 };
0376 static const unsigned int sdc3_data_pins[] = { 178 };
0377
0378 #define FUNCTION(fname) \
0379 [MSM_MUX_##fname] = { \
0380 .name = #fname, \
0381 .groups = fname##_groups, \
0382 .ngroups = ARRAY_SIZE(fname##_groups), \
0383 }
0384
0385 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7) \
0386 { \
0387 .name = "gpio" #id, \
0388 .pins = gpio##id##_pins, \
0389 .npins = ARRAY_SIZE(gpio##id##_pins), \
0390 .funcs = (int[]){ \
0391 MSM_MUX_gpio, \
0392 MSM_MUX_##f1, \
0393 MSM_MUX_##f2, \
0394 MSM_MUX_##f3, \
0395 MSM_MUX_##f4, \
0396 MSM_MUX_##f5, \
0397 MSM_MUX_##f6, \
0398 MSM_MUX_##f7, \
0399 }, \
0400 .nfuncs = 8, \
0401 .ctl_reg = 0x1000 + 0x10 * id, \
0402 .io_reg = 0x1004 + 0x10 * id, \
0403 .intr_cfg_reg = 0x1008 + 0x10 * id, \
0404 .intr_status_reg = 0x100c + 0x10 * id, \
0405 .intr_target_reg = 0x400 + 0x4 * id, \
0406 .mux_bit = 2, \
0407 .pull_bit = 0, \
0408 .drv_bit = 6, \
0409 .oe_bit = 9, \
0410 .in_bit = 0, \
0411 .out_bit = 1, \
0412 .intr_enable_bit = 0, \
0413 .intr_status_bit = 0, \
0414 .intr_ack_high = 1, \
0415 .intr_target_bit = 0, \
0416 .intr_target_kpss_val = 4, \
0417 .intr_raw_status_bit = 3, \
0418 .intr_polarity_bit = 1, \
0419 .intr_detection_bit = 2, \
0420 .intr_detection_width = 1, \
0421 }
0422
0423 #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
0424 { \
0425 .name = #pg_name, \
0426 .pins = pg_name##_pins, \
0427 .npins = ARRAY_SIZE(pg_name##_pins), \
0428 .ctl_reg = ctl, \
0429 .io_reg = 0, \
0430 .intr_cfg_reg = 0, \
0431 .intr_status_reg = 0, \
0432 .intr_target_reg = 0, \
0433 .mux_bit = -1, \
0434 .pull_bit = pull, \
0435 .drv_bit = drv, \
0436 .oe_bit = -1, \
0437 .in_bit = -1, \
0438 .out_bit = -1, \
0439 .intr_enable_bit = -1, \
0440 .intr_status_bit = -1, \
0441 .intr_target_bit = -1, \
0442 .intr_target_kpss_val = -1, \
0443 .intr_raw_status_bit = -1, \
0444 .intr_polarity_bit = -1, \
0445 .intr_detection_bit = -1, \
0446 .intr_detection_width = -1, \
0447 }
0448
0449 enum msm8660_functions {
0450 MSM_MUX_gpio,
0451 MSM_MUX_cam_mclk,
0452 MSM_MUX_dsub,
0453 MSM_MUX_ext_gps,
0454 MSM_MUX_gp_clk_0a,
0455 MSM_MUX_gp_clk_0b,
0456 MSM_MUX_gp_clk_1a,
0457 MSM_MUX_gp_clk_1b,
0458 MSM_MUX_gp_clk_2a,
0459 MSM_MUX_gp_clk_2b,
0460 MSM_MUX_gp_mn,
0461 MSM_MUX_gsbi1,
0462 MSM_MUX_gsbi1_spi_cs1_n,
0463 MSM_MUX_gsbi1_spi_cs2a_n,
0464 MSM_MUX_gsbi1_spi_cs2b_n,
0465 MSM_MUX_gsbi1_spi_cs3_n,
0466 MSM_MUX_gsbi2,
0467 MSM_MUX_gsbi2_spi_cs1_n,
0468 MSM_MUX_gsbi2_spi_cs2_n,
0469 MSM_MUX_gsbi2_spi_cs3_n,
0470 MSM_MUX_gsbi3,
0471 MSM_MUX_gsbi3_spi_cs1_n,
0472 MSM_MUX_gsbi3_spi_cs2_n,
0473 MSM_MUX_gsbi3_spi_cs3_n,
0474 MSM_MUX_gsbi4,
0475 MSM_MUX_gsbi5,
0476 MSM_MUX_gsbi6,
0477 MSM_MUX_gsbi7,
0478 MSM_MUX_gsbi8,
0479 MSM_MUX_gsbi9,
0480 MSM_MUX_gsbi10,
0481 MSM_MUX_gsbi11,
0482 MSM_MUX_gsbi12,
0483 MSM_MUX_hdmi,
0484 MSM_MUX_i2s,
0485 MSM_MUX_lcdc,
0486 MSM_MUX_mdp_vsync,
0487 MSM_MUX_mi2s,
0488 MSM_MUX_pcm,
0489 MSM_MUX_ps_hold,
0490 MSM_MUX_sdc1,
0491 MSM_MUX_sdc2,
0492 MSM_MUX_sdc5,
0493 MSM_MUX_tsif1,
0494 MSM_MUX_tsif2,
0495 MSM_MUX_usb_fs1,
0496 MSM_MUX_usb_fs1_oe_n,
0497 MSM_MUX_usb_fs2,
0498 MSM_MUX_usb_fs2_oe_n,
0499 MSM_MUX_vfe,
0500 MSM_MUX_vsens_alarm,
0501 MSM_MUX_ebi2cs,
0502 MSM_MUX_ebi2,
0503 MSM_MUX__,
0504 };
0505
0506 static const char * const gpio_groups[] = {
0507 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
0508 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
0509 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
0510 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
0511 "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
0512 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
0513 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
0514 "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
0515 "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
0516 "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
0517 "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
0518 "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
0519 "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
0520 "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
0521 "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
0522 "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
0523 "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
0524 "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
0525 "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
0526 "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
0527 "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
0528 "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
0529 "gpio147", "gpio148", "gpio149", "gpio150", "gpio151", "gpio152",
0530 "gpio153", "gpio154", "gpio155", "gpio156", "gpio157", "gpio158",
0531 "gpio159", "gpio160", "gpio161", "gpio162", "gpio163", "gpio164",
0532 "gpio165", "gpio166", "gpio167", "gpio168", "gpio169", "gpio170",
0533 "gpio171", "gpio172"
0534 };
0535
0536 static const char * const cam_mclk_groups[] = {
0537 "gpio32"
0538 };
0539 static const char * const dsub_groups[] = {
0540 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
0541 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
0542 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
0543 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27"
0544 };
0545 static const char * const ext_gps_groups[] = {
0546 "gpio66", "gpio67", "gpio68", "gpio69"
0547 };
0548 static const char * const gp_clk_0a_groups[] = {
0549 "gpio30"
0550 };
0551 static const char * const gp_clk_0b_groups[] = {
0552 "gpio115"
0553 };
0554 static const char * const gp_clk_1a_groups[] = {
0555 "gpio31"
0556 };
0557 static const char * const gp_clk_1b_groups[] = {
0558 "gpio122"
0559 };
0560 static const char * const gp_clk_2a_groups[] = {
0561 "gpio103"
0562 };
0563 static const char * const gp_clk_2b_groups[] = {
0564 "gpio70"
0565 };
0566 static const char * const gp_mn_groups[] = {
0567 "gpio29"
0568 };
0569 static const char * const gsbi1_groups[] = {
0570 "gpio33", "gpio34", "gpio35", "gpio36"
0571 };
0572 static const char * const gsbi1_spi_cs1_n_groups[] = {
0573 };
0574 static const char * const gsbi1_spi_cs2a_n_groups[] = {
0575 };
0576 static const char * const gsbi1_spi_cs2b_n_groups[] = {
0577 };
0578 static const char * const gsbi1_spi_cs3_n_groups[] = {
0579 };
0580 static const char * const gsbi2_groups[] = {
0581 "gpio37", "gpio38", "gpio39", "gpio40"
0582 };
0583 static const char * const gsbi2_spi_cs1_n_groups[] = {
0584 "gpio123"
0585 };
0586 static const char * const gsbi2_spi_cs2_n_groups[] = {
0587 "gpio124"
0588 };
0589 static const char * const gsbi2_spi_cs3_n_groups[] = {
0590 "gpio125"
0591 };
0592 static const char * const gsbi3_groups[] = {
0593 "gpio41", "gpio42", "gpio43", "gpio44"
0594 };
0595 static const char * const gsbi3_spi_cs1_n_groups[] = {
0596 "gpio62"
0597 };
0598 static const char * const gsbi3_spi_cs2_n_groups[] = {
0599 "gpio45"
0600 };
0601 static const char * const gsbi3_spi_cs3_n_groups[] = {
0602 "gpio46"
0603 };
0604 static const char * const gsbi4_groups[] = {
0605 "gpio45", "gpio56", "gpio47", "gpio48"
0606 };
0607 static const char * const gsbi5_groups[] = {
0608 "gpio49", "gpio50", "gpio51", "gpio52"
0609 };
0610 static const char * const gsbi6_groups[] = {
0611 "gpio53", "gpio54", "gpio55", "gpio56"
0612 };
0613 static const char * const gsbi7_groups[] = {
0614 "gpio57", "gpio58", "gpio59", "gpio60"
0615 };
0616 static const char * const gsbi8_groups[] = {
0617 "gpio62", "gpio63", "gpio64", "gpio65"
0618 };
0619 static const char * const gsbi9_groups[] = {
0620 "gpio66", "gpio67", "gpio68", "gpio69"
0621 };
0622 static const char * const gsbi10_groups[] = {
0623 "gpio70", "gpio71", "gpio72", "gpio73"
0624 };
0625 static const char * const gsbi11_groups[] = {
0626 "gpio103", "gpio104", "gpio105", "gpio106"
0627 };
0628 static const char * const gsbi12_groups[] = {
0629 "gpio115", "gpio116", "gpio117", "gpio118"
0630 };
0631 static const char * const hdmi_groups[] = {
0632 "gpio169", "gpio170", "gpio171", "gpio172"
0633 };
0634 static const char * const i2s_groups[] = {
0635 "gpio108", "gpio109", "gpio110", "gpio115", "gpio116", "gpio117",
0636 "gpio118", "gpio119", "gpio120", "gpio121", "gpio122"
0637 };
0638 static const char * const lcdc_groups[] = {
0639 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
0640 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
0641 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
0642 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27"
0643 };
0644 static const char * const mdp_vsync_groups[] = {
0645 "gpio28", "gpio39", "gpio41"
0646 };
0647 static const char * const mi2s_groups[] = {
0648 "gpio101", "gpio102", "gpio103", "gpio104", "gpio105", "gpio106",
0649 "gpio107"
0650 };
0651 static const char * const pcm_groups[] = {
0652 "gpio111", "gpio112", "gpio113", "gpio114"
0653 };
0654 static const char * const ps_hold_groups[] = {
0655 "gpio92"
0656 };
0657 static const char * const sdc1_groups[] = {
0658 "gpio159", "gpio160", "gpio161", "gpio162", "gpio163", "gpio164",
0659 "gpio165", "gpio166", "gpio167", "gpio168"
0660 };
0661 static const char * const sdc2_groups[] = {
0662 "gpio143", "gpio144", "gpio145", "gpio146", "gpio147", "gpio148",
0663 "gpio149", "gpio150", "gpio151", "gpio152"
0664 };
0665 static const char * const sdc5_groups[] = {
0666 "gpio95", "gpio96", "gpio97", "gpio98", "gpio99", "gpio100"
0667 };
0668 static const char * const tsif1_groups[] = {
0669 "gpio93", "gpio94", "gpio95", "gpio96"
0670 };
0671 static const char * const tsif2_groups[] = {
0672 "gpio97", "gpio98", "gpio99", "gpio100"
0673 };
0674 static const char * const usb_fs1_groups[] = {
0675 "gpio49", "gpio50", "gpio51"
0676 };
0677 static const char * const usb_fs1_oe_n_groups[] = {
0678 "gpio51"
0679 };
0680 static const char * const usb_fs2_groups[] = {
0681 "gpio71", "gpio72", "gpio73"
0682 };
0683 static const char * const usb_fs2_oe_n_groups[] = {
0684 "gpio73"
0685 };
0686 static const char * const vfe_groups[] = {
0687 "gpio29", "gpio30", "gpio31", "gpio42", "gpio46", "gpio105", "gpio106",
0688 "gpio117"
0689 };
0690 static const char * const vsens_alarm_groups[] = {
0691 "gpio127"
0692 };
0693 static const char * const ebi2cs_groups[] = {
0694 "gpio39",
0695 "gpio40",
0696 "gpio123",
0697 "gpio124",
0698 "gpio131",
0699 "gpio132",
0700 "gpio133",
0701 "gpio134",
0702 };
0703 static const char * const ebi2_groups[] = {
0704
0705 "gpio37", "gpio38",
0706
0707 "gpio123", "gpio124", "gpio125", "gpio126",
0708 "gpio127", "gpio128", "gpio129", "gpio130",
0709
0710 "gpio135", "gpio136", "gpio137", "gpio138", "gpio139",
0711 "gpio140", "gpio141", "gpio142", "gpio143", "gpio144",
0712 "gpio145", "gpio146", "gpio147", "gpio148", "gpio149",
0713 "gpio150",
0714 "gpio151",
0715 "gpio152",
0716 "gpio153",
0717 "gpio154",
0718 "gpio155",
0719 "gpio156",
0720 "gpio157",
0721 "gpio158",
0722 };
0723
0724 static const struct msm_function msm8660_functions[] = {
0725 FUNCTION(gpio),
0726 FUNCTION(cam_mclk),
0727 FUNCTION(dsub),
0728 FUNCTION(ext_gps),
0729 FUNCTION(gp_clk_0a),
0730 FUNCTION(gp_clk_0b),
0731 FUNCTION(gp_clk_1a),
0732 FUNCTION(gp_clk_1b),
0733 FUNCTION(gp_clk_2a),
0734 FUNCTION(gp_clk_2b),
0735 FUNCTION(gp_mn),
0736 FUNCTION(gsbi1),
0737 FUNCTION(gsbi1_spi_cs1_n),
0738 FUNCTION(gsbi1_spi_cs2a_n),
0739 FUNCTION(gsbi1_spi_cs2b_n),
0740 FUNCTION(gsbi1_spi_cs3_n),
0741 FUNCTION(gsbi2),
0742 FUNCTION(gsbi2_spi_cs1_n),
0743 FUNCTION(gsbi2_spi_cs2_n),
0744 FUNCTION(gsbi2_spi_cs3_n),
0745 FUNCTION(gsbi3),
0746 FUNCTION(gsbi3_spi_cs1_n),
0747 FUNCTION(gsbi3_spi_cs2_n),
0748 FUNCTION(gsbi3_spi_cs3_n),
0749 FUNCTION(gsbi4),
0750 FUNCTION(gsbi5),
0751 FUNCTION(gsbi6),
0752 FUNCTION(gsbi7),
0753 FUNCTION(gsbi8),
0754 FUNCTION(gsbi9),
0755 FUNCTION(gsbi10),
0756 FUNCTION(gsbi11),
0757 FUNCTION(gsbi12),
0758 FUNCTION(hdmi),
0759 FUNCTION(i2s),
0760 FUNCTION(lcdc),
0761 FUNCTION(mdp_vsync),
0762 FUNCTION(mi2s),
0763 FUNCTION(pcm),
0764 FUNCTION(ps_hold),
0765 FUNCTION(sdc1),
0766 FUNCTION(sdc2),
0767 FUNCTION(sdc5),
0768 FUNCTION(tsif1),
0769 FUNCTION(tsif2),
0770 FUNCTION(usb_fs1),
0771 FUNCTION(usb_fs1_oe_n),
0772 FUNCTION(usb_fs2),
0773 FUNCTION(usb_fs2_oe_n),
0774 FUNCTION(vfe),
0775 FUNCTION(vsens_alarm),
0776 FUNCTION(ebi2cs),
0777 FUNCTION(ebi2),
0778 };
0779
0780 static const struct msm_pingroup msm8660_groups[] = {
0781 PINGROUP(0, lcdc, dsub, _, _, _, _, _),
0782 PINGROUP(1, lcdc, dsub, _, _, _, _, _),
0783 PINGROUP(2, lcdc, dsub, _, _, _, _, _),
0784 PINGROUP(3, lcdc, dsub, _, _, _, _, _),
0785 PINGROUP(4, lcdc, dsub, _, _, _, _, _),
0786 PINGROUP(5, lcdc, dsub, _, _, _, _, _),
0787 PINGROUP(6, lcdc, dsub, _, _, _, _, _),
0788 PINGROUP(7, lcdc, dsub, _, _, _, _, _),
0789 PINGROUP(8, lcdc, dsub, _, _, _, _, _),
0790 PINGROUP(9, lcdc, dsub, _, _, _, _, _),
0791 PINGROUP(10, lcdc, dsub, _, _, _, _, _),
0792 PINGROUP(11, lcdc, dsub, _, _, _, _, _),
0793 PINGROUP(12, lcdc, dsub, _, _, _, _, _),
0794 PINGROUP(13, lcdc, dsub, _, _, _, _, _),
0795 PINGROUP(14, lcdc, dsub, _, _, _, _, _),
0796 PINGROUP(15, lcdc, dsub, _, _, _, _, _),
0797 PINGROUP(16, lcdc, dsub, _, _, _, _, _),
0798 PINGROUP(17, lcdc, dsub, _, _, _, _, _),
0799 PINGROUP(18, lcdc, dsub, _, _, _, _, _),
0800 PINGROUP(19, lcdc, dsub, _, _, _, _, _),
0801 PINGROUP(20, lcdc, dsub, _, _, _, _, _),
0802 PINGROUP(21, lcdc, dsub, _, _, _, _, _),
0803 PINGROUP(22, lcdc, dsub, _, _, _, _, _),
0804 PINGROUP(23, lcdc, dsub, _, _, _, _, _),
0805 PINGROUP(24, lcdc, dsub, _, _, _, _, _),
0806 PINGROUP(25, lcdc, dsub, _, _, _, _, _),
0807 PINGROUP(26, lcdc, dsub, _, _, _, _, _),
0808 PINGROUP(27, lcdc, dsub, _, _, _, _, _),
0809 PINGROUP(28, mdp_vsync, _, _, _, _, _, _),
0810 PINGROUP(29, vfe, gp_mn, _, _, _, _, _),
0811 PINGROUP(30, vfe, gp_clk_0a, _, _, _, _, _),
0812 PINGROUP(31, vfe, gp_clk_1a, _, _, _, _, _),
0813 PINGROUP(32, cam_mclk, _, _, _, _, _, _),
0814 PINGROUP(33, gsbi1, _, _, _, _, _, _),
0815 PINGROUP(34, gsbi1, _, _, _, _, _, _),
0816 PINGROUP(35, gsbi1, _, _, _, _, _, _),
0817 PINGROUP(36, gsbi1, _, _, _, _, _, _),
0818 PINGROUP(37, gsbi2, ebi2, _, _, _, _, _),
0819 PINGROUP(38, gsbi2, ebi2, _, _, _, _, _),
0820 PINGROUP(39, gsbi2, ebi2cs, mdp_vsync, _, _, _, _),
0821 PINGROUP(40, gsbi2, ebi2cs, _, _, _, _, _),
0822 PINGROUP(41, gsbi3, mdp_vsync, _, _, _, _, _),
0823 PINGROUP(42, gsbi3, vfe, _, _, _, _, _),
0824 PINGROUP(43, gsbi3, _, _, _, _, _, _),
0825 PINGROUP(44, gsbi3, _, _, _, _, _, _),
0826 PINGROUP(45, gsbi4, gsbi3_spi_cs2_n, _, _, _, _, _),
0827 PINGROUP(46, gsbi4, gsbi3_spi_cs3_n, vfe, _, _, _, _),
0828 PINGROUP(47, gsbi4, _, _, _, _, _, _),
0829 PINGROUP(48, gsbi4, _, _, _, _, _, _),
0830 PINGROUP(49, gsbi5, usb_fs1, _, _, _, _, _),
0831 PINGROUP(50, gsbi5, usb_fs1, _, _, _, _, _),
0832 PINGROUP(51, gsbi5, usb_fs1, usb_fs1_oe_n, _, _, _, _),
0833 PINGROUP(52, gsbi5, _, _, _, _, _, _),
0834 PINGROUP(53, gsbi6, _, _, _, _, _, _),
0835 PINGROUP(54, gsbi6, _, _, _, _, _, _),
0836 PINGROUP(55, gsbi6, _, _, _, _, _, _),
0837 PINGROUP(56, gsbi6, _, _, _, _, _, _),
0838 PINGROUP(57, gsbi7, _, _, _, _, _, _),
0839 PINGROUP(58, gsbi7, _, _, _, _, _, _),
0840 PINGROUP(59, gsbi7, _, _, _, _, _, _),
0841 PINGROUP(60, gsbi7, _, _, _, _, _, _),
0842 PINGROUP(61, _, _, _, _, _, _, _),
0843 PINGROUP(62, gsbi8, gsbi3_spi_cs1_n, gsbi1_spi_cs2a_n, _, _, _, _),
0844 PINGROUP(63, gsbi8, gsbi1_spi_cs1_n, _, _, _, _, _),
0845 PINGROUP(64, gsbi8, gsbi1_spi_cs2b_n, _, _, _, _, _),
0846 PINGROUP(65, gsbi8, gsbi1_spi_cs3_n, _, _, _, _, _),
0847 PINGROUP(66, gsbi9, ext_gps, _, _, _, _, _),
0848 PINGROUP(67, gsbi9, ext_gps, _, _, _, _, _),
0849 PINGROUP(68, gsbi9, ext_gps, _, _, _, _, _),
0850 PINGROUP(69, gsbi9, ext_gps, _, _, _, _, _),
0851 PINGROUP(70, gsbi10, gp_clk_2b, _, _, _, _, _),
0852 PINGROUP(71, gsbi10, usb_fs2, _, _, _, _, _),
0853 PINGROUP(72, gsbi10, usb_fs2, _, _, _, _, _),
0854 PINGROUP(73, gsbi10, usb_fs2, usb_fs2_oe_n, _, _, _, _),
0855 PINGROUP(74, _, _, _, _, _, _, _),
0856 PINGROUP(75, _, _, _, _, _, _, _),
0857 PINGROUP(76, _, _, _, _, _, _, _),
0858 PINGROUP(77, _, _, _, _, _, _, _),
0859 PINGROUP(78, _, _, _, _, _, _, _),
0860 PINGROUP(79, _, _, _, _, _, _, _),
0861 PINGROUP(80, _, _, _, _, _, _, _),
0862 PINGROUP(81, _, _, _, _, _, _, _),
0863 PINGROUP(82, _, _, _, _, _, _, _),
0864 PINGROUP(83, _, _, _, _, _, _, _),
0865 PINGROUP(84, _, _, _, _, _, _, _),
0866 PINGROUP(85, _, _, _, _, _, _, _),
0867 PINGROUP(86, _, _, _, _, _, _, _),
0868 PINGROUP(87, _, _, _, _, _, _, _),
0869 PINGROUP(88, _, _, _, _, _, _, _),
0870 PINGROUP(89, _, _, _, _, _, _, _),
0871 PINGROUP(90, _, _, _, _, _, _, _),
0872 PINGROUP(91, _, _, _, _, _, _, _),
0873 PINGROUP(92, ps_hold, _, _, _, _, _, _),
0874 PINGROUP(93, tsif1, _, _, _, _, _, _),
0875 PINGROUP(94, tsif1, _, _, _, _, _, _),
0876 PINGROUP(95, tsif1, sdc5, _, _, _, _, _),
0877 PINGROUP(96, tsif1, sdc5, _, _, _, _, _),
0878 PINGROUP(97, tsif2, sdc5, _, _, _, _, _),
0879 PINGROUP(98, tsif2, sdc5, _, _, _, _, _),
0880 PINGROUP(99, tsif2, sdc5, _, _, _, _, _),
0881 PINGROUP(100, tsif2, sdc5, _, _, _, _, _),
0882 PINGROUP(101, mi2s, _, _, _, _, _, _),
0883 PINGROUP(102, mi2s, _, _, _, _, _, _),
0884 PINGROUP(103, mi2s, gsbi11, gp_clk_2a, _, _, _, _),
0885 PINGROUP(104, mi2s, gsbi11, _, _, _, _, _),
0886 PINGROUP(105, mi2s, gsbi11, vfe, _, _, _, _),
0887 PINGROUP(106, mi2s, gsbi11, vfe, _, _, _, _),
0888 PINGROUP(107, mi2s, _, _, _, _, _, _),
0889 PINGROUP(108, i2s, _, _, _, _, _, _),
0890 PINGROUP(109, i2s, _, _, _, _, _, _),
0891 PINGROUP(110, i2s, _, _, _, _, _, _),
0892 PINGROUP(111, pcm, _, _, _, _, _, _),
0893 PINGROUP(112, pcm, _, _, _, _, _, _),
0894 PINGROUP(113, pcm, _, _, _, _, _, _),
0895 PINGROUP(114, pcm, _, _, _, _, _, _),
0896 PINGROUP(115, i2s, gsbi12, gp_clk_0b, _, _, _, _),
0897 PINGROUP(116, i2s, gsbi12, _, _, _, _, _),
0898 PINGROUP(117, i2s, gsbi12, vfe, _, _, _, _),
0899 PINGROUP(118, i2s, gsbi12, _, _, _, _, _),
0900 PINGROUP(119, i2s, _, _, _, _, _, _),
0901 PINGROUP(120, i2s, _, _, _, _, _, _),
0902 PINGROUP(121, i2s, _, _, _, _, _, _),
0903 PINGROUP(122, i2s, gp_clk_1b, _, _, _, _, _),
0904 PINGROUP(123, ebi2, gsbi2_spi_cs1_n, ebi2cs, _, _, _, _),
0905 PINGROUP(124, ebi2, gsbi2_spi_cs2_n, ebi2cs, _, _, _, _),
0906 PINGROUP(125, ebi2, gsbi2_spi_cs3_n, _, _, _, _, _),
0907 PINGROUP(126, ebi2, _, _, _, _, _, _),
0908 PINGROUP(127, ebi2, vsens_alarm, _, _, _, _, _),
0909 PINGROUP(128, ebi2, _, _, _, _, _, _),
0910 PINGROUP(129, ebi2, _, _, _, _, _, _),
0911 PINGROUP(130, ebi2, _, _, _, _, _, _),
0912 PINGROUP(131, ebi2cs, _, _, _, _, _, _),
0913 PINGROUP(132, ebi2cs, _, _, _, _, _, _),
0914 PINGROUP(133, ebi2cs, _, _, _, _, _, _),
0915 PINGROUP(134, ebi2cs, _, _, _, _, _, _),
0916 PINGROUP(135, ebi2, _, _, _, _, _, _),
0917 PINGROUP(136, ebi2, _, _, _, _, _, _),
0918 PINGROUP(137, ebi2, _, _, _, _, _, _),
0919 PINGROUP(138, ebi2, _, _, _, _, _, _),
0920 PINGROUP(139, ebi2, _, _, _, _, _, _),
0921 PINGROUP(140, ebi2, _, _, _, _, _, _),
0922 PINGROUP(141, ebi2, _, _, _, _, _, _),
0923 PINGROUP(142, ebi2, _, _, _, _, _, _),
0924 PINGROUP(143, ebi2, sdc2, _, _, _, _, _),
0925 PINGROUP(144, ebi2, sdc2, _, _, _, _, _),
0926 PINGROUP(145, ebi2, sdc2, _, _, _, _, _),
0927 PINGROUP(146, ebi2, sdc2, _, _, _, _, _),
0928 PINGROUP(147, ebi2, sdc2, _, _, _, _, _),
0929 PINGROUP(148, ebi2, sdc2, _, _, _, _, _),
0930 PINGROUP(149, ebi2, sdc2, _, _, _, _, _),
0931 PINGROUP(150, ebi2, sdc2, _, _, _, _, _),
0932 PINGROUP(151, ebi2, sdc2, _, _, _, _, _),
0933 PINGROUP(152, ebi2, sdc2, _, _, _, _, _),
0934 PINGROUP(153, ebi2, _, _, _, _, _, _),
0935 PINGROUP(154, ebi2, _, _, _, _, _, _),
0936 PINGROUP(155, ebi2, _, _, _, _, _, _),
0937 PINGROUP(156, ebi2, _, _, _, _, _, _),
0938 PINGROUP(157, ebi2, _, _, _, _, _, _),
0939 PINGROUP(158, ebi2, _, _, _, _, _, _),
0940 PINGROUP(159, sdc1, _, _, _, _, _, _),
0941 PINGROUP(160, sdc1, _, _, _, _, _, _),
0942 PINGROUP(161, sdc1, _, _, _, _, _, _),
0943 PINGROUP(162, sdc1, _, _, _, _, _, _),
0944 PINGROUP(163, sdc1, _, _, _, _, _, _),
0945 PINGROUP(164, sdc1, _, _, _, _, _, _),
0946 PINGROUP(165, sdc1, _, _, _, _, _, _),
0947 PINGROUP(166, sdc1, _, _, _, _, _, _),
0948 PINGROUP(167, sdc1, _, _, _, _, _, _),
0949 PINGROUP(168, sdc1, _, _, _, _, _, _),
0950 PINGROUP(169, hdmi, _, _, _, _, _, _),
0951 PINGROUP(170, hdmi, _, _, _, _, _, _),
0952 PINGROUP(171, hdmi, _, _, _, _, _, _),
0953 PINGROUP(172, hdmi, _, _, _, _, _, _),
0954
0955 SDC_PINGROUP(sdc4_clk, 0x20a0, -1, 6),
0956 SDC_PINGROUP(sdc4_cmd, 0x20a0, 11, 3),
0957 SDC_PINGROUP(sdc4_data, 0x20a0, 9, 0),
0958
0959 SDC_PINGROUP(sdc3_clk, 0x20a4, -1, 6),
0960 SDC_PINGROUP(sdc3_cmd, 0x20a4, 11, 3),
0961 SDC_PINGROUP(sdc3_data, 0x20a4, 9, 0),
0962 };
0963
0964 #define NUM_GPIO_PINGROUPS 173
0965
0966 static const struct msm_pinctrl_soc_data msm8660_pinctrl = {
0967 .pins = msm8660_pins,
0968 .npins = ARRAY_SIZE(msm8660_pins),
0969 .functions = msm8660_functions,
0970 .nfunctions = ARRAY_SIZE(msm8660_functions),
0971 .groups = msm8660_groups,
0972 .ngroups = ARRAY_SIZE(msm8660_groups),
0973 .ngpios = NUM_GPIO_PINGROUPS,
0974 };
0975
0976 static int msm8660_pinctrl_probe(struct platform_device *pdev)
0977 {
0978 return msm_pinctrl_probe(pdev, &msm8660_pinctrl);
0979 }
0980
0981 static const struct of_device_id msm8660_pinctrl_of_match[] = {
0982 { .compatible = "qcom,msm8660-pinctrl", },
0983 { },
0984 };
0985
0986 static struct platform_driver msm8660_pinctrl_driver = {
0987 .driver = {
0988 .name = "msm8660-pinctrl",
0989 .of_match_table = msm8660_pinctrl_of_match,
0990 },
0991 .probe = msm8660_pinctrl_probe,
0992 .remove = msm_pinctrl_remove,
0993 };
0994
0995 static int __init msm8660_pinctrl_init(void)
0996 {
0997 return platform_driver_register(&msm8660_pinctrl_driver);
0998 }
0999 arch_initcall(msm8660_pinctrl_init);
1000
1001 static void __exit msm8660_pinctrl_exit(void)
1002 {
1003 platform_driver_unregister(&msm8660_pinctrl_driver);
1004 }
1005 module_exit(msm8660_pinctrl_exit);
1006
1007 MODULE_AUTHOR("Bjorn Andersson <bjorn.andersson@sonymobile.com>");
1008 MODULE_DESCRIPTION("Qualcomm MSM8660 pinctrl driver");
1009 MODULE_LICENSE("GPL v2");
1010 MODULE_DEVICE_TABLE(of, msm8660_pinctrl_of_match);