mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-12-06 12:44:00 -05:00
ath79: ecb1xxx: use nvmem
Userspace handling is deprecated. Also switch LED to led-sources for simplicity. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20529 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
616b0cebe7
commit
e5b86c2320
@ -8,6 +8,7 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
@ -35,12 +36,6 @@
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
wifi2g {
|
||||
label = "blue:wifi2g";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
|
||||
wifi5g {
|
||||
label = "blue:wifi5g";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
@ -71,6 +66,14 @@
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "u-boot,env";
|
||||
|
||||
macaddr_uboot_ethaddr: ethaddr {
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
@ -95,6 +98,10 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cal_art_1000: calibration@1000 {
|
||||
reg = <0x1000 0x440>;
|
||||
};
|
||||
|
||||
cal_art_5000: calibration@5000 {
|
||||
reg = <0x5000 0x844>;
|
||||
};
|
||||
@ -120,6 +127,9 @@
|
||||
phy-handle = <&phy5>;
|
||||
phy-mode = "rgmii-id";
|
||||
|
||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
pll-data = <0x82000000 0x80000101 0x80001313>;
|
||||
|
||||
gmac-config {
|
||||
@ -142,5 +152,11 @@
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
qca,no-eeprom;
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
|
||||
led {
|
||||
led-sources = <13>;
|
||||
led-active-low;
|
||||
};
|
||||
};
|
||||
|
||||
@ -722,9 +722,7 @@ ath79_setup_macs()
|
||||
;;
|
||||
elecom,wab-i1750-ps|\
|
||||
elecom,wab-s1167-ps|\
|
||||
elecom,wab-s600-ps|\
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
elecom,wab-s600-ps)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
|
||||
@ -15,11 +15,6 @@ case "$FIRMWARE" in
|
||||
avm,fritzdvbc)
|
||||
caldata_extract_reverse "urlader" 0x1541 0x440
|
||||
;;
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
|
||||
;;
|
||||
sitecom,wlr-7100|\
|
||||
sitecom,wlr-8100)
|
||||
caldata_extract "art" 0x1000 0x440
|
||||
|
||||
@ -49,8 +49,7 @@ case "$board" in
|
||||
;;
|
||||
engenius,ecb1200|\
|
||||
engenius,ecb1750)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii u-boot-env athaddr > /sys${DEVPATH}/macaddress
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env athaddr)" ${PHYNBR} > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user