From 62b7f5931c54e96fca56dd8761b0e466d355c881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas (cherry-picked from commit f07e572f64) --- ...50-0480-Reduce-noise-from-rpi-poe-hat-fan.patch | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch b/target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch new file mode 100644 index 0000000000..7c50843102 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0480-Reduce-noise-from-rpi-poe-hat-fan.patch @@ -0,0 +1,96 @@ +From 863dace20e48954a7e013a2e88e27c692ce165b0 Mon Sep 17 00:00:00 2001 +From: Nick B +Date: Mon, 9 Mar 2020 09:05:39 -0400 +Subject: [PATCH] Reduce noise from rpi poe hat fan + +This adds 2 extra states, at 40c and 45c, with PWM of 31 and 63 (out +of 255) for the rpi poe hat fan. This significantly improves user +experience by providing a smoother ramp up of the fan, from a pwm 0 +to 31 to 63 then finally to 150, and additionally makes it very easy +for users to further tweak the values as needed for their specific +application. + +The possible concerns I have are that a hysteresis of 2000 (2c) could +be too narrow, and that running the fan more at a reduced temperature +(40000 - 40c) could cause problems. + +Signed-off-by: Nick B +--- + .../arm/boot/dts/overlays/rpi-poe-overlay.dts | 35 ++++++++++++++++--- + 1 file changed, 30 insertions(+), 5 deletions(-) + +--- a/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts ++++ b/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts +@@ -14,9 +14,9 @@ + compatible = "raspberrypi,rpi-poe-fan"; + firmware = <&firmware>; + cooling-min-state = <0>; +- cooling-max-state = <2>; ++ cooling-max-state = <4>; + #cooling-cells = <2>; +- cooling-levels = <0 150 255>; ++ cooling-levels = <0 31 63 150 255>; + status = "okay"; + }; + }; +@@ -27,12 +27,21 @@ + __overlay__ { + trips { + trip0: trip0 { +- temperature = <50000>; +- hysteresis = <5000>; ++ temperature = <40000>; ++ hysteresis = <2000>; + type = "active"; + }; + trip1: trip1 { +- ++ temperature = <45000>; ++ hysteresis = <2000>; ++ type = "active"; ++ }; ++ trip2: trip2 { ++ temperature = <50000>; ++ hysteresis = <2000>; ++ type = "active"; ++ }; ++ trip3: trip3 { + temperature = <55000>; + hysteresis = <5000>; + type = "active"; +@@ -47,6 +56,14 @@ + trip = <&trip1>; + cooling-device = <&fan0 1 2>; + }; ++ map2 { ++ trip = <&trip2>; ++ cooling-device = <&fan0 2 3>; ++ }; ++ map3 { ++ trip = <&trip3>; ++ cooling-device = <&fan0 3 4>; ++ }; + }; + }; + }; +@@ -58,6 +75,10 @@ + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; ++ poe_fan_temp2 = <&trip2>,"temperature:0"; ++ poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; ++ poe_fan_temp3 = <&trip3>,"temperature:0"; ++ poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + }; + }; + +@@ -66,5 +87,9 @@ + poe_fan_temp0_hyst = <&trip0>,"hysteresis:0"; + poe_fan_temp1 = <&trip1>,"temperature:0"; + poe_fan_temp1_hyst = <&trip1>,"hysteresis:0"; ++ poe_fan_temp2 = <&trip2>,"temperature:0"; ++ poe_fan_temp2_hyst = <&trip2>,"hysteresis:0"; ++ poe_fan_temp3 = <&trip3>,"temperature:0"; ++ poe_fan_temp3_hyst = <&trip3>,"hysteresis:0"; + }; + }; -- cgit v1.2.3