• POE Hat and dtoverlays in Debian 12

    From Markus Falb@21:1/5 to All on Thu Jul 13 22:00:02 2023
    Hi, it’s Markus.

    Some time ago there was a thread on this list about POE Hat in bullseye.
    The outcome of this was the assumption that CONFIG_PWM_RASPBERRYPI_POE kernel module is necessary to have the fan working but in the end it was never discussed what is really necessary to have the fan of the POE Hat working.

    I stumbled upon this as I have raspberry’s with POE Hats and I had the idea of putting debian on one of them. I soon realized that the fan was not working, I did some research on the topic, tried some things and I still have the fan not working.

    What I tried is basically getting a

    ...
    dtoverlay=rpi-poe
    ...

    into /boot/firmware/config.txt

    This led to the question where the overlays are located. I had a look at a working Ubuntu 20 and there is ls /boot/firmware/overlays/rpi-poe.dtbo. Where to find the overlays in Debian, if at all?

    Because I could not find the overlays (maybe they are not shipped?) I compiled it myself
    https://github.com/raspberrypi/linux/blob/1.20230405/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts

    There are warnings which I ignore for now. I put the overlay at some of the possible locations

    /boot/firmware/rpi-poe.dtbo
    /boot/firmware/overlays/rpi-poe.dtbo
    /boot/overlays/rpi-poe.dtbo

    but again I do not really know where to put it. I do not yet have a way to debug that properly. I tried

    ...
    dtdebug=1
    ...

    in config.txt but I don’t notice effect. Ultimately, I would love to see log entries that shows where the firmware looks for overlays and where it find files and which files it loads and so on.

    I also put

    pwm-raspberrypi-poe
    pwm-fan

    into the initramfs. The modules are loaded into the kernel but I do not see the Hat in the loaded devicetree.

    In the end I try to load an overlay but I does not seem to have effect.

    I think it boils down to the following questions

    How do I load a dtoverlay into the kernel
    How do I debug loading of dtoverlays

    And last but not least, of course there could be fundamental flaws in the approach, I am by no means a kernel or boot sequence expert. General hints and help will be very welcomed and appreciated.


    Best Regards, Markus

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sebastian Kuzminsky@21:1/5 to Markus Falb on Fri Jul 14 04:30:01 2023
    On 7/13/23 13:53, Markus Falb wrote:
    Because I could not find the overlays (maybe they are not shipped?) I compiled it myself
    https://github.com/raspberrypi/linux/blob/1.20230405/arch/arm/boot/dts/overlays/rpi-poe-overlay.dts

    Most of the Raspberry Pi overlays are not in the mainline Linux kernel,
    they're only in the Raspberry Pi fork of the Linux kernel which you
    pointed to above.

    Furthermore, I believe that the overlays in the Raspberry Pi kernel
    apply cleanly to the base device tree that ships with the Raspberry Pi
    kernel, but not to the base device tree in the mainline Linux kernel (or
    to the one in the Debian kernel).

    Ubuntu is shipping the Raspberry Pi fork of the kernel (or something
    very close to it), including all their overlays. Debian on the other
    hand ships a closer-to-mainline kernel which does not include the
    Raspberry Pi overlays (or a bunch of their kernel patches that make it
    easier to work with overlays at runtime).

    This really limits the functionality of the Raspberry Pi running Debian.

    I ran in to this problem when trying to enable SPI on the Raspberry Pi,
    which (on Raspberry Pi OS and Ubuntu) is done with a device tree overlay.


    --
    Sebastian Kuzminsky

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)