diff options
author | Lukasz Majewski | 2023-05-09 16:32:40 +0200 |
---|---|---|
committer | Stefano Babic | 2023-07-11 14:40:03 +0200 |
commit | 249a3cc1afa2bc84788addac46657ca26bb555ac (patch) | |
tree | 98a890f11440dcd8ea2986ca9725d16cd70c55b7 /arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | |
parent | 1c3c601ac54d3e3f301f391c4aa86a891d4db6c2 (diff) |
arm: mxs: Provide Kconfig option to disable battery charging at IMX28 PMU
This new Kconfig option allows disabling the in-PMU battery charging
block. This may be required when DCDC_BAT source is powered not from
battery, but from already regulated, good quality source.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/mxs/spl_power_init.c')
-rw-r--r-- | arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c index 9965810ac27..7c584db27c9 100644 --- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c @@ -756,6 +756,13 @@ static void mxs_batt_boot(void) setbits_le32(&power_regs->hw_power_5vctrl, POWER_5VCTRL_ILIMIT_EQ_ZERO); + if (CONFIG_IS_ENABLED(MXS_PMU_DISABLE_BATT_CHARGE)) { + writel(POWER_CHARGE_PWD_BATTCHRG, + &power_regs->hw_power_charge_set); + writel(POWER_5VCTRL_PWD_CHARGE_4P2_MASK, + &power_regs->hw_power_5vctrl_set); + } + mxs_power_enable_4p2(); } |