pinctrl-sm6350.c 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2021, Konrad Dybcio <[email protected]>
  5. */
  6. #include <linux/module.h>
  7. #include <linux/of.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/pinctrl/pinctrl.h>
  10. #include "pinctrl-msm.h"
  11. #define FUNCTION(fname) \
  12. [msm_mux_##fname] = { \
  13. .name = #fname, \
  14. .groups = fname##_groups, \
  15. .ngroups = ARRAY_SIZE(fname##_groups), \
  16. }
  17. #define REG_SIZE 0x1000
  18. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  19. { \
  20. .name = "gpio" #id, \
  21. .pins = gpio##id##_pins, \
  22. .npins = (unsigned int)ARRAY_SIZE(gpio##id##_pins), \
  23. .funcs = (int[]){ \
  24. msm_mux_gpio, /* gpio mode */ \
  25. msm_mux_##f1, \
  26. msm_mux_##f2, \
  27. msm_mux_##f3, \
  28. msm_mux_##f4, \
  29. msm_mux_##f5, \
  30. msm_mux_##f6, \
  31. msm_mux_##f7, \
  32. msm_mux_##f8, \
  33. msm_mux_##f9 \
  34. }, \
  35. .nfuncs = 10, \
  36. .ctl_reg = REG_SIZE * id, \
  37. .io_reg = 0x4 + REG_SIZE * id, \
  38. .intr_cfg_reg = 0x8 + REG_SIZE * id, \
  39. .intr_status_reg = 0xc + REG_SIZE * id, \
  40. .intr_target_reg = 0x8 + REG_SIZE * id, \
  41. .mux_bit = 2, \
  42. .pull_bit = 0, \
  43. .drv_bit = 6, \
  44. .oe_bit = 9, \
  45. .in_bit = 0, \
  46. .out_bit = 1, \
  47. .intr_enable_bit = 0, \
  48. .intr_status_bit = 0, \
  49. .intr_target_bit = 5, \
  50. .intr_target_kpss_val = 3, \
  51. .intr_raw_status_bit = 4, \
  52. .intr_polarity_bit = 1, \
  53. .intr_detection_bit = 2, \
  54. .intr_detection_width = 2, \
  55. }
  56. #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
  57. { \
  58. .name = #pg_name, \
  59. .pins = pg_name##_pins, \
  60. .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \
  61. .ctl_reg = ctl, \
  62. .io_reg = 0, \
  63. .intr_cfg_reg = 0, \
  64. .intr_status_reg = 0, \
  65. .intr_target_reg = 0, \
  66. .mux_bit = -1, \
  67. .pull_bit = pull, \
  68. .drv_bit = drv, \
  69. .oe_bit = -1, \
  70. .in_bit = -1, \
  71. .out_bit = -1, \
  72. .intr_enable_bit = -1, \
  73. .intr_status_bit = -1, \
  74. .intr_target_bit = -1, \
  75. .intr_raw_status_bit = -1, \
  76. .intr_polarity_bit = -1, \
  77. .intr_detection_bit = -1, \
  78. .intr_detection_width = -1, \
  79. }
  80. #define UFS_RESET(pg_name, offset) \
  81. { \
  82. .name = #pg_name, \
  83. .pins = pg_name##_pins, \
  84. .npins = (unsigned int)ARRAY_SIZE(pg_name##_pins), \
  85. .ctl_reg = offset, \
  86. .io_reg = offset + 0x4, \
  87. .intr_cfg_reg = 0, \
  88. .intr_status_reg = 0, \
  89. .intr_target_reg = 0, \
  90. .mux_bit = -1, \
  91. .pull_bit = 3, \
  92. .drv_bit = 0, \
  93. .oe_bit = -1, \
  94. .in_bit = -1, \
  95. .out_bit = 0, \
  96. .intr_enable_bit = -1, \
  97. .intr_status_bit = -1, \
  98. .intr_target_bit = -1, \
  99. .intr_raw_status_bit = -1, \
  100. .intr_polarity_bit = -1, \
  101. .intr_detection_bit = -1, \
  102. .intr_detection_width = -1, \
  103. }
  104. static const struct pinctrl_pin_desc sm6350_pins[] = {
  105. PINCTRL_PIN(0, "GPIO_0"),
  106. PINCTRL_PIN(1, "GPIO_1"),
  107. PINCTRL_PIN(2, "GPIO_2"),
  108. PINCTRL_PIN(3, "GPIO_3"),
  109. PINCTRL_PIN(4, "GPIO_4"),
  110. PINCTRL_PIN(5, "GPIO_5"),
  111. PINCTRL_PIN(6, "GPIO_6"),
  112. PINCTRL_PIN(7, "GPIO_7"),
  113. PINCTRL_PIN(8, "GPIO_8"),
  114. PINCTRL_PIN(9, "GPIO_9"),
  115. PINCTRL_PIN(10, "GPIO_10"),
  116. PINCTRL_PIN(11, "GPIO_11"),
  117. PINCTRL_PIN(12, "GPIO_12"),
  118. PINCTRL_PIN(13, "GPIO_13"),
  119. PINCTRL_PIN(14, "GPIO_14"),
  120. PINCTRL_PIN(15, "GPIO_15"),
  121. PINCTRL_PIN(16, "GPIO_16"),
  122. PINCTRL_PIN(17, "GPIO_17"),
  123. PINCTRL_PIN(18, "GPIO_18"),
  124. PINCTRL_PIN(19, "GPIO_19"),
  125. PINCTRL_PIN(20, "GPIO_20"),
  126. PINCTRL_PIN(21, "GPIO_21"),
  127. PINCTRL_PIN(22, "GPIO_22"),
  128. PINCTRL_PIN(23, "GPIO_23"),
  129. PINCTRL_PIN(24, "GPIO_24"),
  130. PINCTRL_PIN(25, "GPIO_25"),
  131. PINCTRL_PIN(26, "GPIO_26"),
  132. PINCTRL_PIN(27, "GPIO_27"),
  133. PINCTRL_PIN(28, "GPIO_28"),
  134. PINCTRL_PIN(29, "GPIO_29"),
  135. PINCTRL_PIN(30, "GPIO_30"),
  136. PINCTRL_PIN(31, "GPIO_31"),
  137. PINCTRL_PIN(32, "GPIO_32"),
  138. PINCTRL_PIN(33, "GPIO_33"),
  139. PINCTRL_PIN(34, "GPIO_34"),
  140. PINCTRL_PIN(35, "GPIO_35"),
  141. PINCTRL_PIN(36, "GPIO_36"),
  142. PINCTRL_PIN(37, "GPIO_37"),
  143. PINCTRL_PIN(38, "GPIO_38"),
  144. PINCTRL_PIN(39, "GPIO_39"),
  145. PINCTRL_PIN(40, "GPIO_40"),
  146. PINCTRL_PIN(41, "GPIO_41"),
  147. PINCTRL_PIN(42, "GPIO_42"),
  148. PINCTRL_PIN(43, "GPIO_43"),
  149. PINCTRL_PIN(44, "GPIO_44"),
  150. PINCTRL_PIN(45, "GPIO_45"),
  151. PINCTRL_PIN(46, "GPIO_46"),
  152. PINCTRL_PIN(47, "GPIO_47"),
  153. PINCTRL_PIN(48, "GPIO_48"),
  154. PINCTRL_PIN(49, "GPIO_49"),
  155. PINCTRL_PIN(50, "GPIO_50"),
  156. PINCTRL_PIN(51, "GPIO_51"),
  157. PINCTRL_PIN(52, "GPIO_52"),
  158. PINCTRL_PIN(53, "GPIO_53"),
  159. PINCTRL_PIN(54, "GPIO_54"),
  160. PINCTRL_PIN(55, "GPIO_55"),
  161. PINCTRL_PIN(56, "GPIO_56"),
  162. PINCTRL_PIN(57, "GPIO_57"),
  163. PINCTRL_PIN(58, "GPIO_58"),
  164. PINCTRL_PIN(59, "GPIO_59"),
  165. PINCTRL_PIN(60, "GPIO_60"),
  166. PINCTRL_PIN(61, "GPIO_61"),
  167. PINCTRL_PIN(62, "GPIO_62"),
  168. PINCTRL_PIN(63, "GPIO_63"),
  169. PINCTRL_PIN(64, "GPIO_64"),
  170. PINCTRL_PIN(65, "GPIO_65"),
  171. PINCTRL_PIN(66, "GPIO_66"),
  172. PINCTRL_PIN(67, "GPIO_67"),
  173. PINCTRL_PIN(68, "GPIO_68"),
  174. PINCTRL_PIN(69, "GPIO_69"),
  175. PINCTRL_PIN(70, "GPIO_70"),
  176. PINCTRL_PIN(71, "GPIO_71"),
  177. PINCTRL_PIN(72, "GPIO_72"),
  178. PINCTRL_PIN(73, "GPIO_73"),
  179. PINCTRL_PIN(74, "GPIO_74"),
  180. PINCTRL_PIN(75, "GPIO_75"),
  181. PINCTRL_PIN(76, "GPIO_76"),
  182. PINCTRL_PIN(77, "GPIO_77"),
  183. PINCTRL_PIN(78, "GPIO_78"),
  184. PINCTRL_PIN(79, "GPIO_79"),
  185. PINCTRL_PIN(80, "GPIO_80"),
  186. PINCTRL_PIN(81, "GPIO_81"),
  187. PINCTRL_PIN(82, "GPIO_82"),
  188. PINCTRL_PIN(83, "GPIO_83"),
  189. PINCTRL_PIN(84, "GPIO_84"),
  190. PINCTRL_PIN(85, "GPIO_85"),
  191. PINCTRL_PIN(86, "GPIO_86"),
  192. PINCTRL_PIN(87, "GPIO_87"),
  193. PINCTRL_PIN(88, "GPIO_88"),
  194. PINCTRL_PIN(89, "GPIO_89"),
  195. PINCTRL_PIN(90, "GPIO_90"),
  196. PINCTRL_PIN(91, "GPIO_91"),
  197. PINCTRL_PIN(92, "GPIO_92"),
  198. PINCTRL_PIN(93, "GPIO_93"),
  199. PINCTRL_PIN(94, "GPIO_94"),
  200. PINCTRL_PIN(95, "GPIO_95"),
  201. PINCTRL_PIN(96, "GPIO_96"),
  202. PINCTRL_PIN(97, "GPIO_97"),
  203. PINCTRL_PIN(98, "GPIO_98"),
  204. PINCTRL_PIN(99, "GPIO_99"),
  205. PINCTRL_PIN(100, "GPIO_100"),
  206. PINCTRL_PIN(101, "GPIO_101"),
  207. PINCTRL_PIN(102, "GPIO_102"),
  208. PINCTRL_PIN(103, "GPIO_103"),
  209. PINCTRL_PIN(104, "GPIO_104"),
  210. PINCTRL_PIN(105, "GPIO_105"),
  211. PINCTRL_PIN(106, "GPIO_106"),
  212. PINCTRL_PIN(107, "GPIO_107"),
  213. PINCTRL_PIN(108, "GPIO_108"),
  214. PINCTRL_PIN(109, "GPIO_109"),
  215. PINCTRL_PIN(110, "GPIO_110"),
  216. PINCTRL_PIN(111, "GPIO_111"),
  217. PINCTRL_PIN(112, "GPIO_112"),
  218. PINCTRL_PIN(113, "GPIO_113"),
  219. PINCTRL_PIN(114, "GPIO_114"),
  220. PINCTRL_PIN(115, "GPIO_115"),
  221. PINCTRL_PIN(116, "GPIO_116"),
  222. PINCTRL_PIN(117, "GPIO_117"),
  223. PINCTRL_PIN(118, "GPIO_118"),
  224. PINCTRL_PIN(119, "GPIO_119"),
  225. PINCTRL_PIN(120, "GPIO_120"),
  226. PINCTRL_PIN(121, "GPIO_121"),
  227. PINCTRL_PIN(122, "GPIO_122"),
  228. PINCTRL_PIN(123, "GPIO_123"),
  229. PINCTRL_PIN(124, "GPIO_124"),
  230. PINCTRL_PIN(125, "GPIO_125"),
  231. PINCTRL_PIN(126, "GPIO_126"),
  232. PINCTRL_PIN(127, "GPIO_127"),
  233. PINCTRL_PIN(128, "GPIO_128"),
  234. PINCTRL_PIN(129, "GPIO_129"),
  235. PINCTRL_PIN(130, "GPIO_130"),
  236. PINCTRL_PIN(131, "GPIO_131"),
  237. PINCTRL_PIN(132, "GPIO_132"),
  238. PINCTRL_PIN(133, "GPIO_133"),
  239. PINCTRL_PIN(134, "GPIO_134"),
  240. PINCTRL_PIN(135, "GPIO_135"),
  241. PINCTRL_PIN(136, "GPIO_136"),
  242. PINCTRL_PIN(137, "GPIO_137"),
  243. PINCTRL_PIN(138, "GPIO_138"),
  244. PINCTRL_PIN(139, "GPIO_139"),
  245. PINCTRL_PIN(140, "GPIO_140"),
  246. PINCTRL_PIN(141, "GPIO_141"),
  247. PINCTRL_PIN(142, "GPIO_142"),
  248. PINCTRL_PIN(143, "GPIO_143"),
  249. PINCTRL_PIN(144, "GPIO_144"),
  250. PINCTRL_PIN(145, "GPIO_145"),
  251. PINCTRL_PIN(146, "GPIO_146"),
  252. PINCTRL_PIN(147, "GPIO_147"),
  253. PINCTRL_PIN(148, "GPIO_148"),
  254. PINCTRL_PIN(149, "GPIO_149"),
  255. PINCTRL_PIN(150, "GPIO_150"),
  256. PINCTRL_PIN(151, "GPIO_151"),
  257. PINCTRL_PIN(152, "GPIO_152"),
  258. PINCTRL_PIN(153, "GPIO_153"),
  259. PINCTRL_PIN(154, "GPIO_154"),
  260. PINCTRL_PIN(155, "GPIO_155"),
  261. PINCTRL_PIN(156, "UFS_RESET"),
  262. PINCTRL_PIN(157, "SDC1_RCLK"),
  263. PINCTRL_PIN(158, "SDC1_CLK"),
  264. PINCTRL_PIN(159, "SDC1_CMD"),
  265. PINCTRL_PIN(160, "SDC1_DATA"),
  266. PINCTRL_PIN(161, "SDC2_CLK"),
  267. PINCTRL_PIN(162, "SDC2_CMD"),
  268. PINCTRL_PIN(163, "SDC2_DATA"),
  269. };
  270. #define DECLARE_MSM_GPIO_PINS(pin) \
  271. static const unsigned int gpio##pin##_pins[] = { pin }
  272. DECLARE_MSM_GPIO_PINS(0);
  273. DECLARE_MSM_GPIO_PINS(1);
  274. DECLARE_MSM_GPIO_PINS(2);
  275. DECLARE_MSM_GPIO_PINS(3);
  276. DECLARE_MSM_GPIO_PINS(4);
  277. DECLARE_MSM_GPIO_PINS(5);
  278. DECLARE_MSM_GPIO_PINS(6);
  279. DECLARE_MSM_GPIO_PINS(7);
  280. DECLARE_MSM_GPIO_PINS(8);
  281. DECLARE_MSM_GPIO_PINS(9);
  282. DECLARE_MSM_GPIO_PINS(10);
  283. DECLARE_MSM_GPIO_PINS(11);
  284. DECLARE_MSM_GPIO_PINS(12);
  285. DECLARE_MSM_GPIO_PINS(13);
  286. DECLARE_MSM_GPIO_PINS(14);
  287. DECLARE_MSM_GPIO_PINS(15);
  288. DECLARE_MSM_GPIO_PINS(16);
  289. DECLARE_MSM_GPIO_PINS(17);
  290. DECLARE_MSM_GPIO_PINS(18);
  291. DECLARE_MSM_GPIO_PINS(19);
  292. DECLARE_MSM_GPIO_PINS(20);
  293. DECLARE_MSM_GPIO_PINS(21);
  294. DECLARE_MSM_GPIO_PINS(22);
  295. DECLARE_MSM_GPIO_PINS(23);
  296. DECLARE_MSM_GPIO_PINS(24);
  297. DECLARE_MSM_GPIO_PINS(25);
  298. DECLARE_MSM_GPIO_PINS(26);
  299. DECLARE_MSM_GPIO_PINS(27);
  300. DECLARE_MSM_GPIO_PINS(28);
  301. DECLARE_MSM_GPIO_PINS(29);
  302. DECLARE_MSM_GPIO_PINS(30);
  303. DECLARE_MSM_GPIO_PINS(31);
  304. DECLARE_MSM_GPIO_PINS(32);
  305. DECLARE_MSM_GPIO_PINS(33);
  306. DECLARE_MSM_GPIO_PINS(34);
  307. DECLARE_MSM_GPIO_PINS(35);
  308. DECLARE_MSM_GPIO_PINS(36);
  309. DECLARE_MSM_GPIO_PINS(37);
  310. DECLARE_MSM_GPIO_PINS(38);
  311. DECLARE_MSM_GPIO_PINS(39);
  312. DECLARE_MSM_GPIO_PINS(40);
  313. DECLARE_MSM_GPIO_PINS(41);
  314. DECLARE_MSM_GPIO_PINS(42);
  315. DECLARE_MSM_GPIO_PINS(43);
  316. DECLARE_MSM_GPIO_PINS(44);
  317. DECLARE_MSM_GPIO_PINS(45);
  318. DECLARE_MSM_GPIO_PINS(46);
  319. DECLARE_MSM_GPIO_PINS(47);
  320. DECLARE_MSM_GPIO_PINS(48);
  321. DECLARE_MSM_GPIO_PINS(49);
  322. DECLARE_MSM_GPIO_PINS(50);
  323. DECLARE_MSM_GPIO_PINS(51);
  324. DECLARE_MSM_GPIO_PINS(52);
  325. DECLARE_MSM_GPIO_PINS(53);
  326. DECLARE_MSM_GPIO_PINS(54);
  327. DECLARE_MSM_GPIO_PINS(55);
  328. DECLARE_MSM_GPIO_PINS(56);
  329. DECLARE_MSM_GPIO_PINS(57);
  330. DECLARE_MSM_GPIO_PINS(58);
  331. DECLARE_MSM_GPIO_PINS(59);
  332. DECLARE_MSM_GPIO_PINS(60);
  333. DECLARE_MSM_GPIO_PINS(61);
  334. DECLARE_MSM_GPIO_PINS(62);
  335. DECLARE_MSM_GPIO_PINS(63);
  336. DECLARE_MSM_GPIO_PINS(64);
  337. DECLARE_MSM_GPIO_PINS(65);
  338. DECLARE_MSM_GPIO_PINS(66);
  339. DECLARE_MSM_GPIO_PINS(67);
  340. DECLARE_MSM_GPIO_PINS(68);
  341. DECLARE_MSM_GPIO_PINS(69);
  342. DECLARE_MSM_GPIO_PINS(70);
  343. DECLARE_MSM_GPIO_PINS(71);
  344. DECLARE_MSM_GPIO_PINS(72);
  345. DECLARE_MSM_GPIO_PINS(73);
  346. DECLARE_MSM_GPIO_PINS(74);
  347. DECLARE_MSM_GPIO_PINS(75);
  348. DECLARE_MSM_GPIO_PINS(76);
  349. DECLARE_MSM_GPIO_PINS(77);
  350. DECLARE_MSM_GPIO_PINS(78);
  351. DECLARE_MSM_GPIO_PINS(79);
  352. DECLARE_MSM_GPIO_PINS(80);
  353. DECLARE_MSM_GPIO_PINS(81);
  354. DECLARE_MSM_GPIO_PINS(82);
  355. DECLARE_MSM_GPIO_PINS(83);
  356. DECLARE_MSM_GPIO_PINS(84);
  357. DECLARE_MSM_GPIO_PINS(85);
  358. DECLARE_MSM_GPIO_PINS(86);
  359. DECLARE_MSM_GPIO_PINS(87);
  360. DECLARE_MSM_GPIO_PINS(88);
  361. DECLARE_MSM_GPIO_PINS(89);
  362. DECLARE_MSM_GPIO_PINS(90);
  363. DECLARE_MSM_GPIO_PINS(91);
  364. DECLARE_MSM_GPIO_PINS(92);
  365. DECLARE_MSM_GPIO_PINS(93);
  366. DECLARE_MSM_GPIO_PINS(94);
  367. DECLARE_MSM_GPIO_PINS(95);
  368. DECLARE_MSM_GPIO_PINS(96);
  369. DECLARE_MSM_GPIO_PINS(97);
  370. DECLARE_MSM_GPIO_PINS(98);
  371. DECLARE_MSM_GPIO_PINS(99);
  372. DECLARE_MSM_GPIO_PINS(100);
  373. DECLARE_MSM_GPIO_PINS(101);
  374. DECLARE_MSM_GPIO_PINS(102);
  375. DECLARE_MSM_GPIO_PINS(103);
  376. DECLARE_MSM_GPIO_PINS(104);
  377. DECLARE_MSM_GPIO_PINS(105);
  378. DECLARE_MSM_GPIO_PINS(106);
  379. DECLARE_MSM_GPIO_PINS(107);
  380. DECLARE_MSM_GPIO_PINS(108);
  381. DECLARE_MSM_GPIO_PINS(109);
  382. DECLARE_MSM_GPIO_PINS(110);
  383. DECLARE_MSM_GPIO_PINS(111);
  384. DECLARE_MSM_GPIO_PINS(112);
  385. DECLARE_MSM_GPIO_PINS(113);
  386. DECLARE_MSM_GPIO_PINS(114);
  387. DECLARE_MSM_GPIO_PINS(115);
  388. DECLARE_MSM_GPIO_PINS(116);
  389. DECLARE_MSM_GPIO_PINS(117);
  390. DECLARE_MSM_GPIO_PINS(118);
  391. DECLARE_MSM_GPIO_PINS(119);
  392. DECLARE_MSM_GPIO_PINS(120);
  393. DECLARE_MSM_GPIO_PINS(121);
  394. DECLARE_MSM_GPIO_PINS(122);
  395. DECLARE_MSM_GPIO_PINS(123);
  396. DECLARE_MSM_GPIO_PINS(124);
  397. DECLARE_MSM_GPIO_PINS(125);
  398. DECLARE_MSM_GPIO_PINS(126);
  399. DECLARE_MSM_GPIO_PINS(127);
  400. DECLARE_MSM_GPIO_PINS(128);
  401. DECLARE_MSM_GPIO_PINS(129);
  402. DECLARE_MSM_GPIO_PINS(130);
  403. DECLARE_MSM_GPIO_PINS(131);
  404. DECLARE_MSM_GPIO_PINS(132);
  405. DECLARE_MSM_GPIO_PINS(133);
  406. DECLARE_MSM_GPIO_PINS(134);
  407. DECLARE_MSM_GPIO_PINS(135);
  408. DECLARE_MSM_GPIO_PINS(136);
  409. DECLARE_MSM_GPIO_PINS(137);
  410. DECLARE_MSM_GPIO_PINS(138);
  411. DECLARE_MSM_GPIO_PINS(139);
  412. DECLARE_MSM_GPIO_PINS(140);
  413. DECLARE_MSM_GPIO_PINS(141);
  414. DECLARE_MSM_GPIO_PINS(142);
  415. DECLARE_MSM_GPIO_PINS(143);
  416. DECLARE_MSM_GPIO_PINS(144);
  417. DECLARE_MSM_GPIO_PINS(145);
  418. DECLARE_MSM_GPIO_PINS(146);
  419. DECLARE_MSM_GPIO_PINS(147);
  420. DECLARE_MSM_GPIO_PINS(148);
  421. DECLARE_MSM_GPIO_PINS(149);
  422. DECLARE_MSM_GPIO_PINS(150);
  423. DECLARE_MSM_GPIO_PINS(151);
  424. DECLARE_MSM_GPIO_PINS(152);
  425. DECLARE_MSM_GPIO_PINS(153);
  426. DECLARE_MSM_GPIO_PINS(154);
  427. DECLARE_MSM_GPIO_PINS(155);
  428. static const unsigned int ufs_reset_pins[] = { 156 };
  429. static const unsigned int sdc1_rclk_pins[] = { 157 };
  430. static const unsigned int sdc1_clk_pins[] = { 158 };
  431. static const unsigned int sdc1_cmd_pins[] = { 159 };
  432. static const unsigned int sdc1_data_pins[] = { 160 };
  433. static const unsigned int sdc2_clk_pins[] = { 161 };
  434. static const unsigned int sdc2_cmd_pins[] = { 162 };
  435. static const unsigned int sdc2_data_pins[] = { 163 };
  436. enum sm6350_functions {
  437. msm_mux_adsp_ext,
  438. msm_mux_agera_pll,
  439. msm_mux_atest_char,
  440. msm_mux_atest_char0,
  441. msm_mux_atest_char1,
  442. msm_mux_atest_char2,
  443. msm_mux_atest_char3,
  444. msm_mux_atest_tsens,
  445. msm_mux_atest_tsens2,
  446. msm_mux_atest_usb,
  447. msm_mux_audio_ref,
  448. msm_mux_btfm_slimbus,
  449. msm_mux_cam_mclk0,
  450. msm_mux_cam_mclk1,
  451. msm_mux_cam_mclk2,
  452. msm_mux_cam_mclk3,
  453. msm_mux_cam_mclk4,
  454. msm_mux_cci_async,
  455. msm_mux_cci_i2c,
  456. msm_mux_cci_timer0,
  457. msm_mux_cci_timer1,
  458. msm_mux_cci_timer2,
  459. msm_mux_cci_timer3,
  460. msm_mux_cci_timer4,
  461. msm_mux_cri_trng,
  462. msm_mux_dbg_out,
  463. msm_mux_ddr_bist,
  464. msm_mux_ddr_pxi0,
  465. msm_mux_ddr_pxi1,
  466. msm_mux_ddr_pxi2,
  467. msm_mux_ddr_pxi3,
  468. msm_mux_dp_hot,
  469. msm_mux_edp_lcd,
  470. msm_mux_gcc_gp1,
  471. msm_mux_gcc_gp2,
  472. msm_mux_gcc_gp3,
  473. msm_mux_gp_pdm0,
  474. msm_mux_gp_pdm1,
  475. msm_mux_gp_pdm2,
  476. msm_mux_gpio,
  477. msm_mux_gps_tx,
  478. msm_mux_ibi_i3c,
  479. msm_mux_jitter_bist,
  480. msm_mux_ldo_en,
  481. msm_mux_ldo_update,
  482. msm_mux_lpass_ext,
  483. msm_mux_m_voc,
  484. msm_mux_mclk,
  485. msm_mux_mdp_vsync,
  486. msm_mux_mdp_vsync0,
  487. msm_mux_mdp_vsync1,
  488. msm_mux_mdp_vsync2,
  489. msm_mux_mdp_vsync3,
  490. msm_mux_mi2s_0,
  491. msm_mux_mi2s_1,
  492. msm_mux_mi2s_2,
  493. msm_mux_mss_lte,
  494. msm_mux_nav_gpio,
  495. msm_mux_nav_pps,
  496. msm_mux_pa_indicator,
  497. msm_mux_pcie0_clk,
  498. msm_mux_phase_flag,
  499. msm_mux_pll_bist,
  500. msm_mux_pll_bypassnl,
  501. msm_mux_pll_reset,
  502. msm_mux_prng_rosc,
  503. msm_mux_qdss_cti,
  504. msm_mux_qdss_gpio,
  505. msm_mux_qdss_gpio0,
  506. msm_mux_qdss_gpio1,
  507. msm_mux_qdss_gpio10,
  508. msm_mux_qdss_gpio11,
  509. msm_mux_qdss_gpio12,
  510. msm_mux_qdss_gpio13,
  511. msm_mux_qdss_gpio14,
  512. msm_mux_qdss_gpio15,
  513. msm_mux_qdss_gpio2,
  514. msm_mux_qdss_gpio3,
  515. msm_mux_qdss_gpio4,
  516. msm_mux_qdss_gpio5,
  517. msm_mux_qdss_gpio6,
  518. msm_mux_qdss_gpio7,
  519. msm_mux_qdss_gpio8,
  520. msm_mux_qdss_gpio9,
  521. msm_mux_qlink0_enable,
  522. msm_mux_qlink0_request,
  523. msm_mux_qlink0_wmss,
  524. msm_mux_qlink1_enable,
  525. msm_mux_qlink1_request,
  526. msm_mux_qlink1_wmss,
  527. msm_mux_qup00,
  528. msm_mux_qup01,
  529. msm_mux_qup02,
  530. msm_mux_qup10,
  531. msm_mux_qup11,
  532. msm_mux_qup12,
  533. msm_mux_qup13_f1,
  534. msm_mux_qup13_f2,
  535. msm_mux_qup14,
  536. msm_mux_rffe0_clk,
  537. msm_mux_rffe0_data,
  538. msm_mux_rffe1_clk,
  539. msm_mux_rffe1_data,
  540. msm_mux_rffe2_clk,
  541. msm_mux_rffe2_data,
  542. msm_mux_rffe3_clk,
  543. msm_mux_rffe3_data,
  544. msm_mux_rffe4_clk,
  545. msm_mux_rffe4_data,
  546. msm_mux_sd_write,
  547. msm_mux_sdc1_tb,
  548. msm_mux_sdc2_tb,
  549. msm_mux_sp_cmu,
  550. msm_mux_tgu_ch0,
  551. msm_mux_tgu_ch1,
  552. msm_mux_tgu_ch2,
  553. msm_mux_tgu_ch3,
  554. msm_mux_tsense_pwm1,
  555. msm_mux_tsense_pwm2,
  556. msm_mux_uim1_clk,
  557. msm_mux_uim1_data,
  558. msm_mux_uim1_present,
  559. msm_mux_uim1_reset,
  560. msm_mux_uim2_clk,
  561. msm_mux_uim2_data,
  562. msm_mux_uim2_present,
  563. msm_mux_uim2_reset,
  564. msm_mux_usb_phy,
  565. msm_mux_vfr_1,
  566. msm_mux_vsense_trigger,
  567. msm_mux_wlan1_adc0,
  568. msm_mux_wlan1_adc1,
  569. msm_mux_wlan2_adc0,
  570. msm_mux_wlan2_adc1,
  571. msm_mux__,
  572. };
  573. static const char * const ibi_i3c_groups[] = {
  574. "gpio0", "gpio1",
  575. };
  576. static const char * const gpio_groups[] = {
  577. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  578. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  579. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  580. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  581. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  582. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  583. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  584. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  585. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  586. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  587. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  588. "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
  589. "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
  590. "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
  591. "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  592. "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
  593. "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
  594. "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
  595. "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
  596. "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
  597. "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
  598. "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
  599. "gpio147", "gpio148", "gpio149", "gpio150", "gpio151", "gpio152",
  600. "gpio153", "gpio154", "gpio155",
  601. };
  602. static const char * const cri_trng_groups[] = {
  603. "gpio0", "gpio1", "gpio2",
  604. };
  605. static const char * const qup00_groups[] = {
  606. "gpio0", "gpio1", "gpio2", "gpio3",
  607. };
  608. static const char * const cci_i2c_groups[] = {
  609. "gpio2", "gpio3", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43",
  610. "gpio44",
  611. };
  612. static const char * const qdss_cti_groups[] = {
  613. "gpio2", "gpio3", "gpio6", "gpio7", "gpio61", "gpio62", "gpio86",
  614. "gpio87",
  615. };
  616. static const char * const sp_cmu_groups[] = {
  617. "gpio3",
  618. };
  619. static const char * const dbg_out_groups[] = {
  620. "gpio3",
  621. };
  622. static const char * const qup14_groups[] = {
  623. "gpio4", "gpio4", "gpio5", "gpio5",
  624. };
  625. static const char * const sdc1_tb_groups[] = {
  626. "gpio4",
  627. };
  628. static const char * const sdc2_tb_groups[] = {
  629. "gpio5",
  630. };
  631. static const char * const mdp_vsync_groups[] = {
  632. "gpio6", "gpio23", "gpio24", "gpio27", "gpio28",
  633. };
  634. static const char * const gp_pdm1_groups[] = {
  635. "gpio8", "gpio52",
  636. };
  637. static const char * const qdss_gpio_groups[] = {
  638. "gpio8", "gpio9", "gpio63", "gpio64",
  639. };
  640. static const char * const m_voc_groups[] = {
  641. "gpio12",
  642. };
  643. static const char * const dp_hot_groups[] = {
  644. "gpio12", "gpio118",
  645. };
  646. static const char * const phase_flag_groups[] = {
  647. "gpio12", "gpio17", "gpio18", "gpio34", "gpio35",
  648. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40",
  649. "gpio41", "gpio42", "gpio43", "gpio44", "gpio45",
  650. "gpio46", "gpio47", "gpio48", "gpio49", "gpio50",
  651. "gpio51", "gpio52", "gpio53", "gpio56", "gpio57",
  652. "gpio60", "gpio61", "gpio62", "gpio63", "gpio64",
  653. "gpio67", "gpio68",
  654. };
  655. static const char * const qup10_groups[] = {
  656. "gpio13", "gpio14", "gpio15", "gpio16", "gpio17",
  657. };
  658. static const char * const pll_bypassnl_groups[] = {
  659. "gpio13",
  660. };
  661. static const char * const pll_reset_groups[] = {
  662. "gpio14",
  663. };
  664. static const char * const qup12_groups[] = {
  665. "gpio19", "gpio19", "gpio20", "gpio20",
  666. };
  667. static const char * const ddr_bist_groups[] = {
  668. "gpio19", "gpio20", "gpio21", "gpio22",
  669. };
  670. static const char * const gcc_gp2_groups[] = {
  671. "gpio21",
  672. };
  673. static const char * const gcc_gp3_groups[] = {
  674. "gpio22",
  675. };
  676. static const char * const edp_lcd_groups[] = {
  677. "gpio23",
  678. };
  679. static const char * const qup13_f1_groups[] = {
  680. "gpio25", "gpio26",
  681. };
  682. static const char * const qup13_f2_groups[] = {
  683. "gpio25", "gpio26",
  684. };
  685. static const char * const qup11_groups[] = {
  686. "gpio27", "gpio27", "gpio28", "gpio28",
  687. };
  688. static const char * const pll_bist_groups[] = {
  689. "gpio27",
  690. };
  691. static const char * const qdss_gpio14_groups[] = {
  692. "gpio27", "gpio36",
  693. };
  694. static const char * const qdss_gpio15_groups[] = {
  695. "gpio28", "gpio37",
  696. };
  697. static const char * const cam_mclk0_groups[] = {
  698. "gpio29",
  699. };
  700. static const char * const cam_mclk1_groups[] = {
  701. "gpio30",
  702. };
  703. static const char * const cam_mclk2_groups[] = {
  704. "gpio31",
  705. };
  706. static const char * const cam_mclk3_groups[] = {
  707. "gpio32",
  708. };
  709. static const char * const cam_mclk4_groups[] = {
  710. "gpio33",
  711. };
  712. static const char * const cci_timer0_groups[] = {
  713. "gpio34",
  714. };
  715. static const char * const qdss_gpio12_groups[] = {
  716. "gpio34", "gpio52",
  717. };
  718. static const char * const cci_timer1_groups[] = {
  719. "gpio35",
  720. };
  721. static const char * const cci_async_groups[] = {
  722. "gpio35", "gpio36", "gpio48", "gpio52", "gpio53",
  723. };
  724. static const char * const qdss_gpio13_groups[] = {
  725. "gpio35", "gpio53",
  726. };
  727. static const char * const cci_timer2_groups[] = {
  728. "gpio36",
  729. };
  730. static const char * const cci_timer3_groups[] = {
  731. "gpio37",
  732. };
  733. static const char * const gp_pdm0_groups[] = {
  734. "gpio37", "gpio68",
  735. };
  736. static const char * const cci_timer4_groups[] = {
  737. "gpio38",
  738. };
  739. static const char * const qdss_gpio2_groups[] = {
  740. "gpio38", "gpio41",
  741. };
  742. static const char * const qdss_gpio0_groups[] = {
  743. "gpio39", "gpio65",
  744. };
  745. static const char * const qdss_gpio1_groups[] = {
  746. "gpio40", "gpio66",
  747. };
  748. static const char * const qdss_gpio3_groups[] = {
  749. "gpio42", "gpio47",
  750. };
  751. static const char * const qdss_gpio4_groups[] = {
  752. "gpio43", "gpio88",
  753. };
  754. static const char * const qdss_gpio5_groups[] = {
  755. "gpio44", "gpio89",
  756. };
  757. static const char * const qup02_groups[] = {
  758. "gpio45", "gpio46", "gpio48", "gpio56", "gpio57",
  759. };
  760. static const char * const qdss_gpio6_groups[] = {
  761. "gpio45", "gpio90",
  762. };
  763. static const char * const qdss_gpio7_groups[] = {
  764. "gpio46", "gpio91",
  765. };
  766. static const char * const mdp_vsync0_groups[] = {
  767. "gpio47",
  768. };
  769. static const char * const mdp_vsync1_groups[] = {
  770. "gpio48",
  771. };
  772. static const char * const gcc_gp1_groups[] = {
  773. "gpio48", "gpio58",
  774. };
  775. static const char * const qdss_gpio8_groups[] = {
  776. "gpio48", "gpio92",
  777. };
  778. static const char * const vfr_1_groups[] = {
  779. "gpio49",
  780. };
  781. static const char * const qdss_gpio9_groups[] = {
  782. "gpio49", "gpio93",
  783. };
  784. static const char * const qdss_gpio10_groups[] = {
  785. "gpio50", "gpio56",
  786. };
  787. static const char * const qdss_gpio11_groups[] = {
  788. "gpio51", "gpio57",
  789. };
  790. static const char * const mdp_vsync2_groups[] = {
  791. "gpio56",
  792. };
  793. static const char * const mdp_vsync3_groups[] = {
  794. "gpio57",
  795. };
  796. static const char * const gp_pdm2_groups[] = {
  797. "gpio57",
  798. };
  799. static const char * const audio_ref_groups[] = {
  800. "gpio60",
  801. };
  802. static const char * const lpass_ext_groups[] = {
  803. "gpio60", "gpio93",
  804. };
  805. static const char * const mi2s_2_groups[] = {
  806. "gpio60", "gpio72", "gpio73", "gpio74",
  807. };
  808. static const char * const qup01_groups[] = {
  809. "gpio61", "gpio62", "gpio63", "gpio64",
  810. };
  811. static const char * const tgu_ch0_groups[] = {
  812. "gpio61",
  813. };
  814. static const char * const tgu_ch1_groups[] = {
  815. "gpio62",
  816. };
  817. static const char * const tgu_ch2_groups[] = {
  818. "gpio63",
  819. };
  820. static const char * const tgu_ch3_groups[] = {
  821. "gpio64",
  822. };
  823. static const char * const mss_lte_groups[] = {
  824. "gpio65", "gpio66",
  825. };
  826. static const char * const btfm_slimbus_groups[] = {
  827. "gpio67", "gpio68", "gpio86", "gpio87",
  828. };
  829. static const char * const mi2s_1_groups[] = {
  830. "gpio67", "gpio68", "gpio86", "gpio87",
  831. };
  832. static const char * const uim2_data_groups[] = {
  833. "gpio75",
  834. };
  835. static const char * const uim2_clk_groups[] = {
  836. "gpio76",
  837. };
  838. static const char * const uim2_reset_groups[] = {
  839. "gpio77",
  840. };
  841. static const char * const uim2_present_groups[] = {
  842. "gpio78",
  843. };
  844. static const char * const uim1_data_groups[] = {
  845. "gpio79",
  846. };
  847. static const char * const uim1_clk_groups[] = {
  848. "gpio80",
  849. };
  850. static const char * const uim1_reset_groups[] = {
  851. "gpio81",
  852. };
  853. static const char * const uim1_present_groups[] = {
  854. "gpio82",
  855. };
  856. static const char * const atest_usb_groups[] = {
  857. "gpio83", "gpio84", "gpio85", "gpio86",
  858. "gpio87", "gpio88", "gpio89", "gpio90",
  859. "gpio91", "gpio92",
  860. };
  861. static const char * const sd_write_groups[] = {
  862. "gpio85",
  863. };
  864. static const char * const ddr_pxi0_groups[] = {
  865. "gpio86", "gpio90",
  866. };
  867. static const char * const adsp_ext_groups[] = {
  868. "gpio87",
  869. };
  870. static const char * const ddr_pxi1_groups[] = {
  871. "gpio87", "gpio91",
  872. };
  873. static const char * const mi2s_0_groups[] = {
  874. "gpio88", "gpio89", "gpio90", "gpio91",
  875. };
  876. static const char * const ddr_pxi2_groups[] = {
  877. "gpio88", "gpio92",
  878. };
  879. static const char * const tsense_pwm1_groups[] = {
  880. "gpio88",
  881. };
  882. static const char * const tsense_pwm2_groups[] = {
  883. "gpio88",
  884. };
  885. static const char * const agera_pll_groups[] = {
  886. "gpio89",
  887. };
  888. static const char * const vsense_trigger_groups[] = {
  889. "gpio89",
  890. };
  891. static const char * const ddr_pxi3_groups[] = {
  892. "gpio89", "gpio93",
  893. };
  894. static const char * const jitter_bist_groups[] = {
  895. "gpio90",
  896. };
  897. static const char * const wlan1_adc0_groups[] = {
  898. "gpio90",
  899. };
  900. static const char * const wlan2_adc0_groups[] = {
  901. "gpio91",
  902. };
  903. static const char * const atest_tsens_groups[] = {
  904. "gpio92",
  905. };
  906. static const char * const wlan1_adc1_groups[] = {
  907. "gpio92",
  908. };
  909. static const char * const mclk_groups[] = {
  910. "gpio93",
  911. };
  912. static const char * const atest_tsens2_groups[] = {
  913. "gpio93",
  914. };
  915. static const char * const wlan2_adc1_groups[] = {
  916. "gpio93",
  917. };
  918. static const char * const ldo_en_groups[] = {
  919. "gpio95",
  920. };
  921. static const char * const atest_char_groups[] = {
  922. "gpio95",
  923. };
  924. static const char * const ldo_update_groups[] = {
  925. "gpio96",
  926. };
  927. static const char * const atest_char0_groups[] = {
  928. "gpio96",
  929. };
  930. static const char * const prng_rosc_groups[] = {
  931. "gpio97",
  932. };
  933. static const char * const atest_char1_groups[] = {
  934. "gpio97",
  935. };
  936. static const char * const atest_char2_groups[] = {
  937. "gpio98",
  938. };
  939. static const char * const atest_char3_groups[] = {
  940. "gpio99",
  941. };
  942. static const char * const nav_gpio_groups[] = {
  943. "gpio101", "gpio102",
  944. };
  945. static const char * const nav_pps_groups[] = {
  946. "gpio101", "gpio101", "gpio102", "gpio102",
  947. };
  948. static const char * const gps_tx_groups[] = {
  949. "gpio101", "gpio102", "gpio107", "gpio108",
  950. };
  951. static const char * const qlink0_wmss_groups[] = {
  952. "gpio103",
  953. };
  954. static const char * const qlink0_request_groups[] = {
  955. "gpio104",
  956. };
  957. static const char * const qlink0_enable_groups[] = {
  958. "gpio105",
  959. };
  960. static const char * const qlink1_wmss_groups[] = {
  961. "gpio106",
  962. };
  963. static const char * const qlink1_request_groups[] = {
  964. "gpio107",
  965. };
  966. static const char * const qlink1_enable_groups[] = {
  967. "gpio108",
  968. };
  969. static const char * const rffe0_data_groups[] = {
  970. "gpio109",
  971. };
  972. static const char * const rffe0_clk_groups[] = {
  973. "gpio110",
  974. };
  975. static const char * const rffe1_data_groups[] = {
  976. "gpio111",
  977. };
  978. static const char * const rffe1_clk_groups[] = {
  979. "gpio112",
  980. };
  981. static const char * const rffe2_data_groups[] = {
  982. "gpio113",
  983. };
  984. static const char * const rffe2_clk_groups[] = {
  985. "gpio114",
  986. };
  987. static const char * const rffe3_data_groups[] = {
  988. "gpio115",
  989. };
  990. static const char * const rffe3_clk_groups[] = {
  991. "gpio116",
  992. };
  993. static const char * const rffe4_data_groups[] = {
  994. "gpio117",
  995. };
  996. static const char * const rffe4_clk_groups[] = {
  997. "gpio118",
  998. };
  999. static const char * const pa_indicator_groups[] = {
  1000. "gpio118",
  1001. };
  1002. static const char * const pcie0_clk_groups[] = {
  1003. "gpio122",
  1004. };
  1005. static const char * const usb_phy_groups[] = {
  1006. "gpio124",
  1007. };
  1008. static const struct msm_function sm6350_functions[] = {
  1009. FUNCTION(adsp_ext),
  1010. FUNCTION(agera_pll),
  1011. FUNCTION(atest_char),
  1012. FUNCTION(atest_char0),
  1013. FUNCTION(atest_char1),
  1014. FUNCTION(atest_char2),
  1015. FUNCTION(atest_char3),
  1016. FUNCTION(atest_tsens),
  1017. FUNCTION(atest_tsens2),
  1018. FUNCTION(atest_usb),
  1019. FUNCTION(audio_ref),
  1020. FUNCTION(btfm_slimbus),
  1021. FUNCTION(cam_mclk0),
  1022. FUNCTION(cam_mclk1),
  1023. FUNCTION(cam_mclk2),
  1024. FUNCTION(cam_mclk3),
  1025. FUNCTION(cam_mclk4),
  1026. FUNCTION(cci_async),
  1027. FUNCTION(cci_i2c),
  1028. FUNCTION(cci_timer0),
  1029. FUNCTION(cci_timer1),
  1030. FUNCTION(cci_timer2),
  1031. FUNCTION(cci_timer3),
  1032. FUNCTION(cci_timer4),
  1033. FUNCTION(cri_trng),
  1034. FUNCTION(dbg_out),
  1035. FUNCTION(ddr_bist),
  1036. FUNCTION(ddr_pxi0),
  1037. FUNCTION(ddr_pxi1),
  1038. FUNCTION(ddr_pxi2),
  1039. FUNCTION(ddr_pxi3),
  1040. FUNCTION(dp_hot),
  1041. FUNCTION(edp_lcd),
  1042. FUNCTION(gcc_gp1),
  1043. FUNCTION(gcc_gp2),
  1044. FUNCTION(gcc_gp3),
  1045. FUNCTION(gp_pdm0),
  1046. FUNCTION(gp_pdm1),
  1047. FUNCTION(gp_pdm2),
  1048. FUNCTION(gpio),
  1049. FUNCTION(gps_tx),
  1050. FUNCTION(ibi_i3c),
  1051. FUNCTION(jitter_bist),
  1052. FUNCTION(ldo_en),
  1053. FUNCTION(ldo_update),
  1054. FUNCTION(lpass_ext),
  1055. FUNCTION(m_voc),
  1056. FUNCTION(mclk),
  1057. FUNCTION(mdp_vsync),
  1058. FUNCTION(mdp_vsync0),
  1059. FUNCTION(mdp_vsync1),
  1060. FUNCTION(mdp_vsync2),
  1061. FUNCTION(mdp_vsync3),
  1062. FUNCTION(mi2s_0),
  1063. FUNCTION(mi2s_1),
  1064. FUNCTION(mi2s_2),
  1065. FUNCTION(mss_lte),
  1066. FUNCTION(nav_gpio),
  1067. FUNCTION(nav_pps),
  1068. FUNCTION(pa_indicator),
  1069. FUNCTION(pcie0_clk),
  1070. FUNCTION(phase_flag),
  1071. FUNCTION(pll_bist),
  1072. FUNCTION(pll_bypassnl),
  1073. FUNCTION(pll_reset),
  1074. FUNCTION(prng_rosc),
  1075. FUNCTION(qdss_cti),
  1076. FUNCTION(qdss_gpio),
  1077. FUNCTION(qdss_gpio0),
  1078. FUNCTION(qdss_gpio1),
  1079. FUNCTION(qdss_gpio10),
  1080. FUNCTION(qdss_gpio11),
  1081. FUNCTION(qdss_gpio12),
  1082. FUNCTION(qdss_gpio13),
  1083. FUNCTION(qdss_gpio14),
  1084. FUNCTION(qdss_gpio15),
  1085. FUNCTION(qdss_gpio2),
  1086. FUNCTION(qdss_gpio3),
  1087. FUNCTION(qdss_gpio4),
  1088. FUNCTION(qdss_gpio5),
  1089. FUNCTION(qdss_gpio6),
  1090. FUNCTION(qdss_gpio7),
  1091. FUNCTION(qdss_gpio8),
  1092. FUNCTION(qdss_gpio9),
  1093. FUNCTION(qlink0_enable),
  1094. FUNCTION(qlink0_request),
  1095. FUNCTION(qlink0_wmss),
  1096. FUNCTION(qlink1_enable),
  1097. FUNCTION(qlink1_request),
  1098. FUNCTION(qlink1_wmss),
  1099. FUNCTION(qup00),
  1100. FUNCTION(qup01),
  1101. FUNCTION(qup02),
  1102. FUNCTION(qup10),
  1103. FUNCTION(qup11),
  1104. FUNCTION(qup12),
  1105. FUNCTION(qup13_f1),
  1106. FUNCTION(qup13_f2),
  1107. FUNCTION(qup14),
  1108. FUNCTION(rffe0_clk),
  1109. FUNCTION(rffe0_data),
  1110. FUNCTION(rffe1_clk),
  1111. FUNCTION(rffe1_data),
  1112. FUNCTION(rffe2_clk),
  1113. FUNCTION(rffe2_data),
  1114. FUNCTION(rffe3_clk),
  1115. FUNCTION(rffe3_data),
  1116. FUNCTION(rffe4_clk),
  1117. FUNCTION(rffe4_data),
  1118. FUNCTION(sd_write),
  1119. FUNCTION(sdc1_tb),
  1120. FUNCTION(sdc2_tb),
  1121. FUNCTION(sp_cmu),
  1122. FUNCTION(tgu_ch0),
  1123. FUNCTION(tgu_ch1),
  1124. FUNCTION(tgu_ch2),
  1125. FUNCTION(tgu_ch3),
  1126. FUNCTION(tsense_pwm1),
  1127. FUNCTION(tsense_pwm2),
  1128. FUNCTION(uim1_clk),
  1129. FUNCTION(uim1_data),
  1130. FUNCTION(uim1_present),
  1131. FUNCTION(uim1_reset),
  1132. FUNCTION(uim2_clk),
  1133. FUNCTION(uim2_data),
  1134. FUNCTION(uim2_present),
  1135. FUNCTION(uim2_reset),
  1136. FUNCTION(usb_phy),
  1137. FUNCTION(vfr_1),
  1138. FUNCTION(vsense_trigger),
  1139. FUNCTION(wlan1_adc0),
  1140. FUNCTION(wlan1_adc1),
  1141. FUNCTION(wlan2_adc0),
  1142. FUNCTION(wlan2_adc1),
  1143. };
  1144. /*
  1145. * Every pin is maintained as a single group, and missing or non-existing pin
  1146. * would be maintained as dummy group to synchronize pin group index with
  1147. * pin descriptor registered with pinctrl core.
  1148. * Clients would not be able to request these dummy pin groups.
  1149. */
  1150. static const struct msm_pingroup sm6350_groups[] = {
  1151. [0] = PINGROUP(0, ibi_i3c, qup00, cri_trng, _, _, _, _, _, _),
  1152. [1] = PINGROUP(1, ibi_i3c, qup00, cri_trng, _, _, _, _, _, _),
  1153. [2] = PINGROUP(2, qup00, cci_i2c, cri_trng, qdss_cti, _, _, _, _, _),
  1154. [3] = PINGROUP(3, qup00, cci_i2c, sp_cmu, dbg_out, qdss_cti, _, _, _, _),
  1155. [4] = PINGROUP(4, qup14, qup14, sdc1_tb, _, _, _, _, _, _),
  1156. [5] = PINGROUP(5, qup14, qup14, sdc2_tb, _, _, _, _, _, _),
  1157. [6] = PINGROUP(6, mdp_vsync, qdss_cti, _, _, _, _, _, _, _),
  1158. [7] = PINGROUP(7, qdss_cti, _, _, _, _, _, _, _, _),
  1159. [8] = PINGROUP(8, gp_pdm1, qdss_gpio, _, _, _, _, _, _, _),
  1160. [9] = PINGROUP(9, qdss_gpio, _, _, _, _, _, _, _, _),
  1161. [10] = PINGROUP(10, _, _, _, _, _, _, _, _, _),
  1162. [11] = PINGROUP(11, _, _, _, _, _, _, _, _, _),
  1163. [12] = PINGROUP(12, m_voc, dp_hot, _, phase_flag, _, _, _, _, _),
  1164. [13] = PINGROUP(13, qup10, pll_bypassnl, _, _, _, _, _, _, _),
  1165. [14] = PINGROUP(14, qup10, pll_reset, _, _, _, _, _, _, _),
  1166. [15] = PINGROUP(15, qup10, _, _, _, _, _, _, _, _),
  1167. [16] = PINGROUP(16, qup10, _, _, _, _, _, _, _, _),
  1168. [17] = PINGROUP(17, _, phase_flag, qup10, _, _, _, _, _, _),
  1169. [18] = PINGROUP(18, _, phase_flag, _, _, _, _, _, _, _),
  1170. [19] = PINGROUP(19, qup12, qup12, ddr_bist, _, _, _, _, _, _),
  1171. [20] = PINGROUP(20, qup12, qup12, ddr_bist, _, _, _, _, _, _),
  1172. [21] = PINGROUP(21, gcc_gp2, ddr_bist, _, _, _, _, _, _, _),
  1173. [22] = PINGROUP(22, gcc_gp3, ddr_bist, _, _, _, _, _, _, _),
  1174. [23] = PINGROUP(23, mdp_vsync, edp_lcd, _, _, _, _, _, _, _),
  1175. [24] = PINGROUP(24, mdp_vsync, _, _, _, _, _, _, _, _),
  1176. [25] = PINGROUP(25, qup13_f1, qup13_f2, _, _, _, _, _, _, _),
  1177. [26] = PINGROUP(26, qup13_f1, qup13_f2, _, _, _, _, _, _, _),
  1178. [27] = PINGROUP(27, qup11, qup11, mdp_vsync, pll_bist, _, qdss_gpio14, _, _, _),
  1179. [28] = PINGROUP(28, qup11, qup11, mdp_vsync, _, qdss_gpio15, _, _, _, _),
  1180. [29] = PINGROUP(29, cam_mclk0, _, _, _, _, _, _, _, _),
  1181. [30] = PINGROUP(30, cam_mclk1, _, _, _, _, _, _, _, _),
  1182. [31] = PINGROUP(31, cam_mclk2, _, _, _, _, _, _, _, _),
  1183. [32] = PINGROUP(32, cam_mclk3, _, _, _, _, _, _, _, _),
  1184. [33] = PINGROUP(33, cam_mclk4, _, _, _, _, _, _, _, _),
  1185. [34] = PINGROUP(34, cci_timer0, _, phase_flag, qdss_gpio12, _, _, _, _, _),
  1186. [35] = PINGROUP(35, cci_timer1, cci_async, _, phase_flag, qdss_gpio13, _, _, _, _),
  1187. [36] = PINGROUP(36, cci_timer2, cci_async, _, phase_flag, qdss_gpio14, _, _, _, _),
  1188. [37] = PINGROUP(37, cci_timer3, gp_pdm0, _, phase_flag, qdss_gpio15, _, _, _, _),
  1189. [38] = PINGROUP(38, cci_timer4, _, phase_flag, qdss_gpio2, _, _, _, _, _),
  1190. [39] = PINGROUP(39, cci_i2c, _, phase_flag, qdss_gpio0, _, _, _, _, _),
  1191. [40] = PINGROUP(40, cci_i2c, _, phase_flag, qdss_gpio1, _, _, _, _, _),
  1192. [41] = PINGROUP(41, cci_i2c, _, phase_flag, qdss_gpio2, _, _, _, _, _),
  1193. [42] = PINGROUP(42, cci_i2c, _, phase_flag, qdss_gpio3, _, _, _, _, _),
  1194. [43] = PINGROUP(43, cci_i2c, _, phase_flag, qdss_gpio4, _, _, _, _, _),
  1195. [44] = PINGROUP(44, cci_i2c, _, phase_flag, qdss_gpio5, _, _, _, _, _),
  1196. [45] = PINGROUP(45, qup02, _, phase_flag, qdss_gpio6, _, _, _, _, _),
  1197. [46] = PINGROUP(46, qup02, _, phase_flag, qdss_gpio7, _, _, _, _, _),
  1198. [47] = PINGROUP(47, mdp_vsync0, _, phase_flag, qdss_gpio3, _, _, _, _, _),
  1199. [48] = PINGROUP(48, cci_async, mdp_vsync1, gcc_gp1, _, phase_flag, qdss_gpio8, qup02, _, _),
  1200. [49] = PINGROUP(49, vfr_1, _, phase_flag, qdss_gpio9, _, _, _, _, _),
  1201. [50] = PINGROUP(50, _, phase_flag, qdss_gpio10, _, _, _, _, _, _),
  1202. [51] = PINGROUP(51, _, phase_flag, qdss_gpio11, _, _, _, _, _, _),
  1203. [52] = PINGROUP(52, cci_async, gp_pdm1, _, phase_flag, qdss_gpio12, _, _, _, _),
  1204. [53] = PINGROUP(53, cci_async, _, phase_flag, qdss_gpio13, _, _, _, _, _),
  1205. [54] = PINGROUP(54, _, _, _, _, _, _, _, _, _),
  1206. [55] = PINGROUP(55, _, _, _, _, _, _, _, _, _),
  1207. [56] = PINGROUP(56, qup02, mdp_vsync2, _, phase_flag, qdss_gpio10, _, _, _, _),
  1208. [57] = PINGROUP(57, qup02, mdp_vsync3, gp_pdm2, _, phase_flag, qdss_gpio11, _, _, _),
  1209. [58] = PINGROUP(58, gcc_gp1, _, _, _, _, _, _, _, _),
  1210. [59] = PINGROUP(59, _, _, _, _, _, _, _, _, _),
  1211. [60] = PINGROUP(60, audio_ref, lpass_ext, mi2s_2, _, phase_flag, _, _, _, _),
  1212. [61] = PINGROUP(61, qup01, tgu_ch0, _, phase_flag, qdss_cti, _, _, _, _),
  1213. [62] = PINGROUP(62, qup01, tgu_ch1, _, phase_flag, qdss_cti, _, _, _, _),
  1214. [63] = PINGROUP(63, qup01, tgu_ch2, _, phase_flag, qdss_gpio, _, _, _, _),
  1215. [64] = PINGROUP(64, qup01, tgu_ch3, _, phase_flag, qdss_gpio, _, _, _, _),
  1216. [65] = PINGROUP(65, mss_lte, _, qdss_gpio0, _, _, _, _, _, _),
  1217. [66] = PINGROUP(66, mss_lte, _, qdss_gpio1, _, _, _, _, _, _),
  1218. [67] = PINGROUP(67, btfm_slimbus, mi2s_1, _, phase_flag, _, _, _, _, _),
  1219. [68] = PINGROUP(68, btfm_slimbus, mi2s_1, gp_pdm0, _, phase_flag, _, _, _, _),
  1220. [69] = PINGROUP(69, _, _, _, _, _, _, _, _, _),
  1221. [70] = PINGROUP(70, _, _, _, _, _, _, _, _, _),
  1222. [71] = PINGROUP(71, _, _, _, _, _, _, _, _, _),
  1223. [72] = PINGROUP(72, mi2s_2, _, _, _, _, _, _, _, _),
  1224. [73] = PINGROUP(73, mi2s_2, _, _, _, _, _, _, _, _),
  1225. [74] = PINGROUP(74, mi2s_2, _, _, _, _, _, _, _, _),
  1226. [75] = PINGROUP(75, uim2_data, _, _, _, _, _, _, _, _),
  1227. [76] = PINGROUP(76, uim2_clk, _, _, _, _, _, _, _, _),
  1228. [77] = PINGROUP(77, uim2_reset, _, _, _, _, _, _, _, _),
  1229. [78] = PINGROUP(78, uim2_present, _, _, _, _, _, _, _, _),
  1230. [79] = PINGROUP(79, uim1_data, _, _, _, _, _, _, _, _),
  1231. [80] = PINGROUP(80, uim1_clk, _, _, _, _, _, _, _, _),
  1232. [81] = PINGROUP(81, uim1_reset, _, _, _, _, _, _, _, _),
  1233. [82] = PINGROUP(82, uim1_present, _, _, _, _, _, _, _, _),
  1234. [83] = PINGROUP(83, atest_usb, _, _, _, _, _, _, _, _),
  1235. [84] = PINGROUP(84, _, atest_usb, _, _, _, _, _, _, _),
  1236. [85] = PINGROUP(85, sd_write, _, atest_usb, _, _, _, _, _, _),
  1237. [86] = PINGROUP(86, btfm_slimbus, mi2s_1, _, qdss_cti, atest_usb, ddr_pxi0, _, _, _),
  1238. [87] = PINGROUP(87, btfm_slimbus, mi2s_1, adsp_ext, _, qdss_cti, atest_usb, ddr_pxi1, _, _),
  1239. [88] = PINGROUP(88, mi2s_0, _, qdss_gpio4, _, atest_usb, ddr_pxi2,
  1240. tsense_pwm1, tsense_pwm2, _),
  1241. [89] = PINGROUP(89, mi2s_0, agera_pll, _, qdss_gpio5, _,
  1242. vsense_trigger, atest_usb, ddr_pxi3, _),
  1243. [90] = PINGROUP(90, mi2s_0, jitter_bist, _, qdss_gpio6, _,
  1244. wlan1_adc0, atest_usb, ddr_pxi0, _),
  1245. [91] = PINGROUP(91, mi2s_0, _, qdss_gpio7, _, wlan2_adc0,
  1246. atest_usb, ddr_pxi1, _, _),
  1247. [92] = PINGROUP(92, _, qdss_gpio8, atest_tsens, wlan1_adc1,
  1248. atest_usb, ddr_pxi2, _, _, _),
  1249. [93] = PINGROUP(93, mclk, lpass_ext, _, qdss_gpio9, atest_tsens2,
  1250. wlan2_adc1, ddr_pxi3, _, _),
  1251. [94] = PINGROUP(94, _, _, _, _, _, _, _, _, _),
  1252. [95] = PINGROUP(95, ldo_en, _, atest_char, _, _, _, _, _, _),
  1253. [96] = PINGROUP(96, ldo_update, _, atest_char0, _, _, _, _, _, _),
  1254. [97] = PINGROUP(97, prng_rosc, _, atest_char1, _, _, _, _, _, _),
  1255. [98] = PINGROUP(98, _, atest_char2, _, _, _, _, _, _, _),
  1256. [99] = PINGROUP(99, _, atest_char3, _, _, _, _, _, _, _),
  1257. [100] = PINGROUP(100, _, _, _, _, _, _, _, _, _),
  1258. [101] = PINGROUP(101, nav_gpio, nav_pps, nav_pps, gps_tx, _, _, _, _, _),
  1259. [102] = PINGROUP(102, nav_gpio, nav_pps, nav_pps, gps_tx, _, _, _, _, _),
  1260. [103] = PINGROUP(103, qlink0_wmss, _, _, _, _, _, _, _, _),
  1261. [104] = PINGROUP(104, qlink0_request, _, _, _, _, _, _, _, _),
  1262. [105] = PINGROUP(105, qlink0_enable, _, _, _, _, _, _, _, _),
  1263. [106] = PINGROUP(106, qlink1_wmss, _, _, _, _, _, _, _, _),
  1264. [107] = PINGROUP(107, qlink1_request, gps_tx, _, _, _, _, _, _, _),
  1265. [108] = PINGROUP(108, qlink1_enable, gps_tx, _, _, _, _, _, _, _),
  1266. [109] = PINGROUP(109, rffe0_data, _, _, _, _, _, _, _, _),
  1267. [110] = PINGROUP(110, rffe0_clk, _, _, _, _, _, _, _, _),
  1268. [111] = PINGROUP(111, rffe1_data, _, _, _, _, _, _, _, _),
  1269. [112] = PINGROUP(112, rffe1_clk, _, _, _, _, _, _, _, _),
  1270. [113] = PINGROUP(113, rffe2_data, _, _, _, _, _, _, _, _),
  1271. [114] = PINGROUP(114, rffe2_clk, _, _, _, _, _, _, _, _),
  1272. [115] = PINGROUP(115, rffe3_data, _, _, _, _, _, _, _, _),
  1273. [116] = PINGROUP(116, rffe3_clk, _, _, _, _, _, _, _, _),
  1274. [117] = PINGROUP(117, rffe4_data, _, _, _, _, _, _, _, _),
  1275. [118] = PINGROUP(118, rffe4_clk, _, pa_indicator, dp_hot, _, _, _, _, _),
  1276. [119] = PINGROUP(119, _, _, _, _, _, _, _, _, _),
  1277. [120] = PINGROUP(120, _, _, _, _, _, _, _, _, _),
  1278. [121] = PINGROUP(121, _, _, _, _, _, _, _, _, _),
  1279. [122] = PINGROUP(122, pcie0_clk, _, _, _, _, _, _, _, _),
  1280. [123] = PINGROUP(123, _, _, _, _, _, _, _, _, _),
  1281. [124] = PINGROUP(124, usb_phy, _, _, _, _, _, _, _, _),
  1282. [125] = PINGROUP(125, _, _, _, _, _, _, _, _, _),
  1283. [126] = PINGROUP(126, _, _, _, _, _, _, _, _, _),
  1284. [127] = PINGROUP(127, _, _, _, _, _, _, _, _, _),
  1285. [128] = PINGROUP(128, _, _, _, _, _, _, _, _, _),
  1286. [129] = PINGROUP(129, _, _, _, _, _, _, _, _, _),
  1287. [130] = PINGROUP(130, _, _, _, _, _, _, _, _, _),
  1288. [131] = PINGROUP(131, _, _, _, _, _, _, _, _, _),
  1289. [132] = PINGROUP(132, _, _, _, _, _, _, _, _, _),
  1290. [133] = PINGROUP(133, _, _, _, _, _, _, _, _, _),
  1291. [134] = PINGROUP(134, _, _, _, _, _, _, _, _, _),
  1292. [135] = PINGROUP(135, _, _, _, _, _, _, _, _, _),
  1293. [136] = PINGROUP(136, _, _, _, _, _, _, _, _, _),
  1294. [137] = PINGROUP(137, _, _, _, _, _, _, _, _, _),
  1295. [138] = PINGROUP(138, _, _, _, _, _, _, _, _, _),
  1296. [139] = PINGROUP(139, _, _, _, _, _, _, _, _, _),
  1297. [140] = PINGROUP(140, _, _, _, _, _, _, _, _, _),
  1298. [141] = PINGROUP(141, _, _, _, _, _, _, _, _, _),
  1299. [142] = PINGROUP(142, _, _, _, _, _, _, _, _, _),
  1300. [143] = PINGROUP(143, _, _, _, _, _, _, _, _, _),
  1301. [144] = PINGROUP(144, _, _, _, _, _, _, _, _, _),
  1302. [145] = PINGROUP(145, _, _, _, _, _, _, _, _, _),
  1303. [146] = PINGROUP(146, _, _, _, _, _, _, _, _, _),
  1304. [147] = PINGROUP(147, _, _, _, _, _, _, _, _, _),
  1305. [148] = PINGROUP(148, _, _, _, _, _, _, _, _, _),
  1306. [149] = PINGROUP(149, _, _, _, _, _, _, _, _, _),
  1307. [150] = PINGROUP(150, _, _, _, _, _, _, _, _, _),
  1308. [151] = PINGROUP(151, _, _, _, _, _, _, _, _, _),
  1309. [152] = PINGROUP(152, _, _, _, _, _, _, _, _, _),
  1310. [153] = PINGROUP(153, _, _, _, _, _, _, _, _, _),
  1311. [154] = PINGROUP(154, _, _, _, _, _, _, _, _, _),
  1312. [155] = PINGROUP(155, _, _, _, _, _, _, _, _, _),
  1313. [156] = UFS_RESET(ufs_reset, 0xae000),
  1314. [157] = SDC_PINGROUP(sdc1_rclk, 0xa1000, 15, 0),
  1315. [158] = SDC_PINGROUP(sdc1_clk, 0xa0000, 13, 6),
  1316. [159] = SDC_PINGROUP(sdc1_cmd, 0xa0000, 11, 3),
  1317. [160] = SDC_PINGROUP(sdc1_data, 0xa0000, 9, 0),
  1318. [161] = SDC_PINGROUP(sdc2_clk, 0xa2000, 14, 6),
  1319. [162] = SDC_PINGROUP(sdc2_cmd, 0xa2000, 11, 3),
  1320. [163] = SDC_PINGROUP(sdc2_data, 0xa2000, 9, 0),
  1321. };
  1322. static const struct msm_gpio_wakeirq_map sm6350_pdc_map[] = {
  1323. { 3, 126 }, { 4, 151 }, { 7, 58 }, { 8, 113 }, { 9, 66 }, { 11, 106 },
  1324. { 12, 59 }, { 13, 112 }, { 16, 73 }, { 17, 74 }, { 18, 75 }, { 19, 76 },
  1325. { 21, 130 }, { 22, 96 }, { 23, 146 }, { 24, 114 }, { 25, 83 },
  1326. { 27, 84 }, { 28, 85 }, { 34, 147 }, { 35, 92 }, { 36, 93 }, { 37, 94 },
  1327. { 38, 68 }, { 48, 100 }, { 50, 57 }, { 51, 81 }, { 52, 80 }, { 53, 69 },
  1328. { 54, 71 }, { 55, 70 }, { 57, 152 }, { 58, 115 }, { 59, 116 }, { 60, 117 },
  1329. { 61, 118 }, { 62, 119 }, { 64, 121 }, { 66, 127 }, { 67, 128 },
  1330. { 69, 60 }, { 73, 78 }, { 78, 135 }, { 82, 138 }, { 83, 140 },
  1331. { 84, 141 }, { 85, 98 }, { 87, 88 }, { 88, 107 }, { 89, 109 },
  1332. { 90, 110 }, { 91, 111 }, { 92, 149 }, { 93, 101 }, { 94, 61 },
  1333. { 95, 65 }, { 96, 95 }, { 97, 72 }, { 98, 145 }, { 99, 150 },
  1334. { 100, 108 }, { 104, 129 }, { 107, 131 }, { 110, 132 }, { 112, 133 },
  1335. { 114, 134 }, { 116, 136 }, { 118, 137 }, { 122, 97 }, { 123, 99 },
  1336. { 124, 148 }, { 125, 82 }, { 128, 144 }, { 129, 86 }, { 131, 87 },
  1337. { 133, 142 }, { 134, 143 }, { 136, 102 }, { 137, 91 }, { 138, 77 },
  1338. { 139, 79 }, { 140, 90 }, { 142, 103 }, { 144, 105 }, { 147, 104 },
  1339. { 153, 120 }, { 155, 67 }
  1340. };
  1341. static const struct msm_pinctrl_soc_data sm6350_tlmm = {
  1342. .pins = sm6350_pins,
  1343. .npins = ARRAY_SIZE(sm6350_pins),
  1344. .functions = sm6350_functions,
  1345. .nfunctions = ARRAY_SIZE(sm6350_functions),
  1346. .groups = sm6350_groups,
  1347. .ngroups = ARRAY_SIZE(sm6350_groups),
  1348. .ngpios = 157,
  1349. .wakeirq_map = sm6350_pdc_map,
  1350. .nwakeirq_map = ARRAY_SIZE(sm6350_pdc_map),
  1351. .wakeirq_dual_edge_errata = true,
  1352. };
  1353. static int sm6350_tlmm_probe(struct platform_device *pdev)
  1354. {
  1355. return msm_pinctrl_probe(pdev, &sm6350_tlmm);
  1356. }
  1357. static const struct of_device_id sm6350_tlmm_of_match[] = {
  1358. { .compatible = "qcom,sm6350-tlmm" },
  1359. { },
  1360. };
  1361. static struct platform_driver sm6350_tlmm_driver = {
  1362. .driver = {
  1363. .name = "sm6350-tlmm",
  1364. .of_match_table = sm6350_tlmm_of_match,
  1365. },
  1366. .probe = sm6350_tlmm_probe,
  1367. .remove = msm_pinctrl_remove,
  1368. };
  1369. static int __init sm6350_tlmm_init(void)
  1370. {
  1371. return platform_driver_register(&sm6350_tlmm_driver);
  1372. }
  1373. arch_initcall(sm6350_tlmm_init);
  1374. static void __exit sm6350_tlmm_exit(void)
  1375. {
  1376. platform_driver_unregister(&sm6350_tlmm_driver);
  1377. }
  1378. module_exit(sm6350_tlmm_exit);
  1379. MODULE_DESCRIPTION("QTI SM6350 TLMM driver");
  1380. MODULE_LICENSE("GPL v2");
  1381. MODULE_DEVICE_TABLE(of, sm6350_tlmm_of_match);