ARM: dts: BCM5301X: Specify MAC addresses on Luxul devices
authorRafał Miłecki <rafal@milecki.pl>
Mon, 15 May 2023 08:33:08 +0000 (10:33 +0200)
committerFlorian Fainelli <florian.fainelli@broadcom.com>
Tue, 23 May 2023 16:29:40 +0000 (09:29 -0700)
Use NRAM (NVMEM device) and its "et0macaddr" variable (NVMEM cell) to
point Ethernet devices to their MAC addresses.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230515083308.7612-1-zajec5@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts

index 6de7fe204b0c030eaec623280c12cad1fd613ccb..9b98a0179f055bbeb92bfab8f05a7e2c2a8931d6 100644 (file)
                reg = <0x00000000 0x08000000>;
        };
 
+       nvram@1eff0000 {
+               compatible = "brcm,nvram";
+               reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
        };
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
index f5b75ba93512469f6920ded0f6a43623473e805b..4ca348c06b51f97aa835cf20f8cae48fc18646d4 100644 (file)
                reg = <0x00000000 0x08000000>;
        };
 
+       nvram@1eff0000 {
+               compatible = "brcm,nvram";
+               reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+               };
+       };
+
        nand_controller: nand-controller@18028000 {
                nand@0 {
                        partitions {
        };
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
index 76c9b30b868d40e7711f388aaab47acedb28f806..edc19408599577f909319e7939dc4ae930ceb35f 100644 (file)
                reg = <0x00000000 0x08000000>;
        };
 
+       nvram@1eff0000 {
+               compatible = "brcm,nvram";
+               reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
        };
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
index 6ef0c0788e625c36c4eb34a45f9bdb208d7f50f2..97b61d9d4be9eb9eaa329f9efe0d0e9de8bbcee5 100644 (file)
        nvram@1eff0000 {
                compatible = "brcm,nvram";
                reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+                       #nvmem-cell-cells = <1>;
+               };
        };
 
        leds {
        vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr 0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
                port@4 {
                        reg = <4>;
                        label = "wan";
+                       nvmem-cells = <&et0macaddr 5>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@5 {
index 41a0722fa64a6e411ad09fd8930636c601c654bc..ae552387085429a11c2b7772e9e5942de9d415a8 100644 (file)
        nvram@1eff0000 {
                compatible = "brcm,nvram";
                reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+                       #nvmem-cell-cells = <1>;
+               };
        };
 
        leds {
        vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr 0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
@@ -76,6 +85,8 @@
                port@0 {
                        reg = <0>;
                        label = "wan";
+                       nvmem-cells = <&et0macaddr 1>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@1 {
index c56c7e366848b31f0c004d2f2c72395522beaf30..9220f193499e7b084cedb988a5a8b1b4f6267845 100644 (file)
                reg = <0x00000000 0x08000000>;
        };
 
+       nvram@1eff0000 {
+               compatible = "brcm,nvram";
+               reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
        };
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
index 1b5c91a524ac9b27853d1cc59c8811dff294fb49..2bd64dcd43535696b6ea714ff7022fcfd7a91744 100644 (file)
        nvram@1eff0000 {
                compatible = "brcm,nvram";
                reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+                       #nvmem-cell-cells = <1>;
+               };
        };
 
        leds {
        vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr 0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
@@ -76,6 +85,8 @@
                port@0 {
                        reg = <0>;
                        label = "wan";
+                       nvmem-cells = <&et0macaddr 1>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@1 {
index 739063b77b1f6179f484d5ffbc687557542d433d..8a6d19f985c13bf8b7823e6087f11267f2e3fe5c 100644 (file)
                      <0x88000000 0x18000000>;
        };
 
+       nvram@1eff0000 {
+               compatible = "brcm,nvram";
+               reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+               };
+       };
+
        leds {
                compatible = "gpio-leds";
 
        status = "okay";
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
index 7afc68d5d2c20ce8a8e5ef908265c63a0f5b723e..ebea188bd2d75c830987c5d9cd84e96aeca7bf57 100644 (file)
        nvram@1eff0000 {
                compatible = "brcm,nvram";
                reg = <0x1eff0000 0x10000>;
+
+               et0macaddr: et0macaddr {
+                       #nvmem-cell-cells = <1>;
+               };
        };
 
        leds {
        vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
 };
 
+&gmac0 {
+       nvmem-cells = <&et0macaddr 0>;
+       nvmem-cell-names = "mac-address";
+};
+
 &spi_nor {
        status = "okay";
 };
                port@4 {
                        reg = <4>;
                        label = "wan";
+                       nvmem-cells = <&et0macaddr 5>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@5 {
index 60a2c441d5bdacbaa4ea8073c380cd9ae061d79e..2dd05f4dce92a0b8896d9af50fb4c22ea8a09e46 100644 (file)
@@ -27,6 +27,7 @@
                reg = <0x1eff0000 0x10000>;
 
                et0macaddr: et0macaddr {
+                       #nvmem-cell-cells = <1>;
                };
        };
 
@@ -76,7 +77,7 @@
 };
 
 &gmac0 {
-       nvmem-cells = <&et0macaddr>;
+       nvmem-cells = <&et0macaddr 0>;
        nvmem-cell-names = "mac-address";
 };
 
                port@4 {
                        reg = <4>;
                        label = "wan";
+                       nvmem-cells = <&et0macaddr 5>;
+                       nvmem-cell-names = "mac-address";
                };
 
                port@5 {