pinctrl-sm8350.c 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2020-2021, Linaro Limited
  5. */
  6. #include <linux/module.h>
  7. #include <linux/of.h>
  8. #include <linux/platform_device.h>
  9. #include "pinctrl-msm.h"
  10. #define REG_SIZE 0x1000
  11. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  12. { \
  13. .grp = PINCTRL_PINGROUP("gpio" #id, \
  14. gpio##id##_pins, \
  15. ARRAY_SIZE(gpio##id##_pins)), \
  16. .funcs = (int[]){ \
  17. msm_mux_gpio, /* gpio mode */ \
  18. msm_mux_##f1, \
  19. msm_mux_##f2, \
  20. msm_mux_##f3, \
  21. msm_mux_##f4, \
  22. msm_mux_##f5, \
  23. msm_mux_##f6, \
  24. msm_mux_##f7, \
  25. msm_mux_##f8, \
  26. msm_mux_##f9 \
  27. }, \
  28. .nfuncs = 10, \
  29. .ctl_reg = REG_SIZE * id, \
  30. .io_reg = REG_SIZE * id + 0x4, \
  31. .intr_cfg_reg = REG_SIZE * id + 0x8, \
  32. .intr_status_reg = REG_SIZE * id + 0xc, \
  33. .intr_target_reg = REG_SIZE * id + 0x8, \
  34. .mux_bit = 2, \
  35. .pull_bit = 0, \
  36. .drv_bit = 6, \
  37. .oe_bit = 9, \
  38. .in_bit = 0, \
  39. .out_bit = 1, \
  40. .intr_enable_bit = 0, \
  41. .intr_status_bit = 0, \
  42. .intr_target_bit = 5, \
  43. .intr_target_kpss_val = 3, \
  44. .intr_raw_status_bit = 4, \
  45. .intr_polarity_bit = 1, \
  46. .intr_detection_bit = 2, \
  47. .intr_detection_width = 2, \
  48. }
  49. #define SDC_PINGROUP(pg_name, ctl, pull, drv) \
  50. { \
  51. .grp = PINCTRL_PINGROUP(#pg_name, \
  52. pg_name##_pins, \
  53. ARRAY_SIZE(pg_name##_pins)), \
  54. .ctl_reg = ctl, \
  55. .io_reg = 0, \
  56. .intr_cfg_reg = 0, \
  57. .intr_status_reg = 0, \
  58. .intr_target_reg = 0, \
  59. .mux_bit = -1, \
  60. .pull_bit = pull, \
  61. .drv_bit = drv, \
  62. .oe_bit = -1, \
  63. .in_bit = -1, \
  64. .out_bit = -1, \
  65. .intr_enable_bit = -1, \
  66. .intr_status_bit = -1, \
  67. .intr_target_bit = -1, \
  68. .intr_raw_status_bit = -1, \
  69. .intr_polarity_bit = -1, \
  70. .intr_detection_bit = -1, \
  71. .intr_detection_width = -1, \
  72. }
  73. #define UFS_RESET(pg_name, offset) \
  74. { \
  75. .grp = PINCTRL_PINGROUP(#pg_name, \
  76. pg_name##_pins, \
  77. ARRAY_SIZE(pg_name##_pins)), \
  78. .ctl_reg = offset, \
  79. .io_reg = offset + 0x4, \
  80. .intr_cfg_reg = 0, \
  81. .intr_status_reg = 0, \
  82. .intr_target_reg = 0, \
  83. .mux_bit = -1, \
  84. .pull_bit = 3, \
  85. .drv_bit = 0, \
  86. .oe_bit = -1, \
  87. .in_bit = -1, \
  88. .out_bit = 0, \
  89. .intr_enable_bit = -1, \
  90. .intr_status_bit = -1, \
  91. .intr_target_bit = -1, \
  92. .intr_raw_status_bit = -1, \
  93. .intr_polarity_bit = -1, \
  94. .intr_detection_bit = -1, \
  95. .intr_detection_width = -1, \
  96. }
  97. static const struct pinctrl_pin_desc sm8350_pins[] = {
  98. PINCTRL_PIN(0, "GPIO_0"),
  99. PINCTRL_PIN(1, "GPIO_1"),
  100. PINCTRL_PIN(2, "GPIO_2"),
  101. PINCTRL_PIN(3, "GPIO_3"),
  102. PINCTRL_PIN(4, "GPIO_4"),
  103. PINCTRL_PIN(5, "GPIO_5"),
  104. PINCTRL_PIN(6, "GPIO_6"),
  105. PINCTRL_PIN(7, "GPIO_7"),
  106. PINCTRL_PIN(8, "GPIO_8"),
  107. PINCTRL_PIN(9, "GPIO_9"),
  108. PINCTRL_PIN(10, "GPIO_10"),
  109. PINCTRL_PIN(11, "GPIO_11"),
  110. PINCTRL_PIN(12, "GPIO_12"),
  111. PINCTRL_PIN(13, "GPIO_13"),
  112. PINCTRL_PIN(14, "GPIO_14"),
  113. PINCTRL_PIN(15, "GPIO_15"),
  114. PINCTRL_PIN(16, "GPIO_16"),
  115. PINCTRL_PIN(17, "GPIO_17"),
  116. PINCTRL_PIN(18, "GPIO_18"),
  117. PINCTRL_PIN(19, "GPIO_19"),
  118. PINCTRL_PIN(20, "GPIO_20"),
  119. PINCTRL_PIN(21, "GPIO_21"),
  120. PINCTRL_PIN(22, "GPIO_22"),
  121. PINCTRL_PIN(23, "GPIO_23"),
  122. PINCTRL_PIN(24, "GPIO_24"),
  123. PINCTRL_PIN(25, "GPIO_25"),
  124. PINCTRL_PIN(26, "GPIO_26"),
  125. PINCTRL_PIN(27, "GPIO_27"),
  126. PINCTRL_PIN(28, "GPIO_28"),
  127. PINCTRL_PIN(29, "GPIO_29"),
  128. PINCTRL_PIN(30, "GPIO_30"),
  129. PINCTRL_PIN(31, "GPIO_31"),
  130. PINCTRL_PIN(32, "GPIO_32"),
  131. PINCTRL_PIN(33, "GPIO_33"),
  132. PINCTRL_PIN(34, "GPIO_34"),
  133. PINCTRL_PIN(35, "GPIO_35"),
  134. PINCTRL_PIN(36, "GPIO_36"),
  135. PINCTRL_PIN(37, "GPIO_37"),
  136. PINCTRL_PIN(38, "GPIO_38"),
  137. PINCTRL_PIN(39, "GPIO_39"),
  138. PINCTRL_PIN(40, "GPIO_40"),
  139. PINCTRL_PIN(41, "GPIO_41"),
  140. PINCTRL_PIN(42, "GPIO_42"),
  141. PINCTRL_PIN(43, "GPIO_43"),
  142. PINCTRL_PIN(44, "GPIO_44"),
  143. PINCTRL_PIN(45, "GPIO_45"),
  144. PINCTRL_PIN(46, "GPIO_46"),
  145. PINCTRL_PIN(47, "GPIO_47"),
  146. PINCTRL_PIN(48, "GPIO_48"),
  147. PINCTRL_PIN(49, "GPIO_49"),
  148. PINCTRL_PIN(50, "GPIO_50"),
  149. PINCTRL_PIN(51, "GPIO_51"),
  150. PINCTRL_PIN(52, "GPIO_52"),
  151. PINCTRL_PIN(53, "GPIO_53"),
  152. PINCTRL_PIN(54, "GPIO_54"),
  153. PINCTRL_PIN(55, "GPIO_55"),
  154. PINCTRL_PIN(56, "GPIO_56"),
  155. PINCTRL_PIN(57, "GPIO_57"),
  156. PINCTRL_PIN(58, "GPIO_58"),
  157. PINCTRL_PIN(59, "GPIO_59"),
  158. PINCTRL_PIN(60, "GPIO_60"),
  159. PINCTRL_PIN(61, "GPIO_61"),
  160. PINCTRL_PIN(62, "GPIO_62"),
  161. PINCTRL_PIN(63, "GPIO_63"),
  162. PINCTRL_PIN(64, "GPIO_64"),
  163. PINCTRL_PIN(65, "GPIO_65"),
  164. PINCTRL_PIN(66, "GPIO_66"),
  165. PINCTRL_PIN(67, "GPIO_67"),
  166. PINCTRL_PIN(68, "GPIO_68"),
  167. PINCTRL_PIN(69, "GPIO_69"),
  168. PINCTRL_PIN(70, "GPIO_70"),
  169. PINCTRL_PIN(71, "GPIO_71"),
  170. PINCTRL_PIN(72, "GPIO_72"),
  171. PINCTRL_PIN(73, "GPIO_73"),
  172. PINCTRL_PIN(74, "GPIO_74"),
  173. PINCTRL_PIN(75, "GPIO_75"),
  174. PINCTRL_PIN(76, "GPIO_76"),
  175. PINCTRL_PIN(77, "GPIO_77"),
  176. PINCTRL_PIN(78, "GPIO_78"),
  177. PINCTRL_PIN(79, "GPIO_79"),
  178. PINCTRL_PIN(80, "GPIO_80"),
  179. PINCTRL_PIN(81, "GPIO_81"),
  180. PINCTRL_PIN(82, "GPIO_82"),
  181. PINCTRL_PIN(83, "GPIO_83"),
  182. PINCTRL_PIN(84, "GPIO_84"),
  183. PINCTRL_PIN(85, "GPIO_85"),
  184. PINCTRL_PIN(86, "GPIO_86"),
  185. PINCTRL_PIN(87, "GPIO_87"),
  186. PINCTRL_PIN(88, "GPIO_88"),
  187. PINCTRL_PIN(89, "GPIO_89"),
  188. PINCTRL_PIN(90, "GPIO_90"),
  189. PINCTRL_PIN(91, "GPIO_91"),
  190. PINCTRL_PIN(92, "GPIO_92"),
  191. PINCTRL_PIN(93, "GPIO_93"),
  192. PINCTRL_PIN(94, "GPIO_94"),
  193. PINCTRL_PIN(95, "GPIO_95"),
  194. PINCTRL_PIN(96, "GPIO_96"),
  195. PINCTRL_PIN(97, "GPIO_97"),
  196. PINCTRL_PIN(98, "GPIO_98"),
  197. PINCTRL_PIN(99, "GPIO_99"),
  198. PINCTRL_PIN(100, "GPIO_100"),
  199. PINCTRL_PIN(101, "GPIO_101"),
  200. PINCTRL_PIN(102, "GPIO_102"),
  201. PINCTRL_PIN(103, "GPIO_103"),
  202. PINCTRL_PIN(104, "GPIO_104"),
  203. PINCTRL_PIN(105, "GPIO_105"),
  204. PINCTRL_PIN(106, "GPIO_106"),
  205. PINCTRL_PIN(107, "GPIO_107"),
  206. PINCTRL_PIN(108, "GPIO_108"),
  207. PINCTRL_PIN(109, "GPIO_109"),
  208. PINCTRL_PIN(110, "GPIO_110"),
  209. PINCTRL_PIN(111, "GPIO_111"),
  210. PINCTRL_PIN(112, "GPIO_112"),
  211. PINCTRL_PIN(113, "GPIO_113"),
  212. PINCTRL_PIN(114, "GPIO_114"),
  213. PINCTRL_PIN(115, "GPIO_115"),
  214. PINCTRL_PIN(116, "GPIO_116"),
  215. PINCTRL_PIN(117, "GPIO_117"),
  216. PINCTRL_PIN(118, "GPIO_118"),
  217. PINCTRL_PIN(119, "GPIO_119"),
  218. PINCTRL_PIN(120, "GPIO_120"),
  219. PINCTRL_PIN(121, "GPIO_121"),
  220. PINCTRL_PIN(122, "GPIO_122"),
  221. PINCTRL_PIN(123, "GPIO_123"),
  222. PINCTRL_PIN(124, "GPIO_124"),
  223. PINCTRL_PIN(125, "GPIO_125"),
  224. PINCTRL_PIN(126, "GPIO_126"),
  225. PINCTRL_PIN(127, "GPIO_127"),
  226. PINCTRL_PIN(128, "GPIO_128"),
  227. PINCTRL_PIN(129, "GPIO_129"),
  228. PINCTRL_PIN(130, "GPIO_130"),
  229. PINCTRL_PIN(131, "GPIO_131"),
  230. PINCTRL_PIN(132, "GPIO_132"),
  231. PINCTRL_PIN(133, "GPIO_133"),
  232. PINCTRL_PIN(134, "GPIO_134"),
  233. PINCTRL_PIN(135, "GPIO_135"),
  234. PINCTRL_PIN(136, "GPIO_136"),
  235. PINCTRL_PIN(137, "GPIO_137"),
  236. PINCTRL_PIN(138, "GPIO_138"),
  237. PINCTRL_PIN(139, "GPIO_139"),
  238. PINCTRL_PIN(140, "GPIO_140"),
  239. PINCTRL_PIN(141, "GPIO_141"),
  240. PINCTRL_PIN(142, "GPIO_142"),
  241. PINCTRL_PIN(143, "GPIO_143"),
  242. PINCTRL_PIN(144, "GPIO_144"),
  243. PINCTRL_PIN(145, "GPIO_145"),
  244. PINCTRL_PIN(146, "GPIO_146"),
  245. PINCTRL_PIN(147, "GPIO_147"),
  246. PINCTRL_PIN(148, "GPIO_148"),
  247. PINCTRL_PIN(149, "GPIO_149"),
  248. PINCTRL_PIN(150, "GPIO_150"),
  249. PINCTRL_PIN(151, "GPIO_151"),
  250. PINCTRL_PIN(152, "GPIO_152"),
  251. PINCTRL_PIN(153, "GPIO_153"),
  252. PINCTRL_PIN(154, "GPIO_154"),
  253. PINCTRL_PIN(155, "GPIO_155"),
  254. PINCTRL_PIN(156, "GPIO_156"),
  255. PINCTRL_PIN(157, "GPIO_157"),
  256. PINCTRL_PIN(158, "GPIO_158"),
  257. PINCTRL_PIN(159, "GPIO_159"),
  258. PINCTRL_PIN(160, "GPIO_160"),
  259. PINCTRL_PIN(161, "GPIO_161"),
  260. PINCTRL_PIN(162, "GPIO_162"),
  261. PINCTRL_PIN(163, "GPIO_163"),
  262. PINCTRL_PIN(164, "GPIO_164"),
  263. PINCTRL_PIN(165, "GPIO_165"),
  264. PINCTRL_PIN(166, "GPIO_166"),
  265. PINCTRL_PIN(167, "GPIO_167"),
  266. PINCTRL_PIN(168, "GPIO_168"),
  267. PINCTRL_PIN(169, "GPIO_169"),
  268. PINCTRL_PIN(170, "GPIO_170"),
  269. PINCTRL_PIN(171, "GPIO_171"),
  270. PINCTRL_PIN(172, "GPIO_172"),
  271. PINCTRL_PIN(173, "GPIO_173"),
  272. PINCTRL_PIN(174, "GPIO_174"),
  273. PINCTRL_PIN(175, "GPIO_175"),
  274. PINCTRL_PIN(176, "GPIO_176"),
  275. PINCTRL_PIN(177, "GPIO_177"),
  276. PINCTRL_PIN(178, "GPIO_178"),
  277. PINCTRL_PIN(179, "GPIO_179"),
  278. PINCTRL_PIN(180, "GPIO_180"),
  279. PINCTRL_PIN(181, "GPIO_181"),
  280. PINCTRL_PIN(182, "GPIO_182"),
  281. PINCTRL_PIN(183, "GPIO_183"),
  282. PINCTRL_PIN(184, "GPIO_184"),
  283. PINCTRL_PIN(185, "GPIO_185"),
  284. PINCTRL_PIN(186, "GPIO_186"),
  285. PINCTRL_PIN(187, "GPIO_187"),
  286. PINCTRL_PIN(188, "GPIO_188"),
  287. PINCTRL_PIN(189, "GPIO_189"),
  288. PINCTRL_PIN(190, "GPIO_190"),
  289. PINCTRL_PIN(191, "GPIO_191"),
  290. PINCTRL_PIN(192, "GPIO_192"),
  291. PINCTRL_PIN(193, "GPIO_193"),
  292. PINCTRL_PIN(194, "GPIO_194"),
  293. PINCTRL_PIN(195, "GPIO_195"),
  294. PINCTRL_PIN(196, "GPIO_196"),
  295. PINCTRL_PIN(197, "GPIO_197"),
  296. PINCTRL_PIN(198, "GPIO_198"),
  297. PINCTRL_PIN(199, "GPIO_199"),
  298. PINCTRL_PIN(200, "GPIO_200"),
  299. PINCTRL_PIN(201, "GPIO_201"),
  300. PINCTRL_PIN(202, "GPIO_202"),
  301. PINCTRL_PIN(203, "UFS_RESET"),
  302. PINCTRL_PIN(204, "SDC2_CLK"),
  303. PINCTRL_PIN(205, "SDC2_CMD"),
  304. PINCTRL_PIN(206, "SDC2_DATA"),
  305. };
  306. #define DECLARE_MSM_GPIO_PINS(pin) \
  307. static const unsigned int gpio##pin##_pins[] = { pin }
  308. DECLARE_MSM_GPIO_PINS(0);
  309. DECLARE_MSM_GPIO_PINS(1);
  310. DECLARE_MSM_GPIO_PINS(2);
  311. DECLARE_MSM_GPIO_PINS(3);
  312. DECLARE_MSM_GPIO_PINS(4);
  313. DECLARE_MSM_GPIO_PINS(5);
  314. DECLARE_MSM_GPIO_PINS(6);
  315. DECLARE_MSM_GPIO_PINS(7);
  316. DECLARE_MSM_GPIO_PINS(8);
  317. DECLARE_MSM_GPIO_PINS(9);
  318. DECLARE_MSM_GPIO_PINS(10);
  319. DECLARE_MSM_GPIO_PINS(11);
  320. DECLARE_MSM_GPIO_PINS(12);
  321. DECLARE_MSM_GPIO_PINS(13);
  322. DECLARE_MSM_GPIO_PINS(14);
  323. DECLARE_MSM_GPIO_PINS(15);
  324. DECLARE_MSM_GPIO_PINS(16);
  325. DECLARE_MSM_GPIO_PINS(17);
  326. DECLARE_MSM_GPIO_PINS(18);
  327. DECLARE_MSM_GPIO_PINS(19);
  328. DECLARE_MSM_GPIO_PINS(20);
  329. DECLARE_MSM_GPIO_PINS(21);
  330. DECLARE_MSM_GPIO_PINS(22);
  331. DECLARE_MSM_GPIO_PINS(23);
  332. DECLARE_MSM_GPIO_PINS(24);
  333. DECLARE_MSM_GPIO_PINS(25);
  334. DECLARE_MSM_GPIO_PINS(26);
  335. DECLARE_MSM_GPIO_PINS(27);
  336. DECLARE_MSM_GPIO_PINS(28);
  337. DECLARE_MSM_GPIO_PINS(29);
  338. DECLARE_MSM_GPIO_PINS(30);
  339. DECLARE_MSM_GPIO_PINS(31);
  340. DECLARE_MSM_GPIO_PINS(32);
  341. DECLARE_MSM_GPIO_PINS(33);
  342. DECLARE_MSM_GPIO_PINS(34);
  343. DECLARE_MSM_GPIO_PINS(35);
  344. DECLARE_MSM_GPIO_PINS(36);
  345. DECLARE_MSM_GPIO_PINS(37);
  346. DECLARE_MSM_GPIO_PINS(38);
  347. DECLARE_MSM_GPIO_PINS(39);
  348. DECLARE_MSM_GPIO_PINS(40);
  349. DECLARE_MSM_GPIO_PINS(41);
  350. DECLARE_MSM_GPIO_PINS(42);
  351. DECLARE_MSM_GPIO_PINS(43);
  352. DECLARE_MSM_GPIO_PINS(44);
  353. DECLARE_MSM_GPIO_PINS(45);
  354. DECLARE_MSM_GPIO_PINS(46);
  355. DECLARE_MSM_GPIO_PINS(47);
  356. DECLARE_MSM_GPIO_PINS(48);
  357. DECLARE_MSM_GPIO_PINS(49);
  358. DECLARE_MSM_GPIO_PINS(50);
  359. DECLARE_MSM_GPIO_PINS(51);
  360. DECLARE_MSM_GPIO_PINS(52);
  361. DECLARE_MSM_GPIO_PINS(53);
  362. DECLARE_MSM_GPIO_PINS(54);
  363. DECLARE_MSM_GPIO_PINS(55);
  364. DECLARE_MSM_GPIO_PINS(56);
  365. DECLARE_MSM_GPIO_PINS(57);
  366. DECLARE_MSM_GPIO_PINS(58);
  367. DECLARE_MSM_GPIO_PINS(59);
  368. DECLARE_MSM_GPIO_PINS(60);
  369. DECLARE_MSM_GPIO_PINS(61);
  370. DECLARE_MSM_GPIO_PINS(62);
  371. DECLARE_MSM_GPIO_PINS(63);
  372. DECLARE_MSM_GPIO_PINS(64);
  373. DECLARE_MSM_GPIO_PINS(65);
  374. DECLARE_MSM_GPIO_PINS(66);
  375. DECLARE_MSM_GPIO_PINS(67);
  376. DECLARE_MSM_GPIO_PINS(68);
  377. DECLARE_MSM_GPIO_PINS(69);
  378. DECLARE_MSM_GPIO_PINS(70);
  379. DECLARE_MSM_GPIO_PINS(71);
  380. DECLARE_MSM_GPIO_PINS(72);
  381. DECLARE_MSM_GPIO_PINS(73);
  382. DECLARE_MSM_GPIO_PINS(74);
  383. DECLARE_MSM_GPIO_PINS(75);
  384. DECLARE_MSM_GPIO_PINS(76);
  385. DECLARE_MSM_GPIO_PINS(77);
  386. DECLARE_MSM_GPIO_PINS(78);
  387. DECLARE_MSM_GPIO_PINS(79);
  388. DECLARE_MSM_GPIO_PINS(80);
  389. DECLARE_MSM_GPIO_PINS(81);
  390. DECLARE_MSM_GPIO_PINS(82);
  391. DECLARE_MSM_GPIO_PINS(83);
  392. DECLARE_MSM_GPIO_PINS(84);
  393. DECLARE_MSM_GPIO_PINS(85);
  394. DECLARE_MSM_GPIO_PINS(86);
  395. DECLARE_MSM_GPIO_PINS(87);
  396. DECLARE_MSM_GPIO_PINS(88);
  397. DECLARE_MSM_GPIO_PINS(89);
  398. DECLARE_MSM_GPIO_PINS(90);
  399. DECLARE_MSM_GPIO_PINS(91);
  400. DECLARE_MSM_GPIO_PINS(92);
  401. DECLARE_MSM_GPIO_PINS(93);
  402. DECLARE_MSM_GPIO_PINS(94);
  403. DECLARE_MSM_GPIO_PINS(95);
  404. DECLARE_MSM_GPIO_PINS(96);
  405. DECLARE_MSM_GPIO_PINS(97);
  406. DECLARE_MSM_GPIO_PINS(98);
  407. DECLARE_MSM_GPIO_PINS(99);
  408. DECLARE_MSM_GPIO_PINS(100);
  409. DECLARE_MSM_GPIO_PINS(101);
  410. DECLARE_MSM_GPIO_PINS(102);
  411. DECLARE_MSM_GPIO_PINS(103);
  412. DECLARE_MSM_GPIO_PINS(104);
  413. DECLARE_MSM_GPIO_PINS(105);
  414. DECLARE_MSM_GPIO_PINS(106);
  415. DECLARE_MSM_GPIO_PINS(107);
  416. DECLARE_MSM_GPIO_PINS(108);
  417. DECLARE_MSM_GPIO_PINS(109);
  418. DECLARE_MSM_GPIO_PINS(110);
  419. DECLARE_MSM_GPIO_PINS(111);
  420. DECLARE_MSM_GPIO_PINS(112);
  421. DECLARE_MSM_GPIO_PINS(113);
  422. DECLARE_MSM_GPIO_PINS(114);
  423. DECLARE_MSM_GPIO_PINS(115);
  424. DECLARE_MSM_GPIO_PINS(116);
  425. DECLARE_MSM_GPIO_PINS(117);
  426. DECLARE_MSM_GPIO_PINS(118);
  427. DECLARE_MSM_GPIO_PINS(119);
  428. DECLARE_MSM_GPIO_PINS(120);
  429. DECLARE_MSM_GPIO_PINS(121);
  430. DECLARE_MSM_GPIO_PINS(122);
  431. DECLARE_MSM_GPIO_PINS(123);
  432. DECLARE_MSM_GPIO_PINS(124);
  433. DECLARE_MSM_GPIO_PINS(125);
  434. DECLARE_MSM_GPIO_PINS(126);
  435. DECLARE_MSM_GPIO_PINS(127);
  436. DECLARE_MSM_GPIO_PINS(128);
  437. DECLARE_MSM_GPIO_PINS(129);
  438. DECLARE_MSM_GPIO_PINS(130);
  439. DECLARE_MSM_GPIO_PINS(131);
  440. DECLARE_MSM_GPIO_PINS(132);
  441. DECLARE_MSM_GPIO_PINS(133);
  442. DECLARE_MSM_GPIO_PINS(134);
  443. DECLARE_MSM_GPIO_PINS(135);
  444. DECLARE_MSM_GPIO_PINS(136);
  445. DECLARE_MSM_GPIO_PINS(137);
  446. DECLARE_MSM_GPIO_PINS(138);
  447. DECLARE_MSM_GPIO_PINS(139);
  448. DECLARE_MSM_GPIO_PINS(140);
  449. DECLARE_MSM_GPIO_PINS(141);
  450. DECLARE_MSM_GPIO_PINS(142);
  451. DECLARE_MSM_GPIO_PINS(143);
  452. DECLARE_MSM_GPIO_PINS(144);
  453. DECLARE_MSM_GPIO_PINS(145);
  454. DECLARE_MSM_GPIO_PINS(146);
  455. DECLARE_MSM_GPIO_PINS(147);
  456. DECLARE_MSM_GPIO_PINS(148);
  457. DECLARE_MSM_GPIO_PINS(149);
  458. DECLARE_MSM_GPIO_PINS(150);
  459. DECLARE_MSM_GPIO_PINS(151);
  460. DECLARE_MSM_GPIO_PINS(152);
  461. DECLARE_MSM_GPIO_PINS(153);
  462. DECLARE_MSM_GPIO_PINS(154);
  463. DECLARE_MSM_GPIO_PINS(155);
  464. DECLARE_MSM_GPIO_PINS(156);
  465. DECLARE_MSM_GPIO_PINS(157);
  466. DECLARE_MSM_GPIO_PINS(158);
  467. DECLARE_MSM_GPIO_PINS(159);
  468. DECLARE_MSM_GPIO_PINS(160);
  469. DECLARE_MSM_GPIO_PINS(161);
  470. DECLARE_MSM_GPIO_PINS(162);
  471. DECLARE_MSM_GPIO_PINS(163);
  472. DECLARE_MSM_GPIO_PINS(164);
  473. DECLARE_MSM_GPIO_PINS(165);
  474. DECLARE_MSM_GPIO_PINS(166);
  475. DECLARE_MSM_GPIO_PINS(167);
  476. DECLARE_MSM_GPIO_PINS(168);
  477. DECLARE_MSM_GPIO_PINS(169);
  478. DECLARE_MSM_GPIO_PINS(170);
  479. DECLARE_MSM_GPIO_PINS(171);
  480. DECLARE_MSM_GPIO_PINS(172);
  481. DECLARE_MSM_GPIO_PINS(173);
  482. DECLARE_MSM_GPIO_PINS(174);
  483. DECLARE_MSM_GPIO_PINS(175);
  484. DECLARE_MSM_GPIO_PINS(176);
  485. DECLARE_MSM_GPIO_PINS(177);
  486. DECLARE_MSM_GPIO_PINS(178);
  487. DECLARE_MSM_GPIO_PINS(179);
  488. DECLARE_MSM_GPIO_PINS(180);
  489. DECLARE_MSM_GPIO_PINS(181);
  490. DECLARE_MSM_GPIO_PINS(182);
  491. DECLARE_MSM_GPIO_PINS(183);
  492. DECLARE_MSM_GPIO_PINS(184);
  493. DECLARE_MSM_GPIO_PINS(185);
  494. DECLARE_MSM_GPIO_PINS(186);
  495. DECLARE_MSM_GPIO_PINS(187);
  496. DECLARE_MSM_GPIO_PINS(188);
  497. DECLARE_MSM_GPIO_PINS(189);
  498. DECLARE_MSM_GPIO_PINS(190);
  499. DECLARE_MSM_GPIO_PINS(191);
  500. DECLARE_MSM_GPIO_PINS(192);
  501. DECLARE_MSM_GPIO_PINS(193);
  502. DECLARE_MSM_GPIO_PINS(194);
  503. DECLARE_MSM_GPIO_PINS(195);
  504. DECLARE_MSM_GPIO_PINS(196);
  505. DECLARE_MSM_GPIO_PINS(197);
  506. DECLARE_MSM_GPIO_PINS(198);
  507. DECLARE_MSM_GPIO_PINS(199);
  508. DECLARE_MSM_GPIO_PINS(200);
  509. DECLARE_MSM_GPIO_PINS(201);
  510. DECLARE_MSM_GPIO_PINS(202);
  511. static const unsigned int ufs_reset_pins[] = { 203 };
  512. static const unsigned int sdc2_clk_pins[] = { 204 };
  513. static const unsigned int sdc2_cmd_pins[] = { 205 };
  514. static const unsigned int sdc2_data_pins[] = { 206 };
  515. enum sm8350_functions {
  516. msm_mux_atest_char,
  517. msm_mux_atest_usb,
  518. msm_mux_audio_ref,
  519. msm_mux_cam_mclk,
  520. msm_mux_cci_async,
  521. msm_mux_cci_i2c,
  522. msm_mux_cci_timer,
  523. msm_mux_cmu_rng,
  524. msm_mux_coex_uart1,
  525. msm_mux_coex_uart2,
  526. msm_mux_cri_trng,
  527. msm_mux_cri_trng0,
  528. msm_mux_cri_trng1,
  529. msm_mux_dbg_out,
  530. msm_mux_ddr_bist,
  531. msm_mux_ddr_pxi0,
  532. msm_mux_ddr_pxi1,
  533. msm_mux_ddr_pxi2,
  534. msm_mux_ddr_pxi3,
  535. msm_mux_dp_hot,
  536. msm_mux_dp_lcd,
  537. msm_mux_gcc_gp1,
  538. msm_mux_gcc_gp2,
  539. msm_mux_gcc_gp3,
  540. msm_mux_gpio,
  541. msm_mux_ibi_i3c,
  542. msm_mux_jitter_bist,
  543. msm_mux_lpass_slimbus,
  544. msm_mux_mdp_vsync,
  545. msm_mux_mdp_vsync0,
  546. msm_mux_mdp_vsync1,
  547. msm_mux_mdp_vsync2,
  548. msm_mux_mdp_vsync3,
  549. msm_mux_mi2s0_data0,
  550. msm_mux_mi2s0_data1,
  551. msm_mux_mi2s0_sck,
  552. msm_mux_mi2s0_ws,
  553. msm_mux_mi2s1_data0,
  554. msm_mux_mi2s1_data1,
  555. msm_mux_mi2s1_sck,
  556. msm_mux_mi2s1_ws,
  557. msm_mux_mi2s2_data0,
  558. msm_mux_mi2s2_data1,
  559. msm_mux_mi2s2_sck,
  560. msm_mux_mi2s2_ws,
  561. msm_mux_mss_grfc0,
  562. msm_mux_mss_grfc1,
  563. msm_mux_mss_grfc10,
  564. msm_mux_mss_grfc11,
  565. msm_mux_mss_grfc12,
  566. msm_mux_mss_grfc2,
  567. msm_mux_mss_grfc3,
  568. msm_mux_mss_grfc4,
  569. msm_mux_mss_grfc5,
  570. msm_mux_mss_grfc6,
  571. msm_mux_mss_grfc7,
  572. msm_mux_mss_grfc8,
  573. msm_mux_mss_grfc9,
  574. msm_mux_nav_gpio,
  575. msm_mux_pa_indicator,
  576. msm_mux_pcie0_clkreqn,
  577. msm_mux_pcie1_clkreqn,
  578. msm_mux_phase_flag,
  579. msm_mux_pll_bist,
  580. msm_mux_pll_clk,
  581. msm_mux_pri_mi2s,
  582. msm_mux_prng_rosc,
  583. msm_mux_qdss_cti,
  584. msm_mux_qdss_gpio,
  585. msm_mux_qlink0_enable,
  586. msm_mux_qlink0_request,
  587. msm_mux_qlink0_wmss,
  588. msm_mux_qlink1_enable,
  589. msm_mux_qlink1_request,
  590. msm_mux_qlink1_wmss,
  591. msm_mux_qlink2_enable,
  592. msm_mux_qlink2_request,
  593. msm_mux_qlink2_wmss,
  594. msm_mux_qspi0,
  595. msm_mux_qspi1,
  596. msm_mux_qspi2,
  597. msm_mux_qspi3,
  598. msm_mux_qspi_clk,
  599. msm_mux_qspi_cs,
  600. msm_mux_qup0,
  601. msm_mux_qup1,
  602. msm_mux_qup10,
  603. msm_mux_qup11,
  604. msm_mux_qup12,
  605. msm_mux_qup13,
  606. msm_mux_qup14,
  607. msm_mux_qup15,
  608. msm_mux_qup16,
  609. msm_mux_qup17,
  610. msm_mux_qup18,
  611. msm_mux_qup19,
  612. msm_mux_qup2,
  613. msm_mux_qup3,
  614. msm_mux_qup4,
  615. msm_mux_qup5,
  616. msm_mux_qup6,
  617. msm_mux_qup7,
  618. msm_mux_qup8,
  619. msm_mux_qup9,
  620. msm_mux_qup_l4,
  621. msm_mux_qup_l5,
  622. msm_mux_qup_l6,
  623. msm_mux_sd_write,
  624. msm_mux_sdc40,
  625. msm_mux_sdc41,
  626. msm_mux_sdc42,
  627. msm_mux_sdc43,
  628. msm_mux_sdc4_clk,
  629. msm_mux_sdc4_cmd,
  630. msm_mux_sec_mi2s,
  631. msm_mux_tb_trig,
  632. msm_mux_tgu_ch0,
  633. msm_mux_tgu_ch1,
  634. msm_mux_tgu_ch2,
  635. msm_mux_tgu_ch3,
  636. msm_mux_tsense_pwm1,
  637. msm_mux_tsense_pwm2,
  638. msm_mux_uim0_clk,
  639. msm_mux_uim0_data,
  640. msm_mux_uim0_present,
  641. msm_mux_uim0_reset,
  642. msm_mux_uim1_clk,
  643. msm_mux_uim1_data,
  644. msm_mux_uim1_present,
  645. msm_mux_uim1_reset,
  646. msm_mux_usb2phy_ac,
  647. msm_mux_usb_phy,
  648. msm_mux_vfr_0,
  649. msm_mux_vfr_1,
  650. msm_mux_vsense_trigger,
  651. msm_mux__,
  652. };
  653. static const char * const gpio_groups[] = {
  654. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  655. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  656. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  657. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  658. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  659. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  660. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  661. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  662. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  663. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  664. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  665. "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
  666. "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
  667. "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
  668. "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  669. "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
  670. "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
  671. "gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
  672. "gpio123", "gpio124", "gpio125", "gpio126", "gpio127", "gpio128",
  673. "gpio129", "gpio130", "gpio131", "gpio132", "gpio133", "gpio134",
  674. "gpio135", "gpio136", "gpio137", "gpio138", "gpio139", "gpio140",
  675. "gpio141", "gpio142", "gpio143", "gpio144", "gpio145", "gpio146",
  676. "gpio147", "gpio148", "gpio149", "gpio150", "gpio151", "gpio152",
  677. "gpio153", "gpio154", "gpio155", "gpio156", "gpio157", "gpio158",
  678. "gpio159", "gpio160", "gpio161", "gpio162", "gpio163", "gpio164",
  679. "gpio165", "gpio166", "gpio167", "gpio168", "gpio169", "gpio170",
  680. "gpio171", "gpio172", "gpio173", "gpio174", "gpio175", "gpio176",
  681. "gpio177", "gpio178", "gpio179", "gpio180", "gpio181", "gpio182",
  682. "gpio183", "gpio184", "gpio185", "gpio186", "gpio187", "gpio188",
  683. "gpio189", "gpio190", "gpio191", "gpio192", "gpio193", "gpio194",
  684. "gpio195", "gpio196", "gpio197", "gpio198", "gpio199", "gpio200",
  685. "gpio201", "gpio202",
  686. };
  687. static const char * const atest_char_groups[] = {
  688. "gpio85", "gpio86", "gpio87", "gpio115", "gpio117",
  689. };
  690. static const char * const atest_usb_groups[] = {
  691. "gpio55", "gpio80", "gpio81", "gpio151", "gpio152",
  692. "gpio153", "gpio154", "gpio158", "gpio159", "gpio161",
  693. };
  694. static const char * const audio_ref_groups[] = {
  695. "gpio124",
  696. };
  697. static const char * const cam_mclk_groups[] = {
  698. "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", "gpio105",
  699. };
  700. static const char * const cci_async_groups[] = {
  701. "gpio106", "gpio118", "gpio119",
  702. };
  703. static const char * const cci_i2c_groups[] = {
  704. "gpio107", "gpio108", "gpio109", "gpio110", "gpio111", "gpio112",
  705. "gpio113", "gpio114",
  706. };
  707. static const char * const cci_timer_groups[] = {
  708. "gpio115", "gpio116", "gpio117", "gpio118", "gpio119",
  709. };
  710. static const char * const cmu_rng_groups[] = {
  711. "gpio174", "gpio175", "gpio176", "gpio177",
  712. };
  713. static const char * const coex_uart1_groups[] = {
  714. "gpio151", "gpio152",
  715. };
  716. static const char * const coex_uart2_groups[] = {
  717. "gpio153", "gpio154",
  718. };
  719. static const char * const cri_trng_groups[] = {
  720. "gpio186",
  721. };
  722. static const char * const cri_trng0_groups[] = {
  723. "gpio183",
  724. };
  725. static const char * const cri_trng1_groups[] = {
  726. "gpio184",
  727. };
  728. static const char * const dbg_out_groups[] = {
  729. "gpio14",
  730. };
  731. static const char * const ddr_bist_groups[] = {
  732. "gpio36", "gpio37", "gpio40", "gpio41",
  733. };
  734. static const char * const ddr_pxi0_groups[] = {
  735. "gpio51", "gpio52",
  736. };
  737. static const char * const ddr_pxi1_groups[] = {
  738. "gpio48", "gpio49",
  739. };
  740. static const char * const ddr_pxi2_groups[] = {
  741. "gpio45", "gpio47",
  742. };
  743. static const char * const ddr_pxi3_groups[] = {
  744. "gpio43", "gpio44",
  745. };
  746. static const char * const dp_hot_groups[] = {
  747. "gpio87",
  748. };
  749. static const char * const dp_lcd_groups[] = {
  750. "gpio83",
  751. };
  752. static const char * const gcc_gp1_groups[] = {
  753. "gpio115", "gpio129",
  754. };
  755. static const char * const gcc_gp2_groups[] = {
  756. "gpio116", "gpio130",
  757. };
  758. static const char * const gcc_gp3_groups[] = {
  759. "gpio117", "gpio131",
  760. };
  761. static const char * const ibi_i3c_groups[] = {
  762. "gpio36", "gpio37", "gpio56", "gpio57", "gpio60", "gpio61",
  763. };
  764. static const char * const jitter_bist_groups[] = {
  765. "gpio80",
  766. };
  767. static const char * const lpass_slimbus_groups[] = {
  768. "gpio129", "gpio130",
  769. };
  770. static const char * const mdp_vsync_groups[] = {
  771. "gpio15", "gpio26", "gpio82", "gpio83", "gpio84",
  772. };
  773. static const char * const mdp_vsync0_groups[] = {
  774. "gpio86",
  775. };
  776. static const char * const mdp_vsync1_groups[] = {
  777. "gpio86",
  778. };
  779. static const char * const mdp_vsync2_groups[] = {
  780. "gpio87",
  781. };
  782. static const char * const mdp_vsync3_groups[] = {
  783. "gpio87",
  784. };
  785. static const char * const mi2s0_data0_groups[] = {
  786. "gpio126",
  787. };
  788. static const char * const mi2s0_data1_groups[] = {
  789. "gpio127",
  790. };
  791. static const char * const mi2s0_sck_groups[] = {
  792. "gpio125",
  793. };
  794. static const char * const mi2s0_ws_groups[] = {
  795. "gpio128",
  796. };
  797. static const char * const mi2s1_data0_groups[] = {
  798. "gpio130",
  799. };
  800. static const char * const mi2s1_data1_groups[] = {
  801. "gpio131",
  802. };
  803. static const char * const mi2s1_sck_groups[] = {
  804. "gpio129",
  805. };
  806. static const char * const mi2s1_ws_groups[] = {
  807. "gpio132",
  808. };
  809. static const char * const mi2s2_data0_groups[] = {
  810. "gpio121",
  811. };
  812. static const char * const mi2s2_data1_groups[] = {
  813. "gpio124",
  814. };
  815. static const char * const mi2s2_sck_groups[] = {
  816. "gpio120",
  817. };
  818. static const char * const mi2s2_ws_groups[] = {
  819. "gpio122",
  820. };
  821. static const char * const mss_grfc0_groups[] = {
  822. "gpio141", "gpio158",
  823. };
  824. static const char * const mss_grfc1_groups[] = {
  825. "gpio142",
  826. };
  827. static const char * const mss_grfc10_groups[] = {
  828. "gpio153",
  829. };
  830. static const char * const mss_grfc11_groups[] = {
  831. "gpio154",
  832. };
  833. static const char * const mss_grfc12_groups[] = {
  834. "gpio157",
  835. };
  836. static const char * const mss_grfc2_groups[] = {
  837. "gpio143",
  838. };
  839. static const char * const mss_grfc3_groups[] = {
  840. "gpio144",
  841. };
  842. static const char * const mss_grfc4_groups[] = {
  843. "gpio145",
  844. };
  845. static const char * const mss_grfc5_groups[] = {
  846. "gpio146",
  847. };
  848. static const char * const mss_grfc6_groups[] = {
  849. "gpio147",
  850. };
  851. static const char * const mss_grfc7_groups[] = {
  852. "gpio148",
  853. };
  854. static const char * const mss_grfc8_groups[] = {
  855. "gpio149",
  856. };
  857. static const char * const mss_grfc9_groups[] = {
  858. "gpio150",
  859. };
  860. static const char * const nav_gpio_groups[] = {
  861. "gpio155", "gpio156", "gpio157",
  862. };
  863. static const char * const pa_indicator_groups[] = {
  864. "gpio157",
  865. };
  866. static const char * const pcie0_clkreqn_groups[] = {
  867. "gpio95",
  868. };
  869. static const char * const pcie1_clkreqn_groups[] = {
  870. "gpio98",
  871. };
  872. static const char * const phase_flag_groups[] = {
  873. "gpio12", "gpio13", "gpio16", "gpio17", "gpio28", "gpio29", "gpio30",
  874. "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", "gpio72", "gpio73",
  875. "gpio74", "gpio75", "gpio76", "gpio77", "gpio78", "gpio79", "gpio103",
  876. "gpio104", "gpio105", "gpio106", "gpio107", "gpio108", "gpio109",
  877. "gpio110", "gpio111", "gpio112", "gpio113", "gpio114",
  878. };
  879. static const char * const pll_bist_groups[] = {
  880. "gpio81",
  881. };
  882. static const char * const pll_clk_groups[] = {
  883. "gpio81",
  884. };
  885. static const char * const pri_mi2s_groups[] = {
  886. "gpio123",
  887. };
  888. static const char * const prng_rosc_groups[] = {
  889. "gpio185",
  890. };
  891. static const char * const qdss_cti_groups[] = {
  892. "gpio14", "gpio27", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", "gpio92",
  893. };
  894. static const char * const qdss_gpio_groups[] = {
  895. "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", "gpio105", "gpio106", "gpio107",
  896. "gpio108", "gpio109", "gpio110", "gpio111", "gpio112", "gpio113", "gpio114", "gpio115",
  897. "gpio116", "gpio117", "gpio183", "gpio184", "gpio185", "gpio186", "gpio187", "gpio188",
  898. "gpio189", "gpio190", "gpio191", "gpio192", "gpio193", "gpio194", "gpio195", "gpio196",
  899. "gpio197", "gpio198", "gpio199", "gpio200",
  900. };
  901. static const char * const qlink0_enable_groups[] = {
  902. "gpio160",
  903. };
  904. static const char * const qlink0_request_groups[] = {
  905. "gpio159",
  906. };
  907. static const char * const qlink0_wmss_groups[] = {
  908. "gpio161",
  909. };
  910. static const char * const qlink1_enable_groups[] = {
  911. "gpio163",
  912. };
  913. static const char * const qlink1_request_groups[] = {
  914. "gpio162",
  915. };
  916. static const char * const qlink1_wmss_groups[] = {
  917. "gpio164",
  918. };
  919. static const char * const qlink2_enable_groups[] = {
  920. "gpio166",
  921. };
  922. static const char * const qlink2_request_groups[] = {
  923. "gpio165",
  924. };
  925. static const char * const qlink2_wmss_groups[] = {
  926. "gpio167",
  927. };
  928. static const char * const qspi0_groups[] = {
  929. "gpio44",
  930. };
  931. static const char * const qspi1_groups[] = {
  932. "gpio45",
  933. };
  934. static const char * const qspi2_groups[] = {
  935. "gpio48",
  936. };
  937. static const char * const qspi3_groups[] = {
  938. "gpio49",
  939. };
  940. static const char * const qspi_clk_groups[] = {
  941. "gpio50",
  942. };
  943. static const char * const qspi_cs_groups[] = {
  944. "gpio47", "gpio51",
  945. };
  946. static const char * const qup0_groups[] = {
  947. "gpio4", "gpio5", "gpio6", "gpio7",
  948. };
  949. static const char * const qup1_groups[] = {
  950. "gpio8", "gpio9", "gpio10", "gpio11",
  951. };
  952. static const char * const qup10_groups[] = {
  953. "gpio44", "gpio45", "gpio46", "gpio47",
  954. };
  955. static const char * const qup11_groups[] = {
  956. "gpio48", "gpio49", "gpio50", "gpio51",
  957. };
  958. static const char * const qup12_groups[] = {
  959. "gpio52", "gpio53", "gpio54", "gpio55",
  960. };
  961. static const char * const qup13_groups[] = {
  962. "gpio0", "gpio1", "gpio2", "gpio3",
  963. };
  964. static const char * const qup14_groups[] = {
  965. "gpio56", "gpio57", "gpio58", "gpio59",
  966. };
  967. static const char * const qup15_groups[] = {
  968. "gpio60", "gpio61", "gpio62", "gpio63",
  969. };
  970. static const char * const qup16_groups[] = {
  971. "gpio64", "gpio65", "gpio66", "gpio67",
  972. };
  973. static const char * const qup17_groups[] = {
  974. "gpio72", "gpio73", "gpio74", "gpio75",
  975. };
  976. static const char * const qup18_groups[] = {
  977. "gpio68", "gpio69", "gpio70", "gpio71",
  978. };
  979. static const char * const qup19_groups[] = {
  980. "gpio76", "gpio77", "gpio78", "gpio79",
  981. };
  982. static const char * const qup2_groups[] = {
  983. "gpio12", "gpio13", "gpio14", "gpio15",
  984. };
  985. static const char * const qup3_groups[] = {
  986. "gpio16", "gpio17", "gpio18", "gpio19",
  987. };
  988. static const char * const qup4_groups[] = {
  989. "gpio20", "gpio21", "gpio22", "gpio23",
  990. };
  991. static const char * const qup5_groups[] = {
  992. "gpio24", "gpio25", "gpio26", "gpio27",
  993. };
  994. static const char * const qup6_groups[] = {
  995. "gpio28", "gpio29", "gpio30", "gpio31",
  996. };
  997. static const char * const qup7_groups[] = {
  998. "gpio32", "gpio33", "gpio34", "gpio35",
  999. };
  1000. static const char * const qup8_groups[] = {
  1001. "gpio36", "gpio37", "gpio38", "gpio39",
  1002. };
  1003. static const char * const qup9_groups[] = {
  1004. "gpio40", "gpio41", "gpio42", "gpio43",
  1005. };
  1006. static const char * const qup_l4_groups[] = {
  1007. "gpio2", "gpio6", "gpio58", "gpio63",
  1008. };
  1009. static const char * const qup_l5_groups[] = {
  1010. "gpio3", "gpio7", "gpio59", "gpio66",
  1011. };
  1012. static const char * const qup_l6_groups[] = {
  1013. "gpio10", "gpio42", "gpio62", "gpio67",
  1014. };
  1015. static const char * const sd_write_groups[] = {
  1016. "gpio93",
  1017. };
  1018. static const char * const sdc40_groups[] = {
  1019. "gpio44",
  1020. };
  1021. static const char * const sdc41_groups[] = {
  1022. "gpio45",
  1023. };
  1024. static const char * const sdc42_groups[] = {
  1025. "gpio48",
  1026. };
  1027. static const char * const sdc43_groups[] = {
  1028. "gpio49",
  1029. };
  1030. static const char * const sdc4_clk_groups[] = {
  1031. "gpio50",
  1032. };
  1033. static const char * const sdc4_cmd_groups[] = {
  1034. "gpio51",
  1035. };
  1036. static const char * const sec_mi2s_groups[] = {
  1037. "gpio124",
  1038. };
  1039. static const char * const tb_trig_groups[] = {
  1040. "gpio64", "gpio136",
  1041. };
  1042. static const char * const tgu_ch0_groups[] = {
  1043. "gpio99",
  1044. };
  1045. static const char * const tgu_ch1_groups[] = {
  1046. "gpio100",
  1047. };
  1048. static const char * const tgu_ch2_groups[] = {
  1049. "gpio101",
  1050. };
  1051. static const char * const tgu_ch3_groups[] = {
  1052. "gpio102",
  1053. };
  1054. static const char * const tsense_pwm1_groups[] = {
  1055. "gpio88",
  1056. };
  1057. static const char * const tsense_pwm2_groups[] = {
  1058. "gpio88",
  1059. };
  1060. static const char * const uim0_clk_groups[] = {
  1061. "gpio138",
  1062. };
  1063. static const char * const uim0_data_groups[] = {
  1064. "gpio137",
  1065. };
  1066. static const char * const uim0_present_groups[] = {
  1067. "gpio140",
  1068. };
  1069. static const char * const uim0_reset_groups[] = {
  1070. "gpio139",
  1071. };
  1072. static const char * const uim1_clk_groups[] = {
  1073. "gpio134",
  1074. };
  1075. static const char * const uim1_data_groups[] = {
  1076. "gpio133",
  1077. };
  1078. static const char * const uim1_present_groups[] = {
  1079. "gpio136",
  1080. };
  1081. static const char * const uim1_reset_groups[] = {
  1082. "gpio135",
  1083. };
  1084. static const char * const usb2phy_ac_groups[] = {
  1085. "gpio39", "gpio80",
  1086. };
  1087. static const char * const usb_phy_groups[] = {
  1088. "gpio81",
  1089. };
  1090. static const char * const vfr_0_groups[] = {
  1091. "gpio84",
  1092. };
  1093. static const char * const vfr_1_groups[] = {
  1094. "gpio90",
  1095. };
  1096. static const char * const vsense_trigger_groups[] = {
  1097. "gpio78",
  1098. };
  1099. static const struct pinfunction sm8350_functions[] = {
  1100. MSM_PIN_FUNCTION(atest_char),
  1101. MSM_PIN_FUNCTION(atest_usb),
  1102. MSM_PIN_FUNCTION(audio_ref),
  1103. MSM_PIN_FUNCTION(cam_mclk),
  1104. MSM_PIN_FUNCTION(cci_async),
  1105. MSM_PIN_FUNCTION(cci_i2c),
  1106. MSM_PIN_FUNCTION(cci_timer),
  1107. MSM_PIN_FUNCTION(cmu_rng),
  1108. MSM_PIN_FUNCTION(coex_uart1),
  1109. MSM_PIN_FUNCTION(coex_uart2),
  1110. MSM_PIN_FUNCTION(cri_trng),
  1111. MSM_PIN_FUNCTION(cri_trng0),
  1112. MSM_PIN_FUNCTION(cri_trng1),
  1113. MSM_PIN_FUNCTION(dbg_out),
  1114. MSM_PIN_FUNCTION(ddr_bist),
  1115. MSM_PIN_FUNCTION(ddr_pxi0),
  1116. MSM_PIN_FUNCTION(ddr_pxi1),
  1117. MSM_PIN_FUNCTION(ddr_pxi2),
  1118. MSM_PIN_FUNCTION(ddr_pxi3),
  1119. MSM_PIN_FUNCTION(dp_hot),
  1120. MSM_PIN_FUNCTION(dp_lcd),
  1121. MSM_PIN_FUNCTION(gcc_gp1),
  1122. MSM_PIN_FUNCTION(gcc_gp2),
  1123. MSM_PIN_FUNCTION(gcc_gp3),
  1124. MSM_PIN_FUNCTION(gpio),
  1125. MSM_PIN_FUNCTION(ibi_i3c),
  1126. MSM_PIN_FUNCTION(jitter_bist),
  1127. MSM_PIN_FUNCTION(lpass_slimbus),
  1128. MSM_PIN_FUNCTION(mdp_vsync),
  1129. MSM_PIN_FUNCTION(mdp_vsync0),
  1130. MSM_PIN_FUNCTION(mdp_vsync1),
  1131. MSM_PIN_FUNCTION(mdp_vsync2),
  1132. MSM_PIN_FUNCTION(mdp_vsync3),
  1133. MSM_PIN_FUNCTION(mi2s0_data0),
  1134. MSM_PIN_FUNCTION(mi2s0_data1),
  1135. MSM_PIN_FUNCTION(mi2s0_sck),
  1136. MSM_PIN_FUNCTION(mi2s0_ws),
  1137. MSM_PIN_FUNCTION(mi2s1_data0),
  1138. MSM_PIN_FUNCTION(mi2s1_data1),
  1139. MSM_PIN_FUNCTION(mi2s1_sck),
  1140. MSM_PIN_FUNCTION(mi2s1_ws),
  1141. MSM_PIN_FUNCTION(mi2s2_data0),
  1142. MSM_PIN_FUNCTION(mi2s2_data1),
  1143. MSM_PIN_FUNCTION(mi2s2_sck),
  1144. MSM_PIN_FUNCTION(mi2s2_ws),
  1145. MSM_PIN_FUNCTION(mss_grfc0),
  1146. MSM_PIN_FUNCTION(mss_grfc1),
  1147. MSM_PIN_FUNCTION(mss_grfc10),
  1148. MSM_PIN_FUNCTION(mss_grfc11),
  1149. MSM_PIN_FUNCTION(mss_grfc12),
  1150. MSM_PIN_FUNCTION(mss_grfc2),
  1151. MSM_PIN_FUNCTION(mss_grfc3),
  1152. MSM_PIN_FUNCTION(mss_grfc4),
  1153. MSM_PIN_FUNCTION(mss_grfc5),
  1154. MSM_PIN_FUNCTION(mss_grfc6),
  1155. MSM_PIN_FUNCTION(mss_grfc7),
  1156. MSM_PIN_FUNCTION(mss_grfc8),
  1157. MSM_PIN_FUNCTION(mss_grfc9),
  1158. MSM_PIN_FUNCTION(nav_gpio),
  1159. MSM_PIN_FUNCTION(pa_indicator),
  1160. MSM_PIN_FUNCTION(pcie0_clkreqn),
  1161. MSM_PIN_FUNCTION(pcie1_clkreqn),
  1162. MSM_PIN_FUNCTION(phase_flag),
  1163. MSM_PIN_FUNCTION(pll_bist),
  1164. MSM_PIN_FUNCTION(pll_clk),
  1165. MSM_PIN_FUNCTION(pri_mi2s),
  1166. MSM_PIN_FUNCTION(prng_rosc),
  1167. MSM_PIN_FUNCTION(qdss_cti),
  1168. MSM_PIN_FUNCTION(qdss_gpio),
  1169. MSM_PIN_FUNCTION(qlink0_enable),
  1170. MSM_PIN_FUNCTION(qlink0_request),
  1171. MSM_PIN_FUNCTION(qlink0_wmss),
  1172. MSM_PIN_FUNCTION(qlink1_enable),
  1173. MSM_PIN_FUNCTION(qlink1_request),
  1174. MSM_PIN_FUNCTION(qlink1_wmss),
  1175. MSM_PIN_FUNCTION(qlink2_enable),
  1176. MSM_PIN_FUNCTION(qlink2_request),
  1177. MSM_PIN_FUNCTION(qlink2_wmss),
  1178. MSM_PIN_FUNCTION(qspi0),
  1179. MSM_PIN_FUNCTION(qspi1),
  1180. MSM_PIN_FUNCTION(qspi2),
  1181. MSM_PIN_FUNCTION(qspi3),
  1182. MSM_PIN_FUNCTION(qspi_clk),
  1183. MSM_PIN_FUNCTION(qspi_cs),
  1184. MSM_PIN_FUNCTION(qup0),
  1185. MSM_PIN_FUNCTION(qup1),
  1186. MSM_PIN_FUNCTION(qup10),
  1187. MSM_PIN_FUNCTION(qup11),
  1188. MSM_PIN_FUNCTION(qup12),
  1189. MSM_PIN_FUNCTION(qup13),
  1190. MSM_PIN_FUNCTION(qup14),
  1191. MSM_PIN_FUNCTION(qup15),
  1192. MSM_PIN_FUNCTION(qup16),
  1193. MSM_PIN_FUNCTION(qup17),
  1194. MSM_PIN_FUNCTION(qup18),
  1195. MSM_PIN_FUNCTION(qup19),
  1196. MSM_PIN_FUNCTION(qup2),
  1197. MSM_PIN_FUNCTION(qup3),
  1198. MSM_PIN_FUNCTION(qup4),
  1199. MSM_PIN_FUNCTION(qup5),
  1200. MSM_PIN_FUNCTION(qup6),
  1201. MSM_PIN_FUNCTION(qup7),
  1202. MSM_PIN_FUNCTION(qup8),
  1203. MSM_PIN_FUNCTION(qup9),
  1204. MSM_PIN_FUNCTION(qup_l4),
  1205. MSM_PIN_FUNCTION(qup_l5),
  1206. MSM_PIN_FUNCTION(qup_l6),
  1207. MSM_PIN_FUNCTION(sd_write),
  1208. MSM_PIN_FUNCTION(sdc40),
  1209. MSM_PIN_FUNCTION(sdc41),
  1210. MSM_PIN_FUNCTION(sdc42),
  1211. MSM_PIN_FUNCTION(sdc43),
  1212. MSM_PIN_FUNCTION(sdc4_clk),
  1213. MSM_PIN_FUNCTION(sdc4_cmd),
  1214. MSM_PIN_FUNCTION(sec_mi2s),
  1215. MSM_PIN_FUNCTION(tb_trig),
  1216. MSM_PIN_FUNCTION(tgu_ch0),
  1217. MSM_PIN_FUNCTION(tgu_ch1),
  1218. MSM_PIN_FUNCTION(tgu_ch2),
  1219. MSM_PIN_FUNCTION(tgu_ch3),
  1220. MSM_PIN_FUNCTION(tsense_pwm1),
  1221. MSM_PIN_FUNCTION(tsense_pwm2),
  1222. MSM_PIN_FUNCTION(uim0_clk),
  1223. MSM_PIN_FUNCTION(uim0_data),
  1224. MSM_PIN_FUNCTION(uim0_present),
  1225. MSM_PIN_FUNCTION(uim0_reset),
  1226. MSM_PIN_FUNCTION(uim1_clk),
  1227. MSM_PIN_FUNCTION(uim1_data),
  1228. MSM_PIN_FUNCTION(uim1_present),
  1229. MSM_PIN_FUNCTION(uim1_reset),
  1230. MSM_PIN_FUNCTION(usb2phy_ac),
  1231. MSM_PIN_FUNCTION(usb_phy),
  1232. MSM_PIN_FUNCTION(vfr_0),
  1233. MSM_PIN_FUNCTION(vfr_1),
  1234. MSM_PIN_FUNCTION(vsense_trigger),
  1235. };
  1236. /* Every pin is maintained as a single group, and missing or non-existing pin
  1237. * would be maintained as dummy group to synchronize pin group index with
  1238. * pin descriptor registered with pinctrl core.
  1239. * Clients would not be able to request these dummy pin groups.
  1240. */
  1241. static const struct msm_pingroup sm8350_groups[] = {
  1242. [0] = PINGROUP(0, qup13, _, _, _, _, _, _, _, _),
  1243. [1] = PINGROUP(1, qup13, _, _, _, _, _, _, _, _),
  1244. [2] = PINGROUP(2, qup13, qup_l4, _, _, _, _, _, _, _),
  1245. [3] = PINGROUP(3, qup13, qup_l5, _, _, _, _, _, _, _),
  1246. [4] = PINGROUP(4, qup0, _, _, _, _, _, _, _, _),
  1247. [5] = PINGROUP(5, qup0, _, _, _, _, _, _, _, _),
  1248. [6] = PINGROUP(6, qup0, qup_l4, _, _, _, _, _, _, _),
  1249. [7] = PINGROUP(7, qup0, qup_l5, _, _, _, _, _, _, _),
  1250. [8] = PINGROUP(8, qup1, _, _, _, _, _, _, _, _),
  1251. [9] = PINGROUP(9, qup1, _, _, _, _, _, _, _, _),
  1252. [10] = PINGROUP(10, qup1, qup_l6, _, _, _, _, _, _, _),
  1253. [11] = PINGROUP(11, qup1, _, _, _, _, _, _, _, _),
  1254. [12] = PINGROUP(12, qup2, phase_flag, _, _, _, _, _, _, _),
  1255. [13] = PINGROUP(13, qup2, phase_flag, _, _, _, _, _, _, _),
  1256. [14] = PINGROUP(14, qup2, qdss_cti, dbg_out, _, _, _, _, _, _),
  1257. [15] = PINGROUP(15, qup2, mdp_vsync, _, _, _, _, _, _, _),
  1258. [16] = PINGROUP(16, qup3, phase_flag, _, _, _, _, _, _, _),
  1259. [17] = PINGROUP(17, qup3, phase_flag, _, _, _, _, _, _, _),
  1260. [18] = PINGROUP(18, qup3, _, _, _, _, _, _, _, _),
  1261. [19] = PINGROUP(19, qup3, _, _, _, _, _, _, _, _),
  1262. [20] = PINGROUP(20, qup4, _, _, _, _, _, _, _, _),
  1263. [21] = PINGROUP(21, qup4, _, _, _, _, _, _, _, _),
  1264. [22] = PINGROUP(22, qup4, _, _, _, _, _, _, _, _),
  1265. [23] = PINGROUP(23, qup4, _, _, _, _, _, _, _, _),
  1266. [24] = PINGROUP(24, qup5, _, _, _, _, _, _, _, _),
  1267. [25] = PINGROUP(25, qup5, _, _, _, _, _, _, _, _),
  1268. [26] = PINGROUP(26, qup5, mdp_vsync, _, _, _, _, _, _, _),
  1269. [27] = PINGROUP(27, qup5, qdss_cti, _, _, _, _, _, _, _),
  1270. [28] = PINGROUP(28, qup6, phase_flag, _, _, _, _, _, _, _),
  1271. [29] = PINGROUP(29, qup6, phase_flag, _, _, _, _, _, _, _),
  1272. [30] = PINGROUP(30, qup6, phase_flag, _, _, _, _, _, _, _),
  1273. [31] = PINGROUP(31, qup6, phase_flag, _, _, _, _, _, _, _),
  1274. [32] = PINGROUP(32, qup7, phase_flag, _, _, _, _, _, _, _),
  1275. [33] = PINGROUP(33, qup7, phase_flag, _, _, _, _, _, _, _),
  1276. [34] = PINGROUP(34, qup7, phase_flag, _, _, _, _, _, _, _),
  1277. [35] = PINGROUP(35, qup7, phase_flag, _, _, _, _, _, _, _),
  1278. [36] = PINGROUP(36, qup8, ibi_i3c, ddr_bist, _, _, _, _, _, _),
  1279. [37] = PINGROUP(37, qup8, ibi_i3c, ddr_bist, _, _, _, _, _, _),
  1280. [38] = PINGROUP(38, qup8, _, _, _, _, _, _, _, _),
  1281. [39] = PINGROUP(39, qup8, usb2phy_ac, _, _, _, _, _, _, _),
  1282. [40] = PINGROUP(40, qup9, ddr_bist, _, _, _, _, _, _, _),
  1283. [41] = PINGROUP(41, qup9, ddr_bist, _, _, _, _, _, _, _),
  1284. [42] = PINGROUP(42, qup9, qup_l6, _, _, _, _, _, _, _),
  1285. [43] = PINGROUP(43, qup9, ddr_pxi3, _, _, _, _, _, _, _),
  1286. [44] = PINGROUP(44, qup10, qspi0, sdc40, ddr_pxi3, _, _, _, _, _),
  1287. [45] = PINGROUP(45, qup10, qspi1, sdc41, ddr_pxi2, _, _, _, _, _),
  1288. [46] = PINGROUP(46, qup10, _, _, _, _, _, _, _, _),
  1289. [47] = PINGROUP(47, qup10, qspi_cs, ddr_pxi2, _, _, _, _, _, _),
  1290. [48] = PINGROUP(48, qup11, qspi2, sdc42, ddr_pxi1, _, _, _, _, _),
  1291. [49] = PINGROUP(49, qup11, qspi3, sdc43, ddr_pxi1, _, _, _, _, _),
  1292. [50] = PINGROUP(50, qup11, qspi_clk, sdc4_clk, _, _, _, _, _, _),
  1293. [51] = PINGROUP(51, qup11, qspi_cs, sdc4_cmd, ddr_pxi0, _, _, _, _, _),
  1294. [52] = PINGROUP(52, qup12, ddr_pxi0, _, _, _, _, _, _, _),
  1295. [53] = PINGROUP(53, qup12, _, _, _, _, _, _, _, _),
  1296. [54] = PINGROUP(54, qup12, _, _, _, _, _, _, _, _),
  1297. [55] = PINGROUP(55, qup12, atest_usb, _, _, _, _, _, _, _),
  1298. [56] = PINGROUP(56, qup14, ibi_i3c, _, _, _, _, _, _, _),
  1299. [57] = PINGROUP(57, qup14, ibi_i3c, _, _, _, _, _, _, _),
  1300. [58] = PINGROUP(58, qup14, qup_l4, _, _, _, _, _, _, _),
  1301. [59] = PINGROUP(59, qup14, qup_l5, _, _, _, _, _, _, _),
  1302. [60] = PINGROUP(60, qup15, ibi_i3c, _, _, _, _, _, _, _),
  1303. [61] = PINGROUP(61, qup15, ibi_i3c, _, _, _, _, _, _, _),
  1304. [62] = PINGROUP(62, qup15, qup_l6, _, _, _, _, _, _, _),
  1305. [63] = PINGROUP(63, qup15, qup_l4, _, _, _, _, _, _, _),
  1306. [64] = PINGROUP(64, qup16, tb_trig, _, _, _, _, _, _, _),
  1307. [65] = PINGROUP(65, qup16, _, _, _, _, _, _, _, _),
  1308. [66] = PINGROUP(66, qup16, qup_l5, _, _, _, _, _, _, _),
  1309. [67] = PINGROUP(67, qup16, qup_l6, _, _, _, _, _, _, _),
  1310. [68] = PINGROUP(68, qup18, _, _, _, _, _, _, _, _),
  1311. [69] = PINGROUP(69, qup18, _, _, _, _, _, _, _, _),
  1312. [70] = PINGROUP(70, qup18, _, _, _, _, _, _, _, _),
  1313. [71] = PINGROUP(71, qup18, _, _, _, _, _, _, _, _),
  1314. [72] = PINGROUP(72, qup17, phase_flag, _, _, _, _, _, _, _),
  1315. [73] = PINGROUP(73, qup17, phase_flag, _, _, _, _, _, _, _),
  1316. [74] = PINGROUP(74, qup17, phase_flag, _, _, _, _, _, _, _),
  1317. [75] = PINGROUP(75, qup17, phase_flag, _, _, _, _, _, _, _),
  1318. [76] = PINGROUP(76, qup19, phase_flag, _, _, _, _, _, _, _),
  1319. [77] = PINGROUP(77, qup19, phase_flag, _, _, _, _, _, _, _),
  1320. [78] = PINGROUP(78, qup19, phase_flag, _, vsense_trigger, _, _, _, _, _),
  1321. [79] = PINGROUP(79, qup19, phase_flag, _, _, _, _, _, _, _),
  1322. [80] = PINGROUP(80, usb2phy_ac, jitter_bist, atest_usb, _, _, _, _, _, _),
  1323. [81] = PINGROUP(81, usb_phy, pll_bist, pll_clk, atest_usb, _, _, _, _, _),
  1324. [82] = PINGROUP(82, mdp_vsync, _, _, _, _, _, _, _, _),
  1325. [83] = PINGROUP(83, mdp_vsync, dp_lcd, _, _, _, _, _, _, _),
  1326. [84] = PINGROUP(84, mdp_vsync, vfr_0, _, _, _, _, _, _, _),
  1327. [85] = PINGROUP(85, atest_char, _, _, _, _, _, _, _, _),
  1328. [86] = PINGROUP(86, mdp_vsync0, mdp_vsync1, atest_char, _, _, _, _, _, _),
  1329. [87] = PINGROUP(87, dp_hot, mdp_vsync2, mdp_vsync3, qdss_cti, atest_char, _, _, _, _),
  1330. [88] = PINGROUP(88, qdss_cti, tsense_pwm1, tsense_pwm2, _, _, _, _, _, _),
  1331. [89] = PINGROUP(89, qdss_cti, _, _, _, _, _, _, _, _),
  1332. [90] = PINGROUP(90, vfr_1, qdss_cti, _, _, _, _, _, _, _),
  1333. [91] = PINGROUP(91, qdss_cti, _, _, _, _, _, _, _, _),
  1334. [92] = PINGROUP(92, qdss_cti, _, _, _, _, _, _, _, _),
  1335. [93] = PINGROUP(93, sd_write, _, _, _, _, _, _, _, _),
  1336. [94] = PINGROUP(94, _, _, _, _, _, _, _, _, _),
  1337. [95] = PINGROUP(95, pcie0_clkreqn, _, _, _, _, _, _, _, _),
  1338. [96] = PINGROUP(96, _, _, _, _, _, _, _, _, _),
  1339. [97] = PINGROUP(97, _, _, _, _, _, _, _, _, _),
  1340. [98] = PINGROUP(98, pcie1_clkreqn, _, _, _, _, _, _, _, _),
  1341. [99] = PINGROUP(99, tgu_ch0, _, _, _, _, _, _, _, _),
  1342. [100] = PINGROUP(100, cam_mclk, tgu_ch1, qdss_gpio, _, _, _, _, _, _),
  1343. [101] = PINGROUP(101, cam_mclk, tgu_ch2, qdss_gpio, _, _, _, _, _, _),
  1344. [102] = PINGROUP(102, cam_mclk, tgu_ch3, qdss_gpio, _, _, _, _, _, _),
  1345. [103] = PINGROUP(103, cam_mclk, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1346. [104] = PINGROUP(104, cam_mclk, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1347. [105] = PINGROUP(105, cam_mclk, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1348. [106] = PINGROUP(106, cci_async, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1349. [107] = PINGROUP(107, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1350. [108] = PINGROUP(108, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1351. [109] = PINGROUP(109, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1352. [110] = PINGROUP(110, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1353. [111] = PINGROUP(111, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1354. [112] = PINGROUP(112, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1355. [113] = PINGROUP(113, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1356. [114] = PINGROUP(114, cci_i2c, phase_flag, _, qdss_gpio, _, _, _, _, _),
  1357. [115] = PINGROUP(115, cci_timer, gcc_gp1, qdss_gpio, atest_char, _, _, _, _, _),
  1358. [116] = PINGROUP(116, cci_timer, gcc_gp2, qdss_gpio, _, _, _, _, _, _),
  1359. [117] = PINGROUP(117, cci_timer, gcc_gp3, qdss_gpio, atest_char, _, _, _, _, _),
  1360. [118] = PINGROUP(118, cci_timer, cci_async, _, _, _, _, _, _, _),
  1361. [119] = PINGROUP(119, cci_timer, cci_async, _, _, _, _, _, _, _),
  1362. [120] = PINGROUP(120, mi2s2_sck, _, _, _, _, _, _, _, _),
  1363. [121] = PINGROUP(121, mi2s2_data0, _, _, _, _, _, _, _, _),
  1364. [122] = PINGROUP(122, mi2s2_ws, _, _, _, _, _, _, _, _),
  1365. [123] = PINGROUP(123, pri_mi2s, _, _, _, _, _, _, _, _),
  1366. [124] = PINGROUP(124, sec_mi2s, audio_ref, mi2s2_data1, _, _, _, _, _, _),
  1367. [125] = PINGROUP(125, mi2s0_sck, _, _, _, _, _, _, _, _),
  1368. [126] = PINGROUP(126, mi2s0_data0, _, _, _, _, _, _, _, _),
  1369. [127] = PINGROUP(127, mi2s0_data1, _, _, _, _, _, _, _, _),
  1370. [128] = PINGROUP(128, mi2s0_ws, _, _, _, _, _, _, _, _),
  1371. [129] = PINGROUP(129, lpass_slimbus, mi2s1_sck, gcc_gp1, _, _, _, _, _, _),
  1372. [130] = PINGROUP(130, lpass_slimbus, mi2s1_data0, gcc_gp2, _, _, _, _, _, _),
  1373. [131] = PINGROUP(131, mi2s1_data1, gcc_gp3, _, _, _, _, _, _, _),
  1374. [132] = PINGROUP(132, mi2s1_ws, _, _, _, _, _, _, _, _),
  1375. [133] = PINGROUP(133, uim1_data, _, _, _, _, _, _, _, _),
  1376. [134] = PINGROUP(134, uim1_clk, _, _, _, _, _, _, _, _),
  1377. [135] = PINGROUP(135, uim1_reset, _, _, _, _, _, _, _, _),
  1378. [136] = PINGROUP(136, uim1_present, tb_trig, _, _, _, _, _, _, _),
  1379. [137] = PINGROUP(137, uim0_data, _, _, _, _, _, _, _, _),
  1380. [138] = PINGROUP(138, uim0_clk, _, _, _, _, _, _, _, _),
  1381. [139] = PINGROUP(139, uim0_reset, _, _, _, _, _, _, _, _),
  1382. [140] = PINGROUP(140, uim0_present, _, _, _, _, _, _, _, _),
  1383. [141] = PINGROUP(141, _, mss_grfc0, _, _, _, _, _, _, _),
  1384. [142] = PINGROUP(142, _, mss_grfc1, _, _, _, _, _, _, _),
  1385. [143] = PINGROUP(143, _, mss_grfc2, _, _, _, _, _, _, _),
  1386. [144] = PINGROUP(144, _, mss_grfc3, _, _, _, _, _, _, _),
  1387. [145] = PINGROUP(145, _, mss_grfc4, _, _, _, _, _, _, _),
  1388. [146] = PINGROUP(146, _, mss_grfc5, _, _, _, _, _, _, _),
  1389. [147] = PINGROUP(147, _, mss_grfc6, _, _, _, _, _, _, _),
  1390. [148] = PINGROUP(148, _, mss_grfc7, _, _, _, _, _, _, _),
  1391. [149] = PINGROUP(149, _, mss_grfc8, _, _, _, _, _, _, _),
  1392. [150] = PINGROUP(150, _, mss_grfc9, _, _, _, _, _, _, _),
  1393. [151] = PINGROUP(151, coex_uart1, atest_usb, _, _, _, _, _, _, _),
  1394. [152] = PINGROUP(152, coex_uart1, atest_usb, _, _, _, _, _, _, _),
  1395. [153] = PINGROUP(153, coex_uart2, mss_grfc10, atest_usb, _, _, _, _, _, _),
  1396. [154] = PINGROUP(154, coex_uart2, mss_grfc11, atest_usb, _, _, _, _, _, _),
  1397. [155] = PINGROUP(155, nav_gpio, _, _, _, _, _, _, _, _),
  1398. [156] = PINGROUP(156, nav_gpio, _, _, _, _, _, _, _, _),
  1399. [157] = PINGROUP(157, mss_grfc12, pa_indicator, nav_gpio, _, _, _, _, _, _),
  1400. [158] = PINGROUP(158, mss_grfc0, atest_usb, _, _, _, _, _, _, _),
  1401. [159] = PINGROUP(159, qlink0_request, atest_usb, _, _, _, _, _, _, _),
  1402. [160] = PINGROUP(160, qlink0_enable, _, _, _, _, _, _, _, _),
  1403. [161] = PINGROUP(161, qlink0_wmss, atest_usb, _, _, _, _, _, _, _),
  1404. [162] = PINGROUP(162, qlink1_request, _, _, _, _, _, _, _, _),
  1405. [163] = PINGROUP(163, qlink1_enable, _, _, _, _, _, _, _, _),
  1406. [164] = PINGROUP(164, qlink1_wmss, _, _, _, _, _, _, _, _),
  1407. [165] = PINGROUP(165, qlink2_request, _, _, _, _, _, _, _, _),
  1408. [166] = PINGROUP(166, qlink2_enable, _, _, _, _, _, _, _, _),
  1409. [167] = PINGROUP(167, qlink2_wmss, _, _, _, _, _, _, _, _),
  1410. [168] = PINGROUP(168, _, _, _, _, _, _, _, _, _),
  1411. [169] = PINGROUP(169, _, _, _, _, _, _, _, _, _),
  1412. [170] = PINGROUP(170, _, _, _, _, _, _, _, _, _),
  1413. [171] = PINGROUP(171, _, _, _, _, _, _, _, _, _),
  1414. [172] = PINGROUP(172, _, _, _, _, _, _, _, _, _),
  1415. [173] = PINGROUP(173, _, _, _, _, _, _, _, _, _),
  1416. [174] = PINGROUP(174, cmu_rng, _, _, _, _, _, _, _, _),
  1417. [175] = PINGROUP(175, cmu_rng, _, _, _, _, _, _, _, _),
  1418. [176] = PINGROUP(176, cmu_rng, _, _, _, _, _, _, _, _),
  1419. [177] = PINGROUP(177, cmu_rng, _, _, _, _, _, _, _, _),
  1420. [178] = PINGROUP(178, _, _, _, _, _, _, _, _, _),
  1421. [179] = PINGROUP(179, _, _, _, _, _, _, _, _, _),
  1422. [180] = PINGROUP(180, _, _, _, _, _, _, _, _, _),
  1423. [181] = PINGROUP(181, _, _, _, _, _, _, _, _, _),
  1424. [182] = PINGROUP(182, _, _, _, _, _, _, _, _, _),
  1425. [183] = PINGROUP(183, cri_trng0, qdss_gpio, _, _, _, _, _, _, _),
  1426. [184] = PINGROUP(184, cri_trng1, qdss_gpio, _, _, _, _, _, _, _),
  1427. [185] = PINGROUP(185, prng_rosc, qdss_gpio, _, _, _, _, _, _, _),
  1428. [186] = PINGROUP(186, cri_trng, qdss_gpio, _, _, _, _, _, _, _),
  1429. [187] = PINGROUP(187, qdss_gpio, _, _, _, _, _, _, _, _),
  1430. [188] = PINGROUP(188, qdss_gpio, _, _, _, _, _, _, _, _),
  1431. [189] = PINGROUP(189, qdss_gpio, _, _, _, _, _, _, _, _),
  1432. [190] = PINGROUP(190, qdss_gpio, _, _, _, _, _, _, _, _),
  1433. [191] = PINGROUP(191, qdss_gpio, _, _, _, _, _, _, _, _),
  1434. [192] = PINGROUP(192, qdss_gpio, _, _, _, _, _, _, _, _),
  1435. [193] = PINGROUP(193, qdss_gpio, _, _, _, _, _, _, _, _),
  1436. [194] = PINGROUP(194, qdss_gpio, _, _, _, _, _, _, _, _),
  1437. [195] = PINGROUP(195, qdss_gpio, _, _, _, _, _, _, _, _),
  1438. [196] = PINGROUP(196, qdss_gpio, _, _, _, _, _, _, _, _),
  1439. [197] = PINGROUP(197, qdss_gpio, _, _, _, _, _, _, _, _),
  1440. [198] = PINGROUP(198, qdss_gpio, _, _, _, _, _, _, _, _),
  1441. [199] = PINGROUP(199, qdss_gpio, _, _, _, _, _, _, _, _),
  1442. [200] = PINGROUP(200, qdss_gpio, _, _, _, _, _, _, _, _),
  1443. [201] = PINGROUP(201, _, _, _, _, _, _, _, _, _),
  1444. [202] = PINGROUP(202, _, _, _, _, _, _, _, _, _),
  1445. [203] = UFS_RESET(ufs_reset, 0xd8000),
  1446. [204] = SDC_PINGROUP(sdc2_clk, 0xcf000, 14, 6),
  1447. [205] = SDC_PINGROUP(sdc2_cmd, 0xcf000, 11, 3),
  1448. [206] = SDC_PINGROUP(sdc2_data, 0xcf000, 9, 0),
  1449. };
  1450. static const struct msm_gpio_wakeirq_map sm8350_pdc_map[] = {
  1451. { 2, 117 }, { 7, 82 }, { 11, 83 }, { 14, 80 }, { 15, 146 },
  1452. { 19, 121 }, { 23, 84 }, { 26, 86 }, { 27, 75 }, { 31, 85 },
  1453. { 32, 97 }, { 34, 98 }, { 35, 131 }, { 36, 79 }, { 38, 99 },
  1454. { 39, 92 }, { 40, 101 }, { 43, 137 }, { 44, 102 }, { 46, 96 },
  1455. { 47, 93 }, { 50, 108 }, { 51, 127 }, { 55, 128 }, { 56, 81 },
  1456. { 59, 112 }, { 60, 119 }, { 63, 73 }, { 67, 74 }, { 71, 134 },
  1457. { 75, 103 }, { 79, 104 }, { 80, 126 }, { 81, 139 }, { 82, 140 },
  1458. { 83, 141 }, { 84, 124 }, { 85, 109 }, { 86, 143 }, { 87, 138 },
  1459. { 88, 122 }, { 89, 113 }, { 90, 114 }, { 91, 115 }, { 92, 76 },
  1460. { 95, 147 }, { 96, 148 }, { 98, 149 }, { 99, 150 }, { 115, 125 },
  1461. { 116, 106 }, { 117, 105 }, { 118, 116 }, { 119, 123 }, { 130, 145 },
  1462. { 136, 72 }, { 140, 100 }, { 151, 110 }, { 153, 95 }, { 155, 107 },
  1463. { 156, 94 }, { 157, 111 }, { 159, 118 }, { 162, 77 }, { 165, 78 },
  1464. { 169, 70 }, { 172, 132 }, { 174, 87 }, { 175, 88 }, { 177, 89 },
  1465. { 179, 120 }, { 180, 129 }, { 183, 90 }, { 185, 136 }, { 187, 142 },
  1466. { 190, 144 }, { 198, 91 }, { 200, 133 }, { 202, 135 },
  1467. };
  1468. static const struct msm_pinctrl_soc_data sm8350_tlmm = {
  1469. .pins = sm8350_pins,
  1470. .npins = ARRAY_SIZE(sm8350_pins),
  1471. .functions = sm8350_functions,
  1472. .nfunctions = ARRAY_SIZE(sm8350_functions),
  1473. .groups = sm8350_groups,
  1474. .ngroups = ARRAY_SIZE(sm8350_groups),
  1475. .ngpios = 204,
  1476. .wakeirq_map = sm8350_pdc_map,
  1477. .nwakeirq_map = ARRAY_SIZE(sm8350_pdc_map),
  1478. };
  1479. static int sm8350_tlmm_probe(struct platform_device *pdev)
  1480. {
  1481. return msm_pinctrl_probe(pdev, &sm8350_tlmm);
  1482. }
  1483. static const struct of_device_id sm8350_tlmm_of_match[] = {
  1484. { .compatible = "qcom,sm8350-tlmm", },
  1485. { },
  1486. };
  1487. static struct platform_driver sm8350_tlmm_driver = {
  1488. .driver = {
  1489. .name = "sm8350-tlmm",
  1490. .of_match_table = sm8350_tlmm_of_match,
  1491. },
  1492. .probe = sm8350_tlmm_probe,
  1493. .remove_new = msm_pinctrl_remove,
  1494. };
  1495. static int __init sm8350_tlmm_init(void)
  1496. {
  1497. return platform_driver_register(&sm8350_tlmm_driver);
  1498. }
  1499. arch_initcall(sm8350_tlmm_init);
  1500. static void __exit sm8350_tlmm_exit(void)
  1501. {
  1502. platform_driver_unregister(&sm8350_tlmm_driver);
  1503. }
  1504. module_exit(sm8350_tlmm_exit);
  1505. MODULE_DESCRIPTION("QTI SM8350 TLMM driver");
  1506. MODULE_LICENSE("GPL v2");
  1507. MODULE_DEVICE_TABLE(of, sm8350_tlmm_of_match);