pinctrl-sdx75.c 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #include <linux/module.h>
  6. #include <linux/of.h>
  7. #include <linux/platform_device.h>
  8. #include "pinctrl-msm.h"
  9. #define REG_BASE 0x100000
  10. #define REG_SIZE 0x1000
  11. #define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \
  12. { \
  13. .grp = PINCTRL_PINGROUP("gpio"#id, gpio##id##_pins, \
  14. (unsigned int)ARRAY_SIZE(gpio##id##_pins)), \
  15. .ctl_reg = REG_BASE + REG_SIZE * id, \
  16. .io_reg = REG_BASE + 0x4 + REG_SIZE * id, \
  17. .intr_cfg_reg = REG_BASE + 0x8 + REG_SIZE * id, \
  18. .intr_status_reg = REG_BASE + 0xc + REG_SIZE * id, \
  19. .intr_target_reg = REG_BASE + 0x8 + REG_SIZE * id, \
  20. .mux_bit = 2, \
  21. .pull_bit = 0, \
  22. .drv_bit = 6, \
  23. .egpio_enable = 12, \
  24. .egpio_present = 11, \
  25. .oe_bit = 9, \
  26. .in_bit = 0, \
  27. .out_bit = 1, \
  28. .intr_enable_bit = 0, \
  29. .intr_status_bit = 0, \
  30. .intr_target_bit = 5, \
  31. .intr_target_kpss_val = 3, \
  32. .intr_raw_status_bit = 4, \
  33. .intr_polarity_bit = 1, \
  34. .intr_detection_bit = 2, \
  35. .intr_detection_width = 2, \
  36. .funcs = (int[]){ \
  37. msm_mux_gpio, /* gpio mode */ \
  38. msm_mux_##f1, \
  39. msm_mux_##f2, \
  40. msm_mux_##f3, \
  41. msm_mux_##f4, \
  42. msm_mux_##f5, \
  43. msm_mux_##f6, \
  44. msm_mux_##f7, \
  45. msm_mux_##f8, \
  46. msm_mux_##f9, \
  47. msm_mux_##f10 \
  48. }, \
  49. .nfuncs = 11, \
  50. }
  51. #define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv) \
  52. { \
  53. .grp = PINCTRL_PINGROUP(#pg_name, pg_name##_pins, \
  54. (unsigned int)ARRAY_SIZE(pg_name##_pins)), \
  55. .ctl_reg = ctl, \
  56. .io_reg = 0, \
  57. .intr_cfg_reg = 0, \
  58. .intr_status_reg = 0, \
  59. .intr_target_reg = 0, \
  60. .mux_bit = -1, \
  61. .pull_bit = pull, \
  62. .drv_bit = drv, \
  63. .oe_bit = -1, \
  64. .in_bit = -1, \
  65. .out_bit = -1, \
  66. .intr_enable_bit = -1, \
  67. .intr_status_bit = -1, \
  68. .intr_target_bit = -1, \
  69. .intr_raw_status_bit = -1, \
  70. .intr_polarity_bit = -1, \
  71. .intr_detection_bit = -1, \
  72. .intr_detection_width = -1, \
  73. }
  74. static const struct pinctrl_pin_desc sdx75_pins[] = {
  75. PINCTRL_PIN(0, "GPIO_0"),
  76. PINCTRL_PIN(1, "GPIO_1"),
  77. PINCTRL_PIN(2, "GPIO_2"),
  78. PINCTRL_PIN(3, "GPIO_3"),
  79. PINCTRL_PIN(4, "GPIO_4"),
  80. PINCTRL_PIN(5, "GPIO_5"),
  81. PINCTRL_PIN(6, "GPIO_6"),
  82. PINCTRL_PIN(7, "GPIO_7"),
  83. PINCTRL_PIN(8, "GPIO_8"),
  84. PINCTRL_PIN(9, "GPIO_9"),
  85. PINCTRL_PIN(10, "GPIO_10"),
  86. PINCTRL_PIN(11, "GPIO_11"),
  87. PINCTRL_PIN(12, "GPIO_12"),
  88. PINCTRL_PIN(13, "GPIO_13"),
  89. PINCTRL_PIN(14, "GPIO_14"),
  90. PINCTRL_PIN(15, "GPIO_15"),
  91. PINCTRL_PIN(16, "GPIO_16"),
  92. PINCTRL_PIN(17, "GPIO_17"),
  93. PINCTRL_PIN(18, "GPIO_18"),
  94. PINCTRL_PIN(19, "GPIO_19"),
  95. PINCTRL_PIN(20, "GPIO_20"),
  96. PINCTRL_PIN(21, "GPIO_21"),
  97. PINCTRL_PIN(22, "GPIO_22"),
  98. PINCTRL_PIN(23, "GPIO_23"),
  99. PINCTRL_PIN(24, "GPIO_24"),
  100. PINCTRL_PIN(25, "GPIO_25"),
  101. PINCTRL_PIN(26, "GPIO_26"),
  102. PINCTRL_PIN(27, "GPIO_27"),
  103. PINCTRL_PIN(28, "GPIO_28"),
  104. PINCTRL_PIN(29, "GPIO_29"),
  105. PINCTRL_PIN(30, "GPIO_30"),
  106. PINCTRL_PIN(31, "GPIO_31"),
  107. PINCTRL_PIN(32, "GPIO_32"),
  108. PINCTRL_PIN(33, "GPIO_33"),
  109. PINCTRL_PIN(34, "GPIO_34"),
  110. PINCTRL_PIN(35, "GPIO_35"),
  111. PINCTRL_PIN(36, "GPIO_36"),
  112. PINCTRL_PIN(37, "GPIO_37"),
  113. PINCTRL_PIN(38, "GPIO_38"),
  114. PINCTRL_PIN(39, "GPIO_39"),
  115. PINCTRL_PIN(40, "GPIO_40"),
  116. PINCTRL_PIN(41, "GPIO_41"),
  117. PINCTRL_PIN(42, "GPIO_42"),
  118. PINCTRL_PIN(43, "GPIO_43"),
  119. PINCTRL_PIN(44, "GPIO_44"),
  120. PINCTRL_PIN(45, "GPIO_45"),
  121. PINCTRL_PIN(46, "GPIO_46"),
  122. PINCTRL_PIN(47, "GPIO_47"),
  123. PINCTRL_PIN(48, "GPIO_48"),
  124. PINCTRL_PIN(49, "GPIO_49"),
  125. PINCTRL_PIN(50, "GPIO_50"),
  126. PINCTRL_PIN(51, "GPIO_51"),
  127. PINCTRL_PIN(52, "GPIO_52"),
  128. PINCTRL_PIN(53, "GPIO_53"),
  129. PINCTRL_PIN(54, "GPIO_54"),
  130. PINCTRL_PIN(55, "GPIO_55"),
  131. PINCTRL_PIN(56, "GPIO_56"),
  132. PINCTRL_PIN(57, "GPIO_57"),
  133. PINCTRL_PIN(58, "GPIO_58"),
  134. PINCTRL_PIN(59, "GPIO_59"),
  135. PINCTRL_PIN(60, "GPIO_60"),
  136. PINCTRL_PIN(61, "GPIO_61"),
  137. PINCTRL_PIN(62, "GPIO_62"),
  138. PINCTRL_PIN(63, "GPIO_63"),
  139. PINCTRL_PIN(64, "GPIO_64"),
  140. PINCTRL_PIN(65, "GPIO_65"),
  141. PINCTRL_PIN(66, "GPIO_66"),
  142. PINCTRL_PIN(67, "GPIO_67"),
  143. PINCTRL_PIN(68, "GPIO_68"),
  144. PINCTRL_PIN(69, "GPIO_69"),
  145. PINCTRL_PIN(70, "GPIO_70"),
  146. PINCTRL_PIN(71, "GPIO_71"),
  147. PINCTRL_PIN(72, "GPIO_72"),
  148. PINCTRL_PIN(73, "GPIO_73"),
  149. PINCTRL_PIN(74, "GPIO_74"),
  150. PINCTRL_PIN(75, "GPIO_75"),
  151. PINCTRL_PIN(76, "GPIO_76"),
  152. PINCTRL_PIN(77, "GPIO_77"),
  153. PINCTRL_PIN(78, "GPIO_78"),
  154. PINCTRL_PIN(79, "GPIO_79"),
  155. PINCTRL_PIN(80, "GPIO_80"),
  156. PINCTRL_PIN(81, "GPIO_81"),
  157. PINCTRL_PIN(82, "GPIO_82"),
  158. PINCTRL_PIN(83, "GPIO_83"),
  159. PINCTRL_PIN(84, "GPIO_84"),
  160. PINCTRL_PIN(85, "GPIO_85"),
  161. PINCTRL_PIN(86, "GPIO_86"),
  162. PINCTRL_PIN(87, "GPIO_87"),
  163. PINCTRL_PIN(88, "GPIO_88"),
  164. PINCTRL_PIN(89, "GPIO_89"),
  165. PINCTRL_PIN(90, "GPIO_90"),
  166. PINCTRL_PIN(91, "GPIO_91"),
  167. PINCTRL_PIN(92, "GPIO_92"),
  168. PINCTRL_PIN(93, "GPIO_93"),
  169. PINCTRL_PIN(94, "GPIO_94"),
  170. PINCTRL_PIN(95, "GPIO_95"),
  171. PINCTRL_PIN(96, "GPIO_96"),
  172. PINCTRL_PIN(97, "GPIO_97"),
  173. PINCTRL_PIN(98, "GPIO_98"),
  174. PINCTRL_PIN(99, "GPIO_99"),
  175. PINCTRL_PIN(100, "GPIO_100"),
  176. PINCTRL_PIN(101, "GPIO_101"),
  177. PINCTRL_PIN(102, "GPIO_102"),
  178. PINCTRL_PIN(103, "GPIO_103"),
  179. PINCTRL_PIN(104, "GPIO_104"),
  180. PINCTRL_PIN(105, "GPIO_105"),
  181. PINCTRL_PIN(106, "GPIO_106"),
  182. PINCTRL_PIN(107, "GPIO_107"),
  183. PINCTRL_PIN(108, "GPIO_108"),
  184. PINCTRL_PIN(109, "GPIO_109"),
  185. PINCTRL_PIN(110, "GPIO_110"),
  186. PINCTRL_PIN(111, "GPIO_111"),
  187. PINCTRL_PIN(112, "GPIO_112"),
  188. PINCTRL_PIN(113, "GPIO_113"),
  189. PINCTRL_PIN(114, "GPIO_114"),
  190. PINCTRL_PIN(115, "GPIO_115"),
  191. PINCTRL_PIN(116, "GPIO_116"),
  192. PINCTRL_PIN(117, "GPIO_117"),
  193. PINCTRL_PIN(118, "GPIO_118"),
  194. PINCTRL_PIN(119, "GPIO_119"),
  195. PINCTRL_PIN(120, "GPIO_120"),
  196. PINCTRL_PIN(121, "GPIO_121"),
  197. PINCTRL_PIN(122, "GPIO_122"),
  198. PINCTRL_PIN(123, "GPIO_123"),
  199. PINCTRL_PIN(124, "GPIO_124"),
  200. PINCTRL_PIN(125, "GPIO_125"),
  201. PINCTRL_PIN(126, "GPIO_126"),
  202. PINCTRL_PIN(127, "GPIO_127"),
  203. PINCTRL_PIN(128, "GPIO_128"),
  204. PINCTRL_PIN(129, "GPIO_129"),
  205. PINCTRL_PIN(130, "GPIO_130"),
  206. PINCTRL_PIN(131, "GPIO_131"),
  207. PINCTRL_PIN(132, "GPIO_132"),
  208. PINCTRL_PIN(133, "SDC1_RCLK"),
  209. PINCTRL_PIN(134, "SDC1_CLK"),
  210. PINCTRL_PIN(135, "SDC1_CMD"),
  211. PINCTRL_PIN(136, "SDC1_DATA"),
  212. PINCTRL_PIN(137, "SDC2_CLK"),
  213. PINCTRL_PIN(138, "SDC2_CMD"),
  214. PINCTRL_PIN(139, "SDC2_DATA"),
  215. };
  216. #define DECLARE_MSM_GPIO_PINS(pin) \
  217. static const unsigned int gpio##pin##_pins[] = {pin}
  218. DECLARE_MSM_GPIO_PINS(0);
  219. DECLARE_MSM_GPIO_PINS(1);
  220. DECLARE_MSM_GPIO_PINS(2);
  221. DECLARE_MSM_GPIO_PINS(3);
  222. DECLARE_MSM_GPIO_PINS(4);
  223. DECLARE_MSM_GPIO_PINS(5);
  224. DECLARE_MSM_GPIO_PINS(6);
  225. DECLARE_MSM_GPIO_PINS(7);
  226. DECLARE_MSM_GPIO_PINS(8);
  227. DECLARE_MSM_GPIO_PINS(9);
  228. DECLARE_MSM_GPIO_PINS(10);
  229. DECLARE_MSM_GPIO_PINS(11);
  230. DECLARE_MSM_GPIO_PINS(12);
  231. DECLARE_MSM_GPIO_PINS(13);
  232. DECLARE_MSM_GPIO_PINS(14);
  233. DECLARE_MSM_GPIO_PINS(15);
  234. DECLARE_MSM_GPIO_PINS(16);
  235. DECLARE_MSM_GPIO_PINS(17);
  236. DECLARE_MSM_GPIO_PINS(18);
  237. DECLARE_MSM_GPIO_PINS(19);
  238. DECLARE_MSM_GPIO_PINS(20);
  239. DECLARE_MSM_GPIO_PINS(21);
  240. DECLARE_MSM_GPIO_PINS(22);
  241. DECLARE_MSM_GPIO_PINS(23);
  242. DECLARE_MSM_GPIO_PINS(24);
  243. DECLARE_MSM_GPIO_PINS(25);
  244. DECLARE_MSM_GPIO_PINS(26);
  245. DECLARE_MSM_GPIO_PINS(27);
  246. DECLARE_MSM_GPIO_PINS(28);
  247. DECLARE_MSM_GPIO_PINS(29);
  248. DECLARE_MSM_GPIO_PINS(30);
  249. DECLARE_MSM_GPIO_PINS(31);
  250. DECLARE_MSM_GPIO_PINS(32);
  251. DECLARE_MSM_GPIO_PINS(33);
  252. DECLARE_MSM_GPIO_PINS(34);
  253. DECLARE_MSM_GPIO_PINS(35);
  254. DECLARE_MSM_GPIO_PINS(36);
  255. DECLARE_MSM_GPIO_PINS(37);
  256. DECLARE_MSM_GPIO_PINS(38);
  257. DECLARE_MSM_GPIO_PINS(39);
  258. DECLARE_MSM_GPIO_PINS(40);
  259. DECLARE_MSM_GPIO_PINS(41);
  260. DECLARE_MSM_GPIO_PINS(42);
  261. DECLARE_MSM_GPIO_PINS(43);
  262. DECLARE_MSM_GPIO_PINS(44);
  263. DECLARE_MSM_GPIO_PINS(45);
  264. DECLARE_MSM_GPIO_PINS(46);
  265. DECLARE_MSM_GPIO_PINS(47);
  266. DECLARE_MSM_GPIO_PINS(48);
  267. DECLARE_MSM_GPIO_PINS(49);
  268. DECLARE_MSM_GPIO_PINS(50);
  269. DECLARE_MSM_GPIO_PINS(51);
  270. DECLARE_MSM_GPIO_PINS(52);
  271. DECLARE_MSM_GPIO_PINS(53);
  272. DECLARE_MSM_GPIO_PINS(54);
  273. DECLARE_MSM_GPIO_PINS(55);
  274. DECLARE_MSM_GPIO_PINS(56);
  275. DECLARE_MSM_GPIO_PINS(57);
  276. DECLARE_MSM_GPIO_PINS(58);
  277. DECLARE_MSM_GPIO_PINS(59);
  278. DECLARE_MSM_GPIO_PINS(60);
  279. DECLARE_MSM_GPIO_PINS(61);
  280. DECLARE_MSM_GPIO_PINS(62);
  281. DECLARE_MSM_GPIO_PINS(63);
  282. DECLARE_MSM_GPIO_PINS(64);
  283. DECLARE_MSM_GPIO_PINS(65);
  284. DECLARE_MSM_GPIO_PINS(66);
  285. DECLARE_MSM_GPIO_PINS(67);
  286. DECLARE_MSM_GPIO_PINS(68);
  287. DECLARE_MSM_GPIO_PINS(69);
  288. DECLARE_MSM_GPIO_PINS(70);
  289. DECLARE_MSM_GPIO_PINS(71);
  290. DECLARE_MSM_GPIO_PINS(72);
  291. DECLARE_MSM_GPIO_PINS(73);
  292. DECLARE_MSM_GPIO_PINS(74);
  293. DECLARE_MSM_GPIO_PINS(75);
  294. DECLARE_MSM_GPIO_PINS(76);
  295. DECLARE_MSM_GPIO_PINS(77);
  296. DECLARE_MSM_GPIO_PINS(78);
  297. DECLARE_MSM_GPIO_PINS(79);
  298. DECLARE_MSM_GPIO_PINS(80);
  299. DECLARE_MSM_GPIO_PINS(81);
  300. DECLARE_MSM_GPIO_PINS(82);
  301. DECLARE_MSM_GPIO_PINS(83);
  302. DECLARE_MSM_GPIO_PINS(84);
  303. DECLARE_MSM_GPIO_PINS(85);
  304. DECLARE_MSM_GPIO_PINS(86);
  305. DECLARE_MSM_GPIO_PINS(87);
  306. DECLARE_MSM_GPIO_PINS(88);
  307. DECLARE_MSM_GPIO_PINS(89);
  308. DECLARE_MSM_GPIO_PINS(90);
  309. DECLARE_MSM_GPIO_PINS(91);
  310. DECLARE_MSM_GPIO_PINS(92);
  311. DECLARE_MSM_GPIO_PINS(93);
  312. DECLARE_MSM_GPIO_PINS(94);
  313. DECLARE_MSM_GPIO_PINS(95);
  314. DECLARE_MSM_GPIO_PINS(96);
  315. DECLARE_MSM_GPIO_PINS(97);
  316. DECLARE_MSM_GPIO_PINS(98);
  317. DECLARE_MSM_GPIO_PINS(99);
  318. DECLARE_MSM_GPIO_PINS(100);
  319. DECLARE_MSM_GPIO_PINS(101);
  320. DECLARE_MSM_GPIO_PINS(102);
  321. DECLARE_MSM_GPIO_PINS(103);
  322. DECLARE_MSM_GPIO_PINS(104);
  323. DECLARE_MSM_GPIO_PINS(105);
  324. DECLARE_MSM_GPIO_PINS(106);
  325. DECLARE_MSM_GPIO_PINS(107);
  326. DECLARE_MSM_GPIO_PINS(108);
  327. DECLARE_MSM_GPIO_PINS(109);
  328. DECLARE_MSM_GPIO_PINS(110);
  329. DECLARE_MSM_GPIO_PINS(111);
  330. DECLARE_MSM_GPIO_PINS(112);
  331. DECLARE_MSM_GPIO_PINS(113);
  332. DECLARE_MSM_GPIO_PINS(114);
  333. DECLARE_MSM_GPIO_PINS(115);
  334. DECLARE_MSM_GPIO_PINS(116);
  335. DECLARE_MSM_GPIO_PINS(117);
  336. DECLARE_MSM_GPIO_PINS(118);
  337. DECLARE_MSM_GPIO_PINS(119);
  338. DECLARE_MSM_GPIO_PINS(120);
  339. DECLARE_MSM_GPIO_PINS(121);
  340. DECLARE_MSM_GPIO_PINS(122);
  341. DECLARE_MSM_GPIO_PINS(123);
  342. DECLARE_MSM_GPIO_PINS(124);
  343. DECLARE_MSM_GPIO_PINS(125);
  344. DECLARE_MSM_GPIO_PINS(126);
  345. DECLARE_MSM_GPIO_PINS(127);
  346. DECLARE_MSM_GPIO_PINS(128);
  347. DECLARE_MSM_GPIO_PINS(129);
  348. DECLARE_MSM_GPIO_PINS(130);
  349. DECLARE_MSM_GPIO_PINS(131);
  350. DECLARE_MSM_GPIO_PINS(132);
  351. static const unsigned int sdc1_rclk_pins[] = {133};
  352. static const unsigned int sdc1_clk_pins[] = {134};
  353. static const unsigned int sdc1_cmd_pins[] = {135};
  354. static const unsigned int sdc1_data_pins[] = {136};
  355. static const unsigned int sdc2_clk_pins[] = {137};
  356. static const unsigned int sdc2_cmd_pins[] = {138};
  357. static const unsigned int sdc2_data_pins[] = {139};
  358. enum sdx75_functions {
  359. msm_mux_adsp_ext,
  360. msm_mux_atest_char,
  361. msm_mux_audio_ref_clk,
  362. msm_mux_bimc_dte,
  363. msm_mux_char_exec,
  364. msm_mux_coex_uart2,
  365. msm_mux_coex_uart,
  366. msm_mux_cri_trng,
  367. msm_mux_cri_trng0,
  368. msm_mux_cri_trng1,
  369. msm_mux_dbg_out_clk,
  370. msm_mux_ddr_bist,
  371. msm_mux_ddr_pxi0,
  372. msm_mux_ebi0_wrcdc,
  373. msm_mux_ebi2_a,
  374. msm_mux_ebi2_lcd,
  375. msm_mux_ebi2_lcd_te,
  376. msm_mux_emac0_mcg,
  377. msm_mux_emac0_ptp,
  378. msm_mux_emac1_mcg,
  379. msm_mux_emac1_ptp,
  380. msm_mux_emac_cdc,
  381. msm_mux_emac_pps_in,
  382. msm_mux_eth0_mdc,
  383. msm_mux_eth0_mdio,
  384. msm_mux_eth1_mdc,
  385. msm_mux_eth1_mdio,
  386. msm_mux_ext_dbg,
  387. msm_mux_gcc_125_clk,
  388. msm_mux_gcc_gp1_clk,
  389. msm_mux_gcc_gp2_clk,
  390. msm_mux_gcc_gp3_clk,
  391. msm_mux_gcc_plltest,
  392. msm_mux_gpio,
  393. msm_mux_i2s_mclk,
  394. msm_mux_jitter_bist,
  395. msm_mux_ldo_en,
  396. msm_mux_ldo_update,
  397. msm_mux_m_voc,
  398. msm_mux_mgpi_clk,
  399. msm_mux_native_char,
  400. msm_mux_native_tsens,
  401. msm_mux_native_tsense,
  402. msm_mux_nav_dr_sync,
  403. msm_mux_nav_gpio,
  404. msm_mux_pa_indicator,
  405. msm_mux_pci_e,
  406. msm_mux_pcie0_clkreq_n,
  407. msm_mux_pcie1_clkreq_n,
  408. msm_mux_pcie2_clkreq_n,
  409. msm_mux_pll_bist_sync,
  410. msm_mux_pll_clk_aux,
  411. msm_mux_pll_ref_clk,
  412. msm_mux_pri_mi2s,
  413. msm_mux_prng_rosc,
  414. msm_mux_qdss_cti,
  415. msm_mux_qdss_gpio,
  416. msm_mux_qlink0_b_en,
  417. msm_mux_qlink0_b_req,
  418. msm_mux_qlink0_l_en,
  419. msm_mux_qlink0_l_req,
  420. msm_mux_qlink0_wmss,
  421. msm_mux_qlink1_l_en,
  422. msm_mux_qlink1_l_req,
  423. msm_mux_qlink1_wmss,
  424. msm_mux_qup_se0,
  425. msm_mux_qup_se1_l2_mira,
  426. msm_mux_qup_se1_l2_mirb,
  427. msm_mux_qup_se1_l3_mira,
  428. msm_mux_qup_se1_l3_mirb,
  429. msm_mux_qup_se2,
  430. msm_mux_qup_se3,
  431. msm_mux_qup_se4,
  432. msm_mux_qup_se5,
  433. msm_mux_qup_se6,
  434. msm_mux_qup_se7,
  435. msm_mux_qup_se8,
  436. msm_mux_rgmii_rx_ctl,
  437. msm_mux_rgmii_rxc,
  438. msm_mux_rgmii_rxd,
  439. msm_mux_rgmii_tx_ctl,
  440. msm_mux_rgmii_txc,
  441. msm_mux_rgmii_txd,
  442. msm_mux_sd_card,
  443. msm_mux_sdc1_tb,
  444. msm_mux_sdc2_tb_trig,
  445. msm_mux_sec_mi2s,
  446. msm_mux_sgmii_phy_intr0_n,
  447. msm_mux_sgmii_phy_intr1_n,
  448. msm_mux_spmi_coex,
  449. msm_mux_spmi_vgi,
  450. msm_mux_tgu_ch0_trigout,
  451. msm_mux_tmess_prng0,
  452. msm_mux_tmess_prng1,
  453. msm_mux_tmess_prng2,
  454. msm_mux_tmess_prng3,
  455. msm_mux_tri_mi2s,
  456. msm_mux_uim1_clk,
  457. msm_mux_uim1_data,
  458. msm_mux_uim1_present,
  459. msm_mux_uim1_reset,
  460. msm_mux_uim2_clk,
  461. msm_mux_uim2_data,
  462. msm_mux_uim2_present,
  463. msm_mux_uim2_reset,
  464. msm_mux_usb2phy_ac_en,
  465. msm_mux_vsense_trigger_mirnat,
  466. msm_mux__,
  467. };
  468. static const char *const gpio_groups[] = {
  469. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
  470. "gpio7", "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13",
  471. "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20",
  472. "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27",
  473. "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34",
  474. "gpio35", "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41",
  475. "gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48",
  476. "gpio49", "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55",
  477. "gpio56", "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62",
  478. "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69",
  479. "gpio70", "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76",
  480. "gpio77", "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83",
  481. "gpio84", "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
  482. "gpio91", "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97",
  483. "gpio98", "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  484. "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", "gpio111",
  485. "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", "gpio117", "gpio118",
  486. "gpio119", "gpio120", "gpio121", "gpio122", "gpio123", "gpio124", "gpio125",
  487. "gpio126", "gpio127", "gpio128", "gpio129", "gpio130", "gpio131", "gpio132",
  488. };
  489. static const char *const adsp_ext_groups[] = {
  490. "gpio59", "gpio68",
  491. };
  492. static const char *const atest_char_groups[] = {
  493. "gpio24", "gpio25", "gpio26", "gpio41", "gpio63",
  494. };
  495. static const char *const audio_ref_clk_groups[] = {
  496. "gpio126",
  497. };
  498. static const char *const bimc_dte_groups[] = {
  499. "gpio14", "gpio15", "gpio61", "gpio59",
  500. };
  501. static const char *const char_exec_groups[] = {
  502. "gpio6", "gpio7",
  503. };
  504. static const char *const coex_uart2_groups[] = {
  505. "gpio48", "gpio49", "gpio90", "gpio91",
  506. };
  507. static const char *const coex_uart_groups[] = {
  508. "gpio46", "gpio47",
  509. };
  510. static const char *const cri_trng_groups[] = {
  511. "gpio36",
  512. };
  513. static const char *const cri_trng0_groups[] = {
  514. "gpio31",
  515. };
  516. static const char *const cri_trng1_groups[] = {
  517. "gpio32",
  518. };
  519. static const char *const dbg_out_clk_groups[] = {
  520. "gpio26",
  521. };
  522. static const char *const ddr_bist_groups[] = {
  523. "gpio46", "gpio47", "gpio48", "gpio49",
  524. };
  525. static const char *const ddr_pxi0_groups[] = {
  526. "gpio45", "gpio46",
  527. };
  528. static const char *const ebi0_wrcdc_groups[] = {
  529. "gpio0", "gpio2",
  530. };
  531. static const char *const ebi2_a_groups[] = {
  532. "gpio100",
  533. };
  534. static const char *const ebi2_lcd_groups[] = {
  535. "gpio99", "gpio101",
  536. };
  537. static const char *const ebi2_lcd_te_groups[] = {
  538. "gpio98",
  539. };
  540. static const char *const emac0_mcg_groups[] = {
  541. "gpio83", "gpio84", "gpio85", "gpio89",
  542. };
  543. static const char *const emac0_ptp_groups[] = {
  544. "gpio35", "gpio83", "gpio84", "gpio85", "gpio89", "gpio119", "gpio123",
  545. };
  546. static const char *const emac1_mcg_groups[] = {
  547. "gpio90", "gpio92", "gpio93", "gpio122",
  548. };
  549. static const char *const emac1_ptp_groups[] = {
  550. "gpio112", "gpio113", "gpio114", "gpio115",
  551. };
  552. static const char *const emac_cdc_groups[] = {
  553. "gpio38", "gpio39",
  554. };
  555. static const char *const emac_pps_in_groups[] = {
  556. "gpio127",
  557. };
  558. static const char *const eth0_mdc_groups[] = {
  559. "gpio94",
  560. };
  561. static const char *const eth0_mdio_groups[] = {
  562. "gpio95",
  563. };
  564. static const char *const eth1_mdc_groups[] = {
  565. "gpio106",
  566. };
  567. static const char *const eth1_mdio_groups[] = {
  568. "gpio107",
  569. };
  570. static const char *const ext_dbg_groups[] = {
  571. "gpio12", "gpio13", "gpio14", "gpio15",
  572. };
  573. static const char *const gcc_125_clk_groups[] = {
  574. "gpio25",
  575. };
  576. static const char *const gcc_gp1_clk_groups[] = {
  577. "gpio39",
  578. };
  579. static const char *const gcc_gp2_clk_groups[] = {
  580. "gpio40",
  581. };
  582. static const char *const gcc_gp3_clk_groups[] = {
  583. "gpio41",
  584. };
  585. static const char *const gcc_plltest_groups[] = {
  586. "gpio81", "gpio82",
  587. };
  588. static const char *const i2s_mclk_groups[] = {
  589. "gpio74",
  590. };
  591. static const char *const jitter_bist_groups[] = {
  592. "gpio41",
  593. };
  594. static const char *const ldo_en_groups[] = {
  595. "gpio8",
  596. };
  597. static const char *const ldo_update_groups[] = {
  598. "gpio62",
  599. };
  600. static const char *const m_voc_groups[] = {
  601. "gpio62", "gpio63", "gpio64", "gpio65", "gpio71",
  602. };
  603. static const char *const mgpi_clk_groups[] = {
  604. "gpio39", "gpio40",
  605. };
  606. static const char *const native_char_groups[] = {
  607. "gpio29", "gpio33", "gpio57", "gpio66", "gpio67",
  608. };
  609. static const char *const native_tsens_groups[] = {
  610. "gpio38",
  611. };
  612. static const char *const native_tsense_groups[] = {
  613. "gpio64", "gpio76",
  614. };
  615. static const char *const nav_dr_sync_groups[] = {
  616. "gpio36",
  617. };
  618. static const char *const nav_gpio_groups[] = {
  619. "gpio35", "gpio36", "gpio104",
  620. };
  621. static const char *const pa_indicator_groups[] = {
  622. "gpio58",
  623. };
  624. static const char *const pci_e_groups[] = {
  625. "gpio42",
  626. };
  627. static const char *const pcie0_clkreq_n_groups[] = {
  628. "gpio43",
  629. };
  630. static const char *const pcie1_clkreq_n_groups[] = {
  631. "gpio124",
  632. };
  633. static const char *const pcie2_clkreq_n_groups[] = {
  634. "gpio121",
  635. };
  636. static const char *const pll_bist_sync_groups[] = {
  637. "gpio38",
  638. };
  639. static const char *const pll_clk_aux_groups[] = {
  640. "gpio40",
  641. };
  642. static const char *const pll_ref_clk_groups[] = {
  643. "gpio37",
  644. };
  645. static const char *const pri_mi2s_groups[] = {
  646. "gpio16", "gpio17", "gpio18", "gpio19",
  647. };
  648. static const char *const prng_rosc_groups[] = {
  649. "gpio27", "gpio36", "gpio37", "gpio38",
  650. };
  651. static const char *const qdss_cti_groups[] = {
  652. "gpio16", "gpio17", "gpio52", "gpio53", "gpio56",
  653. "gpio57", "gpio59", "gpio60", "gpio78", "gpio79",
  654. };
  655. static const char *const qdss_gpio_groups[] = {
  656. "gpio82", "gpio83", "gpio84", "gpio85", "gpio94",
  657. "gpio95", "gpio96", "gpio97", "gpio110", "gpio111",
  658. "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
  659. "gpio117", "gpio118", "gpio119",
  660. };
  661. static const char *const qlink0_b_en_groups[] = {
  662. "gpio40",
  663. };
  664. static const char *const qlink0_b_req_groups[] = {
  665. "gpio41",
  666. };
  667. static const char *const qlink0_l_en_groups[] = {
  668. "gpio37",
  669. };
  670. static const char *const qlink0_l_req_groups[] = {
  671. "gpio38",
  672. };
  673. static const char *const qlink0_wmss_groups[] = {
  674. "gpio39",
  675. };
  676. static const char *const qlink1_l_en_groups[] = {
  677. "gpio26",
  678. };
  679. static const char *const qlink1_l_req_groups[] = {
  680. "gpio27",
  681. };
  682. static const char *const qlink1_wmss_groups[] = {
  683. "gpio28",
  684. };
  685. static const char *const qup_se0_groups[] = {
  686. "gpio8", "gpio9", "gpio10", "gpio11",
  687. };
  688. static const char *const qup_se1_l2_mira_groups[] = {
  689. "gpio12",
  690. };
  691. static const char *const qup_se1_l2_mirb_groups[] = {
  692. "gpio16",
  693. };
  694. static const char *const qup_se1_l3_mira_groups[] = {
  695. "gpio13",
  696. };
  697. static const char *const qup_se1_l3_mirb_groups[] = {
  698. "gpio17",
  699. };
  700. static const char *const qup_se2_groups[] = {
  701. "gpio14", "gpio15", "gpio16", "gpio17",
  702. };
  703. static const char *const qup_se3_groups[] = {
  704. "gpio52", "gpio53", "gpio54", "gpio55",
  705. };
  706. static const char *const qup_se4_groups[] = {
  707. "gpio64", "gpio65",
  708. };
  709. static const char *const qup_se5_groups[] = {
  710. "gpio110", "gpio111",
  711. };
  712. static const char *const qup_se6_groups[] = {
  713. "gpio112", "gpio113", "gpio114", "gpio115",
  714. };
  715. static const char *const qup_se7_groups[] = {
  716. "gpio116", "gpio117", "gpio118", "gpio119",
  717. };
  718. static const char *const qup_se8_groups[] = {
  719. "gpio124", "gpio125",
  720. };
  721. static const char *const rgmii_rx_ctl_groups[] = {
  722. "gpio93",
  723. };
  724. static const char *const rgmii_rxc_groups[] = {
  725. "gpio88",
  726. };
  727. static const char *const rgmii_rxd_groups[] = {
  728. "gpio89", "gpio90", "gpio91", "gpio92",
  729. };
  730. static const char *const rgmii_tx_ctl_groups[] = {
  731. "gpio87",
  732. };
  733. static const char *const rgmii_txc_groups[] = {
  734. "gpio82",
  735. };
  736. static const char *const rgmii_txd_groups[] = {
  737. "gpio83", "gpio84", "gpio85", "gpio86",
  738. };
  739. static const char *const sd_card_groups[] = {
  740. "gpio105",
  741. };
  742. static const char *const sdc1_tb_groups[] = {
  743. "gpio84", "gpio130",
  744. };
  745. static const char *const sdc2_tb_trig_groups[] = {
  746. "gpio129",
  747. };
  748. static const char *const sec_mi2s_groups[] = {
  749. "gpio20", "gpio21", "gpio22", "gpio23",
  750. };
  751. static const char *const sgmii_phy_intr0_n_groups[] = {
  752. "gpio97",
  753. };
  754. static const char *const sgmii_phy_intr1_n_groups[] = {
  755. "gpio109",
  756. };
  757. static const char *const spmi_coex_groups[] = {
  758. "gpio48", "gpio49",
  759. };
  760. static const char *const spmi_vgi_groups[] = {
  761. "gpio50", "gpio51",
  762. };
  763. static const char *const tgu_ch0_trigout_groups[] = {
  764. "gpio55",
  765. };
  766. static const char *const tmess_prng0_groups[] = {
  767. "gpio28",
  768. };
  769. static const char *const tmess_prng1_groups[] = {
  770. "gpio29",
  771. };
  772. static const char *const tmess_prng2_groups[] = {
  773. "gpio30",
  774. };
  775. static const char *const tmess_prng3_groups[] = {
  776. "gpio31",
  777. };
  778. static const char *const tri_mi2s_groups[] = {
  779. "gpio98", "gpio99", "gpio100", "gpio101",
  780. };
  781. static const char *const uim1_clk_groups[] = {
  782. "gpio7",
  783. };
  784. static const char *const uim1_data_groups[] = {
  785. "gpio4",
  786. };
  787. static const char *const uim1_present_groups[] = {
  788. "gpio5",
  789. };
  790. static const char *const uim1_reset_groups[] = {
  791. "gpio6",
  792. };
  793. static const char *const uim2_clk_groups[] = {
  794. "gpio3",
  795. };
  796. static const char *const uim2_data_groups[] = {
  797. "gpio0",
  798. };
  799. static const char *const uim2_present_groups[] = {
  800. "gpio1",
  801. };
  802. static const char *const uim2_reset_groups[] = {
  803. "gpio2",
  804. };
  805. static const char *const usb2phy_ac_en_groups[] = {
  806. "gpio80",
  807. };
  808. static const char *const vsense_trigger_mirnat_groups[] = {
  809. "gpio37",
  810. };
  811. static const struct pinfunction sdx75_functions[] = {
  812. MSM_PIN_FUNCTION(adsp_ext),
  813. MSM_PIN_FUNCTION(atest_char),
  814. MSM_PIN_FUNCTION(audio_ref_clk),
  815. MSM_PIN_FUNCTION(bimc_dte),
  816. MSM_PIN_FUNCTION(char_exec),
  817. MSM_PIN_FUNCTION(coex_uart2),
  818. MSM_PIN_FUNCTION(coex_uart),
  819. MSM_PIN_FUNCTION(cri_trng),
  820. MSM_PIN_FUNCTION(cri_trng0),
  821. MSM_PIN_FUNCTION(cri_trng1),
  822. MSM_PIN_FUNCTION(dbg_out_clk),
  823. MSM_PIN_FUNCTION(ddr_bist),
  824. MSM_PIN_FUNCTION(ddr_pxi0),
  825. MSM_PIN_FUNCTION(ebi0_wrcdc),
  826. MSM_PIN_FUNCTION(ebi2_a),
  827. MSM_PIN_FUNCTION(ebi2_lcd),
  828. MSM_PIN_FUNCTION(ebi2_lcd_te),
  829. MSM_PIN_FUNCTION(emac0_mcg),
  830. MSM_PIN_FUNCTION(emac0_ptp),
  831. MSM_PIN_FUNCTION(emac1_mcg),
  832. MSM_PIN_FUNCTION(emac1_ptp),
  833. MSM_PIN_FUNCTION(emac_cdc),
  834. MSM_PIN_FUNCTION(emac_pps_in),
  835. MSM_PIN_FUNCTION(eth0_mdc),
  836. MSM_PIN_FUNCTION(eth0_mdio),
  837. MSM_PIN_FUNCTION(eth1_mdc),
  838. MSM_PIN_FUNCTION(eth1_mdio),
  839. MSM_PIN_FUNCTION(ext_dbg),
  840. MSM_PIN_FUNCTION(gcc_125_clk),
  841. MSM_PIN_FUNCTION(gcc_gp1_clk),
  842. MSM_PIN_FUNCTION(gcc_gp2_clk),
  843. MSM_PIN_FUNCTION(gcc_gp3_clk),
  844. MSM_PIN_FUNCTION(gcc_plltest),
  845. MSM_PIN_FUNCTION(gpio),
  846. MSM_PIN_FUNCTION(i2s_mclk),
  847. MSM_PIN_FUNCTION(jitter_bist),
  848. MSM_PIN_FUNCTION(ldo_en),
  849. MSM_PIN_FUNCTION(ldo_update),
  850. MSM_PIN_FUNCTION(m_voc),
  851. MSM_PIN_FUNCTION(mgpi_clk),
  852. MSM_PIN_FUNCTION(native_char),
  853. MSM_PIN_FUNCTION(native_tsens),
  854. MSM_PIN_FUNCTION(native_tsense),
  855. MSM_PIN_FUNCTION(nav_dr_sync),
  856. MSM_PIN_FUNCTION(nav_gpio),
  857. MSM_PIN_FUNCTION(pa_indicator),
  858. MSM_PIN_FUNCTION(pci_e),
  859. MSM_PIN_FUNCTION(pcie0_clkreq_n),
  860. MSM_PIN_FUNCTION(pcie1_clkreq_n),
  861. MSM_PIN_FUNCTION(pcie2_clkreq_n),
  862. MSM_PIN_FUNCTION(pll_bist_sync),
  863. MSM_PIN_FUNCTION(pll_clk_aux),
  864. MSM_PIN_FUNCTION(pll_ref_clk),
  865. MSM_PIN_FUNCTION(pri_mi2s),
  866. MSM_PIN_FUNCTION(prng_rosc),
  867. MSM_PIN_FUNCTION(qdss_cti),
  868. MSM_PIN_FUNCTION(qdss_gpio),
  869. MSM_PIN_FUNCTION(qlink0_b_en),
  870. MSM_PIN_FUNCTION(qlink0_b_req),
  871. MSM_PIN_FUNCTION(qlink0_l_en),
  872. MSM_PIN_FUNCTION(qlink0_l_req),
  873. MSM_PIN_FUNCTION(qlink1_l_en),
  874. MSM_PIN_FUNCTION(qlink1_l_req),
  875. MSM_PIN_FUNCTION(qlink0_wmss),
  876. MSM_PIN_FUNCTION(qlink1_wmss),
  877. MSM_PIN_FUNCTION(qup_se0),
  878. MSM_PIN_FUNCTION(qup_se1_l2_mira),
  879. MSM_PIN_FUNCTION(qup_se1_l2_mirb),
  880. MSM_PIN_FUNCTION(qup_se1_l3_mira),
  881. MSM_PIN_FUNCTION(qup_se1_l3_mirb),
  882. MSM_PIN_FUNCTION(qup_se2),
  883. MSM_PIN_FUNCTION(qup_se3),
  884. MSM_PIN_FUNCTION(qup_se4),
  885. MSM_PIN_FUNCTION(qup_se5),
  886. MSM_PIN_FUNCTION(qup_se6),
  887. MSM_PIN_FUNCTION(qup_se7),
  888. MSM_PIN_FUNCTION(qup_se8),
  889. MSM_PIN_FUNCTION(rgmii_rx_ctl),
  890. MSM_PIN_FUNCTION(rgmii_rxc),
  891. MSM_PIN_FUNCTION(rgmii_rxd),
  892. MSM_PIN_FUNCTION(rgmii_tx_ctl),
  893. MSM_PIN_FUNCTION(rgmii_txc),
  894. MSM_PIN_FUNCTION(rgmii_txd),
  895. MSM_PIN_FUNCTION(sd_card),
  896. MSM_PIN_FUNCTION(sdc1_tb),
  897. MSM_PIN_FUNCTION(sdc2_tb_trig),
  898. MSM_PIN_FUNCTION(sec_mi2s),
  899. MSM_PIN_FUNCTION(sgmii_phy_intr0_n),
  900. MSM_PIN_FUNCTION(sgmii_phy_intr1_n),
  901. MSM_PIN_FUNCTION(spmi_coex),
  902. MSM_PIN_FUNCTION(spmi_vgi),
  903. MSM_PIN_FUNCTION(tgu_ch0_trigout),
  904. MSM_PIN_FUNCTION(tmess_prng0),
  905. MSM_PIN_FUNCTION(tmess_prng1),
  906. MSM_PIN_FUNCTION(tmess_prng2),
  907. MSM_PIN_FUNCTION(tmess_prng3),
  908. MSM_PIN_FUNCTION(tri_mi2s),
  909. MSM_PIN_FUNCTION(uim1_clk),
  910. MSM_PIN_FUNCTION(uim1_data),
  911. MSM_PIN_FUNCTION(uim1_present),
  912. MSM_PIN_FUNCTION(uim1_reset),
  913. MSM_PIN_FUNCTION(uim2_clk),
  914. MSM_PIN_FUNCTION(uim2_data),
  915. MSM_PIN_FUNCTION(uim2_present),
  916. MSM_PIN_FUNCTION(uim2_reset),
  917. MSM_PIN_FUNCTION(usb2phy_ac_en),
  918. MSM_PIN_FUNCTION(vsense_trigger_mirnat),
  919. };
  920. static const struct msm_pingroup sdx75_groups[] = {
  921. [0] = PINGROUP(0, uim2_data, ebi0_wrcdc, _, _, _, _, _, _, _, _),
  922. [1] = PINGROUP(1, uim2_present, _, _, _, _, _, _, _, _, _),
  923. [2] = PINGROUP(2, uim2_reset, ebi0_wrcdc, _, _, _, _, _, _, _, _),
  924. [3] = PINGROUP(3, uim2_clk, _, _, _, _, _, _, _, _, _),
  925. [4] = PINGROUP(4, uim1_data, _, _, _, _, _, _, _, _, _),
  926. [5] = PINGROUP(5, uim1_present, _, _, _, _, _, _, _, _, _),
  927. [6] = PINGROUP(6, uim1_reset, char_exec, _, _, _, _, _, _, _, _),
  928. [7] = PINGROUP(7, uim1_clk, char_exec, _, _, _, _, _, _, _, _),
  929. [8] = PINGROUP(8, qup_se0, ldo_en, _, _, _, _, _, _, _, _),
  930. [9] = PINGROUP(9, qup_se0, _, _, _, _, _, _, _, _, _),
  931. [10] = PINGROUP(10, qup_se0, _, _, _, _, _, _, _, _, _),
  932. [11] = PINGROUP(11, qup_se0, _, _, _, _, _, _, _, _, _),
  933. [12] = PINGROUP(12, qup_se1_l2_mira, ext_dbg, _, _, _, _, _, _, _, _),
  934. [13] = PINGROUP(13, qup_se1_l3_mira, ext_dbg, _, _, _, _, _, _, _, _),
  935. [14] = PINGROUP(14, qup_se2, ext_dbg, bimc_dte, _, _, _, _, _, _, _),
  936. [15] = PINGROUP(15, qup_se2, ext_dbg, bimc_dte, _, _, _, _, _, _, _),
  937. [16] = PINGROUP(16, pri_mi2s, qup_se2, qup_se1_l2_mirb, qdss_cti, qdss_cti, _, _, _, _, _),
  938. [17] = PINGROUP(17, pri_mi2s, qup_se2, qup_se1_l3_mirb, qdss_cti, qdss_cti, _, _, _, _, _),
  939. [18] = PINGROUP(18, pri_mi2s, _, _, _, _, _, _, _, _, _),
  940. [19] = PINGROUP(19, pri_mi2s, _, _, _, _, _, _, _, _, _),
  941. [20] = PINGROUP(20, sec_mi2s, _, _, _, _, _, _, _, _, _),
  942. [21] = PINGROUP(21, sec_mi2s, _, _, _, _, _, _, _, _, _),
  943. [22] = PINGROUP(22, sec_mi2s, _, _, _, _, _, _, _, _, _),
  944. [23] = PINGROUP(23, sec_mi2s, _, _, _, _, _, _, _, _, _),
  945. [24] = PINGROUP(24, _, atest_char, _, _, _, _, _, _, _, _),
  946. [25] = PINGROUP(25, gcc_125_clk, _, atest_char, _, _, _, _, _, _, _),
  947. [26] = PINGROUP(26, _, _, qlink1_l_en, dbg_out_clk, atest_char, _, _, _, _, _),
  948. [27] = PINGROUP(27, _, _, qlink1_l_req, prng_rosc, _, _, _, _, _, _),
  949. [28] = PINGROUP(28, _, qlink1_wmss, tmess_prng0, _, _, _, _, _, _, _),
  950. [29] = PINGROUP(29, _, _, _, native_char, tmess_prng1, _, _, _, _, _),
  951. [30] = PINGROUP(30, _, _, _, tmess_prng2, _, _, _, _, _, _),
  952. [31] = PINGROUP(31, _, _, cri_trng0, _, tmess_prng3, _, _, _, _, _),
  953. [32] = PINGROUP(32, _, _, cri_trng1, _, _, _, _, _, _, _),
  954. [33] = PINGROUP(33, _, _, native_char, _, _, _, _, _, _, _),
  955. [34] = PINGROUP(34, _, _, _, _, _, _, _, _, _, _),
  956. [35] = PINGROUP(35, nav_gpio, emac0_ptp, emac0_ptp, _, _, _, _, _, _, _),
  957. [36] = PINGROUP(36, nav_gpio, nav_dr_sync, nav_gpio, cri_trng, prng_rosc, _, _, _, _, _),
  958. [37] = PINGROUP(37, qlink0_l_en, _, pll_ref_clk, prng_rosc, vsense_trigger_mirnat, _, _, _, _, _),
  959. [38] = PINGROUP(38, qlink0_l_req, _, pll_bist_sync, prng_rosc, _, emac_cdc, _, native_tsens, _, _),
  960. [39] = PINGROUP(39, qlink0_wmss, _, mgpi_clk, gcc_gp1_clk, _, emac_cdc, _, _, _, _),
  961. [40] = PINGROUP(40, qlink0_b_en, _, mgpi_clk, pll_clk_aux, gcc_gp2_clk, _, _, _, _, _),
  962. [41] = PINGROUP(41, qlink0_b_req, _, jitter_bist, gcc_gp3_clk, _, _, atest_char, _, _, _),
  963. [42] = PINGROUP(42, pci_e, _, _, _, _, _, _, _, _, _),
  964. [43] = PINGROUP(43, pcie0_clkreq_n, _, _, _, _, _, _, _, _, _),
  965. [44] = PINGROUP(44, _, _, _, _, _, _, _, _, _, _),
  966. [45] = PINGROUP(45, ddr_pxi0, _, _, _, _, _, _, _, _, _),
  967. [46] = PINGROUP(46, coex_uart, ddr_bist, ddr_pxi0, _, _, _, _, _, _, _),
  968. [47] = PINGROUP(47, coex_uart, ddr_bist, _, _, _, _, _, _, _, _),
  969. [48] = PINGROUP(48, coex_uart2, spmi_coex, ddr_bist, _, _, _, _, _, _, _),
  970. [49] = PINGROUP(49, coex_uart2, spmi_coex, ddr_bist, _, _, _, _, _, _, _),
  971. [50] = PINGROUP(50, spmi_vgi, _, _, _, _, _, _, _, _, _),
  972. [51] = PINGROUP(51, spmi_vgi, _, _, _, _, _, _, _, _, _),
  973. [52] = PINGROUP(52, qup_se3, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
  974. [53] = PINGROUP(53, qup_se3, qdss_cti, qdss_cti, _, _, _, _, _, _, _),
  975. [54] = PINGROUP(54, qup_se3, _, _, _, _, _, _, _, _, _),
  976. [55] = PINGROUP(55, qup_se3, tgu_ch0_trigout, _, _, _, _, _, _, _, _),
  977. [56] = PINGROUP(56, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
  978. [57] = PINGROUP(57, qdss_cti, qdss_cti, _, native_char, _, _, _, _, _, _),
  979. [58] = PINGROUP(58, _, pa_indicator, _, _, _, _, _, _, _, _),
  980. [59] = PINGROUP(59, adsp_ext, qdss_cti, _, bimc_dte, _, _, _, _, _, _),
  981. [60] = PINGROUP(60, qdss_cti, _, _, _, _, _, _, _, _, _),
  982. [61] = PINGROUP(61, _, bimc_dte, _, _, _, _, _, _, _, _),
  983. [62] = PINGROUP(62, m_voc, ldo_update, _, _, _, _, _, _, _, _),
  984. [63] = PINGROUP(63, m_voc, _, atest_char, _, _, _, _, _, _, _),
  985. [64] = PINGROUP(64, qup_se4, m_voc, _, native_tsense, _, _, _, _, _, _),
  986. [65] = PINGROUP(65, qup_se4, m_voc, _, _, _, _, _, _, _, _),
  987. [66] = PINGROUP(66, _, native_char, _, _, _, _, _, _, _, _),
  988. [67] = PINGROUP(67, _, native_char, _, _, _, _, _, _, _, _),
  989. [68] = PINGROUP(68, adsp_ext, _, _, _, _, _, _, _, _, _),
  990. [69] = PINGROUP(69, _, _, _, _, _, _, _, _, _, _),
  991. [70] = PINGROUP(70, _, _, _, _, _, _, _, _, _, _),
  992. [71] = PINGROUP(71, m_voc, _, _, _, _, _, _, _, _, _),
  993. [72] = PINGROUP(72, _, _, _, _, _, _, _, _, _, _),
  994. [73] = PINGROUP(73, _, _, _, _, _, _, _, _, _, _),
  995. [74] = PINGROUP(74, i2s_mclk, _, _, _, _, _, _, _, _, _),
  996. [75] = PINGROUP(75, _, _, _, _, _, _, _, _, _, _),
  997. [76] = PINGROUP(76, native_tsense, _, _, _, _, _, _, _, _, _),
  998. [77] = PINGROUP(77, _, _, _, _, _, _, _, _, _, _),
  999. [78] = PINGROUP(78, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
  1000. [79] = PINGROUP(79, qdss_cti, qdss_cti, _, _, _, _, _, _, _, _),
  1001. [80] = PINGROUP(80, usb2phy_ac_en, _, _, _, _, _, _, _, _, _),
  1002. [81] = PINGROUP(81, gcc_plltest, _, _, _, _, _, _, _, _, _),
  1003. [82] = PINGROUP(82, rgmii_txc, gcc_plltest, qdss_gpio, _, _, _, _, _, _, _),
  1004. [83] = PINGROUP(83, rgmii_txd, emac0_ptp, emac0_ptp, emac0_mcg, qdss_gpio, _, _, _, _, _),
  1005. [84] = PINGROUP(84, rgmii_txd, emac0_ptp, emac0_mcg, qdss_gpio, _, sdc1_tb, _, _, _, _),
  1006. [85] = PINGROUP(85, rgmii_txd, emac0_ptp, emac0_mcg, qdss_gpio, _, _, _, _, _, _),
  1007. [86] = PINGROUP(86, rgmii_txd, _, _, _, _, _, _, _, _, _),
  1008. [87] = PINGROUP(87, rgmii_tx_ctl, _, _, _, _, _, _, _, _, _),
  1009. [88] = PINGROUP(88, rgmii_rxc, _, _, _, _, _, _, _, _, _),
  1010. [89] = PINGROUP(89, rgmii_rxd, emac0_ptp, emac0_ptp, emac0_mcg, _, _, _, _, _, _),
  1011. [90] = PINGROUP(90, rgmii_rxd, coex_uart2, emac1_mcg, _, _, _, _, _, _, _),
  1012. [91] = PINGROUP(91, rgmii_rxd, coex_uart2, _, _, _, _, _, _, _, _),
  1013. [92] = PINGROUP(92, rgmii_rxd, emac1_mcg, _, _, _, _, _, _, _, _),
  1014. [93] = PINGROUP(93, rgmii_rx_ctl, emac1_mcg, _, _, _, _, _, _, _, _),
  1015. [94] = PINGROUP(94, eth0_mdc, qdss_gpio, _, _, _, _, _, _, _, _),
  1016. [95] = PINGROUP(95, eth0_mdio, qdss_gpio, _, _, _, _, _, _, _, _),
  1017. [96] = PINGROUP(96, qdss_gpio, _, _, _, _, _, _, _, _, _),
  1018. [97] = PINGROUP(97, sgmii_phy_intr0_n, _, qdss_gpio, _, _, _, _, _, _, _),
  1019. [98] = PINGROUP(98, tri_mi2s, ebi2_lcd_te, _, _, _, _, _, _, _, _),
  1020. [99] = PINGROUP(99, tri_mi2s, ebi2_lcd, _, _, _, _, _, _, _, _),
  1021. [100] = PINGROUP(100, tri_mi2s, ebi2_a, _, _, _, _, _, _, _, _),
  1022. [101] = PINGROUP(101, tri_mi2s, ebi2_lcd, _, _, _, _, _, _, _, _),
  1023. [102] = PINGROUP(102, _, _, _, _, _, _, _, _, _, _),
  1024. [103] = PINGROUP(103, _, _, _, _, _, _, _, _, _, _),
  1025. [104] = PINGROUP(104, nav_gpio, _, _, _, _, _, _, _, _, _),
  1026. [105] = PINGROUP(105, sd_card, _, _, _, _, _, _, _, _, _),
  1027. [106] = PINGROUP(106, eth1_mdc, _, _, _, _, _, _, _, _, _),
  1028. [107] = PINGROUP(107, eth1_mdio, _, _, _, _, _, _, _, _, _),
  1029. [108] = PINGROUP(108, _, _, _, _, _, _, _, _, _, _),
  1030. [109] = PINGROUP(109, sgmii_phy_intr1_n, _, _, _, _, _, _, _, _, _),
  1031. [110] = PINGROUP(110, qup_se5, qdss_gpio, _, _, _, _, _, _, _, _),
  1032. [111] = PINGROUP(111, qup_se5, qdss_gpio, _, _, _, _, _, _, _, _),
  1033. [112] = PINGROUP(112, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
  1034. [113] = PINGROUP(113, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
  1035. [114] = PINGROUP(114, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
  1036. [115] = PINGROUP(115, qup_se6, emac1_ptp, emac1_ptp, qdss_gpio, _, _, _, _, _, _),
  1037. [116] = PINGROUP(116, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
  1038. [117] = PINGROUP(117, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
  1039. [118] = PINGROUP(118, qup_se7, qdss_gpio, _, _, _, _, _, _, _, _),
  1040. [119] = PINGROUP(119, qup_se7, emac0_ptp, qdss_gpio, _, _, _, _, _, _, _),
  1041. [120] = PINGROUP(120, _, _, _, _, _, _, _, _, _, _),
  1042. [121] = PINGROUP(121, pcie2_clkreq_n, _, _, _, _, _, _, _, _, _),
  1043. [122] = PINGROUP(122, emac1_mcg, _, _, _, _, _, _, _, _, _),
  1044. [123] = PINGROUP(123, emac0_ptp, emac0_ptp, emac0_ptp, emac0_ptp, _, _, _, _, _, _),
  1045. [124] = PINGROUP(124, pcie1_clkreq_n, qup_se8, _, _, _, _, _, _, _, _),
  1046. [125] = PINGROUP(125, qup_se8, _, _, _, _, _, _, _, _, _),
  1047. [126] = PINGROUP(126, audio_ref_clk, _, _, _, _, _, _, _, _, _),
  1048. [127] = PINGROUP(127, emac_pps_in, _, _, _, _, _, _, _, _, _),
  1049. [128] = PINGROUP(128, _, _, _, _, _, _, _, _, _, _),
  1050. [129] = PINGROUP(129, sdc2_tb_trig, _, _, _, _, _, _, _, _, _),
  1051. [130] = PINGROUP(130, sdc1_tb, _, _, _, _, _, _, _, _, _),
  1052. [131] = PINGROUP(131, _, _, _, _, _, _, _, _, _, _),
  1053. [132] = PINGROUP(132, _, _, _, _, _, _, _, _, _, _),
  1054. [133] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x19a000, 16, 0),
  1055. [134] = SDC_QDSD_PINGROUP(sdc1_clk, 0x19a000, 14, 6),
  1056. [135] = SDC_QDSD_PINGROUP(sdc1_cmd, 0x19a000, 11, 3),
  1057. [136] = SDC_QDSD_PINGROUP(sdc1_data, 0x19a000, 9, 0),
  1058. [137] = SDC_QDSD_PINGROUP(sdc2_clk, 0x19b000, 14, 6),
  1059. [138] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x19b000, 11, 3),
  1060. [139] = SDC_QDSD_PINGROUP(sdc2_data, 0x19b000, 9, 0),
  1061. };
  1062. static const struct msm_gpio_wakeirq_map sdx75_pdc_map[] = {
  1063. { 1, 57 }, { 2, 91 }, {5, 52 }, { 6, 109 }, { 9, 129 }, { 11, 62 },
  1064. { 13, 84 }, { 15, 87 }, { 17, 88 }, { 18, 89 }, { 19, 90 }, { 20, 92 },
  1065. { 21, 93 }, { 22, 94 }, { 23, 95 }, { 25, 96 }, { 27, 97 }, { 35, 58 },
  1066. { 36, 53 }, { 38, 98 }, { 39, 99 }, { 40, 100 }, { 41, 101 }, { 42, 54 },
  1067. { 43, 56 }, { 44, 71 }, { 46, 60 }, { 47, 61 }, { 49, 47 }, { 50, 126 },
  1068. { 51, 55 }, { 52, 102 }, { 53, 141 }, { 54, 104 }, { 55, 105 }, { 56, 106 },
  1069. { 57, 107 }, { 59, 108 }, { 60, 110 }, { 62, 111 }, { 63, 112 }, { 64, 113 },
  1070. { 65, 114 }, { 67, 115 }, { 68, 116 }, { 69, 117 }, { 70, 118 }, { 71, 119 },
  1071. { 72, 120 }, { 75, 121 }, { 76, 122 }, { 78, 123 }, { 79, 124 }, { 80, 125 },
  1072. { 81, 50 }, { 85, 127 }, { 87, 128 }, { 91, 130 }, { 92, 131 }, { 93, 132 },
  1073. { 94, 133 }, { 95, 134 }, { 97, 135 }, { 98, 136 }, { 101, 64 }, { 103, 51 },
  1074. { 105, 65 }, { 106, 66 }, { 107, 67 }, { 108, 68 }, { 109, 69 }, { 111, 70 },
  1075. { 113, 59 }, { 115, 72 }, { 116, 73 }, { 117, 74 }, { 118, 75 }, { 119, 76 },
  1076. { 120, 77 }, { 121, 78 }, { 123, 79 }, { 124, 80 }, { 125, 63 }, { 127, 81 },
  1077. { 128, 82 }, { 129, 83 }, { 130, 85 }, { 132, 86 },
  1078. };
  1079. static const struct msm_pinctrl_soc_data sdx75_pinctrl = {
  1080. .pins = sdx75_pins,
  1081. .npins = ARRAY_SIZE(sdx75_pins),
  1082. .functions = sdx75_functions,
  1083. .nfunctions = ARRAY_SIZE(sdx75_functions),
  1084. .groups = sdx75_groups,
  1085. .ngroups = ARRAY_SIZE(sdx75_groups),
  1086. .ngpios = 133,
  1087. .wakeirq_map = sdx75_pdc_map,
  1088. .nwakeirq_map = ARRAY_SIZE(sdx75_pdc_map),
  1089. };
  1090. static const struct of_device_id sdx75_pinctrl_of_match[] = {
  1091. { .compatible = "qcom,sdx75-tlmm", .data = &sdx75_pinctrl },
  1092. { }
  1093. };
  1094. MODULE_DEVICE_TABLE(of, sdx75_pinctrl_of_match);
  1095. static int sdx75_pinctrl_probe(struct platform_device *pdev)
  1096. {
  1097. const struct msm_pinctrl_soc_data *pinctrl_data;
  1098. pinctrl_data = of_device_get_match_data(&pdev->dev);
  1099. if (!pinctrl_data)
  1100. return -EINVAL;
  1101. return msm_pinctrl_probe(pdev, pinctrl_data);
  1102. }
  1103. static struct platform_driver sdx75_pinctrl_driver = {
  1104. .driver = {
  1105. .name = "sdx75-tlmm",
  1106. .of_match_table = sdx75_pinctrl_of_match,
  1107. },
  1108. .probe = sdx75_pinctrl_probe,
  1109. .remove_new = msm_pinctrl_remove,
  1110. };
  1111. static int __init sdx75_pinctrl_init(void)
  1112. {
  1113. return platform_driver_register(&sdx75_pinctrl_driver);
  1114. }
  1115. arch_initcall(sdx75_pinctrl_init);
  1116. static void __exit sdx75_pinctrl_exit(void)
  1117. {
  1118. platform_driver_unregister(&sdx75_pinctrl_driver);
  1119. }
  1120. module_exit(sdx75_pinctrl_exit);
  1121. MODULE_DESCRIPTION("QTI sdx75 pinctrl driver");
  1122. MODULE_LICENSE("GPL");