1 // SPDX-License-Identifier: GPL-2.0-only 2 /* 3 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 5 */ 6 7 #include <linux/module.h> 8 #include <linux/of.h> 9 #include <linux/platform_device.h> 10 11 #include "pinctrl-msm.h" 12 13 #define REG_BASE 0x100000 14 #define REG_SIZE 0x1000 15 16 #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \ 17 { \ 18 .grp = PINCTRL_PINGROUP("gpio" #id, \ 19 gpio##id##_pins, \ 20 ARRAY_SIZE(gpio##id##_pins)), \ 21 .funcs = (int[]){ \ 22 msm_mux_gpio, /* gpio mode */ \ 23 msm_mux_##f1, \ 24 msm_mux_##f2, \ 25 msm_mux_##f3, \ 26 msm_mux_##f4, \ 27 msm_mux_##f5, \ 28 msm_mux_##f6, \ 29 msm_mux_##f7, \ 30 msm_mux_##f8, \ 31 msm_mux_##f9 \ 32 }, \ 33 .nfuncs = 10, \ 34 .ctl_reg = REG_BASE + REG_SIZE * id, \ 35 .io_reg = REG_BASE + 0x4 + REG_SIZE * id, \ 36 .intr_cfg_reg = REG_BASE + 0x8 + REG_SIZE * id, \ 37 .intr_status_reg = REG_BASE + 0xc + REG_SIZE * id, \ 38 .mux_bit = 2, \ 39 .pull_bit = 0, \ 40 .drv_bit = 6, \ 41 .oe_bit = 9, \ 42 .in_bit = 0, \ 43 .out_bit = 1, \ 44 .intr_enable_bit = 0, \ 45 .intr_status_bit = 0, \ 46 .intr_target_bit = 5, \ 47 .intr_target_kpss_val = 3, \ 48 .intr_raw_status_bit = 4, \ 49 .intr_polarity_bit = 1, \ 50 .intr_detection_bit = 2, \ 51 .intr_detection_width = 2, \ 52 } 53 54 #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \ 55 { \ 56 .grp = PINCTRL_PINGROUP(#pg_name, \ 57 pg_name##_pins, \ 58 ARRAY_SIZE(pg_name##_pins)), \ 59 .ctl_reg = REG_BASE + ctl, \ 60 .io_reg = 0, \ 61 .intr_cfg_reg = 0, \ 62 .intr_status_reg = 0, \ 63 .mux_bit = -1, \ 64 .pull_bit = pull, \ 65 .drv_bit = drv, \ 66 .oe_bit = -1, \ 67 .in_bit = -1, \ 68 .out_bit = -1, \ 69 .intr_enable_bit = -1, \ 70 .intr_status_bit = -1, \ 71 .intr_target_bit = -1, \ 72 .intr_raw_status_bit = -1, \ 73 .intr_polarity_bit = -1, \ 74 .intr_detection_bit = -1, \ 75 .intr_detection_width = -1, \ 76 } 77 78 static const struct pinctrl_pin_desc qdu1000_pins[] = { 79 PINCTRL_PIN(0, "GPIO_0"), 80 PINCTRL_PIN(1, "GPIO_1"), 81 PINCTRL_PIN(2, "GPIO_2"), 82 PINCTRL_PIN(3, "GPIO_3"), 83 PINCTRL_PIN(4, "GPIO_4"), 84 PINCTRL_PIN(5, "GPIO_5"), 85 PINCTRL_PIN(6, "GPIO_6"), 86 PINCTRL_PIN(7, "GPIO_7"), 87 PINCTRL_PIN(8, "GPIO_8"), 88 PINCTRL_PIN(9, "GPIO_9"), 89 PINCTRL_PIN(10, "GPIO_10"), 90 PINCTRL_PIN(11, "GPIO_11"), 91 PINCTRL_PIN(12, "GPIO_12"), 92 PINCTRL_PIN(13, "GPIO_13"), 93 PINCTRL_PIN(14, "GPIO_14"), 94 PINCTRL_PIN(15, "GPIO_15"), 95 PINCTRL_PIN(16, "GPIO_16"), 96 PINCTRL_PIN(17, "GPIO_17"), 97 PINCTRL_PIN(18, "GPIO_18"), 98 PINCTRL_PIN(19, "GPIO_19"), 99 PINCTRL_PIN(20, "GPIO_20"), 100 PINCTRL_PIN(21, "GPIO_21"), 101 PINCTRL_PIN(22, "GPIO_22"), 102 PINCTRL_PIN(23, "GPIO_23"), 103 PINCTRL_PIN(24, "GPIO_24"), 104 PINCTRL_PIN(25, "GPIO_25"), 105 PINCTRL_PIN(26, "GPIO_26"), 106 PINCTRL_PIN(27, "GPIO_27"), 107 PINCTRL_PIN(28, "GPIO_28"), 108 PINCTRL_PIN(29, "GPIO_29"), 109 PINCTRL_PIN(30, "GPIO_30"), 110 PINCTRL_PIN(31, "GPIO_31"), 111 PINCTRL_PIN(32, "GPIO_32"), 112 PINCTRL_PIN(33, "GPIO_33"), 113 PINCTRL_PIN(34, "GPIO_34"), 114 PINCTRL_PIN(35, "GPIO_35"), 115 PINCTRL_PIN(36, "GPIO_36"), 116 PINCTRL_PIN(37, "GPIO_37"), 117 PINCTRL_PIN(38, "GPIO_38"), 118 PINCTRL_PIN(39, "GPIO_39"), 119 PINCTRL_PIN(40, "GPIO_40"), 120 PINCTRL_PIN(41, "GPIO_41"), 121 PINCTRL_PIN(42, "GPIO_42"), 122 PINCTRL_PIN(43, "GPIO_43"), 123 PINCTRL_PIN(44, "GPIO_44"), 124 PINCTRL_PIN(45, "GPIO_45"), 125 PINCTRL_PIN(46, "GPIO_46"), 126 PINCTRL_PIN(47, "GPIO_47"), 127 PINCTRL_PIN(48, "GPIO_48"), 128 PINCTRL_PIN(49, "GPIO_49"), 129 PINCTRL_PIN(50, "GPIO_50"), 130 PINCTRL_PIN(51, "GPIO_51"), 131 PINCTRL_PIN(52, "GPIO_52"), 132 PINCTRL_PIN(53, "GPIO_53"), 133 PINCTRL_PIN(54, "GPIO_54"), 134 PINCTRL_PIN(55, "GPIO_55"), 135 PINCTRL_PIN(56, "GPIO_56"), 136 PINCTRL_PIN(57, "GPIO_57"), 137 PINCTRL_PIN(58, "GPIO_58"), 138 PINCTRL_PIN(59, "GPIO_59"), 139 PINCTRL_PIN(60, "GPIO_60"), 140 PINCTRL_PIN(61, "GPIO_61"), 141 PINCTRL_PIN(62, "GPIO_62"), 142 PINCTRL_PIN(63, "GPIO_63"), 143 PINCTRL_PIN(64, "GPIO_64"), 144 PINCTRL_PIN(65, "GPIO_65"), 145 PINCTRL_PIN(66, "GPIO_66"), 146 PINCTRL_PIN(67, "GPIO_67"), 147 PINCTRL_PIN(68, "GPIO_68"), 148 PINCTRL_PIN(69, "GPIO_69"), 149 PINCTRL_PIN(70, "GPIO_70"), 150 PINCTRL_PIN(71, "GPIO_71"), 151 PINCTRL_PIN(72, "GPIO_72"), 152 PINCTRL_PIN(73, "GPIO_73"), 153 PINCTRL_PIN(74, "GPIO_74"), 154 PINCTRL_PIN(75, "GPIO_75"), 155 PINCTRL_PIN(76, "GPIO_76"), 156 PINCTRL_PIN(77, "GPIO_77"), 157 PINCTRL_PIN(78, "GPIO_78"), 158 PINCTRL_PIN(79, "GPIO_79"), 159 PINCTRL_PIN(80, "GPIO_80"), 160 PINCTRL_PIN(81, "GPIO_81"), 161 PINCTRL_PIN(82, "GPIO_82"), 162 PINCTRL_PIN(83, "GPIO_83"), 163 PINCTRL_PIN(84, "GPIO_84"), 164 PINCTRL_PIN(85, "GPIO_85"), 165 PINCTRL_PIN(86, "GPIO_86"), 166 PINCTRL_PIN(87, "GPIO_87"), 167 PINCTRL_PIN(88, "GPIO_88"), 168 PINCTRL_PIN(89, "GPIO_89"), 169 PINCTRL_PIN(90, "GPIO_90"), 170 PINCTRL_PIN(91, "GPIO_91"), 171 PINCTRL_PIN(92, "GPIO_92"), 172 PINCTRL_PIN(93, "GPIO_93"), 173 PINCTRL_PIN(94, "GPIO_94"), 174 PINCTRL_PIN(95, "GPIO_95"), 175 PINCTRL_PIN(96, "GPIO_96"), 176 PINCTRL_PIN(97, "GPIO_97"), 177 PINCTRL_PIN(98, "GPIO_98"), 178 PINCTRL_PIN(99, "GPIO_99"), 179 PINCTRL_PIN(100, "GPIO_100"), 180 PINCTRL_PIN(101, "GPIO_101"), 181 PINCTRL_PIN(102, "GPIO_102"), 182 PINCTRL_PIN(103, "GPIO_103"), 183 PINCTRL_PIN(104, "GPIO_104"), 184 PINCTRL_PIN(105, "GPIO_105"), 185 PINCTRL_PIN(106, "GPIO_106"), 186 PINCTRL_PIN(107, "GPIO_107"), 187 PINCTRL_PIN(108, "GPIO_108"), 188 PINCTRL_PIN(109, "GPIO_109"), 189 PINCTRL_PIN(110, "GPIO_110"), 190 PINCTRL_PIN(111, "GPIO_111"), 191 PINCTRL_PIN(112, "GPIO_112"), 192 PINCTRL_PIN(113, "GPIO_113"), 193 PINCTRL_PIN(114, "GPIO_114"), 194 PINCTRL_PIN(115, "GPIO_115"), 195 PINCTRL_PIN(116, "GPIO_116"), 196 PINCTRL_PIN(117, "GPIO_117"), 197 PINCTRL_PIN(118, "GPIO_118"), 198 PINCTRL_PIN(119, "GPIO_119"), 199 PINCTRL_PIN(120, "GPIO_120"), 200 PINCTRL_PIN(121, "GPIO_121"), 201 PINCTRL_PIN(122, "GPIO_122"), 202 PINCTRL_PIN(123, "GPIO_123"), 203 PINCTRL_PIN(124, "GPIO_124"), 204 PINCTRL_PIN(125, "GPIO_125"), 205 PINCTRL_PIN(126, "GPIO_126"), 206 PINCTRL_PIN(127, "GPIO_127"), 207 PINCTRL_PIN(128, "GPIO_128"), 208 PINCTRL_PIN(129, "GPIO_129"), 209 PINCTRL_PIN(130, "GPIO_130"), 210 PINCTRL_PIN(131, "GPIO_131"), 211 PINCTRL_PIN(132, "GPIO_132"), 212 PINCTRL_PIN(133, "GPIO_133"), 213 PINCTRL_PIN(134, "GPIO_134"), 214 PINCTRL_PIN(135, "GPIO_135"), 215 PINCTRL_PIN(136, "GPIO_136"), 216 PINCTRL_PIN(137, "GPIO_137"), 217 PINCTRL_PIN(138, "GPIO_138"), 218 PINCTRL_PIN(139, "GPIO_139"), 219 PINCTRL_PIN(140, "GPIO_140"), 220 PINCTRL_PIN(141, "GPIO_141"), 221 PINCTRL_PIN(142, "GPIO_142"), 222 PINCTRL_PIN(143, "GPIO_143"), 223 PINCTRL_PIN(144, "GPIO_144"), 224 PINCTRL_PIN(145, "GPIO_145"), 225 PINCTRL_PIN(146, "GPIO_146"), 226 PINCTRL_PIN(147, "GPIO_147"), 227 PINCTRL_PIN(148, "GPIO_148"), 228 PINCTRL_PIN(149, "GPIO_149"), 229 PINCTRL_PIN(150, "GPIO_150"), 230 PINCTRL_PIN(151, "SDC1_RCLK"), 231 PINCTRL_PIN(152, "SDC1_CLK"), 232 PINCTRL_PIN(153, "SDC1_CMD"), 233 PINCTRL_PIN(154, "SDC1_DATA"), 234 }; 235 236 #define DECLARE_MSM_GPIO_PINS(pin) \ 237 static const unsigned int gpio##pin##_pins[] = { pin } 238 DECLARE_MSM_GPIO_PINS(0); 239 DECLARE_MSM_GPIO_PINS(1); 240 DECLARE_MSM_GPIO_PINS(2); 241 DECLARE_MSM_GPIO_PINS(3); 242 DECLARE_MSM_GPIO_PINS(4); 243 DECLARE_MSM_GPIO_PINS(5); 244 DECLARE_MSM_GPIO_PINS(6); 245 DECLARE_MSM_GPIO_PINS(7); 246 DECLARE_MSM_GPIO_PINS(8); 247 DECLARE_MSM_GPIO_PINS(9); 248 DECLARE_MSM_GPIO_PINS(10); 249 DECLARE_MSM_GPIO_PINS(11); 250 DECLARE_MSM_GPIO_PINS(12); 251 DECLARE_MSM_GPIO_PINS(13); 252 DECLARE_MSM_GPIO_PINS(14); 253 DECLARE_MSM_GPIO_PINS(15); 254 DECLARE_MSM_GPIO_PINS(16); 255 DECLARE_MSM_GPIO_PINS(17); 256 DECLARE_MSM_GPIO_PINS(18); 257 DECLARE_MSM_GPIO_PINS(19); 258 DECLARE_MSM_GPIO_PINS(20); 259 DECLARE_MSM_GPIO_PINS(21); 260 DECLARE_MSM_GPIO_PINS(22); 261 DECLARE_MSM_GPIO_PINS(23); 262 DECLARE_MSM_GPIO_PINS(24); 263 DECLARE_MSM_GPIO_PINS(25); 264 DECLARE_MSM_GPIO_PINS(26); 265 DECLARE_MSM_GPIO_PINS(27); 266 DECLARE_MSM_GPIO_PINS(28); 267 DECLARE_MSM_GPIO_PINS(29); 268 DECLARE_MSM_GPIO_PINS(30); 269 DECLARE_MSM_GPIO_PINS(31); 270 DECLARE_MSM_GPIO_PINS(32); 271 DECLARE_MSM_GPIO_PINS(33); 272 DECLARE_MSM_GPIO_PINS(34); 273 DECLARE_MSM_GPIO_PINS(35); 274 DECLARE_MSM_GPIO_PINS(36); 275 DECLARE_MSM_GPIO_PINS(37); 276 DECLARE_MSM_GPIO_PINS(38); 277 DECLARE_MSM_GPIO_PINS(39); 278 DECLARE_MSM_GPIO_PINS(40); 279 DECLARE_MSM_GPIO_PINS(41); 280 DECLARE_MSM_GPIO_PINS(42); 281 DECLARE_MSM_GPIO_PINS(43); 282 DECLARE_MSM_GPIO_PINS(44); 283 DECLARE_MSM_GPIO_PINS(45); 284 DECLARE_MSM_GPIO_PINS(46); 285 DECLARE_MSM_GPIO_PINS(47); 286 DECLARE_MSM_GPIO_PINS(48); 287 DECLARE_MSM_GPIO_PINS(49); 288 DECLARE_MSM_GPIO_PINS(50); 289 DECLARE_MSM_GPIO_PINS(51); 290 DECLARE_MSM_GPIO_PINS(52); 291 DECLARE_MSM_GPIO_PINS(53); 292 DECLARE_MSM_GPIO_PINS(54); 293 DECLARE_MSM_GPIO_PINS(55); 294 DECLARE_MSM_GPIO_PINS(56); 295 DECLARE_MSM_GPIO_PINS(57); 296 DECLARE_MSM_GPIO_PINS(58); 297 DECLARE_MSM_GPIO_PINS(59); 298 DECLARE_MSM_GPIO_PINS(60); 299 DECLARE_MSM_GPIO_PINS(61); 300 DECLARE_MSM_GPIO_PINS(62); 301 DECLARE_MSM_GPIO_PINS(63); 302 DECLARE_MSM_GPIO_PINS(64); 303 DECLARE_MSM_GPIO_PINS(65); 304 DECLARE_MSM_GPIO_PINS(66); 305 DECLARE_MSM_GPIO_PINS(67); 306 DECLARE_MSM_GPIO_PINS(68); 307 DECLARE_MSM_GPIO_PINS(69); 308 DECLARE_MSM_GPIO_PINS(70); 309 DECLARE_MSM_GPIO_PINS(71); 310 DECLARE_MSM_GPIO_PINS(72); 311 DECLARE_MSM_GPIO_PINS(73); 312 DECLARE_MSM_GPIO_PINS(74); 313 DECLARE_MSM_GPIO_PINS(75); 314 DECLARE_MSM_GPIO_PINS(76); 315 DECLARE_MSM_GPIO_PINS(77); 316 DECLARE_MSM_GPIO_PINS(78); 317 DECLARE_MSM_GPIO_PINS(79); 318 DECLARE_MSM_GPIO_PINS(80); 319 DECLARE_MSM_GPIO_PINS(81); 320 DECLARE_MSM_GPIO_PINS(82); 321 DECLARE_MSM_GPIO_PINS(83); 322 DECLARE_MSM_GPIO_PINS(84); 323 DECLARE_MSM_GPIO_PINS(85); 324 DECLARE_MSM_GPIO_PINS(86); 325 DECLARE_MSM_GPIO_PINS(87); 326 DECLARE_MSM_GPIO_PINS(88); 327 DECLARE_MSM_GPIO_PINS(89); 328 DECLARE_MSM_GPIO_PINS(90); 329 DECLARE_MSM_GPIO_PINS(91); 330 DECLARE_MSM_GPIO_PINS(92); 331 DECLARE_MSM_GPIO_PINS(93); 332 DECLARE_MSM_GPIO_PINS(94); 333 DECLARE_MSM_GPIO_PINS(95); 334 DECLARE_MSM_GPIO_PINS(96); 335 DECLARE_MSM_GPIO_PINS(97); 336 DECLARE_MSM_GPIO_PINS(98); 337 DECLARE_MSM_GPIO_PINS(99); 338 DECLARE_MSM_GPIO_PINS(100); 339 DECLARE_MSM_GPIO_PINS(101); 340 DECLARE_MSM_GPIO_PINS(102); 341 DECLARE_MSM_GPIO_PINS(103); 342 DECLARE_MSM_GPIO_PINS(104); 343 DECLARE_MSM_GPIO_PINS(105); 344 DECLARE_MSM_GPIO_PINS(106); 345 DECLARE_MSM_GPIO_PINS(107); 346 DECLARE_MSM_GPIO_PINS(108); 347 DECLARE_MSM_GPIO_PINS(109); 348 DECLARE_MSM_GPIO_PINS(110); 349 DECLARE_MSM_GPIO_PINS(111); 350 DECLARE_MSM_GPIO_PINS(112); 351 DECLARE_MSM_GPIO_PINS(113); 352 DECLARE_MSM_GPIO_PINS(114); 353 DECLARE_MSM_GPIO_PINS(115); 354 DECLARE_MSM_GPIO_PINS(116); 355 DECLARE_MSM_GPIO_PINS(117); 356 DECLARE_MSM_GPIO_PINS(118); 357 DECLARE_MSM_GPIO_PINS(119); 358 DECLARE_MSM_GPIO_PINS(120); 359 DECLARE_MSM_GPIO_PINS(121); 360 DECLARE_MSM_GPIO_PINS(122); 361 DECLARE_MSM_GPIO_PINS(123); 362 DECLARE_MSM_GPIO_PINS(124); 363 DECLARE_MSM_GPIO_PINS(125); 364 DECLARE_MSM_GPIO_PINS(126); 365 DECLARE_MSM_GPIO_PINS(127); 366 DECLARE_MSM_GPIO_PINS(128); 367 DECLARE_MSM_GPIO_PINS(129); 368 DECLARE_MSM_GPIO_PINS(130); 369 DECLARE_MSM_GPIO_PINS(131); 370 DECLARE_MSM_GPIO_PINS(132); 371 DECLARE_MSM_GPIO_PINS(133); 372 DECLARE_MSM_GPIO_PINS(134); 373 DECLARE_MSM_GPIO_PINS(135); 374 DECLARE_MSM_GPIO_PINS(136); 375 DECLARE_MSM_GPIO_PINS(137); 376 DECLARE_MSM_GPIO_PINS(138); 377 DECLARE_MSM_GPIO_PINS(139); 378 DECLARE_MSM_GPIO_PINS(140); 379 DECLARE_MSM_GPIO_PINS(141); 380 DECLARE_MSM_GPIO_PINS(142); 381 DECLARE_MSM_GPIO_PINS(143); 382 DECLARE_MSM_GPIO_PINS(144); 383 DECLARE_MSM_GPIO_PINS(145); 384 DECLARE_MSM_GPIO_PINS(146); 385 DECLARE_MSM_GPIO_PINS(147); 386 DECLARE_MSM_GPIO_PINS(148); 387 DECLARE_MSM_GPIO_PINS(149); 388 DECLARE_MSM_GPIO_PINS(150); 389 390 static const unsigned int sdc1_rclk_pins[] = { 151 }; 391 static const unsigned int sdc1_clk_pins[] = { 152 }; 392 static const unsigned int sdc1_cmd_pins[] = { 153 }; 393 static const unsigned int sdc1_data_pins[] = { 154 }; 394 395 enum qdu1000_functions { 396 msm_mux_gpio, 397 msm_mux_cmo_pri, 398 msm_mux_si5518_int, 399 msm_mux_atest_char, 400 msm_mux_atest_usb, 401 msm_mux_char_exec, 402 msm_mux_cmu_rng, 403 msm_mux_dbg_out_clk, 404 msm_mux_ddr_bist, 405 msm_mux_ddr_pxi0, 406 msm_mux_ddr_pxi1, 407 msm_mux_ddr_pxi2, 408 msm_mux_ddr_pxi3, 409 msm_mux_ddr_pxi4, 410 msm_mux_ddr_pxi5, 411 msm_mux_ddr_pxi6, 412 msm_mux_ddr_pxi7, 413 msm_mux_eth012_int_n, 414 msm_mux_eth345_int_n, 415 msm_mux_eth6_int_n, 416 msm_mux_gcc_gp1, 417 msm_mux_gcc_gp2, 418 msm_mux_gcc_gp3, 419 msm_mux_gps_pps_in, 420 msm_mux_hardsync_pps_in, 421 msm_mux_intr_c, 422 msm_mux_jitter_bist_ref, 423 msm_mux_pcie_clkreqn, 424 msm_mux_phase_flag, 425 msm_mux_pll_bist, 426 msm_mux_pll_clk, 427 msm_mux_prng_rosc, 428 msm_mux_qdss_cti, 429 msm_mux_qdss_gpio, 430 msm_mux_qlink0_enable, 431 msm_mux_qlink0_request, 432 msm_mux_qlink0_wmss, 433 msm_mux_qlink1_enable, 434 msm_mux_qlink1_request, 435 msm_mux_qlink1_wmss, 436 msm_mux_qlink2_enable, 437 msm_mux_qlink2_request, 438 msm_mux_qlink2_wmss, 439 msm_mux_qlink3_enable, 440 msm_mux_qlink3_request, 441 msm_mux_qlink3_wmss, 442 msm_mux_qlink4_enable, 443 msm_mux_qlink4_request, 444 msm_mux_qlink4_wmss, 445 msm_mux_qlink5_enable, 446 msm_mux_qlink5_request, 447 msm_mux_qlink5_wmss, 448 msm_mux_qlink6_enable, 449 msm_mux_qlink6_request, 450 msm_mux_qlink6_wmss, 451 msm_mux_qlink7_enable, 452 msm_mux_qlink7_request, 453 msm_mux_qlink7_wmss, 454 msm_mux_qspi_clk, 455 msm_mux_qspi_cs, 456 msm_mux_qspi0, 457 msm_mux_qspi1, 458 msm_mux_qspi2, 459 msm_mux_qspi3, 460 msm_mux_qup00, 461 msm_mux_qup01, 462 msm_mux_qup02, 463 msm_mux_qup03, 464 msm_mux_qup04, 465 msm_mux_qup05, 466 msm_mux_qup06, 467 msm_mux_qup07, 468 msm_mux_qup08, 469 msm_mux_qup10, 470 msm_mux_qup11, 471 msm_mux_qup12, 472 msm_mux_qup13, 473 msm_mux_qup14, 474 msm_mux_qup15, 475 msm_mux_qup16, 476 msm_mux_qup17, 477 msm_mux_qup20, 478 msm_mux_qup21, 479 msm_mux_qup22, 480 msm_mux_smb_alert, 481 msm_mux_smb_clk, 482 msm_mux_smb_dat, 483 msm_mux_tb_trig, 484 msm_mux_tgu_ch0, 485 msm_mux_tgu_ch1, 486 msm_mux_tgu_ch2, 487 msm_mux_tgu_ch3, 488 msm_mux_tgu_ch4, 489 msm_mux_tgu_ch5, 490 msm_mux_tgu_ch6, 491 msm_mux_tgu_ch7, 492 msm_mux_tmess_prng0, 493 msm_mux_tmess_prng1, 494 msm_mux_tmess_prng2, 495 msm_mux_tmess_prng3, 496 msm_mux_tod_pps_in, 497 msm_mux_tsense_pwm1, 498 msm_mux_tsense_pwm2, 499 msm_mux_usb2phy_ac, 500 msm_mux_usb_con_det, 501 msm_mux_usb_dfp_en, 502 msm_mux_usb_phy, 503 msm_mux_vfr_0, 504 msm_mux_vfr_1, 505 msm_mux_vsense_trigger, 506 msm_mux__, 507 }; 508 509 static const char * const gpio_groups[] = { 510 "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 511 "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 512 "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 513 "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 514 "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 515 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 516 "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 517 "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 518 "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 519 "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 520 "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 521 "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 522 "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 523 "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 524 "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 525 "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 526 "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 527 "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122", 528 "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128", 529 "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134", 530 "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140", 531 "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146", 532 "gpio147", "gpio148", "gpio149", "gpio150", 533 }; 534 static const char * const cmo_pri_groups[] = { 535 "gpio103", 536 }; 537 static const char * const si5518_int_groups[] = { 538 "gpio44", 539 }; 540 static const char * const atest_char_groups[] = { 541 "gpio89", "gpio90", "gpio91", "gpio92", "gpio95", 542 }; 543 static const char * const atest_usb_groups[] = { 544 "gpio114", "gpio115", "gpio116", "gpio117", "gpio118", 545 }; 546 static const char * const char_exec_groups[] = { 547 "gpio99", "gpio100", 548 }; 549 static const char * const cmu_rng_groups[] = { 550 "gpio89", "gpio90", "gpio91", "gpio92", 551 }; 552 static const char * const dbg_out_clk_groups[] = { 553 "gpio136", 554 }; 555 static const char * const ddr_bist_groups[] = { 556 "gpio0", "gpio1", "gpio2", "gpio3", 557 }; 558 static const char * const ddr_pxi0_groups[] = { 559 "gpio114", "gpio115", 560 }; 561 static const char * const ddr_pxi1_groups[] = { 562 "gpio116", "gpio117", 563 }; 564 static const char * const ddr_pxi2_groups[] = { 565 "gpio118", "gpio119", 566 }; 567 static const char * const ddr_pxi3_groups[] = { 568 "gpio120", "gpio121", 569 }; 570 static const char * const ddr_pxi4_groups[] = { 571 "gpio122", "gpio123", 572 }; 573 static const char * const ddr_pxi5_groups[] = { 574 "gpio124", "gpio125", 575 }; 576 static const char * const ddr_pxi6_groups[] = { 577 "gpio126", "gpio127", 578 }; 579 static const char * const ddr_pxi7_groups[] = { 580 "gpio128", "gpio129", 581 }; 582 static const char * const eth012_int_n_groups[] = { 583 "gpio86", 584 }; 585 static const char * const eth345_int_n_groups[] = { 586 "gpio87", 587 }; 588 static const char * const eth6_int_n_groups[] = { 589 "gpio88", 590 }; 591 static const char * const gcc_gp1_groups[] = { 592 "gpio86", "gpio134", 593 }; 594 static const char * const gcc_gp2_groups[] = { 595 "gpio87", "gpio135", 596 }; 597 static const char * const gcc_gp3_groups[] = { 598 "gpio88", "gpio136", 599 }; 600 static const char * const gps_pps_in_groups[] = { 601 "gpio49", 602 }; 603 static const char * const hardsync_pps_in_groups[] = { 604 "gpio47", 605 }; 606 static const char * const intr_c_groups[] = { 607 "gpio26", "gpio27", "gpio28", "gpio141", "gpio142", "gpio143", 608 }; 609 static const char * const jitter_bist_ref_groups[] = { 610 "gpio130", 611 }; 612 static const char * const pcie_clkreqn_groups[] = { 613 "gpio98", "gpio99", "gpio100", 614 }; 615 static const char * const phase_flag_groups[] = { 616 "gpio6", "gpio7", "gpio8", "gpio9", "gpio16", "gpio17", "gpio18", 617 "gpio19", "gpio20", "gpio22", "gpio21", "gpio23", "gpio24", "gpio25", 618 "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 619 "gpio33", "gpio42", "gpio43", "gpio89", "gpio90", "gpio91", "gpio92", 620 "gpio95", "gpio96", "gpio97", "gpio102", 621 }; 622 static const char * const pll_bist_groups[] = { 623 "gpio20", 624 }; 625 static const char * const pll_clk_groups[] = { 626 "gpio98", 627 }; 628 static const char * const prng_rosc_groups[] = { 629 "gpio18", "gpio19", "gpio20", "gpio21", 630 }; 631 static const char * const qdss_cti_groups[] = { 632 "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio48", 633 "gpio49", "gpio86", "gpio87", "gpio93", "gpio94", "gpio130", "gpio131", 634 "gpio132", "gpio133", "gpio134", "gpio135", "gpio144", "gpio145", 635 }; 636 static const char * const qdss_gpio_groups[] = { 637 "gpio6", "gpio7", "gpio8", "gpio9", "gpio16", "gpio17", "gpio18", 638 "gpio19", "gpio20", "gpio21", "gpio22", "gpio23", "gpio25", "gpio26", 639 "gpio27", "gpio28", "gpio24", "gpio29", "gpio30", "gpio31", "gpio32", 640 "gpio33", "gpio34", "gpio35", "gpio42", "gpio43", "gpio88", "gpio89", 641 "gpio90", "gpio91", "gpio92", "gpio95", "gpio96", "gpio97", "gpio102", 642 "gpio103", 643 }; 644 static const char * const qlink0_enable_groups[] = { 645 "gpio67", 646 }; 647 static const char * const qlink0_request_groups[] = { 648 "gpio66", 649 }; 650 static const char * const qlink0_wmss_groups[] = { 651 "gpio82", 652 }; 653 static const char * const qlink1_enable_groups[] = { 654 "gpio69", 655 }; 656 static const char * const qlink1_request_groups[] = { 657 "gpio68", 658 }; 659 static const char * const qlink1_wmss_groups[] = { 660 "gpio83", 661 }; 662 static const char * const qlink2_enable_groups[] = { 663 "gpio71", 664 }; 665 static const char * const qlink2_request_groups[] = { 666 "gpio70", 667 }; 668 static const char * const qlink2_wmss_groups[] = { 669 "gpio138", 670 }; 671 static const char * const qlink3_enable_groups[] = { 672 "gpio73", 673 }; 674 static const char * const qlink3_request_groups[] = { 675 "gpio72", 676 }; 677 static const char * const qlink3_wmss_groups[] = { 678 "gpio139", 679 }; 680 static const char * const qlink4_enable_groups[] = { 681 "gpio75", 682 }; 683 static const char * const qlink4_request_groups[] = { 684 "gpio74", 685 }; 686 static const char * const qlink4_wmss_groups[] = { 687 "gpio84", 688 }; 689 static const char * const qlink5_enable_groups[] = { 690 "gpio77", 691 }; 692 static const char * const qlink5_request_groups[] = { 693 "gpio76", 694 }; 695 static const char * const qlink5_wmss_groups[] = { 696 "gpio85", 697 }; 698 static const char * const qlink6_enable_groups[] = { 699 "gpio79", 700 }; 701 static const char * const qlink6_request_groups[] = { 702 "gpio78", 703 }; 704 static const char * const qlink6_wmss_groups[] = { 705 "gpio56", 706 }; 707 static const char * const qlink7_enable_groups[] = { 708 "gpio81", 709 }; 710 static const char * const qlink7_request_groups[] = { 711 "gpio80", 712 }; 713 static const char * const qlink7_wmss_groups[] = { 714 "gpio57", 715 }; 716 static const char * const qspi0_groups[] = { 717 "gpio114", 718 }; 719 static const char * const qspi1_groups[] = { 720 "gpio115", 721 }; 722 static const char * const qspi2_groups[] = { 723 "gpio116", 724 }; 725 static const char * const qspi3_groups[] = { 726 "gpio117", 727 }; 728 static const char * const qspi_clk_groups[] = { 729 "gpio126", 730 }; 731 static const char * const qspi_cs_groups[] = { 732 "gpio125", 733 }; 734 static const char * const qup00_groups[] = { 735 "gpio6", "gpio7", "gpio8", "gpio9", 736 }; 737 static const char * const qup01_groups[] = { 738 "gpio10", "gpio11", "gpio12", "gpio13", 739 }; 740 static const char * const qup02_groups[] = { 741 "gpio10", "gpio11", "gpio12", "gpio13", 742 }; 743 static const char * const qup03_groups[] = { 744 "gpio14", "gpio15", "gpio16", "gpio17", 745 }; 746 static const char * const qup04_groups[] = { 747 "gpio14", "gpio15", "gpio16", "gpio17", 748 }; 749 static const char * const qup05_groups[] = { 750 "gpio130", "gpio131", "gpio132", "gpio133", 751 }; 752 static const char * const qup06_groups[] = { 753 "gpio130", "gpio131", "gpio132", "gpio133", 754 }; 755 static const char * const qup07_groups[] = { 756 "gpio134", "gpio135", 757 }; 758 static const char * const qup08_groups[] = { 759 "gpio134", "gpio135", 760 }; 761 static const char * const qup10_groups[] = { 762 "gpio18", "gpio19", "gpio20", "gpio21", 763 }; 764 static const char * const qup11_groups[] = { 765 "gpio22", "gpio23", "gpio24", "gpio25", 766 }; 767 static const char * const qup12_groups[] = { 768 "gpio22", "gpio23", "gpio24", "gpio25", 769 }; 770 static const char * const qup13_groups[] = { 771 "gpio26", "gpio27", "gpio28", "gpio29", 772 }; 773 static const char * const qup14_groups[] = { 774 "gpio26", "gpio27", "gpio28", "gpio29", 775 }; 776 static const char * const qup15_groups[] = { 777 "gpio30", "gpio31", "gpio32", "gpio33", 778 }; 779 static const char * const qup16_groups[] = { 780 "gpio29", "gpio34", "gpio35", "gpio36", "gpio37", "gpio38", "gpio39", 781 }; 782 static const char * const qup17_groups[] = { 783 "gpio12", "gpio13", "gpio14", "gpio30", "gpio31", "gpio40", "gpio41", 784 }; 785 static const char * const qup20_groups[] = { 786 "gpio0", "gpio1", "gpio2", "gpio3", 787 }; 788 static const char * const qup21_groups[] = { 789 "gpio0", "gpio1", "gpio2", "gpio3", 790 }; 791 static const char * const qup22_groups[] = { 792 "gpio4", "gpio5", "gpio128", "gpio129", 793 }; 794 static const char * const smb_alert_groups[] = { 795 "gpio88", "gpio101", 796 }; 797 static const char * const smb_clk_groups[] = { 798 "gpio133", 799 }; 800 static const char * const smb_dat_groups[] = { 801 "gpio132", 802 }; 803 static const char * const tb_trig_groups[] = { 804 "gpio114", 805 }; 806 static const char * const tgu_ch0_groups[] = { 807 "gpio6", 808 }; 809 static const char * const tgu_ch1_groups[] = { 810 "gpio7", 811 }; 812 static const char * const tgu_ch2_groups[] = { 813 "gpio8", 814 }; 815 static const char * const tgu_ch3_groups[] = { 816 "gpio9", 817 }; 818 static const char * const tgu_ch4_groups[] = { 819 "gpio44", 820 }; 821 static const char * const tgu_ch5_groups[] = { 822 "gpio45", 823 }; 824 static const char * const tgu_ch6_groups[] = { 825 "gpio46", 826 }; 827 static const char * const tgu_ch7_groups[] = { 828 "gpio47", 829 }; 830 static const char * const tmess_prng0_groups[] = { 831 "gpio33", 832 }; 833 static const char * const tmess_prng1_groups[] = { 834 "gpio32", 835 }; 836 static const char * const tmess_prng2_groups[] = { 837 "gpio31", 838 }; 839 static const char * const tmess_prng3_groups[] = { 840 "gpio30", 841 }; 842 static const char * const tod_pps_in_groups[] = { 843 "gpio48", 844 }; 845 static const char * const tsense_pwm1_groups[] = { 846 "gpio2", 847 }; 848 static const char * const tsense_pwm2_groups[] = { 849 "gpio3", 850 }; 851 static const char * const usb2phy_ac_groups[] = { 852 "gpio90", 853 }; 854 static const char * const usb_con_det_groups[] = { 855 "gpio42", 856 }; 857 static const char * const usb_dfp_en_groups[] = { 858 "gpio43", 859 }; 860 static const char * const usb_phy_groups[] = { 861 "gpio91", 862 }; 863 static const char * const vfr_0_groups[] = { 864 "gpio93", 865 }; 866 static const char * const vfr_1_groups[] = { 867 "gpio94", 868 }; 869 static const char * const vsense_trigger_groups[] = { 870 "gpio135", 871 }; 872 873 static const struct pinfunction qdu1000_functions[] = { 874 MSM_GPIO_PIN_FUNCTION(gpio), 875 MSM_PIN_FUNCTION(cmo_pri), 876 MSM_PIN_FUNCTION(si5518_int), 877 MSM_PIN_FUNCTION(atest_char), 878 MSM_PIN_FUNCTION(atest_usb), 879 MSM_PIN_FUNCTION(char_exec), 880 MSM_PIN_FUNCTION(cmu_rng), 881 MSM_PIN_FUNCTION(dbg_out_clk), 882 MSM_PIN_FUNCTION(ddr_bist), 883 MSM_PIN_FUNCTION(ddr_pxi0), 884 MSM_PIN_FUNCTION(ddr_pxi1), 885 MSM_PIN_FUNCTION(ddr_pxi2), 886 MSM_PIN_FUNCTION(ddr_pxi3), 887 MSM_PIN_FUNCTION(ddr_pxi4), 888 MSM_PIN_FUNCTION(ddr_pxi5), 889 MSM_PIN_FUNCTION(ddr_pxi6), 890 MSM_PIN_FUNCTION(ddr_pxi7), 891 MSM_PIN_FUNCTION(eth012_int_n), 892 MSM_PIN_FUNCTION(eth345_int_n), 893 MSM_PIN_FUNCTION(eth6_int_n), 894 MSM_PIN_FUNCTION(gcc_gp1), 895 MSM_PIN_FUNCTION(gcc_gp2), 896 MSM_PIN_FUNCTION(gcc_gp3), 897 MSM_PIN_FUNCTION(gps_pps_in), 898 MSM_PIN_FUNCTION(hardsync_pps_in), 899 MSM_PIN_FUNCTION(intr_c), 900 MSM_PIN_FUNCTION(jitter_bist_ref), 901 MSM_PIN_FUNCTION(pcie_clkreqn), 902 MSM_PIN_FUNCTION(phase_flag), 903 MSM_PIN_FUNCTION(pll_bist), 904 MSM_PIN_FUNCTION(pll_clk), 905 MSM_PIN_FUNCTION(prng_rosc), 906 MSM_PIN_FUNCTION(qdss_cti), 907 MSM_PIN_FUNCTION(qdss_gpio), 908 MSM_PIN_FUNCTION(qlink0_enable), 909 MSM_PIN_FUNCTION(qlink0_request), 910 MSM_PIN_FUNCTION(qlink0_wmss), 911 MSM_PIN_FUNCTION(qlink1_enable), 912 MSM_PIN_FUNCTION(qlink1_request), 913 MSM_PIN_FUNCTION(qlink1_wmss), 914 MSM_PIN_FUNCTION(qlink2_enable), 915 MSM_PIN_FUNCTION(qlink2_request), 916 MSM_PIN_FUNCTION(qlink2_wmss), 917 MSM_PIN_FUNCTION(qlink3_enable), 918 MSM_PIN_FUNCTION(qlink3_request), 919 MSM_PIN_FUNCTION(qlink3_wmss), 920 MSM_PIN_FUNCTION(qlink4_enable), 921 MSM_PIN_FUNCTION(qlink4_request), 922 MSM_PIN_FUNCTION(qlink4_wmss), 923 MSM_PIN_FUNCTION(qlink5_enable), 924 MSM_PIN_FUNCTION(qlink5_request), 925 MSM_PIN_FUNCTION(qlink5_wmss), 926 MSM_PIN_FUNCTION(qlink6_enable), 927 MSM_PIN_FUNCTION(qlink6_request), 928 MSM_PIN_FUNCTION(qlink6_wmss), 929 MSM_PIN_FUNCTION(qlink7_enable), 930 MSM_PIN_FUNCTION(qlink7_request), 931 MSM_PIN_FUNCTION(qlink7_wmss), 932 MSM_PIN_FUNCTION(qspi0), 933 MSM_PIN_FUNCTION(qspi1), 934 MSM_PIN_FUNCTION(qspi2), 935 MSM_PIN_FUNCTION(qspi3), 936 MSM_PIN_FUNCTION(qspi_clk), 937 MSM_PIN_FUNCTION(qspi_cs), 938 MSM_PIN_FUNCTION(qup00), 939 MSM_PIN_FUNCTION(qup01), 940 MSM_PIN_FUNCTION(qup02), 941 MSM_PIN_FUNCTION(qup03), 942 MSM_PIN_FUNCTION(qup04), 943 MSM_PIN_FUNCTION(qup05), 944 MSM_PIN_FUNCTION(qup06), 945 MSM_PIN_FUNCTION(qup07), 946 MSM_PIN_FUNCTION(qup08), 947 MSM_PIN_FUNCTION(qup10), 948 MSM_PIN_FUNCTION(qup11), 949 MSM_PIN_FUNCTION(qup12), 950 MSM_PIN_FUNCTION(qup13), 951 MSM_PIN_FUNCTION(qup14), 952 MSM_PIN_FUNCTION(qup15), 953 MSM_PIN_FUNCTION(qup16), 954 MSM_PIN_FUNCTION(qup17), 955 MSM_PIN_FUNCTION(qup20), 956 MSM_PIN_FUNCTION(qup21), 957 MSM_PIN_FUNCTION(qup22), 958 MSM_PIN_FUNCTION(smb_alert), 959 MSM_PIN_FUNCTION(smb_clk), 960 MSM_PIN_FUNCTION(smb_dat), 961 MSM_PIN_FUNCTION(tb_trig), 962 MSM_PIN_FUNCTION(tgu_ch0), 963 MSM_PIN_FUNCTION(tgu_ch1), 964 MSM_PIN_FUNCTION(tgu_ch2), 965 MSM_PIN_FUNCTION(tgu_ch3), 966 MSM_PIN_FUNCTION(tgu_ch4), 967 MSM_PIN_FUNCTION(tgu_ch5), 968 MSM_PIN_FUNCTION(tgu_ch6), 969 MSM_PIN_FUNCTION(tgu_ch7), 970 MSM_PIN_FUNCTION(tmess_prng0), 971 MSM_PIN_FUNCTION(tmess_prng1), 972 MSM_PIN_FUNCTION(tmess_prng2), 973 MSM_PIN_FUNCTION(tmess_prng3), 974 MSM_PIN_FUNCTION(tod_pps_in), 975 MSM_PIN_FUNCTION(tsense_pwm1), 976 MSM_PIN_FUNCTION(tsense_pwm2), 977 MSM_PIN_FUNCTION(usb2phy_ac), 978 MSM_PIN_FUNCTION(usb_con_det), 979 MSM_PIN_FUNCTION(usb_dfp_en), 980 MSM_PIN_FUNCTION(usb_phy), 981 MSM_PIN_FUNCTION(vfr_0), 982 MSM_PIN_FUNCTION(vfr_1), 983 MSM_PIN_FUNCTION(vsense_trigger), 984 }; 985 986 /* 987 * Every pin is maintained as a single group, and missing or non-existing pin 988 * would be maintained as dummy group to synchronize pin group index with 989 * pin descriptor registered with pinctrl core. 990 * Clients would not be able to request these dummy pin groups. 991 */ 992 static const struct msm_pingroup qdu1000_groups[] = { 993 [0] = PINGROUP(0, qup20, qup21, ddr_bist, _, _, _, _, _, _), 994 [1] = PINGROUP(1, qup20, qup21, ddr_bist, _, _, _, _, _, _), 995 [2] = PINGROUP(2, qup21, qup20, ddr_bist, _, 996 tsense_pwm1, _, _, _, _), 997 [3] = PINGROUP(3, qup21, qup20, ddr_bist, _, 998 tsense_pwm2, _, _, _, _), 999 [4] = PINGROUP(4, qup22, _, _, _, _, _, _, _, _), 1000 [5] = PINGROUP(5, qup22, _, _, _, _, _, _, _, _), 1001 [6] = PINGROUP(6, qup00, tgu_ch0, phase_flag, _, 1002 qdss_gpio, _, _, _, _), 1003 [7] = PINGROUP(7, qup00, tgu_ch1, phase_flag, _, 1004 qdss_gpio, _, _, _, _), 1005 [8] = PINGROUP(8, qup00, tgu_ch2, phase_flag, _, 1006 qdss_gpio, _, _, _, _), 1007 [9] = PINGROUP(9, qup00, tgu_ch3, phase_flag, _, 1008 qdss_gpio, _, _, _, _), 1009 [10] = PINGROUP(10, qup01, qup02, _, _, _, _, _, _, _), 1010 [11] = PINGROUP(11, qup01, qup02, _, _, _, _, _, _, _), 1011 [12] = PINGROUP(12, qup02, qup01, qup17, _, _, _, _, _, _), 1012 [13] = PINGROUP(13, qup02, qup01, qup17, _, _, _, _, _, _), 1013 [14] = PINGROUP(14, qup03, qup04, qup17, _, _, _, _, _, _), 1014 [15] = PINGROUP(15, qup03, qup04, _, _, _, _, _, _, _), 1015 [16] = PINGROUP(16, qup04, qup03, phase_flag, _, 1016 qdss_gpio, _, _, _, _), 1017 [17] = PINGROUP(17, qup04, qup03, phase_flag, _, 1018 qdss_gpio, _, _, _, _), 1019 [18] = PINGROUP(18, qup10, prng_rosc, phase_flag, 1020 _, qdss_gpio, _, _, _, _), 1021 [19] = PINGROUP(19, qup10, prng_rosc, phase_flag, 1022 _, qdss_gpio, _, _, _, _), 1023 [20] = PINGROUP(20, qup10, prng_rosc, pll_bist, 1024 phase_flag, _, qdss_gpio, _, _, _), 1025 [21] = PINGROUP(21, qup10, prng_rosc, phase_flag, 1026 _, qdss_gpio, _, _, _, _), 1027 [22] = PINGROUP(22, qup11, qup12, phase_flag, _, 1028 qdss_gpio, _, _, _, _), 1029 [23] = PINGROUP(23, qup11, qup12, phase_flag, _, 1030 qdss_gpio, _, _, _, _), 1031 [24] = PINGROUP(24, qup12, qup11, phase_flag, _, 1032 qdss_gpio, _, _, _, _), 1033 [25] = PINGROUP(25, qup12, qup11, phase_flag, _, 1034 qdss_gpio, _, _, _, _), 1035 [26] = PINGROUP(26, qup13, qup14, intr_c, 1036 phase_flag, _, qdss_gpio, _, _, _), 1037 [27] = PINGROUP(27, qup13, qup14, intr_c, 1038 phase_flag, _, qdss_gpio, _, _, _), 1039 [28] = PINGROUP(28, qup14, qup13, intr_c, 1040 phase_flag, _, qdss_gpio, _, _, _), 1041 [29] = PINGROUP(29, qup14, qup13, qup16, 1042 phase_flag, _, qdss_gpio, _, _, _), 1043 [30] = PINGROUP(30, qup17, qup15, tmess_prng3, 1044 phase_flag, _, qdss_gpio, _, _, _), 1045 [31] = PINGROUP(31, qup17, qup15, tmess_prng2, 1046 phase_flag, _, qdss_gpio, _, _, _), 1047 [32] = PINGROUP(32, qup15, tmess_prng1, phase_flag, 1048 _, qdss_gpio, _, _, _, _), 1049 [33] = PINGROUP(33, qup15, tmess_prng0, phase_flag, 1050 _, qdss_gpio, _, _, _, _), 1051 [34] = PINGROUP(34, qup16, qdss_gpio, _, _, _, _, _, _, _), 1052 [35] = PINGROUP(35, qup16, qdss_gpio, _, _, _, _, _, _, _), 1053 [36] = PINGROUP(36, qup16, qdss_cti, _, _, _, _, _, _, _), 1054 [37] = PINGROUP(37, qup16, qdss_cti, _, _, _, _, _, _, _), 1055 [38] = PINGROUP(38, qup16, qdss_cti, _, _, _, _, _, _, _), 1056 [39] = PINGROUP(39, qup16, qdss_cti, _, _, _, _, _, _, _), 1057 [40] = PINGROUP(40, qup17, qdss_cti, _, _, _, _, _, _, _), 1058 [41] = PINGROUP(41, qup17, qdss_cti, _, _, _, _, _, _, _), 1059 [42] = PINGROUP(42, usb_con_det, phase_flag, _, 1060 qdss_gpio, _, _, _, _, _), 1061 [43] = PINGROUP(43, usb_dfp_en, phase_flag, _, 1062 qdss_gpio, _, _, _, _, _), 1063 [44] = PINGROUP(44, si5518_int, tgu_ch4, _, _, _, _, _, _, _), 1064 [45] = PINGROUP(45, tgu_ch5, _, _, _, _, _, _, _, _), 1065 [46] = PINGROUP(46, tgu_ch6, _, _, _, _, _, _, _, _), 1066 [47] = PINGROUP(47, hardsync_pps_in, tgu_ch7, _, _, _, _, _, _, _), 1067 [48] = PINGROUP(48, tod_pps_in, qdss_cti, _, _, _, _, _, _, _), 1068 [49] = PINGROUP(49, gps_pps_in, qdss_cti, _, _, _, _, _, _, _), 1069 [50] = PINGROUP(50, _, _, _, _, _, _, _, _, _), 1070 [51] = PINGROUP(51, _, _, _, _, _, _, _, _, _), 1071 [52] = PINGROUP(52, _, _, _, _, _, _, _, _, _), 1072 [53] = PINGROUP(53, _, _, _, _, _, _, _, _, _), 1073 [54] = PINGROUP(54, _, _, _, _, _, _, _, _, _), 1074 [55] = PINGROUP(55, _, _, _, _, _, _, _, _, _), 1075 [56] = PINGROUP(56, _, qlink6_wmss, _, _, _, _, _, _, _), 1076 [57] = PINGROUP(57, _, qlink7_wmss, _, _, _, _, _, _, _), 1077 [58] = PINGROUP(58, _, _, _, _, _, _, _, _, _), 1078 [59] = PINGROUP(59, _, _, _, _, _, _, _, _, _), 1079 [60] = PINGROUP(60, _, _, _, _, _, _, _, _, _), 1080 [61] = PINGROUP(61, _, _, _, _, _, _, _, _, _), 1081 [62] = PINGROUP(62, _, _, _, _, _, _, _, _, _), 1082 [63] = PINGROUP(63, _, _, _, _, _, _, _, _, _), 1083 [64] = PINGROUP(64, _, _, _, _, _, _, _, _, _), 1084 [65] = PINGROUP(65, _, _, _, _, _, _, _, _, _), 1085 [66] = PINGROUP(66, qlink0_request, _, _, _, _, _, _, _, _), 1086 [67] = PINGROUP(67, qlink0_enable, _, _, _, _, _, _, _, _), 1087 [68] = PINGROUP(68, qlink1_request, _, _, _, _, _, _, _, _), 1088 [69] = PINGROUP(69, qlink1_enable, _, _, _, _, _, _, _, _), 1089 [70] = PINGROUP(70, qlink2_request, _, _, _, _, _, _, _, _), 1090 [71] = PINGROUP(71, qlink2_enable, _, _, _, _, _, _, _, _), 1091 [72] = PINGROUP(72, qlink3_request, _, _, _, _, _, _, _, _), 1092 [73] = PINGROUP(73, qlink3_enable, _, _, _, _, _, _, _, _), 1093 [74] = PINGROUP(74, qlink4_request, _, _, _, _, _, _, _, _), 1094 [75] = PINGROUP(75, qlink4_enable, _, _, _, _, _, _, _, _), 1095 [76] = PINGROUP(76, qlink5_request, _, _, _, _, _, _, _, _), 1096 [77] = PINGROUP(77, qlink5_enable, _, _, _, _, _, _, _, _), 1097 [78] = PINGROUP(78, qlink6_request, _, _, _, _, _, _, _, _), 1098 [79] = PINGROUP(79, qlink6_enable, _, _, _, _, _, _, _, _), 1099 [80] = PINGROUP(80, qlink7_request, _, _, _, _, _, _, _, _), 1100 [81] = PINGROUP(81, qlink7_enable, _, _, _, _, _, _, _, _), 1101 [82] = PINGROUP(82, qlink0_wmss, _, _, _, _, _, _, _, _), 1102 [83] = PINGROUP(83, qlink1_wmss, _, _, _, _, _, _, _, _), 1103 [84] = PINGROUP(84, qlink4_wmss, _, _, _, _, _, _, _, _), 1104 [85] = PINGROUP(85, qlink5_wmss, _, _, _, _, _, _, _, _), 1105 [86] = PINGROUP(86, eth012_int_n, gcc_gp1, _, qdss_cti, _, _, _, _, _), 1106 [87] = PINGROUP(87, eth345_int_n, gcc_gp2, _, qdss_cti, _, _, _, _, _), 1107 [88] = PINGROUP(88, eth6_int_n, smb_alert, gcc_gp3, _, 1108 qdss_gpio, _, _, _, _), 1109 [89] = PINGROUP(89, phase_flag, cmu_rng, _, 1110 qdss_gpio, atest_char, _, _, _, _), 1111 [90] = PINGROUP(90, usb2phy_ac, phase_flag, 1112 cmu_rng, _, qdss_gpio, 1113 atest_char, _, _, _), 1114 [91] = PINGROUP(91, usb_phy, phase_flag, cmu_rng, 1115 _, qdss_gpio, atest_char, _, _, _), 1116 [92] = PINGROUP(92, phase_flag, cmu_rng, _, 1117 qdss_gpio, atest_char, _, _, _, _), 1118 [93] = PINGROUP(93, vfr_0, qdss_cti, _, _, _, _, _, _, _), 1119 [94] = PINGROUP(94, vfr_1, qdss_cti, _, _, _, _, _, _, _), 1120 [95] = PINGROUP(95, phase_flag, _, qdss_gpio, 1121 atest_char, _, _, _, _, _), 1122 [96] = PINGROUP(96, phase_flag, _, qdss_gpio, _, _, _, _, _, _), 1123 [97] = PINGROUP(97, phase_flag, _, qdss_gpio, _, _, _, _, _, _), 1124 [98] = PINGROUP(98, pll_clk, _, _, _, _, _, _, _, _), 1125 [99] = PINGROUP(99, pcie_clkreqn, char_exec, _, _, _, _, _, _, _), 1126 [100] = PINGROUP(100, char_exec, _, _, _, _, _, _, _, _), 1127 [101] = PINGROUP(101, smb_alert, _, _, _, _, _, _, _, _), 1128 [102] = PINGROUP(102, phase_flag, _, qdss_gpio, _, _, _, _, _, _), 1129 [103] = PINGROUP(103, cmo_pri, qdss_gpio, _, _, _, _, _, _, _), 1130 [104] = PINGROUP(104, _, _, _, _, _, _, _, _, _), 1131 [105] = PINGROUP(105, _, _, _, _, _, _, _, _, _), 1132 [106] = PINGROUP(106, _, _, _, _, _, _, _, _, _), 1133 [107] = PINGROUP(107, _, _, _, _, _, _, _, _, _), 1134 [108] = PINGROUP(108, _, _, _, _, _, _, _, _, _), 1135 [109] = PINGROUP(109, _, _, _, _, _, _, _, _, _), 1136 [110] = PINGROUP(110, _, _, _, _, _, _, _, _, _), 1137 [111] = PINGROUP(111, _, _, _, _, _, _, _, _, _), 1138 [112] = PINGROUP(112, _, _, _, _, _, _, _, _, _), 1139 [113] = PINGROUP(113, _, _, _, _, _, _, _, _, _), 1140 [114] = PINGROUP(114, qspi0, tb_trig, _, 1141 atest_usb, ddr_pxi0, _, _, _, _), 1142 [115] = PINGROUP(115, qspi1, _, atest_usb, 1143 ddr_pxi0, _, _, _, _, _), 1144 [116] = PINGROUP(116, qspi2, _, atest_usb, 1145 ddr_pxi1, _, _, _, _, _), 1146 [117] = PINGROUP(117, qspi3, _, atest_usb, 1147 ddr_pxi1, _, _, _, _, _), 1148 [118] = PINGROUP(118, _, atest_usb, ddr_pxi2, _, _, _, _, _, _), 1149 [119] = PINGROUP(119, _, _, ddr_pxi2, _, _, _, _, _, _), 1150 [120] = PINGROUP(120, _, _, ddr_pxi3, _, _, _, _, _, _), 1151 [121] = PINGROUP(121, _, ddr_pxi3, _, _, _, _, _, _, _), 1152 [122] = PINGROUP(122, _, ddr_pxi4, _, _, _, _, _, _, _), 1153 [123] = PINGROUP(123, _, ddr_pxi4, _, _, _, _, _, _, _), 1154 [124] = PINGROUP(124, _, ddr_pxi5, _, _, _, _, _, _, _), 1155 [125] = PINGROUP(125, qspi_cs, _, ddr_pxi5, _, _, _, _, _, _), 1156 [126] = PINGROUP(126, qspi_clk, _, ddr_pxi6, _, _, _, _, _, _), 1157 [127] = PINGROUP(127, _, ddr_pxi6, _, _, _, _, _, _, _), 1158 [128] = PINGROUP(128, qup22, _, ddr_pxi7, _, _, _, _, _, _), 1159 [129] = PINGROUP(129, qup22, ddr_pxi7, _, _, _, _, _, _, _), 1160 [130] = PINGROUP(130, qup05, qup06, jitter_bist_ref, 1161 qdss_cti, _, _, _, _, _), 1162 [131] = PINGROUP(131, qup05, qup06, qdss_cti, _, _, _, _, _, _), 1163 [132] = PINGROUP(132, qup06, qup05, smb_dat, 1164 qdss_cti, _, _, _, _, _), 1165 [133] = PINGROUP(133, qup06, qup05, smb_clk, 1166 qdss_cti, _, _, _, _, _), 1167 [134] = PINGROUP(134, qup08, qup07, gcc_gp1, _, 1168 qdss_cti, _, _, _, _), 1169 [135] = PINGROUP(135, qup08, qup07, gcc_gp2, _, 1170 qdss_cti, vsense_trigger, _, _, _), 1171 [136] = PINGROUP(136, gcc_gp3, dbg_out_clk, _, _, _, _, _, _, _), 1172 [137] = PINGROUP(137, _, _, _, _, _, _, _, _, _), 1173 [138] = PINGROUP(138, qlink2_wmss, _, _, _, _, _, _, _, _), 1174 [139] = PINGROUP(139, qlink3_wmss, _, _, _, _, _, _, _, _), 1175 [140] = PINGROUP(140, _, _, _, _, _, _, _, _, _), 1176 [141] = PINGROUP(141, intr_c, _, _, _, _, _, _, _, _), 1177 [142] = PINGROUP(142, intr_c, _, _, _, _, _, _, _, _), 1178 [143] = PINGROUP(143, intr_c, _, _, _, _, _, _, _, _), 1179 [144] = PINGROUP(144, qdss_cti, _, _, _, _, _, _, _, _), 1180 [145] = PINGROUP(145, qdss_cti, _, _, _, _, _, _, _, _), 1181 [146] = PINGROUP(146, _, _, _, _, _, _, _, _, _), 1182 [147] = PINGROUP(147, _, _, _, _, _, _, _, _, _), 1183 [148] = PINGROUP(148, _, _, _, _, _, _, _, _, _), 1184 [149] = PINGROUP(149, _, _, _, _, _, _, _, _, _), 1185 [150] = PINGROUP(150, _, _, _, _, _, _, _, _, _), 1186 [151] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x9e000, 0, 0), 1187 [152] = SDC_QDSD_PINGROUP(sdc1_clk, 0x9d000, 13, 6), 1188 [153] = SDC_QDSD_PINGROUP(sdc1_cmd, 0x9d000, 11, 3), 1189 [154] = SDC_QDSD_PINGROUP(sdc1_data, 0x9d000, 9, 0), 1190 }; 1191 static const struct msm_pinctrl_soc_data qdu1000_tlmm = { 1192 .pins = qdu1000_pins, 1193 .npins = ARRAY_SIZE(qdu1000_pins), 1194 .functions = qdu1000_functions, 1195 .nfunctions = ARRAY_SIZE(qdu1000_functions), 1196 .groups = qdu1000_groups, 1197 .ngroups = ARRAY_SIZE(qdu1000_groups), 1198 .ngpios = 151, 1199 }; 1200 1201 static int qdu1000_tlmm_probe(struct platform_device *pdev) 1202 { 1203 return msm_pinctrl_probe(pdev, &qdu1000_tlmm); 1204 } 1205 1206 static const struct of_device_id qdu1000_tlmm_of_match[] = { 1207 { .compatible = "qcom,qdu1000-tlmm", }, 1208 { }, 1209 }; 1210 MODULE_DEVICE_TABLE(of, qdu1000_tlmm_of_match); 1211 1212 static struct platform_driver qdu1000_tlmm_driver = { 1213 .driver = { 1214 .name = "qdu1000-tlmm", 1215 .of_match_table = qdu1000_tlmm_of_match, 1216 }, 1217 .probe = qdu1000_tlmm_probe, 1218 }; 1219 1220 static int __init qdu1000_tlmm_init(void) 1221 { 1222 return platform_driver_register(&qdu1000_tlmm_driver); 1223 } 1224 arch_initcall(qdu1000_tlmm_init); 1225 1226 static void __exit qdu1000_tlmm_exit(void) 1227 { 1228 platform_driver_unregister(&qdu1000_tlmm_driver); 1229 } 1230 module_exit(qdu1000_tlmm_exit); 1231 1232 MODULE_DESCRIPTION("QTI QDU1000 TLMM driver"); 1233 MODULE_LICENSE("GPL"); 1234