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 6de7fe2..9b98a01 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 f5b75ba..4ca348c 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 76c9b30..edc1940 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 6ef0c07..97b61d9 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 41a0722..ae55238 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 c56c7e3..9220f19 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 1b5c91a..2bd64dc 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 739063b..8a6d19f 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 7afc68d..ebea188 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 60a2c44..2dd05f4 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 {