pinctrl-sc7280.c 47 KB

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