]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM
authorMarek Vasut <marex@denx.de>
Tue, 24 Sep 2024 22:08:23 +0000 (00:08 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 25 Sep 2024 18:21:47 +0000 (12:21 -0600)
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.

Signed-off-by: Marek Vasut <marex@denx.de>
board/dhelectronics/dh_imx6/dh_imx6.c
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c

index c8dd30dfeaf532e32cb9f0cadd2b12a44625b4b7..ada44e0142445d57ccf27f1f7deed2916dacbe6b 100644 (file)
@@ -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;
 }
 
index c635735d89cb92d748014a39c974290ebd28d1b3..a389ab3c2d918f5e03c6c20d5f6447834acfd48c 100644 (file)
@@ -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;
 }