public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/5] arm: mxs: Provide Kconfig option to to not use VDD5V as IMX28 PMU source
@ 2023-05-09 14:32 Lukasz Majewski
  2023-05-09 14:32 ` [PATCH 2/5] arm: mxs: Provide Kconfig option to disable battery charging at IMX28 PMU Lukasz Majewski
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Lukasz Majewski @ 2023-05-09 14:32 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Stefano Babic, Peng Fan, Peng Fan, Fabio Estevam,
	'NXP i . MX U-Boot Team', Marek Vasut, Lukasz Majewski

This option sets the current limit for 5V source to zero, so all
the PMU outputs are primarily powered from battery source (DCDC_BAT).

This option may be set on systems, where the 5V is NOT supposed to be
in any scenario powering the system - for example on systems where
DCDC_BAT is connected to fixed and regulated 4.2V source (so the
"battery" is not present).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c | 4 ++++
 arch/arm/mach-imx/mxs/Kconfig               | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index c33170f06d..9965810ac2 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -752,6 +752,10 @@ static void mxs_batt_boot(void)
 		POWER_5VCTRL_CHARGE_4P2_ILIMIT_MASK,
 		0x8 << POWER_5VCTRL_CHARGE_4P2_ILIMIT_OFFSET);
 
+	if (CONFIG_IS_ENABLED(MXS_PMU_MINIMAL_VDD5V_CURRENT))
+		setbits_le32(&power_regs->hw_power_5vctrl,
+			     POWER_5VCTRL_ILIMIT_EQ_ZERO);
+
 	mxs_power_enable_4p2();
 }
 
diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
index b2026a3758..3232b0fb67 100644
--- a/arch/arm/mach-imx/mxs/Kconfig
+++ b/arch/arm/mach-imx/mxs/Kconfig
@@ -51,6 +51,14 @@ endchoice
 config SYS_SOC
 	default "mxs"
 
+config SPL_MXS_PMU_MINIMAL_VDD5V_CURRENT
+	bool "Force minimal current draw from VDD5V by MX28 PMU"
+	default n
+	help
+	  After setting this option, the current drawn from VDD5V
+	  by the PMU is reduced to zero - the DCDC_BATT is used as
+	  the main power source for PMU.
+
 source "board/freescale/mx28evk/Kconfig"
 source "board/liebherr/xea/Kconfig"
 
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-07-11 19:55 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 14:32 [PATCH 1/5] arm: mxs: Provide Kconfig option to to not use VDD5V as IMX28 PMU source Lukasz Majewski
2023-05-09 14:32 ` [PATCH 2/5] arm: mxs: Provide Kconfig option to disable battery charging at IMX28 PMU Lukasz Majewski
2023-07-11 19:42   ` sbabic
2023-05-09 14:32 ` [PATCH 3/5] arm: mxs: Provide Kconfig option to not enable 4P2 regulator in " Lukasz Majewski
2023-07-11 19:43   ` sbabic
2023-05-09 14:32 ` [PATCH 4/5] arm: mxs: Add function to dump PMU registers Lukasz Majewski
2023-07-11 19:46   ` sbabic
2023-05-09 14:32 ` [PATCH 5/5] arm: config: Adjust imx287 based XEA board PMU configuration Lukasz Majewski
2023-07-11 19:46   ` sbabic
2023-05-09 14:40 ` [PATCH 1/5] arm: mxs: Provide Kconfig option to to not use VDD5V as IMX28 PMU source Marek Vasut
2023-05-09 14:46   ` Lukasz Majewski
2023-05-09 14:48     ` Marek Vasut
2023-05-09 15:04       ` Lukasz Majewski
2023-05-09 15:51         ` Marek Vasut
2023-05-19  8:41           ` Lukasz Majewski
2023-05-19 12:43             ` Marek Vasut
2023-05-10 14:28 ` Fabio Estevam
2023-07-11 19:44 ` sbabic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox