ipq40xx: habanero-dvk: fix LAN MAC adresses
authorRobert Marko <robimarko@gmail.com>
Sun, 30 Jun 2024 09:08:16 +0000 (11:08 +0200)
committerRobert Marko <robimarko@gmail.com>
Sun, 30 Jun 2024 09:26:23 +0000 (11:26 +0200)
Currently, only the WAN MAC is being populated on Habanero DVK, and that is
happening via the ethernet1 alias so U-Boot does it, previously ethernet0
was implicitly added in the SoC DTSI so it would populate the LAN MAC-s but
it was dropped(rightly so) so now LAN MAC-s and the GMAC one are random.

So, lets simply switch to using NVMEM to assign the proper MAC adresses.

Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts

index c25b9ecf5bfffa672f8a961eccc8865298ced088..94be4d976e26a7f0360a4a352039f053e1bfa286 100644 (file)
@@ -16,7 +16,6 @@
                led-failsafe = &led_status;
                led-running = &led_status;
                led-upgrade = &led_upgrade;
-               ethernet1 = &swport5;
        };
 
        soc {
                                        #address-cells = <1>;
                                        #size-cells = <1>;
 
+                                       macaddr_lan: macaddr@0 {
+                                               reg = <0x0 0x6>;
+                                       };
+
+                                       macaddr_wan: macaddr@6 {
+                                               reg = <0x6 0x6>;
+                                       };
+
                                        precal_art_1000: precal@1000 {
                                                reg = <0x1000 0x2f20>;
                                        };
 
 &gmac {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_wan>;
 };
 
 &switch {
 
 &swport1 {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_lan>;
 };
 
 &swport2 {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_lan>;
 };
 
 &swport3 {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_lan>;
 };
 
 &swport4 {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_lan>;
 };
 
 &swport5 {
        status = "okay";
+
+       nvmem-cell-names = "mac-address";
+       nvmem-cells = <&macaddr_wan>;
 };
 
 &wifi0 {