c142acf63f6a514f499bcb631455891f7597ba95
[openwrt/openwrt.git] / target / linux / ipq807x / patches-5.15 / 0045-v6.2-arm64-dts-qcom-ipq8074-add-thermal-nodes.patch
1 From c3cc0c2a17f552be2426200e47a9e2c62cf449ce Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robimarko@gmail.com>
3 Date: Fri, 19 Aug 2022 00:02:45 +0200
4 Subject: [PATCH] arm64: dts: qcom: ipq8074: add thermal nodes
5
6 IPQ8074 has a tsens v2.3.0 peripheral which monitors
7 temperatures around the various subsystems on the
8 die.
9
10 So lets add the tsens and thermal zone nodes, passive
11 CPU cooling will come in later patches after CPU frequency
12 scaling is supported.
13
14 Signed-off-by: Robert Marko <robimarko@gmail.com>
15 Signed-off-by: Bjorn Andersson <andersson@kernel.org>
16 Link: https://lore.kernel.org/r/20220818220245.338396-5-robimarko@gmail.com
17 ---
18 arch/arm64/boot/dts/qcom/ipq8074.dtsi | 96 +++++++++++++++++++++++++++
19 1 file changed, 96 insertions(+)
20
21 --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
22 +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
23 @@ -273,6 +273,16 @@
24 status = "disabled";
25 };
26
27 + tsens: thermal-sensor@4a9000 {
28 + compatible = "qcom,ipq8074-tsens";
29 + reg = <0x4a9000 0x1000>, /* TM */
30 + <0x4a8000 0x1000>; /* SROT */
31 + interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
32 + interrupt-names = "combined";
33 + #qcom,sensors = <16>;
34 + #thermal-sensor-cells = <1>;
35 + };
36 +
37 cryptobam: dma-controller@704000 {
38 compatible = "qcom,bam-v1.7.0";
39 reg = <0x00704000 0x20000>;
40 @@ -873,4 +883,90 @@
41 <GIC_PPI 4 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
42 <GIC_PPI 1 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
43 };
44 +
45 + thermal-zones {
46 + nss-top-thermal {
47 + polling-delay-passive = <250>;
48 + polling-delay = <1000>;
49 +
50 + thermal-sensors = <&tsens 4>;
51 + };
52 +
53 + nss0-thermal {
54 + polling-delay-passive = <250>;
55 + polling-delay = <1000>;
56 +
57 + thermal-sensors = <&tsens 5>;
58 + };
59 +
60 + nss1-thermal {
61 + polling-delay-passive = <250>;
62 + polling-delay = <1000>;
63 +
64 + thermal-sensors = <&tsens 6>;
65 + };
66 +
67 + wcss-phya0-thermal {
68 + polling-delay-passive = <250>;
69 + polling-delay = <1000>;
70 +
71 + thermal-sensors = <&tsens 7>;
72 + };
73 +
74 + wcss-phya1-thermal {
75 + polling-delay-passive = <250>;
76 + polling-delay = <1000>;
77 +
78 + thermal-sensors = <&tsens 8>;
79 + };
80 +
81 + cpu0_thermal: cpu0-thermal {
82 + polling-delay-passive = <250>;
83 + polling-delay = <1000>;
84 +
85 + thermal-sensors = <&tsens 9>;
86 + };
87 +
88 + cpu1_thermal: cpu1-thermal {
89 + polling-delay-passive = <250>;
90 + polling-delay = <1000>;
91 +
92 + thermal-sensors = <&tsens 10>;
93 + };
94 +
95 + cpu2_thermal: cpu2-thermal {
96 + polling-delay-passive = <250>;
97 + polling-delay = <1000>;
98 +
99 + thermal-sensors = <&tsens 11>;
100 + };
101 +
102 + cpu3_thermal: cpu3-thermal {
103 + polling-delay-passive = <250>;
104 + polling-delay = <1000>;
105 +
106 + thermal-sensors = <&tsens 12>;
107 + };
108 +
109 + cluster_thermal: cluster-thermal {
110 + polling-delay-passive = <250>;
111 + polling-delay = <1000>;
112 +
113 + thermal-sensors = <&tsens 13>;
114 + };
115 +
116 + wcss-phyb0-thermal {
117 + polling-delay-passive = <250>;
118 + polling-delay = <1000>;
119 +
120 + thermal-sensors = <&tsens 14>;
121 + };
122 +
123 + wcss-phyb1-thermal {
124 + polling-delay-passive = <250>;
125 + polling-delay = <1000>;
126 +
127 + thermal-sensors = <&tsens 15>;
128 + };
129 + };
130 };