airpi:add led gpios

This commit is contained in:
padavanonly
2025-05-19 22:43:53 +08:00
parent 828704e09c
commit 0878b767b9
2 changed files with 30 additions and 0 deletions

View File

@@ -1,6 +1,32 @@
#include "mt7981.dtsi"
/ {
aliases {
led-boot = &sys_led;
led-failsafe = &sys_led;
led-running = &sys_led;
led-upgrade = &sys_led;
};
leds {
compatible = "gpio-leds";
sys_led:led1 {
label = "airpi:sys";
gpios = <&pio 15 GPIO_ACTIVE_LOW>;
};
wifi2g:led2{
label = "airpi:2g";
gpios = <&pio 34 GPIO_ACTIVE_LOW>;
};
wifi5g:led3{
label = "airpi:5g";
gpios = <&pio 35 GPIO_ACTIVE_LOW>;
};
};
chosen {
bootargs = "console=ttyS0,115200n1 loglevel=8 \
earlycon=uart8250,mmio32,0x11002000";

View File

@@ -11,6 +11,10 @@ board=$(board_name)
board_config_update
case "$board" in
*Airpi*)
ucidef_set_led_netdev "wlan2g" "WLAN2G" "airpi:2g" "ra0" "link"
ucidef_set_led_netdev "wlan5g" "WLAN5G" "airpi:2g" "rax0" "link"
;;
abt,asr3000)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wlan2g" "ra0"