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#ifndef __SUN8IW20_REG_NCAT_H__
4#define __SUN8IW20_REG_NCAT_H__
5
6/* SRAM */
7#define SUNXI_SRAM_BASE (0x20000)
8#define SUNXI_SRAM_SIZE (0x8000)
9#define SUNXI_SRAMA2_BASE (0x400000)
10#define SUNXI_SRAMA2_SIZE (0x20000)
11#define SUNXI_SRAMC_BASE (0x28000)
12#define SUNXI_SRAMC_SIZE (128 << 10)
13
14/*CPUX*/
15#define SUNXI_CPUXCFG_BASE (0x08100000)
16
17/*sys ctrl*/
18#define SUNXI_TIMER_BASE (0x02050000)
19#define SUNXI_CCMU_BASE (0x02001000)
20#define SUNXI_PIO_BASE (0x02000000)
21#define SUNXI_SPC_BASE (0x02000800)
22#define SUNXI_SYSCRL_BASE (0x03000000)
23#define SUNXI_DMA_BASE (0x03002000)
24#define SUNXI_SID_BASE (0x03006000)
25#define SUNXI_SID_SRAM_BASE (0x03006200)
26
27#define SUNXI_WDOG_BASE (0x020500A0)
28
29#define SUNXI_CE_BASE (0x03040000)
30#define SUNXI_SS_BASE SUNXI_CE_BASE
31
32#define SUNXI_SMC_BASE (0x03007000)
33
34/*storage*/
35#define SUNXI_SMHC0_BASE (0x04020000)
36#define SUNXI_SMHC1_BASE (0x04021000)
37#define SUNXI_SMHC2_BASE (0x04022000)
38
39/*noraml*/
40#define SUNXI_UART0_BASE (0x02500000)
41#define SUNXI_UART1_BASE (0x02500400)
42#define SUNXI_UART2_BASE (0x02500800)
43#define SUNXI_UART3_BASE (0x02500C00)
44
45#define SUNXI_TWI0_BASE (0x02502000)
46#define SUNXI_TWI1_BASE (0x02502400)
47
48#define SUNXI_SPI0_BASE (0x04025000)
49#define SUNXI_SPI1_BASE (0x04026000)
50#define SUNXI_SPIF_BASE (0x04f00000)
51
52/*physical key*/
53#define SUNXI_GPADC_BASE (0x02009000)
54#define SUNXI_LRADC_BASE (0x02009800)
55#define SUNXI_KEYADC_BASE SUNXI_LRADC_BASE
56
57#define SUNXI_GIC_BASE (0x03020000)
58#define SUNXI_USB0_BASE (0x04100000)
59
60/*cpus*/
61#define SUNXI_RTC_BASE (0x07090000)
62#define SUNXI_AUDIO_CODEC (0x02030000)
63#define SUNXI_CPUS_CFG_BASE (0x07000400)
64#define SUNXI_RCPUCFG_BASE (SUNXI_CPUS_CFG_BASE)
65#define SUNXI_RPRCM_BASE (0x07010000)
66#define SUNXI_RPWM_BASE (0x07020c00)
67#define SUNXI_RPIO_BASE (0x07022000)
68#define SUNXI_R_PIO_BASE SUNXI_RPIO_BASE
69#define SUNXI_RTWI_BASE (0x07020800)
70#define SUNXI_RRSB_BASE (0x07083000)
71#define SUNXI_RSB_BASE SUNXI_RRSB_BASE
72#define SUNXI_RTWI_BRG_REG (SUNXI_RPRCM_BASE + 0x019c)
73#define SUNXI_RTWI0_RST_BIT (16)
74#define SUNXI_RTWI0_GATING_BIT (0)
75#define SUNXI_RST_BIT (16)
76#define SUNXI_GATING_BIT (0)
77
78#define SUNXI_RTC_DATA_BASE (SUNXI_RTC_BASE + 0x100)
79#define AUDIO_CODEC_BIAS_REG (SUNXI_AUDIO_CODEC + 0x320)
80#define AUDIO_POWER_REG (SUNXI_AUDIO_CODEC + 0x348)
81#define SUNXI_VER_REG (SUNXI_SYSCRL_BASE + 0x24)
82
83#define RES_CAL_CTRL_REG (SUNXI_RPRCM_BASE + 0X310)
84#define ANA_PWR_RST_REG (SUNXI_RPRCM_BASE + 0X254)
85
86#define VDD_ADDA_OFF_GATING (9)
87#define CAL_ANA_EN (1)
88#define CAL_EN (0)
89
90#define RVBARADDR0_L (SUNXI_CPUXCFG_BASE + 0x40)
91#define RVBARADDR0_H (SUNXI_CPUXCFG_BASE + 0x44)
92
93#define SRAM_CONTRL_REG0 (SUNXI_SYSCRL_BASE + 0x0)
94#define SRAM_CONTRL_REG1 (SUNXI_SYSCRL_BASE + 0x4)
95
96/* rtc check power off */
97#define FORCE_DETECTER_OUTPUT (1 << 7)
98#define VCCIO_THRESHOLD_VOLTAGE_2_5 (0 << 4)
99#define VCCIO_THRESHOLD_VOLTAGE_2_6 (1 << 4)
100#define VCCIO_THRESHOLD_VOLTAGE_2_7 (2 << 4)
101#define VCCIO_THRESHOLD_VOLTAGE_2_8 (3 << 4)
102#define VCCIO_THRESHOLD_VOLTAGE_2_9 (4 << 4)
103#define VCCIO_THRESHOLD_VOLTAGE_3_0 (5 << 4)
104#define VCCIO_DET_BYPASS_EN (1 << 0)
105
106/* IRQ */
107#define AW_IRQ_USB_OTG 61
108#define AW_IRQ_USB_EHCI0 62
109#define AW_IRQ_USB_OHCI0 63
110#define AW_IRQ_DMA 82
111#define AW_IRQ_TIMER0 91
112#define AW_IRQ_TIMER1 92
113#define AW_IRQ_NMI 168
114#define GIC_IRQ_NUM 223
115
116#endif// __SUN8IW20_REG_NCAT_H__