pinctrl-sm6125.c 40 KB

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