dr.sputnik
Posts: 2
Joined: Thu Aug 30, 2018 3:31 pm

PoE HAT Fan Speed adjustment

Thu Aug 30, 2018 4:01 pm

Hi,

I saw the notes in ETA for Official POE Hat for 3B+, and decided to try this on one of mine.

After editing, compiling and copying over the file to the overlays folder, the fan no longer works. Also the faint high pitch noise made by the PoE HAT during boot is absent. Copying the original overlay file back and rebooting results in it all working again.

I downloaded the code from https://github.com/raspberrypi/linux/ra ... verlay.dts and edited it as follows:

Code: Select all

[email protected]:~/fan-control $ cat rpi-poe-overlay.dts
/*
 * Overlay for the Raspberry Pi POE HAT.
 */
/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2708";

        [email protected] {
                target-path = "/";
                __overlay__ {
                        fan0: [email protected] {
                                compatible = "raspberrypi,rpi-poe-fan";
                                firmware = <&firmware>;
                                cooling-min-state = <0>;
                                cooling-max-state = <3>;
                                #cooling-cells = <2>;
                                cooling-levels = <0 50 150 255>;
                                status = "okay";
                        };
                };
        };

        [email protected] {
                target = <&cpu_thermal>;
                __overlay__ {
                        trips {
                                threshold: [email protected] {
                                        temperature = <50000>;
                                        hysteresis = <5000>;
                                        type = "active";
                                };
                                target: [email protected] {
                                        temperature = <55000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
                                cpu_hot: [email protected] {
                                        temperature = <60000>;
                                        hysteresis = <2000>;
                                        type = "active";
                                };
                        };
                        cooling-maps {
                                map0 {
                                        trip = <&threshold>;
                                        cooling-device = <&fan0 0 1>;
                                };
                                map1 {
                                        trip = <&target>;
                                        cooling-device = <&fan0 1 2>;
                                };
                                map2 {
                                        trip = <&cpu_hot>;
                                        cooling-device = <&fan0 2 3>;
                                };
                        };
                };
        };
};
[email protected]:~/fan-control $
and then ran:

Code: Select all

dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
That command produces warnings:

Code: Select all

[email protected]:~/fan-control $ dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
[email protected]:~/fan-control $
After copying it to the

Code: Select all

/boot/overlays/
folder, after rebooting the PI the fan does nothing - not even when the temperature gets up above 65degC.

Additionally, after applying it, I ran dmesg -w and noticed that I'm now getting over-current warnings: I don't have any devices plugged into the PI at all; its headless and I connect over SSH.

Code: Select all

[email protected]:~ $ sudo dmesg -C
[email protected]:~ $ dmesg -w
[   72.037711] usb 1-1-port2: over-current change
[   72.131720] usb 1-1.1-port2: over-current change
[   72.271588] usb 1-1-port3: over-current change
[   72.371592] usb 1-1.1-port3: over-current change
[   72.511585] usb 1-1-port4: over-current change
[   93.891759] usb 1-1.1-port2: over-current change
[   94.053660] usb 1-1-port2: over-current change
[   94.131606] usb 1-1.1-port3: over-current change
[   94.301594] usb 1-1-port3: over-current change
[   94.371595] usb 1-1.1-port2: over-current change

(this goes on and on and on...)

Any thoughts? Help!

Thanks!

martinrowan
Posts: 44
Joined: Wed Aug 26, 2015 11:00 am
Location: Berkshire, UK
Contact: Website Twitter

Re: PoE HAT Fan Speed adjustment

Thu Aug 30, 2018 7:35 pm

On the over-current warnings, this is something being tracked in this thread: https://www.raspberrypi.org/forums/view ... 5&t=220984
Sorry due to the over-current issues, I've not experimented with altering the fan profile myself.

martinrowan
Posts: 44
Joined: Wed Aug 26, 2015 11:00 am
Location: Berkshire, UK
Contact: Website Twitter

Re: PoE HAT Fan Speed adjustment

Sun Sep 02, 2018 5:29 pm

