76 lines
1.8 KiB
Diff
76 lines
1.8 KiB
Diff
From 32a068e44df50668cb8b9f1488527974cdb756fb Mon Sep 17 00:00:00 2001
|
|
From: ckkim <changkon12@gmail.com>
|
|
Date: Tue, 14 Jul 2020 11:44:33 +0900
|
|
Subject: [PATCH 018/109] ODROID-N2 :arm64/dts: add PWM based cooling fan
|
|
device
|
|
|
|
Signed-off-by: ckkim <changkon12@gmail.com>
|
|
Change-Id: I110778ba931405eef7d03ee3c764364590557b1c
|
|
---
|
|
.../boot/dts/amlogic/meson64_odroidn2.dts | 42 +++++++++++++++++++
|
|
1 file changed, 42 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
|
|
index 913b85baf6ea..d7bbe52d92af 100644
|
|
--- a/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
|
|
+++ b/arch/arm64/boot/dts/amlogic/meson64_odroidn2.dts
|
|
@@ -11,6 +11,7 @@
|
|
#include <dt-bindings/sound/meson-g12a-toacodec.h>
|
|
#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
|
|
#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
|
|
+#include <dt-bindings/pwm/pwm.h>
|
|
|
|
#include "meson-g12b-odroid-n2.dts"
|
|
|
|
@@ -121,6 +122,47 @@ codec {
|
|
};
|
|
};
|
|
};
|
|
+
|
|
+ pwmgpio:pwmgpio {
|
|
+ compatible = "pwm-gpio";
|
|
+ #pwm-cells = <3>;
|
|
+ pwm-gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
|
|
+ status = "okay";
|
|
+ };
|
|
+
|
|
+ pwmfan:pwm-fan {
|
|
+ compatible = "pwm-fan";
|
|
+ pwms = <&pwmgpio 0 40000 PWM_POLARITY_INVERTED>;
|
|
+ cooling-min-state = <0>;
|
|
+ cooling-max-state = <3>;
|
|
+ #cooling-cells = <2>;
|
|
+ cooling-levels = <0 120 170 220>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&cpu_thermal {
|
|
+ trips {
|
|
+ fan_0: trip-point@0 {
|
|
+ temperature = <65000>;
|
|
+ hysteresis = <5000>;
|
|
+ type = "active";
|
|
+ };
|
|
+ fan_1: trip-point@1 {
|
|
+ temperature = <75000>;
|
|
+ hysteresis = <5000>;
|
|
+ type = "active";
|
|
+ };
|
|
+ };
|
|
+ cooling-maps {
|
|
+ fan_cooling_map0 {
|
|
+ trip = <&fan_0>;
|
|
+ cooling-device = <&pwmfan THERMAL_NO_LIMIT 2>;
|
|
+ };
|
|
+ fan_cooling_map1 {
|
|
+ trip = <&fan_1>;
|
|
+ cooling-device = <&pwmfan 2 THERMAL_NO_LIMIT>;
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&spdifout {
|
|
--
|
|
2.25.1
|
|
|