pinctrl-sm8250.c 43 KB

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