I have a board with MT7628 SoC CPU, the board has 1 wan port and 4 lan ports, the dts content of the board is as follows:
/dts-v1/;
#include "mt7628an.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "myboard", "mediatek,mt7628an-soc";
model = "myboard";
chosen {
bootargs = "console=ttyS0,115200";
};
memory@0 {
device_type = "memory";
reg = <0x0 0x8000000>; // 128MB
};
leds {
compatible = "gpio-leds";
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
};
};
&state_default {
gpio {
groups = "gpio", "wdt", "i2s", "wled_an", "p1led_an", "p2led_an", "p3led_en", "p4led_an";
function = "gpio";
};
};
&spi0 {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <32000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x0 0x30000>;
read-only;
};
partition@30000 {
label = "u-boot-env";
reg = <0x30000 0x10000>;
};
factory: partition@40000 {
label = "factory";
reg = <0x40000 0x10000>;
};
partition@50000 {
compatible = "denx,uimage";
reg = <0x50000 0x0>;
label = "firmware";
};
};
};
};
&i2c {
status = "okay";
};
ðernet {
status = "okay";
nvmem-cells = <&macaddr_factory_28>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&factory {
compatible = "nvmem-cells";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_28: macaddr@28 {
reg = <0x28 0x6>;
};
};
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&wmac {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};
&pcie {
status = "okay";
};
where the 02_network
network is configured as follows:
# head -n 20 ./target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
ramips_setup_interfaces()
{
local board="$1"
case $board in
myboard)
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0"
;;
...
I used the latest OpenWrt 23.04, compiled and burned it into the device, connected the network cable to test the status of the NIC lights, and found that after the cable is connected, only the led of lan3 is lit, and the led of lan1, lan2, lan4 are not lit.
How can I modify it so that the lan1, lan2, lan4 status LEDs light up when the network cable is connected or when data is being transferred?