pinctrl-holi.c 48 KB

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