xref: /aosp_15_r20/external/coreboot/src/soc/rockchip/rk3288/include/soc/pmu.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SOC_ROCKCHIP_RK3288_PMU_H__
4 #define __SOC_ROCKCHIP_RK3288_PMU_H__
5 
6 #include <soc/addressmap.h>
7 
8 struct rk3288_pmu_regs {
9 	u32 wakeup_cfg[2];
10 	u32 pwrdn_con;
11 	u32 pwrdn_st;
12 	u32 idle_req;
13 	u32 idle_st;
14 	u32 pwrmode_con;
15 	u32 pwr_state;
16 	u32 osc_cnt;
17 	u32 pll_cnt;
18 	u32 stabl_cnt;
19 	u32 ddr0io_pwron_cnt;
20 	u32 ddr1io_pwron_cnt;
21 	u32 core_pwrdn_cnt;
22 	u32 core_pwrup_cnt;
23 	u32 gpu_pwrdn_cnt;
24 	u32 gpu_pwrup_cnt;
25 	u32 wakeup_rst_clr_cnt;
26 	u32 sft_con;
27 	u32 ddr_sref_st;
28 	u32 int_con;
29 	u32 int_st;
30 	u32 boot_addr_sel;
31 	u32 grf_con;
32 	u32 gpio_sr;
33 	u32 gpio0pull[3];
34 	u32 gpio0drv[3];
35 	u32 gpio_op;
36 	u32 gpio0_sel18;
37 	u32 gpio0a_iomux;
38 	union {
39 		u32 gpio0b_iomux;
40 		u32 iomux_i2c0sda;
41 		u32 iomux_tsadc_int;
42 	};
43 	union {
44 		u32 gpio0c_iomux;
45 		u32 iomux_i2c0scl;
46 	};
47 	union {
48 		u32 gpio0d_iomux;
49 		u32 iomux_lcdc0;
50 	};
51 	u32 sys_reg[4];
52 };
53 check_member(rk3288_pmu_regs, sys_reg[3], 0x00a0);
54 
55 static struct rk3288_pmu_regs * const rk3288_pmu = (void *)PMU_BASE;
56 
57 #define IOMUX_I2C0SDA	(1 << 14)
58 #define IOMUX_I2C0SCL	(1 << 0)
59 #define	IOMUX_TSADC_INT	(1 << 4)
60 
61 #endif
62