[RFC PATCH 3/3] riscv: dts: spacemit: Describe K3 temperature monitoring
From: Jiayu Du
Date: Fri Dec 04 2026 - 09:23:58 EST
Enable the K3 temperature sensor controller and add seven polling thermal
zones for the SoC, VPU, GPU and four CPU clusters. Connect the sensor to
the primary and backup calibration cells in eFuse.
Signed-off-by: Jiayu Du <duge1256@xxxxxxxxx>
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 51 ++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index af1a758788ff..a40a278acc09 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -433,6 +433,43 @@ osc_32k: clock-32k {
};
};
+ thermal_zones: thermal-zones {
+ soc-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 0>;
+ };
+
+ vpu-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 2>;
+ };
+
+ gpu-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 3>;
+ };
+
+ cluster0-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 4>;
+ };
+
+ cluster1-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 5>;
+ };
+
+ cluster2-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 6>;
+ };
+
+ cluster3-thermal {
+ polling-delay = <1000>;
+ thermal-sensors = <&thermal 7>;
+ };
+ };
+
soc: soc {
compatible = "simple-bus";
interrupt-parent = <&saplic>;
@@ -894,6 +931,20 @@ uart9: serial@d4017800 {
status = "disabled";
};
+ thermal: thermal@d4018000 {
+ compatible = "spacemit,k3-tsensor";
+ reg = <0x0 0xd4018000 0x0 0x100>;
+ interrupt-parent = <&saplic>;
+ interrupts = <61 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon_apbc CLK_APBC_TSEN>,
+ <&syscon_apbc CLK_APBC_TSEN_BUS>;
+ clock-names = "core", "bus";
+ resets = <&syscon_apbc RESET_APBC_TSEN>;
+ nvmem-cells = <&soc_rtemp_trim>, <&soc_rtemp_trim1>;
+ nvmem-cell-names = "soc_rtemp_trim", "soc_rtemp_trim1";
+ #thermal-sensor-cells = <1>;
+ };
+
i2c6: i2c@d4018800 {
compatible = "spacemit,k3-i2c", "spacemit,k1-i2c";
reg = <0x0 0xd4018800 0x0 0x38>;
--
2.43.0