Re: Raspberry Pi POE+ hat overlay

Doug Rabson <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <CACA0VUhXaXy1_VB64mK1FGKjf4SConOjtFG+4Es7oqbC0vGvtg@mail.gmail.com>
On Fri, 12 May 2023 at 17:38, Doug Rabson <[email protected]> wrote:

>
>
> On Fri, 12 May 2023 at 17:27, Mark Millard <[email protected]> wrote:
>
>> On May 12, 2023, at 08:43, Doug Rabson <[email protected]> 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
>

Ok, if I add the rpi-poe.dtbo file and change to using 'dtoverlay=rpi-poe',
then I do see the overlay in the booted system - thanks for all the
pointers. Looks like I need to figure out how to add rpi-poe-plus to the
rpi-firmware port first.


>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.