Skip to contentSkip to conversation

mt7986 DTS fixes

PATCH In review Frank Wunderlich 2 participants 6 messages Aug 20, 2023 – Oct 25, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mt7986 DTS fixes

From: Frank Wunderlich <[email protected]>

It turned out that some SFP needs more power than the default 1W and cooling-trips can be defined a bit better.

Frank Wunderlich (3):
arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3
arm64: dts: mt7986: change cooling trips
arm64: dts: mt7986: change thermal trips on BPI-R3

 .../dts/mediatek/mt7986a-bananapi-bpi-r3.dts  | 12 ++++++-----
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi     | 20 +++++++++++++++----
 2 files changed, 23 insertions(+), 9 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3

From: Frank Wunderlich <[email protected]>

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")
---
 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +2 -0
index af4a4309bda4..f9702284607a 100644
@@ -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>;
 	};
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH v1 1/3] arm64: dts: mt7986: define 3W max power to both SFP on BPI-R3

Il 20/08/23 17:31, Frank Wunderlich ha scritto:

Quoted 8 lines

From: Frank Wunderlich <[email protected]>

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")
#3 lore raw

PATCH 2/3 arm64: dts: mt7986: change cooling trips

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

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")
---
 arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +16 -4
index 207510abda89..36d8945400df 100644
@@ -614,22 +614,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";
 				};
 			};
 		};
Signature · 1 line
2.34.1
#4 lore raw

Re: [PATCH v1 2/3] arm64: dts: mt7986: change cooling trips

Il 20/08/23 17:31, Frank Wunderlich ha scritto:

Quoted 39 lines

From: Frank Wunderlich <[email protected]>

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")
---
  arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 ++++++++++++++++----
  1 file changed, 16 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +12 -0
index 207510abda89..36d8945400df 100644
@@ -614,22 +614,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";

arch/arm64/boot/dts/mediatek/mt7986a.dtsi cpu_thermal: cpu-thermal { · line 629

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +1 -2
  				};
 
-				cpu_trip_active_low: active-low {
+				cpu_trip_active_med: active-med {
  					temperature = <85000>;
  					hysteresis = <2000>;
  					type = "active";
  				};
 
-				cpu_trip_passive: passive {

Rule of thumb is that each commit has to build on its own: this will break build because of mt7986a-bananapi-bpi-r3.dts referencing the now unexistant cpu_trip_passive phandle.

Solving that is simple.
Merge commit [2/3] and [3/3] in a single commit.

Obviously, retain both fixes tags :-)

Cheers,
Angelo

#5 lore raw

PATCH 3/3 arm64: dts: mt7986: change thermal trips on BPI-R3

In reply to Frank Wunderlich

From: Frank Wunderlich <[email protected]>

Apply new naming after mt7986 thermal trips were changed.

Fixes c26f779a2295 ("arm64: dts: mt7986: add pwm-fan and cooling-maps to BPI-R3 dts")
---
 .../boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dts +5 -5
index f9702284607a..b876e501216b 100644
@@ -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>;
 		};
 	};
 };
Signature · 1 line
2.34.1