]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ipq806x: e8350: use nvmem for MAC address
authorRosen Penev <rosenp@gmail.com>
Sun, 8 Mar 2026 22:32:37 +0000 (15:32 -0700)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 10 Mar 2026 12:38:32 +0000 (13:38 +0100)
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22263
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/ipq806x/base-files/etc/board.d/02_network
target/linux/ipq806x/dts/qcom-ipq8064-e8350-v1.dts

index 17e97ec06dfc4d7022cf9f14b66f5d9d5e3f9c39..0b213b1116186fd3d60a7e082e52e03a02cc6ae3 100644 (file)
@@ -85,11 +85,6 @@ ipq806x_setup_macs()
                hw_mac_addr=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
                ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 1)"
                ;;
-       linksys,e8350-v1)
-               hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
-               ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
-               ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
-               ;;
        esac
 }
 
index eccd57186360b594d75ef4c419f1df88b18b71f4..dc55b968984f286efbceacae06709a9fe996677e 100644 (file)
                                        label = "0:appsblenv";
                                        reg = <0x0130000 0x0040000>;
                                        read-only;
+
+                                       nvmem-layout {
+                                               compatible = "u-boot,env";
+
+                                               macaddr_uboot_ethaddr: ethaddr {
+                                                       #nvmem-cell-cells = <1>;
+                                               };
+                                       };
                                };
 
                                art: partition@170000 {
        pinctrl-0 = <&rgmii2_pins>;
        pinctrl-names = "default";
 
+       nvmem-cells = <&macaddr_uboot_ethaddr 3>;
+       nvmem-cell-names = "mac-address";
+
        fixed-link {
                speed = <1000>;
                full-duplex;
        phy-mode = "sgmii";
        qcom,id = <2>;
 
+       nvmem-cells = <&macaddr_uboot_ethaddr 2>;
+       nvmem-cell-names = "mac-address";
+
        fixed-link {
                speed = <1000>;
                full-duplex;