Skip to contentSkip to conversation

arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM

PATCH In review Marek Vasut 2 participants 2 messages Sep 24, 2024 – Sep 25, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM

U-Boot is currently unable to automatically enable regulators which contain DT property regulator-always-on or regulator-boot-on. There is an ongoing work to add this functionality to regulator core code, but until the proper solution lands, add this awful workaround code to force these regulators on. This is specifically needed to assure the VIO regulator used to supply ethernet magnetics is enabled.

---
NOTE: This is for 2024.10 as a bad temporary workaround
---
Cc: Andreas Geisreiter <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 board/dhelectronics/dh_imx6/dh_imx6.c             | 3 +++
 board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c | 3 +++
 2 files changed, 6 insertions(+)
board/dhelectronics/dh_imx6/dh_imx6.c +3 -0
index c8dd30dfeaf..ada44e01424 100644
@@ -30,6 +30,7 @@
 #include <fuse.h>
 #include <i2c_eeprom.h>
 #include <mmc.h>
+#include <power/regulator.h>
 #include <usb.h>
 #include <linux/delay.h>
 #include <usb/ehci-ci.h>
@@ -127,6 +128,8 @@ int board_init(void)
 
 	setup_fec_clock();
 
+	regulators_enable_boot_on(_DEBUG);
+
 	return 0;
 }
 
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c +3 -0
index c635735d89c..a389ab3c2d9 100644
@@ -14,6 +14,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
+#include <power/regulator.h>
 
 #include "lpddr4_timing.h"
 #include "../common/dh_common.h"
@@ -111,6 +112,8 @@ int dh_setup_mac_address(void)
 
 int board_init(void)
 {
+	regulators_enable_boot_on(_DEBUG);
+
 	return 0;
 }
 
Signature · 1 line
2.45.2
#1 lore raw
Quoted 8 lines · Marek Vasut

U-Boot is currently unable to automatically enable regulators which contain DT property regulator-always-on or regulator-boot-on. There is an ongoing work to add this functionality to regulator core code, but until the proper solution lands, add this awful workaround code to force these regulators on. This is specifically needed to assure the VIO regulator used to supply ethernet magnetics is enabled.

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom