pinctrl-sm6375.c 44 KB

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