pinctrl-sdx55.c 29 KB

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