Skip to content

Commit 65e4a0f

Browse files
hal-fengConchuOD
authored andcommitted
riscv: dts: starfive: jh7100: Add temperature sensor node and thermal-zones
Add temperature sensor and thermal-zones support for the StarFive JH7100 SoC. Co-developed-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Hal Feng <hal.feng@starfivetech.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 0104340 commit 65e4a0f

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

arch/riscv/boot/dts/starfive/jh7100.dtsi

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,31 @@
8080
};
8181
};
8282

83+
thermal-zones {
84+
cpu-thermal {
85+
polling-delay-passive = <250>;
86+
polling-delay = <15000>;
87+
88+
thermal-sensors = <&sfctemp>;
89+
90+
trips {
91+
cpu_alert0 {
92+
/* milliCelsius */
93+
temperature = <75000>;
94+
hysteresis = <2000>;
95+
type = "passive";
96+
};
97+
98+
cpu_crit {
99+
/* milliCelsius */
100+
temperature = <90000>;
101+
hysteresis = <2000>;
102+
type = "critical";
103+
};
104+
};
105+
};
106+
};
107+
83108
osc_sys: osc_sys {
84109
compatible = "fixed-clock";
85110
#clock-cells = <0>;
@@ -248,5 +273,17 @@
248273
resets = <&rstgen JH7100_RSTN_WDTIMER_APB>,
249274
<&rstgen JH7100_RSTN_WDT>;
250275
};
276+
277+
sfctemp: temperature-sensor@124a0000 {
278+
compatible = "starfive,jh7100-temp";
279+
reg = <0x0 0x124a0000 0x0 0x10000>;
280+
clocks = <&clkgen JH7100_CLK_TEMP_SENSE>,
281+
<&clkgen JH7100_CLK_TEMP_APB>;
282+
clock-names = "sense", "bus";
283+
resets = <&rstgen JH7100_RSTN_TEMP_SENSE>,
284+
<&rstgen JH7100_RSTN_TEMP_APB>;
285+
reset-names = "sense", "bus";
286+
#thermal-sensor-cells = <0>;
287+
};
251288
};
252289
};

0 commit comments

Comments
 (0)