[U-Boot] [PATCH v2 3/4] rockchip: evb-rk3328: enable boot on regulator

Kever Yang kever.yang at rock-chips.com
Thu Jun 8 07:32:05 UTC 2017


Enable all the boot-on regulator in default.

Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
Acked-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 board/rockchip/evb_rk3328/evb-rk3328.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/board/rockchip/evb_rk3328/evb-rk3328.c b/board/rockchip/evb_rk3328/evb-rk3328.c
index 823c5da..cabc959 100644
--- a/board/rockchip/evb_rk3328/evb-rk3328.c
+++ b/board/rockchip/evb_rk3328/evb-rk3328.c
@@ -10,12 +10,14 @@
 #include <asm/armv8/mmu.h>
 #include <asm/io.h>
 #include <dwc3-uboot.h>
+#include <power/regulator.h>
 #include <usb.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
+	int ret;
 #define GRF_BASE	0xff100000
 	struct rk3328_grf_regs * const grf = (void *)GRF_BASE;
 
@@ -23,7 +25,11 @@ int board_init(void)
 	rk_clrsetreg(&grf->com_iomux, IOMUX_SEL_UART2_MASK,
 		     IOMUX_SEL_UART2_M1 << IOMUX_SEL_UART2_SHIFT);
 
-	return 0;
+	ret = regulators_enable_boot_on(false);
+	if (ret)
+		debug("%s: Cannot enable boot on regulator\n", __func__);
+
+	return ret;
 }
 
 int dram_init(void)
-- 
1.9.1



More information about the U-Boot mailing list