Activating RPi 3B+ network port LED's

Ed Maste emaste at freebsd.org
Tue Mar 16 18:37:25 UTC 2021


On Tue, 16 Mar 2021 at 10:49, Ralf Wenk <iz-rpi03 at hs-karlsruhe.de> wrote:
>
> > Buildworld, buildkernel are running now to get a CURRENT from today.
> > I will also update the contents of the MSDOS partition to match what
> > is in the latest 14.0 image.
>
> As almost expected: No success. The Ethernet LEDs stayed dark.

There are a couple of things I'm unsure about with respect to this
issue. First, I did not see a microchip,led-modes entry in `ofwdump
-a`. I'm not sure if this is expected or not. I do however see it in
the dts dump (from `sysctl -b hw.fdt.dtb | dtc -I dtb -O dts`), and
I've attached that extracted dts to PR 254267.

For the second item, consider this excerpt from the dts:

usb-port at 1 {
    compatible = "usb424,2514";
    ethernet at 1 {
        local-mac-address = [...];
        compatible = "usb424,7800";
        mdio {
            ethernet-phy at 1 {
                microchip,led-modes = <0x1 0x6>;
            };
        };
    };
};

Both usb_fdt_get_mac_addr() and muge_set_leds() obtain the fdt node
from usb_fdt_get_node(). The MAC address is found as expected ("MAC
assigned from FDT data" is printed), but the LED mode data is not.

The driver attempts to fetch the LED mode data via OF_getencprop(node,
"microchip,led-modes", modes, sizeof(modes)). I'm not really familiar
with the OF_* routines, but as it stands the driver would require
OF_getencprop() to search for properties in subnodes, and I don't
think it does. We'd need to instead use the ethernet-phy at 1 node in the
OF_getencprop() call.


More information about the freebsd-arm mailing list