0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-25 14:36:14 +00:00
openwrt/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
Vaclav Svoboda 3a9752ea02 ramips: mt76x8: Add support for Zbtlink ZBT-WE2426-B
The Zbtlink ZBT-WE2426-B is an indoor dual band WiFi router
with 4 external non detachable antennas and 5 Fast Ethernet ports.

Hardware of ZBT-WE2426-B:
- SoC: MT7628AN
- RAM: 64 MB (Winbond W9751G6K8-25)
- Storage: 8 MB SPI flash (S25FL064K)
- Ethernet: 5x 10/100 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
- Wireless: 2.4GHz: on SoC (802.11b/g/n)
- Wireless: 5GHz: Mediatek MT7612EN (802.11n/ac)
- LEDs: 8x
- Buttons: 1x reset
- USB: 1x 2.0
- MicroSD slot: 1x
- Power: 9 VDC, 1 A
- Uart: GND TX RX PWR - J1 on the PCB
- Board silkscreen: "ZBT-WE2426-C V04" "2018-02-28" "CTT" "13 18"

Backup the stock firmware, settings and calibration data:
This router comes with PandoraBox OpenWrt firmware, so it is
possible to get all MTD partitions using scp.

Installation:
- Using the bootloader web server. Hold the reset button while turning
  the power on. Upload the sysupgrade image on http://192.168.1.1.
- Using the sysupgrade command in PandoraBox OpenWrt.

LEDs:
- LAN1,LAN2,LAN3,LAN4,WAN,WLAN2G use GPIO pins of the MT7628AN SoC
  (GPIOs 43,42,41,40,39,44)
- WLAN5G uses pin of MT7612EN.
- The POWER LED is directly connected to the VCC. It can be reconnected to
  the GPIO 37 of the MT7628AN SoC by resoldering SMD resistor on the PCB.

Buttons:
- The RESET button is connected to the GPIO 38 of the MT7628AN SoC.

MAC addresses as verified by OEM firmware:
use   address   source
2g    *:b0      factory 0x4 (label)
5g    *:b1      factory 0x8004
LAN   *:b2      factory 0x28
WAN   *:b3      factory 0x2e

Signed-off-by: Vaclav Svoboda <svoboda@neng.cz>
Link: https://github.com/openwrt/openwrt/pull/16927
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-23 17:41:39 +01:00

205 lines
7.2 KiB
Plaintext

