Skip to content

Commit dfa6570

Browse files
Rafał Miłeckiffainelli
authored andcommitted
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: 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>
1 parent 19571b4 commit dfa6570

10 files changed

Lines changed: 113 additions & 1 deletion

arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
reg = <0x00000000 0x08000000>;
2121
};
2222

23+
nvram@1eff0000 {
24+
compatible = "brcm,nvram";
25+
reg = <0x1eff0000 0x10000>;
26+
27+
et0macaddr: et0macaddr {
28+
};
29+
};
30+
2331
leds {
2432
compatible = "gpio-leds";
2533

@@ -53,6 +61,11 @@
5361
};
5462
};
5563

64+
&gmac0 {
65+
nvmem-cells = <&et0macaddr>;
66+
nvmem-cell-names = "mac-address";
67+
};
68+
5669
&spi_nor {
5770
status = "okay";
5871
};

arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
reg = <0x00000000 0x08000000>;
2525
};
2626

27+
nvram@1eff0000 {
28+
compatible = "brcm,nvram";
29+
reg = <0x1eff0000 0x10000>;
30+
31+
et0macaddr: et0macaddr {
32+
};
33+
};
34+
2735
nand_controller: nand-controller@18028000 {
2836
nand@0 {
2937
partitions {
@@ -60,6 +68,11 @@
6068
};
6169
};
6270

71+
&gmac0 {
72+
nvmem-cells = <&et0macaddr>;
73+
nvmem-cell-names = "mac-address";
74+
};
75+
6376
&spi_nor {
6477
status = "okay";
6578
};

arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
reg = <0x00000000 0x08000000>;
2121
};
2222

23+
nvram@1eff0000 {
24+
compatible = "brcm,nvram";
25+
reg = <0x1eff0000 0x10000>;
26+
27+
et0macaddr: et0macaddr {
28+
};
29+
};
30+
2331
leds {
2432
compatible = "gpio-leds";
2533

@@ -53,6 +61,11 @@
5361
};
5462
};
5563

64+
&gmac0 {
65+
nvmem-cells = <&et0macaddr>;
66+
nvmem-cell-names = "mac-address";
67+
};
68+
5669
&spi_nor {
5770
status = "okay";
5871
};

arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
nvram@1eff0000 {
2525
compatible = "brcm,nvram";
2626
reg = <0x1eff0000 0x10000>;
27+
28+
et0macaddr: et0macaddr {
29+
#nvmem-cell-cells = <1>;
30+
};
2731
};
2832

2933
leds {
@@ -106,6 +110,11 @@
106110
vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
107111
};
108112

113+
&gmac0 {
114+
nvmem-cells = <&et0macaddr 0>;
115+
nvmem-cell-names = "mac-address";
116+
};
117+
109118
&spi_nor {
110119
status = "okay";
111120
};
@@ -137,6 +146,8 @@
137146
port@4 {
138147
reg = <4>;
139148
label = "wan";
149+
nvmem-cells = <&et0macaddr 5>;
150+
nvmem-cell-names = "mac-address";
140151
};
141152

142153
port@5 {

arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
nvram@1eff0000 {
2626
compatible = "brcm,nvram";
2727
reg = <0x1eff0000 0x10000>;
28+
29+
et0macaddr: et0macaddr {
30+
#nvmem-cell-cells = <1>;
31+
};
2832
};
2933

3034
leds {
@@ -61,6 +65,11 @@
6165
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
6266
};
6367

68+
&gmac0 {
69+
nvmem-cells = <&et0macaddr 0>;
70+
nvmem-cell-names = "mac-address";
71+
};
72+
6473
&spi_nor {
6574
status = "okay";
6675
};
@@ -76,6 +85,8 @@
7685
port@0 {
7786
reg = <0>;
7887
label = "wan";
88+
nvmem-cells = <&et0macaddr 1>;
89+
nvmem-cell-names = "mac-address";
7990
};
8091

8192
port@1 {

arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@
2020
reg = <0x00000000 0x08000000>;
2121
};
2222

23+
nvram@1eff0000 {
24+
compatible = "brcm,nvram";
25+
reg = <0x1eff0000 0x10000>;
26+
27+
et0macaddr: et0macaddr {
28+
};
29+
};
30+
2331
leds {
2432
compatible = "gpio-leds";
2533

@@ -51,6 +59,11 @@
5159
};
5260
};
5361

