1 From 44a201df71739a3c5ef3c40e58ebaccfd052d430 Mon Sep 17 00:00:00 2001
2 From: Anand Moon <linux.amoon@gmail.com>
3 Date: Fri, 21 Oct 2022 05:09:03 +0000
4 Subject: arm64: dts: meson: Enable active coling using gpio-fan on Odroid
7 Odroid N2/N2+ support active cooling via gpio-fan controller.
8 Add fan controls and tip point for cpu and ddr thermal sensor
11 Signed-off-by: Anand Moon <linux.amoon@gmail.com>
12 Link: https://lore.kernel.org/r/20221021050906.1158-1-linux.amoon@gmail.com
13 Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
15 .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 42 ++++++++++++++++++++++
16 1 file changed, 42 insertions(+)
18 diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
19 index fd3fa82e4c330..667d2b7749244 100644
20 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
21 +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
23 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
27 + compatible = "gpio-fan";
28 + gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
29 + /* Using Dummy Speed */
30 + gpio-fan,speed-map = <0 0>, <1 1>;
31 + #cooling-cells = <2>;
35 compatible = "gpio-leds";
38 clock-latency = <50000>;
43 + cpu_active: cpu-active {
44 + temperature = <60000>; /* millicelsius */
45 + hysteresis = <2000>; /* millicelsius */
52 + trip = <&cpu_active>;
53 + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
60 + ddr_active: ddr-active {
61 + temperature = <60000>; /* millicelsius */
62 + hysteresis = <2000>; /* millicelsius */
69 + trip = <&ddr_active>;
70 + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
76 external_phy: ethernet-phy@0 {
77 /* Realtek RTL8211F (0x001cc916) */