From a0486e8f1bb4f17349226e6d613140b7a3899c67 Mon Sep 17 00:00:00 2001 From: Philipp Tomsich Date: Fri, 29 Sep 2017 18:59:14 +0200 Subject: [wip???] usbhub_enable --- arch/arm/dts/rk3399-puma.dtsi | 6 +++--- board/theobroma-systems/puma_rk3399/puma-rk3399.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/arch/arm/dts/rk3399-puma.dtsi b/arch/arm/dts/rk3399-puma.dtsi index 6dd448d517..091446ba05 100644 --- a/arch/arm/dts/rk3399-puma.dtsi +++ b/arch/arm/dts/rk3399-puma.dtsi @@ -97,8 +97,8 @@ regulator-name = "usbhub_enable"; enable-active-low; gpio = <&gpio4 3 GPIO_ACTIVE_HIGH>; - regulator-always-on; - regulator-boot-on; +/* regulator-always-on; */ +/* regulator-boot-on; */ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; @@ -534,7 +534,7 @@ }; &dwc3_typec0 { - status = "okay"; + status = "disabled"; }; &usb_host1_ehci { diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c index 2b4988e2d2..26c4535f1b 100644 --- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c +++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c @@ -29,6 +29,16 @@ int board_init(void) if (ret) debug("%s: Cannot enable boot on regulator\n", __func__); + { + struct udevice *regulator; + int ret = regulator_get_by_platname("usbhub_enable", ®ulator); + if (ret) { + printf("%s: could not get 'usbhub_enable' regulator\n", __func__); + } else { + regulator_set_enable(regulator, true); + } + } + return 0; } -- cgit v1.2.3