]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: sc8280xp-pmics: Define adc for temp-alarms
authorBjorn Andersson <quic_bjorande@quicinc.com>
Sun, 11 Feb 2024 04:42:00 +0000 (20:42 -0800)
committerBjorn Andersson <andersson@kernel.org>
Wed, 14 Feb 2024 05:30:01 +0000 (23:30 -0600)
sc8280xp-pmics define the two thermal zones "pm8280-1-thermal" and
"pm8280-2-thermal", but the related temp-alarm instances are not tied to
any adc channels, and as such continuously report the bogus temperature
of 37C.

After previously defining these adc channels across all boards using
sc8280xp-pmics.dtsi, we can now add these references.

This does however mean that we have a non-disabled node referencing
default-disabled nodes, requiring each board to enable the pmk8280_vadc.
Avoid this by marking pmk8280_vadc okay.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240210-sc8280xp-pmic-thermal-v1-2-a1c215a17d10@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
arch/arm64/boot/dts/qcom/sc8280xp-pmics.dtsi

index 22f10813aa3cfc25f51b79d7f0b623f5c93d1385..ffc4406422ae2f82c9636e0fb521f34a1d28c1eb 100644 (file)
        };
 };
 
-&pmk8280_vadc {
-       status = "okay";
-};
-
 &qup0 {
        status = "okay";
 };
index ce2564a6c26e10ce1dec4f60cd8c330db4304154..ad42966c94e504d93fed91a1518d8f2aff75a4b8 100644 (file)
 };
 
 &pmk8280_vadc {
-       status = "okay";
-
        channel@144 {
                reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
                qcom,hw-settle-time = <200>;
index 58fea376f0e2dcd336bab5387d9841868bb17654..945de77911de1ce558c500a94de8f80b7ee05d20 100644 (file)
@@ -87,7 +87,6 @@
                        #address-cells = <1>;
                        #size-cells = <0>;
                        #io-channel-cells = <1>;
-                       status = "disabled";
 
                        channel@3 {
                                reg = <PMK8350_ADC7_DIE_TEMP>;
                        compatible = "qcom,spmi-temp-alarm";
                        reg = <0xa00>;
                        interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(1)>;
+                       io-channel-names = "thermal";
                        #thermal-sensor-cells = <0>;
                };
 
                        compatible = "qcom,spmi-temp-alarm";
                        reg = <0xa00>;
                        interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
+                       io-channels = <&pmk8280_vadc PM8350_ADC7_DIE_TEMP(3)>;
+                       io-channel-names = "thermal";
                        #thermal-sensor-cells = <0>;
                };