[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251004-fix-pmi8950-vadc-v1-2-3143ecab99e9@smankusors.com>
Date: Sat, 4 Oct 2025 13:12:19 +0000 (UTC)
From: Antony Kurniawan Soemardi <linux@...nkusors.com>
To: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Antony Kurniawan Soemardi <linux@...nkusors.com>
Subject: [PATCH 2/2] arm64: dts: qcom: pmi8950: Fix VADC channel scaling
factors
Fix USBIN/DCIN scaling to match the downstream implementation [1].
Downstream defines the following scaling mappings [2], corresponding
to mainline pre-scaling values:
<4> -> <1 20>
<1> -> <1 3>
[1] https://github.com/LineageOS/android_kernel_qcom_msm8953/blob/e6b46fc6f52e754eef5ce6265c7d82a3622e0b0f/arch/arm64/boot/dts/qcom/pmi8950.dtsi#L55-L86
[2] https://github.com/LineageOS/android_kernel_qcom_msm8953/blob/e6b46fc6f52e754eef5ce6265c7d82a3622e0b0f/include/linux/qpnp/qpnp-adc.h#L342-L357
Signed-off-by: Antony Kurniawan Soemardi <linux@...nkusors.com>
---
arch/arm64/boot/dts/qcom/pmi8950.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/pmi8950.dtsi b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
index 16e436b68a7c161b1afd4f3eac3d7d8564e40512..5bd91a5cd1245f34ef37d98b1a2669582e84876c 100644
--- a/arch/arm64/boot/dts/qcom/pmi8950.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8950.dtsi
@@ -22,19 +22,19 @@ pmi8950_vadc: adc@...0 {
channel@0 {
reg = <VADC_USBIN>;
- qcom,pre-scaling = <1 4>;
+ qcom,pre-scaling = <1 20>;
label = "usbin";
};
channel@1 {
reg = <VADC_DCIN>;
- qcom,pre-scaling = <1 4>;
+ qcom,pre-scaling = <1 20>;
label = "dcin";
};
channel@2 {
reg = <VADC_VCHG_SNS>;
- qcom,pre-scaling = <1 1>;
+ qcom,pre-scaling = <1 3>;
label = "vchg_sns";
};
--
2.34.1
Powered by blists - more mailing lists