mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-04 18:53:42 +00:00
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>
This commit is contained in:
parent
a80a49b237
commit
72a093a8ac
1 changed files with 20 additions and 0 deletions
|
@ -132,6 +132,21 @@ const char *get_imx_type(u32 imxtype)
|
||||||
return "7ULP";
|
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)
|
int print_cpuinfo(void)
|
||||||
{
|
{
|
||||||
u32 cpurev;
|
u32 cpurev;
|
||||||
|
@ -160,6 +175,11 @@ int print_cpuinfo(void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ldo_mode_is_enabled())
|
||||||
|
printf("PMC1: LDO enabled mode\n");
|
||||||
|
else
|
||||||
|
printf("PMC1: LDO bypass mode\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue