hi3660.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. /*
  2. * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef HI3660_H
  7. #define HI3660_H
  8. #include <hi3660_crg.h>
  9. #include <hi3660_hkadc.h>
  10. #include <hi3660_mem_map.h>
  11. #define ASP_CFG_REG_BASE 0xE804E000
  12. #define ASP_CFG_MMBUF_CTRL_REG (ASP_CFG_REG_BASE + 0x148)
  13. #define LP_RAM_BASE 0xFFF50000
  14. #define SCTRL_REG_BASE 0xFFF0A000
  15. #define SCTRL_CONTROL_REG (SCTRL_REG_BASE + 0x000)
  16. #define SCTRL_CONTROL_SYS_MODE(x) (((x) & 0xf) << 3)
  17. #define SCTRL_CONTROL_SYS_MODE_NORMAL ((1 << 2) << 3)
  18. #define SCTRL_CONTROL_SYS_MODE_SLOW ((1 << 1) << 3)
  19. #define SCTRL_CONTROL_SYS_MODE_MASK (0xf << 3)
  20. #define SCTRL_CONTROL_MODE_CTRL_NORMAL (1 << 2)
  21. #define SCTRL_CONTROL_MODE_CTRL_SLOW (1 << 1)
  22. #define SCTRL_CONTROL_MODE_CTRL_MASK 0x7
  23. #define SCTRL_SCSYSSTAT_REG (SCTRL_REG_BASE + 0x004)
  24. #define SCTRL_DEEPSLEEPED_REG (SCTRL_REG_BASE + 0x008)
  25. #define SCTRL_EFUSE_USB_MASK (1 << 30)
  26. #define SCTRL_EFUSE_USB_PLL (1 << 30)
  27. #define SCTRL_EFUSE_USB_ABB (0 << 30)
  28. #define SCTRL_EFUSE_UFS_MASK (3 << 6)
  29. #define SCTRL_EFUSE_UFS_PLL (1 << 6)
  30. #define SCTRL_EFUSE_UFS_ABB (0 << 6)
  31. #define SCTRL_SCISOEN_REG (SCTRL_REG_BASE + 0x040)
  32. #define SCTRL_SCISODIS_REG (SCTRL_REG_BASE + 0x044)
  33. #define SCISO_MMBUFISO (1 << 3)
  34. #define SCTRL_SCPWREN_REG (SCTRL_REG_BASE + 0x060)
  35. #define SCPWREN_MMBUFPWREN (1 << 3)
  36. #define SCTRL_PLL_CTRL0_REG (SCTRL_REG_BASE + 0x100)
  37. #define SCTRL_PLL0_POSTDIV2(x) (((x) & 0x7) << 23)
  38. #define SCTRL_PLL0_POSTDIV1(x) (((x) & 0x7) << 20)
  39. #define SCTRL_PLL0_FBDIV(x) (((x) & 0xfff) << 8)
  40. #define SCTRL_PLL0_REFDIV(x) (((x) & 0x3f) << 2)
  41. #define SCTRL_PLL0_EN (1 << 0)
  42. #define SCTRL_PLL_CTRL1_REG (SCTRL_REG_BASE + 0x104)
  43. #define SCTRL_PLL0_CLK_NO_GATE (1 << 26)
  44. #define SCTRL_PLL0_CFG_VLD (1 << 25)
  45. #define SCTRL_PLL0_FRACDIV(x) ((x) & 0xFFFFFF)
  46. #define SCTRL_PLL_STAT_REG (SCTRL_REG_BASE + 0x10C)
  47. #define SCTRL_PLL0_STAT (1 << 0)
  48. #define SCTRL_SCPEREN0_REG (SCTRL_REG_BASE + 0x160)
  49. #define SCTRL_SCPERDIS0_REG (SCTRL_REG_BASE + 0x164)
  50. #define SCTRL_SCPERSTAT0_REG (SCTRL_REG_BASE + 0x168)
  51. #define SCTRL_SCPEREN1_REG (SCTRL_REG_BASE + 0x170)
  52. #define SCTRL_SCPERDIS1_REG (SCTRL_REG_BASE + 0x174)
  53. #define SCTRL_SCPEREN1_REG (SCTRL_REG_BASE + 0x170)
  54. #define SCTRL_SCPERDIS1_REG (SCTRL_REG_BASE + 0x174)
  55. #define SCPEREN1_WAIT_DDR_SELFREFRESH_DONE_BYPASS (1u << 31)
  56. #define SCPEREN_GT_PCLK_MMBUFCFG (1 << 25)
  57. #define SCPEREN_GT_PCLK_MMBUF (1 << 23)
  58. #define SCPEREN_GT_ACLK_MMBUF (1 << 22)
  59. #define SCPEREN_GT_CLK_NOC_AOBUS2MMBUF (1 << 6)
  60. #define SCTRL_SCPEREN2_REG (SCTRL_REG_BASE + 0x190)
  61. #define SCTRL_SCPERDIS2_REG (SCTRL_REG_BASE + 0x194)
  62. #define SCTRL_SCPERSTAT2_REG (SCTRL_REG_BASE + 0x198)
  63. #define SCTRL_SCPERRSTEN0_REG (SCTRL_REG_BASE + 0x200)
  64. #define SCTRL_SCPERRSTDIS0_REG (SCTRL_REG_BASE + 0x204)
  65. #define SCTRL_SCPERRSTSTAT0_REG (SCTRL_REG_BASE + 0x208)
  66. #define SCTRL_SCPERRSTEN1_REG (SCTRL_REG_BASE + 0x20C)
  67. #define SCTRL_SCPERRSTDIS1_REG (SCTRL_REG_BASE + 0x210)
  68. #define SCTRL_SCPERRSTSTAT1_REG (SCTRL_REG_BASE + 0x214)
  69. #define IP_RST_MMBUFCFG (1 << 12)
  70. #define IP_RST_MMBUF (1 << 11)
  71. #define SCTRL_SCPERRSTEN2_REG (SCTRL_REG_BASE + 0x218)
  72. #define SCTRL_SCPERRSTDIS2_REG (SCTRL_REG_BASE + 0x21C)
  73. #define SCTRL_SCPERRSTSTAT2_REG (SCTRL_REG_BASE + 0x220)
  74. #define SCTRL_SCCLKDIV2_REG (SCTRL_REG_BASE + 0x258)
  75. #define SEL_CLK_MMBUF_MASK (0x3 << 8)
  76. #define SEL_CLK_MMBUF_PLL0 (0x3 << 8)
  77. #define SCCLKDIV2_GT_PCLK_MMBUF (1 << 7)
  78. #define SCTRL_SCCLKDIV4_REG (SCTRL_REG_BASE + 0x260)
  79. #define GT_MMBUF_SYS (1 << 13)
  80. #define GT_MMBUF_FLL (1 << 12)
  81. #define GT_PLL_CLK_MMBUF (1 << 11)
  82. #define SCTRL_SCCLKDIV6_REG (SCTRL_REG_BASE + 0x268)
  83. #define SCTRL_SCPERCTRL7_REG (SCTRL_REG_BASE + 0x31C)
  84. #define SCTRL_SCPERSTAT6_REG (SCTRL_REG_BASE + 0x378)
  85. #define SCTRL_SCINNERSTAT_REG (SCTRL_REG_BASE + 0x3A0)
  86. #define EMMC_UFS_SEL (1 << 15)
  87. #define SCTRL_BAK_DATA0_REG (SCTRL_REG_BASE + 0x40C)
  88. #define SCTRL_BAK_DATA4_REG (SCTRL_REG_BASE + 0x41C)
  89. #define SCTRL_LPMCU_CLKEN_REG (SCTRL_REG_BASE + 0x480)
  90. #define SCTRL_LPMCU_CLKDIS_REG (SCTRL_REG_BASE + 0x484)
  91. #define SCTRL_LPMCU_RSTEN_REG (SCTRL_REG_BASE + 0x500)
  92. #define SCTRL_LPMCU_RSTDIS_REG (SCTRL_REG_BASE + 0x504)
  93. #define DDRC_SOFT_BIT (1 << 6)
  94. #define DDRC_CLK_BIT (1 << 5)
  95. #define SCTRL_SCPEREN0_SEC_REG (SCTRL_REG_BASE + 0x900)
  96. #define SCTRL_SCPERDIS0_SEC_REG (SCTRL_REG_BASE + 0x904)
  97. #define MMBUF_SEC_CTRL_MASK (0xfff << 20)
  98. #define MMBUF_SEC_CTRL(x) (((x) & 0xfff) << 20)
  99. #define SCTRL_PERRSTEN1_SEC_REG (SCTRL_REG_BASE + 0xA50)
  100. #define SCTRL_PERRSTDIS1_SEC_REG (SCTRL_REG_BASE + 0xA54)
  101. #define SCTRL_PERRSTSTAT1_SEC_REG (SCTRL_REG_BASE + 0xA58)
  102. #define RST_ASP_SUBSYS_BIT (1 << 0)
  103. #define SCTRL_PERRSTEN2_SEC_REG (SCTRL_REG_BASE + 0xB50)
  104. #define SCTRL_PERRSTDIS2_SEC_REG (SCTRL_REG_BASE + 0xB54)
  105. #define SCTRL_PERRSTSTAT2_SEC_REG (SCTRL_REG_BASE + 0xB58)
  106. #define SCTRL_HISEECLKDIV_REG (SCTRL_REG_BASE + 0xC28)
  107. #define SC_SEL_HISEE_PLL_MASK (1 << 4)
  108. #define SC_SEL_HISEE_PLL0 (1 << 4)
  109. #define SC_SEL_HISEE_PLL2 (0 << 4)
  110. #define SC_DIV_HISEE_PLL_MASK (7 << 16)
  111. #define SC_DIV_HISEE_PLL(x) ((x) & 0x7)
  112. #define SCTRL_SCSOCID0_REG (SCTRL_REG_BASE + 0xE00)
  113. #define PMC_REG_BASE 0xFFF31000
  114. #define PMC_PPLL1_CTRL0_REG (PMC_REG_BASE + 0x038)
  115. #define PMC_PPLL1_CTRL1_REG (PMC_REG_BASE + 0x03C)
  116. #define PMC_PPLL2_CTRL0_REG (PMC_REG_BASE + 0x040)
  117. #define PMC_PPLL2_CTRL1_REG (PMC_REG_BASE + 0x044)
  118. #define PMC_PPLL3_CTRL0_REG (PMC_REG_BASE + 0x048)
  119. #define PMC_PPLL3_CTRL1_REG (PMC_REG_BASE + 0x04C)
  120. #define PPLLx_LOCK (1 << 26)
  121. #define PPLLx_WITHOUT_CLK_GATE (1 << 26)
  122. #define PPLLx_CFG_VLD (1 << 25)
  123. #define PPLLx_INT_MOD (1 << 24)
  124. #define PPLLx_POSTDIV2_MASK (0x7 << 23)
  125. #define PPLLx_POSTDIV2(x) (((x) & 0x7) << 23)
  126. #define PPLLx_POSTDIV1_MASK (0x7 << 20)
  127. #define PPLLx_POSTDIV1(x) (((x) & 0x7) << 20)
  128. #define PPLLx_FRACDIV_MASK (0x00FFFFFF)
  129. #define PPLLx_FRACDIV(x) ((x) & 0x00FFFFFF)
  130. #define PPLLx_FBDIV_MASK (0xfff << 8)
  131. #define PPLLx_FBDIV(x) (((x) & 0xfff) << 8)
  132. #define PPLLx_REFDIV_MASK (0x3f << 2)
  133. #define PPLLx_REFDIV(x) (((x) & 0x3f) << 2)
  134. #define PPLLx_BP (1 << 1)
  135. #define PPLLx_EN (1 << 0)
  136. #define PMC_DDRLP_CTRL_REG (PMC_REG_BASE + 0x30C)
  137. #define DDRC_CSYSREQ_CFG(x) ((x) & 0xF)
  138. #define PMC_NOC_POWER_IDLEREQ_REG (PMC_REG_BASE + 0x380)
  139. #define PMC_NOC_POWER_IDLEREQ_IVP (1 << 14)
  140. #define PMC_NOC_POWER_IDLEREQ_DSS (1 << 13)
  141. #define PMC_NOC_POWER_IDLEREQ_VENC (1 << 11)
  142. #define PMC_NOC_POWER_IDLEREQ_VDEC (1 << 10)
  143. #define PMC_NOC_POWER_IDLEREQ_ISP (1 << 5)
  144. #define PMC_NOC_POWER_IDLEREQ_VCODEC (1 << 4)
  145. #define DDRPHY_BYPASS_MODE (1 << 0)
  146. #define PMC_NOC_POWER_IDLEACK_REG (PMC_REG_BASE + 0x384)
  147. #define PMC_NOC_POWER_IDLE_REG (PMC_REG_BASE + 0x388)
  148. #define PMU_SSI0_REG_BASE 0xFFF34000
  149. #define PMU_SSI0_LDO8_CTRL0_REG (PMU_SSI0_REG_BASE + (0x68 << 2))
  150. #define LDO8_CTRL0_EN_1_8V 0x02
  151. #define PMU_SSI0_CLK_TOP_CTRL7_REG (PMU_SSI0_REG_BASE + (0x10C << 2))
  152. #define NP_XO_ABB_DIG (1 << 1)
  153. #define LP_CONFIG_REG_BASE 0xFFF3F000
  154. #define DMAC_BASE 0xFDF30000
  155. #define CCI400_REG_BASE 0xE8100000
  156. #define CCI400_SL_IFACE3_CLUSTER_IX 0
  157. #define CCI400_SL_IFACE4_CLUSTER_IX 1
  158. #define GICD_REG_BASE 0xE82B1000
  159. #define GICC_REG_BASE 0xE82B2000
  160. /*
  161. * GIC400 interrupt handling related constants
  162. */
  163. #define IRQ_SEC_PHY_TIMER 29
  164. #define IRQ_SEC_SGI_0 8
  165. #define IRQ_SEC_SGI_1 9
  166. #define IRQ_SEC_SGI_2 10
  167. #define IRQ_SEC_SGI_3 11
  168. #define IRQ_SEC_SGI_4 12
  169. #define IRQ_SEC_SGI_5 13
  170. #define IRQ_SEC_SGI_6 14
  171. #define IRQ_SEC_SGI_7 15
  172. #define IRQ_SEC_SGI_8 16
  173. #define IPC_REG_BASE 0xE896A000
  174. #define IPC_BASE (IPC_REG_BASE)
  175. #define IOMG_REG_BASE 0xE896C000
  176. /* GPIO46: HUB 3.3V enable. active low */
  177. #define IOMG_044_REG (IOMG_REG_BASE + 0x0B0)
  178. #define IOMG_UART5_RX_REG (IOMG_REG_BASE + 0x0BC)
  179. #define IOMG_UART5_TX_REG (IOMG_REG_BASE + 0x0C0)
  180. #define IOCG_REG_BASE 0xE896C800
  181. /* GPIO005: PMIC SSI. (2 << 4) */
  182. #define IOCG_006_REG (IOCG_REG_BASE + 0x018)
  183. #define TIMER9_REG_BASE 0xE8A00000
  184. #define WDT0_REG_BASE 0xE8A06000
  185. #define WDT1_REG_BASE 0xE8A07000
  186. #define WDT_CONTROL_OFFSET 0x008
  187. #define WDT_LOCK_OFFSET 0xC00
  188. #define WDT_UNLOCK 0x1ACCE551
  189. #define WDT_LOCKED 1
  190. #define PCTRL_REG_BASE 0xE8A09000
  191. #define PCTRL_PERI_CTRL3_REG (PCTRL_REG_BASE + 0x010)
  192. #define PCTRL_PERI_CTRL24_REG (PCTRL_REG_BASE + 0x064)
  193. #define GPIO0_BASE UL(0xE8A0B000)
  194. #define GPIO1_BASE UL(0xE8A0C000)
  195. #define GPIO2_BASE UL(0xE8A0D000)
  196. #define GPIO3_BASE UL(0xE8A0E000)
  197. #define GPIO4_BASE UL(0xE8A0F000)
  198. #define GPIO5_BASE UL(0xE8A10000)
  199. #define GPIO6_BASE UL(0xE8A11000)
  200. #define GPIO7_BASE UL(0xE8A12000)
  201. #define GPIO8_BASE UL(0xE8A13000)
  202. #define GPIO9_BASE UL(0xE8A14000)
  203. #define GPIO10_BASE UL(0xE8A15000)
  204. #define GPIO11_BASE UL(0xE8A16000)
  205. #define GPIO12_BASE UL(0xE8A17000)
  206. #define GPIO13_BASE UL(0xE8A18000)
  207. #define GPIO14_BASE UL(0xE8A19000)
  208. #define GPIO15_BASE UL(0xE8A1A000)
  209. #define GPIO16_BASE UL(0xE8A1B000)
  210. #define GPIO17_BASE UL(0xE8A1C000)
  211. #define GPIO20_BASE UL(0xE8A1F000)
  212. #define GPIO21_BASE UL(0xE8A20000)
  213. #define GPIO22_BASE UL(0xFFF0B000)
  214. #define GPIO23_BASE UL(0xFFF0C000)
  215. #define GPIO24_BASE UL(0xFFF0D000)
  216. #define GPIO25_BASE UL(0xFFF0E000)
  217. #define GPIO26_BASE UL(0xFFF0F000)
  218. #define GPIO27_BASE UL(0xFFF10000)
  219. #define GPIO28_BASE UL(0xFFF1D000)
  220. #define TZC_REG_BASE 0xE8A21000
  221. #define TZC_STAT0_REG (TZC_REG_BASE + 0x800)
  222. #define TZC_EN0_REG (TZC_REG_BASE + 0x804)
  223. #define TZC_DIS0_REG (TZC_REG_BASE + 0x808)
  224. #define TZC_STAT1_REG (TZC_REG_BASE + 0x80C)
  225. #define TZC_EN1_REG (TZC_REG_BASE + 0x810)
  226. #define TZC_DIS1_REG (TZC_REG_BASE + 0x814)
  227. #define TZC_STAT2_REG (TZC_REG_BASE + 0x818)
  228. #define TZC_EN2_REG (TZC_REG_BASE + 0x81C)
  229. #define TZC_DIS2_REG (TZC_REG_BASE + 0x820)
  230. #define TZC_STAT3_REG (TZC_REG_BASE + 0x824)
  231. #define TZC_EN3_REG (TZC_REG_BASE + 0x828)
  232. #define TZC_DIS3_REG (TZC_REG_BASE + 0x82C)
  233. #define TZC_STAT4_REG (TZC_REG_BASE + 0x830)
  234. #define TZC_EN4_REG (TZC_REG_BASE + 0x834)
  235. #define TZC_DIS4_REG (TZC_REG_BASE + 0x838)
  236. #define TZC_STAT5_REG (TZC_REG_BASE + 0x83C)
  237. #define TZC_EN5_REG (TZC_REG_BASE + 0x840)
  238. #define TZC_DIS5_REG (TZC_REG_BASE + 0x844)
  239. #define TZC_STAT6_REG (TZC_REG_BASE + 0x848)
  240. #define TZC_EN6_REG (TZC_REG_BASE + 0x84C)
  241. #define TZC_DIS6_REG (TZC_REG_BASE + 0x850)
  242. #define TZC_STAT7_REG (TZC_REG_BASE + 0x854)
  243. #define TZC_EN7_REG (TZC_REG_BASE + 0x858)
  244. #define TZC_DIS7_REG (TZC_REG_BASE + 0x85C)
  245. #define TZC_STAT8_REG (TZC_REG_BASE + 0x860)
  246. #define TZC_EN8_REG (TZC_REG_BASE + 0x864)
  247. #define TZC_DIS8_REG (TZC_REG_BASE + 0x868)
  248. #define MMBUF_BASE 0xEA800000
  249. #define ACPU_DMCPACK0_BASE 0xEA900000
  250. #define ACPU_DMCPACK1_BASE 0xEA920000
  251. #define ACPU_DMCPACK2_BASE 0xEA940000
  252. #define ACPU_DMCPACK3_BASE 0xEA960000
  253. #define UART5_REG_BASE 0xFDF05000
  254. #define USB3OTG_REG_BASE 0xFF100000
  255. #define UFS_REG_BASE 0xFF3B0000
  256. #define UFS_SYS_REG_BASE 0xFF3B1000
  257. #define UFS_SYS_PSW_POWER_CTRL_REG (UFS_SYS_REG_BASE + 0x004)
  258. #define UFS_SYS_PHY_ISO_EN_REG (UFS_SYS_REG_BASE + 0x008)
  259. #define UFS_SYS_HC_LP_CTRL_REG (UFS_SYS_REG_BASE + 0x00C)
  260. #define UFS_SYS_PHY_CLK_CTRL_REG (UFS_SYS_REG_BASE + 0x010)
  261. #define UFS_SYS_PSW_CLK_CTRL_REG (UFS_SYS_REG_BASE + 0x014)
  262. #define UFS_SYS_CLOCK_GATE_BYPASS_REG (UFS_SYS_REG_BASE + 0x018)
  263. #define UFS_SYS_RESET_CTRL_EN_REG (UFS_SYS_REG_BASE + 0x01C)
  264. #define UFS_SYS_MONITOR_HH_REG (UFS_SYS_REG_BASE + 0x03C)
  265. #define UFS_SYS_UFS_SYSCTRL_REG (UFS_SYS_REG_BASE + 0x05C)
  266. #define UFS_SYS_UFS_DEVICE_RESET_CTRL_REG (UFS_SYS_REG_BASE + 0x060)
  267. #define UFS_SYS_UFS_APB_ADDR_MASK_REG (UFS_SYS_REG_BASE + 0x064)
  268. #define BIT_UFS_PSW_ISO_CTRL (1 << 16)
  269. #define BIT_UFS_PSW_MTCMOS_EN (1 << 0)
  270. #define BIT_UFS_REFCLK_ISO_EN (1 << 16)
  271. #define BIT_UFS_PHY_ISO_CTRL (1 << 0)
  272. #define BIT_SYSCTRL_LP_ISOL_EN (1 << 16)
  273. #define BIT_SYSCTRL_PWR_READY (1 << 8)
  274. #define BIT_SYSCTRL_REF_CLOCK_EN (1 << 24)
  275. #define MASK_SYSCTRL_REF_CLOCK_SEL (3 << 8)
  276. #define MASK_SYSCTRL_CFG_CLOCK_FREQ (0xFF)
  277. #define BIT_SYSCTRL_PSW_CLK_EN (1 << 4)
  278. #define MASK_UFS_CLK_GATE_BYPASS (0x3F)
  279. #define BIT_SYSCTRL_LP_RESET_N (1 << 0)
  280. #define BIT_UFS_REFCLK_SRC_SE1 (1 << 0)
  281. #define MASK_UFS_SYSCTRL_BYPASS (0x3F << 16)
  282. #define MASK_UFS_DEVICE_RESET (1 << 16)
  283. #define BIT_UFS_DEVICE_RESET (1 << 0)
  284. #define GPIO18_BASE UL(0xFF3B4000)
  285. #define GPIO19_BASE UL(0xFF3B5000)
  286. #define IOMG_FIX_REG_BASE 0xFF3B6000
  287. /* GPIO150: LED */
  288. #define IOMG_FIX_006_REG (IOMG_FIX_REG_BASE + 0x018)
  289. /* GPIO151: LED */
  290. #define IOMG_FIX_007_REG (IOMG_FIX_REG_BASE + 0x01C)
  291. #define IOMG_AO_REG_BASE 0xFFF11000
  292. /* GPIO189: LED */
  293. #define IOMG_AO_011_REG (IOMG_AO_REG_BASE + 0x02C)
  294. /* GPIO190: LED */
  295. #define IOMG_AO_012_REG (IOMG_AO_REG_BASE + 0x030)
  296. /* GPIO202: type C enable. active low */
  297. #define IOMG_AO_023_REG (IOMG_AO_REG_BASE + 0x05C)
  298. /* GPIO206: USB switch. active low */
  299. #define IOMG_AO_026_REG (IOMG_AO_REG_BASE + 0x068)
  300. /* GPIO219: PD interrupt. pull up */
  301. #define IOMG_AO_039_REG (IOMG_AO_REG_BASE + 0x09C)
  302. /* GPIO213: PCIE_CLKREQ_N */
  303. #define IOMG_AO_033_REG (IOMG_AO_REG_BASE + 0x084)
  304. #define IOCG_AO_REG_BASE 0xFFF1187C
  305. /* GPIO219: PD interrupt. pull up */
  306. #define IOCG_AO_043_REG (IOCG_AO_REG_BASE + 0x030)
  307. #define EDMAC_BASE 0xfdf30000
  308. #define EDMAC_SEC_CTRL (EDMAC_BASE + 0x694)
  309. #define EDMAC_AXI_CONF(x) (EDMAC_BASE + 0x820 + (x << 6))
  310. #define EDMAC_SEC_CTRL_INTR_SEC (1 << 1)
  311. #define EDMAC_SEC_CTRL_GLOBAL_SEC (1 << 0)
  312. #define EDMAC_CHANNEL_NUMS 16
  313. #define IOMCU_DMAC_BASE 0xffd77000
  314. #define IOMCU_DMAC_SEC_CTRL (IOMCU_DMAC_BASE + 0x694)
  315. #define IOMCU_DMAC_AXI_CONF(x) (IOMCU_DMAC_BASE + 0x820 + ((x) << 6))
  316. #define IOMCU_DMAC_AXI_CONF_ARPROT_NS (1 << 6)
  317. #define IOMCU_DMAC_AXI_CONF_AWPROT_NS (1 << 18)
  318. #define IOMCU_DMAC_SEC_CTRL_INTR_SEC (1 << 1)
  319. #define IOMCU_DMAC_SEC_CTRL_GLOBAL_SEC (1 << 0)
  320. #define IOMCU_DMAC_CHANNEL_NUMS 8
  321. #endif /* HI3660_H */