After being frustrated by the lack of documentation, I found this github project that seems to nail it:
https://github.com/raspberrypi/linux/issues/2715#issuecomment-769405042
rpi-poe was updated in March 2020 adding:
Name: rpi-poe
Info: Raspberry Pi PoE HAT fan
Load: dtoverlay=rpi-poe,<param>[=<val>]
Params: poe_fan_temp0 Temperature (in millicelcius) at which the fan
turns on (default 40000)
poe_fan_temp0_hyst Temperature delta (in millicelcius) at which
the fan turns off (default 2000)
poe_fan_temp1 Temperature (in millicelcius) at which the fan
speeds up (default 45000)
poe_fan_temp1_hyst Temperature delta (in millicelcius) at which
the fan slows down (default 2000)
poe_fan_temp2 Temperature (in millicelcius) at which the fan
speeds up (default 50000)
poe_fan_temp2_hyst Temperature delta (in millicelcius) at which
the fan slows down (default 2000)
poe_fan_temp3 Temperature (in millicelcius) at which the fan
speeds up (default 55000)
poe_fan_temp3_hyst Temperature delta (in millicelcius) at which
the fan slows down (default 5000)
Config suggested:
# PoE Hat Fan Speeds
dtoverlay=rpi-poe
dtparam=poe_fan_temp0=65000
dtparam=poe_fan_temp0_hyst=1000
dtparam=poe_fan_temp1=70000
dtparam=poe_fan_temp1_hyst=2500
dtparam=poe_fan_temp2=80000
dtparam=poe_fan_temp2_hyst=5000
dtparam=poe_fan_temp3=90000
dtparam=poe_fan_temp3_hyst=5000
Check if in dmesg you have an error like, then you're hitting a problem with a firmware update:
[...] rpi-poe-fan rpi-poe-fan@0: Failed to get default PWM value: -5
[...] rpi-poe-fan: probe of rpi-poe-fan@0 failed with error -5
Explanations on how to use a previous firmware in here:
https://github.com/raspberrypi/firmware/issues/1531
After you change config.txt and reboot, check that values are Ok with:
od -An --endian=big -td4 /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/temperature /proc/device-tree/thermal-zones/cpu-thermal/trips/trip?/hysteresis
You should get:
65000 70000 80000 90000
1000 2500 5000 5000
Cheers