pinctrl-sm8450.c 50 KB

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