[PATCH 3/4] arm64: dts: rockchip: Add TSADC and thermal zones to rk3308

Christopher Hoover ch at murgatroid.com
Sun Nov 29 22:01:46 PST 2026


The RK3308 TSADC has two channels: channel 0 senses the logic domain,
channel 1 the CPU.

Add the TSADC node, disabled, with the hardware shutdown at 120 C, and
thermal zones for both channels: the CPU zone throttles cpu0 from 85 C
and is critical at 115 C, the logic zone is critical at 115 C.  The
values follow the Rockchip vendor kernel.

Signed-off-by: Christopher Hoover <ch at murgatroid.com>
---
 arch/arm64/boot/dts/rockchip/rk3308.dtsi | 70 ++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
index 31c25de2d..91e58ccbb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi
@@ -154,6 +154,57 @@ psci {
 		method = "smc";
 	};
 
+	thermal_zones: thermal-zones {
+		logic_thermal: logic-thermal {
+			polling-delay-passive = <100>;
+			polling-delay = <1000>;
+			thermal-sensors = <&tsadc 0>;
+
+			trips {
+				logic_crit: logic-crit {
+					temperature = <115000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+		};
+
+		cpu_thermal: cpu-thermal {
+			polling-delay-passive = <20>;
+			polling-delay = <1000>;
+			sustainable-power = <300>;
+			thermal-sensors = <&tsadc 1>;
+
+			trips {
+				threshold: trip-point-0 {
+					temperature = <70000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				target: trip-point-1 {
+					temperature = <85000>;
+					hysteresis = <2000>;
+					type = "passive";
+				};
+
+				cpu_crit: cpu-crit {
+					temperature = <115000>;
+					hysteresis = <2000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&target>;
+					cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+					contribution = <4096>;
+				};
+			};
+		};
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
@@ -561,6 +612,25 @@ saradc: saradc at ff1e0000 {
 		status = "disabled";
 	};
 
+	tsadc: tsadc at ff1f0000 {
+		compatible = "rockchip,rk3308-tsadc";
+		reg = <0x0 0xff1f0000 0x0 0x100>;
+		interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
+		assigned-clocks = <&cru SCLK_TSADC>;
+		assigned-clock-rates = <50000>;
+		clocks = <&cru SCLK_TSADC>, <&cru PCLK_TSADC>;
+		clock-names = "tsadc", "apb_pclk";
+		resets = <&cru SRST_TSADC>;
+		reset-names = "tsadc-apb";
+		rockchip,hw-tshut-temp = <120000>;
+		pinctrl-names = "init", "default", "sleep";
+		pinctrl-0 = <&tsadc_otp_pin>;
+		pinctrl-1 = <&tsadc_otp_out>;
+		pinctrl-2 = <&tsadc_otp_pin>;
+		#thermal-sensor-cells = <1>;
+		status = "disabled";
+	};
+
 	otp: efuse at ff210000 {
 		compatible = "rockchip,rk3308-otp";
 		reg = <0x0 0xff210000 0x0 0x4000>;
-- 
2.53.0




More information about the Linux-rockchip mailing list