xref: /linux/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml (revision a4eb44a6435d6d8f9e642407a4a06f65eb90ca04)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/dsa/brcm,b53.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom BCM53xx Ethernet switches
8
9allOf:
10  - $ref: dsa.yaml#
11
12maintainers:
13  - Florian Fainelli <f.fainelli@gmail.com>
14
15description:
16  Broadcom BCM53xx Ethernet switches
17
18properties:
19  compatible:
20    oneOf:
21      - const: brcm,bcm5325
22      - const: brcm,bcm53115
23      - const: brcm,bcm53125
24      - const: brcm,bcm53128
25      - const: brcm,bcm5365
26      - const: brcm,bcm5395
27      - const: brcm,bcm5389
28      - const: brcm,bcm5397
29      - const: brcm,bcm5398
30      - items:
31          - const: brcm,bcm11360-srab
32          - const: brcm,cygnus-srab
33      - items:
34          - enum:
35              - brcm,bcm53010-srab
36              - brcm,bcm53011-srab
37              - brcm,bcm53012-srab
38              - brcm,bcm53018-srab
39              - brcm,bcm53019-srab
40          - const: brcm,bcm5301x-srab
41      - items:
42          - enum:
43              - brcm,bcm11404-srab
44              - brcm,bcm11407-srab
45              - brcm,bcm11409-srab
46              - brcm,bcm58310-srab
47              - brcm,bcm58311-srab
48              - brcm,bcm58313-srab
49          - const: brcm,omega-srab
50      - items:
51          - enum:
52              - brcm,bcm58522-srab
53              - brcm,bcm58523-srab
54              - brcm,bcm58525-srab
55              - brcm,bcm58622-srab
56              - brcm,bcm58623-srab
57              - brcm,bcm58625-srab
58              - brcm,bcm88312-srab
59          - const: brcm,nsp-srab
60      - items:
61          - enum:
62              - brcm,bcm3384-switch
63              - brcm,bcm6328-switch
64              - brcm,bcm6368-switch
65          - const: brcm,bcm63xx-switch
66
67required:
68  - compatible
69  - reg
70
71# BCM585xx/586xx/88312 SoCs
72if:
73  properties:
74    compatible:
75      contains:
76        enum:
77          - brcm,bcm58522-srab
78          - brcm,bcm58523-srab
79          - brcm,bcm58525-srab
80          - brcm,bcm58622-srab
81          - brcm,bcm58623-srab
82          - brcm,bcm58625-srab
83          - brcm,bcm88312-srab
84then:
85  properties:
86    reg:
87      minItems: 3
88      maxItems: 3
89    reg-names:
90      items:
91        - const: srab
92        - const: mux_config
93        - const: sgmii_config
94    interrupts:
95      minItems: 13
96      maxItems: 13
97    interrupt-names:
98      items:
99        - const: link_state_p0
100        - const: link_state_p1
101        - const: link_state_p2
102        - const: link_state_p3
103        - const: link_state_p4
104        - const: link_state_p5
105        - const: link_state_p7
106        - const: link_state_p8
107        - const: phy
108        - const: ts
109        - const: imp_sleep_timer_p5
110        - const: imp_sleep_timer_p7
111        - const: imp_sleep_timer_p8
112  required:
113    - interrupts
114else:
115  properties:
116    reg:
117      maxItems: 1
118
119unevaluatedProperties: false
120
121examples:
122  - |
123    mdio {
124        #address-cells = <1>;
125        #size-cells = <0>;
126
127        ethernet-switch@1e {
128            compatible = "brcm,bcm53125";
129            reg = <30>;
130
131            ethernet-ports {
132                #address-cells = <1>;
133                #size-cells = <0>;
134
135                port@0 {
136                    reg = <0>;
137                    label = "lan1";
138                };
139
140                port@1 {
141                    reg = <1>;
142                    label = "lan2";
143                };
144
145                port@5 {
146                    reg = <5>;
147                    label = "cable-modem";
148                    phy-mode = "rgmii-txid";
149                    fixed-link {
150                        speed = <1000>;
151                        full-duplex;
152                    };
153                };
154
155                port@8 {
156                    reg = <8>;
157                    label = "cpu";
158                    phy-mode = "rgmii-txid";
159                    ethernet = <&eth0>;
160                    fixed-link {
161                        speed = <1000>;
162                        full-duplex;
163                    };
164                };
165            };
166        };
167    };
168  - |
169    #include <dt-bindings/interrupt-controller/arm-gic.h>
170    #include <dt-bindings/interrupt-controller/irq.h>
171
172    axi {
173        #address-cells = <1>;
174        #size-cells = <1>;
175
176        switch@36000 {
177            compatible = "brcm,bcm58623-srab", "brcm,nsp-srab";
178            reg = <0x36000 0x1000>,
179                  <0x3f308 0x8>,
180                  <0x3f410 0xc>;
181            reg-names = "srab", "mux_config", "sgmii_config";
182            interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
183                         <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
184                         <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
185                         <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
186                         <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
187                         <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
188                         <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
189                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
190                         <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
191                         <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
192                         <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
193                         <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
194                         <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
195            interrupt-names = "link_state_p0",
196                              "link_state_p1",
197                              "link_state_p2",
198                              "link_state_p3",
199                              "link_state_p4",
200                              "link_state_p5",
201                              "link_state_p7",
202                              "link_state_p8",
203                              "phy",
204                              "ts",
205                              "imp_sleep_timer_p5",
206                              "imp_sleep_timer_p7",
207                              "imp_sleep_timer_p8";
208
209            ethernet-ports {
210                #address-cells = <1>;
211                #size-cells = <0>;
212
213                port@0 {
214                    label = "port0";
215                    reg = <0>;
216                };
217
218                port@1 {
219                    label = "port1";
220                    reg = <1>;
221                };
222
223                port@2 {
224                    label = "port2";
225                    reg = <2>;
226                };
227
228                port@3 {
229                    label = "port3";
230                    reg = <3>;
231                };
232
233                port@4 {
234                    label = "port4";
235                    reg = <4>;
236                };
237
238                port@8 {
239                    ethernet = <&amac2>;
240                    label = "cpu";
241                    reg = <8>;
242                    fixed-link {
243                        speed = <1000>;
244                        full-duplex;
245                    };
246                };
247            };
248        };
249    };
250