Commit dfa6570e authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Florian Fainelli

ARM: dts: BCM5301X: Specify MAC addresses on Luxul devices

Use NRAM (NVMEM device) and its "et0macaddr" variable (NVMEM cell) to
point Ethernet devices to their MAC addresses.
Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20230515083308.7612-1-zajec5@gmail.comSigned-off-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
parent 19571b46
...@@ -20,6 +20,14 @@ memory@0 { ...@@ -20,6 +20,14 @@ memory@0 {
reg = <0x00000000 0x08000000>; reg = <0x00000000 0x08000000>;
}; };
nvram@1eff0000 {
compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
};
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
...@@ -53,6 +61,11 @@ button-restart { ...@@ -53,6 +61,11 @@ button-restart {
}; };
}; };
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
......
...@@ -24,6 +24,14 @@ memory@0 { ...@@ -24,6 +24,14 @@ memory@0 {
reg = <0x00000000 0x08000000>; reg = <0x00000000 0x08000000>;
}; };
nvram@1eff0000 {
compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
};
};
nand_controller: nand-controller@18028000 { nand_controller: nand-controller@18028000 {
nand@0 { nand@0 {
partitions { partitions {
...@@ -60,6 +68,11 @@ button-restart { ...@@ -60,6 +68,11 @@ button-restart {
}; };
}; };
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
......
...@@ -20,6 +20,14 @@ memory@0 { ...@@ -20,6 +20,14 @@ memory@0 {
reg = <0x00000000 0x08000000>; reg = <0x00000000 0x08000000>;
}; };
nvram@1eff0000 {
compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
};
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
...@@ -53,6 +61,11 @@ button-restart { ...@@ -53,6 +61,11 @@ button-restart {
}; };
}; };
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
......
...@@ -24,6 +24,10 @@ memory@0 { ...@@ -24,6 +24,10 @@ memory@0 {
nvram@1eff0000 { nvram@1eff0000 {
compatible = "brcm,nvram"; compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>; reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
}; };
leds { leds {
...@@ -106,6 +110,11 @@ &usb2 { ...@@ -106,6 +110,11 @@ &usb2 {
vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>; vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
}; };
&gmac0 {
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
...@@ -137,6 +146,8 @@ port@3 { ...@@ -137,6 +146,8 @@ port@3 {
port@4 { port@4 {
reg = <4>; reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
......
...@@ -25,6 +25,10 @@ memory@0 { ...@@ -25,6 +25,10 @@ memory@0 {
nvram@1eff0000 { nvram@1eff0000 {
compatible = "brcm,nvram"; compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>; reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
}; };
leds { leds {
...@@ -61,6 +65,11 @@ &usb3 { ...@@ -61,6 +65,11 @@ &usb3 {
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
}; };
&gmac0 {
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
...@@ -76,6 +85,8 @@ ports { ...@@ -76,6 +85,8 @@ ports {
port@0 { port@0 {
reg = <0>; reg = <0>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address";
}; };
port@1 { port@1 {
......
...@@ -20,6 +20,14 @@ memory@0 { ...@@ -20,6 +20,14 @@ memory@0 {
reg = <0x00000000 0x08000000>; reg = <0x00000000 0x08000000>;
}; };
nvram@1eff0000 {
compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
};
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
...@@ -51,6 +59,11 @@ button-restart { ...@@ -51,6 +59,11 @@ button-restart {
}; };
}; };
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
......
...@@ -25,6 +25,10 @@ memory@0 { ...@@ -25,6 +25,10 @@ memory@0 {
nvram@1eff0000 { nvram@1eff0000 {
compatible = "brcm,nvram"; compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>; reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
}; };
leds { leds {
...@@ -61,6 +65,11 @@ &usb3 { ...@@ -61,6 +65,11 @@ &usb3 {
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
}; };
&gmac0 {
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
...@@ -76,6 +85,8 @@ ports { ...@@ -76,6 +85,8 @@ ports {
port@0 { port@0 {
reg = <0>; reg = <0>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 1>;
nvmem-cell-names = "mac-address";
}; };
port@1 { port@1 {
......
...@@ -22,6 +22,14 @@ memory@0 { ...@@ -22,6 +22,14 @@ memory@0 {
<0x88000000 0x18000000>; <0x88000000 0x18000000>;
}; };
nvram@1eff0000 {
compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
};
};
leds { leds {
compatible = "gpio-leds"; compatible = "gpio-leds";
...@@ -47,6 +55,11 @@ &uart1 { ...@@ -47,6 +55,11 @@ &uart1 {
status = "okay"; status = "okay";
}; };
&gmac0 {
nvmem-cells = <&et0macaddr>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
......
...@@ -25,6 +25,10 @@ memory@0 { ...@@ -25,6 +25,10 @@ memory@0 {
nvram@1eff0000 { nvram@1eff0000 {
compatible = "brcm,nvram"; compatible = "brcm,nvram";
reg = <0x1eff0000 0x10000>; reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
};
}; };
leds { leds {
...@@ -101,6 +105,11 @@ &usb3 { ...@@ -101,6 +105,11 @@ &usb3 {
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>; vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
}; };
&gmac0 {
nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address";
};
&spi_nor { &spi_nor {
status = "okay"; status = "okay";
}; };
...@@ -136,6 +145,8 @@ port@3 { ...@@ -136,6 +145,8 @@ port@3 {
port@4 { port@4 {
reg = <4>; reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
......
...@@ -27,6 +27,7 @@ nvram@1eff0000 { ...@@ -27,6 +27,7 @@ nvram@1eff0000 {
reg = <0x1eff0000 0x10000>; reg = <0x1eff0000 0x10000>;
et0macaddr: et0macaddr { et0macaddr: et0macaddr {
#nvmem-cell-cells = <1>;
}; };
}; };
...@@ -76,7 +77,7 @@ button-restart { ...@@ -76,7 +77,7 @@ button-restart {
}; };
&gmac0 { &gmac0 {
nvmem-cells = <&et0macaddr>; nvmem-cells = <&et0macaddr 0>;
nvmem-cell-names = "mac-address"; nvmem-cell-names = "mac-address";
}; };
...@@ -119,6 +120,8 @@ port@3 { ...@@ -119,6 +120,8 @@ port@3 {
port@4 { port@4 {
reg = <4>; reg = <4>;
label = "wan"; label = "wan";
nvmem-cells = <&et0macaddr 5>;
nvmem-cell-names = "mac-address";
}; };
port@5 { port@5 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment