aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/generic
diff options
context:
space:
mode:
authorMichael Pratt <mcpratt@pm.me>2023-01-31 13:58:38 -0500
committerHauke Mehrtens <hauke@hauke-m.de>2023-02-12 18:07:31 +0100
commit5e973dd61f15a1d21dd1614780775114b28ed0b5 (patch)
tree58f5cf92e41efcd639fa8485678f7800ecb9e980 /target/linux/ath79/generic
parentf545caf00194d31f8896c729213e13859547f994 (diff)
downloadupstream-5e973dd61f15a1d21dd1614780775114b28ed0b5.tar.gz
upstream-5e973dd61f15a1d21dd1614780775114b28ed0b5.tar.bz2
upstream-5e973dd61f15a1d21dd1614780775114b28ed0b5.zip
ath79: add eth0 mac and initvals for Engenius EPG5000
Although VLANs are used, the "eth0" device by itself does not have a valid MAC, so fix that with preinit script. More initvals added by editing the driver to print switch registers, after the bootloader sets them but before openwrt changes them. The register bits needed for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ath79/generic')
-rw-r--r--target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
index def4417fbc..5fa23e8eb6 100644
--- a/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
+++ b/target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -12,6 +12,7 @@ preinit_set_mac_address() {
ip link set dev eth0 address $(mtd_get_mac_ascii bdcfg "lanmac")
ip link set dev eth1 address $(mtd_get_mac_ascii bdcfg "wanmac")
;;
+ engenius,epg5000|\
engenius,esr1200|\
engenius,esr1750|\
engenius,esr900)