mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 17:15:08 +00:00
mt798x: perfect pwm-fan configure in dts
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
This commit is contained in:
parent
eb4aeeaaf6
commit
1fab67d6d5
@ -1,4 +1,4 @@
|
||||
From cb2294f8ae2fa5ab0977ee6eed58884d81ae6b45 Mon Sep 17 00:00:00 2001
|
||||
From a67d9d1227a1ec6e979b897789bbf204bc6cc9f8 Mon Sep 17 00:00:00 2001
|
||||
From: Luo Chongjun <luochongjun@gl-inet.com>
|
||||
Date: Thu, 19 Jan 2023 11:51:21 +0800
|
||||
Subject: [PATCH] support X3000 target
|
||||
@ -12,10 +12,10 @@ Subject: [PATCH] support X3000 target
|
||||
|
||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-x3000.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-x3000.dts
|
||||
new file mode 100755
|
||||
index 0000000000..d61a790b03
|
||||
index 0000000000..54d9eebd18
|
||||
--- /dev/null
|
||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-x3000.dts
|
||||
@@ -0,0 +1,317 @@
|
||||
@@ -0,0 +1,315 @@
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+/ {
|
||||
@ -120,12 +120,6 @@ index 0000000000..d61a790b03
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&pio 27 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ fan_power {
|
||||
+ gpio-export,name = "fan_power";
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
@ -180,18 +174,22 @@ index 0000000000..d61a790b03
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gl_fan {
|
||||
+ compatible = "gl-fan";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ fan_5v: regulator-fan-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fan";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <255>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ pwms = <&pwm 0 40000 0>;
|
||||
+ fan-supply = <&fan_5v>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ cooling-levels = <0 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
|
||||
+ 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 37 38 39
|
||||
+ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From be29f17fac5f6f38cdda15c2f5f476af1e68ce7c Mon Sep 17 00:00:00 2001
|
||||
From d9f400d70e54b341f30d5ab9149560c1eb88c84c Mon Sep 17 00:00:00 2001
|
||||
From: Luo Chongjun <luochongjun@gl-inet.com>
|
||||
Date: Thu, 19 Jan 2023 12:09:45 +0800
|
||||
Subject: [PATCH] support XE3000 target
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH] support XE3000 target
|
||||
|
||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-xe3000.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-xe3000.dts
|
||||
new file mode 100755
|
||||
index 0000000000..5cbba7f7ba
|
||||
index 0000000000..6a21677735
|
||||
--- /dev/null
|
||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-xe3000.dts
|
||||
@@ -0,0 +1,313 @@
|
||||
@@ -0,0 +1,311 @@
|
||||
+/dts-v1/;
|
||||
+#include "mt7981.dtsi"
|
||||
+/ {
|
||||
@ -101,12 +101,6 @@ index 0000000000..5cbba7f7ba
|
||||
+ gpio-export,output = <0>;
|
||||
+ gpios = <&pio 10 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ fan_power {
|
||||
+ gpio-export,name = "fan_power";
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
@ -161,18 +155,22 @@ index 0000000000..5cbba7f7ba
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gl_fan {
|
||||
+ compatible = "gl-fan";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ fan_5v: regulator-fan-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fan";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <255>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ pwms = <&pwm 0 40000 0>;
|
||||
+ fan-supply = <&fan_5v>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ cooling-levels = <0 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
|
||||
+ 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 37 38 39
|
||||
+ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
From 42cc9718219697933cbd0e4a0a6e6191528794ed Mon Sep 17 00:00:00 2001
|
||||
From e0edc46aca7a661db13360431408822baaf473ed Mon Sep 17 00:00:00 2001
|
||||
From: Hongjian Zhang <hongjian.zhang@gl-inet.com>
|
||||
Date: Mon, 29 May 2023 14:35:12 +0800
|
||||
Subject: [PATCH] support MT3000 target
|
||||
|
||||
---
|
||||
.../boot/dts/mediatek/mt7981-gl-mt3000.dts | 274 ++++++++++++++++++
|
||||
1 file changed, 274 insertions(+)
|
||||
.../boot/dts/mediatek/mt7981-gl-mt3000.dts | 272 ++++++++++++++++++
|
||||
1 file changed, 272 insertions(+)
|
||||
create mode 100755 target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt3000.dts
|
||||
|
||||
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt3000.dts b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt3000.dts
|
||||
new file mode 100755
|
||||
index 0000000000..14d5d0894d
|
||||
index 0000000000..b70ee8ae56
|
||||
--- /dev/null
|
||||
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7981-gl-mt3000.dts
|
||||
@@ -0,0 +1,274 @@
|
||||
@@ -0,0 +1,272 @@
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "mt7981.dtsi"
|
||||
@ -132,18 +132,22 @@ index 0000000000..14d5d0894d
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ gl_fan {
|
||||
+ compatible = "gl-fan";
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ fan_5v: regulator-fan-5v {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "fan";
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ };
|
||||
+
|
||||
+ pwm-fan {
|
||||
+ compatible = "pwm-fan";
|
||||
+ cooling-min-state = <0>;
|
||||
+ cooling-max-state = <255>;
|
||||
+ #cooling-cells = <2>;
|
||||
+ pwms = <&pwm 0 40000 0>;
|
||||
+ fan-supply = <&fan_5v>;
|
||||
+ interrupt-parent = <&pio>;
|
||||
+ interrupts = <29 IRQ_TYPE_EDGE_RISING>;
|
||||
+ cooling-levels = <0 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
|
||||
+ 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 37 38 39
|
||||
+ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
||||
@ -167,12 +171,6 @@ index 0000000000..14d5d0894d
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ fan_power {
|
||||
+ gpio-export,name = "fan_power";
|
||||
+ gpio-export,output = <1>;
|
||||
+ gpios = <&pio 28 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
@ -289,5 +287,5 @@ index 0000000000..14d5d0894d
|
||||
+ pinctrl-0 = <&pwm0_pin>;
|
||||
+};
|
||||
--
|
||||
2.17.1
|
||||
2.34.1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user