pinctrl-sm7150.c 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * Copyright (c) 2018, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2023, Danila Tikhonov <danila@jiaxyga.com>
  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. static const char * const sm7150_tiles[] = {
  12. "north",
  13. "south",
  14. "west",
  15. };
  16. enum {
  17. NORTH,
  18. SOUTH,
  19. WEST
  20. };
  21. #define REG_SIZE 0x1000
  22. #define PINGROUP(id, _tile, f1, f2, f3, f4, f5, f6, f7, f8, f9) \
  23. { \
  24. .grp = PINCTRL_PINGROUP("gpio" #id, \
  25. gpio##id##_pins, \
  26. ARRAY_SIZE(gpio##id##_pins)), \
  27. .funcs = (int[]){ \
  28. msm_mux_gpio, /* gpio mode */ \
  29. msm_mux_##f1, \
  30. msm_mux_##f2, \
  31. msm_mux_##f3, \
  32. msm_mux_##f4, \
  33. msm_mux_##f5, \
  34. msm_mux_##f6, \
  35. msm_mux_##f7, \
  36. msm_mux_##f8, \
  37. msm_mux_##f9 \
  38. }, \
  39. .nfuncs = 10, \
  40. .ctl_reg = REG_SIZE * id, \
  41. .io_reg = 0x4 + REG_SIZE * id, \
  42. .intr_cfg_reg = 0x8 + REG_SIZE * id, \
  43. .intr_status_reg = 0xc + REG_SIZE * id, \
  44. .intr_target_reg = 0x8 + REG_SIZE * id, \
  45. .tile = _tile, \
  46. .mux_bit = 2, \
  47. .pull_bit = 0, \
  48. .drv_bit = 6, \
  49. .oe_bit = 9, \
  50. .in_bit = 0, \
  51. .out_bit = 1, \
  52. .intr_enable_bit = 0, \
  53. .intr_status_bit = 0, \
  54. .intr_target_bit = 5, \
  55. .intr_target_kpss_val = 3, \
  56. .intr_raw_status_bit = 4, \
  57. .intr_polarity_bit = 1, \
  58. .intr_detection_bit = 2, \
  59. .intr_detection_width = 2, \
  60. }
  61. #define SDC_QDSD_PINGROUP(pg_name, _tile, ctl, pull, drv) \
  62. { \
  63. .grp = PINCTRL_PINGROUP(#pg_name, \
  64. pg_name##_pins, \
  65. ARRAY_SIZE(pg_name##_pins)), \
  66. .ctl_reg = ctl, \
  67. .io_reg = 0, \
  68. .intr_cfg_reg = 0, \
  69. .intr_status_reg = 0, \
  70. .intr_target_reg = 0, \
  71. .tile = _tile, \
  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. .grp = PINCTRL_PINGROUP(#pg_name, \
  89. pg_name##_pins, \
  90. 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. .tile = WEST, \
  97. .mux_bit = -1, \
  98. .pull_bit = 3, \
  99. .drv_bit = 0, \
  100. .oe_bit = -1, \
  101. .in_bit = -1, \
  102. .out_bit = 0, \
  103. .intr_enable_bit = -1, \
  104. .intr_status_bit = -1, \
  105. .intr_target_bit = -1, \
  106. .intr_raw_status_bit = -1, \
  107. .intr_polarity_bit = -1, \
  108. .intr_detection_bit = -1, \
  109. .intr_detection_width = -1, \
  110. }
  111. static const struct pinctrl_pin_desc sm7150_pins[] = {
  112. PINCTRL_PIN(0, "GPIO_0"),
  113. PINCTRL_PIN(1, "GPIO_1"),
  114. PINCTRL_PIN(2, "GPIO_2"),
  115. PINCTRL_PIN(3, "GPIO_3"),
  116. PINCTRL_PIN(4, "GPIO_4"),
  117. PINCTRL_PIN(5, "GPIO_5"),
  118. PINCTRL_PIN(6, "GPIO_6"),
  119. PINCTRL_PIN(7, "GPIO_7"),
  120. PINCTRL_PIN(8, "GPIO_8"),
  121. PINCTRL_PIN(9, "GPIO_9"),
  122. PINCTRL_PIN(10, "GPIO_10"),
  123. PINCTRL_PIN(11, "GPIO_11"),
  124. PINCTRL_PIN(12, "GPIO_12"),
  125. PINCTRL_PIN(13, "GPIO_13"),
  126. PINCTRL_PIN(14, "GPIO_14"),
  127. PINCTRL_PIN(15, "GPIO_15"),
  128. PINCTRL_PIN(16, "GPIO_16"),
  129. PINCTRL_PIN(17, "GPIO_17"),
  130. PINCTRL_PIN(18, "GPIO_18"),
  131. PINCTRL_PIN(19, "GPIO_19"),
  132. PINCTRL_PIN(20, "GPIO_20"),
  133. PINCTRL_PIN(21, "GPIO_21"),
  134. PINCTRL_PIN(22, "GPIO_22"),
  135. PINCTRL_PIN(23, "GPIO_23"),
  136. PINCTRL_PIN(24, "GPIO_24"),
  137. PINCTRL_PIN(25, "GPIO_25"),
  138. PINCTRL_PIN(26, "GPIO_26"),
  139. PINCTRL_PIN(27, "GPIO_27"),
  140. PINCTRL_PIN(28, "GPIO_28"),
  141. PINCTRL_PIN(29, "GPIO_29"),
  142. PINCTRL_PIN(30, "GPIO_30"),
  143. PINCTRL_PIN(31, "GPIO_31"),
  144. PINCTRL_PIN(32, "GPIO_32"),
  145. PINCTRL_PIN(33, "GPIO_33"),
  146. PINCTRL_PIN(34, "GPIO_34"),
  147. PINCTRL_PIN(35, "GPIO_35"),
  148. PINCTRL_PIN(36, "GPIO_36"),
  149. PINCTRL_PIN(37, "GPIO_37"),
  150. PINCTRL_PIN(38, "GPIO_38"),
  151. PINCTRL_PIN(39, "GPIO_39"),
  152. PINCTRL_PIN(40, "GPIO_40"),
  153. PINCTRL_PIN(41, "GPIO_41"),
  154. PINCTRL_PIN(42, "GPIO_42"),
  155. PINCTRL_PIN(43, "GPIO_43"),
  156. PINCTRL_PIN(44, "GPIO_44"),
  157. PINCTRL_PIN(45, "GPIO_45"),
  158. PINCTRL_PIN(46, "GPIO_46"),
  159. PINCTRL_PIN(47, "GPIO_47"),
  160. PINCTRL_PIN(48, "GPIO_48"),
  161. PINCTRL_PIN(49, "GPIO_49"),
  162. PINCTRL_PIN(50, "GPIO_50"),
  163. PINCTRL_PIN(51, "GPIO_51"),
  164. PINCTRL_PIN(52, "GPIO_52"),
  165. PINCTRL_PIN(53, "GPIO_53"),
  166. PINCTRL_PIN(54, "GPIO_54"),
  167. PINCTRL_PIN(55, "GPIO_55"),
  168. PINCTRL_PIN(56, "GPIO_56"),
  169. PINCTRL_PIN(57, "GPIO_57"),
  170. PINCTRL_PIN(58, "GPIO_58"),
  171. PINCTRL_PIN(59, "GPIO_59"),
  172. PINCTRL_PIN(60, "GPIO_60"),
  173. PINCTRL_PIN(61, "GPIO_61"),
  174. PINCTRL_PIN(62, "GPIO_62"),
  175. PINCTRL_PIN(63, "GPIO_63"),
  176. PINCTRL_PIN(64, "GPIO_64"),
  177. PINCTRL_PIN(65, "GPIO_65"),
  178. PINCTRL_PIN(66, "GPIO_66"),
  179. PINCTRL_PIN(67, "GPIO_67"),
  180. PINCTRL_PIN(68, "GPIO_68"),
  181. PINCTRL_PIN(69, "GPIO_69"),
  182. PINCTRL_PIN(70, "GPIO_70"),
  183. PINCTRL_PIN(71, "GPIO_71"),
  184. PINCTRL_PIN(72, "GPIO_72"),
  185. PINCTRL_PIN(73, "GPIO_73"),
  186. PINCTRL_PIN(74, "GPIO_74"),
  187. PINCTRL_PIN(75, "GPIO_75"),
  188. PINCTRL_PIN(76, "GPIO_76"),
  189. PINCTRL_PIN(77, "GPIO_77"),
  190. PINCTRL_PIN(78, "GPIO_78"),
  191. PINCTRL_PIN(79, "GPIO_79"),
  192. PINCTRL_PIN(80, "GPIO_80"),
  193. PINCTRL_PIN(81, "GPIO_81"),
  194. PINCTRL_PIN(82, "GPIO_82"),
  195. PINCTRL_PIN(83, "GPIO_83"),
  196. PINCTRL_PIN(84, "GPIO_84"),
  197. PINCTRL_PIN(85, "GPIO_85"),
  198. PINCTRL_PIN(86, "GPIO_86"),
  199. PINCTRL_PIN(87, "GPIO_87"),
  200. PINCTRL_PIN(88, "GPIO_88"),
  201. PINCTRL_PIN(89, "GPIO_89"),
  202. PINCTRL_PIN(90, "GPIO_90"),
  203. PINCTRL_PIN(91, "GPIO_91"),
  204. PINCTRL_PIN(92, "GPIO_92"),
  205. PINCTRL_PIN(93, "GPIO_93"),
  206. PINCTRL_PIN(94, "GPIO_94"),
  207. PINCTRL_PIN(95, "GPIO_95"),
  208. PINCTRL_PIN(96, "GPIO_96"),
  209. PINCTRL_PIN(97, "GPIO_97"),
  210. PINCTRL_PIN(98, "GPIO_98"),
  211. PINCTRL_PIN(99, "GPIO_99"),
  212. PINCTRL_PIN(100, "GPIO_100"),
  213. PINCTRL_PIN(101, "GPIO_101"),
  214. PINCTRL_PIN(102, "GPIO_102"),
  215. PINCTRL_PIN(103, "GPIO_103"),
  216. PINCTRL_PIN(104, "GPIO_104"),
  217. PINCTRL_PIN(105, "GPIO_105"),
  218. PINCTRL_PIN(106, "GPIO_106"),
  219. PINCTRL_PIN(107, "GPIO_107"),
  220. PINCTRL_PIN(108, "GPIO_108"),
  221. PINCTRL_PIN(109, "GPIO_109"),
  222. PINCTRL_PIN(110, "GPIO_110"),
  223. PINCTRL_PIN(111, "GPIO_111"),
  224. PINCTRL_PIN(112, "GPIO_112"),
  225. PINCTRL_PIN(113, "GPIO_113"),
  226. PINCTRL_PIN(114, "GPIO_114"),
  227. PINCTRL_PIN(115, "GPIO_115"),
  228. PINCTRL_PIN(116, "GPIO_116"),
  229. PINCTRL_PIN(117, "GPIO_117"),
  230. PINCTRL_PIN(118, "GPIO_118"),
  231. PINCTRL_PIN(119, "UFS_RESET"),
  232. PINCTRL_PIN(120, "SDC1_RCLK"),
  233. PINCTRL_PIN(121, "SDC1_CLK"),
  234. PINCTRL_PIN(122, "SDC1_CMD"),
  235. PINCTRL_PIN(123, "SDC1_DATA"),
  236. PINCTRL_PIN(124, "SDC2_CLK"),
  237. PINCTRL_PIN(125, "SDC2_CMD"),
  238. PINCTRL_PIN(126, "SDC2_DATA"),
  239. };
  240. #define DECLARE_MSM_GPIO_PINS(pin) \
  241. static const unsigned int gpio##pin##_pins[] = { pin }
  242. DECLARE_MSM_GPIO_PINS(0);
  243. DECLARE_MSM_GPIO_PINS(1);
  244. DECLARE_MSM_GPIO_PINS(2);
  245. DECLARE_MSM_GPIO_PINS(3);
  246. DECLARE_MSM_GPIO_PINS(4);
  247. DECLARE_MSM_GPIO_PINS(5);
  248. DECLARE_MSM_GPIO_PINS(6);
  249. DECLARE_MSM_GPIO_PINS(7);
  250. DECLARE_MSM_GPIO_PINS(8);
  251. DECLARE_MSM_GPIO_PINS(9);
  252. DECLARE_MSM_GPIO_PINS(10);
  253. DECLARE_MSM_GPIO_PINS(11);
  254. DECLARE_MSM_GPIO_PINS(12);
  255. DECLARE_MSM_GPIO_PINS(13);
  256. DECLARE_MSM_GPIO_PINS(14);
  257. DECLARE_MSM_GPIO_PINS(15);
  258. DECLARE_MSM_GPIO_PINS(16);
  259. DECLARE_MSM_GPIO_PINS(17);
  260. DECLARE_MSM_GPIO_PINS(18);
  261. DECLARE_MSM_GPIO_PINS(19);
  262. DECLARE_MSM_GPIO_PINS(20);
  263. DECLARE_MSM_GPIO_PINS(21);
  264. DECLARE_MSM_GPIO_PINS(22);
  265. DECLARE_MSM_GPIO_PINS(23);
  266. DECLARE_MSM_GPIO_PINS(24);
  267. DECLARE_MSM_GPIO_PINS(25);
  268. DECLARE_MSM_GPIO_PINS(26);
  269. DECLARE_MSM_GPIO_PINS(27);
  270. DECLARE_MSM_GPIO_PINS(28);
  271. DECLARE_MSM_GPIO_PINS(29);
  272. DECLARE_MSM_GPIO_PINS(30);
  273. DECLARE_MSM_GPIO_PINS(31);
  274. DECLARE_MSM_GPIO_PINS(32);
  275. DECLARE_MSM_GPIO_PINS(33);
  276. DECLARE_MSM_GPIO_PINS(34);
  277. DECLARE_MSM_GPIO_PINS(35);
  278. DECLARE_MSM_GPIO_PINS(36);
  279. DECLARE_MSM_GPIO_PINS(37);
  280. DECLARE_MSM_GPIO_PINS(38);
  281. DECLARE_MSM_GPIO_PINS(39);
  282. DECLARE_MSM_GPIO_PINS(40);
  283. DECLARE_MSM_GPIO_PINS(41);
  284. DECLARE_MSM_GPIO_PINS(42);
  285. DECLARE_MSM_GPIO_PINS(43);
  286. DECLARE_MSM_GPIO_PINS(44);
  287. DECLARE_MSM_GPIO_PINS(45);
  288. DECLARE_MSM_GPIO_PINS(46);
  289. DECLARE_MSM_GPIO_PINS(47);
  290. DECLARE_MSM_GPIO_PINS(48);
  291. DECLARE_MSM_GPIO_PINS(49);
  292. DECLARE_MSM_GPIO_PINS(50);
  293. DECLARE_MSM_GPIO_PINS(51);
  294. DECLARE_MSM_GPIO_PINS(52);
  295. DECLARE_MSM_GPIO_PINS(53);
  296. DECLARE_MSM_GPIO_PINS(54);
  297. DECLARE_MSM_GPIO_PINS(55);
  298. DECLARE_MSM_GPIO_PINS(56);
  299. DECLARE_MSM_GPIO_PINS(57);
  300. DECLARE_MSM_GPIO_PINS(58);
  301. DECLARE_MSM_GPIO_PINS(59);
  302. DECLARE_MSM_GPIO_PINS(60);
  303. DECLARE_MSM_GPIO_PINS(61);
  304. DECLARE_MSM_GPIO_PINS(62);
  305. DECLARE_MSM_GPIO_PINS(63);
  306. DECLARE_MSM_GPIO_PINS(64);
  307. DECLARE_MSM_GPIO_PINS(65);
  308. DECLARE_MSM_GPIO_PINS(66);
  309. DECLARE_MSM_GPIO_PINS(67);
  310. DECLARE_MSM_GPIO_PINS(68);
  311. DECLARE_MSM_GPIO_PINS(69);
  312. DECLARE_MSM_GPIO_PINS(70);
  313. DECLARE_MSM_GPIO_PINS(71);
  314. DECLARE_MSM_GPIO_PINS(72);
  315. DECLARE_MSM_GPIO_PINS(73);
  316. DECLARE_MSM_GPIO_PINS(74);
  317. DECLARE_MSM_GPIO_PINS(75);
  318. DECLARE_MSM_GPIO_PINS(76);
  319. DECLARE_MSM_GPIO_PINS(77);
  320. DECLARE_MSM_GPIO_PINS(78);
  321. DECLARE_MSM_GPIO_PINS(79);
  322. DECLARE_MSM_GPIO_PINS(80);
  323. DECLARE_MSM_GPIO_PINS(81);
  324. DECLARE_MSM_GPIO_PINS(82);
  325. DECLARE_MSM_GPIO_PINS(83);
  326. DECLARE_MSM_GPIO_PINS(84);
  327. DECLARE_MSM_GPIO_PINS(85);
  328. DECLARE_MSM_GPIO_PINS(86);
  329. DECLARE_MSM_GPIO_PINS(87);
  330. DECLARE_MSM_GPIO_PINS(88);
  331. DECLARE_MSM_GPIO_PINS(89);
  332. DECLARE_MSM_GPIO_PINS(90);
  333. DECLARE_MSM_GPIO_PINS(91);
  334. DECLARE_MSM_GPIO_PINS(92);
  335. DECLARE_MSM_GPIO_PINS(93);
  336. DECLARE_MSM_GPIO_PINS(94);
  337. DECLARE_MSM_GPIO_PINS(95);
  338. DECLARE_MSM_GPIO_PINS(96);
  339. DECLARE_MSM_GPIO_PINS(97);
  340. DECLARE_MSM_GPIO_PINS(98);
  341. DECLARE_MSM_GPIO_PINS(99);
  342. DECLARE_MSM_GPIO_PINS(100);
  343. DECLARE_MSM_GPIO_PINS(101);
  344. DECLARE_MSM_GPIO_PINS(102);
  345. DECLARE_MSM_GPIO_PINS(103);
  346. DECLARE_MSM_GPIO_PINS(104);
  347. DECLARE_MSM_GPIO_PINS(105);
  348. DECLARE_MSM_GPIO_PINS(106);
  349. DECLARE_MSM_GPIO_PINS(107);
  350. DECLARE_MSM_GPIO_PINS(108);
  351. DECLARE_MSM_GPIO_PINS(109);
  352. DECLARE_MSM_GPIO_PINS(110);
  353. DECLARE_MSM_GPIO_PINS(111);
  354. DECLARE_MSM_GPIO_PINS(112);
  355. DECLARE_MSM_GPIO_PINS(113);
  356. DECLARE_MSM_GPIO_PINS(114);
  357. DECLARE_MSM_GPIO_PINS(115);
  358. DECLARE_MSM_GPIO_PINS(116);
  359. DECLARE_MSM_GPIO_PINS(117);
  360. DECLARE_MSM_GPIO_PINS(118);
  361. static const unsigned int ufs_reset_pins[] = { 119 };
  362. static const unsigned int sdc1_rclk_pins[] = { 120 };
  363. static const unsigned int sdc1_clk_pins[] = { 121 };
  364. static const unsigned int sdc1_cmd_pins[] = { 122 };
  365. static const unsigned int sdc1_data_pins[] = { 123 };
  366. static const unsigned int sdc2_clk_pins[] = { 124 };
  367. static const unsigned int sdc2_cmd_pins[] = { 125 };
  368. static const unsigned int sdc2_data_pins[] = { 126 };
  369. enum sm7150_functions {
  370. msm_mux_gpio,
  371. msm_mux_adsp_ext,
  372. msm_mux_agera_pll,
  373. msm_mux_aoss_cti,
  374. msm_mux_atest_char,
  375. msm_mux_atest_tsens,
  376. msm_mux_atest_tsens2,
  377. msm_mux_atest_usb1,
  378. msm_mux_atest_usb2,
  379. msm_mux_cam_mclk,
  380. msm_mux_cci_async,
  381. msm_mux_cci_i2c,
  382. msm_mux_cci_timer0,
  383. msm_mux_cci_timer1,
  384. msm_mux_cci_timer2,
  385. msm_mux_cci_timer3,
  386. msm_mux_cci_timer4,
  387. msm_mux_dbg_out,
  388. msm_mux_ddr_bist,
  389. msm_mux_ddr_pxi0,
  390. msm_mux_ddr_pxi1,
  391. msm_mux_ddr_pxi2,
  392. msm_mux_ddr_pxi3,
  393. msm_mux_edp_hot,
  394. msm_mux_edp_lcd,
  395. msm_mux_gcc_gp1,
  396. msm_mux_gcc_gp2,
  397. msm_mux_gcc_gp3,
  398. msm_mux_gp_pdm0,
  399. msm_mux_gp_pdm1,
  400. msm_mux_gp_pdm2,
  401. msm_mux_gps_tx,
  402. msm_mux_jitter_bist,
  403. msm_mux_ldo_en,
  404. msm_mux_ldo_update,
  405. msm_mux_m_voc,
  406. msm_mux_mdp_vsync,
  407. msm_mux_mdp_vsync0,
  408. msm_mux_mdp_vsync1,
  409. msm_mux_mdp_vsync2,
  410. msm_mux_mdp_vsync3,
  411. msm_mux_mss_lte,
  412. msm_mux_nav_pps_in,
  413. msm_mux_nav_pps_out,
  414. msm_mux_pa_indicator,
  415. msm_mux_pci_e,
  416. msm_mux_phase_flag,
  417. msm_mux_pll_bist,
  418. msm_mux_pll_bypassnl,
  419. msm_mux_pll_reset,
  420. msm_mux_pri_mi2s,
  421. msm_mux_pri_mi2s_ws,
  422. msm_mux_prng_rosc,
  423. msm_mux_qdss,
  424. msm_mux_qdss_cti,
  425. msm_mux_qlink_enable,
  426. msm_mux_qlink_request,
  427. msm_mux_qua_mi2s,
  428. msm_mux_qup00,
  429. msm_mux_qup01,
  430. msm_mux_qup02,
  431. msm_mux_qup03,
  432. msm_mux_qup04,
  433. msm_mux_qup10,
  434. msm_mux_qup11,
  435. msm_mux_qup12,
  436. msm_mux_qup13,
  437. msm_mux_qup14,
  438. msm_mux_qup15,
  439. msm_mux_sd_write,
  440. msm_mux_sdc40,
  441. msm_mux_sdc41,
  442. msm_mux_sdc42,
  443. msm_mux_sdc43,
  444. msm_mux_sdc4_clk,
  445. msm_mux_sdc4_cmd,
  446. msm_mux_sec_mi2s,
  447. msm_mux_ter_mi2s,
  448. msm_mux_tgu_ch0,
  449. msm_mux_tgu_ch1,
  450. msm_mux_tgu_ch2,
  451. msm_mux_tgu_ch3,
  452. msm_mux_tsif1_clk,
  453. msm_mux_tsif1_data,
  454. msm_mux_tsif1_en,
  455. msm_mux_tsif1_error,
  456. msm_mux_tsif1_sync,
  457. msm_mux_tsif2_clk,
  458. msm_mux_tsif2_data,
  459. msm_mux_tsif2_en,
  460. msm_mux_tsif2_error,
  461. msm_mux_tsif2_sync,
  462. msm_mux_uim1_clk,
  463. msm_mux_uim1_data,
  464. msm_mux_uim1_present,
  465. msm_mux_uim1_reset,
  466. msm_mux_uim2_clk,
  467. msm_mux_uim2_data,
  468. msm_mux_uim2_present,
  469. msm_mux_uim2_reset,
  470. msm_mux_uim_batt,
  471. msm_mux_usb_phy,
  472. msm_mux_vfr_1,
  473. msm_mux_vsense_trigger,
  474. msm_mux_wlan1_adc0,
  475. msm_mux_wlan1_adc1,
  476. msm_mux_wlan2_adc0,
  477. msm_mux_wlan2_adc1,
  478. msm_mux_wsa_clk,
  479. msm_mux_wsa_data,
  480. msm_mux__,
  481. };
  482. static const char * const gpio_groups[] = {
  483. "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
  484. "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
  485. "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
  486. "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
  487. "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
  488. "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
  489. "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
  490. "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
  491. "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
  492. "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
  493. "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
  494. "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
  495. "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
  496. "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
  497. "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
  498. "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
  499. "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
  500. "gpio117", "gpio118",
  501. };
  502. static const char * const adsp_ext_groups[] = {
  503. "gpio87",
  504. };
  505. static const char * const agera_pll_groups[] = {
  506. "gpio28",
  507. };
  508. static const char * const aoss_cti_groups[] = {
  509. "gpio85",
  510. };
  511. static const char * const atest_char_groups[] = {
  512. "gpio86", "gpio87", "gpio88", "gpio89", "gpio90",
  513. };
  514. static const char * const atest_tsens_groups[] = {
  515. "gpio29",
  516. };
  517. static const char * const atest_tsens2_groups[] = {
  518. "gpio7",
  519. };
  520. static const char * const atest_usb1_groups[] = {
  521. "gpio7", "gpio10", "gpio11", "gpio39", "gpio44",
  522. };
  523. static const char * const atest_usb2_groups[] = {
  524. "gpio51", "gpio52", "gpio53", "gpio54", "gpio55"
  525. };
  526. static const char * const cam_mclk_groups[] = {
  527. "gpio13", "gpio14", "gpio15", "gpio16",
  528. };
  529. static const char * const cci_async_groups[] = {
  530. "gpio24", "gpio25", "gpio26",
  531. };
  532. static const char * const cci_i2c_groups[] = {
  533. "gpio17", "gpio18", "gpio19", "gpio20", "gpio27", "gpio28",
  534. };
  535. static const char * const cci_timer0_groups[] = {
  536. "gpio21",
  537. };
  538. static const char * const cci_timer1_groups[] = {
  539. "gpio22",
  540. };
  541. static const char * const cci_timer2_groups[] = {
  542. "gpio23",
  543. };
  544. static const char * const cci_timer3_groups[] = {
  545. "gpio24",
  546. };
  547. static const char * const cci_timer4_groups[] = {
  548. "gpio25",
  549. };
  550. static const char * const dbg_out_groups[] = {
  551. "gpio3",
  552. };
  553. static const char * const ddr_bist_groups[] = {
  554. "gpio7", "gpio8", "gpio9", "gpio10",
  555. };
  556. static const char * const ddr_pxi0_groups[] = {
  557. "gpio6", "gpio7",
  558. };
  559. static const char * const ddr_pxi1_groups[] = {
  560. "gpio39", "gpio44",
  561. };
  562. static const char * const ddr_pxi2_groups[] = {
  563. "gpio10", "gpio11",
  564. };
  565. static const char * const ddr_pxi3_groups[] = {
  566. "gpio12", "gpio13",
  567. };
  568. static const char * const edp_hot_groups[] = {
  569. "gpio85",
  570. };
  571. static const char * const edp_lcd_groups[] = {
  572. "gpio11",
  573. };
  574. static const char * const gcc_gp1_groups[] = {
  575. "gpio48", "gpio56",
  576. };
  577. static const char * const gcc_gp2_groups[] = {
  578. "gpio21",
  579. };
  580. static const char * const gcc_gp3_groups[] = {
  581. "gpio22",
  582. };
  583. static const char * const gp_pdm0_groups[] = {
  584. "gpio37", "gpio68",
  585. };
  586. static const char * const gp_pdm1_groups[] = {
  587. "gpio8", "gpio50",
  588. };
  589. static const char * const gp_pdm2_groups[] = {
  590. "gpio57",
  591. };
  592. static const char * const gps_tx_groups[] = {
  593. "gpio83", "gpio84", "gpio107", "gpio109",
  594. };
  595. static const char * const jitter_bist_groups[] = {
  596. "gpio26",
  597. };
  598. static const char * const ldo_en_groups[] = {
  599. "gpio70",
  600. };
  601. static const char * const ldo_update_groups[] = {
  602. "gpio71",
  603. };
  604. static const char * const m_voc_groups[] = {
  605. "gpio12",
  606. };
  607. static const char * const mdp_vsync_groups[] = {
  608. "gpio10", "gpio11", "gpio12", "gpio70", "gpio71",
  609. };
  610. static const char * const mdp_vsync0_groups[] = {
  611. "gpio63",
  612. };
  613. static const char * const mdp_vsync1_groups[] = {
  614. "gpio63",
  615. };
  616. static const char * const mdp_vsync2_groups[] = {
  617. "gpio63",
  618. };
  619. static const char * const mdp_vsync3_groups[] = {
  620. "gpio63",
  621. };
  622. static const char * const mss_lte_groups[] = {
  623. "gpio108", "gpio109",
  624. };
  625. static const char * const nav_pps_in_groups[] = {
  626. "gpio83", "gpio84", "gpio107",
  627. };
  628. static const char * const nav_pps_out_groups[] = {
  629. "gpio83", "gpio84", "gpio107",
  630. };
  631. static const char * const pa_indicator_groups[] = {
  632. "gpio99",
  633. };
  634. static const char * const pci_e_groups[] = {
  635. "gpio66", "gpio67", "gpio68",
  636. };
  637. static const char * const phase_flag_groups[] = {
  638. "gpio0", "gpio1", "gpio2", "gpio6", "gpio7", "gpio10", "gpio11",
  639. "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio24",
  640. "gpio25", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio35",
  641. "gpio36", "gpio37", "gpio38", "gpio39", "gpio43", "gpio44", "gpio56",
  642. "gpio57", "gpio60", "gpio61", "gpio62",
  643. };
  644. static const char * const pll_bist_groups[] = {
  645. "gpio27",
  646. };
  647. static const char * const pll_bypassnl_groups[] = {
  648. "gpio13",
  649. };
  650. static const char * const pll_reset_groups[] = {
  651. "gpio14",
  652. };
  653. static const char * const pri_mi2s_groups[] = {
  654. "gpio49", "gpio51", "gpio52",
  655. };
  656. static const char * const pri_mi2s_ws_groups[] = {
  657. "gpio50",
  658. };
  659. static const char * const prng_rosc_groups[] = {
  660. "gpio72",
  661. };
  662. static const char * const qdss_groups[] = {
  663. "gpio13", "gpio86", "gpio14", "gpio87", "gpio15", "gpio88", "gpio16",
  664. "gpio89", "gpio17", "gpio90", "gpio18", "gpio91", "gpio19", "gpio34",
  665. "gpio20", "gpio35", "gpio21", "gpio53", "gpio22", "gpio30", "gpio23",
  666. "gpio54", "gpio24", "gpio55", "gpio25", "gpio57", "gpio26", "gpio31",
  667. "gpio27", "gpio56", "gpio28", "gpio36", "gpio29", "gpio37", "gpio93",
  668. "gpio104",
  669. };
  670. static const char * const qdss_cti_groups[] = {
  671. "gpio4", "gpio5", "gpio32", "gpio44", "gpio45", "gpio63",
  672. };
  673. static const char * const qlink_enable_groups[] = {
  674. "gpio97",
  675. };
  676. static const char * const qlink_request_groups[] = {
  677. "gpio96",
  678. };
  679. static const char * const qua_mi2s_groups[] = {
  680. "gpio58",
  681. };
  682. static const char * const qup00_groups[] = {
  683. "gpio49", "gpio50", "gpio51", "gpio52", "gpio57", "gpio58",
  684. };
  685. static const char * const qup01_groups[] = {
  686. "gpio0", "gpio1", "gpio2", "gpio3", "gpio12", "gpio37",
  687. };
  688. static const char * const qup02_groups[] = {
  689. "gpio34", "gpio35",
  690. };
  691. static const char * const qup03_groups[] = {
  692. "gpio38", "gpio39", "gpio40", "gpio41",
  693. };
  694. static const char * const qup04_groups[] = {
  695. "gpio53", "gpio54", "gpio55", "gpio56",
  696. };
  697. static const char * const qup10_groups[] = {
  698. "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65",
  699. };
  700. static const char * const qup11_groups[] = {
  701. "gpio6", "gpio7", "gpio8", "gpio9",
  702. };
  703. static const char * const qup12_groups[] = {
  704. "gpio42", "gpio43", "gpio44", "gpio45",
  705. };
  706. static const char * const qup13_groups[] = {
  707. "gpio46", "gpio47",
  708. };
  709. static const char * const qup14_groups[] = {
  710. "gpio110", "gpio111", "gpio112", "gpio113",
  711. };
  712. static const char * const qup15_groups[] = {
  713. "gpio92", "gpio101", "gpio102", "gpio103",
  714. };
  715. static const char * const sd_write_groups[] = {
  716. "gpio33",
  717. };
  718. static const char * const sdc40_groups[] = {
  719. "gpio69",
  720. };
  721. static const char * const sdc41_groups[] = {
  722. "gpio68",
  723. };
  724. static const char * const sdc42_groups[] = {
  725. "gpio67",
  726. };
  727. static const char * const sdc43_groups[] = {
  728. "gpio65",
  729. };
  730. static const char * const sdc4_clk_groups[] = {
  731. "gpio66",
  732. };
  733. static const char * const sdc4_cmd_groups[] = {
  734. "gpio64",
  735. };
  736. static const char * const sec_mi2s_groups[] = {
  737. "gpio57",
  738. };
  739. static const char * const ter_mi2s_groups[] = {
  740. "gpio53", "gpio54", "gpio55", "gpio56",
  741. };
  742. static const char * const tgu_ch0_groups[] = {
  743. "gpio63",
  744. };
  745. static const char * const tgu_ch1_groups[] = {
  746. "gpio64",
  747. };
  748. static const char * const tgu_ch2_groups[] = {
  749. "gpio65",
  750. };
  751. static const char * const tgu_ch3_groups[] = {
  752. "gpio62",
  753. };
  754. static const char * const tsif1_clk_groups[] = {
  755. "gpio62",
  756. };
  757. static const char * const tsif1_data_groups[] = {
  758. "gpio64",
  759. };
  760. static const char * const tsif1_en_groups[] = {
  761. "gpio63",
  762. };
  763. static const char * const tsif1_error_groups[] = {
  764. "gpio60",
  765. };
  766. static const char * const tsif1_sync_groups[] = {
  767. "gpio61",
  768. };
  769. static const char * const tsif2_clk_groups[] = {
  770. "gpio66",
  771. };
  772. static const char * const tsif2_data_groups[] = {
  773. "gpio68",
  774. };
  775. static const char * const tsif2_en_groups[] = {
  776. "gpio67",
  777. };
  778. static const char * const tsif2_error_groups[] = {
  779. "gpio65",
  780. };
  781. static const char * const tsif2_sync_groups[] = {
  782. "gpio69",
  783. };
  784. static const char * const uim1_clk_groups[] = {
  785. "gpio80",
  786. };
  787. static const char * const uim1_data_groups[] = {
  788. "gpio79",
  789. };
  790. static const char * const uim1_present_groups[] = {
  791. "gpio82",
  792. };
  793. static const char * const uim1_reset_groups[] = {
  794. "gpio81",
  795. };
  796. static const char * const uim2_clk_groups[] = {
  797. "gpio76",
  798. };
  799. static const char * const uim2_data_groups[] = {
  800. "gpio75",
  801. };
  802. static const char * const uim2_present_groups[] = {
  803. "gpio78",
  804. };
  805. static const char * const uim2_reset_groups[] = {
  806. "gpio77",
  807. };
  808. static const char * const uim_batt_groups[] = {
  809. "gpio85",
  810. };
  811. static const char * const usb_phy_groups[] = {
  812. "gpio104",
  813. };
  814. static const char * const vfr_1_groups[] = {
  815. "gpio65",
  816. };
  817. static const char * const vsense_trigger_groups[] = {
  818. "gpio7",
  819. };
  820. static const char * const wlan1_adc0_groups[] = {
  821. "gpio39",
  822. };
  823. static const char * const wlan1_adc1_groups[] = {
  824. "gpio44",
  825. };
  826. static const char * const wlan2_adc0_groups[] = {
  827. "gpio11",
  828. };
  829. static const char * const wlan2_adc1_groups[] = {
  830. "gpio10",
  831. };
  832. static const char * const wsa_clk_groups[] = {
  833. "gpio49",
  834. };
  835. static const char * const wsa_data_groups[] = {
  836. "gpio50",
  837. };
  838. static const struct pinfunction sm7150_functions[] = {
  839. MSM_PIN_FUNCTION(gpio),
  840. MSM_PIN_FUNCTION(adsp_ext),
  841. MSM_PIN_FUNCTION(agera_pll),
  842. MSM_PIN_FUNCTION(aoss_cti),
  843. MSM_PIN_FUNCTION(atest_char),
  844. MSM_PIN_FUNCTION(atest_tsens),
  845. MSM_PIN_FUNCTION(atest_tsens2),
  846. MSM_PIN_FUNCTION(atest_usb1),
  847. MSM_PIN_FUNCTION(atest_usb2),
  848. MSM_PIN_FUNCTION(cam_mclk),
  849. MSM_PIN_FUNCTION(cci_async),
  850. MSM_PIN_FUNCTION(cci_i2c),
  851. MSM_PIN_FUNCTION(cci_timer0),
  852. MSM_PIN_FUNCTION(cci_timer1),
  853. MSM_PIN_FUNCTION(cci_timer2),
  854. MSM_PIN_FUNCTION(cci_timer3),
  855. MSM_PIN_FUNCTION(cci_timer4),
  856. MSM_PIN_FUNCTION(dbg_out),
  857. MSM_PIN_FUNCTION(ddr_bist),
  858. MSM_PIN_FUNCTION(ddr_pxi0),
  859. MSM_PIN_FUNCTION(ddr_pxi1),
  860. MSM_PIN_FUNCTION(ddr_pxi2),
  861. MSM_PIN_FUNCTION(ddr_pxi3),
  862. MSM_PIN_FUNCTION(edp_hot),
  863. MSM_PIN_FUNCTION(edp_lcd),
  864. MSM_PIN_FUNCTION(gcc_gp1),
  865. MSM_PIN_FUNCTION(gcc_gp2),
  866. MSM_PIN_FUNCTION(gcc_gp3),
  867. MSM_PIN_FUNCTION(gp_pdm0),
  868. MSM_PIN_FUNCTION(gp_pdm1),
  869. MSM_PIN_FUNCTION(gp_pdm2),
  870. MSM_PIN_FUNCTION(gps_tx),
  871. MSM_PIN_FUNCTION(jitter_bist),
  872. MSM_PIN_FUNCTION(ldo_en),
  873. MSM_PIN_FUNCTION(ldo_update),
  874. MSM_PIN_FUNCTION(m_voc),
  875. MSM_PIN_FUNCTION(mdp_vsync),
  876. MSM_PIN_FUNCTION(mdp_vsync0),
  877. MSM_PIN_FUNCTION(mdp_vsync1),
  878. MSM_PIN_FUNCTION(mdp_vsync2),
  879. MSM_PIN_FUNCTION(mdp_vsync3),
  880. MSM_PIN_FUNCTION(mss_lte),
  881. MSM_PIN_FUNCTION(nav_pps_in),
  882. MSM_PIN_FUNCTION(nav_pps_out),
  883. MSM_PIN_FUNCTION(pa_indicator),
  884. MSM_PIN_FUNCTION(pci_e),
  885. MSM_PIN_FUNCTION(phase_flag),
  886. MSM_PIN_FUNCTION(pll_bist),
  887. MSM_PIN_FUNCTION(pll_bypassnl),
  888. MSM_PIN_FUNCTION(pll_reset),
  889. MSM_PIN_FUNCTION(pri_mi2s),
  890. MSM_PIN_FUNCTION(pri_mi2s_ws),
  891. MSM_PIN_FUNCTION(prng_rosc),
  892. MSM_PIN_FUNCTION(qdss_cti),
  893. MSM_PIN_FUNCTION(qdss),
  894. MSM_PIN_FUNCTION(qlink_enable),
  895. MSM_PIN_FUNCTION(qlink_request),
  896. MSM_PIN_FUNCTION(qua_mi2s),
  897. MSM_PIN_FUNCTION(qup00),
  898. MSM_PIN_FUNCTION(qup01),
  899. MSM_PIN_FUNCTION(qup02),
  900. MSM_PIN_FUNCTION(qup03),
  901. MSM_PIN_FUNCTION(qup04),
  902. MSM_PIN_FUNCTION(qup10),
  903. MSM_PIN_FUNCTION(qup11),
  904. MSM_PIN_FUNCTION(qup12),
  905. MSM_PIN_FUNCTION(qup13),
  906. MSM_PIN_FUNCTION(qup14),
  907. MSM_PIN_FUNCTION(qup15),
  908. MSM_PIN_FUNCTION(sd_write),
  909. MSM_PIN_FUNCTION(sdc40),
  910. MSM_PIN_FUNCTION(sdc41),
  911. MSM_PIN_FUNCTION(sdc42),
  912. MSM_PIN_FUNCTION(sdc43),
  913. MSM_PIN_FUNCTION(sdc4_clk),
  914. MSM_PIN_FUNCTION(sdc4_cmd),
  915. MSM_PIN_FUNCTION(sec_mi2s),
  916. MSM_PIN_FUNCTION(ter_mi2s),
  917. MSM_PIN_FUNCTION(tgu_ch0),
  918. MSM_PIN_FUNCTION(tgu_ch1),
  919. MSM_PIN_FUNCTION(tgu_ch2),
  920. MSM_PIN_FUNCTION(tgu_ch3),
  921. MSM_PIN_FUNCTION(tsif1_clk),
  922. MSM_PIN_FUNCTION(tsif1_data),
  923. MSM_PIN_FUNCTION(tsif1_en),
  924. MSM_PIN_FUNCTION(tsif1_error),
  925. MSM_PIN_FUNCTION(tsif1_sync),
  926. MSM_PIN_FUNCTION(tsif2_clk),
  927. MSM_PIN_FUNCTION(tsif2_data),
  928. MSM_PIN_FUNCTION(tsif2_en),
  929. MSM_PIN_FUNCTION(tsif2_error),
  930. MSM_PIN_FUNCTION(tsif2_sync),
  931. MSM_PIN_FUNCTION(uim1_clk),
  932. MSM_PIN_FUNCTION(uim1_data),
  933. MSM_PIN_FUNCTION(uim1_present),
  934. MSM_PIN_FUNCTION(uim1_reset),
  935. MSM_PIN_FUNCTION(uim2_clk),
  936. MSM_PIN_FUNCTION(uim2_data),
  937. MSM_PIN_FUNCTION(uim2_present),
  938. MSM_PIN_FUNCTION(uim2_reset),
  939. MSM_PIN_FUNCTION(uim_batt),
  940. MSM_PIN_FUNCTION(usb_phy),
  941. MSM_PIN_FUNCTION(vfr_1),
  942. MSM_PIN_FUNCTION(vsense_trigger),
  943. MSM_PIN_FUNCTION(wlan1_adc0),
  944. MSM_PIN_FUNCTION(wlan1_adc1),
  945. MSM_PIN_FUNCTION(wlan2_adc0),
  946. MSM_PIN_FUNCTION(wlan2_adc1),
  947. MSM_PIN_FUNCTION(wsa_clk),
  948. MSM_PIN_FUNCTION(wsa_data),
  949. };
  950. /*
  951. * Every pin is maintained as a single group, and missing or non-existing pin
  952. * would be maintained as dummy group to synchronize pin group index with
  953. * pin descriptor registered with pinctrl core.
  954. * Clients would not be able to request these dummy pin groups.
  955. */
  956. static const struct msm_pingroup sm7150_groups[] = {
  957. [0] = PINGROUP(0, SOUTH, qup01, _, phase_flag, _, _, _, _, _, _),
  958. [1] = PINGROUP(1, SOUTH, qup01, _, phase_flag, _, _, _, _, _, _),
  959. [2] = PINGROUP(2, SOUTH, qup01, _, phase_flag, _, _, _, _, _, _),
  960. [3] = PINGROUP(3, SOUTH, qup01, dbg_out, _, _, _, _, _, _, _),
  961. [4] = PINGROUP(4, NORTH, _, qdss_cti, _, _, _, _, _, _, _),
  962. [5] = PINGROUP(5, NORTH, _, qdss_cti, _, _, _, _, _, _, _),
  963. [6] = PINGROUP(6, NORTH, qup11, _, phase_flag, ddr_pxi0, _, _, _, _, _),
  964. [7] = PINGROUP(7, NORTH, qup11, ddr_bist, _, phase_flag, atest_tsens2, vsense_trigger, atest_usb1, ddr_pxi0, _),
  965. [8] = PINGROUP(8, NORTH, qup11, gp_pdm1, ddr_bist, _, _, _, _, _, _),
  966. [9] = PINGROUP(9, NORTH, qup11, ddr_bist, _, _, _, _, _, _, _),
  967. [10] = PINGROUP(10, NORTH, mdp_vsync, ddr_bist, _, phase_flag, wlan2_adc1, atest_usb1, ddr_pxi2, _, _),
  968. [11] = PINGROUP(11, NORTH, mdp_vsync, edp_lcd, _, phase_flag, wlan2_adc0, atest_usb1, ddr_pxi2, _, _),
  969. [12] = PINGROUP(12, SOUTH, mdp_vsync, m_voc, qup01, _, phase_flag, ddr_pxi3, _, _, _),
  970. [13] = PINGROUP(13, SOUTH, cam_mclk, pll_bypassnl, _, phase_flag, qdss, ddr_pxi3, _, _, _),
  971. [14] = PINGROUP(14, SOUTH, cam_mclk, pll_reset, _, phase_flag, qdss, _, _, _, _),
  972. [15] = PINGROUP(15, SOUTH, cam_mclk, _, phase_flag, qdss, _, _, _, _, _),
  973. [16] = PINGROUP(16, SOUTH, cam_mclk, _, phase_flag, qdss, _, _, _, _, _),
  974. [17] = PINGROUP(17, SOUTH, cci_i2c, _, phase_flag, qdss, _, _, _, _, _),
  975. [18] = PINGROUP(18, SOUTH, cci_i2c, qdss, _, _, _, _, _, _, _),
  976. [19] = PINGROUP(19, SOUTH, cci_i2c, qdss, _, _, _, _, _, _, _),
  977. [20] = PINGROUP(20, SOUTH, cci_i2c, qdss, _, _, _, _, _, _, _),
  978. [21] = PINGROUP(21, SOUTH, cci_timer0, gcc_gp2, _, qdss, _, _, _, _, _),
  979. [22] = PINGROUP(22, SOUTH, cci_timer1, gcc_gp3, _, qdss, _, _, _, _, _),
  980. [23] = PINGROUP(23, SOUTH, cci_timer2, qdss, _, _, _, _, _, _, _),
  981. [24] = PINGROUP(24, SOUTH, cci_timer3, cci_async, _, phase_flag, qdss, _, _, _, _),
  982. [25] = PINGROUP(25, SOUTH, cci_timer4, cci_async, _, phase_flag, qdss, _, _, _, _),
  983. [26] = PINGROUP(26, SOUTH, cci_async, jitter_bist, _, phase_flag, qdss, _, _, _, _),
  984. [27] = PINGROUP(27, SOUTH, cci_i2c, pll_bist, _, phase_flag, qdss, _, _, _, _),
  985. [28] = PINGROUP(28, SOUTH, cci_i2c, agera_pll, _, phase_flag, qdss, _, _, _, _),
  986. [29] = PINGROUP(29, NORTH, _, _, phase_flag, qdss, atest_tsens, _, _, _, _),
  987. [30] = PINGROUP(30, SOUTH, _, phase_flag, qdss, _, _, _, _, _, _),
  988. [31] = PINGROUP(31, WEST, _, qdss, _, _, _, _, _, _, _),
  989. [32] = PINGROUP(32, NORTH, qdss_cti, _, _, _, _, _, _, _, _),
  990. [33] = PINGROUP(33, NORTH, sd_write, _, _, _, _, _, _, _, _),
  991. [34] = PINGROUP(34, SOUTH, qup02, qdss, _, _, _, _, _, _, _),
  992. [35] = PINGROUP(35, SOUTH, qup02, _, phase_flag, qdss, _, _, _, _, _),
  993. [36] = PINGROUP(36, SOUTH, _, phase_flag, qdss, _, _, _, _, _, _),
  994. [37] = PINGROUP(37, SOUTH, qup01, gp_pdm0, _, phase_flag, qdss, _, _, _, _),
  995. [38] = PINGROUP(38, SOUTH, qup03, _, phase_flag, _, _, _, _, _, _),
  996. [39] = PINGROUP(39, SOUTH, qup03, _, phase_flag, _, wlan1_adc0, atest_usb1, ddr_pxi1, _, _),
  997. [40] = PINGROUP(40, SOUTH, qup03, _, _, _, _, _, _, _, _),
  998. [41] = PINGROUP(41, SOUTH, qup03, _, _, _, _, _, _, _, _),
  999. [42] = PINGROUP(42, NORTH, qup12, _, _, _, _, _, _, _, _),
  1000. [43] = PINGROUP(43, NORTH, qup12, _, phase_flag, _, _, _, _, _, _),
  1001. [44] = PINGROUP(44, NORTH, qup12, _, phase_flag, qdss_cti, _, wlan1_adc1, atest_usb1, ddr_pxi1, _),
  1002. [45] = PINGROUP(45, NORTH, qup12, qdss_cti, _, _, _, _, _, _, _),
  1003. [46] = PINGROUP(46, NORTH, qup13, _, _, _, _, _, _, _, _),
  1004. [47] = PINGROUP(47, NORTH, qup13, _, _, _, _, _, _, _, _),
  1005. [48] = PINGROUP(48, WEST, gcc_gp1, _, _, _, _, _, _, _, _),
  1006. [49] = PINGROUP(49, WEST, pri_mi2s, qup00, wsa_clk, _, _, _, _, _, _),
  1007. [50] = PINGROUP(50, WEST, pri_mi2s_ws, qup00, wsa_data, gp_pdm1, _, _, _, _, _),
  1008. [51] = PINGROUP(51, WEST, pri_mi2s, qup00, atest_usb2, _, _, _, _, _, _),
  1009. [52] = PINGROUP(52, WEST, pri_mi2s, qup00, atest_usb2, _, _, _, _, _, _),
  1010. [53] = PINGROUP(53, WEST, ter_mi2s, qup04, qdss, atest_usb2, _, _, _, _, _),
  1011. [54] = PINGROUP(54, WEST, ter_mi2s, qup04, qdss, atest_usb2, _, _, _, _, _),
  1012. [55] = PINGROUP(55, WEST, ter_mi2s, qup04, qdss, atest_usb2, _, _, _, _, _),
  1013. [56] = PINGROUP(56, WEST, ter_mi2s, qup04, gcc_gp1, _, phase_flag, qdss, _, _, _),
  1014. [57] = PINGROUP(57, WEST, sec_mi2s, qup00, gp_pdm2, _, phase_flag, qdss, _, _, _),
  1015. [58] = PINGROUP(58, WEST, qua_mi2s, qup00, _, _, _, _, _, _, _),
  1016. [59] = PINGROUP(59, NORTH, qup10, _, _, _, _, _, _, _, _),
  1017. [60] = PINGROUP(60, NORTH, qup10, tsif1_error, _, phase_flag, _, _, _, _, _),
  1018. [61] = PINGROUP(61, NORTH, qup10, tsif1_sync, _, phase_flag, _, _, _, _, _),
  1019. [62] = PINGROUP(62, NORTH, qup10, tsif1_clk, tgu_ch3, _, phase_flag, _, _, _, _),
  1020. [63] = PINGROUP(63, NORTH, tsif1_en, mdp_vsync0, qup10, mdp_vsync1, mdp_vsync2, mdp_vsync3, tgu_ch0, qdss_cti, _),
  1021. [64] = PINGROUP(64, NORTH, tsif1_data, sdc4_cmd, qup10, tgu_ch1, _, _, _, _, _),
  1022. [65] = PINGROUP(65, NORTH, tsif2_error, sdc43, qup10, vfr_1, tgu_ch2, _, _, _, _),
  1023. [66] = PINGROUP(66, NORTH, tsif2_clk, sdc4_clk, pci_e, _, _, _, _, _, _),
  1024. [67] = PINGROUP(67, NORTH, tsif2_en, sdc42, pci_e, _, _, _, _, _, _),
  1025. [68] = PINGROUP(68, NORTH, tsif2_data, sdc41, pci_e, gp_pdm0, _, _, _, _, _),
  1026. [69] = PINGROUP(69, NORTH, tsif2_sync, sdc40, _, _, _, _, _, _, _),
  1027. [70] = PINGROUP(70, NORTH, _, _, mdp_vsync, ldo_en, _, _, _, _, _),
  1028. [71] = PINGROUP(71, NORTH, _, mdp_vsync, ldo_update, _, _, _, _, _, _),
  1029. [72] = PINGROUP(72, NORTH, prng_rosc, _, _, _, _, _, _, _, _),
  1030. [73] = PINGROUP(73, NORTH, _, _, _, _, _, _, _, _, _),
  1031. [74] = PINGROUP(74, WEST, _, _, _, _, _, _, _, _, _),
  1032. [75] = PINGROUP(75, WEST, uim2_data, _, _, _, _, _, _, _, _),
  1033. [76] = PINGROUP(76, WEST, uim2_clk, _, _, _, _, _, _, _, _),
  1034. [77] = PINGROUP(77, WEST, uim2_reset, _, _, _, _, _, _, _, _),
  1035. [78] = PINGROUP(78, WEST, uim2_present, _, _, _, _, _, _, _, _),
  1036. [79] = PINGROUP(79, WEST, uim1_data, _, _, _, _, _, _, _, _),
  1037. [80] = PINGROUP(80, WEST, uim1_clk, _, _, _, _, _, _, _, _),
  1038. [81] = PINGROUP(81, WEST, uim1_reset, _, _, _, _, _, _, _, _),
  1039. [82] = PINGROUP(82, WEST, uim1_present, _, _, _, _, _, _, _, _),
  1040. [83] = PINGROUP(83, WEST, _, nav_pps_in, nav_pps_out, gps_tx, _, _, _, _, _),
  1041. [84] = PINGROUP(84, WEST, _, nav_pps_in, nav_pps_out, gps_tx, _, _, _, _, _),
  1042. [85] = PINGROUP(85, WEST, uim_batt, edp_hot, aoss_cti, _, _, _, _, _, _),
  1043. [86] = PINGROUP(86, NORTH, qdss, atest_char, _, _, _, _, _, _, _),
  1044. [87] = PINGROUP(87, NORTH, adsp_ext, qdss, atest_char, _, _, _, _, _, _),
  1045. [88] = PINGROUP(88, NORTH, qdss, atest_char, _, _, _, _, _, _, _),
  1046. [89] = PINGROUP(89, NORTH, qdss, atest_char, _, _, _, _, _, _, _),
  1047. [90] = PINGROUP(90, NORTH, qdss, atest_char, _, _, _, _, _, _, _),
  1048. [91] = PINGROUP(91, NORTH, qdss, _, _, _, _, _, _, _, _),
  1049. [92] = PINGROUP(92, NORTH, _, _, qup15, _, _, _, _, _, _),
  1050. [93] = PINGROUP(93, NORTH, qdss, _, _, _, _, _, _, _, _),
  1051. [94] = PINGROUP(94, SOUTH, _, _, _, _, _, _, _, _, _),
  1052. [95] = PINGROUP(95, WEST, _, _, _, _, _, _, _, _, _),
  1053. [96] = PINGROUP(96, WEST, qlink_request, _, _, _, _, _, _, _, _),
  1054. [97] = PINGROUP(97, WEST, qlink_enable, _, _, _, _, _, _, _, _),
  1055. [98] = PINGROUP(98, WEST, _, _, _, _, _, _, _, _, _),
  1056. [99] = PINGROUP(99, WEST, _, pa_indicator, _, _, _, _, _, _, _),
  1057. [100] = PINGROUP(100, WEST, _, _, _, _, _, _, _, _, _),
  1058. [101] = PINGROUP(101, NORTH, _, _, qup15, _, _, _, _, _, _),
  1059. [102] = PINGROUP(102, NORTH, _, _, qup15, _, _, _, _, _, _),
  1060. [103] = PINGROUP(103, NORTH, _, qup15, _, _, _, _, _, _, _),
  1061. [104] = PINGROUP(104, WEST, usb_phy, _, qdss, _, _, _, _, _, _),
  1062. [105] = PINGROUP(105, NORTH, _, _, _, _, _, _, _, _, _),
  1063. [106] = PINGROUP(106, NORTH, _, _, _, _, _, _, _, _, _),
  1064. [107] = PINGROUP(107, WEST, _, nav_pps_in, nav_pps_out, gps_tx, _, _, _, _, _),
  1065. [108] = PINGROUP(108, SOUTH, mss_lte, _, _, _, _, _, _, _, _),
  1066. [109] = PINGROUP(109, SOUTH, mss_lte, gps_tx, _, _, _, _, _, _, _),
  1067. [110] = PINGROUP(110, NORTH, _, _, qup14, _, _, _, _, _, _),
  1068. [111] = PINGROUP(111, NORTH, _, _, qup14, _, _, _, _, _, _),
  1069. [112] = PINGROUP(112, NORTH, _, qup14, _, _, _, _, _, _, _),
  1070. [113] = PINGROUP(113, NORTH, _, qup14, _, _, _, _, _, _, _),
  1071. [114] = PINGROUP(114, NORTH, _, _, _, _, _, _, _, _, _),
  1072. [115] = PINGROUP(115, NORTH, _, _, _, _, _, _, _, _, _),
  1073. [116] = PINGROUP(116, NORTH, _, _, _, _, _, _, _, _, _),
  1074. [117] = PINGROUP(117, NORTH, _, _, _, _, _, _, _, _, _),
  1075. [118] = PINGROUP(118, NORTH, _, _, _, _, _, _, _, _, _),
  1076. [119] = UFS_RESET(ufs_reset, 0x9f000),
  1077. [120] = SDC_QDSD_PINGROUP(sdc1_rclk, WEST, 0x9a000, 15, 0),
  1078. [121] = SDC_QDSD_PINGROUP(sdc1_clk, WEST, 0x9a000, 13, 6),
  1079. [122] = SDC_QDSD_PINGROUP(sdc1_cmd, WEST, 0x9a000, 11, 3),
  1080. [123] = SDC_QDSD_PINGROUP(sdc1_data, WEST, 0x9a000, 9, 0),
  1081. [124] = SDC_QDSD_PINGROUP(sdc2_clk, SOUTH, 0x98000, 14, 6),
  1082. [125] = SDC_QDSD_PINGROUP(sdc2_cmd, SOUTH, 0x98000, 11, 3),
  1083. [126] = SDC_QDSD_PINGROUP(sdc2_data, SOUTH, 0x98000, 9, 0),
  1084. };
  1085. static const struct msm_gpio_wakeirq_map sm7150_pdc_map[] = {
  1086. {0, 40}, {3, 50}, {4, 42}, {5, 70}, {6, 41}, {9, 57},
  1087. {10, 80}, {11, 51}, {22, 90}, {24, 61}, {26, 52}, {30, 56},
  1088. {31, 33}, {32, 81}, {33, 62}, {34, 43}, {36, 91}, {37, 53},
  1089. {38, 63}, {39, 72}, {41, 101}, {42, 35}, {43, 34}, {45, 73},
  1090. {47, 82}, {48, 36}, {49, 37}, {50, 38}, {52, 39}, {53, 102},
  1091. {55, 92}, {56, 45}, {57, 46}, {58, 83}, {59, 47}, {62, 48},
  1092. {64, 74}, {65, 44}, {66, 93}, {67, 49}, {68, 55}, {69, 32},
  1093. {70, 54}, {73, 64}, {74, 71}, {78, 31}, {82, 30}, {84, 58},
  1094. {85, 103}, {86, 59}, {87, 60}, {88, 65}, {89, 66}, {90, 67},
  1095. {91, 68}, {92, 69}, {93, 75}, {94, 84}, {95, 94}, {96, 76},
  1096. {98, 77}, {101, 78}, {104, 99}, {109, 104}, {110, 79}, {113, 85},
  1097. };
  1098. static const struct msm_pinctrl_soc_data sm7150_tlmm = {
  1099. .pins = sm7150_pins,
  1100. .npins = ARRAY_SIZE(sm7150_pins),
  1101. .functions = sm7150_functions,
  1102. .nfunctions = ARRAY_SIZE(sm7150_functions),
  1103. .groups = sm7150_groups,
  1104. .ngroups = ARRAY_SIZE(sm7150_groups),
  1105. .ngpios = 120,
  1106. .tiles = sm7150_tiles,
  1107. .ntiles = ARRAY_SIZE(sm7150_tiles),
  1108. .wakeirq_map = sm7150_pdc_map,
  1109. .nwakeirq_map = ARRAY_SIZE(sm7150_pdc_map),
  1110. .wakeirq_dual_edge_errata = true,
  1111. };
  1112. static int sm7150_tlmm_probe(struct platform_device *pdev)
  1113. {
  1114. return msm_pinctrl_probe(pdev, &sm7150_tlmm);
  1115. }
  1116. static const struct of_device_id sm7150_tlmm_of_match[] = {
  1117. { .compatible = "qcom,sm7150-tlmm", },
  1118. { },
  1119. };
  1120. MODULE_DEVICE_TABLE(of, sm7150_tlmm_of_match);
  1121. static struct platform_driver sm7150_tlmm_driver = {
  1122. .driver = {
  1123. .name = "sm7150-tlmm",
  1124. .pm = &msm_pinctrl_dev_pm_ops,
  1125. .of_match_table = sm7150_tlmm_of_match,
  1126. },
  1127. .probe = sm7150_tlmm_probe,
  1128. .remove_new = msm_pinctrl_remove,
  1129. };
  1130. static int __init sm7150_tlmm_init(void)
  1131. {
  1132. return platform_driver_register(&sm7150_tlmm_driver);
  1133. }
  1134. arch_initcall(sm7150_tlmm_init);
  1135. static void __exit sm7150_tlmm_exit(void)
  1136. {
  1137. platform_driver_unregister(&sm7150_tlmm_driver);
  1138. }
  1139. module_exit(sm7150_tlmm_exit);
  1140. MODULE_DESCRIPTION("Qualcomm SM7150 TLMM driver");
  1141. MODULE_LICENSE("GPL");