xref: /OK3568_Linux_fs/u-boot/board/rockchip/evb_rk3128/evb-rk3128.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * (C) Copyright 2017 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <dm.h>
9 #include <power/rk8xx_pmic.h>
10 
11 DECLARE_GLOBAL_DATA_PTR;
12 
board_early_init_r(void)13 int board_early_init_r(void)
14 {
15 	struct udevice *pmic;
16 	int ret;
17 
18 	ret = uclass_first_device_err(UCLASS_PMIC, &pmic);
19 	if (ret)
20 		return ret;
21 
22 	/* Increase USB input current to 2A */
23 	ret = rk818_spl_configure_usb_input_current(pmic, 2000);
24 	if (ret)
25 		return ret;
26 
27 	return 0;
28 }
29