xref: /rk3399_rockchip-uboot/arch/arm/include/asm/arch-sunxi/prcm.h (revision ceff355a5f3038ddb49618d9adc716b0ed978aea)
1174deb76SOliver Schinagl /*
2174deb76SOliver Schinagl  * Sunxi A31 Power Management Unit register definition.
3174deb76SOliver Schinagl  *
4174deb76SOliver Schinagl  * (C) Copyright 2013 Oliver Schinagl <oliver@schinagl.nl>
5174deb76SOliver Schinagl  * http://linux-sunxi.org
6174deb76SOliver Schinagl  * Allwinner Technology Co., Ltd. <www.allwinnertech.com>
7174deb76SOliver Schinagl  * Berg Xing <bergxing@allwinnertech.com>
8174deb76SOliver Schinagl  * Tom Cubie <tangliang@allwinnertech.com>
9174deb76SOliver Schinagl  *
10174deb76SOliver Schinagl  * SPDX-License-Identifier:	GPL-2.0+
11174deb76SOliver Schinagl  */
12174deb76SOliver Schinagl 
13174deb76SOliver Schinagl #ifndef _SUNXI_PRCM_H
14174deb76SOliver Schinagl #define _SUNXI_PRCM_H
15174deb76SOliver Schinagl 
16174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_PRE(n) (((n) & 0x3) << 4)
17174deb76SOliver Schinagl #define PRCM_CPUS_CFG_PRE_MASK __PRCM_CPUS_CFG_PRE(0x3)
18174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_PRE_DIV(n) (((n) >> 1) - 1)
19174deb76SOliver Schinagl #define PRCM_CPUS_CFG_PRE_DIV(n) \
20174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_PRE(__PRCM_CPUS_CFG_CLK_PRE(n))
21174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_POST(n) (((n) & 0x1f) << 8)
22174deb76SOliver Schinagl #define PRCM_CPUS_CFG_POST_MASK __PRCM_CPUS_CFG_POST(0x1f)
23174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_POST_DIV(n) ((n) - 1)
24174deb76SOliver Schinagl #define PRCM_CPUS_CFG_POST_DIV(n) \
25174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_POST_DIV(__PRCM_CPUS_CFG_POST_DIV(n))
26174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_CLK_SRC(n) (((n) & 0x3) << 16)
27174deb76SOliver Schinagl #define PRCM_CPUS_CFG_CLK_SRC_MASK __PRCM_CPUS_CFG_CLK_SRC(0x3)
28174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_CLK_SRC_LOSC 0x0
29174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_CLK_SRC_HOSC 0x1
30174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_CLK_SRC_PLL6 0x2
31174deb76SOliver Schinagl #define __PRCM_CPUS_CFG_CLK_SRC_PDIV 0x3
32174deb76SOliver Schinagl #define PRCM_CPUS_CFG_CLK_SRC_LOSC \
33174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_CLK_SRC(__PRCM_CPUS_CFG_CLK_SRC_LOSC)
34174deb76SOliver Schinagl #define PRCM_CPUS_CFG_CLK_SRC_HOSC \
35174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_CLK_SRC(__PRCM_CPUS_CFG_CLK_SRC_HOSC)
36174deb76SOliver Schinagl #define PRCM_CPUS_CFG_CLK_SRC_PLL6 \
37174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_CLK_SRC(__PRCM_CPUS_CFG_CLK_SRC_PLL6)
38174deb76SOliver Schinagl #define PRCM_CPUS_CFG_CLK_SRC_PDIV \
39174deb76SOliver Schinagl 	__PRCM_CPUS_CFG_CLK_SRC(__PRCM_CPUS_CFG_CLK_SRC_PDIV)
40174deb76SOliver Schinagl 
41174deb76SOliver Schinagl #define __PRCM_APB0_RATIO(n) (((n) & 0x3) << 0)
42174deb76SOliver Schinagl #define PRCM_APB0_RATIO_DIV_MASK __PRCM_APB0_RATIO_DIV(0x3)
43174deb76SOliver Schinagl #define __PRCM_APB0_RATIO_DIV(n) (((n) >> 1) - 1)
44174deb76SOliver Schinagl #define PRCM_APB0_RATIO_DIV(n) \
45174deb76SOliver Schinagl 	__PRCM_APB0_RATIO(__PRCM_APB0_RATIO_DIV(n))
46174deb76SOliver Schinagl 
47174deb76SOliver Schinagl #define PRCM_CPU_CFG_NEON_CLK_EN (0x1 << 0)
48174deb76SOliver Schinagl #define PRCM_CPU_CFG_CPU_CLK_EN (0x1 << 1)
49174deb76SOliver Schinagl 
50174deb76SOliver Schinagl #define PRCM_APB0_GATE_PIO (0x1 << 0)
51174deb76SOliver Schinagl #define PRCM_APB0_GATE_IR (0x1 << 1)
52174deb76SOliver Schinagl #define PRCM_APB0_GATE_TIMER01 (0x1 << 2)
5366ebea06SHans de Goede #define PRCM_APB0_GATE_P2WI (0x1 << 3)		/* sun6i */
5466ebea06SHans de Goede #define PRCM_APB0_GATE_RSB (0x1 << 3)		/* sun8i */
55174deb76SOliver Schinagl #define PRCM_APB0_GATE_UART (0x1 << 4)
56174deb76SOliver Schinagl #define PRCM_APB0_GATE_1WIRE (0x1 << 5)
57174deb76SOliver Schinagl #define PRCM_APB0_GATE_I2C (0x1 << 6)
58174deb76SOliver Schinagl 
59174deb76SOliver Schinagl #define PRCM_APB0_RESET_PIO (0x1 << 0)
60174deb76SOliver Schinagl #define PRCM_APB0_RESET_IR (0x1 << 1)
61174deb76SOliver Schinagl #define PRCM_APB0_RESET_TIMER01 (0x1 << 2)
62174deb76SOliver Schinagl #define PRCM_APB0_RESET_P2WI (0x1 << 3)
63174deb76SOliver Schinagl #define PRCM_APB0_RESET_UART (0x1 << 4)
64174deb76SOliver Schinagl #define PRCM_APB0_RESET_1WIRE (0x1 << 5)
65174deb76SOliver Schinagl #define PRCM_APB0_RESET_I2C (0x1 << 6)
66174deb76SOliver Schinagl 
67174deb76SOliver Schinagl #define PRCM_PLL_CTRL_PLL_BIAS (0x1 << 0)
68174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_GAIN_ENH (0x1 << 1)
69174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_USB_CLK_SRC(n) (((n) & 0x3) << 4)
70174deb76SOliver Schinagl #define PRCM_PLL_CTRL_USB_CLK_SRC_MASK \
71174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_USB_CLK_SRC(0x3)
72174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_USB_CLK_0 0x0
73174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_USB_CLK_1 0x1
74174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_USB_CLK_2 0x2
75174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_USB_CLK_3 0x3
76174deb76SOliver Schinagl #define PRCM_PLL_CTRL_USB_CLK_0 \
77174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_USB_CLK_SRC(__PRCM_PLL_CTRL_USB_CLK_0)
78174deb76SOliver Schinagl #define PRCM_PLL_CTRL_USB_CLK_1 \
79174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_USB_CLK_SRC(__PRCM_PLL_CTRL_USB_CLK_1)
80174deb76SOliver Schinagl #define PRCM_PLL_CTRL_USB_CLK_2 \
81174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_USB_CLK_SRC(__PRCM_PLL_CTRL_USB_CLK_2)
82174deb76SOliver Schinagl #define PRCM_PLL_CTRL_USB_CLK_3 \
83174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_USB_CLK_SRC(__PRCM_PLL_CTRL_USB_CLK_3)
84174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_INT_PLL_IN_SEL(n) (((n) & 0x3) << 12)
85174deb76SOliver Schinagl #define PRCM_PLL_CTRL_INT_PLL_IN_SEL_MASK \
86174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_INT_PLL_IN_SEL(0x3)
87174deb76SOliver Schinagl #define PRCM_PLL_CTRL_INT_PLL_IN_SEL(n) \
88174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_INT_PLL_IN_SEL(n)
89174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_HOSC_CLK_SEL(n) (((n) & 0x3) << 20)
90174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_CLK_SEL_MASK \
91174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_HOSC_CLK_SEL(0x3)
92174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_HOSC_CLK_0 0x0
93174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_HOSC_CLK_1 0x1
94174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_HOSC_CLK_2 0x2
95174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_HOSC_CLK_3 0x3
96174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_CLK_0 \
97174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_HOSC_CLK_SEL(__PRCM_PLL_CTRL_HOSC_CLK_0)
98174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_CLK_1 \
99174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_HOSC_CLK_SEL(__PRCM_PLL_CTRL_HOSC_CLK_1)
100174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_CLK_2 \
101174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_HOSC_CLK_SEL(__PRCM_PLL_CTRL_HOSC_CLK_2)
102174deb76SOliver Schinagl #define PRCM_PLL_CTRL_HOSC_CLK_3 \
103174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_HOSC_CLK_SEL(__PRCM_PLL_CTRL_HOSC_CLK_3)
104174deb76SOliver Schinagl #define PRCM_PLL_CTRL_PLL_TST_SRC_EXT (0x1 << 24)
105174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_DIGITAL_EN (0x1 << 0)
106174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_ANALOG_EN (0x1 << 1)
107174deb76SOliver Schinagl #define PRCM_PLL_CTRL_EXT_OSC_EN (0x1 << 2)
108174deb76SOliver Schinagl #define PRCM_PLL_CTRL_CLK_TST_EN (0x1 << 3)
109174deb76SOliver Schinagl #define PRCM_PLL_CTRL_IN_PWR_HIGH (0x1 << 15) /* 3.3 for hi 2.5 for lo */
110174deb76SOliver Schinagl #define __PRCM_PLL_CTRL_VDD_LDO_OUT(n) (((n) & 0x7) << 16)
111174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_OUT_MASK \
112174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_LDO_OUT(0x7)
113174deb76SOliver Schinagl /* When using the low voltage 20 mV steps, and high voltage 30 mV steps */
114174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_OUT_L(n) \
115174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1000) / 20) & 0x7)
116174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_OUT_H(n) \
117174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) - 1160) / 30) & 0x7)
118174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_OUT_LV(n) \
119174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 20) + 1000)
120174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_OUT_HV(n) \
121174deb76SOliver Schinagl 	__PRCM_PLL_CTRL_VDD_LDO_OUT((((n) & 0x7) * 30) + 1160)
122174deb76SOliver Schinagl #define PRCM_PLL_CTRL_LDO_KEY (0xa7 << 24)
12362c87ef2SHans de Goede #define PRCM_PLL_CTRL_LDO_KEY_MASK (0xff << 24)
124174deb76SOliver Schinagl 
125174deb76SOliver Schinagl #define PRCM_CLK_1WIRE_GATE (0x1 << 31)
126174deb76SOliver Schinagl 
127174deb76SOliver Schinagl #define __PRCM_CLK_MOD0_M(n) (((n) & 0xf) << 0)
128174deb76SOliver Schinagl #define PRCM_CLK_MOD0_M_MASK __PRCM_CLK_MOD0_M(0xf)
129174deb76SOliver Schinagl #define __PRCM_CLK_MOD0_M_X(n) (n - 1)
130174deb76SOliver Schinagl #define PRCM_CLK_MOD0_M(n) __PRCM_CLK_MOD0_M(__PRCM_CLK_MOD0_M_X(n))
131174deb76SOliver Schinagl #define PRCM_CLK_MOD0_OUT_PHASE(n) (((n) & 0x7) << 8)
132174deb76SOliver Schinagl #define PRCM_CLK_MOD0_OUT_PHASE_MASK(n) PRCM_CLK_MOD0_OUT_PHASE(0x7)
133174deb76SOliver Schinagl #define _PRCM_CLK_MOD0_N(n) (((n) & 0x3) << 16)
134174deb76SOliver Schinagl #define PRCM_CLK_MOD0_N_MASK __PRCM_CLK_MOD_N(0x3)
135174deb76SOliver Schinagl #define __PRCM_CLK_MOD0_N_X(n) (((n) >> 1) - 1)
136174deb76SOliver Schinagl #define PRCM_CLK_MOD0_N(n) __PRCM_CLK_MOD0_N(__PRCM_CLK_MOD0_N_X(n))
137174deb76SOliver Schinagl #define PRCM_CLK_MOD0_SMPL_PHASE(n) (((n) & 0x7) << 20)
138174deb76SOliver Schinagl #define PRCM_CLK_MOD0_SMPL_PHASE_MASK PRCM_CLK_MOD0_SMPL_PHASE(0x7)
139174deb76SOliver Schinagl #define PRCM_CLK_MOD0_SRC_SEL(n) (((n) & 0x7) << 24)
140174deb76SOliver Schinagl #define PRCM_CLK_MOD0_SRC_SEL_MASK PRCM_CLK_MOD0_SRC_SEL(0x7)
141174deb76SOliver Schinagl #define PRCM_CLK_MOD0_GATE_EN (0x1 << 31)
142174deb76SOliver Schinagl 
143174deb76SOliver Schinagl #define PRCM_APB0_RESET_PIO (0x1 << 0)
144174deb76SOliver Schinagl #define PRCM_APB0_RESET_IR (0x1 << 1)
145174deb76SOliver Schinagl #define PRCM_APB0_RESET_TIMER01 (0x1 << 2)
146174deb76SOliver Schinagl #define PRCM_APB0_RESET_P2WI (0x1 << 3)
147174deb76SOliver Schinagl #define PRCM_APB0_RESET_UART (0x1 << 4)
148174deb76SOliver Schinagl #define PRCM_APB0_RESET_1WIRE (0x1 << 5)
149174deb76SOliver Schinagl #define PRCM_APB0_RESET_I2C (0x1 << 6)
150174deb76SOliver Schinagl 
151174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_M(n) (((n) & 0x7) << 8)
152174deb76SOliver Schinagl #define PRCM_CLK_OUTD_M_MASK __PRCM_CLK_OUTD_M(0x7)
153174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_M_X() ((n) - 1)
154174deb76SOliver Schinagl #define PRCM_CLK_OUTD_M(n) __PRCM_CLK_OUTD_M(__PRCM_CLK_OUTD_M_X(n))
155174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_N(n) (((n) & 0x7) << 20)
156174deb76SOliver Schinagl #define PRCM_CLK_OUTD_N_MASK __PRCM_CLK_OUTD_N(0x7)
157174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_N_X(n) (((n) >> 1) - 1)
158174deb76SOliver Schinagl #define PRCM_CLK_OUTD_N(n) __PRCM_CLK_OUTD_N(__PRCM_CLK_OUTD_N_X(n)
159174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_SRC_SEL(n) (((n) & 0x3) << 24)
160174deb76SOliver Schinagl #define PRCM_CLK_OUTD_SRC_SEL_MASK __PRCM_CLK_OUTD_SRC_SEL(0x3)
161174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_SRC_LOSC2 0x0
162174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_SRC_LOSC 0x1
163174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_SRC_HOSC 0x2
164174deb76SOliver Schinagl #define __PRCM_CLK_OUTD_SRC_ERR 0x3
165174deb76SOliver Schinagl #define PRCM_CLK_OUTD_SRC_LOSC2 \
166174deb76SOliver Schinagl #deifne __PRCM_CLK_OUTD_SRC_SEL(__PRCM_CLK_OUTD_SRC_LOSC2)
167174deb76SOliver Schinagl #define PRCM_CLK_OUTD_SRC_LOSC \
168174deb76SOliver Schinagl #deifne __PRCM_CLK_OUTD_SRC_SEL(__PRCM_CLK_OUTD_SRC_LOSC)
169174deb76SOliver Schinagl #define PRCM_CLK_OUTD_SRC_HOSC \
170174deb76SOliver Schinagl #deifne __PRCM_CLK_OUTD_SRC_SEL(__PRCM_CLK_OUTD_SRC_HOSC)
171174deb76SOliver Schinagl #define PRCM_CLK_OUTD_SRC_ERR \
172174deb76SOliver Schinagl #deifne __PRCM_CLK_OUTD_SRC_SEL(__PRCM_CLK_OUTD_SRC_ERR)
173174deb76SOliver Schinagl #define PRCM_CLK_OUTD_EN (0x1 << 31)
174174deb76SOliver Schinagl 
175174deb76SOliver Schinagl #define PRCM_CPU0_PWROFF (0x1 << 0)
176174deb76SOliver Schinagl #define PRCM_CPU1_PWROFF (0x1 << 1)
177174deb76SOliver Schinagl #define PRCM_CPU2_PWROFF (0x1 << 2)
178174deb76SOliver Schinagl #define PRCM_CPU3_PWROFF (0x1 << 3)
179174deb76SOliver Schinagl #define PRCM_CPU_ALL_PWROFF (0xf << 0)
180174deb76SOliver Schinagl 
181174deb76SOliver Schinagl #define PRCM_VDD_SYS_DRAM_CH0_PAD_HOLD_PWROFF (0x1 << 0)
182174deb76SOliver Schinagl #define PRCM_VDD_SYS_DRAM_CH1_PAD_HOLD_PWROFF (0x1 << 1)
183174deb76SOliver Schinagl #define PRCM_VDD_SYS_AVCC_A_PWROFF (0x1 << 2)
184174deb76SOliver Schinagl #define PRCM_VDD_SYS_CPU0_VDD_PWROFF (0x1 << 3)
185174deb76SOliver Schinagl 
186174deb76SOliver Schinagl #define PRCM_VDD_GPU_PWROFF (0x1 << 0)
187174deb76SOliver Schinagl 
188174deb76SOliver Schinagl #define PRCM_VDD_SYS_RESET (0x1 << 0)
189174deb76SOliver Schinagl 
190174deb76SOliver Schinagl #define PRCM_CPU1_PWR_CLAMP(n) (((n) & 0xff) << 0)
191174deb76SOliver Schinagl #define PRCM_CPU1_PWR_CLAMP_MASK PRCM_CPU1_PWR_CLAMP(0xff)
192174deb76SOliver Schinagl 
193174deb76SOliver Schinagl #define PRCM_CPU2_PWR_CLAMP(n) (((n) & 0xff) << 0)
194174deb76SOliver Schinagl #define PRCM_CPU2_PWR_CLAMP_MASK PRCM_CPU2_PWR_CLAMP(0xff)
195174deb76SOliver Schinagl 
196174deb76SOliver Schinagl #define PRCM_CPU3_PWR_CLAMP(n) (((n) & 0xff) << 0)
197174deb76SOliver Schinagl #define PRCM_CPU3_PWR_CLAMP_MASK PRCM_CPU3_PWR_CLAMP(0xff)
198174deb76SOliver Schinagl 
199*39858b12SIcenowy Zheng #define PRCM_SEC_SWITCH_APB0_CLK_NONSEC (0x1 << 0)
200*39858b12SIcenowy Zheng #define PRCM_SEC_SWITCH_PLL_CFG_NONSEC (0x1 << 1)
201*39858b12SIcenowy Zheng #define PRCM_SEC_SWITCH_PWR_GATE_NONSEC (0x1 << 2)
202*39858b12SIcenowy Zheng 
203174deb76SOliver Schinagl #ifndef __ASSEMBLY__
204d7d4e5ccSChen-Yu Tsai #include <linux/compiler.h>
205d7d4e5ccSChen-Yu Tsai 
206d7d4e5ccSChen-Yu Tsai struct __packed sunxi_prcm_reg {
207174deb76SOliver Schinagl 	u32 cpus_cfg;		/* 0x000 */
208174deb76SOliver Schinagl 	u8 res0[0x8];		/* 0x004 */
209174deb76SOliver Schinagl 	u32 apb0_ratio;		/* 0x00c */
210174deb76SOliver Schinagl 	u32 cpu0_cfg;		/* 0x010 */
211174deb76SOliver Schinagl 	u32 cpu1_cfg;		/* 0x014 */
212174deb76SOliver Schinagl 	u32 cpu2_cfg;		/* 0x018 */
213174deb76SOliver Schinagl 	u32 cpu3_cfg;		/* 0x01c */
214174deb76SOliver Schinagl 	u8 res1[0x8];		/* 0x020 */
215174deb76SOliver Schinagl 	u32 apb0_gate;		/* 0x028 */
216174deb76SOliver Schinagl 	u8 res2[0x14];		/* 0x02c */
217174deb76SOliver Schinagl 	u32 pll_ctrl0;		/* 0x040 */
218174deb76SOliver Schinagl 	u32 pll_ctrl1;		/* 0x044 */
219174deb76SOliver Schinagl 	u8 res3[0x8];		/* 0x048 */
220174deb76SOliver Schinagl 	u32 clk_1wire;		/* 0x050 */
221174deb76SOliver Schinagl 	u32 clk_ir;		/* 0x054 */
222174deb76SOliver Schinagl 	u8 res4[0x58];		/* 0x058 */
223174deb76SOliver Schinagl 	u32 apb0_reset;		/* 0x0b0 */
224174deb76SOliver Schinagl 	u8 res5[0x3c];		/* 0x0b4 */
225174deb76SOliver Schinagl 	u32 clk_outd;		/* 0x0f0 */
226174deb76SOliver Schinagl 	u8 res6[0xc];		/* 0x0f4 */
227174deb76SOliver Schinagl 	u32 cpu_pwroff;		/* 0x100 */
228174deb76SOliver Schinagl 	u8 res7[0xc];		/* 0x104 */
229174deb76SOliver Schinagl 	u32 vdd_sys_pwroff;	/* 0x110 */
230174deb76SOliver Schinagl 	u8 res8[0x4];		/* 0x114 */
231174deb76SOliver Schinagl 	u32 gpu_pwroff;		/* 0x118 */
232174deb76SOliver Schinagl 	u8 res9[0x4];		/* 0x11c */
233174deb76SOliver Schinagl 	u32 vdd_pwr_reset;	/* 0x120 */
23420e3d053SChen-Yu Tsai 	u8 res10[0x1c];		/* 0x124 */
23520e3d053SChen-Yu Tsai 	u32 cpu_pwr_clamp[4];	/* 0x140 but first one is actually unused */
236174deb76SOliver Schinagl 	u8 res11[0x30];		/* 0x150 */
237174deb76SOliver Schinagl 	u32 dram_pwr;		/* 0x180 */
238174deb76SOliver Schinagl 	u8 res12[0xc];		/* 0x184 */
239174deb76SOliver Schinagl 	u32 dram_tst;		/* 0x190 */
240*39858b12SIcenowy Zheng 	u8 res13[0x3c];		/* 0x194 */
241*39858b12SIcenowy Zheng 	u32 prcm_sec_switch;	/* 0x1d0 */
242174deb76SOliver Schinagl };
243174deb76SOliver Schinagl 
244472ed064SChen-Yu Tsai void prcm_apb0_enable(u32 flags);
2459d082687SJelle van der Waa void prcm_apb0_disable(u32 flags);
2469d082687SJelle van der Waa 
247174deb76SOliver Schinagl #endif /* __ASSEMBLY__ */
248174deb76SOliver Schinagl #endif /* _PRCM_H */
249