. /lib/functions/leds.sh
. /lib/functions/uci-defaults.sh
board=$(board_name)
board_config_update
case $board in
7links,wlr-1230)
ucidef_set_led_switch "lan" "lan" "orange:lan" "switch0" "0x10"
;;
alfa-network,awusfree1)
ucidef_set_led_netdev "wifi_led" "wifi" "blue:wlan" "wlan0"
;;
asus,rt-n10p-v3|\
asus,rt-n11p-b1|\
asus,rt-n12-vp-b1|\
netgear,r6020|\
netgear,r6080|\
netgear,r6120|\
yuncore,cpe200|\
yuncore,m300)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0xf"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
;;
cudy,wr1000)
ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
ucidef_set_led_switch "lan1" "lan1" "blue:lan1" "switch0" "0x08"
ucidef_set_led_switch "lan2" "lan2" "blue:lan2" "switch0" "0x04"
;;
dlink,dap-1325-a1)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "wifi-verylow" "wifi-verylow" "red:wifi-verylow" "wlan0" "1" "24"
ucidef_set_led_rssi "wifi-low" "wifi-low" "green:wifi-low" "wlan0" "25" "100"
ucidef_set_led_rssi "wifi-med" "wifi-med" "green:wifi-mid" "wlan0" "50" "100"
ucidef_set_led_rssi "wifi-high" "wifi-high" "green:wifi-high" "wlan0" "75" "100"
;;
elecom,wrc-1167fs)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x10"
;;
glinet,gl-mt300n-v2)
ucidef_set_led_netdev "wifi_led" "wifi" "red:wlan" "wlan0"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x1"
;;
hilink,hlk-7628n|\
skylab,skw92a)
ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
;;
hilink,hlk-7688a)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
hiwifi,hc5611)
ucidef_set_led_netdev "internet" "internet" "red:internet" "br-lan" "tx rx"
;;
hiwifi,hc5661a|\
hiwifi,hc5761a)
ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x10"
;;
keenetic,kn-1613)
ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
;;
mediatek,linkit-smart-7688)
ucidef_set_led_wlan "wifi" "wifi" "orange:wifi" "phy0tpt"
;;
oraybox,x1)
ucidef_set_led_netdev "wifi" "wifi" "blue:status" "wlan0"
;;
rakwireless,rak633)
ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
;;
tama,w06)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
tplink,archer-c20-v4|\
tplink,archer-c20-v5|\
tplink,tl-wr850n-v2)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
;;
tplink,archer-c50-v3|\
tplink,archer-c50-v4|\
tplink,archer-c50-v6)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "wlan5g" "green:wlan5g" "phy1tpt"
;;
tplink,archer-mr200-v5)
ucidef_set_led_netdev "lan" "lan" "white:lan" "eth0"
ucidef_set_led_netdev "wan" "wan" "white:wan" "wwan0"
;;
tplink,re200-v2|\
tplink,re200-v3|\
tplink,re200-v4|\
tplink,re220-v2|\
tplink,tl-mr3020-v3|\
tplink,tl-wa801nd-v5)
ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
;;
tplink,re205-v3)
ucidef_set_led_netdev "lan" "lan" "blue:signal" "eth0"
;;
tplink,re365-v1)
ucidef_set_led_netdev "lan" "lan" "blue:lan" "eth0"
;;
tplink,tl-mr3420-v5|\
tplink,tl-wr840n-v4|\
tplink,tl-wr842n-v5)
ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
;;
tplink,tl-mr6400-v4)
ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x0e"
ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x10"
;;
tplink,tl-mr6400-v5)
ucidef_set_led_switch "lan" "lan" "white:lan" "switch0" "0x07"
ucidef_set_led_switch "wan" "wan" "white:wan" "switch0" "0x08"
;;
tplink,tl-wr841n-v13)
ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2"
ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x4"
ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x8"
ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x10"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
;;
tplink,tl-wr841n-v14)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
ucidef_set_led_wlan "wifi_led" "wifi" "green:wlan" "phy0tpt"
;;
tplink,tl-wr902ac-v3)
ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan" "phy0tpt"
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x10"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
;;
tplink,tl-wr902ac-v4)
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
;;
unielec,u7628-01-16m)
ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x2"
ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x4"
ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x8"
ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x10"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
;;
wavlink,wl-wn570ha1)
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "wifi-low" "wifi-low" "green:wifi-low" "wlan0" "1" "49"
ucidef_set_led_rssi "wifi-med" "wifi-med" "green:wifi-med" "wlan0" "50" "84"
ucidef_set_led_rssi "wifi-high" "wifi-high" "green:wifi-high" "wlan0" "85" "100"
ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
;;
wavlink,wl-wn575a3)
ucidef_set_rssimon "wlan1" "200000" "1"
ucidef_set_led_rssi "wifi-low" "wifi-low" "green:wifi-low" "wlan1" "1" "49"
ucidef_set_led_rssi "wifi-med" "wifi-med" "green:wifi-med" "wlan1" "50" "84"
ucidef_set_led_rssi "wifi-high" "wifi-high" "green:wifi-high" "wlan1" "85" "100"
;;
wavlink,wl-wn576a2)
ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x10"
;;
wavlink,wl-wn577a2|\
wavlink,wl-wn578a2)
ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
;;
xiaomi,mi-router-4a-100m|\
xiaomi,mi-router-4a-100m-intl|\
xiaomi,mi-router-4a-100m-intl-v2)
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x01"
;;
xiaomi,mi-router-4c)
ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
;;
zbtlink,zbt-we1226)
ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x01"
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x02"
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x10"
;;
zbtlink,zbt-we2426-b)
ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
ucidef_set_led_switch "lan1" "lan1" "green:lan-1" "switch0" "0x01"
ucidef_set_led_switch "lan2" "lan2" "green:lan-2" "switch0" "0x02"
ucidef_set_led_switch "lan3" "lan3" "green:lan-3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "lan4" "green:lan-4" "switch0" "0x08"
;;
zyxel,keenetic-extra-ii)
ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x01"
;;
esac
board_config_flush
exit 0