* [PATCH] arm64: dts: qcom: sdm845-sony: Add battery properties
@ 2026-09-07 15:58 Shujath Mohd
2026-09-07 16:06 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Shujath Mohd @ 2026-09-07 15:58 UTC (permalink / raw)
To: linux-arm-msm
Cc: devicetree, linux-kernel, andersson, konradybcio, robh, krzk+dt,
conor+dt, Shujath Mohd
Add simple-battery nodes describing the design capacity and voltage
limits of the Xperia TAMA batteries.
The Xperia XZ2, XZ2 Compact, and XZ3 use 3.4 V as the drained
battery voltage and 4.245 V as the fully charged voltage.
Signed-off-by: Shujath Mohd <shujath@outlook.in>
---
arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts | 7 +++++++
.../boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts | 7 +++++++
.../arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts | 7 +++++++
3 files changed, 21 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
index 6e65909ab582..16e676ac9630 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
@@ -10,6 +10,13 @@
/ {
model = "Sony Xperia XZ2";
compatible = "sony,akari-row", "qcom,sdm845";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3180000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4245000>;
+ };
};
&panel {
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
index 82e59e453354..3bf9db963299 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
@@ -26,6 +26,13 @@ ts_vddio_supply: ts-vddio-regulator {
enable-active-high;
regulator-boot-on;
};
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <3330000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4245000>;
+ };
};
&ibb {
diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
index dc15ab1a2716..013987184b39 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
@@ -10,6 +10,13 @@
/ {
model = "Sony Xperia XZ2 Compact";
compatible = "sony,apollo-row", "qcom,sdm845";
+
+ battery: battery {
+ compatible = "simple-battery";
+ charge-full-design-microamp-hours = <2870000>;
+ voltage-min-design-microvolt = <3400000>;
+ voltage-max-design-microvolt = <4245000>;
+ };
};
&panel {
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sdm845-sony: Add battery properties
2026-09-07 15:58 [PATCH] arm64: dts: qcom: sdm845-sony: Add battery properties Shujath Mohd
@ 2026-09-07 16:06 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-09-07 16:06 UTC (permalink / raw)
To: Shujath Mohd; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `simple-battery` nodes are orphaned and will be ignored by the power supply framework because no charger or fuel gauge references them.
--
commit b9560b36965d2ab30a517952de24fe50774a59c5
Author: Shujath Mohd <shujath@outlook.in>
arm64: dts: qcom: sdm845-sony: Add battery properties
This commit adds simple-battery nodes for the Xperia XZ2, XZ2 Compact,
and XZ3 device trees to specify design capacity and voltage limits.
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
> index 6e65909ab582e..16e676ac96304 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akari.dts
> @@ -10,6 +10,13 @@
> / {
> model = "Sony Xperia XZ2";
> compatible = "sony,akari-row", "qcom,sdm845";
> +
> + battery: battery {
> + compatible = "simple-battery";
> + charge-full-design-microamp-hours = <3180000>;
[Severity: Medium]
Are these newly added battery nodes orphaned?
During initialization, the power_supply subsystem relies on
power_supply_get_battery_info() to parse battery information. This function
explicitly searches for a monitored-battery = <&battery>; phandle in the
consumer node (such as a PMIC charger or fuel gauge).
Since there is no device tree node referencing this battery label, the
parsing is skipped entirely and the power supply drivers will fall back to
hardware defaults.
> + voltage-min-design-microvolt = <3400000>;
> + voltage-max-design-microvolt = <4245000>;
> + };
> };
>
> &panel {
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
> index 82e59e4533549..3bf9db9632991 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts
> @@ -26,6 +26,13 @@ ts_vddio_supply: ts-vddio-regulator {
> enable-active-high;
> regulator-boot-on;
> };
> +
> + battery: battery {
> + compatible = "simple-battery";
> + charge-full-design-microamp-hours = <3330000>;
[Severity: Medium]
As with the akari device tree, does this node also lack the required
monitored-battery phandle linkage from a charger or fuel gauge node?
> + voltage-min-design-microvolt = <3400000>;
> + voltage-max-design-microvolt = <4245000>;
> + };
> };
>
> &ibb {
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
> index dc15ab1a27165..013987184b398 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-apollo.dts
> @@ -10,6 +10,13 @@
> / {
> model = "Sony Xperia XZ2 Compact";
> compatible = "sony,apollo-row", "qcom,sdm845";
> +
> + battery: battery {
> + compatible = "simple-battery";
> + charge-full-design-microamp-hours = <2870000>;
[Severity: Medium]
Will this battery node also be ignored by the power supply framework due
to the missing consumer phandle?
> + voltage-min-design-microvolt = <3400000>;
> + voltage-max-design-microvolt = <4245000>;
> + };
> };
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/PUZPR01MB51411878AC2B70673F77ED38C3B22@PUZPR01MB5141.apcprd01.prod.exchangelabs.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-07 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 15:58 [PATCH] arm64: dts: qcom: sdm845-sony: Add battery properties Shujath Mohd
2026-09-07 16:06 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox