pinctrl-sm6375.c 45 KB

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