label = "devinfo";
reg = <0x1060000 0x20000>;
read-only;
+
+ nvmem-layout {
+ compatible = "ascii-eq-delim-env";
+
+ hw_mac_addr: hw_mac_addr {
+ compatible = "mac-base";
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@1080000 {
phy-mode = "qsgmii";
phy-handle = <&qca8075_0>;
label = "lan1";
+ nvmem-cells = <&hw_mac_addr 1>;
+ nvmem-cell-names = "mac-address";
};
&dp2 {
phy-mode = "qsgmii";
phy-handle = <&qca8075_1>;
label = "lan2";
+ nvmem-cells = <&hw_mac_addr 1>;
+ nvmem-cell-names = "mac-address";
};
&dp3 {
phy-mode = "qsgmii";
phy-handle = <&qca8075_2>;
label = "lan3";
+ nvmem-cells = <&hw_mac_addr 1>;
+ nvmem-cell-names = "mac-address";
};
&dp4 {
phy-mode = "qsgmii";
phy-handle = <&qca8075_3>;
label = "lan4";
+ nvmem-cells = <&hw_mac_addr 1>;
+ nvmem-cell-names = "mac-address";
};
&dp6_syn {
phy-mode = "usxgmii";
phy-handle = <&aqr114c>;
label = "wan";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&ssphy_0 {
compatible = "linksys,homewrk", "qcom,ipq8074";
aliases {
+ ethernet1 = &dp2;
+ ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
};
#include "ipq8174-mx4x00.dtsi"
-/ {
- aliases {
- ethernet3 = &dp4;
- ethernet4 = &dp5;
- };
-};
-
&tlmm {
iot_pins: iot-state {
recovery-pins {
label = "devinfo";
reg = <0x1060000 0x20000>;
read-only;
+
+ nvmem-layout {
+ compatible = "ascii-eq-delim-env";
+
+ hw_mac_addr: hw_mac_addr {
+ compatible = "mac-base";
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@1080000 {
/ {
model = "Linksys MX4200v1";
compatible = "linksys,mx4200v1", "qcom,ipq8074";
+
+ aliases {
+ ethernet1 = &dp2;
+ ethernet2 = &dp3;
+ ethernet3 = &dp4;
+ ethernet4 = &dp5;
+ };
};
&wifi {
/ {
model = "Linksys MX4200v2";
compatible = "linksys,mx4200v2", "qcom,ipq8074";
+
+ aliases {
+ label-mac-device = &dp2;
+ };
+};
+
+&dp2 {
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&dp3 {
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&dp4 {
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&dp5 {
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&wifi {
bootargs-find-2 = "ubi.mtd=24,2048";
bootargs-replace-2 = "ubi.mtd=24,4096";
};
+
+ aliases {
+ label-mac-device = &dp2;
+ };
};
&qpic_nand {
label = "devinfo";
reg = <0x1200000 0x40000>;
read-only;
+
+ nvmem-layout {
+ compatible = "ascii-eq-delim-env";
+
+ hw_mac_addr: hw_mac_addr {
+ compatible = "mac-base";
+ #nvmem-cell-cells = <1>;
+ };
+ };
};
partition@1240000 {
status = "okay";
phy-handle = <&qca8075_1>;
label = "wan";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&dp3 {
status = "okay";
phy-handle = <&qca8075_2>;
label = "lan3";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&dp4 {
status = "okay";
phy-handle = <&qca8075_3>;
label = "lan2";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&dp5 {
status = "okay";
phy-handle = <&qca8075_4>;
label = "lan1";
+ nvmem-cells = <&hw_mac_addr 0>;
+ nvmem-cell-names = "mac-address";
};
&wifi {
aliases {
serial0 = &blsp1_uart5;
serial1 = &blsp1_uart3;
- /*
- * Aliases as required by u-boot
- * to patch MAC addresses
- */
- ethernet1 = &dp2;
- ethernet2 = &dp3;
led-boot = &led_system_blue;
led-running = &led_system_blue;
led-failsafe = &led_system_red;
lan_mac=$(macaddr_add "$wan_mac" 1)
label_mac="$wan_mac"
;;
- linksys,mx4200v2|\
- linksys,mx4300)
- label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
- [ "$(mtd_get_mac_ascii u_env eth1addr)" != "$label_mac" ] && wan_mac=$label_mac
- [ "$(mtd_get_mac_ascii u_env eth2addr)" != "$label_mac" ] && lan_mac=$label_mac
- ;;
- linksys,mx8500)
- label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
- lan_mac=$(macaddr_add $label_mac 1)
- wan_mac=$label_mac
- ;;
tplink,deco-x80-5g)
label_mac=$(get_mac_binary /tmp/factory_data/default-mac 0)
lan_mac=$(macaddr_add $label_mac 1)