xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1*5def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*5def4c47SEmmanuel Vadot%YAML 1.2
3*5def4c47SEmmanuel Vadot---
4*5def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/brcm,sf2.yaml#
5*5def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5def4c47SEmmanuel Vadot
7*5def4c47SEmmanuel Vadottitle: Broadcom Starfighter 2 integrated swich
8*5def4c47SEmmanuel Vadot
9*5def4c47SEmmanuel Vadotmaintainers:
10*5def4c47SEmmanuel Vadot  - Florian Fainelli <f.fainelli@gmail.com>
11*5def4c47SEmmanuel Vadot
12*5def4c47SEmmanuel Vadotproperties:
13*5def4c47SEmmanuel Vadot  compatible:
14*5def4c47SEmmanuel Vadot    items:
15*5def4c47SEmmanuel Vadot      - enum:
16*5def4c47SEmmanuel Vadot          - brcm,bcm4908-switch
17*5def4c47SEmmanuel Vadot          - brcm,bcm7278-switch-v4.0
18*5def4c47SEmmanuel Vadot          - brcm,bcm7278-switch-v4.8
19*5def4c47SEmmanuel Vadot          - brcm,bcm7445-switch-v4.0
20*5def4c47SEmmanuel Vadot
21*5def4c47SEmmanuel Vadot  reg:
22*5def4c47SEmmanuel Vadot    minItems: 6
23*5def4c47SEmmanuel Vadot    maxItems: 6
24*5def4c47SEmmanuel Vadot
25*5def4c47SEmmanuel Vadot  reg-names:
26*5def4c47SEmmanuel Vadot    items:
27*5def4c47SEmmanuel Vadot      - const: core
28*5def4c47SEmmanuel Vadot      - const: reg
29*5def4c47SEmmanuel Vadot      - const: intrl2_0
30*5def4c47SEmmanuel Vadot      - const: intrl2_1
31*5def4c47SEmmanuel Vadot      - const: fcb
32*5def4c47SEmmanuel Vadot      - const: acb
33*5def4c47SEmmanuel Vadot
34*5def4c47SEmmanuel Vadot  interrupts:
35*5def4c47SEmmanuel Vadot    minItems: 2
36*5def4c47SEmmanuel Vadot    maxItems: 2
37*5def4c47SEmmanuel Vadot
38*5def4c47SEmmanuel Vadot  interrupt-names:
39*5def4c47SEmmanuel Vadot    items:
40*5def4c47SEmmanuel Vadot      - const: switch_0
41*5def4c47SEmmanuel Vadot      - const: switch_1
42*5def4c47SEmmanuel Vadot
43*5def4c47SEmmanuel Vadot  resets:
44*5def4c47SEmmanuel Vadot    maxItems: 1
45*5def4c47SEmmanuel Vadot
46*5def4c47SEmmanuel Vadot  reset-names:
47*5def4c47SEmmanuel Vadot    const: switch
48*5def4c47SEmmanuel Vadot
49*5def4c47SEmmanuel Vadot  clocks:
50*5def4c47SEmmanuel Vadot    minItems: 1
51*5def4c47SEmmanuel Vadot    maxItems: 2
52*5def4c47SEmmanuel Vadot    items:
53*5def4c47SEmmanuel Vadot      - description: switch's main clock
54*5def4c47SEmmanuel Vadot      - description: dividing of the switch core clock
55*5def4c47SEmmanuel Vadot
56*5def4c47SEmmanuel Vadot  clock-names:
57*5def4c47SEmmanuel Vadot    minItems: 1
58*5def4c47SEmmanuel Vadot    maxItems: 2
59*5def4c47SEmmanuel Vadot    items:
60*5def4c47SEmmanuel Vadot      - const: sw_switch
61*5def4c47SEmmanuel Vadot      - const: sw_switch_mdiv
62*5def4c47SEmmanuel Vadot
63*5def4c47SEmmanuel Vadot  brcm,num-gphy:
64*5def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
65*5def4c47SEmmanuel Vadot    description: maximum number of integrated gigabit PHYs in the switch
66*5def4c47SEmmanuel Vadot
67*5def4c47SEmmanuel Vadot  brcm,num-rgmii-ports:
68*5def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
69*5def4c47SEmmanuel Vadot    description: maximum number of RGMII interfaces supported by the switch
70*5def4c47SEmmanuel Vadot
71*5def4c47SEmmanuel Vadot  brcm,fcb-pause-override:
72*5def4c47SEmmanuel Vadot    description: if present indicates that the switch supports Failover Control
73*5def4c47SEmmanuel Vadot      Block pause override capability
74*5def4c47SEmmanuel Vadot    type: boolean
75*5def4c47SEmmanuel Vadot
76*5def4c47SEmmanuel Vadot  brcm,acb-packets-inflight:
77*5def4c47SEmmanuel Vadot    description: if present indicates that the switch Admission Control Block
78*5def4c47SEmmanuel Vadot      supports reporting the number of packets in-flight in a switch queue
79*5def4c47SEmmanuel Vadot    type: boolean
80*5def4c47SEmmanuel Vadot
81*5def4c47SEmmanuel Vadot  "#address-cells":
82*5def4c47SEmmanuel Vadot    const: 1
83*5def4c47SEmmanuel Vadot
84*5def4c47SEmmanuel Vadot  "#size-cells":
85*5def4c47SEmmanuel Vadot    const: 0
86*5def4c47SEmmanuel Vadot
87*5def4c47SEmmanuel Vadot  ports:
88*5def4c47SEmmanuel Vadot    type: object
89*5def4c47SEmmanuel Vadot
90*5def4c47SEmmanuel Vadot    properties:
91*5def4c47SEmmanuel Vadot      brcm,use-bcm-hdr:
92*5def4c47SEmmanuel Vadot        description: if present, indicates that the switch port has Broadcom
93*5def4c47SEmmanuel Vadot          tags enabled (per-packet metadata)
94*5def4c47SEmmanuel Vadot        type: boolean
95*5def4c47SEmmanuel Vadot
96*5def4c47SEmmanuel Vadotrequired:
97*5def4c47SEmmanuel Vadot  - reg
98*5def4c47SEmmanuel Vadot  - interrupts
99*5def4c47SEmmanuel Vadot  - "#address-cells"
100*5def4c47SEmmanuel Vadot  - "#size-cells"
101*5def4c47SEmmanuel Vadot
102*5def4c47SEmmanuel VadotallOf:
103*5def4c47SEmmanuel Vadot  - $ref: "dsa.yaml#"
104*5def4c47SEmmanuel Vadot  - if:
105*5def4c47SEmmanuel Vadot      properties:
106*5def4c47SEmmanuel Vadot        compatible:
107*5def4c47SEmmanuel Vadot          contains:
108*5def4c47SEmmanuel Vadot            enum:
109*5def4c47SEmmanuel Vadot              - brcm,bcm7278-switch-v4.0
110*5def4c47SEmmanuel Vadot              - brcm,bcm7278-switch-v4.8
111*5def4c47SEmmanuel Vadot    then:
112*5def4c47SEmmanuel Vadot      properties:
113*5def4c47SEmmanuel Vadot        clocks:
114*5def4c47SEmmanuel Vadot          minItems: 1
115*5def4c47SEmmanuel Vadot          maxItems: 1
116*5def4c47SEmmanuel Vadot        clock-names:
117*5def4c47SEmmanuel Vadot          minItems: 1
118*5def4c47SEmmanuel Vadot          maxItems: 1
119*5def4c47SEmmanuel Vadot      required:
120*5def4c47SEmmanuel Vadot        - clocks
121*5def4c47SEmmanuel Vadot        - clock-names
122*5def4c47SEmmanuel Vadot  - if:
123*5def4c47SEmmanuel Vadot      properties:
124*5def4c47SEmmanuel Vadot        compatible:
125*5def4c47SEmmanuel Vadot          contains:
126*5def4c47SEmmanuel Vadot            const: brcm,bcm7445-switch-v4.0
127*5def4c47SEmmanuel Vadot    then:
128*5def4c47SEmmanuel Vadot      properties:
129*5def4c47SEmmanuel Vadot        clocks:
130*5def4c47SEmmanuel Vadot          minItems: 2
131*5def4c47SEmmanuel Vadot          maxItems: 2
132*5def4c47SEmmanuel Vadot        clock-names:
133*5def4c47SEmmanuel Vadot          minItems: 2
134*5def4c47SEmmanuel Vadot          maxItems: 2
135*5def4c47SEmmanuel Vadot      required:
136*5def4c47SEmmanuel Vadot        - clocks
137*5def4c47SEmmanuel Vadot        - clock-names
138*5def4c47SEmmanuel Vadot
139*5def4c47SEmmanuel VadotadditionalProperties: false
140*5def4c47SEmmanuel Vadot
141*5def4c47SEmmanuel Vadotexamples:
142*5def4c47SEmmanuel Vadot  - |
143*5def4c47SEmmanuel Vadot    switch@f0b00000 {
144*5def4c47SEmmanuel Vadot            compatible = "brcm,bcm7445-switch-v4.0";
145*5def4c47SEmmanuel Vadot            #address-cells = <1>;
146*5def4c47SEmmanuel Vadot            #size-cells = <0>;
147*5def4c47SEmmanuel Vadot            reg = <0xf0b00000 0x40000>,
148*5def4c47SEmmanuel Vadot                  <0xf0b40000 0x110>,
149*5def4c47SEmmanuel Vadot                  <0xf0b40340 0x30>,
150*5def4c47SEmmanuel Vadot                  <0xf0b40380 0x30>,
151*5def4c47SEmmanuel Vadot                  <0xf0b40400 0x34>,
152*5def4c47SEmmanuel Vadot                  <0xf0b40600 0x208>;
153*5def4c47SEmmanuel Vadot            reg-names = "core", "reg", "intrl2_0", "intrl2_1",
154*5def4c47SEmmanuel Vadot                        "fcb", "acb";
155*5def4c47SEmmanuel Vadot            interrupts = <0 0x18 0>,
156*5def4c47SEmmanuel Vadot                         <0 0x19 0>;
157*5def4c47SEmmanuel Vadot            clocks = <&sw_switch>, <&sw_switch_mdiv>;
158*5def4c47SEmmanuel Vadot            clock-names = "sw_switch", "sw_switch_mdiv";
159*5def4c47SEmmanuel Vadot            brcm,num-gphy = <1>;
160*5def4c47SEmmanuel Vadot            brcm,num-rgmii-ports = <2>;
161*5def4c47SEmmanuel Vadot            brcm,fcb-pause-override;
162*5def4c47SEmmanuel Vadot            brcm,acb-packets-inflight;
163*5def4c47SEmmanuel Vadot
164*5def4c47SEmmanuel Vadot            ports {
165*5def4c47SEmmanuel Vadot                    #address-cells = <1>;
166*5def4c47SEmmanuel Vadot                    #size-cells = <0>;
167*5def4c47SEmmanuel Vadot
168*5def4c47SEmmanuel Vadot                    port@0 {
169*5def4c47SEmmanuel Vadot                            label = "gphy";
170*5def4c47SEmmanuel Vadot                            reg = <0>;
171*5def4c47SEmmanuel Vadot                    };
172*5def4c47SEmmanuel Vadot            };
173*5def4c47SEmmanuel Vadot    };
174