Both Pi PoE and PoE + Hat fan control not working with the dtoverlays
Opened this issue · 2 comments
As you can see my config.txt file includes the information to load the dtoverlay and set its parameters correctly.
╭─jphadmin at rp4-4g in ~
╰─○ cat /boot/config.txt
# This file is provided as a placeholder for user options
# AlmaLinux - few default config options
[pi4]
arm_boost=1
[all]
# enable serial console
enable_uart=1
dtoverlay=rpi-poe-plus
dtparam=poe_fan_temp0=10000,poe_fan_temp0_hyst=1000
dtparam=poe_fan_temp1=55000,poe_fan_temp1_hyst=5000
dtparam=poe_fan_temp2=60000,poe_fan_temp2_hyst=5000
dtparam=poe_fan_temp3=65000,poe_fan_temp3_hyst=5000
The dtoverlay exists in the default install, I have not had to add this in.
╭─jphadmin at rp4-4g in ~
╰─○ ls -l /boot/overlays/rpi-poe-plus.dtbo
-rwxr-xr-x. 1 root root 4914 Dec 2 00:30 /boot/overlays/rpi-poe-plus.dtbo
The overlay is not loaded on boot, when you try to load it in manually it fails to load. However, you can load in other modules manually just fine as shown below.
╭─jphadmin at rp4-4g in ~
╰─○ sudo dtoverlay -v rpi-poe-plus
DTOVERLAY[debug]: using platform 'bcm2711'
DTOVERLAY[debug]: overlay map loaded
run_cmd: which dtoverlay-pre >/dev/null 2>&1 && dtoverlay-pre
DTOVERLAY[debug]: loading file '/boot/overlays/rpi-poe-plus.dtbo'
DTOVERLAY[debug]: fragment 7 disabled
DTOVERLAY[debug]: fragment 8 disabled
DTOVERLAY[debug]: merge_fragment(/fragment@6/__overlay__/poe@51,/fragment@11/__overlay__)
DTOVERLAY[debug]: merge_fragment(/fragment@6/__overlay__/poe@51/rpi-poe-power-supply@f2,/fragment@11/__overlay__/rpi-poe-power-supply@f2)
DTOVERLAY[debug]: +prop(compatible)
DTOVERLAY[debug]: +prop(reg)
DTOVERLAY[debug]: +prop(status)
DTOVERLAY[debug]: merge_fragment() end
DTOVERLAY[debug]: merge_fragment() end
DTOVERLAY[debug]: wrote 4518 bytes to '/tmp/.dtoverlays/0_rpi-poe-plus.dtbo'
DTOVERLAY[debug]: wrote 4518 bytes to '/sys/kernel/config/device-tree/overlays/0_rpi-poe-plus/dtbo'
* Failed to apply overlay '0_rpi-poe-plus' (kernel)
run_cmd: which dtoverlay-post >/dev/null 2>&1 && dtoverlay-post
╭─jphadmin at rp4-4g in ~
╰─○ sudo dtoverlay -v i2c0
DTOVERLAY[debug]: using platform 'bcm2711'
DTOVERLAY[debug]: overlay map loaded
run_cmd: which dtoverlay-pre >/dev/null 2>&1 && dtoverlay-pre
DTOVERLAY[debug]: loading file '/boot/overlays/i2c0.dtbo'
DTOVERLAY[debug]: fragment 2 disabled
DTOVERLAY[debug]: fragment 3 disabled
DTOVERLAY[debug]: fragment 4 disabled
DTOVERLAY[debug]: fragment 5 disabled
DTOVERLAY[debug]: wrote 1621 bytes to '/tmp/.dtoverlays/0_i2c0.dtbo'
DTOVERLAY[debug]: wrote 1621 bytes to '/sys/kernel/config/device-tree/overlays/0_i2c0/dtbo'
run_cmd: which dtoverlay-post >/dev/null 2>&1 && dtoverlay-post
╭─jphadmin at rp4-4g in ~
╰─○ sudo dtoverlay -l
Overlays (in load order):
0: i2c0
If you explore the overlay file you can see it is having issues.
╭─jphadmin at rp4-4g in ~
╰─○ dtc -I dtb -O dts /boot/overlays/rpi-poe-plus.dtbo > /tmp/rpi-poe-plus.dts
<stdout>: Warning (reg_format): /fragment@6/__overlay__/poe@51/poe_pwm@f0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
<stdout>: Warning (reg_format): /fragment@11/__overlay__/rpi-poe-power-supply@f2:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
<stdout>: Warning (unit_address_vs_reg): /fragment@7: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /fragment@8: node has a unit name, but no reg property
<stdout>: Warning (unit_address_vs_reg): /__local_fixups__/fragment@11: node has a unit name, but no reg property
<stdout>: Warning (pci_device_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
<stdout>: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
<stdout>: Warning (avoid_default_addr_size): /fragment@6/__overlay__/poe@51/poe_pwm@f0: Relying on default #address-cells value
<stdout>: Warning (avoid_default_addr_size): /fragment@6/__overlay__/poe@51/poe_pwm@f0: Relying on default #size-cells value
<stdout>: Warning (avoid_default_addr_size): /fragment@11/__overlay__/rpi-poe-power-supply@f2: Relying on default #address-cells value
<stdout>: Warning (avoid_default_addr_size): /fragment@11/__overlay__/rpi-poe-power-supply@f2: Relying on default #size-cells value
<stdout>: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
<stdout>: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
╭─jphadmin at rp4-4g in ~
╰─○ cat /tmp/rpi-poe-plus.dts
/dts-v1/;
/ {
compatible = "brcm,bcm2835";
fragment@0 {
target-path = [2f 00];
__overlay__ {
pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0x00 0x20 0x40 0x80 0xff>;
#cooling-cells = <0x02>;
pwms = <0x01 0x00 0x13880 0x00>;
phandle = <0x03>;
};
};
};
fragment@1 {
target = <0xffffffff>;
__overlay__ {
polling-delay = <0x7d0>;
};
};
fragment@2 {
target = <0xffffffff>;
__overlay__ {
trip0 {
temperature = <0x9c40>;
hysteresis = <0x7d0>;
type = "active";
phandle = <0x02>;
};
trip1 {
temperature = <0xafc8>;
hysteresis = <0x7d0>;
type = "active";
phandle = <0x04>;
};
trip2 {
temperature = <0xc350>;
hysteresis = <0x7d0>;
type = "active";
phandle = <0x05>;
};
trip3 {
temperature = <0xd6d8>;
hysteresis = <0x1388>;
type = "active";
phandle = <0x06>;
};
};
};
fragment@3 {
target = <0xffffffff>;
__overlay__ {
map0 {
trip = <0x02>;
cooling-device = <0x03 0x00 0x01>;
};
map1 {
trip = <0x04>;
cooling-device = <0x03 0x01 0x02>;
};
map2 {
trip = <0x05>;
cooling-device = <0x03 0x02 0x03>;
};
map3 {
trip = <0x06>;
cooling-device = <0x03 0x03 0x04>;
};
};
};
fragment@4 {
target-path = "/__overrides__";
__overlay__ {
poe_fan_temp0 = [00 00 00 02 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp0_hyst = [00 00 00 02 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp1 = [00 00 00 04 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp1_hyst = [00 00 00 04 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp2 = [00 00 00 05 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp2_hyst = [00 00 00 05 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp3 = [00 00 00 06 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp3_hyst = [00 00 00 06 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_i2c = <0x01 0x73746174 0x75733d64 0x69736162 0x6c656400 0x07 0x73746174 0x75733d64 0x69736162 0x6c656400 0x08 0x73746174 0x75733d6f 0x6b617900 0x03 0x70776d73 0x3a303d00 0x09>;
phandle = <0x0b>;
};
};
fragment@5 {
target = <0xffffffff>;
__overlay__ {
pwm {
compatible = "raspberrypi,firmware-poe-pwm";
#pwm-cells = <0x02>;
phandle = <0x01>;
};
};
};
fragment@6 {
target = <0xffffffff>;
__overlay__ {
#address-cells = <0x01>;
#size-cells = <0x00>;
phandle = <0x0a>;
poe@51 {
compatible = "raspberrypi,poe-core";
reg = <0x51>;
status = "disabled";
phandle = <0x08>;
poe_pwm@f0 {
compatible = "raspberrypi,poe-pwm";
reg = <0xf0>;
status = "okay";
#pwm-cells = <0x02>;
phandle = <0x09>;
};
};
};
};
fragment@7 {
target = <0xffffffff>;
__dormant__ {
status = "okay";
};
};
fragment@8 {
target = <0xffffffff>;
__dormant__ {
status = "okay";
};
};
__overrides__ {
poe_fan_temp0 = [00 00 00 02 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp0_hyst = [00 00 00 02 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp1 = [00 00 00 04 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp1_hyst = [00 00 00 04 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp2 = [00 00 00 05 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp2_hyst = [00 00 00 05 68 79 73 74 65 72 65 73 69 73 3a 30 00];
poe_fan_temp3 = [00 00 00 06 74 65 6d 70 65 72 61 74 75 72 65 3a 30 00];
poe_fan_temp3_hyst = [00 00 00 06 68 79 73 74 65 72 65 73 69 73 3a 30 00];
i2c = [00 00 00 00 2b 35 2b 36 00 00 00 00 01 73 74 61 74 75 73 3d 64 69 73 61 62 6c 65 64 00 00 00 00 07 73 74 61 74 75 73 3d 64 69 73 61 62 6c 65 64 00 00 00 00 0a 73 74 61 74 75 73 3d 6f 6b 61 79 00 00 00 00 08 73 74 61 74 75 73 3d 6f 6b 61 79 00 00 00 00 03 70 77 6d 73 3a 30 3d 00 00 00 00 09];
};
fragment@10 {
target-path = [2f 00];
__overlay__ {
rpi-poe-power-supply {
compatible = "raspberrypi,rpi-poe-power-supply";
firmware = <0xffffffff>;
status = "okay";
phandle = <0x07>;
};
};
};
fragment@11 {
target = <0x08>;
__overlay__ {
rpi-poe-power-supply@f2 {
compatible = "raspberrypi,rpi-poe-power-supply";
reg = <0xf2>;
status = "okay";
};
};
};
__symbols__ {
fan = "/fragment@0/__overlay__/pwm-fan";
trip0 = "/fragment@2/__overlay__/trip0";
trip1 = "/fragment@2/__overlay__/trip1";
trip2 = "/fragment@2/__overlay__/trip2";
trip3 = "/fragment@2/__overlay__/trip3";
params = "/fragment@4/__overlay__";
fwpwm = "/fragment@5/__overlay__/pwm";
i2c_bus = "/fragment@6/__overlay__";
poe_mfd = "/fragment@6/__overlay__/poe@51";
poe_mfd_pwm = "/fragment@6/__overlay__/poe@51/poe_pwm@f0";
rpi_poe_power_supply = "/fragment@10/__overlay__/rpi-poe-power-supply";
};
__fixups__ {
cpu_thermal = "/fragment@1:target:0";
thermal_trips = "/fragment@2:target:0";
cooling_maps = "/fragment@3:target:0";
firmware = "/fragment@5:target:0\0/fragment@10/__overlay__/rpi-poe-power-supply:firmware:0";
i2c0 = "/fragment@6:target:0";
i2c0if = "/fragment@7:target:0";
i2c0mux = "/fragment@8:target:0";
};
__local_fixups__ {
fragment@0 {
__overlay__ {
pwm-fan {
pwms = <0x00>;
};
};
};
fragment@3 {
__overlay__ {
map0 {
trip = <0x00>;
cooling-device = <0x00>;
};
map1 {
trip = <0x00>;
cooling-device = <0x00>;
};
map2 {
trip = <0x00>;
cooling-device = <0x00>;
};
map3 {
trip = <0x00>;
cooling-device = <0x00>;
};
};
};
fragment@4 {
__overlay__ {
poe_fan_temp0 = <0x00>;
poe_fan_temp0_hyst = <0x00>;
poe_fan_temp1 = <0x00>;
poe_fan_temp1_hyst = <0x00>;
poe_fan_temp2 = <0x00>;
poe_fan_temp2_hyst = <0x00>;
poe_fan_temp3 = <0x00>;
poe_fan_temp3_hyst = <0x00>;
poe_fan_i2c = <0x00 0x14 0x28 0x38 0x44>;
};
};
__overrides__ {
poe_fan_temp0 = <0x00>;
poe_fan_temp0_hyst = <0x00>;
poe_fan_temp1 = <0x00>;
poe_fan_temp1_hyst = <0x00>;
poe_fan_temp2 = <0x00>;
poe_fan_temp2_hyst = <0x00>;
poe_fan_temp3 = <0x00>;
poe_fan_temp3_hyst = <0x00>;
i2c = <0x09 0x1d 0x31 0x41 0x51 0x5d>;
};
fragment@11 {
target = <0x00>;
};
};
};
If you grep the loaded config params everything is set as it should be.
╭─jphadmin at rp4-4g in ~
╰─○ sudo grep CONFIG_OF /boot/config-6.6.51-20241008.v8.1.el9
CONFIG_OF=y
# CONFIG_OF_UNITTEST is not set
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_KOBJ=y
CONFIG_OF_DYNAMIC=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_RESERVED_MEM=y
CONFIG_OF_RESOLVE=y
CONFIG_OF_OVERLAY=y
CONFIG_OF_CONFIGFS=y
CONFIG_OF_MDIO=y
CONFIG_OF_GPIO=y
CONFIG_OF_IOMMU=y
╭─jphadmin at rp4-4g in ~
╰─○ sudo grep CONFIG_OVERLAY /boot/config-6.6.51-20241008.v8.1.el9
CONFIG_OVERLAY_FS=m
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
# CONFIG_OVERLAY_FS_DEBUG is not set
The question is why is this not able to be loaded and is there a potential workaround for this as without it my Pi is operating constantly at around 75-80 degrees which is very problematic.
Thanks for the report. I need to get PoE+ hat before I look into this issue.
Thanks for the report. I need to get PoE+ hat before I look into this issue.
Thanks this is also an issue with the rpi-poe dtoverlay I have tested both.