From 64df218de95ba41ad42c1fe7b310d874a1950eb7 Mon Sep 17 00:00:00 2001 From: chainsx Date: Tue, 30 Jan 2024 17:18:34 +0800 Subject: [PATCH] station-m3: add cooling-maps pwm-fan support. --- arch/arm64/boot/dts/rockchip/Makefile | 2 +- ...-rk3588s-pc-v12.dts => rk3588s-roc-pc.dts} | 71 +++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) rename arch/arm64/boot/dts/rockchip/{rk3588s-roc-rk3588s-pc-v12.dts => rk3588s-roc-pc.dts} (93%) diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index 1ac4897e6241b..a15e9c3c99929 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -293,7 +293,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-orangepi-5b.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-radxa-cm5-io.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-radxa-nx5-io.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb -dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-roc-rk3588s-pc-v12.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-roc-pc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-rk806-single-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v10.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-tablet-v11.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-roc-rk3588s-pc-v12.dts b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts similarity index 93% rename from arch/arm64/boot/dts/rockchip/rk3588s-roc-rk3588s-pc-v12.dts rename to arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts index 37e9c5203c91d..6937f2c510186 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-roc-rk3588s-pc-v12.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-roc-pc.dts @@ -83,6 +83,7 @@ compatible = "pwm-fan"; #cooling-cells = <2>; fan-supply = <&vcc12v_dcin>; + cooling-levels = <60 100 140 160 185 220 255>; pwms = <&pwm11 0 50000 1>; }; @@ -579,6 +580,76 @@ status = "okay"; }; +&soc_thermal { + sustainable-power = <5000>; /* milliwatts */ + polling-delay = <1000>; + polling-delay-passive = <2000>; + trips { + trip0: trip-point@0 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; + }; + trip1: trip-point@1 { + temperature = <60000>; + hysteresis = <5000>; + type = "active"; + }; + trip2: trip-point@2 { + temperature = <65000>; + hysteresis = <5000>; + type = "active"; + }; + trip3: trip-point@3 { + temperature = <70000>; + hysteresis = <5000>; + type = "active"; + }; + trip4: trip-point@4 { + temperature = <75000>; + hysteresis = <5000>; + type = "active"; + }; + pcritical: trip-point@5 { + temperature = <80000>; + hysteresis = <1000>; + type = "active"; + }; + }; + cooling-maps { + map0 { + trip = <&trip0>; + cooling-device = <&fan 0 1>; + contribution = <1024>; + }; + map1 { + trip = <&trip1>; + cooling-device = <&fan 1 2>; + contribution = <1024>; + }; + map2 { + trip = <&trip2>; + cooling-device = <&fan 2 3>; + contribution = <1024>; + }; + map3 { + trip = <&trip3>; + cooling-device = <&fan 3 4>; + contribution = <1024>; + }; + map4 { + trip = <&trip4>; + cooling-device = <&fan 4 5>; + contribution = <1024>; + }; + map5 { + trip = <&pcritical>; + cooling-device = <&fan 5 6>; + contribution = <1024>; + }; + }; +}; + &iep { status = "okay"; };