]> git.sur5r.net Git - u-boot/commitdiff
rockchip: evb_rk3399: init vdd_center regulator
authorKever Yang <kever.yang@rock-chips.com>
Fri, 23 Sep 2016 07:57:20 +0000 (15:57 +0800)
committerSimon Glass <sjg@chromium.org>
Sun, 2 Oct 2016 00:35:01 +0000 (18:35 -0600)
Add vdd_center pwm regulator get_device to
enable this regulator.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
board/rockchip/evb_rk3399/evb-rk3399.c

index 2580b389ac595f7fe72a61b1e7770f64da38b62e..c6e6cd3e0b29120b0f32ee83ea2e85cbcd21c58d 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <dm/pinctrl.h>
+#include <dm/uclass-internal.h>
 #include <asm/arch/periph.h>
 #include <power/regulator.h>
 
@@ -39,6 +40,11 @@ int board_init(void)
                goto out;
        }
 
+       /* rk3399 need init vdd_center to get correct output voltage */
+       ret = regulator_get_by_platname("vdd_center", &regulator);
+       if (ret)
+               debug("%s: Cannot get vdd_center regulator\n", __func__);
+
        ret = regulator_get_by_platname("vcc5v0_host", &regulator);
        if (ret) {
                debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret);