pinctrl-sm8350.c 47 KB

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