mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-13 11:08:06 +04:00
The LAN LEDs of the EN7528 boards are wired to the LED pins of the GPHYs sitting behind the switch ports, but were described as plain GPIOs, so they were left under software control and stayed dark. Add the LED nodes to the GPHYs of the SoC .dtsi, mux the LED pins to the matching phyN_ledM function of the pin controller, and replace the gpio-leds nodes of the LAN LEDs with references to the PHY LEDs. The LEDs are then driven by the PHY itself, without any CPU involvement. The JioFiber boards have both LED pins of every GPHY wired up, giving a bicolour LED per socket. The H660GM-A boards only have the LED1 pins wired, as the LED0 pins are used as GPIOs for the other LEDs and for the WPS button; the amber LEDs of the generic variant stay plain GPIOs. Add board.d/01_leds to hook the LEDs up to the netdev trigger, which the PHY driver offloads to the hardware. Signed-off-by: Ahmed Naseef <naseefkm@gmail.com> Link: https://github.com/openwrt/openwrt/pull/25098 Signed-off-by: Robert Marko <robimarko@gmail.com>