;;
enterasys,ws-ap3710i)
ucidef_set_interface_lan "eth0"
- ucidef_set_label_macaddr "$(mtd_get_mac_ascii cfg1 ethaddr)"
;;
fsl,P2020RDB)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "eth1"
;;
hpe,msm460)
ucidef_set_interface_lan "eth0"
- ;;
+ ;;
ocedo,panda)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8" "eth1"
;;
+++ /dev/null
-. /lib/functions.sh
-. /lib/functions/system.sh
-
-preinit_set_mac_address() {
- case $(board_name) in
- enterasys,ws-ap3710i)
- ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
- ;;
- enterasys,ws-ap3715i|\
- extreme-networks,ws-ap3825i)
- ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
- ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr)
- ;;
- esac
-}
-
-boot_hook_add preinit_main preinit_set_mac_address
CONFIG_NR_IRQS=512
CONFIG_NVMEM=y
CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
# CONFIG_NVMEM_QORIQ_EFUSE is not set
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_NR_IRQS=512
CONFIG_NVMEM=y
CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
# CONFIG_NVMEM_QORIQ_EFUSE is not set
CONFIG_OBJTOOL=y
CONFIG_OF=y
compatible = "enterasys,ws-ap3710i";
aliases {
- ethernet0 = &enet0;
- ethernet1 = &enet2;
led-boot = &led_power_green;
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_red;
+ label-mac-device = &enet0;
};
chosen {
reg = <0x1f20000 0x20000>;
label = "cfg1";
read-only;
+
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool";
+ env-size = <0x10000>;
+
+ macaddr_cfg1_ethaddr: ethaddr {
+ };
+ };
};
};
};
enet0: ethernet@b0000 {
phy-connection-type = "rgmii-id";
phy-handle = <&phy4>;
+
+ nvmem-cells = <&macaddr_cfg1_ethaddr>;
+ nvmem-cell-names = "mac-address";
};
enet1: ethernet@b1000 {
bd-stash;
};
-&enet2 {
- rx-stash-idx = <0x00>;
- rx-stash-len = <0x60>;
- bd-stash;
-};
-
/*
* For the OpenWrt 22.03 release, since Linux 5.10.138 now uses
* aliases to determine PCI domain numbers, drop aliases so as not to
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_red;
+ label-mac-device = &enet0;
};
chosen {
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
+ nvmem-cells = <&macaddr_cfg1_ethaddr 0>;
+ nvmem-cell-names = "mac-address";
+
label = "lan1";
};
tbi-handle = <&tbi_phy>;
+ nvmem-cells = <&macaddr_cfg1_ethaddr 1>;
+ nvmem-cell-names = "mac-address";
+
label = "lan2";
};
partition@120000 {
reg = <0x120000 0x10000>;
label = "cfg1";
+
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool";
+ env-size = <0x1000>;
+
+ macaddr_cfg1_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@130000 {
#size-cells = <2>;
aliases {
- ethernet0 = &enet0;
- ethernet1 = &enet2;
led-boot = &led_power_green;
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_red;
+ label-mac-device = &enet0;
};
chosen {
partition@3f20000 {
reg = <0x3f20000 0x20000>;
label = "cfg1";
+
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool";
+ env-size = <0x10000>;
+
+ macaddr_cfg1_ethaddr: ethaddr {
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
};
};
enet0: ethernet@b0000 {
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
+
+ nvmem-cells = <&macaddr_cfg1_ethaddr 0>;
+ nvmem-cell-names = "mac-address";
};
enet1: ethernet@b1000 {
enet2: ethernet@b2000 {
phy-handle = <&phy2>;
phy-connection-type = "rgmii-id";
+
+ nvmem-cells = <&macaddr_cfg1_ethaddr (-1)>;
+ nvmem-cell-names = "mac-address";
};
usb@22000 {