Skip to content

Commit 1b118df

Browse files
mlehtimaandersson
authored andcommitted
ARM: dts: qcom: pm8226: Add thermal sensor and thermal zone config
Add thermal sensor, which is using on chip VADC channel to report PMIC die temperature. Also add the corresponding thermal zone. Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230529221501.43455-2-matti.lehtimaki@gmail.com
1 parent d59b294 commit 1b118df

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

arch/arm/boot/dts/qcom-pm8226.dtsi

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,36 @@
44
#include <dt-bindings/interrupt-controller/irq.h>
55
#include <dt-bindings/spmi/spmi.h>
66

7+
/ {
8+
thermal-zones {
9+
pm8226-thermal {
10+
polling-delay-passive = <100>;
11+
polling-delay = <0>;
12+
thermal-sensors = <&pm8226_temp>;
13+
14+
trips {
15+
trip0 {
16+
temperature = <105000>;
17+
hysteresis = <2000>;
18+
type = "passive";
19+
};
20+
21+
trip1 {
22+
temperature = <125000>;
23+
hysteresis = <2000>;
24+
type = "hot";
25+
};
26+
27+
crit {
28+
temperature = <145000>;
29+
hysteresis = <2000>;
30+
type = "critical";
31+
};
32+
};
33+
};
34+
};
35+
};
36+
737
&spmi_bus {
838
pm8226_0: pm8226@0 {
939
compatible = "qcom,pm8226", "qcom,spmi-pmic";
@@ -55,6 +85,15 @@
5585
chg_otg: otg-vbus { };
5686
};
5787

88+
pm8226_temp: temp-alarm@2400 {
89+
compatible = "qcom,spmi-temp-alarm";
90+
reg = <0x2400>;
91+
interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
92+
io-channels = <&pm8226_vadc VADC_DIE_TEMP>;
93+
io-channel-names = "thermal";
94+
#thermal-sensor-cells = <0>;
95+
};
96+
5897
pm8226_vadc: adc@3100 {
5998
compatible = "qcom,spmi-vadc";
6099
reg = <0x3100>;

0 commit comments

Comments
 (0)