infix icon indicating copy to clipboard operation
infix copied to clipboard

NanoPi R2S: traffic LEDs on eth1 (LAN) not working

Open troglobit opened this issue 1 year ago • 2 comments

While porting to Infix I'm sure I had the LEDs on both ports working fine at some point. Went from Linux 5.16, and while trying out various WiFi USB plugs, I went as high as 6.7.1 before landing on 6.5.11, which Infix is currently is on. So current linux_defconfig works on that newer kernels, but we have some patches that don't apply, so no way of testing before relocating them to a subdirectory.

From discussion in https://github.com/kernelkit/infix/pull/271#issuecomment-1905381201

troglobit avatar Jan 23 '24 07:01 troglobit

Is this on the LAN and/or WAN port?

Had a quick look at the schematic: the LEDs on both ports are controlled by the respective PHY.

The WAN port's PHY driver does not have any support for controlling the chip's LEDs, so it ought to run with the default settings.

The USB-to-Ethernet controller on the LAN port, messes about with some LED registers, by the looks of it, but that code hasn't changed since 5.13 :man_shrugging:

Are you running the original bootloader or the one you built? Sometimes vendors will configure things like LEDs in U-Boot and then trust Linux not to mess with them. Maybe you're missing some vendor patch to U-Boot?

wkz avatar Jan 23 '24 09:01 wkz

You guessed it, the LAN port LEDs.

I've used the same U-Boot as is in the Buildroot default recipe. Dunno of any vendor specific U-Boot, the device can only boot from SD-card (no NOR flash or eMMC available onboard).

Only major difference I can think of: I did the initial bringup and testing on myLinux, which uses a much newer Buildroot base than Infix currently does. So we can table this one until we've bumped Buildroot (and the kernel?). Like @minexn says in #271, the port still works, so just an annoyance atm.

troglobit avatar Jan 23 '24 11:01 troglobit

Found it, the driver was not setting up the LED register. Fixed in kkit-linux-6.10-y @ daba70e7.

Patch ported to upcoming r2s branch.

troglobit avatar Aug 11 '24 09:08 troglobit