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