pinctrl-blair.c 49 KB

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