commit da5d2fbd7dca9f34b79ee99c7a2281cc9e722b19
Author: Jan Palus <[email protected]>
Date:   Wed Oct 26 13:02:13 2022 +0200

    patch with support for odroid n2(+) fan
    
    scheduled for linux 6.2

 kernel.spec         |  2 ++
 odroid-n2-fan.patch | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+)
---
diff --git a/kernel.spec b/kernel.spec
index 2cb93f85..57132963 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -216,6 +216,7 @@ Patch7000:  kernel-inittmpfs.patch
 Patch8000:     rpi-sound.patch
 Patch8001:     kernel-pinebook-pro.patch
 Patch8002:     atheros-disallow-retrain-nongen1-pcie.patch
+Patch8003:     odroid-n2-fan.patch
 
 # Do not remove this line, please. It is easier for me to uncomment two lines, 
then patch
 # kernel.spec every time.
@@ -669,6 +670,7 @@ cd linux-%{basever}
 %patch8000 -p1
 %patch8001 -p1
 %patch8002 -p1
+%patch8003 -p1
 %endif
 
 %if %{with rt}
diff --git a/odroid-n2-fan.patch b/odroid-n2-fan.patch
new file mode 100644
index 00000000..c148daf7
--- /dev/null
+++ b/odroid-n2-fan.patch
@@ -0,0 +1,80 @@
+From 44a201df71739a3c5ef3c40e58ebaccfd052d430 Mon Sep 17 00:00:00 2001
+From: Anand Moon <[email protected]>
+Date: Fri, 21 Oct 2022 05:09:03 +0000
+Subject: arm64: dts: meson: Enable active coling using gpio-fan on Odroid
+ N2/N2+
+
+Odroid N2/N2+ support active cooling via gpio-fan controller.
+Add fan controls and tip point for cpu and ddr thermal sensor
+on this boards.
+
+Signed-off-by: Anand Moon <[email protected]>
+Link: https://lore.kernel.org/r/[email protected]
+Signed-off-by: Neil Armstrong <[email protected]>
+---
+ .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi     | 42 ++++++++++++++++++++++
+ 1 file changed, 42 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 fd3fa82e4c330..667d2b7749244 100644
+--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
++++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+@@ -39,6 +39,14 @@
+               reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
+       };
+ 
++      fan: gpio-fan {
++              compatible = "gpio-fan";
++              gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
++              /* Using Dummy Speed */
++              gpio-fan,speed-map = <0 0>, <1 1>;
++              #cooling-cells = <2>;
++      };
++
+       leds {
+               compatible = "gpio-leds";
+ 
+@@ -410,6 +418,40 @@
+       clock-latency = <50000>;
+ };
+ 
++&cpu_thermal {
++      trips {
++              cpu_active: cpu-active {
++                      temperature = <60000>; /* millicelsius */
++                      hysteresis = <2000>; /* millicelsius */
++                      type = "active";
++              };
++      };
++
++      cooling-maps {
++              map {
++                      trip = <&cpu_active>;
++                      cooling-device = <&fan THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
++              };
++      };
++};
++
++&ddr_thermal {
++      trips {
++              ddr_active: ddr-active {
++                      temperature = <60000>; /* millicelsius */
++                      hysteresis = <2000>; /* millicelsius */
++                      type = "active";
++              };
++      };
++
++      cooling-maps {
++              map {
++                      trip = <&ddr_active>;
++                      cooling-device = <&fan THERMAL_NO_LIMIT 
THERMAL_NO_LIMIT>;
++              };
++      };
++};
++
+ &ext_mdio {
+       external_phy: ethernet-phy@0 {
+               /* Realtek RTL8211F (0x001cc916) */
+-- 
+cgit 
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/da5d2fbd7dca9f34b79ee99c7a2281cc9e722b19

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to