diff options
author | Fabio Estevam <festevam@gmail.com> | 2019-11-05 09:47:50 -0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-12-06 12:05:08 +0100 |
commit | 72a093a8acf5492c2ced612506ad9a9751a65b18 (patch) | |
tree | 1f6ff5e17e1fcb7d8037044c4f205cae94934a6e /arch/arm/mach-imx/mx7ulp | |
parent | a80a49b2375b3947235e27849e07d38d3f5cfe30 (diff) |
mx7ulp: Print the LDO mode status
As per the i.MX7ULP datasheet, it can boot in LDO enabled mode
or LDO bypass mode.
Print the LDO mode status in the U-Boot log for convenience.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Diffstat (limited to 'arch/arm/mach-imx/mx7ulp')
-rw-r--r-- | arch/arm/mach-imx/mx7ulp/soc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx7ulp/soc.c b/arch/arm/mach-imx/mx7ulp/soc.c index 4b6014e724..4343cac99c 100644 --- a/arch/arm/mach-imx/mx7ulp/soc.c +++ b/arch/arm/mach-imx/mx7ulp/soc.c @@ -132,6 +132,21 @@ const char *get_imx_type(u32 imxtype) return "7ULP"; } +#define PMC0_BASE_ADDR 0x410a1000 +#define PMC0_CTRL 0x28 +#define PMC0_CTRL_LDOEN BIT(31) + +static bool ldo_mode_is_enabled(void) +{ + unsigned int reg; + + reg = readl(PMC0_BASE_ADDR + PMC0_CTRL); + if (reg & PMC0_CTRL_LDOEN) + return true; + else + return false; +} + int print_cpuinfo(void) { u32 cpurev; @@ -160,6 +175,11 @@ int print_cpuinfo(void) break; } + if (ldo_mode_is_enabled()) + printf("PMC1: LDO enabled mode\n"); + else + printf("PMC1: LDO bypass mode\n"); + return 0; } #endif |