pinctrl-mtk-mt6397.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. #ifndef __PINCTRL_MTK_MT6397_H
  2. #define __PINCTRL_MTK_MT6397_H
  3. #include <linux/pinctrl/pinctrl.h>
  4. #include "pinctrl-mtk-common.h"
  5. static const struct mtk_desc_pin mtk_pins_mt6397[] = {
  6. MTK_PIN(
  7. PINCTRL_PIN(0, "INT"),
  8. "N2", "mt6397",
  9. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  10. MTK_FUNCTION(0, "GPIO0"),
  11. MTK_FUNCTION(1, "INT")
  12. ),
  13. MTK_PIN(
  14. PINCTRL_PIN(1, "SRCVOLTEN"),
  15. "M4", "mt6397",
  16. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  17. MTK_FUNCTION(0, "GPIO1"),
  18. MTK_FUNCTION(1, "SRCVOLTEN"),
  19. MTK_FUNCTION(6, "TEST_CK1")
  20. ),
  21. MTK_PIN(
  22. PINCTRL_PIN(2, "SRCLKEN_PERI"),
  23. "M2", "mt6397",
  24. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  25. MTK_FUNCTION(0, "GPIO2"),
  26. MTK_FUNCTION(1, "SRCLKEN_PERI"),
  27. MTK_FUNCTION(6, "TEST_CK2")
  28. ),
  29. MTK_PIN(
  30. PINCTRL_PIN(3, "RTC_32K1V8"),
  31. "K3", "mt6397",
  32. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  33. MTK_FUNCTION(0, "GPIO3"),
  34. MTK_FUNCTION(1, "RTC_32K1V8"),
  35. MTK_FUNCTION(6, "TEST_CK3")
  36. ),
  37. MTK_PIN(
  38. PINCTRL_PIN(4, "WRAP_EVENT"),
  39. "J2", "mt6397",
  40. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  41. MTK_FUNCTION(0, "GPIO4"),
  42. MTK_FUNCTION(1, "WRAP_EVENT")
  43. ),
  44. MTK_PIN(
  45. PINCTRL_PIN(5, "SPI_CLK"),
  46. "L4", "mt6397",
  47. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  48. MTK_FUNCTION(0, "GPIO5"),
  49. MTK_FUNCTION(1, "SPI_CLK")
  50. ),
  51. MTK_PIN(
  52. PINCTRL_PIN(6, "SPI_CSN"),
  53. "J3", "mt6397",
  54. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  55. MTK_FUNCTION(0, "GPIO6"),
  56. MTK_FUNCTION(1, "SPI_CSN")
  57. ),
  58. MTK_PIN(
  59. PINCTRL_PIN(7, "SPI_MOSI"),
  60. "J1", "mt6397",
  61. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  62. MTK_FUNCTION(0, "GPIO7"),
  63. MTK_FUNCTION(1, "SPI_MOSI")
  64. ),
  65. MTK_PIN(
  66. PINCTRL_PIN(8, "SPI_MISO"),
  67. "L3", "mt6397",
  68. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  69. MTK_FUNCTION(0, "GPIO8"),
  70. MTK_FUNCTION(1, "SPI_MISO")
  71. ),
  72. MTK_PIN(
  73. PINCTRL_PIN(9, "AUD_CLK_MOSI"),
  74. "H2", "mt6397",
  75. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  76. MTK_FUNCTION(0, "GPIO9"),
  77. MTK_FUNCTION(1, "AUD_CLK"),
  78. MTK_FUNCTION(6, "TEST_IN0"),
  79. MTK_FUNCTION(7, "TEST_OUT0")
  80. ),
  81. MTK_PIN(
  82. PINCTRL_PIN(10, "AUD_DAT_MISO"),
  83. "H3", "mt6397",
  84. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  85. MTK_FUNCTION(0, "GPIO10"),
  86. MTK_FUNCTION(1, "AUD_MISO"),
  87. MTK_FUNCTION(6, "TEST_IN1"),
  88. MTK_FUNCTION(7, "TEST_OUT1")
  89. ),
  90. MTK_PIN(
  91. PINCTRL_PIN(11, "AUD_DAT_MOSI"),
  92. "H1", "mt6397",
  93. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  94. MTK_FUNCTION(0, "GPIO11"),
  95. MTK_FUNCTION(1, "AUD_MOSI"),
  96. MTK_FUNCTION(6, "TEST_IN2"),
  97. MTK_FUNCTION(7, "TEST_OUT2")
  98. ),
  99. MTK_PIN(
  100. PINCTRL_PIN(12, "COL0"),
  101. "F3", "mt6397",
  102. MTK_EINT_FUNCTION(2, 10),
  103. MTK_FUNCTION(0, "GPIO12"),
  104. MTK_FUNCTION(1, "COL0_USBDL"),
  105. MTK_FUNCTION(2, "EINT10_1X"),
  106. MTK_FUNCTION(3, "PWM1_3X"),
  107. MTK_FUNCTION(6, "TEST_IN3"),
  108. MTK_FUNCTION(7, "TEST_OUT3")
  109. ),
  110. MTK_PIN(
  111. PINCTRL_PIN(13, "COL1"),
  112. "G8", "mt6397",
  113. MTK_EINT_FUNCTION(2, 11),
  114. MTK_FUNCTION(0, "GPIO13"),
  115. MTK_FUNCTION(1, "COL1"),
  116. MTK_FUNCTION(2, "EINT11_1X"),
  117. MTK_FUNCTION(3, "SCL0_2X"),
  118. MTK_FUNCTION(6, "TEST_IN4"),
  119. MTK_FUNCTION(7, "TEST_OUT4")
  120. ),
  121. MTK_PIN(
  122. PINCTRL_PIN(14, "COL2"),
  123. "H4", "mt6397",
  124. MTK_EINT_FUNCTION(2, 12),
  125. MTK_FUNCTION(0, "GPIO14"),
  126. MTK_FUNCTION(1, "COL2"),
  127. MTK_FUNCTION(2, "EINT12_1X"),
  128. MTK_FUNCTION(3, "SDA0_2X"),
  129. MTK_FUNCTION(6, "TEST_IN5"),
  130. MTK_FUNCTION(7, "TEST_OUT5")
  131. ),
  132. MTK_PIN(
  133. PINCTRL_PIN(15, "COL3"),
  134. "G2", "mt6397",
  135. MTK_EINT_FUNCTION(2, 13),
  136. MTK_FUNCTION(0, "GPIO15"),
  137. MTK_FUNCTION(1, "COL3"),
  138. MTK_FUNCTION(2, "EINT13_1X"),
  139. MTK_FUNCTION(3, "SCL1_2X"),
  140. MTK_FUNCTION(6, "TEST_IN6"),
  141. MTK_FUNCTION(7, "TEST_OUT6")
  142. ),
  143. MTK_PIN(
  144. PINCTRL_PIN(16, "COL4"),
  145. "F2", "mt6397",
  146. MTK_EINT_FUNCTION(2, 14),
  147. MTK_FUNCTION(0, "GPIO16"),
  148. MTK_FUNCTION(1, "COL4"),
  149. MTK_FUNCTION(2, "EINT14_1X"),
  150. MTK_FUNCTION(3, "SDA1_2X"),
  151. MTK_FUNCTION(6, "TEST_IN7"),
  152. MTK_FUNCTION(7, "TEST_OUT7")
  153. ),
  154. MTK_PIN(
  155. PINCTRL_PIN(17, "COL5"),
  156. "G7", "mt6397",
  157. MTK_EINT_FUNCTION(2, 15),
  158. MTK_FUNCTION(0, "GPIO17"),
  159. MTK_FUNCTION(1, "COL5"),
  160. MTK_FUNCTION(2, "EINT15_1X"),
  161. MTK_FUNCTION(3, "SCL2_2X"),
  162. MTK_FUNCTION(6, "TEST_IN8"),
  163. MTK_FUNCTION(7, "TEST_OUT8")
  164. ),
  165. MTK_PIN(
  166. PINCTRL_PIN(18, "COL6"),
  167. "J6", "mt6397",
  168. MTK_EINT_FUNCTION(2, 16),
  169. MTK_FUNCTION(0, "GPIO18"),
  170. MTK_FUNCTION(1, "COL6"),
  171. MTK_FUNCTION(2, "EINT16_1X"),
  172. MTK_FUNCTION(3, "SDA2_2X"),
  173. MTK_FUNCTION(4, "GPIO32K_0"),
  174. MTK_FUNCTION(5, "GPIO26M_0"),
  175. MTK_FUNCTION(6, "TEST_IN9"),
  176. MTK_FUNCTION(7, "TEST_OUT9")
  177. ),
  178. MTK_PIN(
  179. PINCTRL_PIN(19, "COL7"),
  180. "J5", "mt6397",
  181. MTK_EINT_FUNCTION(2, 17),
  182. MTK_FUNCTION(0, "GPIO19"),
  183. MTK_FUNCTION(1, "COL7"),
  184. MTK_FUNCTION(2, "EINT17_1X"),
  185. MTK_FUNCTION(3, "PWM2_3X"),
  186. MTK_FUNCTION(4, "GPIO32K_1"),
  187. MTK_FUNCTION(5, "GPIO26M_1"),
  188. MTK_FUNCTION(6, "TEST_IN10"),
  189. MTK_FUNCTION(7, "TEST_OUT10")
  190. ),
  191. MTK_PIN(
  192. PINCTRL_PIN(20, "ROW0"),
  193. "L7", "mt6397",
  194. MTK_EINT_FUNCTION(2, 18),
  195. MTK_FUNCTION(0, "GPIO20"),
  196. MTK_FUNCTION(1, "ROW0"),
  197. MTK_FUNCTION(2, "EINT18_1X"),
  198. MTK_FUNCTION(3, "SCL0_3X"),
  199. MTK_FUNCTION(6, "TEST_IN11"),
  200. MTK_FUNCTION(7, "TEST_OUT11")
  201. ),
  202. MTK_PIN(
  203. PINCTRL_PIN(21, "ROW1"),
  204. "P1", "mt6397",
  205. MTK_EINT_FUNCTION(2, 19),
  206. MTK_FUNCTION(0, "GPIO21"),
  207. MTK_FUNCTION(1, "ROW1"),
  208. MTK_FUNCTION(2, "EINT19_1X"),
  209. MTK_FUNCTION(3, "SDA0_3X"),
  210. MTK_FUNCTION(4, "AUD_TSTCK"),
  211. MTK_FUNCTION(6, "TEST_IN12"),
  212. MTK_FUNCTION(7, "TEST_OUT12")
  213. ),
  214. MTK_PIN(
  215. PINCTRL_PIN(22, "ROW2"),
  216. "J8", "mt6397",
  217. MTK_EINT_FUNCTION(2, 20),
  218. MTK_FUNCTION(0, "GPIO22"),
  219. MTK_FUNCTION(1, "ROW2"),
  220. MTK_FUNCTION(2, "EINT20_1X"),
  221. MTK_FUNCTION(3, "SCL1_3X"),
  222. MTK_FUNCTION(6, "TEST_IN13"),
  223. MTK_FUNCTION(7, "TEST_OUT13")
  224. ),
  225. MTK_PIN(
  226. PINCTRL_PIN(23, "ROW3"),
  227. "J7", "mt6397",
  228. MTK_EINT_FUNCTION(2, 21),
  229. MTK_FUNCTION(0, "GPIO23"),
  230. MTK_FUNCTION(1, "ROW3"),
  231. MTK_FUNCTION(2, "EINT21_1X"),
  232. MTK_FUNCTION(3, "SDA1_3X"),
  233. MTK_FUNCTION(6, "TEST_IN14"),
  234. MTK_FUNCTION(7, "TEST_OUT14")
  235. ),
  236. MTK_PIN(
  237. PINCTRL_PIN(24, "ROW4"),
  238. "L5", "mt6397",
  239. MTK_EINT_FUNCTION(2, 22),
  240. MTK_FUNCTION(0, "GPIO24"),
  241. MTK_FUNCTION(1, "ROW4"),
  242. MTK_FUNCTION(2, "EINT22_1X"),
  243. MTK_FUNCTION(3, "SCL2_3X"),
  244. MTK_FUNCTION(6, "TEST_IN15"),
  245. MTK_FUNCTION(7, "TEST_OUT15")
  246. ),
  247. MTK_PIN(
  248. PINCTRL_PIN(25, "ROW5"),
  249. "N6", "mt6397",
  250. MTK_EINT_FUNCTION(2, 23),
  251. MTK_FUNCTION(0, "GPIO25"),
  252. MTK_FUNCTION(1, "ROW5"),
  253. MTK_FUNCTION(2, "EINT23_1X"),
  254. MTK_FUNCTION(3, "SDA2_3X"),
  255. MTK_FUNCTION(6, "TEST_IN16"),
  256. MTK_FUNCTION(7, "TEST_OUT16")
  257. ),
  258. MTK_PIN(
  259. PINCTRL_PIN(26, "ROW6"),
  260. "L6", "mt6397",
  261. MTK_EINT_FUNCTION(2, 24),
  262. MTK_FUNCTION(0, "GPIO26"),
  263. MTK_FUNCTION(1, "ROW6"),
  264. MTK_FUNCTION(2, "EINT24_1X"),
  265. MTK_FUNCTION(3, "PWM3_3X"),
  266. MTK_FUNCTION(4, "GPIO32K_2"),
  267. MTK_FUNCTION(5, "GPIO26M_2"),
  268. MTK_FUNCTION(6, "TEST_IN17"),
  269. MTK_FUNCTION(7, "TEST_OUT17")
  270. ),
  271. MTK_PIN(
  272. PINCTRL_PIN(27, "ROW7"),
  273. "P2", "mt6397",
  274. MTK_EINT_FUNCTION(2, 3),
  275. MTK_FUNCTION(0, "GPIO27"),
  276. MTK_FUNCTION(1, "ROW7"),
  277. MTK_FUNCTION(2, "EINT3_1X"),
  278. MTK_FUNCTION(3, "CBUS"),
  279. MTK_FUNCTION(4, "GPIO32K_3"),
  280. MTK_FUNCTION(5, "GPIO26M_3"),
  281. MTK_FUNCTION(6, "TEST_IN18"),
  282. MTK_FUNCTION(7, "TEST_OUT18")
  283. ),
  284. MTK_PIN(
  285. PINCTRL_PIN(28, "PWM1(VMSEL1)"),
  286. "J4", "mt6397",
  287. MTK_EINT_FUNCTION(2, 4),
  288. MTK_FUNCTION(0, "GPIO28"),
  289. MTK_FUNCTION(1, "PWM1"),
  290. MTK_FUNCTION(2, "EINT4_1X"),
  291. MTK_FUNCTION(4, "GPIO32K_4"),
  292. MTK_FUNCTION(5, "GPIO26M_4"),
  293. MTK_FUNCTION(6, "TEST_IN19"),
  294. MTK_FUNCTION(7, "TEST_OUT19")
  295. ),
  296. MTK_PIN(
  297. PINCTRL_PIN(29, "PWM2(VMSEL2)"),
  298. "N5", "mt6397",
  299. MTK_EINT_FUNCTION(2, 5),
  300. MTK_FUNCTION(0, "GPIO29"),
  301. MTK_FUNCTION(1, "PWM2"),
  302. MTK_FUNCTION(2, "EINT5_1X"),
  303. MTK_FUNCTION(4, "GPIO32K_5"),
  304. MTK_FUNCTION(5, "GPIO26M_5"),
  305. MTK_FUNCTION(6, "TEST_IN20"),
  306. MTK_FUNCTION(7, "TEST_OUT20")
  307. ),
  308. MTK_PIN(
  309. PINCTRL_PIN(30, "PWM3(PWM)"),
  310. "R3", "mt6397",
  311. MTK_EINT_FUNCTION(2, 6),
  312. MTK_FUNCTION(0, "GPIO30"),
  313. MTK_FUNCTION(1, "PWM3"),
  314. MTK_FUNCTION(2, "EINT6_1X"),
  315. MTK_FUNCTION(3, "COL0"),
  316. MTK_FUNCTION(4, "GPIO32K_6"),
  317. MTK_FUNCTION(5, "GPIO26M_6"),
  318. MTK_FUNCTION(6, "TEST_IN21"),
  319. MTK_FUNCTION(7, "TEST_OUT21")
  320. ),
  321. MTK_PIN(
  322. PINCTRL_PIN(31, "SCL0"),
  323. "N1", "mt6397",
  324. MTK_EINT_FUNCTION(2, 7),
  325. MTK_FUNCTION(0, "GPIO31"),
  326. MTK_FUNCTION(1, "SCL0"),
  327. MTK_FUNCTION(2, "EINT7_1X"),
  328. MTK_FUNCTION(3, "PWM1_2X"),
  329. MTK_FUNCTION(6, "TEST_IN22"),
  330. MTK_FUNCTION(7, "TEST_OUT22")
  331. ),
  332. MTK_PIN(
  333. PINCTRL_PIN(32, "SDA0"),
  334. "N3", "mt6397",
  335. MTK_EINT_FUNCTION(2, 8),
  336. MTK_FUNCTION(0, "GPIO32"),
  337. MTK_FUNCTION(1, "SDA0"),
  338. MTK_FUNCTION(2, "EINT8_1X"),
  339. MTK_FUNCTION(6, "TEST_IN23"),
  340. MTK_FUNCTION(7, "TEST_OUT23")
  341. ),
  342. MTK_PIN(
  343. PINCTRL_PIN(33, "SCL1"),
  344. "T1", "mt6397",
  345. MTK_EINT_FUNCTION(2, 9),
  346. MTK_FUNCTION(0, "GPIO33"),
  347. MTK_FUNCTION(1, "SCL1"),
  348. MTK_FUNCTION(2, "EINT9_1X"),
  349. MTK_FUNCTION(3, "PWM2_2X"),
  350. MTK_FUNCTION(6, "TEST_IN24"),
  351. MTK_FUNCTION(7, "TEST_OUT24")
  352. ),
  353. MTK_PIN(
  354. PINCTRL_PIN(34, "SDA1"),
  355. "T2", "mt6397",
  356. MTK_EINT_FUNCTION(2, 0),
  357. MTK_FUNCTION(0, "GPIO34"),
  358. MTK_FUNCTION(1, "SDA1"),
  359. MTK_FUNCTION(2, "EINT0_1X"),
  360. MTK_FUNCTION(6, "TEST_IN25"),
  361. MTK_FUNCTION(7, "TEST_OUT25")
  362. ),
  363. MTK_PIN(
  364. PINCTRL_PIN(35, "SCL2"),
  365. "T3", "mt6397",
  366. MTK_EINT_FUNCTION(2, 1),
  367. MTK_FUNCTION(0, "GPIO35"),
  368. MTK_FUNCTION(1, "SCL2"),
  369. MTK_FUNCTION(2, "EINT1_1X"),
  370. MTK_FUNCTION(3, "PWM3_2X"),
  371. MTK_FUNCTION(6, "TEST_IN26"),
  372. MTK_FUNCTION(7, "TEST_OUT26")
  373. ),
  374. MTK_PIN(
  375. PINCTRL_PIN(36, "SDA2"),
  376. "U2", "mt6397",
  377. MTK_EINT_FUNCTION(2, 2),
  378. MTK_FUNCTION(0, "GPIO36"),
  379. MTK_FUNCTION(1, "SDA2"),
  380. MTK_FUNCTION(2, "EINT2_1X"),
  381. MTK_FUNCTION(6, "TEST_IN27"),
  382. MTK_FUNCTION(7, "TEST_OUT27")
  383. ),
  384. MTK_PIN(
  385. PINCTRL_PIN(37, "HDMISD"),
  386. "H6", "mt6397",
  387. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  388. MTK_FUNCTION(0, "GPIO37"),
  389. MTK_FUNCTION(1, "HDMISD"),
  390. MTK_FUNCTION(6, "TEST_IN28"),
  391. MTK_FUNCTION(7, "TEST_OUT28")
  392. ),
  393. MTK_PIN(
  394. PINCTRL_PIN(38, "HDMISCK"),
  395. "H5", "mt6397",
  396. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  397. MTK_FUNCTION(0, "GPIO38"),
  398. MTK_FUNCTION(1, "HDMISCK"),
  399. MTK_FUNCTION(6, "TEST_IN29"),
  400. MTK_FUNCTION(7, "TEST_OUT29")
  401. ),
  402. MTK_PIN(
  403. PINCTRL_PIN(39, "HTPLG"),
  404. "H7", "mt6397",
  405. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  406. MTK_FUNCTION(0, "GPIO39"),
  407. MTK_FUNCTION(1, "HTPLG"),
  408. MTK_FUNCTION(6, "TEST_IN30"),
  409. MTK_FUNCTION(7, "TEST_OUT30")
  410. ),
  411. MTK_PIN(
  412. PINCTRL_PIN(40, "CEC"),
  413. "J9", "mt6397",
  414. MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT),
  415. MTK_FUNCTION(0, "GPIO40"),
  416. MTK_FUNCTION(1, "CEC"),
  417. MTK_FUNCTION(6, "TEST_IN31"),
  418. MTK_FUNCTION(7, "TEST_OUT31")
  419. ),
  420. };
  421. #endif /* __PINCTRL_MTK_MT6397_H */