Skip to content

Commit ba4aebc

Browse files
Rafał Miłeckiffainelli
authored andcommitted
ARM: dts: BCM5301X: Describe switch ports in the main DTS
All Northstar SoCs have BCM5301x switches (BCM53011, BCM53012) with 8 ports (0-8 without 6). By design 3 switch ports (5, 7 and 8) are hardwired to 3 on-SoC Ethernet interfaces. Switch port 8 requires forcing link state. It seems that global Northstar .dtsi file is the best place to describe those hw details. Only device specific bits (like labels) should go to device .dts files. This seems to fit well with a tiny exception of Asus RT-AC88U which somehow was designed to have switch 5 connected to an extra switch. This case was simply handled with a /delete-property/. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Christian Lamparter <chunkeey@gmail.com> (MR32+MR26) Link: https://lore.kernel.org/r/20230605132109.7933-1-zajec5@gmail.com Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
1 parent 1d5682c commit ba4aebc

22 files changed

Lines changed: 51 additions & 163 deletions

arch/arm/boot/dts/bcm-ns.dtsi

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,49 @@
304304

305305
status = "disabled";
306306

307-
/* ports are defined in board DTS */
308307
ports {
309308
#address-cells = <1>;
310309
#size-cells = <0>;
310+
311+
port@0 {
312+
reg = <0>;
313+
};
314+
315+
port@1 {
316+
reg = <1>;
317+
};
318+
319+
port@2 {
320+
reg = <2>;
321+
};
322+
323+
port@3 {
324+
reg = <3>;
325+
};
326+
327+
port@4 {
328+
reg = <4>;
329+
};
330+
331+
port@5 {
332+
reg = <5>;
333+
ethernet = <&gmac0>;
334+
};
335+
336+
port@7 {
337+
reg = <7>;
338+
ethernet = <&gmac1>;
339+
};
340+
341+
port@8 {
342+
reg = <8>;
343+
ethernet = <&gmac2>;
344+
345+
fixed-link {
346+
speed = <1000>;
347+
full-duplex;
348+
};
349+
};
311350
};
312351
};
313352

arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,34 +159,27 @@
159159

160160
ports {
161161
port@0 {
162-
reg = <0>;
163162
label = "lan1";
164163
};
165164

166165
port@1 {
167-
reg = <1>;
168166
label = "lan2";
169167
};
170168

171169
port@2 {
172-
reg = <2>;
173170
label = "lan3";
174171
};
175172

176173
port@3 {
177-
reg = <3>;
178174
label = "lan4";
179175
};
180176

181177
port@4 {
182-
reg = <4>;
183178
label = "wan";
184179
};
185180

186181
port@5 {
187-
reg = <5>;
188182
label = "cpu";
189-
ethernet = <&gmac0>;
190183
};
191184
};
192185
};

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,15 @@
7575

7676
ports {
7777
port@0 {
78-
reg = <0>;
7978
label = "poe";
8079
};
8180

8281
port@4 {
83-
reg = <4>;
8482
label = "lan";
8583
};
8684

8785
port@5 {
88-
reg = <5>;
8986
label = "cpu";
90-
ethernet = <&gmac0>;
9187
};
9288
};
9389
};

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,11 @@
8282

8383
ports {
8484
port@4 {
85-
reg = <4>;
8685
label = "lan";
8786
};
8887

8988
port@5 {
90-
reg = <5>;
9189
label = "cpu";
92-
ethernet = <&gmac0>;
9390
};
9491
};
9592
};

arch/arm/boot/dts/bcm4708-netgear-r6250.dts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,34 +100,27 @@
100100

101101
ports {
102102
port@0 {
103-
reg = <0>;
104103
label = "lan4";
105104
};
106105

107106
port@1 {
108-
reg = <1>;
109107
label = "lan3";
110108
};
111109

112110
port@2 {
113-
reg = <2>;
114111
label = "lan2";
115112
};
116113

117114
port@3 {
118-
reg = <3>;
119115
label = "lan1";
120116
};
121117

122118
port@4 {
123-
reg = <4>;
124119
label = "wan";
125120
};
126121

127122
port@5 {
128-
reg = <5>;
129123
label = "cpu";
130-
ethernet = <&gmac0>;
131124
};
132125
};
133126
};

arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,34 +123,27 @@
123123

124124
ports {
125125
port@0 {
126-
reg = <0>;
127126
label = "lan4";
128127
};
129128

130129
port@1 {
131-
reg = <1>;
132130
label = "lan3";
133131
};
134132

135133
port@2 {
136-
reg = <2>;
137134
label = "lan2";
138135
};
139136

140137
port@3 {
141-
reg = <3>;
142138
label = "lan1";
143139
};
144140

145141
port@4 {
146-
reg = <4>;
147142
label = "wan";
148143
};
149144

150145
port@5 {
151-
reg = <5>;
152146
label = "cpu";
153-
ethernet = <&gmac0>;
154147
};
155148
};
156149
};

arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,34 +123,27 @@
123123

124124
ports {
125125
port@0 {
126-
reg = <0>;
127126
label = "lan1";
128127
};
129128

130129
port@1 {
131-
reg = <1>;
132130
label = "lan2";
133131
};
134132

135133
port@2 {
136-
reg = <2>;
137134
label = "lan3";
138135
};
139136

140137
port@3 {
141-
reg = <3>;
142138
label = "lan4";
143139
};
144140

145141
port@4 {
146-
reg = <4>;
147142
label = "wan";
148143
};
149144

150145
port@5 {
151-
reg = <5>;
152146
label = "cpu";
153-
ethernet = <&gmac0>;
154147
};
155148
};
156149
};

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,11 @@
7575

7676
ports {
7777
port@4 {
78-
reg = <4>;
7978
label = "poe";
8079
};
8180

8281
port@5 {
83-
reg = <5>;
8482
label = "cpu";
85-
ethernet = <&gmac0>;
8683
};
8784
};
8885
};

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,36 +124,29 @@
124124

125125
ports {
126126
port@0 {
127-
reg = <0>;
128127
label = "lan4";
129128
};
130129

131130
port@1 {
132-
reg = <1>;
133131
label = "lan3";
134132
};
135133

136134
port@2 {
137-
reg = <2>;
138135
label = "lan2";
139136
};
140137

141138
port@3 {
142-
reg = <3>;
143139
label = "lan1";
144140
};
145141

146142
port@4 {
147-
reg = <4>;
148143
label = "wan";
149144
nvmem-cells = <&et0macaddr 5>;
150145
nvmem-cell-names = "mac-address";
151146
};
152147

153148
port@5 {
154-
reg = <5>;
155149
label = "cpu";
156-
ethernet = <&gmac0>;
157150
};
158151
};
159152
};

arch/arm/boot/dts/bcm4709-netgear-r8000.dts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,39 +191,27 @@
191191

192192
ports {
193193
port@0 {
194-
reg = <0>;
195194
label = "lan1";
196195
};
197196

198197
port@1 {
199-
reg = <1>;
200198
label = "lan2";
201199
};
202200

203201
port@2 {
204-
reg = <2>;
205202
label = "lan3";
206203
};
207204

208205
port@3 {
209-
reg = <3>;
210206
label = "lan4";
211207
};
212208

213209
port@4 {
214-
reg = <4>;
215210
label = "wan";
216211
};
217212

218213
port@8 {
219-
reg = <8>;
220214
label = "cpu";
221-
ethernet = <&gmac2>;
222-
223-
fixed-link {
224-
speed = <1000>;
225-
full-duplex;
226-
};
227215
};
228216
};
229217
};

0 commit comments

Comments
 (0)