pm_api_pinctrl.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. /*
  2. * Copyright (c) 2018-2020, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. /*
  7. * ZynqMP system level PM-API functions for pin control.
  8. */
  9. #ifndef PM_API_PINCTRL_H
  10. #define PM_API_PINCTRL_H
  11. #include "pm_common.h"
  12. #define FUNCTION_NAME_LEN (16U)
  13. #define GROUPS_PAYLOAD_LEN (12U)
  14. #define NUM_GROUPS_PER_RESP (6U)
  15. #define END_OF_FUNCTION "END_OF_FUNCTION"
  16. #define END_OF_GROUPS -1
  17. #define PINCTRL_GRP_RESERVED -2
  18. //pinctrl function ids
  19. enum {
  20. PINCTRL_FUNC_CAN0 = (0U),
  21. PINCTRL_FUNC_CAN1 = (1U),
  22. PINCTRL_FUNC_ETHERNET0 = (2U),
  23. PINCTRL_FUNC_ETHERNET1 = (3U),
  24. PINCTRL_FUNC_ETHERNET2 = (4U),
  25. PINCTRL_FUNC_ETHERNET3 = (5U),
  26. PINCTRL_FUNC_GEMTSU0 = (6U),
  27. PINCTRL_FUNC_GPIO0 = (7U),
  28. PINCTRL_FUNC_I2C0 = (8U),
  29. PINCTRL_FUNC_I2C1 = (9U),
  30. PINCTRL_FUNC_MDIO0 = (10U),
  31. PINCTRL_FUNC_MDIO1 = (11U),
  32. PINCTRL_FUNC_MDIO2 = (12U),
  33. PINCTRL_FUNC_MDIO3 = (13U),
  34. PINCTRL_FUNC_QSPI0 = (14U),
  35. PINCTRL_FUNC_QSPI_FBCLK = (15U),
  36. PINCTRL_FUNC_QSPI_SS = (16U),
  37. PINCTRL_FUNC_SPI0 = (17U),
  38. PINCTRL_FUNC_SPI1 = (18U),
  39. PINCTRL_FUNC_SPI0_SS = (19U),
  40. PINCTRL_FUNC_SPI1_SS = (20U),
  41. PINCTRL_FUNC_SDIO0 = (21U),
  42. PINCTRL_FUNC_SDIO0_PC = (22U),
  43. PINCTRL_FUNC_SDIO0_CD = (23U),
  44. PINCTRL_FUNC_SDIO0_WP = (24U),
  45. PINCTRL_FUNC_SDIO1 = (25U),
  46. PINCTRL_FUNC_SDIO1_PC = (26U),
  47. PINCTRL_FUNC_SDIO1_CD = (27U),
  48. PINCTRL_FUNC_SDIO1_WP = (28U),
  49. PINCTRL_FUNC_NAND0 = (29U),
  50. PINCTRL_FUNC_NAND0_CE = (30U),
  51. PINCTRL_FUNC_NAND0_RB = (31U),
  52. PINCTRL_FUNC_NAND0_DQS = (32U),
  53. PINCTRL_FUNC_TTC0_CLK = (33U),
  54. PINCTRL_FUNC_TTC0_WAV = (34U),
  55. PINCTRL_FUNC_TTC1_CLK = (35U),
  56. PINCTRL_FUNC_TTC1_WAV = (36U),
  57. PINCTRL_FUNC_TTC2_CLK = (37U),
  58. PINCTRL_FUNC_TTC2_WAV = (38U),
  59. PINCTRL_FUNC_TTC3_CLK = (39U),
  60. PINCTRL_FUNC_TTC3_WAV = (40U),
  61. PINCTRL_FUNC_UART0 = (41U),
  62. PINCTRL_FUNC_UART1 = (42U),
  63. PINCTRL_FUNC_USB0 = (43U),
  64. PINCTRL_FUNC_USB1 = (44U),
  65. PINCTRL_FUNC_SWDT0_CLK = (45U),
  66. PINCTRL_FUNC_SWDT0_RST = (46U),
  67. PINCTRL_FUNC_SWDT1_CLK = (47U),
  68. PINCTRL_FUNC_SWDT1_RST = (48U),
  69. PINCTRL_FUNC_PMU0 = (49U),
  70. PINCTRL_FUNC_PCIE0 = (50U),
  71. PINCTRL_FUNC_CSU0 = (51U),
  72. PINCTRL_FUNC_DPAUX0 = (52U),
  73. PINCTRL_FUNC_PJTAG0 = (53U),
  74. PINCTRL_FUNC_TRACE0 = (54U),
  75. PINCTRL_FUNC_TRACE0_CLK = (55U),
  76. PINCTRL_FUNC_TESTSCAN0 = (56U),
  77. END_FUNCTION = (57U),
  78. };
  79. #define MAX_FUNCTION END_FUNCTION
  80. // pinctrl pin numbers
  81. enum {
  82. PINCTRL_PIN_0,
  83. PINCTRL_PIN_1,
  84. PINCTRL_PIN_2,
  85. PINCTRL_PIN_3,
  86. PINCTRL_PIN_4,
  87. PINCTRL_PIN_5,
  88. PINCTRL_PIN_6,
  89. PINCTRL_PIN_7,
  90. PINCTRL_PIN_8,
  91. PINCTRL_PIN_9,
  92. PINCTRL_PIN_10,
  93. PINCTRL_PIN_11,
  94. PINCTRL_PIN_12,
  95. PINCTRL_PIN_13,
  96. PINCTRL_PIN_14,
  97. PINCTRL_PIN_15,
  98. PINCTRL_PIN_16,
  99. PINCTRL_PIN_17,
  100. PINCTRL_PIN_18,
  101. PINCTRL_PIN_19,
  102. PINCTRL_PIN_20,
  103. PINCTRL_PIN_21,
  104. PINCTRL_PIN_22,
  105. PINCTRL_PIN_23,
  106. PINCTRL_PIN_24,
  107. PINCTRL_PIN_25,
  108. PINCTRL_PIN_26,
  109. PINCTRL_PIN_27,
  110. PINCTRL_PIN_28,
  111. PINCTRL_PIN_29,
  112. PINCTRL_PIN_30,
  113. PINCTRL_PIN_31,
  114. PINCTRL_PIN_32,
  115. PINCTRL_PIN_33,
  116. PINCTRL_PIN_34,
  117. PINCTRL_PIN_35,
  118. PINCTRL_PIN_36,
  119. PINCTRL_PIN_37,
  120. PINCTRL_PIN_38,
  121. PINCTRL_PIN_39,
  122. PINCTRL_PIN_40,
  123. PINCTRL_PIN_41,
  124. PINCTRL_PIN_42,
  125. PINCTRL_PIN_43,
  126. PINCTRL_PIN_44,
  127. PINCTRL_PIN_45,
  128. PINCTRL_PIN_46,
  129. PINCTRL_PIN_47,
  130. PINCTRL_PIN_48,
  131. PINCTRL_PIN_49,
  132. PINCTRL_PIN_50,
  133. PINCTRL_PIN_51,
  134. PINCTRL_PIN_52,
  135. PINCTRL_PIN_53,
  136. PINCTRL_PIN_54,
  137. PINCTRL_PIN_55,
  138. PINCTRL_PIN_56,
  139. PINCTRL_PIN_57,
  140. PINCTRL_PIN_58,
  141. PINCTRL_PIN_59,
  142. PINCTRL_PIN_60,
  143. PINCTRL_PIN_61,
  144. PINCTRL_PIN_62,
  145. PINCTRL_PIN_63,
  146. PINCTRL_PIN_64,
  147. PINCTRL_PIN_65,
  148. PINCTRL_PIN_66,
  149. PINCTRL_PIN_67,
  150. PINCTRL_PIN_68,
  151. PINCTRL_PIN_69,
  152. PINCTRL_PIN_70,
  153. PINCTRL_PIN_71,
  154. PINCTRL_PIN_72,
  155. PINCTRL_PIN_73,
  156. PINCTRL_PIN_74,
  157. PINCTRL_PIN_75,
  158. PINCTRL_PIN_76,
  159. PINCTRL_PIN_77,
  160. END_PINS = (78U),
  161. };
  162. #define MAX_PIN END_PINS
  163. // pinctrl group ids
  164. enum {
  165. PINCTRL_GRP_ETHERNET0_0,
  166. PINCTRL_GRP_ETHERNET1_0,
  167. PINCTRL_GRP_ETHERNET2_0,
  168. PINCTRL_GRP_ETHERNET3_0,
  169. PINCTRL_GRP_GEMTSU0_0,
  170. PINCTRL_GRP_GEMTSU0_1,
  171. PINCTRL_GRP_GEMTSU0_2,
  172. PINCTRL_GRP_MDIO0_0,
  173. PINCTRL_GRP_MDIO1_0,
  174. PINCTRL_GRP_MDIO1_1,
  175. PINCTRL_GRP_MDIO2_0,
  176. PINCTRL_GRP_MDIO3_0,
  177. PINCTRL_GRP_QSPI0_0,
  178. PINCTRL_GRP_QSPI_SS,
  179. PINCTRL_GRP_QSPI_FBCLK,
  180. PINCTRL_GRP_SPI0_0,
  181. PINCTRL_GRP_SPI0_1,
  182. PINCTRL_GRP_SPI0_2,
  183. PINCTRL_GRP_SPI0_3,
  184. PINCTRL_GRP_SPI0_4,
  185. PINCTRL_GRP_SPI0_5,
  186. PINCTRL_GRP_SPI0_0_SS0,
  187. PINCTRL_GRP_SPI0_0_SS1,
  188. PINCTRL_GRP_SPI0_0_SS2,
  189. PINCTRL_GRP_SPI0_1_SS0,
  190. PINCTRL_GRP_SPI0_1_SS1,
  191. PINCTRL_GRP_SPI0_1_SS2,
  192. PINCTRL_GRP_SPI0_2_SS0,
  193. PINCTRL_GRP_SPI0_2_SS1,
  194. PINCTRL_GRP_SPI0_2_SS2,
  195. PINCTRL_GRP_SPI0_3_SS0,
  196. PINCTRL_GRP_SPI0_3_SS1,
  197. PINCTRL_GRP_SPI0_3_SS2,
  198. PINCTRL_GRP_SPI0_4_SS0,
  199. PINCTRL_GRP_SPI0_4_SS1,
  200. PINCTRL_GRP_SPI0_4_SS2,
  201. PINCTRL_GRP_SPI0_5_SS0,
  202. PINCTRL_GRP_SPI0_5_SS1,
  203. PINCTRL_GRP_SPI0_5_SS2,
  204. PINCTRL_GRP_SPI1_0,
  205. PINCTRL_GRP_SPI1_1,
  206. PINCTRL_GRP_SPI1_2,
  207. PINCTRL_GRP_SPI1_3,
  208. PINCTRL_GRP_SPI1_4,
  209. PINCTRL_GRP_SPI1_5,
  210. PINCTRL_GRP_SPI1_0_SS0,
  211. PINCTRL_GRP_SPI1_0_SS1,
  212. PINCTRL_GRP_SPI1_0_SS2,
  213. PINCTRL_GRP_SPI1_1_SS0,
  214. PINCTRL_GRP_SPI1_1_SS1,
  215. PINCTRL_GRP_SPI1_1_SS2,
  216. PINCTRL_GRP_SPI1_2_SS0,
  217. PINCTRL_GRP_SPI1_2_SS1,
  218. PINCTRL_GRP_SPI1_2_SS2,
  219. PINCTRL_GRP_SPI1_3_SS0,
  220. PINCTRL_GRP_SPI1_3_SS1,
  221. PINCTRL_GRP_SPI1_3_SS2,
  222. PINCTRL_GRP_SPI1_4_SS0,
  223. PINCTRL_GRP_SPI1_4_SS1,
  224. PINCTRL_GRP_SPI1_4_SS2,
  225. PINCTRL_GRP_SPI1_5_SS0,
  226. PINCTRL_GRP_SPI1_5_SS1,
  227. PINCTRL_GRP_SPI1_5_SS2,
  228. PINCTRL_GRP_SDIO0_0,
  229. PINCTRL_GRP_SDIO0_1,
  230. PINCTRL_GRP_SDIO0_2,
  231. PINCTRL_GRP_SDIO0_4BIT_0_0,
  232. PINCTRL_GRP_SDIO0_4BIT_0_1,
  233. PINCTRL_GRP_SDIO0_4BIT_1_0,
  234. PINCTRL_GRP_SDIO0_4BIT_1_1,
  235. PINCTRL_GRP_SDIO0_4BIT_2_0,
  236. PINCTRL_GRP_SDIO0_4BIT_2_1,
  237. PINCTRL_GRP_SDIO0_1BIT_0_0,
  238. PINCTRL_GRP_SDIO0_1BIT_0_1,
  239. PINCTRL_GRP_SDIO0_1BIT_0_2,
  240. PINCTRL_GRP_SDIO0_1BIT_0_3,
  241. PINCTRL_GRP_SDIO0_1BIT_0_4,
  242. PINCTRL_GRP_SDIO0_1BIT_0_5,
  243. PINCTRL_GRP_SDIO0_1BIT_0_6,
  244. PINCTRL_GRP_SDIO0_1BIT_0_7,
  245. PINCTRL_GRP_SDIO0_1BIT_1_0,
  246. PINCTRL_GRP_SDIO0_1BIT_1_1,
  247. PINCTRL_GRP_SDIO0_1BIT_1_2,
  248. PINCTRL_GRP_SDIO0_1BIT_1_3,
  249. PINCTRL_GRP_SDIO0_1BIT_1_4,
  250. PINCTRL_GRP_SDIO0_1BIT_1_5,
  251. PINCTRL_GRP_SDIO0_1BIT_1_6,
  252. PINCTRL_GRP_SDIO0_1BIT_1_7,
  253. PINCTRL_GRP_SDIO0_1BIT_2_0,
  254. PINCTRL_GRP_SDIO0_1BIT_2_1,
  255. PINCTRL_GRP_SDIO0_1BIT_2_2,
  256. PINCTRL_GRP_SDIO0_1BIT_2_3,
  257. PINCTRL_GRP_SDIO0_1BIT_2_4,
  258. PINCTRL_GRP_SDIO0_1BIT_2_5,
  259. PINCTRL_GRP_SDIO0_1BIT_2_6,
  260. PINCTRL_GRP_SDIO0_1BIT_2_7,
  261. PINCTRL_GRP_SDIO0_0_PC,
  262. PINCTRL_GRP_SDIO0_1_PC,
  263. PINCTRL_GRP_SDIO0_2_PC,
  264. PINCTRL_GRP_SDIO0_0_CD,
  265. PINCTRL_GRP_SDIO0_1_CD,
  266. PINCTRL_GRP_SDIO0_2_CD,
  267. PINCTRL_GRP_SDIO0_0_WP,
  268. PINCTRL_GRP_SDIO0_1_WP,
  269. PINCTRL_GRP_SDIO0_2_WP,
  270. PINCTRL_GRP_SDIO1_0,
  271. PINCTRL_GRP_SDIO1_4BIT_0_0,
  272. PINCTRL_GRP_SDIO1_4BIT_0_1,
  273. PINCTRL_GRP_SDIO1_4BIT_1_0,
  274. PINCTRL_GRP_SDIO1_1BIT_0_0,
  275. PINCTRL_GRP_SDIO1_1BIT_0_1,
  276. PINCTRL_GRP_SDIO1_1BIT_0_2,
  277. PINCTRL_GRP_SDIO1_1BIT_0_3,
  278. PINCTRL_GRP_SDIO1_1BIT_0_4,
  279. PINCTRL_GRP_SDIO1_1BIT_0_5,
  280. PINCTRL_GRP_SDIO1_1BIT_0_6,
  281. PINCTRL_GRP_SDIO1_1BIT_0_7,
  282. PINCTRL_GRP_SDIO1_1BIT_1_0,
  283. PINCTRL_GRP_SDIO1_1BIT_1_1,
  284. PINCTRL_GRP_SDIO1_1BIT_1_2,
  285. PINCTRL_GRP_SDIO1_1BIT_1_3,
  286. PINCTRL_GRP_SDIO1_0_PC,
  287. PINCTRL_GRP_SDIO1_1_PC,
  288. PINCTRL_GRP_SDIO1_0_CD,
  289. PINCTRL_GRP_SDIO1_1_CD,
  290. PINCTRL_GRP_SDIO1_0_WP,
  291. PINCTRL_GRP_SDIO1_1_WP,
  292. PINCTRL_GRP_NAND0_0,
  293. PINCTRL_GRP_NAND0_0_CE,
  294. PINCTRL_GRP_NAND0_1_CE,
  295. PINCTRL_GRP_NAND0_0_RB,
  296. PINCTRL_GRP_NAND0_1_RB,
  297. PINCTRL_GRP_NAND0_0_DQS,
  298. PINCTRL_GRP_NAND0_1_DQS,
  299. PINCTRL_GRP_CAN0_0,
  300. PINCTRL_GRP_CAN0_1,
  301. PINCTRL_GRP_CAN0_2,
  302. PINCTRL_GRP_CAN0_3,
  303. PINCTRL_GRP_CAN0_4,
  304. PINCTRL_GRP_CAN0_5,
  305. PINCTRL_GRP_CAN0_6,
  306. PINCTRL_GRP_CAN0_7,
  307. PINCTRL_GRP_CAN0_8,
  308. PINCTRL_GRP_CAN0_9,
  309. PINCTRL_GRP_CAN0_10,
  310. PINCTRL_GRP_CAN0_11,
  311. PINCTRL_GRP_CAN0_12,
  312. PINCTRL_GRP_CAN0_13,
  313. PINCTRL_GRP_CAN0_14,
  314. PINCTRL_GRP_CAN0_15,
  315. PINCTRL_GRP_CAN0_16,
  316. PINCTRL_GRP_CAN0_17,
  317. PINCTRL_GRP_CAN0_18,
  318. PINCTRL_GRP_CAN1_0,
  319. PINCTRL_GRP_CAN1_1,
  320. PINCTRL_GRP_CAN1_2,
  321. PINCTRL_GRP_CAN1_3,
  322. PINCTRL_GRP_CAN1_4,
  323. PINCTRL_GRP_CAN1_5,
  324. PINCTRL_GRP_CAN1_6,
  325. PINCTRL_GRP_CAN1_7,
  326. PINCTRL_GRP_CAN1_8,
  327. PINCTRL_GRP_CAN1_9,
  328. PINCTRL_GRP_CAN1_10,
  329. PINCTRL_GRP_CAN1_11,
  330. PINCTRL_GRP_CAN1_12,
  331. PINCTRL_GRP_CAN1_13,
  332. PINCTRL_GRP_CAN1_14,
  333. PINCTRL_GRP_CAN1_15,
  334. PINCTRL_GRP_CAN1_16,
  335. PINCTRL_GRP_CAN1_17,
  336. PINCTRL_GRP_CAN1_18,
  337. PINCTRL_GRP_CAN1_19,
  338. PINCTRL_GRP_UART0_0,
  339. PINCTRL_GRP_UART0_1,
  340. PINCTRL_GRP_UART0_2,
  341. PINCTRL_GRP_UART0_3,
  342. PINCTRL_GRP_UART0_4,
  343. PINCTRL_GRP_UART0_5,
  344. PINCTRL_GRP_UART0_6,
  345. PINCTRL_GRP_UART0_7,
  346. PINCTRL_GRP_UART0_8,
  347. PINCTRL_GRP_UART0_9,
  348. PINCTRL_GRP_UART0_10,
  349. PINCTRL_GRP_UART0_11,
  350. PINCTRL_GRP_UART0_12,
  351. PINCTRL_GRP_UART0_13,
  352. PINCTRL_GRP_UART0_14,
  353. PINCTRL_GRP_UART0_15,
  354. PINCTRL_GRP_UART0_16,
  355. PINCTRL_GRP_UART0_17,
  356. PINCTRL_GRP_UART0_18,
  357. PINCTRL_GRP_UART1_0,
  358. PINCTRL_GRP_UART1_1,
  359. PINCTRL_GRP_UART1_2,
  360. PINCTRL_GRP_UART1_3,
  361. PINCTRL_GRP_UART1_4,
  362. PINCTRL_GRP_UART1_5,
  363. PINCTRL_GRP_UART1_6,
  364. PINCTRL_GRP_UART1_7,
  365. PINCTRL_GRP_UART1_8,
  366. PINCTRL_GRP_UART1_9,
  367. PINCTRL_GRP_UART1_10,
  368. PINCTRL_GRP_UART1_11,
  369. PINCTRL_GRP_UART1_12,
  370. PINCTRL_GRP_UART1_13,
  371. PINCTRL_GRP_UART1_14,
  372. PINCTRL_GRP_UART1_15,
  373. PINCTRL_GRP_UART1_16,
  374. PINCTRL_GRP_UART1_17,
  375. PINCTRL_GRP_UART1_18,
  376. PINCTRL_GRP_I2C0_0,
  377. PINCTRL_GRP_I2C0_1,
  378. PINCTRL_GRP_I2C0_2,
  379. PINCTRL_GRP_I2C0_3,
  380. PINCTRL_GRP_I2C0_4,
  381. PINCTRL_GRP_I2C0_5,
  382. PINCTRL_GRP_I2C0_6,
  383. PINCTRL_GRP_I2C0_7,
  384. PINCTRL_GRP_I2C0_8,
  385. PINCTRL_GRP_I2C0_9,
  386. PINCTRL_GRP_I2C0_10,
  387. PINCTRL_GRP_I2C0_11,
  388. PINCTRL_GRP_I2C0_12,
  389. PINCTRL_GRP_I2C0_13,
  390. PINCTRL_GRP_I2C0_14,
  391. PINCTRL_GRP_I2C0_15,
  392. PINCTRL_GRP_I2C0_16,
  393. PINCTRL_GRP_I2C0_17,
  394. PINCTRL_GRP_I2C0_18,
  395. PINCTRL_GRP_I2C1_0,
  396. PINCTRL_GRP_I2C1_1,
  397. PINCTRL_GRP_I2C1_2,
  398. PINCTRL_GRP_I2C1_3,
  399. PINCTRL_GRP_I2C1_4,
  400. PINCTRL_GRP_I2C1_5,
  401. PINCTRL_GRP_I2C1_6,
  402. PINCTRL_GRP_I2C1_7,
  403. PINCTRL_GRP_I2C1_8,
  404. PINCTRL_GRP_I2C1_9,
  405. PINCTRL_GRP_I2C1_10,
  406. PINCTRL_GRP_I2C1_11,
  407. PINCTRL_GRP_I2C1_12,
  408. PINCTRL_GRP_I2C1_13,
  409. PINCTRL_GRP_I2C1_14,
  410. PINCTRL_GRP_I2C1_15,
  411. PINCTRL_GRP_I2C1_16,
  412. PINCTRL_GRP_I2C1_17,
  413. PINCTRL_GRP_I2C1_18,
  414. PINCTRL_GRP_I2C1_19,
  415. PINCTRL_GRP_TTC0_0_CLK,
  416. PINCTRL_GRP_TTC0_1_CLK,
  417. PINCTRL_GRP_TTC0_2_CLK,
  418. PINCTRL_GRP_TTC0_3_CLK,
  419. PINCTRL_GRP_TTC0_4_CLK,
  420. PINCTRL_GRP_TTC0_5_CLK,
  421. PINCTRL_GRP_TTC0_6_CLK,
  422. PINCTRL_GRP_TTC0_7_CLK,
  423. PINCTRL_GRP_TTC0_8_CLK,
  424. PINCTRL_GRP_TTC0_0_WAV,
  425. PINCTRL_GRP_TTC0_1_WAV,
  426. PINCTRL_GRP_TTC0_2_WAV,
  427. PINCTRL_GRP_TTC0_3_WAV,
  428. PINCTRL_GRP_TTC0_4_WAV,
  429. PINCTRL_GRP_TTC0_5_WAV,
  430. PINCTRL_GRP_TTC0_6_WAV,
  431. PINCTRL_GRP_TTC0_7_WAV,
  432. PINCTRL_GRP_TTC0_8_WAV,
  433. PINCTRL_GRP_TTC1_0_CLK,
  434. PINCTRL_GRP_TTC1_1_CLK,
  435. PINCTRL_GRP_TTC1_2_CLK,
  436. PINCTRL_GRP_TTC1_3_CLK,
  437. PINCTRL_GRP_TTC1_4_CLK,
  438. PINCTRL_GRP_TTC1_5_CLK,
  439. PINCTRL_GRP_TTC1_6_CLK,
  440. PINCTRL_GRP_TTC1_7_CLK,
  441. PINCTRL_GRP_TTC1_8_CLK,
  442. PINCTRL_GRP_TTC1_0_WAV,
  443. PINCTRL_GRP_TTC1_1_WAV,
  444. PINCTRL_GRP_TTC1_2_WAV,
  445. PINCTRL_GRP_TTC1_3_WAV,
  446. PINCTRL_GRP_TTC1_4_WAV,
  447. PINCTRL_GRP_TTC1_5_WAV,
  448. PINCTRL_GRP_TTC1_6_WAV,
  449. PINCTRL_GRP_TTC1_7_WAV,
  450. PINCTRL_GRP_TTC1_8_WAV,
  451. PINCTRL_GRP_TTC2_0_CLK,
  452. PINCTRL_GRP_TTC2_1_CLK,
  453. PINCTRL_GRP_TTC2_2_CLK,
  454. PINCTRL_GRP_TTC2_3_CLK,
  455. PINCTRL_GRP_TTC2_4_CLK,
  456. PINCTRL_GRP_TTC2_5_CLK,
  457. PINCTRL_GRP_TTC2_6_CLK,
  458. PINCTRL_GRP_TTC2_7_CLK,
  459. PINCTRL_GRP_TTC2_8_CLK,
  460. PINCTRL_GRP_TTC2_0_WAV,
  461. PINCTRL_GRP_TTC2_1_WAV,
  462. PINCTRL_GRP_TTC2_2_WAV,
  463. PINCTRL_GRP_TTC2_3_WAV,
  464. PINCTRL_GRP_TTC2_4_WAV,
  465. PINCTRL_GRP_TTC2_5_WAV,
  466. PINCTRL_GRP_TTC2_6_WAV,
  467. PINCTRL_GRP_TTC2_7_WAV,
  468. PINCTRL_GRP_TTC2_8_WAV,
  469. PINCTRL_GRP_TTC3_0_CLK,
  470. PINCTRL_GRP_TTC3_1_CLK,
  471. PINCTRL_GRP_TTC3_2_CLK,
  472. PINCTRL_GRP_TTC3_3_CLK,
  473. PINCTRL_GRP_TTC3_4_CLK,
  474. PINCTRL_GRP_TTC3_5_CLK,
  475. PINCTRL_GRP_TTC3_6_CLK,
  476. PINCTRL_GRP_TTC3_7_CLK,
  477. PINCTRL_GRP_TTC3_8_CLK,
  478. PINCTRL_GRP_TTC3_0_WAV,
  479. PINCTRL_GRP_TTC3_1_WAV,
  480. PINCTRL_GRP_TTC3_2_WAV,
  481. PINCTRL_GRP_TTC3_3_WAV,
  482. PINCTRL_GRP_TTC3_4_WAV,
  483. PINCTRL_GRP_TTC3_5_WAV,
  484. PINCTRL_GRP_TTC3_6_WAV,
  485. PINCTRL_GRP_TTC3_7_WAV,
  486. PINCTRL_GRP_TTC3_8_WAV,
  487. PINCTRL_GRP_SWDT0_0_CLK,
  488. PINCTRL_GRP_SWDT0_1_CLK,
  489. PINCTRL_GRP_SWDT0_2_CLK,
  490. PINCTRL_GRP_SWDT0_3_CLK,
  491. PINCTRL_GRP_SWDT0_4_CLK,
  492. PINCTRL_GRP_SWDT0_5_CLK,
  493. PINCTRL_GRP_SWDT0_6_CLK,
  494. PINCTRL_GRP_SWDT0_7_CLK,
  495. PINCTRL_GRP_SWDT0_8_CLK,
  496. PINCTRL_GRP_SWDT0_9_CLK,
  497. PINCTRL_GRP_SWDT0_10_CLK,
  498. PINCTRL_GRP_SWDT0_11_CLK,
  499. PINCTRL_GRP_SWDT0_12_CLK,
  500. PINCTRL_GRP_SWDT0_0_RST,
  501. PINCTRL_GRP_SWDT0_1_RST,
  502. PINCTRL_GRP_SWDT0_2_RST,
  503. PINCTRL_GRP_SWDT0_3_RST,
  504. PINCTRL_GRP_SWDT0_4_RST,
  505. PINCTRL_GRP_SWDT0_5_RST,
  506. PINCTRL_GRP_SWDT0_6_RST,
  507. PINCTRL_GRP_SWDT0_7_RST,
  508. PINCTRL_GRP_SWDT0_8_RST,
  509. PINCTRL_GRP_SWDT0_9_RST,
  510. PINCTRL_GRP_SWDT0_10_RST,
  511. PINCTRL_GRP_SWDT0_11_RST,
  512. PINCTRL_GRP_SWDT0_12_RST,
  513. PINCTRL_GRP_SWDT1_0_CLK,
  514. PINCTRL_GRP_SWDT1_1_CLK,
  515. PINCTRL_GRP_SWDT1_2_CLK,
  516. PINCTRL_GRP_SWDT1_3_CLK,
  517. PINCTRL_GRP_SWDT1_4_CLK,
  518. PINCTRL_GRP_SWDT1_5_CLK,
  519. PINCTRL_GRP_SWDT1_6_CLK,
  520. PINCTRL_GRP_SWDT1_7_CLK,
  521. PINCTRL_GRP_SWDT1_8_CLK,
  522. PINCTRL_GRP_SWDT1_9_CLK,
  523. PINCTRL_GRP_SWDT1_10_CLK,
  524. PINCTRL_GRP_SWDT1_11_CLK,
  525. PINCTRL_GRP_SWDT1_12_CLK,
  526. PINCTRL_GRP_SWDT1_0_RST,
  527. PINCTRL_GRP_SWDT1_1_RST,
  528. PINCTRL_GRP_SWDT1_2_RST,
  529. PINCTRL_GRP_SWDT1_3_RST,
  530. PINCTRL_GRP_SWDT1_4_RST,
  531. PINCTRL_GRP_SWDT1_5_RST,
  532. PINCTRL_GRP_SWDT1_6_RST,
  533. PINCTRL_GRP_SWDT1_7_RST,
  534. PINCTRL_GRP_SWDT1_8_RST,
  535. PINCTRL_GRP_SWDT1_9_RST,
  536. PINCTRL_GRP_SWDT1_10_RST,
  537. PINCTRL_GRP_SWDT1_11_RST,
  538. PINCTRL_GRP_SWDT1_12_RST,
  539. PINCTRL_GRP_GPIO0_0,
  540. PINCTRL_GRP_GPIO0_1,
  541. PINCTRL_GRP_GPIO0_2,
  542. PINCTRL_GRP_GPIO0_3,
  543. PINCTRL_GRP_GPIO0_4,
  544. PINCTRL_GRP_GPIO0_5,
  545. PINCTRL_GRP_GPIO0_6,
  546. PINCTRL_GRP_GPIO0_7,
  547. PINCTRL_GRP_GPIO0_8,
  548. PINCTRL_GRP_GPIO0_9,
  549. PINCTRL_GRP_GPIO0_10,
  550. PINCTRL_GRP_GPIO0_11,
  551. PINCTRL_GRP_GPIO0_12,
  552. PINCTRL_GRP_GPIO0_13,
  553. PINCTRL_GRP_GPIO0_14,
  554. PINCTRL_GRP_GPIO0_15,
  555. PINCTRL_GRP_GPIO0_16,
  556. PINCTRL_GRP_GPIO0_17,
  557. PINCTRL_GRP_GPIO0_18,
  558. PINCTRL_GRP_GPIO0_19,
  559. PINCTRL_GRP_GPIO0_20,
  560. PINCTRL_GRP_GPIO0_21,
  561. PINCTRL_GRP_GPIO0_22,
  562. PINCTRL_GRP_GPIO0_23,
  563. PINCTRL_GRP_GPIO0_24,
  564. PINCTRL_GRP_GPIO0_25,
  565. PINCTRL_GRP_GPIO0_26,
  566. PINCTRL_GRP_GPIO0_27,
  567. PINCTRL_GRP_GPIO0_28,
  568. PINCTRL_GRP_GPIO0_29,
  569. PINCTRL_GRP_GPIO0_30,
  570. PINCTRL_GRP_GPIO0_31,
  571. PINCTRL_GRP_GPIO0_32,
  572. PINCTRL_GRP_GPIO0_33,
  573. PINCTRL_GRP_GPIO0_34,
  574. PINCTRL_GRP_GPIO0_35,
  575. PINCTRL_GRP_GPIO0_36,
  576. PINCTRL_GRP_GPIO0_37,
  577. PINCTRL_GRP_GPIO0_38,
  578. PINCTRL_GRP_GPIO0_39,
  579. PINCTRL_GRP_GPIO0_40,
  580. PINCTRL_GRP_GPIO0_41,
  581. PINCTRL_GRP_GPIO0_42,
  582. PINCTRL_GRP_GPIO0_43,
  583. PINCTRL_GRP_GPIO0_44,
  584. PINCTRL_GRP_GPIO0_45,
  585. PINCTRL_GRP_GPIO0_46,
  586. PINCTRL_GRP_GPIO0_47,
  587. PINCTRL_GRP_GPIO0_48,
  588. PINCTRL_GRP_GPIO0_49,
  589. PINCTRL_GRP_GPIO0_50,
  590. PINCTRL_GRP_GPIO0_51,
  591. PINCTRL_GRP_GPIO0_52,
  592. PINCTRL_GRP_GPIO0_53,
  593. PINCTRL_GRP_GPIO0_54,
  594. PINCTRL_GRP_GPIO0_55,
  595. PINCTRL_GRP_GPIO0_56,
  596. PINCTRL_GRP_GPIO0_57,
  597. PINCTRL_GRP_GPIO0_58,
  598. PINCTRL_GRP_GPIO0_59,
  599. PINCTRL_GRP_GPIO0_60,
  600. PINCTRL_GRP_GPIO0_61,
  601. PINCTRL_GRP_GPIO0_62,
  602. PINCTRL_GRP_GPIO0_63,
  603. PINCTRL_GRP_GPIO0_64,
  604. PINCTRL_GRP_GPIO0_65,
  605. PINCTRL_GRP_GPIO0_66,
  606. PINCTRL_GRP_GPIO0_67,
  607. PINCTRL_GRP_GPIO0_68,
  608. PINCTRL_GRP_GPIO0_69,
  609. PINCTRL_GRP_GPIO0_70,
  610. PINCTRL_GRP_GPIO0_71,
  611. PINCTRL_GRP_GPIO0_72,
  612. PINCTRL_GRP_GPIO0_73,
  613. PINCTRL_GRP_GPIO0_74,
  614. PINCTRL_GRP_GPIO0_75,
  615. PINCTRL_GRP_GPIO0_76,
  616. PINCTRL_GRP_GPIO0_77,
  617. PINCTRL_GRP_USB0_0,
  618. PINCTRL_GRP_USB1_0,
  619. PINCTRL_GRP_PMU0_0,
  620. PINCTRL_GRP_PMU0_1,
  621. PINCTRL_GRP_PMU0_2,
  622. PINCTRL_GRP_PMU0_3,
  623. PINCTRL_GRP_PMU0_4,
  624. PINCTRL_GRP_PMU0_5,
  625. PINCTRL_GRP_PMU0_6,
  626. PINCTRL_GRP_PMU0_7,
  627. PINCTRL_GRP_PMU0_8,
  628. PINCTRL_GRP_PMU0_9,
  629. PINCTRL_GRP_PMU0_10,
  630. PINCTRL_GRP_PMU0_11,
  631. PINCTRL_GRP_PCIE0_0,
  632. PINCTRL_GRP_PCIE0_1,
  633. PINCTRL_GRP_PCIE0_2,
  634. PINCTRL_GRP_PCIE0_3,
  635. PINCTRL_GRP_PCIE0_4,
  636. PINCTRL_GRP_PCIE0_5,
  637. PINCTRL_GRP_PCIE0_6,
  638. PINCTRL_GRP_PCIE0_7,
  639. PINCTRL_GRP_CSU0_0,
  640. PINCTRL_GRP_CSU0_1,
  641. PINCTRL_GRP_CSU0_2,
  642. PINCTRL_GRP_CSU0_3,
  643. PINCTRL_GRP_CSU0_4,
  644. PINCTRL_GRP_CSU0_5,
  645. PINCTRL_GRP_CSU0_6,
  646. PINCTRL_GRP_CSU0_7,
  647. PINCTRL_GRP_CSU0_8,
  648. PINCTRL_GRP_CSU0_9,
  649. PINCTRL_GRP_CSU0_10,
  650. PINCTRL_GRP_CSU0_11,
  651. PINCTRL_GRP_DPAUX0_0,
  652. PINCTRL_GRP_DPAUX0_1,
  653. PINCTRL_GRP_DPAUX0_2,
  654. PINCTRL_GRP_DPAUX0_3,
  655. PINCTRL_GRP_PJTAG0_0,
  656. PINCTRL_GRP_PJTAG0_1,
  657. PINCTRL_GRP_PJTAG0_2,
  658. PINCTRL_GRP_PJTAG0_3,
  659. PINCTRL_GRP_PJTAG0_4,
  660. PINCTRL_GRP_PJTAG0_5,
  661. PINCTRL_GRP_TRACE0_0,
  662. PINCTRL_GRP_TRACE0_1,
  663. PINCTRL_GRP_TRACE0_2,
  664. PINCTRL_GRP_TRACE0_0_CLK,
  665. PINCTRL_GRP_TRACE0_1_CLK,
  666. PINCTRL_GRP_TRACE0_2_CLK,
  667. PINCTRL_GRP_TESTSCAN0_0,
  668. };
  669. // pinctrl config parameters
  670. enum {
  671. PINCTRL_CONFIG_SLEW_RATE,
  672. PINCTRL_CONFIG_BIAS_STATUS,
  673. PINCTRL_CONFIG_PULL_CTRL,
  674. PINCTRL_CONFIG_SCHMITT_CMOS,
  675. PINCTRL_CONFIG_DRIVE_STRENGTH,
  676. PINCTRL_CONFIG_VOLTAGE_STATUS,
  677. PINCTRL_CONFIG_MAX,
  678. };
  679. // pinctrl slew rate
  680. #define PINCTRL_SLEW_RATE_FAST 0U
  681. #define PINCTRL_SLEW_RATE_SLOW 1U
  682. // pinctrl bias status
  683. #define PINCTRL_BIAS_DISABLE 0U
  684. #define PINCTRL_BIAS_ENABLE 1U
  685. // pinctrl pull control
  686. #define PINCTRL_BIAS_PULL_DOWN 0U
  687. #define PINCTRL_BIAS_PULL_UP 1U
  688. // pinctrl schmitt cmos type
  689. #define PINCTRL_INPUT_TYPE_CMOS 0U
  690. #define PINCTRL_INPUT_TYPE_SCHMITT 1U
  691. //pinctrl drive strength values
  692. #define PINCTRL_DRIVE_STRENGTH_2MA 0U
  693. #define PINCTRL_DRIVE_STRENGTH_4MA 1U
  694. #define PINCTRL_DRIVE_STRENGTH_8MA 2U
  695. #define PINCTRL_DRIVE_STRENGTH_12MA 3U
  696. void pm_api_pinctrl_get_function_name(uint32_t fid, char *name);
  697. enum pm_ret_status pm_api_pinctrl_get_function_groups(uint32_t fid,
  698. uint32_t index,
  699. uint16_t *groups);
  700. enum pm_ret_status pm_api_pinctrl_get_pin_groups(uint32_t pin,
  701. uint32_t index,
  702. uint16_t *groups);
  703. enum pm_ret_status pm_api_pinctrl_get_num_pins(uint32_t *npins);
  704. enum pm_ret_status pm_api_pinctrl_get_num_functions(uint32_t *nfuncs);
  705. enum pm_ret_status pm_api_pinctrl_get_num_func_groups(uint32_t fid,
  706. uint32_t *ngroups);
  707. #endif /* PM_API_PINCTRL_H */