coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
power.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* Register map for Exynos5 PMU */
4 
5 #ifndef CPU_SAMSUNG_EXYNOS5250_POWER_H
6 #define CPU_SAMSUNG_EXYNOS5250_POWER_H
7 
8 #include <soc/cpu.h>
9 
10 /* Enable HW thermal trip with PS_HOLD_CONTROL register ENABLE_HW_TRIP bit */
12 
13 #define MIPI_PHY1_CONTROL_ENABLE (1 << 0)
14 #define MIPI_PHY1_CONTROL_M_RESETN (1 << 2)
15 
16 #define POWER_USB_PHY_CTRL_EN (1 << 0)
17 #define POWER_PS_HOLD_CONTROL_DATA_HIGH (1 << 8)
18 #define POWER_ENABLE_HW_TRIP (1UL << 31)
19 
20 #define EXYNOS_DP_PHY_ENABLE (1 << 0)
21 
22 /* PMU_DEBUG bits [12:8] = 0x1000 selects XXTI clock source */
23 #define PMU_DEBUG_XXTI 0x1000
24 /* Mask bit[12:8] for xxti clock selection */
25 #define PMU_DEBUG_CLKOUT_SEL_MASK 0x1f00
26 
27 /* Power Management Unit register map */
28 struct exynos5_power {
29  /* Add registers as and when required */
30  uint32_t om_stat; /* 0x0000 */
31  uint8_t reserved1[0x03fc];
32  uint32_t sw_reset; /* 0x0400 */
33  uint8_t reserved2[0x0300];
34  uint32_t usb_drd_phy_ctrl; /* 0x0704 */
39  uint32_t dptx_phy_control; /* 0x0720 */
41  uint32_t inform0; /* 0x0800 */
42  uint32_t inform1; /* 0x0804 */
44  uint32_t pmu_debug; /* 0x0a00 */
45  uint8_t reserved7[0x2724];
46  uint32_t padret_uart_opt; /* 0x3128 */
48  uint32_t ps_hold_ctrl; /* 0x330c */
50 check_member(exynos5_power, ps_hold_ctrl, 0x330c);
51 
52 static struct exynos5_power *const exynos_power = (void *)EXYNOS5_POWER_BASE;
53 
54 /**
55  * Perform a software reset.
56  */
57 void power_reset(void);
58 
59 /**
60  * Power off the system; it should never return.
61  */
62 void power_shutdown(void);
63 
64 /* Enable DPTX PHY */
65 void power_enable_dp_phy(void);
66 
67 /* Initialize the pmic voltages to power up the system */
68 int power_init(void);
69 
70 /* Read the reset status. */
72 
73 /* Read the resume function and call it. */
74 void power_exit_wakeup(void);
75 
76 /* pmu debug is used for xclkout, enable xclkout with source as XXTI */
77 void power_enable_xclkout(void);
78 
79 /* Release UART retention on resume (only for debugging, may conflict with
80  * kernel). */
82 
83 #endif
void power_exit_wakeup(void)
Definition: power.c:58
void power_release_uart_retention(void)
Definition: power.c:78
void power_enable_xclkout(void)
Definition: power.c:71
static struct exynos5_power *const exynos_power
Definition: power.h:52
void power_enable_dp_phy(void)
Definition: power.c:42
check_member(exynos5_power, ps_hold_ctrl, 0x330c)
void power_enable_hw_thermal_trip(void)
Definition: power.c:47
void power_shutdown(void)
Power off the system; it should never return.
Definition: power.c:34
struct exynos5_power __packed
uint32_t power_read_reset_status(void)
Definition: power.c:53
void power_reset(void)
Perform a software reset.
Definition: power.c:20
int power_init(void)
Definition: power.c:65
#define EXYNOS5_POWER_BASE
Definition: cpu.h:13
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint32_t dptx_phy_control
Definition: power.h:39
uint8_t reserved7[0x2724]
Definition: power.h:45
uint32_t om_stat
Definition: power.h:30
uint8_t reserved2[0x0300]
Definition: power.h:33
uint32_t padret_uart_opt
Definition: power.h:46
uint8_t reserved3[0x8]
Definition: power.h:36
uint8_t reserved1[0x03fc]
Definition: power.h:31
uint32_t mipi_phy1_control
Definition: power.h:37
uint8_t reserved4[0x8]
Definition: power.h:38
uint32_t usb_drd_phy_ctrl
Definition: power.h:34
uint8_t reserved8[0x1e0]
Definition: power.h:47
uint32_t ps_hold_ctrl
Definition: power.h:48
uint32_t usb_host_phy_ctrl
Definition: power.h:35
uint8_t reserved5[0xdc]
Definition: power.h:40
uint32_t pmu_debug
Definition: power.h:44
uint32_t sw_reset
Definition: power.h:32
uint32_t inform0
Definition: power.h:41
uint8_t reserved6[0x1f8]
Definition: power.h:43
uint32_t inform1
Definition: power.h:42