SyterKit
0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
include
drivers
chips
sun55iw3
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 __SUN55IW3_REG_NCAT_H__
10
#define __SUN55IW3_REG_NCAT_H__
11
12
#define SUNXI_N_BROM_BASE 0x00000000
13
#define SUNXI_S_BROM_BASE 0x00000000
14
#define SUNXI_DSP0_IRAM_BASE 0x00020000
15
#define SUNXI_DSP0_DRAM0_BASE 0x00030000
16
#define SUNXI_DSP0_DRAM1_BASE 0x00038000
17
#define SUNXI_SRAM_A2_BASE 0x00040000
18
#define SUNXI_DSP0_IRAM_LOCAL_SRAM__BASE 0x00400000
19
#define SUNXI_DSP0_DRAM0_LOCAL_SRAM__BASE 0x00420000
20
#define SUNXI_DSP0_DRAM1_LOCAL_SRAM__BASE 0x00440000
21
#define SUNXI_GPU_BASE 0x01800000
22
#define SUNXI_VE3_BASE 0x01C0F000
23
#define SUNXI_GPIO_BASE 0x02000000
24
#define SUNXI_SPC_BASE 0x02000800
25
#define SUNXI_PWM_BASE 0x02000C00
26
#define SUNXI_CCMU_BASE 0x02001000
27
#define SUNXI_IRTX_BASE 0x02003000
28
#define SUNXI_IRRX_BASE 0x02005000
29
#define SUNXI_LEDC_BASE 0x02008000
30
#define SUNXI_GPADC_BASE 0x02009000
31
#define SUNXI_THS_BASE 0x02009400
32
#define SUNXI_LRADC_BASE 0x02009800
33
#define SUNXI_IOMMU_BASE 0x02010000
34
#define SUNXI_NSI_BASE 0x02020000
35
#define SUNXI_WDT_BASE 0x02050000
36
#define SUNXI_NPD_BASE 0x02070000
37
#define SUNXI_NSI_CPU_BASE 0x02071000
38
#define SUNXI_UART0_BASE 0x02500000
39
#define SUNXI_UART1_BASE 0x02500400
40
#define SUNXI_UART2_BASE 0x02500800
41
#define SUNXI_UART3_BASE 0x02500C00
42
#define SUNXI_UART4_BASE 0x02501000
43
#define SUNXI_UART5_BASE 0x02501400
44
#define SUNXI_UART6_BASE 0x02501800
45
#define SUNXI_UART7_BASE 0x02501C00
46
#define SUNXI_TWI0_BASE 0x02502000
47
#define SUNXI_TWI1_BASE 0x02502400
48
#define SUNXI_TWI2_BASE 0x02502800
49
#define SUNXI_TWI3_BASE 0x02502C00
50
#define SUNXI_TWI4_BASE 0x02503000
51
#define SUNXI_TWI5_BASE 0x02503400
52
#define SUNXI_SYSCTRL_BASE 0x03000000
53
#define SUNXI_TIMER_BASE 0x03008000
54
#define SUNXI_DMAC_BASE 0x03002000
55
#define SUNXI_CPUX_MSGBOX_BASE 0x03003000
56
#define SUNXI_CPUS_MSGBOX_BASE 0x03004000
57
#define SUNXI_SPINLOCK_BASE 0x03005000
58
#define SUNXI_SID_BASE 0x03006000
59
#define SUNXI_SID_SRAM_BASE 0x03006200
60
#define SUNXI_DCU_BASE 0x03010000
61
#define SUNXI_CE_NS_BASE 0x03040000
62
#define SUNXI_CE_S_BASE 0x03040800
63
#define SUNXI_CE_KEY_SRAM_BASE 0x03041000
64
#define SUNXI_SECURE_DEBUG_CFG_BASE 0x03042000
65
#define SUNXI_KEYSRAM_DEBUG_BASE 0x03042400
66
#define SUNXI_MEMC_BASE 0x03102000
67
#define SUNXI_MEMC_SMC_BASE 0x03110000
68
#define SUNXI_MEMC_COMMON_BASE 0x03120000
69
#define SUNXI_MEMC_DDRC_BASE 0x03130000
70
#define SUNXI_MEMC_PHY_BASE 0x03140000
71
#define SUNXI_CPU_GIC600_BASE 0x03400000
72
#define SUNXI_NAND_BASE 0x04011000
73
#define SUNXI_SMHC0_BASE 0x04020000
74
#define SUNXI_SMHC1_BASE 0x04021000
75
#define SUNXI_SMHC2_BASE 0x04022000
76
#define SUNXI_SPI0_BASE 0x04025000
77
#define SUNXI_SPI1_BASE 0x04026000
78
#define SUNXI_SPI2_BASE 0x04027000
79
#define SUNXI_TSC_BASE 0x04060000
80
#define SUNXI_USB0_BASE 0x04100000
81
#define SUNXI_USB1_BASE 0x04200000
82
#define SUNXI_GMAC0_BASE 0x04500000
83
#define SUNXI_GMAC1_BASE 0x04510000
84
#define SUNXI_SPI_FLASH_BASE 0x047F0000
85
#define SUNXI_PCIE_SYS_BASE 0x04800000
86
#define SUNXI_PCIE_DBI_BASE 0x04800000
87
#define SUNXI_USB3_1_BASE 0x04E00000
88
#define SUNXI_TOP_COMBPHY_BASE 0x04F00000
89
#define SUNXI_DE_BASE 0x05000000
90
#define SUNXI_DI_BASE 0x05400000
91
#define SUNXI_G2D_BASE 0x05440000
92
#define SUNXI_DISPLAY_TOP_BASE 0x05500000
93
#define SUNXI_TCON_LCD0_BASE 0x05501000
94
#define SUNXI_TCON_LCD1_BASE 0x05502000
95
#define SUNXI_TCON_TV0_BASE 0x05503000
96
#define SUNXI_DSI0_BASE 0x05506000
97
#define SUNXI_DSI1_BASE 0x05508000
98
#define SUNXI_HDMI_BASE 0x05520000
99
#define SUNXI_EDP0_BASE 0x05720000
100
#define SUNXI_DISPLAY1_TOP_BASE 0x05730000
101
#define SUNXI_TCON_LCD2_BASE 0x05731000
102
#define SUNXI_CSI_BASE 0x05800000
103
#define SUNXI_ISP_BASE 0x05900000
104
#define SUNXI_R_PPU_BASE 0x07001000
105
#define SUNXI_R_PPU1_BASE 0x07001400
106
#define SUNXI_R_SPC_BASE 0x07002000
107
#define SUNXI_R_TZMA_BASE 0x07002400
108
#define SUNXI_R_PRCM_BASE 0x07010000
109
#define SUNXI_R_WDG_BASE 0x07020400
110
#define SUNXI_R_TWD_BASE 0x07020800
111
#define SUNXI_R_PWM_BASE 0x07020C00
112
#define SUNXI_R_INTC_BASE 0x07021000
113
#define SUNXI_R_GPIO_BASE 0x07022000
114
#define SUNXI_CPUS_BIST_BASE 0x07031000
115
#define SUNXI_R_IRRX_BASE 0x07040000
116
#define SUNXI_PCK600_CPU_BASE 0x07050000
117
#define SUNXI_R_UART0_BASE 0x07080000
118
#define SUNXI_R_UART1_BASE 0x07080400
119
#define SUNXI_R_TWI0_BASE 0x07081400
120
#define SUNXI_R_TWI1_BASE 0x07081800
121
#define SUNXI_RTC_BASE 0x07090000
122
#define SUNXI_R_TIMER_BASE 0x07090400
123
#define SUNXI_R_SPI_BASE 0x07092000
124
#define SUNXI_DSP_CFG_BASE 0x07100000
125
#define SUNXI_DSP_WDG_BASE 0x07100400
126
#define SUNXI_DSP_INTC_BASE 0x07100800
127
#define SUNXI_DSP_TZMA_BASE 0x07100C00
128
#define SUNXI_NPU_TZMA_BASE 0x07101000
129
#define SUNXI_DSP_PRCM_BASE 0x07102000
130
#define SUNXI_ADDA_BASE 0x07110000
131
#define SUNXI_DMIC_BASE 0x07111000
132
#define SUNXI_I2S0_BASE 0x07112000
133
#define SUNXI_I2S1_BASE 0x07113000
134
#define SUNXI_I2S2_BASE 0x07114000
135
#define SUNXI_I2S3_BASE 0x07115000
136
#define SUNXI_SPDIF_BASE 0x07116000
137
#define SUNXI_DSP_MSGBOX_BASE 0x07120000
138
#define SUNXI_DSP_DMA_BASE 0x07121000
139
#define SUNXI_NPU_BASE 0x07122000
140
#define SUNXI_DSP_TIMER_BASE 0x07123000
141
#define SUNXI_NPU_MEM_BASE 0x07180000
142
#define SUNXI_CPU_SYS_CFG_BASE 0x08000000
143
#define SUNXI_TIMESTAMP_STA_BASE 0x08010000
144
#define SUNXI_TIMESTAMP_CTRL_BASE 0x08020000
145
#define SUNXI_IDC_BASE 0x08030000
146
#define SUNXI_C0_CPUX_CFG_BASE 0x09010000
147
#define SUNXI_C0_CPUX_MBIST_BASE 0x09020000
148
#define SUNXI_SPI_FLASH_XIP_BASE 0x10000000
149
#define SUNXI_PCIE_SLV_BASE 0x20000000
150
151
#define SUNXI_PIO_BASE (SUNXI_GPIO_BASE)
152
#define SUNXI_R_PIO_BASE (SUNXI_R_GPIO_BASE)
153
#define SUNXI_CCM_BASE (SUNXI_CCMU_BASE)
154
#define SUNXI_DMA_BASE (SUNXI_DMAC_BASE)
155
#define SUNXI_CE_BASE (SUNXI_CE_NS_BASE)
156
#define SUNXI_SS_BASE (SUNXI_CE_BASE)
157
#define SUNXI_CPUXCFG_BASE (SUNXI_CPU_SYS_CFG_BASE)
158
#define SUNXI_SYSCRL_BASE (SUNXI_SYSCTRL_BASE)
159
#define SUNXI_KEYADC_BASE (SUNXI_LRADC_BASE)
160
#define SUNXI_RPRCM_BASE (SUNXI_R_PRCM_BASE)
161
#define SUNXI_RPWM_BASE (SUNXI_R_PWM_BASE)
162
#define SUNXI_RPIO_BASE (SUNXI_R_GPIO_BASE)
163
164
#define SUNXI_RTWI_BASE (SUNXI_R_TWI0_BASE)
165
#define SUNXI_RTWI_BRG_REG (SUNXI_RPRCM_BASE + 0x019c)
166
#define SUNXI_RTWI0_RST_BIT (16)
167
#define SUNXI_RTWI0_GATING_BIT (0)
168
#define SUNXI_RST_BIT (16)
169
#define SUNXI_GATING_BIT (0)
170
#define SUNXI_RTC_DATA_BASE (SUNXI_RTC_BASE + 0x100)
171
#define RTC_XO_WRT_PROTECT (SUNXI_RTC_BASE + 0x15c)
172
#define RTC_XO_CTRL_REG (SUNXI_RTC_BASE + 0x160)
173
174
#define SUNXI_SMC_BASE (SUNXI_MEMC_SMC_BASE)
175
#define SUNXI_CPUS_CFG_BASE (0x07000400U)
176
#define SUNXI_RCPUCFG_BASE (SUNXI_CPUS_CFG_BASE)
177
178
#define SUNXI_SPIF_BASE (0x047F0000)
179
180
/* use for usb correct */
181
#define VDD_SYS_PWROFF_GATING_REG (SUNXI_RPRCM_BASE + 0x250)
182
#define RES_CAL_CTRL_REG (SUNXI_RPRCM_BASE + 0X310)
183
#define VDD_ADDA_OFF_GATING (9)
184
#define CAL_ANA_EN (1)
185
#define CAL_EN (0)
186
187
#define PLL_CTRL_REG1 (SUNXI_RPRCM_BASE + 0x244)
188
189
#define RVBARADDR0_L (SUNXI_CPUXCFG_BASE + 0x40)
190
#define RVBARADDR0_H (SUNXI_CPUXCFG_BASE + 0x44)
191
192
#define SRAM_CONTRL_REG0 (SUNXI_SYSCRL_BASE + 0x0)
193
#define SRAM_CONTRL_REG1 (SUNXI_SYSCRL_BASE + 0x4)
194
195
#define GPIO_BIAS_MAX_LEN (32)
196
#define GPIO_BIAS_MAIN_NAME "gpio_bias"
197
#define GPIO_POW_MODE_REG (0x0380)
198
#define GPIO_POW_MS_CTL (0x0384)
199
#define GPIO_POW_MODE_VAL_REG (0x0388)
200
#define GPIO_3_3V_MODE 0
201
#define GPIO_1_8V_MODE 1
202
203
/* GIC600 */
204
#define GIC_IROUTR(_n) (SUNXI_CPU_GIC600_BASE + 0x6000 + 8 * (_n))
205
#define GICR_LPI_BASE(n) (SUNXI_CPU_GIC600_BASE + 0x60000 + n * 0x20000)
206
#define GICR_WAKER(m) (GICR_LPI_BASE(m) + 0x0014)
207
#define GICR_PWRR(m) (GICR_LPI_BASE(m) + 0x0024)
208
#define LEVEL_TRIGERRED (0)
209
#define EDGE_TRIGERRED (1)
210
#define GIC_IRQ_TYPE_CFG(_n) (SUNXI_CPU_GIC600_BASE + 0xc00 + 4 * (_n))
211
#define GIC_IRQ_MOD_CFG(_n) (SUNXI_CPU_GIC600_BASE + 0xd00 + 4 * (_n))
212
213
#define PIOC_REG_o_POW_MOD_SEL 0x380
214
#define PIOC_REG_o_POW_MS_CTL 0x384
215
#define PIOC_REG_o_POW_MS_VAL 0x388
216
217
#define PIOC_REG_POW_MOD_SEL (SUNXI_PIO_BASE + PIOC_REG_o_POW_MOD_SEL)
218
#define PIOC_REG_POW_MS_CTL (SUNXI_PIO_BASE + PIOC_REG_o_POW_MS_CTL)
219
#define PIOC_REG_POW_VAL (SUNXI_PIO_BASE + PIOC_REG_o_POW_MS_VAL)
220
221
#define PIOC_SEL_Px_3_3V_VOL 1
222
#define PIOC_SEL_Px_1_8V_VOL 0
223
224
#define PIOC_CTL_Px_ENABLE 0
225
#define PIOC_CTL_Px_DISABLE 1
226
227
#define PIOC_VAL_Px_3_3V_VOL 0
228
#define PIOC_VAL_Px_1_8V_VOL 1
229
230
#define PIOC_CTL_Px_DEFUALT PIOC_CTL_Px_ENABLE
231
#define PIOC_SEL_Px_DEFAULT PIOC_SEL_Px_1_8V_VOL
232
233
/* rtc vccio detected */
234
#define FORCE_DETECTER_OUTPUT (1 << 7)
235
#define DEBOUNCE_NO_BYPASS (1 << 8)
236
#define VCCIO_THRESHOLD_VOLTAGE_2_5 (0 << 4)
237
#define VCCIO_THRESHOLD_VOLTAGE_2_6 (1 << 4)
238
#define VCCIO_THRESHOLD_VOLTAGE_2_7 (2 << 4)
239
#define VCCIO_THRESHOLD_VOLTAGE_2_8 (3 << 4)
240
#define VCCIO_THRESHOLD_VOLTAGE_2_9 (4 << 4)
241
#define VCCIO_THRESHOLD_VOLTAGE_3_0 (5 << 4)
242
#define VCCIO_THRESHOLD_MASK 0x7
243
#define VCCIO_DET_BYPASS_EN (1 << 0)
244
#define VDD_OFF_GATING_CTRL_REG 0x1f4
245
246
/* R SPI */
247
#define SUNXI_S_SPI_CLK_REG 0x0150
248
#define SUNXI_S_SPI_BGR_REG 0x015C
249
250
#endif
// __SUN55IW3_REG_NCAT_H__
Generated by
1.9.8