I too had the same issue with the updated overlay not working. It looks like 4 days ago there was a code change submitted (https://github.com/raspberrypi/linux/co ... c65db65959) which modified the file: rpi-poe-overlay.dts

Since the new driver that included the rest of the changes isn't released yet, it's necessary to get the older version of the file or just undo the simple change.

Change:

Code: Select all

compatible = "raspberrypi,rpi-poe-fan";
Back to:

Code: Select all

compatible = "rpi-poe-fan";
Or download the older version of the file: https://raw.githubusercontent.com/raspb ... verlay.dts


Also running the command as root ensure the files are created with root owner and group as per the original file:

Code: Select all

sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
Hopefully that will get your fan working once again and able to change the thresholds.
Thanks Martin

dr.sputnik
Posts: 2
Joined: Thu Aug 30, 2018 3:31 pm

Re: PoE HAT Fan Speed adjustment

Tue Sep 04, 2018 12:24 pm

That's sorted it! Many thinks.

hansamann
Posts: 7
Joined: Fri Mar 22, 2013 7:40 pm

Re: PoE HAT Fan Speed adjustment

Fri Oct 12, 2018 5:34 pm

If someone else feels the POE fan needs more user-controllable settings, please consider voting / starring for an issue I created =:
https://github.com/raspberrypi/linux/is ... 3Aopen+poe

TLDR: make the fan user controllable with different operating levels in raspi-config.

thx
Sven

jordipalet
Posts: 2
Joined: Sun Dec 09, 2018 8:18 pm

Re: PoE HAT Fan Speed adjustment

Sun Dec 09, 2018 8:29 pm

New with Raspberry and using the Pi 3 Model B+ with the PoE Hat.

Had the same problem with the fans running too much even with normal 45C, so followed those instructions and changed in the code published by dr.sputnik, compatible = "rpi-poe-fan"

I still got
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property
rpi-poe.dtbo: Warning (unit_address_vs_reg): Node /[email protected]/__overlay__/trips/[email protected] has a unit name, but no reg property

after the sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts

ignored it, done a chmod +x and copied over to /boot/overlay (backed up first).

However, no results with sudo dmesg -C
and sudo dmesg -w, doesn't provide anything ... need to ^c, as not coming back to the prompt

Is that normal?

Or there is an alternative way to do this since september with this thread was published -?

(I've everything updated to the last version)

Thanks!
martinrowan wrote:
Sun Sep 02, 2018 5:29 pm
I too had the same issue with the updated overlay not working. It looks like 4 days ago there was a code change submitted (https://github.com/raspberrypi/linux/co ... c65db65959) which modified the file: rpi-poe-overlay.dts

Since the new driver that included the rest of the changes isn't released yet, it's necessary to get the older version of the file or just undo the simple change.

Change:

Code: Select all

compatible = "raspberrypi,rpi-poe-fan";
Back to:

Code: Select all

compatible = "rpi-poe-fan";
Or download the older version of the file: https://raw.githubusercontent.com/raspb ... verlay.dts


Also running the command as root ensure the files are created with root owner and group as per the original file:

Code: Select all

sudo dtc [email protected] -I dts -O dtb -o rpi-poe.dtbo rpi-poe-overlay.dts
Hopefully that will get your fan working once again and able to change the thresholds.
Thanks Martin

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5401
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 4:25 pm

It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000
That should turn the fan on at 55C

jordipalet
Posts: 2
Joined: Sun Dec 09, 2018 8:18 pm

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 5:32 pm

Thanks a lot, it worked only issue is that params seems to work this way:
dtparam=poe_fan_temp0=55000,poe_fan_temp1=60000

ShiftPlusOne wrote:
Tue Dec 11, 2018 4:25 pm
It's a bit simpler now. Restore the original overlay.

https://github.com/raspberrypi/firmware ... ADME#L1646

In config.txt:

Code: Select all

dtparam=poe_fan_temp0=55,poe_fan_temp1=60
That should turn the fan on at 55C

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5401
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: PoE HAT Fan Speed adjustment

Tue Dec 11, 2018 6:06 pm

Yes, sorry I was in a hurry. I'll edit the post so it doesn't trip others up.

Return to “HATs and other add-ons”