Skip to content

Commit 9843a22

Browse files
Lukasz MajewskiKukjin Kim
authored andcommitted
ARM: dts: Provide dt bindings identical for Exynos TMU
Presented device tree bindings provide data already hardcoded in the exynos_tmu_data.c file. After this commit, it should be possible to reuse common thermal core framework in Exynos SoCs. Signed-off-by: Lukasz Majewski <[email protected]> Acked-by: Eduardo Valentin <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
1 parent 6562504 commit 9843a22

File tree

7 files changed

+84
-3
lines changed

7 files changed

+84
-3
lines changed

arch/arm/boot/dts/exynos3250.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
#include "skeleton.dtsi"
21+
#include "exynos4-cpu-thermal.dtsi"
2122
#include <dt-bindings/clock/exynos3250.h>
2223

2324
/ {
@@ -193,6 +194,7 @@
193194
interrupts = <0 216 0>;
194195
clocks = <&cmu CLK_TMU_APBIF>;
195196
clock-names = "tmu_apbif";
197+
#include "exynos4412-tmu-sensor-conf.dtsi"
196198
status = "disabled";
197199
};
198200

arch/arm/boot/dts/exynos4.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,10 @@
663663
status = "disabled";
664664
};
665665

666+
tmu: tmu@100C0000 {
667+
#include "exynos4412-tmu-sensor-conf.dtsi"
668+
};
669+
666670
ppmu_dmc0: ppmu_dmc0@106a0000 {
667671
compatible = "samsung,exynos-ppmu";
668672
reg = <0x106a0000 0x2000>;

arch/arm/boot/dts/exynos4210.dtsi

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "exynos4.dtsi"
2323
#include "exynos4210-pinctrl.dtsi"
24+
#include "exynos4-cpu-thermal.dtsi"
2425

2526
/ {
2627
compatible = "samsung,exynos4210", "samsung,exynos4";
@@ -156,16 +157,38 @@
156157
reg = <0x03860000 0x1000>;
157158
};
158159

159-
tmu@100C0000 {
160+
tmu: tmu@100C0000 {
160161
compatible = "samsung,exynos4210-tmu";
161162
interrupt-parent = <&combiner>;
162163
reg = <0x100C0000 0x100>;
163164
interrupts = <2 4>;
164165
clocks = <&clock CLK_TMU_APBIF>;
165166
clock-names = "tmu_apbif";
167+
samsung,tmu_gain = <15>;
168+
samsung,tmu_reference_voltage = <7>;
166169
status = "disabled";
167170
};
168171

172+
thermal-zones {
173+
cpu_thermal: cpu-thermal {
174+
polling-delay-passive = <0>;
175+
polling-delay = <0>;
176+
thermal-sensors = <&tmu 0>;
177+
178+
trips {
179+
cpu_alert0: cpu-alert-0 {
180+
temperature = <85000>; /* millicelsius */
181+
};
182+
cpu_alert1: cpu-alert-1 {
183+
temperature = <100000>; /* millicelsius */
184+
};
185+
cpu_alert2: cpu-alert-2 {
186+
temperature = <110000>; /* millicelsius */
187+
};
188+
};
189+
};
190+
};
191+
169192
g2d@12800000 {
170193
compatible = "samsung,s5pv210-g2d";
171194
reg = <0x12800000 0x1000>;

arch/arm/boot/dts/exynos4x12.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "exynos4.dtsi"
2121
#include "exynos4x12-pinctrl.dtsi"
22+
#include "exynos4-cpu-thermal.dtsi"
2223

2324
/ {
2425
aliases {

arch/arm/boot/dts/exynos5250.dtsi

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <dt-bindings/clock/exynos5250.h>
2121
#include "exynos5.dtsi"
2222
#include "exynos5250-pinctrl.dtsi"
23-
23+
#include "exynos4-cpu-thermal.dtsi"
2424
#include <dt-bindings/clock/exynos-audss-clk.h>
2525

2626
/ {
@@ -238,16 +238,21 @@
238238
status = "disabled";
239239
};
240240

241-
tmu@10060000 {
241+
tmu: tmu@10060000 {
242242
compatible = "samsung,exynos5250-tmu";
243243
reg = <0x10060000 0x100>;
244244
interrupts = <0 65 0>;
245245
clocks = <&clock CLK_TMU>;
246246
clock-names = "tmu_apbif";
247+
#include "exynos4412-tmu-sensor-conf.dtsi"
247248
};
248249

249250
thermal-zones {
250251
cpu_thermal: cpu-thermal {
252+
polling-delay-passive = <0>;
253+
polling-delay = <0>;
254+
thermal-sensors = <&tmu 0>;
255+
251256
cooling-maps {
252257
map0 {
253258
/* Corresponds to 800MHz at freq_table */

arch/arm/boot/dts/exynos5420.dtsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@
782782
interrupts = <0 65 0>;
783783
clocks = <&clock CLK_TMU>;
784784
clock-names = "tmu_apbif";
785+
#include "exynos4412-tmu-sensor-conf.dtsi"
785786
};
786787

787788
tmu_cpu1: tmu@10064000 {
@@ -790,6 +791,7 @@
790791
interrupts = <0 183 0>;
791792
clocks = <&clock CLK_TMU>;
792793
clock-names = "tmu_apbif";
794+
#include "exynos4412-tmu-sensor-conf.dtsi"
793795
};
794796

795797
tmu_cpu2: tmu@10068000 {
@@ -798,6 +800,7 @@
798800
interrupts = <0 184 0>;
799801
clocks = <&clock CLK_TMU>, <&clock CLK_TMU>;
800802
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
803+
#include "exynos4412-tmu-sensor-conf.dtsi"
801804
};
802805

803806
tmu_cpu3: tmu@1006c000 {
@@ -806,6 +809,7 @@
806809
interrupts = <0 185 0>;
807810
clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>;
808811
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
812+
#include "exynos4412-tmu-sensor-conf.dtsi"
809813
};
810814

811815
tmu_gpu: tmu@100a0000 {
@@ -814,6 +818,30 @@
814818
interrupts = <0 215 0>;
815819
clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>;
816820
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
821+
#include "exynos4412-tmu-sensor-conf.dtsi"
822+
};
823+
824+
thermal-zones {
825+
cpu0_thermal: cpu0-thermal {
826+
thermal-sensors = <&tmu_cpu0>;
827+
#include "exynos5420-trip-points.dtsi"
828+
};
829+
cpu1_thermal: cpu1-thermal {
830+
thermal-sensors = <&tmu_cpu1>;
831+
#include "exynos5420-trip-points.dtsi"
832+
};
833+
cpu2_thermal: cpu2-thermal {
834+
thermal-sensors = <&tmu_cpu2>;
835+
#include "exynos5420-trip-points.dtsi"
836+
};
837+
cpu3_thermal: cpu3-thermal {
838+
thermal-sensors = <&tmu_cpu3>;
839+
#include "exynos5420-trip-points.dtsi"
840+
};
841+
gpu_thermal: gpu-thermal {
842+
thermal-sensors = <&tmu_gpu>;
843+
#include "exynos5420-trip-points.dtsi"
844+
};
817845
};
818846

819847
watchdog: watchdog@101D0000 {

arch/arm/boot/dts/exynos5440.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@
219219
interrupts = <0 58 0>;
220220
clocks = <&clock CLK_B_125>;
221221
clock-names = "tmu_apbif";
222+
#include "exynos5440-tmu-sensor-conf.dtsi"
222223
};
223224

224225
tmuctrl_1: tmuctrl@16011C {
@@ -227,6 +228,7 @@
227228
interrupts = <0 58 0>;
228229
clocks = <&clock CLK_B_125>;
229230
clock-names = "tmu_apbif";
231+
#include "exynos5440-tmu-sensor-conf.dtsi"
230232
};
231233

232234
tmuctrl_2: tmuctrl@160120 {
@@ -235,6 +237,22 @@
235237
interrupts = <0 58 0>;
236238
clocks = <&clock CLK_B_125>;
237239
clock-names = "tmu_apbif";
240+
#include "exynos5440-tmu-sensor-conf.dtsi"
241+
};
242+
243+
thermal-zones {
244+
cpu0_thermal: cpu0-thermal {
245+
thermal-sensors = <&tmuctrl_0>;
246+
#include "exynos5440-trip-points.dtsi"
247+
};
248+
cpu1_thermal: cpu1-thermal {
249+
thermal-sensors = <&tmuctrl_1>;
250+
#include "exynos5440-trip-points.dtsi"
251+
};
252+
cpu2_thermal: cpu2-thermal {
253+
thermal-sensors = <&tmuctrl_2>;
254+
#include "exynos5440-trip-points.dtsi"
255+
};
238256
};
239257

240258
sata@210000 {

0 commit comments

Comments
 (0)