[PATCH v3 5/6] arm64: dts: rockchip: fix USB OTG power on Photonicat in battery mode
Coia Prant
coiaprant at gmail.com
Mon Nov 2 09:44:49 PST 2026
When the Ariaboard Photonicat runs on battery, the USB port has no power
output and attached devices are not detected. With the external supply
connected, the same port works fine.
Per the schematic, the 5V_OUT rail that feeds the USB load switch (U12,
enabled by USB_HOST_PWREN_H) is the OR-ed combination of two sources:
- VCCIN_5V (external DC input), OR-ed via D16.
- 5V_BOOST from the VBAT boost converter (U16, enabled by BOOST_EN /
GPIO4_D2), OR-ed via D5002.
The 5V_OUT rail has no enable pin of its own. Since the regulator
framework can only model a single power supply dependency per
fixed-regulator, add a regulator_5v_boost node for the VBAT boost
converter, and a regulator_5v_out node to represent the OR-ed 5V_OUT
rail. Bind the vin-supply of regulator_5v_out to regulator_5v_boost to
ensure VBAT is boosted when the system runs on battery. When VCCIN_5V
is present, D16 takes over.
The USB load switch (vcc5v0_usb30_otg0) is then supplied by
regulator_5v_out. This restores USB host functionality on battery
power, matching the vendor firmware behaviour.
Link: https://github.com/immortalwrt/immortalwrt/issues/1534
Link: https://github.com/photonicat/photonicat-hardware/blob/main/Photonicat_rk3568_sch_20221116.pdf (Page 15,18)
Fixes: ba124e06ce7b ("arm64: dts: rockchip: add dts for Ariaboard Photonicat RK3568")
Cc: stable at vger.kernel.org
Signed-off-by: Coia Prant <coiaprant at gmail.com>
---
.../boot/dts/rockchip/rk3568-photonicat.dts | 49 ++++++++++++++++++-
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
index 7e0a2ab829209..290e3ee97c709 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-photonicat.dts
@@ -59,6 +59,47 @@ hdmi_con_in: endpoint {
};
};
+ regulator_5v_boost: regulator-5v-boost {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&boost_en>;
+ regulator-name = "5v_boost";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vbat>;
+ };
+
+ /*
+ * 5V_OUT is the OR-ed combination of the VBAT boost (via D5002)
+ * and VCCIN_5V (via D16).
+ * It has no enable pin of its own.
+ * Model it as a fixed regulator depending on the boost converter,
+ * so that VBAT is boosted when running on battery.
+ *
+ * 5V_OUT supplies:
+ * - VCC5V0_USB30_OTG0 (USB VBUS via U12 load switch)
+ * - VCC5V_HDMI (HDMI 5V via D5000)
+ * - J53 expansion header (Pin 1)
+ */
+ regulator_5v_out: regulator-5v-out {
+ compatible = "regulator-fixed";
+ regulator-name = "5v_out";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <®ulator_5v_boost>;
+ };
+
+ vbat: regulator-vbat {
+ compatible = "regulator-fixed";
+ regulator-name = "vbat";
+ regulator-min-microvolt = <3700000>;
+ regulator-max-microvolt = <3700000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vcc_1v8: regulator-vcc-1v8 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
@@ -148,7 +189,7 @@ vcc5v0_usb30_otg0: regulator-vcc5v0-usb30-otg0 {
regulator-name = "vcc5v0_usb30_otg0";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
- vin-supply = <&vccin_5v>;
+ vin-supply = <®ulator_5v_out>;
};
vccin_5v: regulator-vccin-5v {
@@ -446,6 +487,12 @@ pcie_pwren_h: pcie-pwren-h {
};
};
+ power {
+ boost_en: boost-en {
+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sdmmc0 {
sdmmc0_pwren: sdmmc0-pwren {
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
--
2.47.3
More information about the linux-arm-kernel
mailing list