62+
&gmac0 {
63+
nvmem-cells = <&et0macaddr>;
64+
nvmem-cell-names = "mac-address";
65+
};
66+
5467
&spi_nor {
5568
status = "okay";
5669
};

arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
nvram@1eff0000 {
2626
compatible = "brcm,nvram";
2727
reg = <0x1eff0000 0x10000>;
28+
29+
et0macaddr: et0macaddr {
30+
#nvmem-cell-cells = <1>;
31+
};
2832
};
2933

3034
leds {
@@ -61,6 +65,11 @@
6165
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
6266
};
6367

68+
&gmac0 {
69+
nvmem-cells = <&et0macaddr 0>;
70+
nvmem-cell-names = "mac-address";
71+
};
72+
6473
&spi_nor {
6574
status = "okay";
6675
};
@@ -76,6 +85,8 @@
7685
port@0 {
7786
reg = <0>;
7887
label = "wan";
88+
nvmem-cells = <&et0macaddr 1>;
89+
nvmem-cell-names = "mac-address";
7990
};
8091

8192
port@1 {

arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@
2222
<0x88000000 0x18000000>;
2323
};
2424

25+
nvram@1eff0000 {
26+
compatible = "brcm,nvram";
27+
reg = <0x1eff0000 0x10000>;
28+
29+
et0macaddr: et0macaddr {
30+
};
31+
};
32+
2533
leds {
2634
compatible = "gpio-leds";
2735

@@ -47,6 +55,11 @@
4755
status = "okay";
4856
};
4957

58+
&gmac0 {
59+
nvmem-cells = <&et0macaddr>;
60+
nvmem-cell-names = "mac-address";
61+
};
62+
5063
&spi_nor {
5164
status = "okay";
5265
};

arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
nvram@1eff0000 {
2626
compatible = "brcm,nvram";
2727
reg = <0x1eff0000 0x10000>;
28+
29+
et0macaddr: et0macaddr {
30+
#nvmem-cell-cells = <1>;
31+
};
2832
};
2933

3034
leds {
@@ -101,6 +105,11 @@
101105
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
102106
};
103107

108+
&gmac0 {
109+
nvmem-cells = <&et0macaddr 0>;
110+
nvmem-cell-names = "mac-address";
111+
};
112+
104113
&spi_nor {
105114
status = "okay";
106115
};
@@ -136,6 +145,8 @@
136145
port@4 {
137146
reg = <4>;
138147
label = "wan";
148+
nvmem-cells = <&et0macaddr 5>;
149+
nvmem-cell-names = "mac-address";
139150
};
140151

141152
port@5 {

arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
reg = <0x1eff0000 0x10000>;
2828

2929
et0macaddr: et0macaddr {
30+
#nvmem-cell-cells = <1>;
3031
};
3132
};
3233

@@ -76,7 +77,7 @@
7677
};
7778

7879
&gmac0 {
79-
nvmem-cells = <&et0macaddr>;
80+
nvmem-cells = <&et0macaddr 0>;
8081
nvmem-cell-names = "mac-address";
8182
};
8283

@@ -119,6 +120,8 @@
119120
port@4 {
120121
reg = <4>;
121122
label = "wan";
123+
nvmem-cells = <&et0macaddr 5>;
124+
nvmem-cell-names = "mac-address";
122125
};
123126

124127
port@5 {

0 commit comments

Comments
 (0)