- curently attached to RC7 as https://github.com/armbian/build/pull/2378 - config derived from current and contains all latest changes - dirty reboot and eth0 reset hacks are not added and can be added later if still needed (need_check subfolder)
89 lines
2.4 KiB
Diff
89 lines
2.4 KiB
Diff
From 2cf6db15ecd5d1d96158c5bba5543ba38f8387f7 Mon Sep 17 00:00:00 2001
|
|
From: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
Date: Tue, 4 Aug 2020 23:20:03 +0200
|
|
Subject: [PATCH] Add fan support to Odroid N2/plus
|
|
|
|
Signed-off-by: Igor Pecovnik <igor.pecovnik@gmail.com>
|
|
---
|
|
.../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 36 +++++++++++++++++++
|
|
1 file changed, 36 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
index 65df5fb49..50bfb0dce 100644
|
|
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
|
|
@@ -2,6 +2,7 @@
|
|
/*
|
|
* Copyright (c) 2019 BayLibre, SAS
|
|
* Author: Neil Armstrong <narmstrong@baylibre.com>
|
|
+ * Changed: Igor Pecovnik <igor@armbian.com>
|
|
*/
|
|
|
|
/dts-v1/;
|
|
@@ -10,6 +11,7 @@
|
|
#include <dt-bindings/input/input.h>
|
|
#include <dt-bindings/gpio/meson-g12a-gpio.h>
|
|
#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
|
|
+#include <dt-bindings/pwm/pwm.h>
|
|
|
|
/ {
|
|
compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
|
|
@@ -27,6 +29,22 @@ chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
};
|
|
|
|
+ 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>;
|
|
+ };
|
|
+
|
|
memory@0 {
|
|
device_type = "memory";
|
|
reg = <0x0 0x0 0x0 0x40000000>;
|
|
@@ -342,6 +360,16 @@ cpu_passive: cpu-passive {
|
|
hysteresis = <2000>; /* millicelsius */
|
|
type = "passive";
|
|
};
|
|
+ fan_0: trip-point@0 {
|
|
+ temperature = <65000>;
|
|
+ hysteresis = <5000>;
|
|
+ type = "active";
|
|
+ };
|
|
+ fan_1: trip-point@1 {
|
|
+ temperature = <75000>;
|
|
+ hysteresis = <5000>;
|
|
+ type = "active";
|
|
+ };
|
|
};
|
|
cooling-maps {
|
|
cpufreq_map0 {
|
|
@@ -356,6 +384,14 @@ cpufreq_map1 {
|
|
<&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
|
|
<&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
|
|
};
|
|
+ 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>;
|
|
+ };
|
|
};
|
|
};
|
|
|
|
--
|
|
Created with Armbian build tools https://github.com/armbian/build
|
|
|