forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mediatek: re-add dropped properties on BPi-R3
Unfortunately some device tree properties have slipped under the table when switching from our downstream device tree. Bring back 3W power for SFP cages and restore thermal trip points to make sense again. Fixes: 7a0ec00 ("mediatek: sync MT7986 device trees with upstream") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
- Loading branch information
Showing
5 changed files
with
169 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...linux/mediatek/patches-6.1/020-arm64-dts-mt7986-define-3W-max-power-to-both-SFP-on-.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From f8ed4088ed9c61ae92193da6130d04c37e7b19f2 Mon Sep 17 00:00:00 2001 | ||
From: Frank Wunderlich <frank-w@public-files.de> | ||
Date: Sun, 20 Aug 2023 17:31:33 +0200 | ||
Subject: [PATCH 20/22] arm64: dts: mt7986: define 3W max power to both SFP on | ||
BPI-R3 | ||
|
||
All SFP power supplies are connected to the system VDD33 which is 3v3/8A. | ||
Set 3A per SFP slot to allow SFPs work which need more power than the | ||
default 1W. | ||
|
||
Fixes: 8e01fb15b815 ("arm64: dts: mt7986: add Bananapi R3") | ||
Signed-off-by: Frank Wunderlich <frank-w@public-files.de> | ||
--- | ||
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
index af4a4309bda4b..f9702284607af 100644 | ||
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
@@ -126,6 +126,7 @@ sfp1: sfp-1 { | ||
compatible = "sff,sfp"; | ||
i2c-bus = <&i2c_sfp1>; | ||
los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>; | ||
+ maximum-power-milliwatt = <3000>; | ||
mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>; | ||
tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>; | ||
tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>; | ||
@@ -137,6 +138,7 @@ sfp2: sfp-2 { | ||
i2c-bus = <&i2c_sfp2>; | ||
los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>; | ||
mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>; | ||
+ maximum-power-milliwatt = <3000>; | ||
tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>; | ||
tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>; | ||
}; | ||
-- | ||
2.41.0 | ||
|
64 changes: 64 additions & 0 deletions
64
target/linux/mediatek/patches-6.1/021-arm64-dts-mt7986-change-cooling-trips.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From aa3d6df9803c267725dc72286bb91602b7579882 Mon Sep 17 00:00:00 2001 | ||
From: Frank Wunderlich <frank-w@public-files.de> | ||
Date: Sun, 20 Aug 2023 17:31:34 +0200 | ||
Subject: [PATCH 21/22] arm64: dts: mt7986: change cooling trips | ||
|
||
Add Critical and hot trips for emergency system shutdown and limiting | ||
system load. | ||
|
||
Change passive trip to active to make sure fan is activated on the | ||
lowest trip. | ||
|
||
Fixes: 1f5be05132f3 ("arm64: dts: mt7986: add thermal-zones") | ||
Suggested-by: Daniel Golle <daniel@makrotopia.org> | ||
Signed-off-by: Frank Wunderlich <frank-w@public-files.de> | ||
--- | ||
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 ++++++++++++++++---- | ||
1 file changed, 16 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi | ||
index 68539ea788dfc..64f2cf3756a8b 100644 | ||
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi | ||
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi | ||
@@ -610,22 +610,34 @@ cpu_thermal: cpu-thermal { | ||
thermal-sensors = <&thermal 0>; | ||
|
||
trips { | ||
+ cpu_trip_crit: crit { | ||
+ temperature = <125000>; | ||
+ hysteresis = <2000>; | ||
+ type = "critical"; | ||
+ }; | ||
+ | ||
+ cpu_trip_hot: hot { | ||
+ temperature = <120000>; | ||
+ hysteresis = <2000>; | ||
+ type = "hot"; | ||
+ }; | ||
+ | ||
cpu_trip_active_high: active-high { | ||
temperature = <115000>; | ||
hysteresis = <2000>; | ||
type = "active"; | ||
}; | ||
|
||
- cpu_trip_active_low: active-low { | ||
+ cpu_trip_active_med: active-med { | ||
temperature = <85000>; | ||
hysteresis = <2000>; | ||
type = "active"; | ||
}; | ||
|
||
- cpu_trip_passive: passive { | ||
- temperature = <40000>; | ||
+ cpu_trip_active_low: active-low { | ||
+ temperature = <60000>; | ||
hysteresis = <2000>; | ||
- type = "passive"; | ||
+ type = "active"; | ||
}; | ||
}; | ||
}; | ||
-- | ||
2.41.0 | ||
|
43 changes: 43 additions & 0 deletions
43
target/linux/mediatek/patches-6.1/022-arm64-dts-mt7986-change-thermal-trips-on-BPI-R3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
From 6ddf23526955b8dbedfeaa57e691261fd73f9d4e Mon Sep 17 00:00:00 2001 | ||
From: Frank Wunderlich <frank-w@public-files.de> | ||
Date: Sun, 20 Aug 2023 17:31:35 +0200 | ||
Subject: [PATCH 22/22] arm64: dts: mt7986: change thermal trips on BPI-R3 | ||
|
||
Apply new naming after mt7986 thermal trips were changed. | ||
|
||
Fixes: c26f779a2295 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts") | ||
Suggested-by: Daniel Golle <daniel@makrotopia.org> | ||
Signed-off-by: Frank Wunderlich <frank-w@public-files.de> | ||
--- | ||
.../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 10 +++++----- | ||
1 file changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
index f9702284607af..b876e501216be 100644 | ||
--- a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
+++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | ||
@@ -152,16 +152,16 @@ cpu-active-high { | ||
trip = <&cpu_trip_active_high>; | ||
}; | ||
|
||
- cpu-active-low { | ||
+ cpu-active-med { | ||
/* active: set fan to cooling level 1 */ | ||
cooling-device = <&fan 1 1>; | ||
- trip = <&cpu_trip_active_low>; | ||
+ trip = <&cpu_trip_active_med>; | ||
}; | ||
|
||
- cpu-passive { | ||
- /* passive: set fan to cooling level 0 */ | ||
+ cpu-active-low { | ||
+ /* active: set fan to cooling level 0 */ | ||
cooling-device = <&fan 0 0>; | ||
- trip = <&cpu_trip_passive>; | ||
+ trip = <&cpu_trip_active_low>; | ||
}; | ||
}; | ||
}; | ||
-- | ||
2.41.0 | ||
|