[RFC PATCH] mxs: Don't enable 4P2 reg if mx28 is powered only from DCDC_BATT without 5V

Fabio Estevam festevam at gmail.com
Sat Oct 7 19:46:34 CEST 2023


Hi Alan,

[Adding Lukasz and Cody]

On Tue, Aug 30, 2022 at 2:49 PM Alan Kay <alan at londelec.com> wrote:
>
> mxs_power_enable_4p2() was added to mxs_batt_boot() in
> 'commit a0f97610757d ("ARM: mxs: Enable DCDC converter for battery boot")'
> to enable DCDC converter when board is powered from 5V and has
> detected sufficient battery voltage.
> This involves enabling 4P2 regulator and there is a code
> in mxs_power_enable_4p2() that disables VDDIO, VDDA, VDDD outputs of
> the DCDC converter and enables BO for each power rail e.g.
>
>         setbits_le32(&power_regs->hw_power_vddioctrl,
>                 POWER_VDDIOCTRL_DISABLE_FET | POWER_VDDIOCTRL_PWDN_BRNOUT);
>
> In case the mx28 is powered by the 5V source and linear regulators are
> supplying power to the VDDIO, VDDA, VDDD rails there is no issue.
>
> However if the mx28 is powered by the DCDC_BATT source only without 5V,
> disabling the DCDC converter outputs causes brownout power down.
>
> The proposed solution is not to call mxs_power_enable_4p2() at all
> if the mx28 is powered by the DCDC_BATT source only. There is no
> reason to enable 4P2 regulator in this case and setup of all registers
> is done in mxs_batt_boot().
>
> Also there is no need to enable 5V brownout in
> mxs_power_init() in this case.
>
> Please consider if this is acceptable and I will submit a proper patch.
>
> Signed-off-by: Alan Kay <alan at londelec.com>

Cody also sent a fix for this issue:

https://patchwork.ozlabs.org/project/uboot/patch/20230703163340.101490-2-cody@londelec.com/


More information about the U-Boot mailing list