diff options
author | Kever Yang <kever.yang@rock-chips.com> | 2016-08-24 12:02:22 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-09-22 07:56:51 -0600 |
commit | 05c6e30c57b6c599771c669a80fb127cc9f8d9c3 (patch) | |
tree | 804d4abae5515a366046554fc5f2b745e0fb133e /board | |
parent | 35627683f82f9b3bc564c838dc26c393a5425c9a (diff) | |
download | u-boot-05c6e30c57b6c599771c669a80fb127cc9f8d9c3.zip u-boot-05c6e30c57b6c599771c669a80fb127cc9f8d9c3.tar.gz u-boot-05c6e30c57b6c599771c669a80fb127cc9f8d9c3.tar.bz2 |
board: evb-rk3399: enable usb 2.0 host vbus power on board_init
rk3399 using one gpio control signal for two usb 2.0 host port,
it's better to enable the power in board file instead of in usb driver.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/rockchip/evb_rk3399/evb-rk3399.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/board/rockchip/evb_rk3399/evb-rk3399.c b/board/rockchip/evb_rk3399/evb-rk3399.c index d394276..2580b38 100644 --- a/board/rockchip/evb_rk3399/evb-rk3399.c +++ b/board/rockchip/evb_rk3399/evb-rk3399.c @@ -7,12 +7,13 @@ #include <dm.h> #include <dm/pinctrl.h> #include <asm/arch/periph.h> +#include <power/regulator.h> DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - struct udevice *pinctrl; + struct udevice *pinctrl, *regulator; int ret; /* @@ -38,6 +39,18 @@ int board_init(void) goto out; } + ret = regulator_get_by_platname("vcc5v0_host", ®ulator); + if (ret) { + debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret); + goto out; + } + + ret = regulator_set_enable(regulator, true); + if (ret) { + debug("%s vcc5v0-host-en set fail!\n", __func__); + goto out; + } + out: return 0; } |