]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: pmi8950: Fix VADC channel scaling factors
authorAntony Kurniawan Soemardi <linux@smankusors.com>
Sat, 4 Oct 2025 13:12:19 +0000 (13:12 +0000)
committerBjorn Andersson <andersson@kernel.org>
Fri, 17 Oct 2025 22:39:21 +0000 (15:39 -0700)
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@smankusors.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20251004-fix-pmi8950-vadc-v1-2-3143ecab99e9@smankusors.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/pmi8950.dtsi

index 16e436b68a7c161b1afd4f3eac3d7d8564e40512..5bd91a5cd1245f34ef37d98b1a2669582e84876c 100644 (file)
 
                        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";
                        };