pmic_pin_reg.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _PMIC_PIN_REG_H_
  13. #define _PMIC_PIN_REG_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_PMIC_PIN_REG_BASE (0x511087c0)
  17. typedef volatile struct
  18. {
  19. uint32_t pin_adi_sclk; // 0x00000000
  20. uint32_t pin_adi_d; // 0x00000004
  21. uint32_t pin_ext_rst_b; // 0x00000008
  22. uint32_t pin_ana_int; // 0x0000000c
  23. uint32_t pin_chip_sellp; // 0x00000010
  24. uint32_t pin_clk_32k; // 0x00000014
  25. uint32_t pin_ptesto; // 0x00000018
  26. uint32_t pin_clk26m; // 0x0000001c
  27. uint32_t ext_xtl_en0; // 0x00000020
  28. uint32_t ext_xtl_en1; // 0x00000024
  29. uint32_t ext_xtl_en2; // 0x00000028
  30. uint32_t ext_xtl_en3; // 0x0000002c
  31. uint32_t ext_xtl_en4; // 0x00000030
  32. uint32_t ext_xtl_en5; // 0x00000034
  33. uint32_t ext_xtl_en6; // 0x00000038
  34. uint32_t ext_xtl_en7; // 0x0000003c
  35. } HWP_PMIC_PIN_REG_T;
  36. #define hwp_pmicPinReg ((HWP_PMIC_PIN_REG_T *)REG_ACCESS_ADDRESS(REG_PMIC_PIN_REG_BASE))
  37. // pin_adi_sclk
  38. typedef union {
  39. uint32_t v;
  40. struct
  41. {
  42. uint32_t adi_sclk_slp_oe : 1; // [0]
  43. uint32_t adi_sclk_slp_ie : 1; // [1]
  44. uint32_t adi_sclk_slp_wpdo : 1; // [2]
  45. uint32_t adi_sclk_slp_wpu : 1; // [3]
  46. uint32_t adi_sclk_fun_sel : 2; // [5:4]
  47. uint32_t adi_sclk_fun_wpdo : 1; // [6]
  48. uint32_t adi_sclk_fun_wpu : 1; // [7]
  49. uint32_t adi_sclk_bsr_drv : 2; // [9:8]
  50. uint32_t __31_10 : 22; // [31:10]
  51. } b;
  52. } REG_PMIC_PIN_REG_PIN_ADI_SCLK_T;
  53. // pin_adi_d
  54. typedef union {
  55. uint32_t v;
  56. struct
  57. {
  58. uint32_t adi_d_slp_oe : 1; // [0]
  59. uint32_t adi_d_slp_ie : 1; // [1]
  60. uint32_t adi_d_slp_wpdo : 1; // [2]
  61. uint32_t adi_d_slp_wpu : 1; // [3]
  62. uint32_t adi_d_fun_sel : 2; // [5:4]
  63. uint32_t adi_d_fun_wpdo : 1; // [6]
  64. uint32_t adi_d_fun_wpu : 1; // [7]
  65. uint32_t adi_d_bsr_drv : 2; // [9:8]
  66. uint32_t __31_10 : 22; // [31:10]
  67. } b;
  68. } REG_PMIC_PIN_REG_PIN_ADI_D_T;
  69. // pin_ext_rst_b
  70. typedef union {
  71. uint32_t v;
  72. struct
  73. {
  74. uint32_t ext_rst_b_slp_oe : 1; // [0]
  75. uint32_t ext_rst_b_slp_ie : 1; // [1]
  76. uint32_t ext_rst_b_slp_wpdo : 1; // [2]
  77. uint32_t ext_rst_b_slp_wpu : 1; // [3]
  78. uint32_t ext_rst_b_fun_sel : 2; // [5:4]
  79. uint32_t ext_rst_b_fun_wpdo : 1; // [6]
  80. uint32_t ext_rst_b_fun_wpu : 1; // [7]
  81. uint32_t ext_rst_b_bsr_drv : 2; // [9:8]
  82. uint32_t __31_10 : 22; // [31:10]
  83. } b;
  84. } REG_PMIC_PIN_REG_PIN_EXT_RST_B_T;
  85. // pin_ana_int
  86. typedef union {
  87. uint32_t v;
  88. struct
  89. {
  90. uint32_t adi_sclk_slp_oe : 1; // [0]
  91. uint32_t adi_sclk_slp_ie : 1; // [1]
  92. uint32_t adi_sclk_slp_wpdo : 1; // [2]
  93. uint32_t adi_sclk_slp_wpu : 1; // [3]
  94. uint32_t adi_sclk_fun_sel : 2; // [5:4]
  95. uint32_t adi_sclk_fun_wpdo : 1; // [6]
  96. uint32_t adi_sclk_fun_wpu : 1; // [7]
  97. uint32_t adi_sclk_bsr_drv : 2; // [9:8]
  98. uint32_t __31_10 : 22; // [31:10]
  99. } b;
  100. } REG_PMIC_PIN_REG_PIN_ANA_INT_T;
  101. // pin_chip_sellp
  102. typedef union {
  103. uint32_t v;
  104. struct
  105. {
  106. uint32_t chip_sleep_slp_oe : 1; // [0]
  107. uint32_t chip_sleep_slp_ie : 1; // [1]
  108. uint32_t chip_sleep_slp_wpdo : 1; // [2]
  109. uint32_t chip_sleep_slp_wpu : 1; // [3]
  110. uint32_t chip_sleep_fun_sel : 2; // [5:4]
  111. uint32_t chip_sleep_fun_wpdo : 1; // [6]
  112. uint32_t chip_sleep_fun_wpu : 1; // [7]
  113. uint32_t chip_sleep_bsr_drv : 2; // [9:8]
  114. uint32_t __31_10 : 22; // [31:10]
  115. } b;
  116. } REG_PMIC_PIN_REG_PIN_CHIP_SELLP_T;
  117. // pin_clk_32k
  118. typedef union {
  119. uint32_t v;
  120. struct
  121. {
  122. uint32_t clk_32k_slp_oe : 1; // [0]
  123. uint32_t clk_32k_slp_ie : 1; // [1]
  124. uint32_t clk_32k_slp_wpdo : 1; // [2]
  125. uint32_t clk_32k_slp_wpu : 1; // [3]
  126. uint32_t clk_32k_fun_sel : 2; // [5:4]
  127. uint32_t clk_32k_fun_wpdo : 1; // [6]
  128. uint32_t clk_32k_fun_wpu : 1; // [7]
  129. uint32_t clk_32k_bsr_drv : 2; // [9:8]
  130. uint32_t __31_10 : 22; // [31:10]
  131. } b;
  132. } REG_PMIC_PIN_REG_PIN_CLK_32K_T;
  133. // pin_ptesto
  134. typedef union {
  135. uint32_t v;
  136. struct
  137. {
  138. uint32_t ptesto_slp_oe : 1; // [0]
  139. uint32_t ptesto_slp_ie : 1; // [1]
  140. uint32_t ptesto_slp_wpdo : 1; // [2]
  141. uint32_t ptesto_slp_wpu : 1; // [3]
  142. uint32_t ptesto_fun_sel : 2; // [5:4]
  143. uint32_t ptesto_fun_wpdo : 1; // [6]
  144. uint32_t ptesto_fun_wpu : 1; // [7]
  145. uint32_t ptesto_bsr_drv : 2; // [9:8]
  146. uint32_t __31_10 : 22; // [31:10]
  147. } b;
  148. } REG_PMIC_PIN_REG_PIN_PTESTO_T;
  149. // pin_clk26m
  150. typedef union {
  151. uint32_t v;
  152. struct
  153. {
  154. uint32_t clk26m_slp_oe : 1; // [0]
  155. uint32_t clk26m_slp_ie : 1; // [1]
  156. uint32_t clk26m_slp_wpdo : 1; // [2]
  157. uint32_t clk26m_slp_wpu : 1; // [3]
  158. uint32_t clk26m_fun_sel : 2; // [5:4]
  159. uint32_t clk26m_fun_wpdo : 1; // [6]
  160. uint32_t clk26m_fun_wpu : 1; // [7]
  161. uint32_t clk26m_bsr_drv : 2; // [9:8]
  162. uint32_t __31_10 : 22; // [31:10]
  163. } b;
  164. } REG_PMIC_PIN_REG_PIN_CLK26M_T;
  165. // ext_xtl_en0
  166. typedef union {
  167. uint32_t v;
  168. struct
  169. {
  170. uint32_t ext_xtl_en0_slp_oe : 1; // [0]
  171. uint32_t ext_xtl_en0_slp_ie : 1; // [1]
  172. uint32_t ext_xtl_en0_wpdo : 1; // [2]
  173. uint32_t ext_xtl_en0_wpu : 1; // [3]
  174. uint32_t ext_xtl_en0_fun_sel : 2; // [5:4]
  175. uint32_t ext_xtl_en0_fun_wpdo : 1; // [6]
  176. uint32_t ext_xtl_en0_fun_wpu : 1; // [7]
  177. uint32_t ext_xtl_en0_bsr_drv : 2; // [9:8]
  178. uint32_t __31_10 : 22; // [31:10]
  179. } b;
  180. } REG_PMIC_PIN_REG_EXT_XTL_EN0_T;
  181. // ext_xtl_en1
  182. typedef union {
  183. uint32_t v;
  184. struct
  185. {
  186. uint32_t ext_xtl_en1_slp_oe : 1; // [0]
  187. uint32_t ext_xtl_en1_slp_ie : 1; // [1]
  188. uint32_t ext_xtl_en1_slp_wpdo : 1; // [2]
  189. uint32_t ext_xtl_en1_slp_wpu : 1; // [3]
  190. uint32_t ext_xtl_en1_fun_sel : 2; // [5:4]
  191. uint32_t ext_xtl_en1_fun_wpdo : 1; // [6]
  192. uint32_t ext_xtl_en1_fun_wpu : 1; // [7]
  193. uint32_t ext_xtl_en1_bsr_drv : 2; // [9:8]
  194. uint32_t __31_10 : 22; // [31:10]
  195. } b;
  196. } REG_PMIC_PIN_REG_EXT_XTL_EN1_T;
  197. // ext_xtl_en2
  198. typedef union {
  199. uint32_t v;
  200. struct
  201. {
  202. uint32_t ext_xtl_en2_slp_oe : 1; // [0]
  203. uint32_t ext_xtl_en2_slp_ie : 1; // [1]
  204. uint32_t ext_xtl_en2_slp_wpdo : 1; // [2]
  205. uint32_t ext_xtl_en2_slp_wpu : 1; // [3]
  206. uint32_t ext_xtl_en2_fun_sel : 2; // [5:4]
  207. uint32_t ext_xtl_en2_fun_wpdo : 1; // [6]
  208. uint32_t ext_xtl_en2_fun_wpu : 1; // [7]
  209. uint32_t ext_xtl_en2_bsr_drv : 2; // [9:8]
  210. uint32_t __31_10 : 22; // [31:10]
  211. } b;
  212. } REG_PMIC_PIN_REG_EXT_XTL_EN2_T;
  213. // ext_xtl_en3
  214. typedef union {
  215. uint32_t v;
  216. struct
  217. {
  218. uint32_t ext_xtl_en3_slp_oe : 1; // [0]
  219. uint32_t ext_xtl_en3_slp_ie : 1; // [1]
  220. uint32_t ext_xtl_en3_slp_wpdo : 1; // [2]
  221. uint32_t ext_xtl_en3_slp_wpu : 1; // [3]
  222. uint32_t ext_xtl_en3_fun_sel : 2; // [5:4]
  223. uint32_t ext_xtl_en3_fun_wpdo : 1; // [6]
  224. uint32_t ext_xtl_en3_fun_wpu : 1; // [7]
  225. uint32_t ext_xtl_en3_bsr_drv : 2; // [9:8]
  226. uint32_t __31_10 : 22; // [31:10]
  227. } b;
  228. } REG_PMIC_PIN_REG_EXT_XTL_EN3_T;
  229. // ext_xtl_en4
  230. typedef union {
  231. uint32_t v;
  232. struct
  233. {
  234. uint32_t ext_xtl_en4_slp_oe : 1; // [0]
  235. uint32_t ext_xtl_en4_slp_ie : 1; // [1]
  236. uint32_t ext_xtl_en4_slp_wpdo : 1; // [2]
  237. uint32_t ext_xtl_en4_slp_wpu : 1; // [3]
  238. uint32_t ext_xtl_en4_fun_sel : 2; // [5:4]
  239. uint32_t ext_xtl_en4_fun_wpdo : 1; // [6]
  240. uint32_t ext_xtl_en4_fun_wpu : 1; // [7]
  241. uint32_t ext_xtl_en4_bsr_drv : 2; // [9:8]
  242. uint32_t __31_10 : 22; // [31:10]
  243. } b;
  244. } REG_PMIC_PIN_REG_EXT_XTL_EN4_T;
  245. // ext_xtl_en5
  246. typedef union {
  247. uint32_t v;
  248. struct
  249. {
  250. uint32_t ext_xtl_en5_slp_oe : 1; // [0]
  251. uint32_t ext_xtl_en5_slp_ie : 1; // [1]
  252. uint32_t ext_xtl_en5_slp_wpdo : 1; // [2]
  253. uint32_t ext_xtl_en5_slp_wpu : 1; // [3]
  254. uint32_t ext_xtl_en5_fun_sel : 2; // [5:4]
  255. uint32_t ext_xtl_en5_fun_wpdo : 1; // [6]
  256. uint32_t ext_xtl_en5_fun_wpu : 1; // [7]
  257. uint32_t ext_xtl_en5_bsr_drv : 2; // [9:8]
  258. uint32_t __31_10 : 22; // [31:10]
  259. } b;
  260. } REG_PMIC_PIN_REG_EXT_XTL_EN5_T;
  261. // ext_xtl_en6
  262. typedef union {
  263. uint32_t v;
  264. struct
  265. {
  266. uint32_t ext_xtl_en6_slp_oe : 1; // [0]
  267. uint32_t ext_xtl_en6_slp_ie : 1; // [1]
  268. uint32_t ext_xtl_en6_slp_wpdo : 1; // [2]
  269. uint32_t ext_xtl_en6_slp_wpu : 1; // [3]
  270. uint32_t ext_xtl_en6_fun_sel : 2; // [5:4]
  271. uint32_t ext_xtl_en6_fun_wpdo : 1; // [6]
  272. uint32_t ext_xtl_en6_fun_wpu : 1; // [7]
  273. uint32_t ext_xtl_en6_bsr_drv : 2; // [9:8]
  274. uint32_t __31_10 : 22; // [31:10]
  275. } b;
  276. } REG_PMIC_PIN_REG_EXT_XTL_EN6_T;
  277. // ext_xtl_en7
  278. typedef union {
  279. uint32_t v;
  280. struct
  281. {
  282. uint32_t ext_xtl_en7_slp_oe : 1; // [0]
  283. uint32_t ext_xtl_en7_slp_ie : 1; // [1]
  284. uint32_t ext_xtl_en7_slp_wpdo : 1; // [2]
  285. uint32_t ext_xtl_en7_slp_wpu : 1; // [3]
  286. uint32_t ext_xtl_en7_fun_sel : 2; // [5:4]
  287. uint32_t ext_xtl_en7_fun_wpdo : 1; // [6]
  288. uint32_t ext_xtl_en7_fun_wpu : 1; // [7]
  289. uint32_t ext_xtl_en7_bsr_drv : 2; // [9:8]
  290. uint32_t __31_10 : 22; // [31:10]
  291. } b;
  292. } REG_PMIC_PIN_REG_EXT_XTL_EN7_T;
  293. // pin_adi_sclk
  294. #define PMIC_PIN_REG_ADI_SCLK_SLP_OE (1 << 0)
  295. #define PMIC_PIN_REG_ADI_SCLK_SLP_IE (1 << 1)
  296. #define PMIC_PIN_REG_ADI_SCLK_SLP_WPDO (1 << 2)
  297. #define PMIC_PIN_REG_ADI_SCLK_SLP_WPU (1 << 3)
  298. #define PMIC_PIN_REG_ADI_SCLK_FUN_SEL(n) (((n)&0x3) << 4)
  299. #define PMIC_PIN_REG_ADI_SCLK_FUN_WPDO (1 << 6)
  300. #define PMIC_PIN_REG_ADI_SCLK_FUN_WPU (1 << 7)
  301. #define PMIC_PIN_REG_ADI_SCLK_BSR_DRV(n) (((n)&0x3) << 8)
  302. // pin_adi_d
  303. #define PMIC_PIN_REG_ADI_D_SLP_OE (1 << 0)
  304. #define PMIC_PIN_REG_ADI_D_SLP_IE (1 << 1)
  305. #define PMIC_PIN_REG_ADI_D_SLP_WPDO (1 << 2)
  306. #define PMIC_PIN_REG_ADI_D_SLP_WPU (1 << 3)
  307. #define PMIC_PIN_REG_ADI_D_FUN_SEL(n) (((n)&0x3) << 4)
  308. #define PMIC_PIN_REG_ADI_D_FUN_WPDO (1 << 6)
  309. #define PMIC_PIN_REG_ADI_D_FUN_WPU (1 << 7)
  310. #define PMIC_PIN_REG_ADI_D_BSR_DRV(n) (((n)&0x3) << 8)
  311. // pin_ext_rst_b
  312. #define PMIC_PIN_REG_EXT_RST_B_SLP_OE (1 << 0)
  313. #define PMIC_PIN_REG_EXT_RST_B_SLP_IE (1 << 1)
  314. #define PMIC_PIN_REG_EXT_RST_B_SLP_WPDO (1 << 2)
  315. #define PMIC_PIN_REG_EXT_RST_B_SLP_WPU (1 << 3)
  316. #define PMIC_PIN_REG_EXT_RST_B_FUN_SEL(n) (((n)&0x3) << 4)
  317. #define PMIC_PIN_REG_EXT_RST_B_FUN_WPDO (1 << 6)
  318. #define PMIC_PIN_REG_EXT_RST_B_FUN_WPU (1 << 7)
  319. #define PMIC_PIN_REG_EXT_RST_B_BSR_DRV(n) (((n)&0x3) << 8)
  320. // pin_ana_int
  321. #define PMIC_PIN_REG_ADI_SCLK_SLP_OE (1 << 0)
  322. #define PMIC_PIN_REG_ADI_SCLK_SLP_IE (1 << 1)
  323. #define PMIC_PIN_REG_ADI_SCLK_SLP_WPDO (1 << 2)
  324. #define PMIC_PIN_REG_ADI_SCLK_SLP_WPU (1 << 3)
  325. #define PMIC_PIN_REG_ADI_SCLK_FUN_SEL(n) (((n)&0x3) << 4)
  326. #define PMIC_PIN_REG_ADI_SCLK_FUN_WPDO (1 << 6)
  327. #define PMIC_PIN_REG_ADI_SCLK_FUN_WPU (1 << 7)
  328. #define PMIC_PIN_REG_ADI_SCLK_BSR_DRV(n) (((n)&0x3) << 8)
  329. // pin_chip_sellp
  330. #define PMIC_PIN_REG_CHIP_SLEEP_SLP_OE (1 << 0)
  331. #define PMIC_PIN_REG_CHIP_SLEEP_SLP_IE (1 << 1)
  332. #define PMIC_PIN_REG_CHIP_SLEEP_SLP_WPDO (1 << 2)
  333. #define PMIC_PIN_REG_CHIP_SLEEP_SLP_WPU (1 << 3)
  334. #define PMIC_PIN_REG_CHIP_SLEEP_FUN_SEL(n) (((n)&0x3) << 4)
  335. #define PMIC_PIN_REG_CHIP_SLEEP_FUN_WPDO (1 << 6)
  336. #define PMIC_PIN_REG_CHIP_SLEEP_FUN_WPU (1 << 7)
  337. #define PMIC_PIN_REG_CHIP_SLEEP_BSR_DRV(n) (((n)&0x3) << 8)
  338. // pin_clk_32k
  339. #define PMIC_PIN_REG_CLK_32K_SLP_OE (1 << 0)
  340. #define PMIC_PIN_REG_CLK_32K_SLP_IE (1 << 1)
  341. #define PMIC_PIN_REG_CLK_32K_SLP_WPDO (1 << 2)
  342. #define PMIC_PIN_REG_CLK_32K_SLP_WPU (1 << 3)
  343. #define PMIC_PIN_REG_CLK_32K_FUN_SEL(n) (((n)&0x3) << 4)
  344. #define PMIC_PIN_REG_CLK_32K_FUN_WPDO (1 << 6)
  345. #define PMIC_PIN_REG_CLK_32K_FUN_WPU (1 << 7)
  346. #define PMIC_PIN_REG_CLK_32K_BSR_DRV(n) (((n)&0x3) << 8)
  347. // pin_ptesto
  348. #define PMIC_PIN_REG_PTESTO_SLP_OE (1 << 0)
  349. #define PMIC_PIN_REG_PTESTO_SLP_IE (1 << 1)
  350. #define PMIC_PIN_REG_PTESTO_SLP_WPDO (1 << 2)
  351. #define PMIC_PIN_REG_PTESTO_SLP_WPU (1 << 3)
  352. #define PMIC_PIN_REG_PTESTO_FUN_SEL(n) (((n)&0x3) << 4)
  353. #define PMIC_PIN_REG_PTESTO_FUN_WPDO (1 << 6)
  354. #define PMIC_PIN_REG_PTESTO_FUN_WPU (1 << 7)
  355. #define PMIC_PIN_REG_PTESTO_BSR_DRV(n) (((n)&0x3) << 8)
  356. // pin_clk26m
  357. #define PMIC_PIN_REG_CLK26M_SLP_OE (1 << 0)
  358. #define PMIC_PIN_REG_CLK26M_SLP_IE (1 << 1)
  359. #define PMIC_PIN_REG_CLK26M_SLP_WPDO (1 << 2)
  360. #define PMIC_PIN_REG_CLK26M_SLP_WPU (1 << 3)
  361. #define PMIC_PIN_REG_CLK26M_FUN_SEL(n) (((n)&0x3) << 4)
  362. #define PMIC_PIN_REG_CLK26M_FUN_WPDO (1 << 6)
  363. #define PMIC_PIN_REG_CLK26M_FUN_WPU (1 << 7)
  364. #define PMIC_PIN_REG_CLK26M_BSR_DRV(n) (((n)&0x3) << 8)
  365. // ext_xtl_en0
  366. #define PMIC_PIN_REG_EXT_XTL_EN0_SLP_OE (1 << 0)
  367. #define PMIC_PIN_REG_EXT_XTL_EN0_SLP_IE (1 << 1)
  368. #define PMIC_PIN_REG_EXT_XTL_EN0_WPDO (1 << 2)
  369. #define PMIC_PIN_REG_EXT_XTL_EN0_WPU (1 << 3)
  370. #define PMIC_PIN_REG_EXT_XTL_EN0_FUN_SEL(n) (((n)&0x3) << 4)
  371. #define PMIC_PIN_REG_EXT_XTL_EN0_FUN_WPDO (1 << 6)
  372. #define PMIC_PIN_REG_EXT_XTL_EN0_FUN_WPU (1 << 7)
  373. #define PMIC_PIN_REG_EXT_XTL_EN0_BSR_DRV(n) (((n)&0x3) << 8)
  374. // ext_xtl_en1
  375. #define PMIC_PIN_REG_EXT_XTL_EN1_SLP_OE (1 << 0)
  376. #define PMIC_PIN_REG_EXT_XTL_EN1_SLP_IE (1 << 1)
  377. #define PMIC_PIN_REG_EXT_XTL_EN1_SLP_WPDO (1 << 2)
  378. #define PMIC_PIN_REG_EXT_XTL_EN1_SLP_WPU (1 << 3)
  379. #define PMIC_PIN_REG_EXT_XTL_EN1_FUN_SEL(n) (((n)&0x3) << 4)
  380. #define PMIC_PIN_REG_EXT_XTL_EN1_FUN_WPDO (1 << 6)
  381. #define PMIC_PIN_REG_EXT_XTL_EN1_FUN_WPU (1 << 7)
  382. #define PMIC_PIN_REG_EXT_XTL_EN1_BSR_DRV(n) (((n)&0x3) << 8)
  383. // ext_xtl_en2
  384. #define PMIC_PIN_REG_EXT_XTL_EN2_SLP_OE (1 << 0)
  385. #define PMIC_PIN_REG_EXT_XTL_EN2_SLP_IE (1 << 1)
  386. #define PMIC_PIN_REG_EXT_XTL_EN2_SLP_WPDO (1 << 2)
  387. #define PMIC_PIN_REG_EXT_XTL_EN2_SLP_WPU (1 << 3)
  388. #define PMIC_PIN_REG_EXT_XTL_EN2_FUN_SEL(n) (((n)&0x3) << 4)
  389. #define PMIC_PIN_REG_EXT_XTL_EN2_FUN_WPDO (1 << 6)
  390. #define PMIC_PIN_REG_EXT_XTL_EN2_FUN_WPU (1 << 7)
  391. #define PMIC_PIN_REG_EXT_XTL_EN2_BSR_DRV(n) (((n)&0x3) << 8)
  392. // ext_xtl_en3
  393. #define PMIC_PIN_REG_EXT_XTL_EN3_SLP_OE (1 << 0)
  394. #define PMIC_PIN_REG_EXT_XTL_EN3_SLP_IE (1 << 1)
  395. #define PMIC_PIN_REG_EXT_XTL_EN3_SLP_WPDO (1 << 2)
  396. #define PMIC_PIN_REG_EXT_XTL_EN3_SLP_WPU (1 << 3)
  397. #define PMIC_PIN_REG_EXT_XTL_EN3_FUN_SEL(n) (((n)&0x3) << 4)
  398. #define PMIC_PIN_REG_EXT_XTL_EN3_FUN_WPDO (1 << 6)
  399. #define PMIC_PIN_REG_EXT_XTL_EN3_FUN_WPU (1 << 7)
  400. #define PMIC_PIN_REG_EXT_XTL_EN3_BSR_DRV(n) (((n)&0x3) << 8)
  401. // ext_xtl_en4
  402. #define PMIC_PIN_REG_EXT_XTL_EN4_SLP_OE (1 << 0)
  403. #define PMIC_PIN_REG_EXT_XTL_EN4_SLP_IE (1 << 1)
  404. #define PMIC_PIN_REG_EXT_XTL_EN4_SLP_WPDO (1 << 2)
  405. #define PMIC_PIN_REG_EXT_XTL_EN4_SLP_WPU (1 << 3)
  406. #define PMIC_PIN_REG_EXT_XTL_EN4_FUN_SEL(n) (((n)&0x3) << 4)
  407. #define PMIC_PIN_REG_EXT_XTL_EN4_FUN_WPDO (1 << 6)
  408. #define PMIC_PIN_REG_EXT_XTL_EN4_FUN_WPU (1 << 7)
  409. #define PMIC_PIN_REG_EXT_XTL_EN4_BSR_DRV(n) (((n)&0x3) << 8)
  410. // ext_xtl_en5
  411. #define PMIC_PIN_REG_EXT_XTL_EN5_SLP_OE (1 << 0)
  412. #define PMIC_PIN_REG_EXT_XTL_EN5_SLP_IE (1 << 1)
  413. #define PMIC_PIN_REG_EXT_XTL_EN5_SLP_WPDO (1 << 2)
  414. #define PMIC_PIN_REG_EXT_XTL_EN5_SLP_WPU (1 << 3)
  415. #define PMIC_PIN_REG_EXT_XTL_EN5_FUN_SEL(n) (((n)&0x3) << 4)
  416. #define PMIC_PIN_REG_EXT_XTL_EN5_FUN_WPDO (1 << 6)
  417. #define PMIC_PIN_REG_EXT_XTL_EN5_FUN_WPU (1 << 7)
  418. #define PMIC_PIN_REG_EXT_XTL_EN5_BSR_DRV(n) (((n)&0x3) << 8)
  419. // ext_xtl_en6
  420. #define PMIC_PIN_REG_EXT_XTL_EN6_SLP_OE (1 << 0)
  421. #define PMIC_PIN_REG_EXT_XTL_EN6_SLP_IE (1 << 1)
  422. #define PMIC_PIN_REG_EXT_XTL_EN6_SLP_WPDO (1 << 2)
  423. #define PMIC_PIN_REG_EXT_XTL_EN6_SLP_WPU (1 << 3)
  424. #define PMIC_PIN_REG_EXT_XTL_EN6_FUN_SEL(n) (((n)&0x3) << 4)
  425. #define PMIC_PIN_REG_EXT_XTL_EN6_FUN_WPDO (1 << 6)
  426. #define PMIC_PIN_REG_EXT_XTL_EN6_FUN_WPU (1 << 7)
  427. #define PMIC_PIN_REG_EXT_XTL_EN6_BSR_DRV(n) (((n)&0x3) << 8)
  428. // ext_xtl_en7
  429. #define PMIC_PIN_REG_EXT_XTL_EN7_SLP_OE (1 << 0)
  430. #define PMIC_PIN_REG_EXT_XTL_EN7_SLP_IE (1 << 1)
  431. #define PMIC_PIN_REG_EXT_XTL_EN7_SLP_WPDO (1 << 2)
  432. #define PMIC_PIN_REG_EXT_XTL_EN7_SLP_WPU (1 << 3)
  433. #define PMIC_PIN_REG_EXT_XTL_EN7_FUN_SEL(n) (((n)&0x3) << 4)
  434. #define PMIC_PIN_REG_EXT_XTL_EN7_FUN_WPDO (1 << 6)
  435. #define PMIC_PIN_REG_EXT_XTL_EN7_FUN_WPU (1 << 7)
  436. #define PMIC_PIN_REG_EXT_XTL_EN7_BSR_DRV(n) (((n)&0x3) << 8)
  437. #endif // _PMIC_PIN_REG_H_