pinctrl-sm6115.c 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2019, 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. static const char * const sm6115_tiles[] = {
  10. "south",
  11. "east",
  12. "west"
  13. };
  14. enum {
  15. SOUTH,
  16. EAST,
  17. WEST
  18. };
  19. #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  20. { \
  21. .grp = PINCTRL_PINGROUP("gpio" #id, \
  22. gpio##id##_pins, \
  23. ARRAY_SIZE(gpio##id##_pins)), \
  24. .funcs = (int[]){ \
  25. msm_mux_gpio, /* gpio mode */ \
  26. msm_mux_##f1, \
  27. msm_mux_##f2, \
  28. msm_mux_##f3, \
  29. msm_mux_##f4, \
  30. msm_mux_##f5, \
  31. msm_mux_##f6, \
  32. msm_mux_##f7, \
  33. msm_mux_##f8, \
  34. msm_mux_##f9 \
  35. }, \
  36. .nfuncs = 10, \
  37. .ctl_reg = 0x1000 * id, \
  38. .io_reg = 0x4 + 0x1000 * id, \
  39. .intr_cfg_reg = 0x8 + 0x1000 * id, \
  40. .intr_status_reg = 0xc + 0x1000 * id, \
  41. .intr_target_reg = 0x8 + 0x1000 * id, \
  42. .tile = _tile, \
  43. .mux_bit = 2, \
  44. .pull_bit = 0, \
  45. .drv_bit = 6, \
  46. .oe_bit = 9, \
  47. .in_bit = 0, \
  48. .out_bit = 1, \
  49. .intr_enable_bit = 0, \
  50. .intr_status_bit = 0, \
  51. .intr_target_bit = 5, \
  52. .intr_target_kpss_val = 3, \
  53. .intr_raw_status_bit = 4, \
  54. .intr_polarity_bit = 1, \
  55. .intr_detection_bit = 2, \
  56. .intr_detection_width = 2, \
  57. }
  58. #define SDC_QDSD_PINGROUP(pg_name, _tile, ctl, pull, drv) \
  59. { \
  60. .grp = PINCTRL_PINGROUP(#pg_name, \
  61. pg_name##_pins, \
  62. ARRAY_SIZE(pg_name##_pins)), \
  63. .ctl_reg = ctl, \
  64. .io_reg = 0, \
  65. .intr_cfg_reg = 0, \
  66. .intr_status_reg = 0, \
  67. .intr_target_reg = 0, \
  68. .tile = _tile, \
  69. .mux_bit = -1, \
  70. .pull_bit = pull, \
  71. .drv_bit = drv, \
  72. .oe_bit = -1, \
  73. .in_bit = -1, \
  74. .out_bit = -1, \
  75. .intr_enable_bit = -1, \
  76. .intr_status_bit = -1, \
  77. .intr_target_bit = -1, \
  78. .intr_raw_status_bit = -1, \
  79. .intr_polarity_bit = -1, \
  80. .intr_detection_bit = -1, \
  81. .intr_detection_width = -1, \
  82. }
  83. #define UFS_RESET(pg_name, offset) \
  84. { \
  85. .grp = PINCTRL_PINGROUP(#pg_name, \
  86. pg_name##_pins, \
  87. ARRAY_SIZE(pg_name##_pins)), \
  88. .ctl_reg = offset, \
  89. .io_reg = offset + 0x4, \
  90. .intr_cfg_reg = 0, \
  91. .intr_status_reg = 0, \
  92. .intr_target_reg = 0, \
  93. .tile = WEST, \
  94. .mux_bit = -1, \
  95. .pull_bit = 3, \
  96. .drv_bit = 0, \
  97. .oe_bit = -1, \
  98. .in_bit = -1, \
  99. .out_bit = 0, \
  100. .intr_enable_bit = -1, \
  101. .intr_status_bit = -1, \
  102. .intr_target_bit = -1, \
  103. .intr_raw_status_bit = -1, \
  104. .intr_polarity_bit = -1, \
  105. .intr_detection_bit = -1, \
  106. .intr_detection_width = -1, \
  107. }
  108. static const struct pinctrl_pin_desc sm6115_pins[] = {
  109. PINCTRL_PIN(0, "GPIO_0"),
  110. PINCTRL_PIN(1, "GPIO_1"),
  111. PINCTRL_PIN(2, "GPIO_2"),
  112. PINCTRL_PIN(3, "GPIO_3"),
  113. PINCTRL_PIN(4, "GPIO_4"),
  114. PINCTRL_PIN(5, "GPIO_5"),
  115. PINCTRL_PIN(6, "GPIO_6"),
  116. PINCTRL_PIN(7, "GPIO_7"),
  117. PINCTRL_PIN(8, "GPIO_8"),
  118. PINCTRL_PIN(9, "GPIO_9"),
  119. PINCTRL_PIN(10, "GPIO_10"),
  120. PINCTRL_PIN(11, "GPIO_11"),
  121. PINCTRL_PIN(12, "GPIO_12"),
  122. PINCTRL_PIN(13, "GPIO_13"),
  123. PINCTRL_PIN(14, "GPIO_14"),
  124. PINCTRL_PIN(15, "GPIO_15"),
  125. PINCTRL_PIN(16, "GPIO_16"),
  126. PINCTRL_PIN(17, "GPIO_17"),
  127. PINCTRL_PIN(18, "GPIO_18"),
  128. PINCTRL_PIN(19, "GPIO_19"),
  129. PINCTRL_PIN(20, "GPIO_20"),
  130. PINCTRL_PIN(21, "GPIO_21"),
  131. PINCTRL_PIN(22, "GPIO_22"),
  132. PINCTRL_PIN(23, "GPIO_23"),
  133. PINCTRL_PIN(24, "GPIO_24"),
  134. PINCTRL_PIN(25, "GPIO_25"),
  135. PINCTRL_PIN(26, "GPIO_26"),
  136. PINCTRL_PIN(27, "GPIO_27"),
  137. PINCTRL_PIN(28, "GPIO_28"),
  138. PINCTRL_PIN(29, "GPIO_29"),
  139. PINCTRL_PIN(30, "GPIO_30"),
  140. PINCTRL_PIN(31, "GPIO_31"),
  141. PINCTRL_PIN(32, "GPIO_32"),
  142. PINCTRL_PIN(33, "GPIO_33"),
  143. PINCTRL_PIN(34, "GPIO_34"),
  144. PINCTRL_PIN(35, "GPIO_35"),
  145. PINCTRL_PIN(36, "GPIO_36"),
  146. PINCTRL_PIN(37, "GPIO_37"),
  147. PINCTRL_PIN(38, "GPIO_38"),
  148. PINCTRL_PIN(39, "GPIO_39"),
  149. PINCTRL_PIN(40, "GPIO_40"),
  150. PINCTRL_PIN(41, "GPIO_41"),
  151. PINCTRL_PIN(42, "GPIO_42"),
  152. PINCTRL_PIN(43, "GPIO_43"),
  153. PINCTRL_PIN(44, "GPIO_44"),
  154. PINCTRL_PIN(45, "GPIO_45"),
  155. PINCTRL_PIN(46, "GPIO_46"),
  156. PINCTRL_PIN(47, "GPIO_47"),
  157. PINCTRL_PIN(48, "GPIO_48"),
  158. PINCTRL_PIN(49, "GPIO_49"),
  159. PINCTRL_PIN(50, "GPIO_50"),
  160. PINCTRL_PIN(51, "GPIO_51"),
  161. PINCTRL_PIN(52, "GPIO_52"),
  162. PINCTRL_PIN(53, "GPIO_53"),
  163. PINCTRL_PIN(54, "GPIO_54"),
  164. PINCTRL_PIN(55, "GPIO_55"),
  165. PINCTRL_PIN(56, "GPIO_56"),
  166. PINCTRL_PIN(57, "GPIO_57"),
  167. PINCTRL_PIN(58, "GPIO_58"),
  168. PINCTRL_PIN(59, "GPIO_59"),
  169. PINCTRL_PIN(60, "GPIO_60"),
  170. PINCTRL_PIN(61, "GPIO_61"),
  171. PINCTRL_PIN(62, "GPIO_62"),
  172. PINCTRL_PIN(63, "GPIO_63"),
  173. PINCTRL_PIN(64, "GPIO_64"),
  174. PINCTRL_PIN(65, "GPIO_65"),
  175. PINCTRL_PIN(66, "GPIO_66"),
  176. PINCTRL_PIN(67, "GPIO_67"),
  177. PINCTRL_PIN(68, "GPIO_68"),
  178. PINCTRL_PIN(69, "GPIO_69"),
  179. PINCTRL_PIN(70, "GPIO_70"),
  180. PINCTRL_PIN(71, "GPIO_71"),
  181. PINCTRL_PIN(72, "GPIO_72"),
  182. PINCTRL_PIN(73, "GPIO_73"),
  183. PINCTRL_PIN(74, "GPIO_74"),
  184. PINCTRL_PIN(75, "GPIO_75"),
  185. PINCTRL_PIN(76, "GPIO_76"),
  186. PINCTRL_PIN(77, "GPIO_77"),
  187. PINCTRL_PIN(78, "GPIO_78"),
  188. PINCTRL_PIN(79, "GPIO_79"),
  189. PINCTRL_PIN(80, "GPIO_80"),
  190. PINCTRL_PIN(81, "GPIO_81"),
  191. PINCTRL_PIN(82, "GPIO_82"),
  192. PINCTRL_PIN(83, "GPIO_83"),
  193. PINCTRL_PIN(84, "GPIO_84"),
  194. PINCTRL_PIN(85, "GPIO_85"),
  195. PINCTRL_PIN(86, "GPIO_86"),
  196. PINCTRL_PIN(87, "GPIO_87"),
  197. PINCTRL_PIN(88, "GPIO_88"),
  198. PINCTRL_PIN(89, "GPIO_89"),
  199. PINCTRL_PIN(90, "GPIO_90"),
  200. PINCTRL_PIN(91, "GPIO_91"),
  201. PINCTRL_PIN(92, "GPIO_92"),
  202. PINCTRL_PIN(93, "GPIO_93"),
  203. PINCTRL_PIN(94, "GPIO_94"),
  204. PINCTRL_PIN(95, "GPIO_95"),
  205. PINCTRL_PIN(96, "GPIO_96"),
  206. PINCTRL_PIN(97, "GPIO_97"),
  207. PINCTRL_PIN(98, "GPIO_98"),
  208. PINCTRL_PIN(99, "GPIO_99"),
  209. PINCTRL_PIN(100, "GPIO_100"),
  210. PINCTRL_PIN(101, "GPIO_101"),
  211. PINCTRL_PIN(102, "GPIO_102"),
  212. PINCTRL_PIN(103, "GPIO_103"),
  213. PINCTRL_PIN(104, "GPIO_104"),
  214. PINCTRL_PIN(105, "GPIO_105"),
  215. PINCTRL_PIN(106, "GPIO_106"),
  216. PINCTRL_PIN(107, "GPIO_107"),
  217. PINCTRL_PIN(108, "GPIO_108"),
  218. PINCTRL_PIN(109, "GPIO_109"),
  219. PINCTRL_PIN(110, "GPIO_110"),
  220. PINCTRL_PIN(111, "GPIO_111"),
  221. PINCTRL_PIN(112, "GPIO_112"),
  222. PINCTRL_PIN(113, "UFS_RESET"),
  223. PINCTRL_PIN(114, "SDC1_RCLK"),
  224. PINCTRL_PIN(115, "SDC1_CLK"),
  225. PINCTRL_PIN(116, "SDC1_CMD"),
  226. PINCTRL_PIN(117, "SDC1_DATA"),
  227. PINCTRL_PIN(118, "SDC2_CLK"),
  228. PINCTRL_PIN(119, "SDC2_CMD"),
  229. PINCTRL_PIN(120, "SDC2_DATA"),
  230. };
  231. #define DECLARE_MSM_GPIO_PINS(pin) \
  232. static const unsigned int gpio##pin##_pins[] = { pin }
  233. DECLARE_MSM_GPIO_PINS(0);
  234. DECLARE_MSM_GPIO_PINS(1);
  235. DECLARE_MSM_GPIO_PINS(2);
  236. DECLARE_MSM_GPIO_PINS(3);
  237. DECLARE_MSM_GPIO_PINS(4);
  238. DECLARE_MSM_GPIO_PINS(5);
  239. DECLARE_MSM_GPIO_PINS(6);
  240. DECLARE_MSM_GPIO_PINS(7);
  241. DECLARE_MSM_GPIO_PINS(8);
  242. DECLARE_MSM_GPIO_PINS(9);
  243. DECLARE_MSM_GPIO_PINS(10);
  244. DECLARE_MSM_GPIO_PINS(11);
  245. DECLARE_MSM_GPIO_PINS(12);
  246. DECLARE_MSM_GPIO_PINS(13);
  247. DECLARE_MSM_GPIO_PINS(14);
  248. DECLARE_MSM_GPIO_PINS(15);
  249. DECLARE_MSM_GPIO_PINS(16);
  250. DECLARE_MSM_GPIO_PINS(17);
  251. DECLARE_MSM_GPIO_PINS(18);
  252. DECLARE_MSM_GPIO_PINS(19);
  253. DECLARE_MSM_GPIO_PINS(20);
  254. DECLARE_MSM_GPIO_PINS(21);
  255. DECLARE_MSM_GPIO_PINS(22);
  256. DECLARE_MSM_GPIO_PINS(23);
  257. DECLARE_MSM_GPIO_PINS(24);
  258. DECLARE_MSM_GPIO_PINS(25);
  259. DECLARE_MSM_GPIO_PINS(26);
  260. DECLARE_MSM_GPIO_PINS(27);
  261. DECLARE_MSM_GPIO_PINS(28);
  262. DECLARE_MSM_GPIO_PINS(29);
  263. DECLARE_MSM_GPIO_PINS(30);
  264. DECLARE_MSM_GPIO_PINS(31);
  265. DECLARE_MSM_GPIO_PINS(32);
  266. DECLARE_MSM_GPIO_PINS(33);
  267. DECLARE_MSM_GPIO_PINS(34);
  268. DECLARE_MSM_GPIO_PINS(35);
  269. DECLARE_MSM_GPIO_PINS(36);
  270. DECLARE_MSM_GPIO_PINS(37);
  271. DECLARE_MSM_GPIO_PINS(38);
  272. DECLARE_MSM_GPIO_PINS(39);
  273. DECLARE_MSM_GPIO_PINS(40);
  274. DECLARE_MSM_GPIO_PINS(41);
  275. DECLARE_MSM_GPIO_PINS(42);
  276. DECLARE_MSM_GPIO_PINS(43);
  277. DECLARE_MSM_GPIO_PINS(44);
  278. DECLARE_MSM_GPIO_PINS(45);
  279. DECLARE_MSM_GPIO_PINS(46);
  280. DECLARE_MSM_GPIO_PINS(47);
  281. DECLARE_MSM_GPIO_PINS(48);
  282. DECLARE_MSM_GPIO_PINS(49);
  283. DECLARE_MSM_GPIO_PINS(50);
  284. DECLARE_MSM_GPIO_PINS(51);
  285. DECLARE_MSM_GPIO_PINS(52);
  286. DECLARE_MSM_GPIO_PINS(53);
  287. DECLARE_MSM_GPIO_PINS(54);
  288. DECLARE_MSM_GPIO_PINS(55);
  289. DECLARE_MSM_GPIO_PINS(56);
  290. DECLARE_MSM_GPIO_PINS(57);
  291. DECLARE_MSM_GPIO_PINS(58);
  292. DECLARE_MSM_GPIO_PINS(59);
  293. DECLARE_MSM_GPIO_PINS(60);
  294. DECLARE_MSM_GPIO_PINS(61);
  295. DECLARE_MSM_GPIO_PINS(62);
  296. DECLARE_MSM_GPIO_PINS(63);
  297. DECLARE_MSM_GPIO_PINS(64);
  298. DECLARE_MSM_GPIO_PINS(65);
  299. DECLARE_MSM_GPIO_PINS(66);
  300. DECLARE_MSM_GPIO_PINS(67);
  301. DECLARE_MSM_GPIO_PINS(68);
  302. DECLARE_MSM_GPIO_PINS(69);
  303. DECLARE_MSM_GPIO_PINS(70);
  304. DECLARE_MSM_GPIO_PINS(71);
  305. DECLARE_MSM_GPIO_PINS(72);
  306. DECLARE_MSM_GPIO_PINS(73);
  307. DECLARE_MSM_GPIO_PINS(74);
  308. DECLARE_MSM_GPIO_PINS(75);
  309. DECLARE_MSM_GPIO_PINS(76);
  310. DECLARE_MSM_GPIO_PINS(77);
  311. DECLARE_MSM_GPIO_PINS(78);
  312. DECLARE_MSM_GPIO_PINS(79);
  313. DECLARE_MSM_GPIO_PINS(80);
  314. DECLARE_MSM_GPIO_PINS(81);
  315. DECLARE_MSM_GPIO_PINS(82);
  316. DECLARE_MSM_GPIO_PINS(83);
  317. DECLARE_MSM_GPIO_PINS(84);
  318. DECLARE_MSM_GPIO_PINS(85);
  319. DECLARE_MSM_GPIO_PINS(86);
  320. DECLARE_MSM_GPIO_PINS(87);
  321. DECLARE_MSM_GPIO_PINS(88);
  322. DECLARE_MSM_GPIO_PINS(89);
  323. DECLARE_MSM_GPIO_PINS(90);
  324. DECLARE_MSM_GPIO_PINS(91);
  325. DECLARE_MSM_GPIO_PINS(92);
  326. DECLARE_MSM_GPIO_PINS(93);
  327. DECLARE_MSM_GPIO_PINS(94);
  328. DECLARE_MSM_GPIO_PINS(95);
  329. DECLARE_MSM_GPIO_PINS(96);
  330. DECLARE_MSM_GPIO_PINS(97);
  331. DECLARE_MSM_GPIO_PINS(98);
  332. DECLARE_MSM_GPIO_PINS(99);
  333. DECLARE_MSM_GPIO_PINS(100);
  334. DECLARE_MSM_GPIO_PINS(101);
  335. DECLARE_MSM_GPIO_PINS(102);
  336. DECLARE_MSM_GPIO_PINS(103);
  337. DECLARE_MSM_GPIO_PINS(104);
  338. DECLARE_MSM_GPIO_PINS(105);
  339. DECLARE_MSM_GPIO_PINS(106);
  340. DECLARE_MSM_GPIO_PINS(107);
  341. DECLARE_MSM_GPIO_PINS(108);
  342. DECLARE_MSM_GPIO_PINS(109);
  343. DECLARE_MSM_GPIO_PINS(110);
  344. DECLARE_MSM_GPIO_PINS(111);
  345. DECLARE_MSM_GPIO_PINS(112);
  346. static const unsigned int ufs_reset_pins[] = { 113 };
  347. static const unsigned int sdc1_rclk_pins[] = { 114 };
  348. static const unsigned int sdc1_clk_pins[] = { 115 };
  349. static const unsigned int sdc1_cmd_pins[] = { 116 };
  350. static const unsigned int sdc1_data_pins[] = { 117 };
  351. static const unsigned int sdc2_clk_pins[] = { 118 };
  352. static const unsigned int sdc2_cmd_pins[] = { 119 };
  353. static const unsigned int sdc2_data_pins[] = { 120 };
  354. enum sm6115_functions {
  355. msm_mux_adsp_ext,
  356. msm_mux_agera_pll,
  357. msm_mux_atest,
  358. msm_mux_cam_mclk,
  359. msm_mux_cci_async,
  360. msm_mux_cci_i2c,
  361. msm_mux_cci_timer,
  362. msm_mux_cri_trng,
  363. msm_mux_dac_calib,
  364. msm_mux_dbg_out,
  365. msm_mux_ddr_bist,
  366. msm_mux_ddr_pxi0,
  367. msm_mux_ddr_pxi1,
  368. msm_mux_ddr_pxi2,
  369. msm_mux_ddr_pxi3,
  370. msm_mux_gcc_gp1,
  371. msm_mux_gcc_gp2,
  372. msm_mux_gcc_gp3,
  373. msm_mux_gpio,
  374. msm_mux_gp_pdm0,
  375. msm_mux_gp_pdm1,
  376. msm_mux_gp_pdm2,
  377. msm_mux_gsm0_tx,
  378. msm_mux_gsm1_tx,
  379. msm_mux_jitter_bist,
  380. msm_mux_mdp_vsync,
  381. msm_mux_mdp_vsync_out_0,
  382. msm_mux_mdp_vsync_out_1,
  383. msm_mux_mpm_pwr,
  384. msm_mux_mss_lte,
  385. msm_mux_m_voc,
  386. msm_mux_nav_gpio,
  387. msm_mux_pa_indicator,
  388. msm_mux_pbs,
  389. msm_mux_pbs_out,
  390. msm_mux_phase_flag,
  391. msm_mux_pll_bist,
  392. msm_mux_pll_bypassnl,
  393. msm_mux_pll_reset,
  394. msm_mux_prng_rosc,
  395. msm_mux_qdss_cti,
  396. msm_mux_qdss_gpio,
  397. msm_mux_qup0,
  398. msm_mux_qup1,
  399. msm_mux_qup2,
  400. msm_mux_qup3,
  401. msm_mux_qup4,
  402. msm_mux_qup5,
  403. msm_mux_sdc1_tb,
  404. msm_mux_sdc2_tb,
  405. msm_mux_sd_write,
  406. msm_mux_ssbi_wtr1,
  407. msm_mux_tgu,
  408. msm_mux_tsense_pwm,
  409. msm_mux_uim1_clk,
  410. msm_mux_uim1_data,
  411. msm_mux_uim1_present,
  412. msm_mux_uim1_reset,
  413. msm_mux_uim2_clk,
  414. msm_mux_uim2_data,
  415. msm_mux_uim2_present,
  416. msm_mux_uim2_reset,
  417. msm_mux_usb_phy,
  418. msm_mux_vfr_1,
  419. msm_mux_vsense_trigger,
  420. msm_mux_wlan1_adc0,
  421. msm_mux_wlan1_adc1,
  422. msm_mux__,
  423. };
  424. static const char * const qup0_groups[] = {
  425. "gpio0", "gpio1", "gpio2", "gpio3", "gpio82", "gpio86",
  426. };
  427. static const char * const gpio_groups[] = {
  428. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  429. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  430. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  431. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  432. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  433. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  434. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  435. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  436. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  437. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  438. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  439. "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
  440. "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
  441. "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
  442. "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  443. "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
  444. "gpio111", "gpio112",
  445. };
  446. static const char * const ddr_bist_groups[] = {
  447. "gpio0", "gpio1", "gpio2", "gpio3",
  448. };
  449. static const char * const phase_flag_groups[] = {
  450. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
  451. "gpio14", "gpio15", "gpio16", "gpio17", "gpio22", "gpio23", "gpio24",
  452. "gpio25", "gpio26", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33",
  453. "gpio35", "gpio36", "gpio43", "gpio44", "gpio45", "gpio63", "gpio64",
  454. "gpio102", "gpio103", "gpio104", "gpio105",
  455. };
  456. static const char * const qdss_gpio_groups[] = {
  457. "gpio0", "gpio1", "gpio2", "gpio3", "gpio8", "gpio9", "gpio10",
  458. "gpio11", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19",
  459. "gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26",
  460. "gpio47", "gpio48", "gpio69", "gpio70", "gpio87", "gpio90", "gpio91",
  461. "gpio94", "gpio95", "gpio104", "gpio105", "gpio106", "gpio107",
  462. "gpio109", "gpio110",
  463. };
  464. static const char * const atest_groups[] = {
  465. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
  466. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio29", "gpio30",
  467. "gpio31", "gpio32", "gpio33", "gpio86", "gpio87", "gpio88", "gpio89",
  468. "gpio100", "gpio101",
  469. };
  470. static const char * const mpm_pwr_groups[] = {
  471. "gpio1",
  472. };
  473. static const char * const m_voc_groups[] = {
  474. "gpio0",
  475. };
  476. static const char * const dac_calib_groups[] = {
  477. "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio14", "gpio15",
  478. "gpio16", "gpio17", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26",
  479. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio80", "gpio81",
  480. "gpio82", "gpio102", "gpio103", "gpio104", "gpio105"
  481. };
  482. static const char * const qup1_groups[] = {
  483. "gpio4", "gpio5", "gpio69", "gpio70",
  484. };
  485. static const char * const cri_trng_groups[] = {
  486. "gpio4", "gpio5", "gpio18",
  487. };
  488. static const char * const qup2_groups[] = {
  489. "gpio6", "gpio7", "gpio71", "gpio80",
  490. };
  491. static const char * const qup3_groups[] = {
  492. "gpio8", "gpio9", "gpio10", "gpio11",
  493. };
  494. static const char * const pbs_out_groups[] = {
  495. "gpio8", "gpio9", "gpio52",
  496. };
  497. static const char * const pll_bist_groups[] = {
  498. "gpio8", "gpio9",
  499. };
  500. static const char * const tsense_pwm_groups[] = {
  501. "gpio8",
  502. };
  503. static const char * const agera_pll_groups[] = {
  504. "gpio10", "gpio11",
  505. };
  506. static const char * const pbs_groups[] = {
  507. "gpio10", "gpio11", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22",
  508. "gpio23", "gpio24", "gpio25", "gpio26", "gpio47", "gpio48", "gpio87",
  509. "gpio90", "gpio91",
  510. };
  511. static const char * const qup4_groups[] = {
  512. "gpio12", "gpio13", "gpio96", "gpio97",
  513. };
  514. static const char * const tgu_groups[] = {
  515. "gpio12", "gpio13", "gpio14", "gpio15",
  516. };
  517. static const char * const qup5_groups[] = {
  518. "gpio14", "gpio15", "gpio16", "gpio17",
  519. };
  520. static const char * const sdc2_tb_groups[] = {
  521. "gpio18",
  522. };
  523. static const char * const sdc1_tb_groups[] = {
  524. "gpio19",
  525. };
  526. static const char * const cam_mclk_groups[] = {
  527. "gpio20", "gpio21", "gpio27", "gpio28",
  528. };
  529. static const char * const adsp_ext_groups[] = {
  530. "gpio21",
  531. };
  532. static const char * const cci_i2c_groups[] = {
  533. "gpio22", "gpio23", "gpio29", "gpio30",
  534. };
  535. static const char * const prng_rosc_groups[] = {
  536. "gpio22", "gpio23",
  537. };
  538. static const char * const cci_timer_groups[] = {
  539. "gpio24", "gpio25", "gpio28", "gpio32",
  540. };
  541. static const char * const gcc_gp1_groups[] = {
  542. "gpio24", "gpio86",
  543. };
  544. static const char * const cci_async_groups[] = {
  545. "gpio25",
  546. };
  547. static const char * const vsense_trigger_groups[] = {
  548. "gpio26",
  549. };
  550. static const char * const qdss_cti_groups[] = {
  551. "gpio27", "gpio28", "gpio72", "gpio73", "gpio96", "gpio97",
  552. };
  553. static const char * const gp_pdm0_groups[] = {
  554. "gpio31", "gpio95",
  555. };
  556. static const char * const gp_pdm1_groups[] = {
  557. "gpio32", "gpio96",
  558. };
  559. static const char * const gp_pdm2_groups[] = {
  560. "gpio33", "gpio97",
  561. };
  562. static const char * const nav_gpio_groups[] = {
  563. "gpio42", "gpio47", "gpio52", "gpio95", "gpio96", "gpio97", "gpio106",
  564. "gpio107", "gpio108",
  565. };
  566. static const char * const vfr_1_groups[] = {
  567. "gpio48",
  568. };
  569. static const char * const pa_indicator_groups[] = {
  570. "gpio49",
  571. };
  572. static const char * const gsm1_tx_groups[] = {
  573. "gpio53",
  574. };
  575. static const char * const ssbi_wtr1_groups[] = {
  576. "gpio59", "gpio60",
  577. };
  578. static const char * const pll_bypassnl_groups[] = {
  579. "gpio62",
  580. };
  581. static const char * const pll_reset_groups[] = {
  582. "gpio63",
  583. };
  584. static const char * const ddr_pxi0_groups[] = {
  585. "gpio63", "gpio64",
  586. };
  587. static const char * const gsm0_tx_groups[] = {
  588. "gpio64",
  589. };
  590. static const char * const gcc_gp2_groups[] = {
  591. "gpio69", "gpio107",
  592. };
  593. static const char * const ddr_pxi1_groups[] = {
  594. "gpio69", "gpio70",
  595. };
  596. static const char * const gcc_gp3_groups[] = {
  597. "gpio70", "gpio106",
  598. };
  599. static const char * const dbg_out_groups[] = {
  600. "gpio71",
  601. };
  602. static const char * const uim2_data_groups[] = {
  603. "gpio72",
  604. };
  605. static const char * const uim2_clk_groups[] = {
  606. "gpio73",
  607. };
  608. static const char * const uim2_reset_groups[] = {
  609. "gpio74",
  610. };
  611. static const char * const uim2_present_groups[] = {
  612. "gpio75",
  613. };
  614. static const char * const uim1_data_groups[] = {
  615. "gpio76",
  616. };
  617. static const char * const uim1_clk_groups[] = {
  618. "gpio77",
  619. };
  620. static const char * const uim1_reset_groups[] = {
  621. "gpio78",
  622. };
  623. static const char * const uim1_present_groups[] = {
  624. "gpio79",
  625. };
  626. static const char * const mdp_vsync_groups[] = {
  627. "gpio81", "gpio96", "gpio97",
  628. };
  629. static const char * const mdp_vsync_out_0_groups[] = {
  630. "gpio81",
  631. };
  632. static const char * const mdp_vsync_out_1_groups[] = {
  633. "gpio81",
  634. };
  635. static const char * const usb_phy_groups[] = {
  636. "gpio89",
  637. };
  638. static const char * const mss_lte_groups[] = {
  639. "gpio90", "gpio91",
  640. };
  641. static const char * const wlan1_adc0_groups[] = {
  642. "gpio94",
  643. };
  644. static const char * const wlan1_adc1_groups[] = {
  645. "gpio95",
  646. };
  647. static const char * const sd_write_groups[] = {
  648. "gpio96",
  649. };
  650. static const char * const jitter_bist_groups[] = {
  651. "gpio96", "gpio97",
  652. };
  653. static const char * const ddr_pxi2_groups[] = {
  654. "gpio102", "gpio103",
  655. };
  656. static const char * const ddr_pxi3_groups[] = {
  657. "gpio104", "gpio105",
  658. };
  659. static const struct pinfunction sm6115_functions[] = {
  660. MSM_PIN_FUNCTION(adsp_ext),
  661. MSM_PIN_FUNCTION(agera_pll),
  662. MSM_PIN_FUNCTION(atest),
  663. MSM_PIN_FUNCTION(cam_mclk),
  664. MSM_PIN_FUNCTION(cci_async),
  665. MSM_PIN_FUNCTION(cci_i2c),
  666. MSM_PIN_FUNCTION(cci_timer),
  667. MSM_PIN_FUNCTION(cri_trng),
  668. MSM_PIN_FUNCTION(dac_calib),
  669. MSM_PIN_FUNCTION(dbg_out),
  670. MSM_PIN_FUNCTION(ddr_bist),
  671. MSM_PIN_FUNCTION(ddr_pxi0),
  672. MSM_PIN_FUNCTION(ddr_pxi1),
  673. MSM_PIN_FUNCTION(ddr_pxi2),
  674. MSM_PIN_FUNCTION(ddr_pxi3),
  675. MSM_PIN_FUNCTION(gcc_gp1),
  676. MSM_PIN_FUNCTION(gcc_gp2),
  677. MSM_PIN_FUNCTION(gcc_gp3),
  678. MSM_PIN_FUNCTION(gpio),
  679. MSM_PIN_FUNCTION(gp_pdm0),
  680. MSM_PIN_FUNCTION(gp_pdm1),
  681. MSM_PIN_FUNCTION(gp_pdm2),
  682. MSM_PIN_FUNCTION(gsm0_tx),
  683. MSM_PIN_FUNCTION(gsm1_tx),
  684. MSM_PIN_FUNCTION(jitter_bist),
  685. MSM_PIN_FUNCTION(mdp_vsync),
  686. MSM_PIN_FUNCTION(mdp_vsync_out_0),
  687. MSM_PIN_FUNCTION(mdp_vsync_out_1),
  688. MSM_PIN_FUNCTION(mpm_pwr),
  689. MSM_PIN_FUNCTION(mss_lte),
  690. MSM_PIN_FUNCTION(m_voc),
  691. MSM_PIN_FUNCTION(nav_gpio),
  692. MSM_PIN_FUNCTION(pa_indicator),
  693. MSM_PIN_FUNCTION(pbs),
  694. MSM_PIN_FUNCTION(pbs_out),
  695. MSM_PIN_FUNCTION(phase_flag),
  696. MSM_PIN_FUNCTION(pll_bist),
  697. MSM_PIN_FUNCTION(pll_bypassnl),
  698. MSM_PIN_FUNCTION(pll_reset),
  699. MSM_PIN_FUNCTION(prng_rosc),
  700. MSM_PIN_FUNCTION(qdss_cti),
  701. MSM_PIN_FUNCTION(qdss_gpio),
  702. MSM_PIN_FUNCTION(qup0),
  703. MSM_PIN_FUNCTION(qup1),
  704. MSM_PIN_FUNCTION(qup2),
  705. MSM_PIN_FUNCTION(qup3),
  706. MSM_PIN_FUNCTION(qup4),
  707. MSM_PIN_FUNCTION(qup5),
  708. MSM_PIN_FUNCTION(sdc1_tb),
  709. MSM_PIN_FUNCTION(sdc2_tb),
  710. MSM_PIN_FUNCTION(sd_write),
  711. MSM_PIN_FUNCTION(ssbi_wtr1),
  712. MSM_PIN_FUNCTION(tgu),
  713. MSM_PIN_FUNCTION(tsense_pwm),
  714. MSM_PIN_FUNCTION(uim1_clk),
  715. MSM_PIN_FUNCTION(uim1_data),
  716. MSM_PIN_FUNCTION(uim1_present),
  717. MSM_PIN_FUNCTION(uim1_reset),
  718. MSM_PIN_FUNCTION(uim2_clk),
  719. MSM_PIN_FUNCTION(uim2_data),
  720. MSM_PIN_FUNCTION(uim2_present),
  721. MSM_PIN_FUNCTION(uim2_reset),
  722. MSM_PIN_FUNCTION(usb_phy),
  723. MSM_PIN_FUNCTION(vfr_1),
  724. MSM_PIN_FUNCTION(vsense_trigger),
  725. MSM_PIN_FUNCTION(wlan1_adc0),
  726. MSM_PIN_FUNCTION(wlan1_adc1),
  727. };
  728. /* Every pin is maintained as a single group, and missing or non-existing pin
  729. * would be maintained as dummy group to synchronize pin group index with
  730. * pin descriptor registered with pinctrl core.
  731. * Clients would not be able to request these dummy pin groups.
  732. */
  733. static const struct msm_pingroup sm6115_groups[] = {
  734. [0] = PINGROUP(0, WEST, qup0, m_voc, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _),
  735. [1] = PINGROUP(1, WEST, qup0, mpm_pwr, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _),
  736. [2] = PINGROUP(2, WEST, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _),
  737. [3] = PINGROUP(3, WEST, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _),
  738. [4] = PINGROUP(4, WEST, qup1, cri_trng, _, phase_flag, dac_calib, atest, _, _, _),
  739. [5] = PINGROUP(5, WEST, qup1, cri_trng, _, phase_flag, dac_calib, atest, _, _, _),
  740. [6] = PINGROUP(6, WEST, qup2, _, phase_flag, dac_calib, atest, _, _, _, _),
  741. [7] = PINGROUP(7, WEST, qup2, _, _, _, _, _, _, _, _),
  742. [8] = PINGROUP(8, EAST, qup3, pbs_out, pll_bist, _, qdss_gpio, _, tsense_pwm, _, _),
  743. [9] = PINGROUP(9, EAST, qup3, pbs_out, pll_bist, _, qdss_gpio, _, _, _, _),
  744. [10] = PINGROUP(10, EAST, qup3, agera_pll, _, pbs, qdss_gpio, _, _, _, _),
  745. [11] = PINGROUP(11, EAST, qup3, agera_pll, _, pbs, qdss_gpio, _, _, _, _),
  746. [12] = PINGROUP(12, WEST, qup4, tgu, _, _, _, _, _, _, _),
  747. [13] = PINGROUP(13, WEST, qup4, tgu, _, _, _, _, _, _, _),
  748. [14] = PINGROUP(14, WEST, qup5, tgu, _, phase_flag, qdss_gpio, dac_calib, _, _, _),
  749. [15] = PINGROUP(15, WEST, qup5, tgu, _, phase_flag, qdss_gpio, dac_calib, _, _, _),
  750. [16] = PINGROUP(16, WEST, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _),
  751. [17] = PINGROUP(17, WEST, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _),
  752. [18] = PINGROUP(18, EAST, sdc2_tb, cri_trng, pbs, qdss_gpio, _, _, _, _, _),
  753. [19] = PINGROUP(19, EAST, sdc1_tb, pbs, qdss_gpio, _, _, _, _, _, _),
  754. [20] = PINGROUP(20, EAST, cam_mclk, pbs, qdss_gpio, _, _, _, _, _, _),
  755. [21] = PINGROUP(21, EAST, cam_mclk, adsp_ext, pbs, qdss_gpio, _, _, _, _, _),
  756. [22] = PINGROUP(22, EAST, cci_i2c, prng_rosc, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _),
  757. [23] = PINGROUP(23, EAST, cci_i2c, prng_rosc, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _),
  758. [24] = PINGROUP(24, EAST, cci_timer, gcc_gp1, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _),
  759. [25] = PINGROUP(25, EAST, cci_async, cci_timer, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, _),
  760. [26] = PINGROUP(26, EAST, _, pbs, phase_flag, qdss_gpio, dac_calib, atest, vsense_trigger, _, _),
  761. [27] = PINGROUP(27, EAST, cam_mclk, qdss_cti, _, _, _, _, _, _, _),
  762. [28] = PINGROUP(28, EAST, cam_mclk, cci_timer, qdss_cti, _, _, _, _, _, _),
  763. [29] = PINGROUP(29, EAST, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _),
  764. [30] = PINGROUP(30, EAST, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _),
  765. [31] = PINGROUP(31, EAST, gp_pdm0, _, phase_flag, dac_calib, atest, _, _, _, _),
  766. [32] = PINGROUP(32, EAST, cci_timer, gp_pdm1, _, phase_flag, dac_calib, atest, _, _, _),
  767. [33] = PINGROUP(33, EAST, gp_pdm2, _, phase_flag, dac_calib, atest, _, _, _, _),
  768. [34] = PINGROUP(34, EAST, _, _, _, _, _, _, _, _, _),
  769. [35] = PINGROUP(35, EAST, _, phase_flag, _, _, _, _, _, _, _),
  770. [36] = PINGROUP(36, EAST, _, phase_flag, _, _, _, _, _, _, _),
  771. [37] = PINGROUP(37, EAST, _, _, _, _, _, _, _, _, _),
  772. [38] = PINGROUP(38, EAST, _, _, _, _, _, _, _, _, _),
  773. [39] = PINGROUP(39, EAST, _, _, _, _, _, _, _, _, _),
  774. [40] = PINGROUP(40, EAST, _, _, _, _, _, _, _, _, _),
  775. [41] = PINGROUP(41, EAST, _, _, _, _, _, _, _, _, _),
  776. [42] = PINGROUP(42, EAST, _, nav_gpio, _, _, _, _, _, _, _),
  777. [43] = PINGROUP(43, EAST, _, _, phase_flag, _, _, _, _, _, _),
  778. [44] = PINGROUP(44, EAST, _, _, phase_flag, _, _, _, _, _, _),
  779. [45] = PINGROUP(45, EAST, _, _, phase_flag, _, _, _, _, _, _),
  780. [46] = PINGROUP(46, EAST, _, _, _, _, _, _, _, _, _),
  781. [47] = PINGROUP(47, EAST, _, nav_gpio, pbs, qdss_gpio, _, _, _, _, _),
  782. [48] = PINGROUP(48, EAST, _, vfr_1, _, pbs, qdss_gpio, _, _, _, _),
  783. [49] = PINGROUP(49, EAST, _, pa_indicator, _, _, _, _, _, _, _),
  784. [50] = PINGROUP(50, EAST, _, _, _, _, _, _, _, _, _),
  785. [51] = PINGROUP(51, EAST, _, _, _, _, _, _, _, _, _),
  786. [52] = PINGROUP(52, EAST, _, nav_gpio, pbs_out, _, _, _, _, _, _),
  787. [53] = PINGROUP(53, EAST, _, gsm1_tx, _, _, _, _, _, _, _),
  788. [54] = PINGROUP(54, EAST, _, _, _, _, _, _, _, _, _),
  789. [55] = PINGROUP(55, EAST, _, _, _, _, _, _, _, _, _),
  790. [56] = PINGROUP(56, EAST, _, _, _, _, _, _, _, _, _),
  791. [57] = PINGROUP(57, EAST, _, _, _, _, _, _, _, _, _),
  792. [58] = PINGROUP(58, EAST, _, _, _, _, _, _, _, _, _),
  793. [59] = PINGROUP(59, EAST, _, ssbi_wtr1, _, _, _, _, _, _, _),
  794. [60] = PINGROUP(60, EAST, _, ssbi_wtr1, _, _, _, _, _, _, _),
  795. [61] = PINGROUP(61, EAST, _, _, _, _, _, _, _, _, _),
  796. [62] = PINGROUP(62, EAST, _, pll_bypassnl, _, _, _, _, _, _, _),
  797. [63] = PINGROUP(63, EAST, pll_reset, _, phase_flag, ddr_pxi0, _, _, _, _, _),
  798. [64] = PINGROUP(64, EAST, gsm0_tx, _, phase_flag, ddr_pxi0, _, _, _, _, _),
  799. [65] = PINGROUP(65, WEST, _, _, _, _, _, _, _, _, _),
  800. [66] = PINGROUP(66, WEST, _, _, _, _, _, _, _, _, _),
  801. [67] = PINGROUP(67, WEST, _, _, _, _, _, _, _, _, _),
  802. [68] = PINGROUP(68, WEST, _, _, _, _, _, _, _, _, _),
  803. [69] = PINGROUP(69, WEST, qup1, gcc_gp2, qdss_gpio, ddr_pxi1, _, _, _, _, _),
  804. [70] = PINGROUP(70, WEST, qup1, gcc_gp3, qdss_gpio, ddr_pxi1, _, _, _, _, _),
  805. [71] = PINGROUP(71, WEST, qup2, dbg_out, _, _, _, _, _, _, _),
  806. [72] = PINGROUP(72, SOUTH, uim2_data, qdss_cti, _, _, _, _, _, _, _),
  807. [73] = PINGROUP(73, SOUTH, uim2_clk, _, qdss_cti, _, _, _, _, _, _),
  808. [74] = PINGROUP(74, SOUTH, uim2_reset, _, _, _, _, _, _, _, _),
  809. [75] = PINGROUP(75, SOUTH, uim2_present, _, _, _, _, _, _, _, _),
  810. [76] = PINGROUP(76, SOUTH, uim1_data, _, _, _, _, _, _, _, _),
  811. [77] = PINGROUP(77, SOUTH, uim1_clk, _, _, _, _, _, _, _, _),
  812. [78] = PINGROUP(78, SOUTH, uim1_reset, _, _, _, _, _, _, _, _),
  813. [79] = PINGROUP(79, SOUTH, uim1_present, _, _, _, _, _, _, _, _),
  814. [80] = PINGROUP(80, WEST, qup2, dac_calib, _, _, _, _, _, _, _),
  815. [81] = PINGROUP(81, WEST, mdp_vsync_out_0, mdp_vsync_out_1, mdp_vsync, dac_calib, _, _, _, _, _),
  816. [82] = PINGROUP(82, WEST, qup0, dac_calib, _, _, _, _, _, _, _),
  817. [83] = PINGROUP(83, WEST, _, _, _, _, _, _, _, _, _),
  818. [84] = PINGROUP(84, WEST, _, _, _, _, _, _, _, _, _),
  819. [85] = PINGROUP(85, WEST, _, _, _, _, _, _, _, _, _),
  820. [86] = PINGROUP(86, WEST, qup0, gcc_gp1, atest, _, _, _, _, _, _),
  821. [87] = PINGROUP(87, EAST, pbs, qdss_gpio, _, _, _, _, _, _, _),
  822. [88] = PINGROUP(88, EAST, _, _, _, _, _, _, _, _, _),
  823. [89] = PINGROUP(89, WEST, usb_phy, atest, _, _, _, _, _, _, _),
  824. [90] = PINGROUP(90, EAST, mss_lte, pbs, qdss_gpio, _, _, _, _, _, _),
  825. [91] = PINGROUP(91, EAST, mss_lte, pbs, qdss_gpio, _, _, _, _, _, _),
  826. [92] = PINGROUP(92, WEST, _, _, _, _, _, _, _, _, _),
  827. [93] = PINGROUP(93, WEST, _, _, _, _, _, _, _, _, _),
  828. [94] = PINGROUP(94, WEST, _, qdss_gpio, wlan1_adc0, _, _, _, _, _, _),
  829. [95] = PINGROUP(95, WEST, nav_gpio, gp_pdm0, qdss_gpio, wlan1_adc1, _, _, _, _, _),
  830. [96] = PINGROUP(96, WEST, qup4, nav_gpio, mdp_vsync, gp_pdm1, sd_write, jitter_bist, qdss_cti, qdss_cti, _),
  831. [97] = PINGROUP(97, WEST, qup4, nav_gpio, mdp_vsync, gp_pdm2, jitter_bist, qdss_cti, qdss_cti, _, _),
  832. [98] = PINGROUP(98, SOUTH, _, _, _, _, _, _, _, _, _),
  833. [99] = PINGROUP(99, SOUTH, _, _, _, _, _, _, _, _, _),
  834. [100] = PINGROUP(100, SOUTH, atest, _, _, _, _, _, _, _, _),
  835. [101] = PINGROUP(101, SOUTH, atest, _, _, _, _, _, _, _, _),
  836. [102] = PINGROUP(102, SOUTH, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _),
  837. [103] = PINGROUP(103, SOUTH, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _),
  838. [104] = PINGROUP(104, SOUTH, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, _, _, _),
  839. [105] = PINGROUP(105, SOUTH, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, _, _, _),
  840. [106] = PINGROUP(106, SOUTH, nav_gpio, gcc_gp3, qdss_gpio, _, _, _, _, _, _),
  841. [107] = PINGROUP(107, SOUTH, nav_gpio, gcc_gp2, qdss_gpio, _, _, _, _, _, _),
  842. [108] = PINGROUP(108, SOUTH, nav_gpio, _, _, _, _, _, _, _, _),
  843. [109] = PINGROUP(109, SOUTH, _, qdss_gpio, _, _, _, _, _, _, _),
  844. [110] = PINGROUP(110, SOUTH, _, qdss_gpio, _, _, _, _, _, _, _),
  845. [111] = PINGROUP(111, SOUTH, _, _, _, _, _, _, _, _, _),
  846. [112] = PINGROUP(112, SOUTH, _, _, _, _, _, _, _, _, _),
  847. [113] = UFS_RESET(ufs_reset, 0x78000),
  848. [114] = SDC_QDSD_PINGROUP(sdc1_rclk, WEST, 0x75000, 15, 0),
  849. [115] = SDC_QDSD_PINGROUP(sdc1_clk, WEST, 0x75000, 13, 6),
  850. [116] = SDC_QDSD_PINGROUP(sdc1_cmd, WEST, 0x75000, 11, 3),
  851. [117] = SDC_QDSD_PINGROUP(sdc1_data, WEST, 0x75000, 9, 0),
  852. [118] = SDC_QDSD_PINGROUP(sdc2_clk, SOUTH, 0x73000, 14, 6),
  853. [119] = SDC_QDSD_PINGROUP(sdc2_cmd, SOUTH, 0x73000, 11, 3),
  854. [120] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x73000, 9, 0),
  855. };
  856. static const struct msm_gpio_wakeirq_map sm6115_mpm_map[] = {
  857. { 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 }, { 13, 18 },
  858. { 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 }, { 25, 71 }, { 27, 73 },
  859. { 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 }, { 34, 56 }, { 35, 57 }, { 36, 58 },
  860. { 39, 28 }, { 46, 29 }, { 62, 60 }, { 63, 61 }, { 64, 62 }, { 65, 30 }, { 66, 31 },
  861. { 67, 32 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 }, { 79, 36 }, { 80, 21 },
  862. { 81, 38 }, { 83, 9 }, { 84, 39 }, { 85, 40 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
  863. { 89, 45 }, { 91, 74 }, { 93, 46 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
  864. };
  865. static const struct msm_pinctrl_soc_data sm6115_tlmm = {
  866. .pins = sm6115_pins,
  867. .npins = ARRAY_SIZE(sm6115_pins),
  868. .functions = sm6115_functions,
  869. .nfunctions = ARRAY_SIZE(sm6115_functions),
  870. .groups = sm6115_groups,
  871. .ngroups = ARRAY_SIZE(sm6115_groups),
  872. .ngpios = 114,
  873. .tiles = sm6115_tiles,
  874. .ntiles = ARRAY_SIZE(sm6115_tiles),
  875. .wakeirq_map = sm6115_mpm_map,
  876. .nwakeirq_map = ARRAY_SIZE(sm6115_mpm_map),
  877. };
  878. static int sm6115_tlmm_probe(struct platform_device *pdev)
  879. {
  880. return msm_pinctrl_probe(pdev, &sm6115_tlmm);
  881. }
  882. static const struct of_device_id sm6115_tlmm_of_match[] = {
  883. { .compatible = "qcom,sm6115-tlmm", },
  884. { }
  885. };
  886. static struct platform_driver sm6115_tlmm_driver = {
  887. .driver = {
  888. .name = "sm6115-tlmm",
  889. .of_match_table = sm6115_tlmm_of_match,
  890. },
  891. .probe = sm6115_tlmm_probe,
  892. .remove_new = msm_pinctrl_remove,
  893. };
  894. static int __init sm6115_tlmm_init(void)
  895. {
  896. return platform_driver_register(&sm6115_tlmm_driver);
  897. }
  898. arch_initcall(sm6115_tlmm_init);
  899. static void __exit sm6115_tlmm_exit(void)
  900. {
  901. platform_driver_unregister(&sm6115_tlmm_driver);
  902. }
  903. module_exit(sm6115_tlmm_exit);
  904. MODULE_DESCRIPTION("QTI sm6115 tlmm driver");
  905. MODULE_LICENSE("GPL v2");
  906. MODULE_DEVICE_TABLE(of, sm6115_tlmm_of_match);