mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
ramips: elecom,wrc-2533ghbk: use nvmem for mac addresses
Userspace handling is deprecated. Since the u-boot ethaddr variable is quoted, we cannot use it. Use mac-base instead to specify in dts. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/14182 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
d7178cdd6e
commit
beca714ce5
2 changed files with 15 additions and 6 deletions
|
|
@ -12,6 +12,7 @@
|
|||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
label-mac-device = &gmac1;
|
||||
};
|
||||
|
||||
leds {
|
||||
|
|
@ -109,6 +110,12 @@
|
|||
reg = <0x0 0x4da8>;
|
||||
};
|
||||
|
||||
macaddr_factory_4: mac-address@4 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
eeprom_factory_8000: eeprom@8000 {
|
||||
reg = <0x8000 0x4da8>;
|
||||
};
|
||||
|
|
@ -118,10 +125,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&eeprom_factory_0 (-1)>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&eeprom_factory_0 (-2)>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
ðphy0 {
|
||||
|
|
|
|||
|
|
@ -263,12 +263,6 @@ ramips_setup_macs()
|
|||
edimax,rg21s)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
;;
|
||||
elecom,wrc-2533ghbk2-t|\
|
||||
elecom,wrc-2533ghbk-i)
|
||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
;;
|
||||
iodata,wnpr2600g)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
label_mac=$wan_mac
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue