From: Michal Wilczynski Date: Fri, 9 Aug 2024 15:58:12 +0000 (+0200) Subject: riscv: dts: thead: Enable thead fan X-Git-Tag: accepted/tizen/unified/x/20240818.074458~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=254d3684066acfef30e1a24d0a1dd0e4cebf0416;p=platform%2Fkernel%2Flinux-thead.git riscv: dts: thead: Enable thead fan The drivers responsible for supporting thead fan are already in the repo. Enable the fan in the device tree for better SoC usability. Ported from [1]. [1] - https://github.com/revyos/thead-kernel.git Change-Id: I8b7efb97ec4ceb0c0484dd49631aef9a4101ab3b Signed-off-by: Michal Wilczynski --- diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi index 9507df3ea7c7..52f3c4c68d5a 100644 --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi @@ -40,6 +40,61 @@ default-brightness-level = <7>; }; + thermal-zones { + cpu-thermal-zone { + sustainable-power = <1600>; + + trips { + fan_config0: fan-trip0 { + temperature = <40000>; + hysteresis = <5000>; + type = "active"; + }; + + fan_config1: fan-trip1 { + temperature = <50000>; + hysteresis = <5000>; + type = "active"; + }; + + fan_config2: fan-trip2 { + temperature = <60000>; + hysteresis = <5000>; + type = "active"; + }; + }; + + cooling-maps { + fan-on { + trip = <&fan_config0>; + cooling-device = + <&fan 1 1>; + }; + fan-faster { + trip = <&fan_config1>; + cooling-device = + <&fan 2 2>; + }; + fan-full { + trip = <&fan_config2>; + cooling-device = + <&fan 3 3>; + }; + }; + }; + + dev-thermal-zone { + sustainable-power = <3000>; + }; + }; + + fan: pwm-fan { + compatible = "pwm-fan"; + #cooling-cells = <2>; + pwms = <&pwm 1 10000000 0>; + cooling-levels = <0 64 192 255>; + }; + aon: aon { compatible = "thead,light-aon"; mbox-names = "aon";