aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-rockchip/pmu_rk3288.h
blob: 081675eb9202e54c9de02aef7a26d13ed83ecdfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 * Copyright (c) 2015 Google, Inc
 *
 * Copyright 2014 Rockchip Inc.
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef _ASM_ARCH_PMU_RK3288_H
#define _ASM_ARCH_PMU_RK3288_H

struct rk3288_pmu {
	u32 wakeup_cfg[2];
	u32 pwrdn_con;
	u32 pwrdn_st;

	u32 idle_req;
	u32 idle_st;
	u32 pwrmode_con;
	u32 pwr_state;

	u32 osc_cnt;
	u32 pll_cnt;
	u32 stabl_cnt;
	u32 ddr0io_pwron_cnt;

	u32 ddr1io_pwron_cnt;
	u32 core_pwrdn_cnt;
	u32 core_pwrup_cnt;
	u32 gpu_pwrdn_cnt;

	u32 gpu_pwrup_cnt;
	u32 wakeup_rst_clr_cnt;
	u32 sft_con;
	u32 ddr_sref_st;

	u32 int_con;
	u32 int_st;
	u32 boot_addr_sel;
	u32 grf_con;

	u32 gpio_sr;
	u32 gpio0pull[3];

	u32 gpio0drv[3];
	u32 gpio_op;

	u32 gpio0_sel18;	/* 0x80 */
	u32 gpio0_iomux[4];	/* a, b, c, d */
	u32 sys_reg[4];
};
check_member(rk3288_pmu, sys_reg[3], 0x00a0);

enum {
	PMU_GPIO0_A	= 0,
	PMU_GPIO0_B,
	PMU_GPIO0_C,
	PMU_GPIO0_D,
};

/* PMU_GPIO0_B_IOMUX */
enum {
	GPIO0_B7_SHIFT		= 14,
	GPIO0_B7_MASK		= 1,
	GPIO0_B7_GPIOB7		= 0,
	GPIO0_B7_I2C0PMU_SDA,

	GPIO0_B5_SHIFT		= 10,
	GPIO0_B5_MASK		= 1,
	GPIO0_B5_GPIOB5		= 0,
	GPIO0_B5_CLK_27M,

	GPIO0_B2_SHIFT		= 4,
	GPIO0_B2_MASK		= 1,
	GPIO0_B2_GPIOB2		= 0,
	GPIO0_B2_TSADC_INT,
};

/* PMU_GPIO0_C_IOMUX */
enum {
	GPIO0_C1_SHIFT		= 2,
	GPIO0_C1_MASK		= 3,
	GPIO0_C1_GPIOC1		= 0,
	GPIO0_C1_TEST_CLKOUT,
	GPIO0_C1_CLKT1_27M,

	GPIO0_C0_SHIFT		= 0,
	GPIO0_C0_MASK		= 1,
	GPIO0_C0_GPIOC0		= 0,
	GPIO0_C0_I2C0PMU_SCL,
};

#endif