qualcommax: ipq807x: Fix MAC addresses usage for RAX120v2
authorPaweł Owoc <frut3k7@gmail.com>
Fri, 1 Mar 2024 22:56:36 +0000 (23:56 +0100)
committerRobert Marko <robimarko@gmail.com>
Mon, 18 Mar 2024 21:19:42 +0000 (22:19 +0100)
Currently, 6 MAC addresses are read from the "boarddata1" partition and set for network interfaces in sequence.
This partition only contains 3 MAC addresses:
1. lan mac
2. wan mac
3. wlan5g mac
As result only lan2, lan3 and lan4 have correct (OUI) MAC addresses.
lan1, lan5 and wan interfaces get MAC addresses with incorrect OUI from random data on "boarddata1" partition.

This commit fix this and use first MAC for lan and second MAC for wan interfaces.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-rax120v2.dts

index 0be50603ba5946f644be37ff783fe4da50ea0bf1..ceb47f14fdd0a26abfb6588cc4eee2dcc9c0c2a2 100644 (file)
@@ -19,7 +19,7 @@
                led-running = &led_system_white;
                led-upgrade = &led_system_white;
                led-internet = &led_wan_white;
-               label-mac-device = &dp1;
+               label-mac-device = &dp5;
        };
 
        chosen {
        status = "okay";
        phy-handle = <&qca8075_0>;
        label = "lan4";
-       nvmem-cells = <&macaddr_dp1>;
+       nvmem-cells = <&macaddr_lan>;
        nvmem-cell-names = "mac-address";
 };
 
        status = "okay";
        phy-handle = <&qca8075_1>;
        label = "lan3";
-       nvmem-cells = <&macaddr_dp2>;
+       nvmem-cells = <&macaddr_lan>;
        nvmem-cell-names = "mac-address";
 };
 
        status = "okay";
        phy-handle = <&qca8075_2>;
        label = "lan2";
-       nvmem-cells = <&macaddr_dp3>;
+       nvmem-cells = <&macaddr_lan>;
        nvmem-cell-names = "mac-address";
 };
 
        status = "okay";
        phy-handle = <&qca8075_3>;
        label = "lan1";
-       nvmem-cells = <&macaddr_dp4>;
+       nvmem-cells = <&macaddr_lan>;
        nvmem-cell-names = "mac-address";
 };
 
        status = "okay";
        phy-handle = <&qca8075_4>;
        label = "wan";
-       nvmem-cells = <&macaddr_dp5>;
+       nvmem-cells = <&macaddr_wan>;
        nvmem-cell-names = "mac-address";
 };
 
        phy-mode = "usxgmii";
        phy-handle = <&aqr111b0>;
        label = "lan5";
-       nvmem-cells = <&macaddr_dp6_syn>;
+       nvmem-cells = <&macaddr_lan>;
        nvmem-cell-names = "mac-address";
 };
 
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
-                                       macaddr_dp1: macaddr@0 {
+                                       macaddr_lan: macaddr@0 {
                                                reg = <0x0 0x6>;
                                        };
 
-                                       macaddr_dp2: macaddr@1 {
+                                       macaddr_wan: macaddr@1 {
                                                reg = <0x6 0x6>;
                                        };
 
-                                       macaddr_dp3: macaddr@2 {
+                                       macaddr_wlan5g: macaddr@2 {
                                                reg = <0xc 0x6>;
                                        };
-
-                                       macaddr_dp4: macaddr@3 {
-                                               reg = <0x12 0x6>;
-                                       };
-
-                                       macaddr_dp5: macaddr@4 {
-                                               reg = <0x18 0x6>;
-                                       };
-
-                                       macaddr_dp6_syn: macaddr@5 {
-                                               reg = <0x1e 0x6>;
-                                       };
                                };
                        };