mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-12 18:05:15 +00:00
ath79: ja76pf2: use nvmem cells to specify MAC addresses
The bootloader on this board hid the partition containig MAC addresses and prevented adding this space to FIS directory, therefore those had to be stored in RedBoot configuration as aliases to be able to assigne them to proper interfaces. Now that fixed partition size are used instead of redboot-fis parser, the partition containig MAC addresses could be specified, and with marking it as nvmem cell, we can assign them without userspace involvement. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
This commit is contained in:
parent
5897c52e78
commit
b52719b71a
@ -101,12 +101,16 @@
|
|||||||
ð0 {
|
ð0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_lan>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
phy-handle = <&phy0>;
|
phy-handle = <&phy0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
ð1 {
|
ð1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
nvmem-cells = <&macaddr_wan>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
phy-handle = <&phy4>;
|
phy-handle = <&phy4>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -161,6 +165,17 @@
|
|||||||
label = "Atheros Board Data";
|
label = "Atheros Board Data";
|
||||||
reg = <0xff0000 0x10000>;
|
reg = <0xff0000 0x10000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
compatible = "nvmem-cells";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
macaddr_wan: macaddr@1000 {
|
||||||
|
reg = <0x1000 0x6>;
|
||||||
|
};
|
||||||
|
|
||||||
|
macaddr_lan: macaddr@1006 {
|
||||||
|
reg = <0x1006 0x6>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -652,10 +652,6 @@ ath79_setup_macs()
|
|||||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||||
label_mac=$wan_mac
|
label_mac=$wan_mac
|
||||||
;;
|
;;
|
||||||
jjplus,ja76pf2)
|
|
||||||
wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
|
|
||||||
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
||||||
;;
|
|
||||||
mercury,mw4530r-v1|\
|
mercury,mw4530r-v1|\
|
||||||
tplink,tl-wdr3600-v1|\
|
tplink,tl-wdr3600-v1|\
|
||||||
tplink,tl-wdr4300-v1|\
|
tplink,tl-wdr4300-v1|\
|
||||||
|
Loading…
Reference in New Issue
Block a user