Merge branch '2019-07-29-ti-imports'
[oweals/u-boot.git] / board / rockchip / evb_rk3399 / evb-rk3399.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2016 Rockchip Electronics Co., Ltd
4  */
5
6 #include <common.h>
7 #include <dm.h>
8 #include <asm/arch-rockchip/periph.h>
9 #include <power/regulator.h>
10
11 #ifndef CONFIG_SPL_BUILD
12 int board_early_init_f(void)
13 {
14         struct udevice *regulator;
15         int ret;
16
17         ret = regulator_get_by_platname("vcc5v0_host", &regulator);
18         if (ret) {
19                 debug("%s vcc5v0_host init fail! ret %d\n", __func__, ret);
20                 goto out;
21         }
22
23         ret = regulator_set_enable(regulator, true);
24         if (ret)
25                 debug("%s vcc5v0-host-en set fail! ret %d\n", __func__, ret);
26
27 out:
28         return 0;
29 }
30 #endif