Re: Raspberry Pi POE+ hat overlay

From: Doug Rabson <dfr_at_rabson.org>
Date: Fri, 12 May 2023 16:38:30 UTC
On Fri, 12 May 2023 at 17:27, Mark Millard <marklmi@yahoo.com> wrote:

> On May 12, 2023, at 08:43, Doug Rabson <dfr@rabson.org> wrote:
>
> > I have a pi4 with the official POE+ hat which I want to run FreeBSD on.
> One thing I noticed is that the fan doesn't run in FreeBSD so I decided to
> try and write a little driver for it. First step seems to be to load the
> corresponding devicetree overlay by adding something like this to
> /boot/msdos/config.txt:
> >
> > dtoverlay=rpi-poe-plus
> > dtparam=poe_fan_temp0=45000,dtparam=poe_fan_temp0_hyst=3000
> > dtparam=poe_fan_temp1=50000,dtparam=poe_fan_temp1_hyst=3000
> > dtparam=poe_fan_temp2=62000,dtparam=poe_fan_temp2_hyst=4000
> > dtparam=poe_fan_temp3=70000,dtparam=poe_fan_temp3_hyst=5000
> >
> > Unfortunately this is where I'm stuck - the overlay is not present in
> the final DTB given to the kernel so there isn't anything to hook a driver
> to. Are dtoverlays supposed to work on FreeBSD?
>
> The RPi* firwmare version that FreeBSD has in ports and uses
> in making snapshots and other images does not have that overlay:
>
> # ls -Tld /usr/local/share/rpi-firmware/overlays/rpi*
> -rw-r--r--  1 root  wheel   489 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-backlight.dtbo
> -rw-r--r--  1 root  wheel  4081 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-cirrus-wm5102.dtbo
> -rw-r--r--  1 root  wheel   643 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-dac.dtbo
> -rw-r--r--  1 root  wheel  2574 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-display.dtbo
> -rw-r--r--  1 root  wheel   842 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-ft5406.dtbo
> -rw-r--r--  1 root  wheel  2937 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-poe.dtbo
> -rw-r--r--  1 root  wheel   771 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-proto.dtbo
> -rw-r--r--  1 root  wheel   893 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-sense.dtbo
> -rw-r--r--  1 root  wheel   567 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpi-tv.dtbo
> -rw-r--r--  1 root  wheel  1226 Mar  3 05:29:57 2021
> /usr/local/share/rpi-firmware/overlays/rpivid-v4l2.dtbo
>
> You do not mention establishing a copy of overlays/rpi-poe-plus.dtbo .
>

I copied the file from a rasbian install I had for another project. Perhaps
I should find the corresponding source for it and build it with the device
tree source from FreeBSD.


>
> You also do not mention what version of FreeBSD you are using
> on the RPi4B. The output of the command:
>

I'm running 13.2-RELEASE-p0