USB power on upstream U-Boot (patch)
With upstream U-Boot, the PWR_5V signal isn't asserted on boot (which is presumably done by other U-Boot versions), so the USB ports and the keyboard/touchpad are not powered. This patch fixes this by adding the information in the DTS.
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
index 3a5121c458c2..aada536b1d70 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
@@ -296,7 +296,27 @@
pinctrl-0 = <&vcc5v0_host_en>;
regulator-name = "vcc5v0_host";
regulator-always-on;
- vin-supply = <&vcc_sys>;
+ vin-supply = <&pwr_5v>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ pwr_5v: vcc5v0-pwr-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwr_5v_drv>;
+ regulator-name = "pwr_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_12v>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
};
vcc5v0_typec: vcc5v0-typec-regulator {
@@ -864,6 +884,10 @@
vcc5v0_host_en: vcc5v0-host-en {
rockchip,pins = <4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
};
+
+ pwr_5v_drv: pwr-5v-drv {
+ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
};
i2s1 {
On a similar note, I'm not sure if vcc5v0_host_en is correct either, since the schematics say GPIO4_C5 is connected to CHG_INT, that is, the low-charge interrupt signal from the fuel gauge chip. It does, however, appear to work as it is, so I'm not sure if action is required.