Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-pinebook-pro
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tobias Schramm
  • linux-pinebook-pro
  • Issues
  • #2
Closed
Open
Issue created Dec 16, 2019 by Jona Stubbe@jstubbe

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.

Assignee
Assign to
Time tracking