SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
reg-ncat.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * (C) Copyright 2013-2025
4 * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
5 *
6 * original from bsp uboot defines
7 */
8
9#ifndef __SUN65IW1_REG_NCAT_H__
10#define __SUN65IW1_REG_NCAT_H__
11
12#define SUNXI_FIXS_BROM_BASE 0x00000000
13#define SUNXI_HS_BROM_BASE 0x00010000
14#define SUNXI_NS_BROM_BASE 0x00015000
15#define SUNXI_SRAM_A2_BASE 0x00044000
16#define SUNXI_GPU_BASE 0x01800000
17#define SUNXI_VE0_BASE 0x01C0E000
18#define SUNXI_IOMMU_BASE 0x02000000
19#define SUNXI_NSI_BASE 0x02400000
20#define SUNXI_NSI_CPU_BASE 0x02410000
21#define SUNXI_NPD_BASE 0x02430000
22#define SUNXI_AXI_MONITOR_GPU_BASE 0x02500000
23#define SUNXI_AXI_MONITOR_CE_SYS_BASE 0x02501000
24#define SUNXI_AXI_MONITOR_HSI_BASE 0x02502000
25#define SUNXI_AXI_MONITOR_GMAC0_BASE 0x02503000
26#define SUNXI_AHB_MONITOR_CPU_BASE 0x02510000
27#define SUNXI_AHB_MONITOR_DCU_BASE 0x02511000
28#define SUNXI_IR_TX_BASE 0x02800000
29#define SUNXI_IR_RX0_BASE 0x02808000
30#define SUNXI_PWM0_BASE 0x02810000
31#define SUNXI_TSENSOR_BASE 0x02818000
32#define SUNXI_GPADC_BASE 0x02820000
33#define SUNXI_LRADC_BASE 0x02828000
34#define SUNXI_TPADC_BASE 0x02829000
35#define SUNXI_LEDC_BASE 0x02830000
36#define SUNXI_I2S0_BASE 0x02900000
37#define SUNXI_I2S1_BASE 0x02901000
38#define SUNXI_I2S2_BASE 0x02902000
39#define SUNXI_I2S3_BASE 0x02903000
40#define SUNXI_AUDIOCODEC0_BASE 0x02908000
41#define SUNXI_AUDIOCODEC1_BASE 0x02909000
42#define SUNXI_DMIC_BASE 0x02910000
43#define SUNXI_OWA0_BASE 0x02918000
44#define SUNXI_TWI0_BASE 0x02A00000
45#define SUNXI_TWI1_BASE 0x02A01000
46#define SUNXI_TWI2_BASE 0x02A02000
47#define SUNXI_TWI3_BASE 0x02A03000
48#define SUNXI_TWI4_BASE 0x02A04000
49#define SUNXI_TWI5_BASE 0x02A05000
50#define SUNXI_UART0_BASE 0x02B00000
51#define SUNXI_UART1_BASE 0x02B01000
52#define SUNXI_UART2_BASE 0x02B02000
53#define SUNXI_UART3_BASE 0x02B03000
54#define SUNXI_UART4_BASE 0x02B04000
55#define SUNXI_UART5_BASE 0x02B05000
56#define SUNXI_UART6_BASE 0x02B06000
57#define SUNXI_UART7_BASE 0x02B07000
58#define SUNXI_SPI0_BASE 0x02C00000
59#define SUNXI_SPI1_BASE 0x02C01000
60#define SUNXI_SPI2_BASE 0x02C02000
61#define SUNXI_GPIO_BASE 0x03000000
62#define SUNXI_CCU_BASE 0x03008000
63#define SUNXI_WDT_CPUX_BASE 0x03010000
64#define SUNXI_INT_GROUP_BASE 0x03018000
65#define SUNXI_TIMER1_BASE 0x0320C000
66#define SUNXI_SYSCTRL_BASE 0x03200000
67#define SUNXI_TIMER0_BASE 0x03208000
68#define SUNXI_MSGBOX_CPUX_BASE 0x03210000
69#define SUNXI_MSGBOX_CPUS_BASE 0x03211000
70#define SUNXI_SPINLOCK_BASE 0x03220000
71#define SUNXI_DMA0_BASE 0x03228000
72#define SUNXI_DCU_BASE 0x03230000
73#define SUNXI_SPC_BASE 0x03400000
74#define SUNXI_SID_BASE 0x03408000
75#define SUNXI_CE_SYS_BASE 0x03412000
76#define SUNXI_SMHC0_BASE 0x04008000
77#define SUNXI_SMHC1_BASE 0x04009000
78#define SUNXI_SMHC2_BASE 0x0400A000
79#define SUNXI_CSIC_BASE 0x04800000
80#define SUNXI_ISP_BASE 0x04900000
81#define SUNXI_DE0_BASE 0x05000000
82#define SUNXI_G2D_BASE 0x05440000
83#define SUNXI_EINK_BASE 0x05480000
84#define SUNXI_VIDEO_OUT0_SYS_BASE 0x05A00000
85#define SUNXI_TCON_LCD0_BASE 0x05A08000
86#define SUNXI_MIPI_DSI0_BASE 0x05A10000
87#define SUNXI_VIDEO_OUT1_SYS_BASE 0x05C00000
88#define SUNXI_TCON_TV0_BASE 0x05C08000
89#define SUNXI_EDP0_BASE 0x05C10000
90#define SUNXI_CPUIDLE_BASE 0x07000000
91#define SUNXI_DVFS_AVS_BASE 0x07010000
92#define SUNXI_CPUS_CFG_BASE 0x07018000
93#define SUNXI_CPUS_CLIC_BASE 0x07019000
94#define SUNXI_S_SPC_BASE 0x07020000
95#define SUNXI_TZMA_BASE 0x07028000
96#define SUNXI_S_PRCM_BASE 0x07030000
97#define SUNXI_WDT_CPUS_BASE 0x07040000
98#define SUNXI_TWD_BASE 0x07048000
99#define SUNXI_S_GPIO_BASE 0x07058000
100#define SUNXI_PPU_BASE 0x07060000
101#define SUNXI_S_PWM0_BASE 0x070A0000
102#define SUNXI_S_IR_RX_BASE 0x070A8000
103#define SUNXI_S_UART0_BASE 0x07100000
104#define SUNXI_S_UART1_BASE 0x07101000
105#define SUNXI_S_TWI0_BASE 0x07108000
106#define SUNXI_S_TWI1_BASE 0x07109000
107#define SUNXI_S_TWI2_BASE 0x0710A000
108#define SUNXI_SYSRTC_BASE 0x07200000
109#define SUNXI_S_TIMER0_BASE 0x07208000
110#define SUNXI_S_SPI0_BASE 0x07280000
111#define SUNXI_GIC_BASE 0x08000000
112#define SUNXI_CPUX_SYS_DP_BASE 0x08100000
113#define SUNXI_CPUX_PLL_CFG_BASE_BASE 0x08200000
114#define SUNXI_CPUX_SUBSYS_CTRL_BASE 0x08210000
115#define SUNXI_CPUX_TIMESTAMP_STA_BASE 0x08220000
116#define SUNXI_CPUX_TIMESTAMP_CTRL_BASE 0x08230000
117#define SUNXI_CPUX_CXCTI_BASE 0x08350000
118#define SUNXI_CPUX_CLU0_CFG_BASE 0x08810000
119#define SUNXI_CPUX_CLU0_DEBUG_BASE_BASE 0x08C00000
120#define SUNXI_CPUX_CLU1_CFG_BASE 0x09010000
121#define SUNXI_CPUX_CLU1_DEBUG_BASE_BASE 0x09400000
122#define SUNXI_CPUX_CLU2_CFG_BASE 0x09810000
123#define SUNXI_CPUX_CLU2_DEBUG_BASE_BASE 0x09C00000
124#define SUNXI_DRAMC_BASE 0x0A000000
125#define SUNXI_DRAMC_SMC_BASE 0x0A000000
126#define SUNXI_DRAMC_COMMON_BASE 0x0A010000
127#define SUNXI_DRAMC_DDRC_BASE 0x0A020000
128#define SUNXI_DRAMC_PHY_BASE 0x0A030000
129#define SUNXI_HSI_SYS_BASE 0x0C000000
130#define SUNXI_USB2P0_SYS_BASE 0x0C000000
131#define SUNXI_USB2P0_PHY_BASE 0x0C000000
132#define SUNXI_USB2P0_SYS_DIG_BASE 0x0C080000
133#define SUNXI_USB0_BASE 0x0C100000
134#define SUNXI_USB1_BASE 0x0C200000
135#define SUNXI_USB2_BASE 0x0C400000
136#define SUNXI_PCIE0_BASE 0x0C800000
137#define SUNXI_HSI_SYS_DIS_APP_BASE 0x0DC80000
138#define SUNXI_HSI_COMB0_PHY_BASE 0x0DD00000
139#define SUNXI_GMAC0_BASE 0x0DE00000
140
141#define CONFIG_SYS_SRAMA2_BASE (SUNXI_SRAM_A2_BASE)
142#define CONFIG_SYS_SRAMA2_SIZE (0x28000)
143
144#define SUNXI_PIO_BASE (SUNXI_GPIO_BASE)
145#define SUNXI_R_PIO_BASE (SUNXI_S_GPIO_BASE)
146#define SUNXI_CCM_BASE (SUNXI_CCU_BASE)
147#define SUNXI_DMA_BASE (SUNXI_DMA0_BASE)
148#define SUNXI_CE_BASE (SUNXI_CE_SYS_BASE)
149#define SUNXI_SS_BASE (SUNXI_CE_BASE)
150#define SUNXI_CPUXCFG_BASE (SUNXI_CPU_SUBSYS_CTRL_BASE)
151#define SUNXI_SYSCRL_BASE (SUNXI_SYSCTRL_BASE)
152#define SUNXI_KEYADC_BASE (SUNXI_LRADC_BASE)
153#define SUNXI_RPRCM_BASE (SUNXI_S_PRCM_BASE)
154#define SUNXI_RPWM_BASE (SUNXI_R_PWM_BASE)
155#define SUNXI_RPIO_BASE (SUNXI_S_GPIO_BASE)
156
157#define SUNXI_RTWI_BASE (SUNXI_S_TWI0_BASE)
158#define SUNXI_RTWI_BRG_REG (SUNXI_RPRCM_BASE + 0x019c)
159#define SUNXI_RTWI0_RST_BIT (16)
160#define SUNXI_RTWI0_GATING_BIT (0)
161#define SUNXI_RST_BIT (16)
162#define SUNXI_GATING_BIT (0)
163#define SUNXI_RTC_BASE SUNXI_SYSRTC_BASE
164#define SUNXI_RTC_DATA_BASE (SUNXI_SYSRTC_BASE + 0x100)
165#define SUNXI_SMC_BASE (SUNXI_DRAMC_BASE)
166#define SUNXI_RCPUCFG_BASE (SUNXI_CPUS_CFG_BASE)
167#define SUNXI_CCI_BASE (SUNXI_CPUX_SYS_DP_BASE)
168#define SUNXI_TIMESTAMP_CTRL_BASE (SUNXI_CPUX_TIMESTAMP_CTRL_BASE)
169#define SUNXI_CPU_SUBSYS_CTRL_BASE (SUNXI_CPUX_SUBSYS_CTRL_BASE)
170
171/* use for usb correct */
172#define VDD_ADDA_OFF_GATING (9)
173#define CAL_ANA_EN (1)
174#define CAL_EN (0)
175
176#define RVBARADDR0_L (SUNXI_CPUXCFG_BASE + 0x44)
177#define RVBARADDR0_H (SUNXI_CPUXCFG_BASE + 0x48)
178
179#define SRAM_CONTRL_REG0 (SUNXI_SYSCRL_BASE + 0x0)
180#define SRAM_CONTRL_REG1 (SUNXI_SYSCRL_BASE + 0x4)
181
182#define GPIO_BIAS_MAX_LEN (32)
183#define GPIO_BIAS_MAIN_NAME "gpio_bias"
184#define GPIO_POW_MODE_REG (0x0380)
185#define GPIO_POW_MS_CTL (0x0384)
186#define GPIO_POW_MODE_VAL_REG (0x0388)
187#define GPIO_3_3V_MODE 0
188#define GPIO_1_8V_MODE 1
189
190/* CCI related constants */
191#define PLAT_ARM_CCI_BASE SUNXI_CCI_BASE
192#define PLAT_ARM_CCI_CLUSTER0_SL_IFACE_IX 0
193#define PLAT_ARM_CCI_CLUSTER1_SL_IFACE_IX 1
194#define PLAT_ARM_CCI_CLUSTER2_SL_IFACE_IX 2
195
196#define SUNXI_SID_SRAM_BASE (SUNXI_SID_BASE + 0x200)
197
198#define SUNXI_SOC_VER_REG (SUNXI_SYSCTRL_BASE + 0x24)
199#define SUNXI_SOC_VER_MASK (0x7)
200
201#define SID_RES0_1_BASE (SUNXI_SID_BASE + 0x240)
202#define RESCAL_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x160)
203
204#define INT_DSI_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x170)
205#define INT_CSI_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x174)
206#define INT_USB_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x178)
207
208#define INT_EDP_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x180)
209#define INT_HS_COMBO_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x184)
210#define INT_DDR_RES_CTRL_REG (SUNXI_SYSCTRL_BASE + 0x188)
211
212#endif// __SUN65IW1_REG_NCAT_H__