openwrt/target/linux/bcm63xx/base-files/etc/board.d/01_leds

110 lines
3.3 KiB
Plaintext
Raw Normal View History

#!/bin/sh
#
# Copyright (C) 2013-2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
actiontec,r1000h)
ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
;;
adb,a4001n|\
bcm63xx: add support for ADB P.DG A4101N A-000-1A1-AE ADB P.DG A4101N A-000-1A1-AE has a similar PCB as the OpenWrt's ADB P.DG A4001N1 with LEDs connected to different GPIO PINs in active low configuration. Hardware: * Board ID: 96328avngv * SoC: Broadcom BCM6328 (rev b0) @ 320MHz, CPU BMIPS4350 * RAM DDR2: 64 Mbyte - Winbond W9751G6KB-25 * Serial flash: 16 Mbyte - Winbond 25Q128BVFG * Ethernet: 4x Ethernet 10/100 baseT * Wifi 2.4GHz: Broadcom Corporation BCM43225 Wireless Network Adapter (rev 23) * LEDs: 1x Power, 1x DSL, 1x Internet, 4x ETH, 1x USB, 1x WLAN, 1x WPS, 1x TEL * Buttons: 1x Reset, 1x WPS, 1x unnamed * UART: 1x TTL 115200n8, VCC RX TX GND, on J502 connector Installation via CFE: * Stock CFE has to be overwritten with a generic 6328 one that can upload .bin images with no signature check (cfe6328_configured.bin) * Connect a serial port to the board * Stop the cfe boot process after power on by pressing enter * Set static IP 192.168.2.10 and subnet mask 255.255.255.0 * Navigate to http://192.168.2.50/ * Upload the OpenWrt image file A4101N GPIO LAYOUT: Power always on DSL GPIO483(03) Internet GPIO491(11) ETH1 GPIO505(25) ETH2 GPIO506(26) ETH3 GPIO507(27) ETH4 GPIO508(28) USB GPIO490(10) WLAN controlled by BCM43225 WPS GPIO489(09) TEL GPIO511(31) Key RESET GPIO503(23) Key WPS GPIO504(24) Key unnamed GPIO492(12) Signed-off-by: Daniele Castro <danielecastro@hotmail.it> [Amend commit description, DTS improvements, refresh patches] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-09-09 01:21:14 +00:00
adb,pdg-a4101n-a-000-1a1-ae|\
comtrend,ar-5315u|\
comtrend,vr-3032u|\
d-link,dsl-2750u-c1|\
huawei,hg253s-v2|\
nucom,r5010un-v2|\
sagem,fast-2704-v2)
ucidef_set_led_usbdev "usb" "USB" "green:usb" "1-1"
;;
adb,a4001n1)
ucidef_set_led_netdev "lan" "LAN" "green:eth" "eth0"
ucidef_set_led_usbdev "usb" "USB" "green:3g" "1-1"
;;
adb,pdg-a4001n-a-000-1a1-ax)
ucidef_set_led_netdev "lan" "LAN" "green:internet" "eth0.1"
ucidef_set_led_netdev "wan" "WAN" "green:adsl" "eth0.2"
ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "green:service" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "red:service" "2-1"
;;
adb,av4202n)
ucidef_set_led_netdev "wlan0" "WLAN" "blue:wifi" "wlan0"
;;
bt,home-hub-2-a)
ucidef_set_led_netdev "lan" "LAN" "blue:broadband" "eth0.1"
ucidef_set_led_netdev "wlan0" "WIFI" "green:wireless" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "blue:phone" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "green:phone" "2-1"
;;
huawei,echolife-hg553)
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
ucidef_set_led_usbdev "usb1" "USB1" "red:hspa" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "blue:hspa" "1-2"
;;
huawei,echolife-hg556a-a|\
huawei,echolife-hg556a-b|\
huawei,echolife-hg556a-c)
ucidef_set_led_netdev "lan" "LAN" "red:dsl" "eth0"
ucidef_set_led_usbdev "usb" "USB" "red:hspa" "1-2"
;;
huawei,echolife-hg622|\
huawei,echolife-hg655b)
ucidef_set_led_usbdev "usb" "USB" "green:usb" "1-2"
;;
inventel,livebox-1)
ucidef_set_led_netdev "lan" "LAN" "red:traffic" "eth0"
ucidef_set_led_netdev "wan" "WAN" "red:adsl" "eth1"
ucidef_set_led_netdev "wlan0" "WIFI" "red:wifi" "wlan0"
;;
netgear,dgnd3700-v1)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0.1"
ucidef_set_led_netdev "wan" "WAN" "green:inet" "eth0.2"
ucidef_set_led_netdev "wlan0" "WIFI2G" "green:wifi2g" "wlan0"
ucidef_set_led_netdev "wlan1" "WIFI5G" "blue:wifi5g" "wlan1"
ucidef_set_led_usbdev "usb1" "USB1" "green:usb-back" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "green:usb-front" "1-2"
;;
netgear,dgnd3700-v2)
ucidef_set_led_netdev "lan" "LAN" "green:ethernet" "eth0"
ucidef_set_led_usbdev "usb1" "USB1" "green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "green:usb2" "1-2"
;;
netgear,evg2000)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_netdev "wlan0" "WIFI" "green:wireless" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "green:voip1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "green:voip2" "1-2"
;;
sagem,fast-2704n)
ucidef_set_led_netdev "wan" "WAN" "green:inet" "eth0.2"
;;
sercomm,ad1018|\
sercomm,ad1018-nor)
ucidef_set_led_netdev "wlan0" "WLAN" "green:wifi" "wlan0"
;;
sercomm,h500-s-lowi|\
sercomm,h500-s-vfes)
ucidef_set_led_netdev "wan" "WAN" "green:internet" "eth0.2"
;;
bcm63xx: add support for Technicolor TG582n Telecom Italia branded Technicolor TG582n Telecom Italia branded a.k.a. Telecom Italia ADSL2+ Wi-Fi N (AGTWI) has the same PCB as the unbranded Technicolor TG582n with LEDs connected to different GPIO PINs in active low configuration and different LED names. It has a PCB similar to the OpenWrt's ADB P.DG A4001N1 one. Hardware: * Board ID: DANT-V * SoC: Broadcom BCM6328 (rev b0) @ 320MHz, CPU BMIPS4350 * RAM DDR2: 64 Mbyte - EtronTech EM68B16CWQD-25H * Serial flash: 16 Mbyte - Spansion FL 128SAIF00 * Ethernet: 4x Ethernet 10/100 baseT * Wifi 2.4GHz: Broadcom Corporation BCM43227 Wireless Network Adapter (rev 30) * LEDs: 2x Power, 1x ADSL, 2x Internet, 2x Wi-Fi, 2x Service, 4x ethernet * Buttons: 1x Reset, 1x WPS (named WiFi/LED) * UART: 1x TTL 115200n8, VCC GND TX RX, on J3 connector (short R62 and R63) Installation via CFE: * Stock CFE has to be overwritten with a generic 6328 one that can upload .bin images with no signature check (cfe6328_configured.bin) * Connect a serial port to the board * Stop the CFE boot process after power on by pressing enter * Set static IP 192.168.2.10 and subnet mask 255.255.255.0 * Navigate to http://192.168.2.50/ * Upload the OpenWrt image file PCB: |GPIO: |TG582n: |AGTWI: LED2R |488(08) |red Power |red Power LED2G |484(04) |green Power |green Power LED10R |486(06) | |missing R85 end LED LED13G |485(05) |green Ethernet |green ADSL LED11R |494(14) | |red Internet LED14G |491(11) |green Broadband |green Internet LED5R |487(07) |red Internet |red Wi-Fi LED5G |481(01) |green Internet |green Wi-Fi LED12R |498(18) | |red Service LED12G |499(19) | |green Service LED6R |482(02) |red Wi-Fi |missing R108 end LED LED6G |483(03) |green Wi-Fi |missing R107 end LED LED7R |490(10) |red WPS |missing R91 end LED LED7G |489(09) |green WPS |missing R92 end LED LED4 |508(28) |ethernet port 4 |ethernet port 4 LED3 |507(27) |ethernet port 3 |ethernet port 3 LED9 |506(26) |ethernet port 2 |ethernet port 2 LED8 |505(25) |ethernet port 1 |ethernet port 1 SW3 |503(23) |key Reset |key Reset SW5 |504(24) |key WPS |key Wi-Fi/LED SW4 |495(15) |key Wi-Fi |missing R127 end key SW6 |493(13) | |missing R171 end key SW1 |492(12) | |missing R1 end key Signed-off-by: Daniele Castro <danielecastro@hotmail.it> [DT fixes, base-files fixes and device variant] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2020-09-08 15:16:06 +00:00
technicolor,tg582n-telecom-italia)
ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
ucidef_set_led_usbdev "usb1" "USB1" "green:service" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "red:service" "2-1"
;;
telsey,cpva502plus)
ucidef_set_led_netdev "lan" "LAN" "amber:link" "eth0"
;;
esac
board_config_flush
exit 0