pinctrl-sm6150.c 46 KB

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