pinctrl-sdx55.c 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
  4. */
  5. #include <linux/module.h>
  6. #include <linux/of.h>
  7. #include <linux/platform_device.h>
  8. #include <linux/pinctrl/pinctrl.h>
  9. #include "pinctrl-msm.h"
  10. #define FUNCTION(fname) \
  11. [msm_mux_##fname] = { \
  12. .name = #fname, \
  13. .groups = fname##_groups, \
  14. .ngroups = ARRAY_SIZE(fname##_groups), \
  15. }
  16. #define REG_SIZE 0x1000
  17. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  18. { \
  19. .name = "gpio" #id, \
  20. .pins = gpio##id##_pins, \
  21. .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \
  22. .funcs = (int[]){ \
  23. msm_mux_gpio, /* gpio mode */ \
  24. msm_mux_##f1, \
  25. msm_mux_##f2, \
  26. msm_mux_##f3, \
  27. msm_mux_##f4, \
  28. msm_mux_##f5, \
  29. msm_mux_##f6, \
  30. msm_mux_##f7, \
  31. msm_mux_##f8, \
  32. msm_mux_##f9 \
  33. }, \
  34. .nfuncs = 10, \
  35. .ctl_reg = REG_SIZE * id, \
  36. .io_reg = 0x4 + REG_SIZE * id, \
  37. .intr_cfg_reg = 0x8 + REG_SIZE * id, \
  38. .intr_status_reg = 0xc + REG_SIZE * id, \
  39. .intr_target_reg = 0x8 + REG_SIZE * id, \
  40. .mux_bit = 2, \
  41. .pull_bit = 0, \
  42. .drv_bit = 6, \
  43. .oe_bit = 9, \
  44. .in_bit = 0, \
  45. .out_bit = 1, \
  46. .intr_enable_bit = 0, \
  47. .intr_status_bit = 0, \
  48. .intr_target_bit = 5, \
  49. .intr_target_kpss_val = 3, \
  50. .intr_raw_status_bit = 4, \
  51. .intr_polarity_bit = 1, \
  52. .intr_detection_bit = 2, \
  53. .intr_detection_width = 2, \
  54. }
  55. #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
  56. { \
  57. .name = #pg_name, \
  58. .pins = pg_name##_pins, \
  59. .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \
  60. .ctl_reg = ctl, \
  61. .io_reg = 0, \
  62. .intr_cfg_reg = 0, \
  63. .intr_status_reg = 0, \
  64. .intr_target_reg = 0, \
  65. .mux_bit = -1, \
  66. .pull_bit = pull, \
  67. .drv_bit = drv, \
  68. .oe_bit = -1, \
  69. .in_bit = -1, \
  70. .out_bit = -1, \
  71. .intr_enable_bit = -1, \
  72. .intr_status_bit = -1, \
  73. .intr_target_bit = -1, \
  74. .intr_raw_status_bit = -1, \
  75. .intr_polarity_bit = -1, \
  76. .intr_detection_bit = -1, \
  77. .intr_detection_width = -1, \
  78. }
  79. static const struct pinctrl_pin_desc sdx55_pins[] = {
  80. PINCTRL_PIN(0, "GPIO_0"),
  81. PINCTRL_PIN(1, "GPIO_1"),
  82. PINCTRL_PIN(2, "GPIO_2"),
  83. PINCTRL_PIN(3, "GPIO_3"),
  84. PINCTRL_PIN(4, "GPIO_4"),
  85. PINCTRL_PIN(5, "GPIO_5"),
  86. PINCTRL_PIN(6, "GPIO_6"),
  87. PINCTRL_PIN(7, "GPIO_7"),
  88. PINCTRL_PIN(8, "GPIO_8"),
  89. PINCTRL_PIN(9, "GPIO_9"),
  90. PINCTRL_PIN(10, "GPIO_10"),
  91. PINCTRL_PIN(11, "GPIO_11"),
  92. PINCTRL_PIN(12, "GPIO_12"),
  93. PINCTRL_PIN(13, "GPIO_13"),
  94. PINCTRL_PIN(14, "GPIO_14"),
  95. PINCTRL_PIN(15, "GPIO_15"),
  96. PINCTRL_PIN(16, "GPIO_16"),
  97. PINCTRL_PIN(17, "GPIO_17"),
  98. PINCTRL_PIN(18, "GPIO_18"),
  99. PINCTRL_PIN(19, "GPIO_19"),
  100. PINCTRL_PIN(20, "GPIO_20"),
  101. PINCTRL_PIN(21, "GPIO_21"),
  102. PINCTRL_PIN(22, "GPIO_22"),
  103. PINCTRL_PIN(23, "GPIO_23"),
  104. PINCTRL_PIN(24, "GPIO_24"),
  105. PINCTRL_PIN(25, "GPIO_25"),
  106. PINCTRL_PIN(26, "GPIO_26"),
  107. PINCTRL_PIN(27, "GPIO_27"),
  108. PINCTRL_PIN(28, "GPIO_28"),
  109. PINCTRL_PIN(29, "GPIO_29"),
  110. PINCTRL_PIN(30, "GPIO_30"),
  111. PINCTRL_PIN(31, "GPIO_31"),
  112. PINCTRL_PIN(32, "GPIO_32"),
  113. PINCTRL_PIN(33, "GPIO_33"),
  114. PINCTRL_PIN(34, "GPIO_34"),
  115. PINCTRL_PIN(35, "GPIO_35"),
  116. PINCTRL_PIN(36, "GPIO_36"),
  117. PINCTRL_PIN(37, "GPIO_37"),
  118. PINCTRL_PIN(38, "GPIO_38"),
  119. PINCTRL_PIN(39, "GPIO_39"),
  120. PINCTRL_PIN(40, "GPIO_40"),
  121. PINCTRL_PIN(41, "GPIO_41"),
  122. PINCTRL_PIN(42, "GPIO_42"),
  123. PINCTRL_PIN(43, "GPIO_43"),
  124. PINCTRL_PIN(44, "GPIO_44"),
  125. PINCTRL_PIN(45, "GPIO_45"),
  126. PINCTRL_PIN(46, "GPIO_46"),
  127. PINCTRL_PIN(47, "GPIO_47"),
  128. PINCTRL_PIN(48, "GPIO_48"),
  129. PINCTRL_PIN(49, "GPIO_49"),
  130. PINCTRL_PIN(50, "GPIO_50"),
  131. PINCTRL_PIN(51, "GPIO_51"),
  132. PINCTRL_PIN(52, "GPIO_52"),
  133. PINCTRL_PIN(53, "GPIO_53"),
  134. PINCTRL_PIN(54, "GPIO_54"),
  135. PINCTRL_PIN(55, "GPIO_55"),
  136. PINCTRL_PIN(56, "GPIO_56"),
  137. PINCTRL_PIN(57, "GPIO_57"),
  138. PINCTRL_PIN(58, "GPIO_58"),
  139. PINCTRL_PIN(59, "GPIO_59"),
  140. PINCTRL_PIN(60, "GPIO_60"),
  141. PINCTRL_PIN(61, "GPIO_61"),
  142. PINCTRL_PIN(62, "GPIO_62"),
  143. PINCTRL_PIN(63, "GPIO_63"),
  144. PINCTRL_PIN(64, "GPIO_64"),
  145. PINCTRL_PIN(65, "GPIO_65"),
  146. PINCTRL_PIN(66, "GPIO_66"),
  147. PINCTRL_PIN(67, "GPIO_67"),
  148. PINCTRL_PIN(68, "GPIO_68"),
  149. PINCTRL_PIN(69, "GPIO_69"),
  150. PINCTRL_PIN(70, "GPIO_70"),
  151. PINCTRL_PIN(71, "GPIO_71"),
  152. PINCTRL_PIN(72, "GPIO_72"),
  153. PINCTRL_PIN(73, "GPIO_73"),
  154. PINCTRL_PIN(74, "GPIO_74"),
  155. PINCTRL_PIN(75, "GPIO_75"),
  156. PINCTRL_PIN(76, "GPIO_76"),
  157. PINCTRL_PIN(77, "GPIO_77"),
  158. PINCTRL_PIN(78, "GPIO_78"),
  159. PINCTRL_PIN(79, "GPIO_79"),
  160. PINCTRL_PIN(80, "GPIO_80"),
  161. PINCTRL_PIN(81, "GPIO_81"),
  162. PINCTRL_PIN(82, "GPIO_82"),
  163. PINCTRL_PIN(83, "GPIO_83"),
  164. PINCTRL_PIN(84, "GPIO_84"),
  165. PINCTRL_PIN(85, "GPIO_85"),
  166. PINCTRL_PIN(86, "GPIO_86"),
  167. PINCTRL_PIN(87, "GPIO_87"),
  168. PINCTRL_PIN(88, "GPIO_88"),
  169. PINCTRL_PIN(89, "GPIO_89"),
  170. PINCTRL_PIN(90, "GPIO_90"),
  171. PINCTRL_PIN(91, "GPIO_91"),
  172. PINCTRL_PIN(92, "GPIO_92"),
  173. PINCTRL_PIN(93, "GPIO_93"),
  174. PINCTRL_PIN(94, "GPIO_94"),
  175. PINCTRL_PIN(95, "GPIO_95"),
  176. PINCTRL_PIN(96, "GPIO_96"),
  177. PINCTRL_PIN(97, "GPIO_97"),
  178. PINCTRL_PIN(98, "GPIO_98"),
  179. PINCTRL_PIN(99, "GPIO_99"),
  180. PINCTRL_PIN(100, "GPIO_100"),
  181. PINCTRL_PIN(101, "GPIO_101"),
  182. PINCTRL_PIN(102, "GPIO_102"),
  183. PINCTRL_PIN(103, "GPIO_103"),
  184. PINCTRL_PIN(104, "GPIO_104"),
  185. PINCTRL_PIN(105, "GPIO_105"),
  186. PINCTRL_PIN(106, "GPIO_106"),
  187. PINCTRL_PIN(107, "GPIO_107"),
  188. PINCTRL_PIN(108, "SDC1_RCLK"),
  189. PINCTRL_PIN(109, "SDC1_CLK"),
  190. PINCTRL_PIN(110, "SDC1_CMD"),
  191. PINCTRL_PIN(111, "SDC1_DATA"),
  192. };
  193. #define DECLARE_MSM_GPIO_PINS(pin) \
  194. static const unsigned int gpio##pin##_pins[] = { pin }
  195. DECLARE_MSM_GPIO_PINS(0);
  196. DECLARE_MSM_GPIO_PINS(1);
  197. DECLARE_MSM_GPIO_PINS(2);
  198. DECLARE_MSM_GPIO_PINS(3);
  199. DECLARE_MSM_GPIO_PINS(4);
  200. DECLARE_MSM_GPIO_PINS(5);
  201. DECLARE_MSM_GPIO_PINS(6);
  202. DECLARE_MSM_GPIO_PINS(7);
  203. DECLARE_MSM_GPIO_PINS(8);
  204. DECLARE_MSM_GPIO_PINS(9);
  205. DECLARE_MSM_GPIO_PINS(10);
  206. DECLARE_MSM_GPIO_PINS(11);
  207. DECLARE_MSM_GPIO_PINS(12);
  208. DECLARE_MSM_GPIO_PINS(13);
  209. DECLARE_MSM_GPIO_PINS(14);
  210. DECLARE_MSM_GPIO_PINS(15);
  211. DECLARE_MSM_GPIO_PINS(16);
  212. DECLARE_MSM_GPIO_PINS(17);
  213. DECLARE_MSM_GPIO_PINS(18);
  214. DECLARE_MSM_GPIO_PINS(19);
  215. DECLARE_MSM_GPIO_PINS(20);
  216. DECLARE_MSM_GPIO_PINS(21);
  217. DECLARE_MSM_GPIO_PINS(22);
  218. DECLARE_MSM_GPIO_PINS(23);
  219. DECLARE_MSM_GPIO_PINS(24);
  220. DECLARE_MSM_GPIO_PINS(25);
  221. DECLARE_MSM_GPIO_PINS(26);
  222. DECLARE_MSM_GPIO_PINS(27);
  223. DECLARE_MSM_GPIO_PINS(28);
  224. DECLARE_MSM_GPIO_PINS(29);
  225. DECLARE_MSM_GPIO_PINS(30);
  226. DECLARE_MSM_GPIO_PINS(31);
  227. DECLARE_MSM_GPIO_PINS(32);
  228. DECLARE_MSM_GPIO_PINS(33);
  229. DECLARE_MSM_GPIO_PINS(34);
  230. DECLARE_MSM_GPIO_PINS(35);
  231. DECLARE_MSM_GPIO_PINS(36);
  232. DECLARE_MSM_GPIO_PINS(37);
  233. DECLARE_MSM_GPIO_PINS(38);
  234. DECLARE_MSM_GPIO_PINS(39);
  235. DECLARE_MSM_GPIO_PINS(40);
  236. DECLARE_MSM_GPIO_PINS(41);
  237. DECLARE_MSM_GPIO_PINS(42);
  238. DECLARE_MSM_GPIO_PINS(43);
  239. DECLARE_MSM_GPIO_PINS(44);
  240. DECLARE_MSM_GPIO_PINS(45);
  241. DECLARE_MSM_GPIO_PINS(46);
  242. DECLARE_MSM_GPIO_PINS(47);
  243. DECLARE_MSM_GPIO_PINS(48);
  244. DECLARE_MSM_GPIO_PINS(49);
  245. DECLARE_MSM_GPIO_PINS(50);
  246. DECLARE_MSM_GPIO_PINS(51);
  247. DECLARE_MSM_GPIO_PINS(52);
  248. DECLARE_MSM_GPIO_PINS(53);
  249. DECLARE_MSM_GPIO_PINS(54);
  250. DECLARE_MSM_GPIO_PINS(55);
  251. DECLARE_MSM_GPIO_PINS(56);
  252. DECLARE_MSM_GPIO_PINS(57);
  253. DECLARE_MSM_GPIO_PINS(58);
  254. DECLARE_MSM_GPIO_PINS(59);
  255. DECLARE_MSM_GPIO_PINS(60);
  256. DECLARE_MSM_GPIO_PINS(61);
  257. DECLARE_MSM_GPIO_PINS(62);
  258. DECLARE_MSM_GPIO_PINS(63);
  259. DECLARE_MSM_GPIO_PINS(64);
  260. DECLARE_MSM_GPIO_PINS(65);
  261. DECLARE_MSM_GPIO_PINS(66);
  262. DECLARE_MSM_GPIO_PINS(67);
  263. DECLARE_MSM_GPIO_PINS(68);
  264. DECLARE_MSM_GPIO_PINS(69);
  265. DECLARE_MSM_GPIO_PINS(70);
  266. DECLARE_MSM_GPIO_PINS(71);
  267. DECLARE_MSM_GPIO_PINS(72);
  268. DECLARE_MSM_GPIO_PINS(73);
  269. DECLARE_MSM_GPIO_PINS(74);
  270. DECLARE_MSM_GPIO_PINS(75);
  271. DECLARE_MSM_GPIO_PINS(76);
  272. DECLARE_MSM_GPIO_PINS(77);
  273. DECLARE_MSM_GPIO_PINS(78);
  274. DECLARE_MSM_GPIO_PINS(79);
  275. DECLARE_MSM_GPIO_PINS(80);
  276. DECLARE_MSM_GPIO_PINS(81);
  277. DECLARE_MSM_GPIO_PINS(82);
  278. DECLARE_MSM_GPIO_PINS(83);
  279. DECLARE_MSM_GPIO_PINS(84);
  280. DECLARE_MSM_GPIO_PINS(85);
  281. DECLARE_MSM_GPIO_PINS(86);
  282. DECLARE_MSM_GPIO_PINS(87);
  283. DECLARE_MSM_GPIO_PINS(88);
  284. DECLARE_MSM_GPIO_PINS(89);
  285. DECLARE_MSM_GPIO_PINS(90);
  286. DECLARE_MSM_GPIO_PINS(91);
  287. DECLARE_MSM_GPIO_PINS(92);
  288. DECLARE_MSM_GPIO_PINS(93);
  289. DECLARE_MSM_GPIO_PINS(94);
  290. DECLARE_MSM_GPIO_PINS(95);
  291. DECLARE_MSM_GPIO_PINS(96);
  292. DECLARE_MSM_GPIO_PINS(97);
  293. DECLARE_MSM_GPIO_PINS(98);
  294. DECLARE_MSM_GPIO_PINS(99);
  295. DECLARE_MSM_GPIO_PINS(100);
  296. DECLARE_MSM_GPIO_PINS(101);
  297. DECLARE_MSM_GPIO_PINS(102);
  298. DECLARE_MSM_GPIO_PINS(103);
  299. DECLARE_MSM_GPIO_PINS(104);
  300. DECLARE_MSM_GPIO_PINS(105);
  301. DECLARE_MSM_GPIO_PINS(106);
  302. DECLARE_MSM_GPIO_PINS(107);
  303. static const unsigned int sdc1_rclk_pins[] = { 108 };
  304. static const unsigned int sdc1_clk_pins[] = { 109 };
  305. static const unsigned int sdc1_cmd_pins[] = { 110 };
  306. static const unsigned int sdc1_data_pins[] = { 111 };
  307. enum sdx55_functions {
  308. msm_mux_adsp_ext,
  309. msm_mux_atest,
  310. msm_mux_audio_ref,
  311. msm_mux_bimc_dte0,
  312. msm_mux_bimc_dte1,
  313. msm_mux_blsp_i2c1,
  314. msm_mux_blsp_i2c2,
  315. msm_mux_blsp_i2c3,
  316. msm_mux_blsp_i2c4,
  317. msm_mux_blsp_spi1,
  318. msm_mux_blsp_spi2,
  319. msm_mux_blsp_spi3,
  320. msm_mux_blsp_spi4,
  321. msm_mux_blsp_uart1,
  322. msm_mux_blsp_uart2,
  323. msm_mux_blsp_uart3,
  324. msm_mux_blsp_uart4,
  325. msm_mux_char_exec,
  326. msm_mux_coex_uart,
  327. msm_mux_coex_uart2,
  328. msm_mux_cri_trng,
  329. msm_mux_cri_trng0,
  330. msm_mux_cri_trng1,
  331. msm_mux_dbg_out,
  332. msm_mux_ddr_bist,
  333. msm_mux_ddr_pxi0,
  334. msm_mux_ebi0_wrcdc,
  335. msm_mux_ebi2_a,
  336. msm_mux_ebi2_lcd,
  337. msm_mux_emac_gcc0,
  338. msm_mux_emac_gcc1,
  339. msm_mux_emac_pps0,
  340. msm_mux_emac_pps1,
  341. msm_mux_ext_dbg,
  342. msm_mux_gcc_gp1,
  343. msm_mux_gcc_gp2,
  344. msm_mux_gcc_gp3,
  345. msm_mux_gcc_plltest,
  346. msm_mux_gpio,
  347. msm_mux_i2s_mclk,
  348. msm_mux_jitter_bist,
  349. msm_mux_ldo_en,
  350. msm_mux_ldo_update,
  351. msm_mux_mgpi_clk,
  352. msm_mux_m_voc,
  353. msm_mux_native_char,
  354. msm_mux_native_char0,
  355. msm_mux_native_char1,
  356. msm_mux_native_char2,
  357. msm_mux_native_char3,
  358. msm_mux_native_tsens,
  359. msm_mux_native_tsense,
  360. msm_mux_nav_gpio,
  361. msm_mux_pa_indicator,
  362. msm_mux_pcie_clkreq,
  363. msm_mux_pci_e,
  364. msm_mux_pll_bist,
  365. msm_mux_pll_ref,
  366. msm_mux_pll_test,
  367. msm_mux_pri_mi2s,
  368. msm_mux_prng_rosc,
  369. msm_mux_qdss_cti,
  370. msm_mux_qdss_gpio,
  371. msm_mux_qdss_stm,
  372. msm_mux_qlink0_en,
  373. msm_mux_qlink0_req,
  374. msm_mux_qlink0_wmss,
  375. msm_mux_qlink1_en,
  376. msm_mux_qlink1_req,
  377. msm_mux_qlink1_wmss,
  378. msm_mux_spmi_coex,
  379. msm_mux_sec_mi2s,
  380. msm_mux_spmi_vgi,
  381. msm_mux_tgu_ch0,
  382. msm_mux_uim1_clk,
  383. msm_mux_uim1_data,
  384. msm_mux_uim1_present,
  385. msm_mux_uim1_reset,
  386. msm_mux_uim2_clk,
  387. msm_mux_uim2_data,
  388. msm_mux_uim2_present,
  389. msm_mux_uim2_reset,
  390. msm_mux_usb2phy_ac,
  391. msm_mux_vsense_trigger,
  392. msm_mux__,
  393. };
  394. static const char * const gpio_groups[] = {
  395. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  396. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  397. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  398. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  399. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  400. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  401. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  402. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  403. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  404. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  405. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  406. "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
  407. "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
  408. "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
  409. "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  410. "gpio105", "gpio106", "gpio107",
  411. };
  412. static const char * const qdss_stm_groups[] = {
  413. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio12", "gpio13",
  414. "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
  415. "gpio23", "gpio44", "gpio45", "gpio52", "gpio53", "gpio56", "gpio57", "gpio61", "gpio62",
  416. "gpio63", "gpio64", "gpio65", "gpio66",
  417. };
  418. static const char * const ddr_pxi0_groups[] = {
  419. "gpio45", "gpio46",
  420. };
  421. static const char * const m_voc_groups[] = {
  422. "gpio46", "gpio48", "gpio49", "gpio59", "gpio60",
  423. };
  424. static const char * const ddr_bist_groups[] = {
  425. "gpio46", "gpio47", "gpio48", "gpio49",
  426. };
  427. static const char * const blsp_spi1_groups[] = {
  428. "gpio52", "gpio62", "gpio71", "gpio80", "gpio81", "gpio82", "gpio83",
  429. };
  430. static const char * const pci_e_groups[] = {
  431. "gpio53",
  432. };
  433. static const char * const tgu_ch0_groups[] = {
  434. "gpio55",
  435. };
  436. static const char * const pcie_clkreq_groups[] = {
  437. "gpio56",
  438. };
  439. static const char * const mgpi_clk_groups[] = {
  440. "gpio61", "gpio71",
  441. };
  442. static const char * const i2s_mclk_groups[] = {
  443. "gpio62",
  444. };
  445. static const char * const audio_ref_groups[] = {
  446. "gpio62",
  447. };
  448. static const char * const ldo_update_groups[] = {
  449. "gpio62",
  450. };
  451. static const char * const atest_groups[] = {
  452. "gpio63", "gpio64", "gpio65", "gpio66", "gpio67",
  453. };
  454. static const char * const uim1_data_groups[] = {
  455. "gpio67",
  456. };
  457. static const char * const uim1_present_groups[] = {
  458. "gpio68",
  459. };
  460. static const char * const uim1_reset_groups[] = {
  461. "gpio69",
  462. };
  463. static const char * const uim1_clk_groups[] = {
  464. "gpio70",
  465. };
  466. static const char * const qlink1_en_groups[] = {
  467. "gpio72",
  468. };
  469. static const char * const qlink1_req_groups[] = {
  470. "gpio73",
  471. };
  472. static const char * const qlink1_wmss_groups[] = {
  473. "gpio74",
  474. };
  475. static const char * const coex_uart2_groups[] = {
  476. "gpio75", "gpio76",
  477. };
  478. static const char * const spmi_vgi_groups[] = {
  479. "gpio78", "gpio79",
  480. };
  481. static const char * const gcc_plltest_groups[] = {
  482. "gpio81", "gpio82",
  483. };
  484. static const char * const usb2phy_ac_groups[] = {
  485. "gpio93",
  486. };
  487. static const char * const emac_pps1_groups[] = {
  488. "gpio95",
  489. };
  490. static const char * const emac_pps0_groups[] = {
  491. "gpio106",
  492. };
  493. static const char * const uim2_data_groups[] = {
  494. "gpio0",
  495. };
  496. static const char * const ebi0_wrcdc_groups[] = {
  497. "gpio0", "gpio2",
  498. };
  499. static const char * const uim2_present_groups[] = {
  500. "gpio1",
  501. };
  502. static const char * const blsp_uart1_groups[] = {
  503. "gpio0", "gpio1", "gpio2", "gpio3", "gpio20", "gpio21", "gpio22",
  504. "gpio23",
  505. };
  506. static const char * const uim2_reset_groups[] = {
  507. "gpio2",
  508. };
  509. static const char * const blsp_i2c1_groups[] = {
  510. "gpio2", "gpio3", "gpio82", "gpio83",
  511. };
  512. static const char * const uim2_clk_groups[] = {
  513. "gpio3",
  514. };
  515. static const char * const blsp_spi2_groups[] = {
  516. "gpio4", "gpio5", "gpio6", "gpio7", "gpio52", "gpio62", "gpio71",
  517. };
  518. static const char * const blsp_uart2_groups[] = {
  519. "gpio4", "gpio5", "gpio6", "gpio7", "gpio63", "gpio64", "gpio65",
  520. "gpio66",
  521. };
  522. static const char * const blsp_i2c2_groups[] = {
  523. "gpio6", "gpio7", "gpio65", "gpio66",
  524. };
  525. static const char * const char_exec_groups[] = {
  526. "gpio6", "gpio7",
  527. };
  528. static const char * const pri_mi2s_groups[] = {
  529. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  530. "gpio15",
  531. };
  532. static const char * const blsp_spi3_groups[] = {
  533. "gpio8", "gpio9", "gpio10", "gpio11", "gpio52", "gpio62", "gpio71",
  534. };
  535. static const char * const blsp_uart3_groups[] = {
  536. "gpio8", "gpio9", "gpio10", "gpio11",
  537. };
  538. static const char * const ext_dbg_groups[] = {
  539. "gpio8", "gpio9", "gpio10", "gpio11",
  540. };
  541. static const char * const ldo_en_groups[] = {
  542. "gpio8",
  543. };
  544. static const char * const blsp_i2c3_groups[] = {
  545. "gpio10", "gpio11",
  546. };
  547. static const char * const gcc_gp3_groups[] = {
  548. "gpio11",
  549. };
  550. static const char * const emac_gcc1_groups[] = {
  551. "gpio14",
  552. };
  553. static const char * const bimc_dte0_groups[] = {
  554. "gpio14", "gpio59",
  555. };
  556. static const char * const native_tsens_groups[] = {
  557. "gpio14",
  558. };
  559. static const char * const vsense_trigger_groups[] = {
  560. "gpio14",
  561. };
  562. static const char * const emac_gcc0_groups[] = {
  563. "gpio15",
  564. };
  565. static const char * const bimc_dte1_groups[] = {
  566. "gpio15", "gpio61",
  567. };
  568. static const char * const sec_mi2s_groups[] = {
  569. "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
  570. "gpio23",
  571. };
  572. static const char * const blsp_spi4_groups[] = {
  573. "gpio16", "gpio17", "gpio18", "gpio19", "gpio52", "gpio62", "gpio71",
  574. };
  575. static const char * const blsp_uart4_groups[] = {
  576. "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
  577. "gpio23",
  578. };
  579. static const char * const qdss_cti_groups[] = {
  580. "gpio16", "gpio16", "gpio17", "gpio17", "gpio22", "gpio22", "gpio23",
  581. "gpio23", "gpio54", "gpio54", "gpio55", "gpio55", "gpio59", "gpio60",
  582. "gpio94", "gpio94", "gpio95", "gpio95",
  583. };
  584. static const char * const blsp_i2c4_groups[] = {
  585. "gpio18", "gpio19", "gpio78", "gpio79",
  586. };
  587. static const char * const gcc_gp1_groups[] = {
  588. "gpio18",
  589. };
  590. static const char * const jitter_bist_groups[] = {
  591. "gpio19",
  592. };
  593. static const char * const gcc_gp2_groups[] = {
  594. "gpio19",
  595. };
  596. static const char * const ebi2_a_groups[] = {
  597. "gpio20",
  598. };
  599. static const char * const ebi2_lcd_groups[] = {
  600. "gpio21", "gpio22", "gpio23",
  601. };
  602. static const char * const pll_bist_groups[] = {
  603. "gpio22",
  604. };
  605. static const char * const adsp_ext_groups[] = {
  606. "gpio24", "gpio25",
  607. };
  608. static const char * const native_char_groups[] = {
  609. "gpio26",
  610. };
  611. static const char * const qlink0_wmss_groups[] = {
  612. "gpio28",
  613. };
  614. static const char * const native_char3_groups[] = {
  615. "gpio28",
  616. };
  617. static const char * const native_char2_groups[] = {
  618. "gpio29",
  619. };
  620. static const char * const native_tsense_groups[] = {
  621. "gpio29",
  622. };
  623. static const char * const nav_gpio_groups[] = {
  624. "gpio31", "gpio32", "gpio76",
  625. };
  626. static const char * const pll_ref_groups[] = {
  627. "gpio32",
  628. };
  629. static const char * const pa_indicator_groups[] = {
  630. "gpio33",
  631. };
  632. static const char * const native_char0_groups[] = {
  633. "gpio33",
  634. };
  635. static const char * const qlink0_en_groups[] = {
  636. "gpio34",
  637. };
  638. static const char * const qlink0_req_groups[] = {
  639. "gpio35",
  640. };
  641. static const char * const pll_test_groups[] = {
  642. "gpio35",
  643. };
  644. static const char * const cri_trng_groups[] = {
  645. "gpio36",
  646. };
  647. static const char * const dbg_out_groups[] = {
  648. "gpio36",
  649. };
  650. static const char * const prng_rosc_groups[] = {
  651. "gpio38",
  652. };
  653. static const char * const cri_trng0_groups[] = {
  654. "gpio40",
  655. };
  656. static const char * const cri_trng1_groups[] = {
  657. "gpio41",
  658. };
  659. static const char * const qdss_gpio_groups[] = {
  660. "gpio4", "gpio5", "gpio6", "gpio7",
  661. "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19",
  662. "gpio42", "gpio61", "gpio63", "gpio64", "gpio65", "gpio66",
  663. };
  664. static const char * const native_char1_groups[] = {
  665. "gpio42",
  666. };
  667. static const char * const coex_uart_groups[] = {
  668. "gpio44", "gpio45",
  669. };
  670. static const char * const spmi_coex_groups[] = {
  671. "gpio44", "gpio45",
  672. };
  673. static const struct msm_function sdx55_functions[] = {
  674. FUNCTION(adsp_ext),
  675. FUNCTION(atest),
  676. FUNCTION(audio_ref),
  677. FUNCTION(bimc_dte0),
  678. FUNCTION(bimc_dte1),
  679. FUNCTION(blsp_i2c1),
  680. FUNCTION(blsp_i2c2),
  681. FUNCTION(blsp_i2c3),
  682. FUNCTION(blsp_i2c4),
  683. FUNCTION(blsp_spi1),
  684. FUNCTION(blsp_spi2),
  685. FUNCTION(blsp_spi3),
  686. FUNCTION(blsp_spi4),
  687. FUNCTION(blsp_uart1),
  688. FUNCTION(blsp_uart2),
  689. FUNCTION(blsp_uart3),
  690. FUNCTION(blsp_uart4),
  691. FUNCTION(char_exec),
  692. FUNCTION(coex_uart),
  693. FUNCTION(coex_uart2),
  694. FUNCTION(cri_trng),
  695. FUNCTION(cri_trng0),
  696. FUNCTION(cri_trng1),
  697. FUNCTION(dbg_out),
  698. FUNCTION(ddr_bist),
  699. FUNCTION(ddr_pxi0),
  700. FUNCTION(ebi0_wrcdc),
  701. FUNCTION(ebi2_a),
  702. FUNCTION(ebi2_lcd),
  703. FUNCTION(emac_gcc0),
  704. FUNCTION(emac_gcc1),
  705. FUNCTION(emac_pps0),
  706. FUNCTION(emac_pps1),
  707. FUNCTION(ext_dbg),
  708. FUNCTION(gcc_gp1),
  709. FUNCTION(gcc_gp2),
  710. FUNCTION(gcc_gp3),
  711. FUNCTION(gcc_plltest),
  712. FUNCTION(gpio),
  713. FUNCTION(i2s_mclk),
  714. FUNCTION(jitter_bist),
  715. FUNCTION(ldo_en),
  716. FUNCTION(ldo_update),
  717. FUNCTION(mgpi_clk),
  718. FUNCTION(m_voc),
  719. FUNCTION(native_char),
  720. FUNCTION(native_char0),
  721. FUNCTION(native_char1),
  722. FUNCTION(native_char2),
  723. FUNCTION(native_char3),
  724. FUNCTION(native_tsens),
  725. FUNCTION(native_tsense),
  726. FUNCTION(nav_gpio),
  727. FUNCTION(pa_indicator),
  728. FUNCTION(pcie_clkreq),
  729. FUNCTION(pci_e),
  730. FUNCTION(pll_bist),
  731. FUNCTION(pll_ref),
  732. FUNCTION(pll_test),
  733. FUNCTION(pri_mi2s),
  734. FUNCTION(prng_rosc),
  735. FUNCTION(qdss_cti),
  736. FUNCTION(qdss_gpio),
  737. FUNCTION(qdss_stm),
  738. FUNCTION(qlink0_en),
  739. FUNCTION(qlink0_req),
  740. FUNCTION(qlink0_wmss),
  741. FUNCTION(qlink1_en),
  742. FUNCTION(qlink1_req),
  743. FUNCTION(qlink1_wmss),
  744. FUNCTION(spmi_coex),
  745. FUNCTION(sec_mi2s),
  746. FUNCTION(spmi_vgi),
  747. FUNCTION(tgu_ch0),
  748. FUNCTION(uim1_clk),
  749. FUNCTION(uim1_data),
  750. FUNCTION(uim1_present),
  751. FUNCTION(uim1_reset),
  752. FUNCTION(uim2_clk),
  753. FUNCTION(uim2_data),
  754. FUNCTION(uim2_present),
  755. FUNCTION(uim2_reset),
  756. FUNCTION(usb2phy_ac),
  757. FUNCTION(vsense_trigger),
  758. };
  759. /* Every pin is maintained as a single group, and missing or non-existing pin
  760. * would be maintained as dummy group to synchronize pin group index with
  761. * pin descriptor registered with pinctrl core.
  762. * Clients would not be able to request these dummy pin groups.
  763. */
  764. static const struct msm_pingroup sdx55_groups[] = {
  765. [0] = PINGROUP(0, uim2_data, blsp_uart1, qdss_stm, ebi0_wrcdc, _, _, _, _, _),
  766. [1] = PINGROUP(1, uim2_present, blsp_uart1, qdss_stm, _, _, _, _, _, _),
  767. [2] = PINGROUP(2, uim2_reset, blsp_uart1, blsp_i2c1, qdss_stm, ebi0_wrcdc, _, _, _, _),
  768. [3] = PINGROUP(3, uim2_clk, blsp_uart1, blsp_i2c1, qdss_stm, _, _, _, _, _),
  769. [4] = PINGROUP(4, blsp_spi2, blsp_uart2, _, qdss_stm, qdss_gpio, _, _, _, _),
  770. [5] = PINGROUP(5, blsp_spi2, blsp_uart2, _, qdss_stm, qdss_gpio, _, _, _, _),
  771. [6] = PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, char_exec, _, qdss_stm, qdss_gpio, _, _),
  772. [7] = PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, char_exec, _, qdss_stm, qdss_gpio, _, _),
  773. [8] = PINGROUP(8, pri_mi2s, blsp_spi3, blsp_uart3, ext_dbg, ldo_en, _, _, _, _),
  774. [9] = PINGROUP(9, pri_mi2s, blsp_spi3, blsp_uart3, ext_dbg, _, _, _, _, _),
  775. [10] = PINGROUP(10, pri_mi2s, blsp_spi3, blsp_uart3, blsp_i2c3, ext_dbg, _, _, _, _),
  776. [11] = PINGROUP(11, pri_mi2s, blsp_spi3, blsp_uart3, blsp_i2c3, ext_dbg, gcc_gp3, _, _, _),
  777. [12] = PINGROUP(12, pri_mi2s, _, qdss_stm, qdss_gpio, _, _, _, _, _),
  778. [13] = PINGROUP(13, pri_mi2s, _, qdss_stm, qdss_gpio, _, _, _, _, _),
  779. [14] = PINGROUP(14, pri_mi2s, emac_gcc1, _, _, qdss_stm, qdss_gpio, bimc_dte0, native_tsens, vsense_trigger),
  780. [15] = PINGROUP(15, pri_mi2s, emac_gcc0, _, _, qdss_stm, qdss_gpio, bimc_dte1, _, _),
  781. [16] = PINGROUP(16, sec_mi2s, blsp_spi4, blsp_uart4, qdss_cti, qdss_cti, _, _, qdss_stm, qdss_gpio),
  782. [17] = PINGROUP(17, sec_mi2s, blsp_spi4, blsp_uart4, qdss_cti, qdss_cti, _, qdss_stm, qdss_gpio, _),
  783. [18] = PINGROUP(18, sec_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, gcc_gp1, qdss_stm, qdss_gpio, _, _),
  784. [19] = PINGROUP(19, sec_mi2s, blsp_spi4, blsp_uart4, blsp_i2c4, jitter_bist, gcc_gp2, _, qdss_stm, qdss_gpio),
  785. [20] = PINGROUP(20, sec_mi2s, ebi2_a, blsp_uart1, blsp_uart4, qdss_stm, _, _, _, _),
  786. [21] = PINGROUP(21, sec_mi2s, ebi2_lcd, blsp_uart1, blsp_uart4, _, qdss_stm, _, _, _),
  787. [22] = PINGROUP(22, sec_mi2s, ebi2_lcd, blsp_uart1, qdss_cti, qdss_cti, blsp_uart4, pll_bist, _, qdss_stm),
  788. [23] = PINGROUP(23, sec_mi2s, ebi2_lcd, qdss_cti, qdss_cti, blsp_uart1, blsp_uart4, qdss_stm, _, _),
  789. [24] = PINGROUP(24, adsp_ext, _, _, _, _, _, _, _, _),
  790. [25] = PINGROUP(25, adsp_ext, _, _, _, _, _, _, _, _),
  791. [26] = PINGROUP(26, _, _, _, native_char, _, _, _, _, _),
  792. [27] = PINGROUP(27, _, _, _, _, _, _, _, _, _),
  793. [28] = PINGROUP(28, qlink0_wmss, _, native_char3, _, _, _, _, _, _),
  794. [29] = PINGROUP(29, _, _, _, native_char2, native_tsense, _, _, _, _),
  795. [30] = PINGROUP(30, _, _, _, _, _, _, _, _, _),
  796. [31] = PINGROUP(31, nav_gpio, _, _, _, _, _, _, _, _),
  797. [32] = PINGROUP(32, nav_gpio, pll_ref, _, _, _, _, _, _, _),
  798. [33] = PINGROUP(33, _, pa_indicator, native_char0, _, _, _, _, _, _),
  799. [34] = PINGROUP(34, qlink0_en, _, _, _, _, _, _, _, _),
  800. [35] = PINGROUP(35, qlink0_req, pll_test, _, _, _, _, _, _, _),
  801. [36] = PINGROUP(36, _, _, cri_trng, dbg_out, _, _, _, _, _),
  802. [37] = PINGROUP(37, _, _, _, _, _, _, _, _, _),
  803. [38] = PINGROUP(38, _, _, prng_rosc, _, _, _, _, _, _),
  804. [39] = PINGROUP(39, _, _, _, _, _, _, _, _, _),
  805. [40] = PINGROUP(40, _, _, cri_trng0, _, _, _, _, _, _),
  806. [41] = PINGROUP(41, _, _, cri_trng1, _, _, _, _, _, _),
  807. [42] = PINGROUP(42, _, qdss_gpio, native_char1, _, _, _, _, _, _),
  808. [43] = PINGROUP(43, _, _, _, _, _, _, _, _, _),
  809. [44] = PINGROUP(44, coex_uart, spmi_coex, _, qdss_stm, _, _, _, _, _),
  810. [45] = PINGROUP(45, coex_uart, spmi_coex, qdss_stm, ddr_pxi0, _, _, _, _, _),
  811. [46] = PINGROUP(46, m_voc, ddr_bist, ddr_pxi0, _, _, _, _, _, _),
  812. [47] = PINGROUP(47, ddr_bist, _, _, _, _, _, _, _, _),
  813. [48] = PINGROUP(48, m_voc, ddr_bist, _, _, _, _, _, _, _),
  814. [49] = PINGROUP(49, m_voc, ddr_bist, _, _, _, _, _, _, _),
  815. [50] = PINGROUP(50, _, _, _, _, _, _, _, _, _),
  816. [51] = PINGROUP(51, _, _, _, _, _, _, _, _, _),
  817. [52] = PINGROUP(52, blsp_spi2, blsp_spi1, blsp_spi3, blsp_spi4, _, _, qdss_stm, _, _),
  818. [53] = PINGROUP(53, pci_e, _, _, qdss_stm, _, _, _, _, _),
  819. [54] = PINGROUP(54, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
  820. [55] = PINGROUP(55, qdss_cti, qdss_cti, tgu_ch0, _, _, _, _, _, _),
  821. [56] = PINGROUP(56, pcie_clkreq, _, qdss_stm, _, _, _, _, _, _),
  822. [57] = PINGROUP(57, _, qdss_stm, _, _, _, _, _, _, _),
  823. [58] = PINGROUP(58, _, _, _, _, _, _, _, _, _),
  824. [59] = PINGROUP(59, qdss_cti, m_voc, bimc_dte0, _, _, _, _, _, _),
  825. [60] = PINGROUP(60, qdss_cti, _, m_voc, _, _, _, _, _, _),
  826. [61] = PINGROUP(61, mgpi_clk, qdss_stm, qdss_gpio, bimc_dte1, _, _, _, _, _),
  827. [62] = PINGROUP(62, i2s_mclk, audio_ref, blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, ldo_update, qdss_stm, _),
  828. [63] = PINGROUP(63, blsp_uart2, _, qdss_stm, qdss_gpio, atest, _, _, _, _),
  829. [64] = PINGROUP(64, blsp_uart2, qdss_stm, qdss_gpio, atest, _, _, _, _, _),
  830. [65] = PINGROUP(65, blsp_uart2, blsp_i2c2, _, qdss_stm, qdss_gpio, atest, _, _, _),
  831. [66] = PINGROUP(66, blsp_uart2, blsp_i2c2, qdss_stm, qdss_gpio, atest, _, _, _, _),
  832. [67] = PINGROUP(67, uim1_data, atest, _, _, _, _, _, _, _),
  833. [68] = PINGROUP(68, uim1_present, _, _, _, _, _, _, _, _),
  834. [69] = PINGROUP(69, uim1_reset, _, _, _, _, _, _, _, _),
  835. [70] = PINGROUP(70, uim1_clk, _, _, _, _, _, _, _, _),
  836. [71] = PINGROUP(71, mgpi_clk, blsp_spi1, blsp_spi2, blsp_spi3, blsp_spi4, _, _, _, _),
  837. [72] = PINGROUP(72, qlink1_en, _, _, _, _, _, _, _, _),
  838. [73] = PINGROUP(73, qlink1_req, _, _, _, _, _, _, _, _),
  839. [74] = PINGROUP(74, qlink1_wmss, _, _, _, _, _, _, _, _),
  840. [75] = PINGROUP(75, coex_uart2, _, _, _, _, _, _, _, _),
  841. [76] = PINGROUP(76, coex_uart2, nav_gpio, _, _, _, _, _, _, _),
  842. [77] = PINGROUP(77, _, _, _, _, _, _, _, _, _),
  843. [78] = PINGROUP(78, spmi_vgi, blsp_i2c4, _, _, _, _, _, _, _),
  844. [79] = PINGROUP(79, spmi_vgi, blsp_i2c4, _, _, _, _, _, _, _),
  845. [80] = PINGROUP(80, _, blsp_spi1, _, _, _, _, _, _, _),
  846. [81] = PINGROUP(81, _, blsp_spi1, _, gcc_plltest, _, _, _, _, _),
  847. [82] = PINGROUP(82, _, blsp_spi1, _, blsp_i2c1, gcc_plltest, _, _, _, _),
  848. [83] = PINGROUP(83, _, blsp_spi1, _, blsp_i2c1, _, _, _, _, _),
  849. [84] = PINGROUP(84, _, _, _, _, _, _, _, _, _),
  850. [85] = PINGROUP(85, _, _, _, _, _, _, _, _, _),
  851. [86] = PINGROUP(86, _, _, _, _, _, _, _, _, _),
  852. [87] = PINGROUP(87, _, _, _, _, _, _, _, _, _),
  853. [88] = PINGROUP(88, _, _, _, _, _, _, _, _, _),
  854. [89] = PINGROUP(89, _, _, _, _, _, _, _, _, _),
  855. [90] = PINGROUP(90, _, _, _, _, _, _, _, _, _),
  856. [91] = PINGROUP(91, _, _, _, _, _, _, _, _, _),
  857. [92] = PINGROUP(92, _, _, _, _, _, _, _, _, _),
  858. [93] = PINGROUP(93, _, _, usb2phy_ac, _, _, _, _, _, _),
  859. [94] = PINGROUP(94, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
  860. [95] = PINGROUP(95, qdss_cti, qdss_cti, emac_pps1, _, _, _, _, _, _),
  861. [96] = PINGROUP(96, _, _, _, _, _, _, _, _, _),
  862. [97] = PINGROUP(97, _, _, _, _, _, _, _, _, _),
  863. [98] = PINGROUP(98, _, _, _, _, _, _, _, _, _),
  864. [99] = PINGROUP(99, _, _, _, _, _, _, _, _, _),
  865. [100] = PINGROUP(100, _, _, _, _, _, _, _, _, _),
  866. [101] = PINGROUP(101, _, _, _, _, _, _, _, _, _),
  867. [102] = PINGROUP(102, _, _, _, _, _, _, _, _, _),
  868. [103] = PINGROUP(103, _, _, _, _, _, _, _, _, _),
  869. [104] = PINGROUP(104, _, _, _, _, _, _, _, _, _),
  870. [105] = PINGROUP(105, _, _, _, _, _, _, _, _, _),
  871. [106] = PINGROUP(106, emac_pps0, _, _, _, _, _, _, _, _),
  872. [107] = PINGROUP(107, _, _, _, _, _, _, _, _, _),
  873. [109] = SDC_PINGROUP(sdc1_rclk, 0x9a000, 15, 0),
  874. [110] = SDC_PINGROUP(sdc1_clk, 0x9a000, 13, 6),
  875. [111] = SDC_PINGROUP(sdc1_cmd, 0x9a000, 11, 3),
  876. [112] = SDC_PINGROUP(sdc1_data, 0x9a000, 9, 0),
  877. };
  878. static const struct msm_pinctrl_soc_data sdx55_pinctrl = {
  879. .pins = sdx55_pins,
  880. .npins = ARRAY_SIZE(sdx55_pins),
  881. .functions = sdx55_functions,
  882. .nfunctions = ARRAY_SIZE(sdx55_functions),
  883. .groups = sdx55_groups,
  884. .ngroups = ARRAY_SIZE(sdx55_groups),
  885. .ngpios = 108,
  886. };
  887. static int sdx55_pinctrl_probe(struct platform_device *pdev)
  888. {
  889. return msm_pinctrl_probe(pdev, &sdx55_pinctrl);
  890. }
  891. static const struct of_device_id sdx55_pinctrl_of_match[] = {
  892. { .compatible = "qcom,sdx55-pinctrl", },
  893. { },
  894. };
  895. static struct platform_driver sdx55_pinctrl_driver = {
  896. .driver = {
  897. .name = "sdx55-pinctrl",
  898. .of_match_table = sdx55_pinctrl_of_match,
  899. },
  900. .probe = sdx55_pinctrl_probe,
  901. .remove = msm_pinctrl_remove,
  902. };
  903. static int __init sdx55_pinctrl_init(void)
  904. {
  905. return platform_driver_register(&sdx55_pinctrl_driver);
  906. }
  907. arch_initcall(sdx55_pinctrl_init);
  908. static void __exit sdx55_pinctrl_exit(void)
  909. {
  910. platform_driver_unregister(&sdx55_pinctrl_driver);
  911. }
  912. module_exit(sdx55_pinctrl_exit);
  913. MODULE_DESCRIPTION("QTI sdx55 pinctrl driver");
  914. MODULE_LICENSE("GPL v2");
  915. MODULE_DEVICE_TABLE(of, sdx55_pinctrl_of_match);