Skip to content

Commit 4712dbd

Browse files
Rudraksha Guptaandersson
authored andcommitted
ARM: dts: qcom: msm8960: Add thermal sensor (tsens)
Add support for the thermal sensor (tsens) on the MSM8960 by copying and modifying the relevant nodes from the APQ8064 dtsi. These changes enable thermal management. Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rudraksha Gupta <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 5ee449c commit 4712dbd

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

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

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,48 @@
5252
reg = <0x80000000 0>;
5353
};
5454

55+
thermal-zones {
56+
cpu0-thermal {
57+
polling-delay-passive = <250>;
58+
polling-delay = <1000>;
59+
thermal-sensors = <&tsens 0>;
60+
61+
trips {
62+
cpu_alert0: trip0 {
63+
temperature = <60000>;
64+
hysteresis = <10000>;
65+
type = "passive";
66+
};
67+
68+
cpu_crit0: trip1 {
69+
temperature = <95000>;
70+
hysteresis = <10000>;
71+
type = "critical";
72+
};
73+
};
74+
};
75+
76+
cpu1-thermal {
77+
polling-delay-passive = <250>;
78+
polling-delay = <1000>;
79+
thermal-sensors = <&tsens 1>;
80+
81+
trips {
82+
cpu_alert1: trip0 {
83+
temperature = <60000>;
84+
hysteresis = <10000>;
85+
type = "passive";
86+
};
87+
88+
cpu_crit1: trip1 {
89+
temperature = <95000>;
90+
hysteresis = <10000>;
91+
type = "critical";
92+
};
93+
};
94+
};
95+
};
96+
5597
cpu-pmu {
5698
compatible = "qcom,krait-pmu";
5799
interrupts = <GIC_PPI 10 0x304>;
@@ -115,6 +157,21 @@
115157
cpu-offset = <0x80000>;
116158
};
117159

160+
qfprom: efuse@700000 {
161+
compatible = "qcom,msm8960-qfprom", "qcom,qfprom";
162+
reg = <0x00700000 0x1000>;
163+
#address-cells = <1>;
164+
#size-cells = <1>;
165+
166+
tsens_calib: calib@404 {
167+
reg = <0x404 0x10>;
168+
};
169+
170+
tsens_backup: backup-calib@414 {
171+
reg = <0x414 0x10>;
172+
};
173+
};
174+
118175
msmgpio: pinctrl@800000 {
119176
compatible = "qcom,msm8960-pinctrl";
120177
gpio-controller;
@@ -127,14 +184,26 @@
127184
};
128185

129186
gcc: clock-controller@900000 {
130-
compatible = "qcom,gcc-msm8960";
187+
compatible = "qcom,gcc-msm8960", "syscon";
131188
#clock-cells = <1>;
132189
#reset-cells = <1>;
133190
reg = <0x900000 0x4000>;
134191
clocks = <&cxo_board>,
135192
<&pxo_board>,
136193
<&lcc PLL4>;
137194
clock-names = "cxo", "pxo", "pll4";
195+
196+
tsens: thermal-sensor {
197+
compatible = "qcom,msm8960-tsens";
198+
199+
nvmem-cells = <&tsens_calib>, <&tsens_backup>;
200+
nvmem-cell-names = "calib", "calib_backup";
201+
interrupts = <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
202+
interrupt-names = "uplow";
203+
204+
#qcom,sensors = <5>;
205+
#thermal-sensor-cells = <1>;
206+
};
138207
};
139208

140209
lcc: clock-controller@28000000 {

0 commit comments

Comments
 (0)