pinctrl-sm8450.c 49 KB

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