[PATCH] arm64: dts: rockchip: Add the battery charger to Kobol Helios64

Igor Velkov via B4 Relay devnull+iav.iav.lv at kernel.org
Sun Oct 4 15:39:58 PDT 2026


From: Igor Velkov <iav at iav.lv>

Helios64 has a battery backup built around a BQ24133 charger. The
charger works on its own; the SoC only sees two status lines:

- VCC12V_DCIN_GOOD on GPIO0_A2, a divider from the 12 V input, high
  while the mains adapter powers the board;
- CHARGER_STATUS# on GPIO2_D3, the inverted STAT output of the charger,
  high while the battery is charging.

Describe them as a gpio-charger. Both lines have external resistors, so
the pins get no pull.

Assisted-by: LLM
Signed-off-by: Igor Velkov <iav at iav.lv>
---
Tested on 7.3-rc5: online follows the mains adapter, status reads
Charging while the battery recharges and Not charging once it is full.

Schematic, sheets 9, 15 and 29:
https://wiki.kobol.io/helios64/files/schematics/Helios64_Schematics_Rev1.2.pdf
---
 .../arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
index d146e5075b4f..813a39964357 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-kobol-helios64.dts
@@ -62,6 +62,15 @@ chosen {
 		stdout-path = "serial2:1500000n8";
 	};
 
+	dc-charger {
+		compatible = "gpio-charger";
+		charger-type = "mains";
+		gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
+		charge-status-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&dcin_good>, <&charger_status>;
+	};
+
 	clkin_gmac: external-gmac-clock {
 		compatible = "fixed-clock";
 		clock-frequency = <125000000>;
@@ -493,6 +502,16 @@ user1_btn: user1-btn {
 		};
 	};
 
+	charger {
+		charger_status: charger-status {
+			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		dcin_good: dcin-good {
+			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	gmac {
 		gphy_reset: gphy-reset {
 			rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>;

---
base-commit: 36bd12104f6e9462f6e97989fd8ef9eb1609623f
change-id: 20261005-helios64-dc-charger-edc49c499c07

Best regards,
-- 
Igor Velkov <iav at iav.lv>





More information about the linux-arm-kernel mailing list