xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/brcm,sf2.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25def4c47SEmmanuel Vadot%YAML 1.2
35def4c47SEmmanuel Vadot---
45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/brcm,sf2.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
7aa1a8ff2SEmmanuel Vadottitle: Broadcom Starfighter 2 integrated switch
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Florian Fainelli <f.fainelli@gmail.com>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotproperties:
135def4c47SEmmanuel Vadot  compatible:
145def4c47SEmmanuel Vadot    items:
155def4c47SEmmanuel Vadot      - enum:
165def4c47SEmmanuel Vadot          - brcm,bcm4908-switch
175def4c47SEmmanuel Vadot          - brcm,bcm7278-switch-v4.0
185def4c47SEmmanuel Vadot          - brcm,bcm7278-switch-v4.8
195def4c47SEmmanuel Vadot          - brcm,bcm7445-switch-v4.0
205def4c47SEmmanuel Vadot
215def4c47SEmmanuel Vadot  reg:
225def4c47SEmmanuel Vadot    minItems: 6
235def4c47SEmmanuel Vadot    maxItems: 6
245def4c47SEmmanuel Vadot
255def4c47SEmmanuel Vadot  reg-names:
265def4c47SEmmanuel Vadot    items:
275def4c47SEmmanuel Vadot      - const: core
285def4c47SEmmanuel Vadot      - const: reg
295def4c47SEmmanuel Vadot      - const: intrl2_0
305def4c47SEmmanuel Vadot      - const: intrl2_1
315def4c47SEmmanuel Vadot      - const: fcb
325def4c47SEmmanuel Vadot      - const: acb
335def4c47SEmmanuel Vadot
345def4c47SEmmanuel Vadot  interrupts:
355def4c47SEmmanuel Vadot    minItems: 2
365def4c47SEmmanuel Vadot    maxItems: 2
375def4c47SEmmanuel Vadot
385def4c47SEmmanuel Vadot  interrupt-names:
395def4c47SEmmanuel Vadot    items:
405def4c47SEmmanuel Vadot      - const: switch_0
415def4c47SEmmanuel Vadot      - const: switch_1
425def4c47SEmmanuel Vadot
435def4c47SEmmanuel Vadot  resets:
445def4c47SEmmanuel Vadot    maxItems: 1
455def4c47SEmmanuel Vadot
465def4c47SEmmanuel Vadot  reset-names:
475def4c47SEmmanuel Vadot    const: switch
485def4c47SEmmanuel Vadot
495def4c47SEmmanuel Vadot  clocks:
505def4c47SEmmanuel Vadot    minItems: 1
515def4c47SEmmanuel Vadot    items:
525def4c47SEmmanuel Vadot      - description: switch's main clock
535def4c47SEmmanuel Vadot      - description: dividing of the switch core clock
545def4c47SEmmanuel Vadot
555def4c47SEmmanuel Vadot  clock-names:
565def4c47SEmmanuel Vadot    minItems: 1
575def4c47SEmmanuel Vadot    items:
585def4c47SEmmanuel Vadot      - const: sw_switch
595def4c47SEmmanuel Vadot      - const: sw_switch_mdiv
605def4c47SEmmanuel Vadot
615def4c47SEmmanuel Vadot  brcm,num-gphy:
625def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
635def4c47SEmmanuel Vadot    description: maximum number of integrated gigabit PHYs in the switch
645def4c47SEmmanuel Vadot
655def4c47SEmmanuel Vadot  brcm,num-rgmii-ports:
665def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
675def4c47SEmmanuel Vadot    description: maximum number of RGMII interfaces supported by the switch
685def4c47SEmmanuel Vadot
695def4c47SEmmanuel Vadot  brcm,fcb-pause-override:
705def4c47SEmmanuel Vadot    description: if present indicates that the switch supports Failover Control
715def4c47SEmmanuel Vadot      Block pause override capability
725def4c47SEmmanuel Vadot    type: boolean
735def4c47SEmmanuel Vadot
745def4c47SEmmanuel Vadot  brcm,acb-packets-inflight:
755def4c47SEmmanuel Vadot    description: if present indicates that the switch Admission Control Block
765def4c47SEmmanuel Vadot      supports reporting the number of packets in-flight in a switch queue
775def4c47SEmmanuel Vadot    type: boolean
785def4c47SEmmanuel Vadot
795def4c47SEmmanuel Vadot  ports:
805def4c47SEmmanuel Vadot    type: object
81*84943d6fSEmmanuel Vadot    additionalProperties: true
825def4c47SEmmanuel Vadot
83cb7aa33aSEmmanuel Vadot    patternProperties:
84cb7aa33aSEmmanuel Vadot      '^port@[0-9a-f]$':
85cb7aa33aSEmmanuel Vadot        $ref: dsa-port.yaml#
86cb7aa33aSEmmanuel Vadot        unevaluatedProperties: false
87cb7aa33aSEmmanuel Vadot
885def4c47SEmmanuel Vadot        properties:
895def4c47SEmmanuel Vadot          brcm,use-bcm-hdr:
905def4c47SEmmanuel Vadot            description: if present, indicates that the switch port has Broadcom
915def4c47SEmmanuel Vadot              tags enabled (per-packet metadata)
925def4c47SEmmanuel Vadot            type: boolean
935def4c47SEmmanuel Vadot
945def4c47SEmmanuel Vadotrequired:
955def4c47SEmmanuel Vadot  - reg
965def4c47SEmmanuel Vadot  - interrupts
975def4c47SEmmanuel Vadot
985def4c47SEmmanuel VadotallOf:
99fac71e4eSEmmanuel Vadot  - $ref: dsa.yaml#
1005def4c47SEmmanuel Vadot  - if:
1015def4c47SEmmanuel Vadot      properties:
1025def4c47SEmmanuel Vadot        compatible:
1035def4c47SEmmanuel Vadot          contains:
1045def4c47SEmmanuel Vadot            enum:
1055def4c47SEmmanuel Vadot              - brcm,bcm7278-switch-v4.0
1065def4c47SEmmanuel Vadot              - brcm,bcm7278-switch-v4.8
1075def4c47SEmmanuel Vadot    then:
1085def4c47SEmmanuel Vadot      properties:
1095def4c47SEmmanuel Vadot        clocks:
1105def4c47SEmmanuel Vadot          minItems: 1
1115def4c47SEmmanuel Vadot          maxItems: 1
1125def4c47SEmmanuel Vadot        clock-names:
1135def4c47SEmmanuel Vadot          minItems: 1
1145def4c47SEmmanuel Vadot          maxItems: 1
1155def4c47SEmmanuel Vadot      required:
1165def4c47SEmmanuel Vadot        - clocks
1175def4c47SEmmanuel Vadot        - clock-names
1185def4c47SEmmanuel Vadot  - if:
1195def4c47SEmmanuel Vadot      properties:
1205def4c47SEmmanuel Vadot        compatible:
1215def4c47SEmmanuel Vadot          contains:
1225def4c47SEmmanuel Vadot            const: brcm,bcm7445-switch-v4.0
1235def4c47SEmmanuel Vadot    then:
1245def4c47SEmmanuel Vadot      properties:
1255def4c47SEmmanuel Vadot        clocks:
1265def4c47SEmmanuel Vadot          minItems: 2
1275def4c47SEmmanuel Vadot          maxItems: 2
1285def4c47SEmmanuel Vadot        clock-names:
1295def4c47SEmmanuel Vadot          minItems: 2
1305def4c47SEmmanuel Vadot          maxItems: 2
1315def4c47SEmmanuel Vadot      required:
1325def4c47SEmmanuel Vadot        - clocks
1335def4c47SEmmanuel Vadot        - clock-names
1345def4c47SEmmanuel Vadot
1355def4c47SEmmanuel VadotadditionalProperties: false
1365def4c47SEmmanuel Vadot
1375def4c47SEmmanuel Vadotexamples:
1385def4c47SEmmanuel Vadot  - |
1395def4c47SEmmanuel Vadot    switch@f0b00000 {
1405def4c47SEmmanuel Vadot            compatible = "brcm,bcm7445-switch-v4.0";
1415def4c47SEmmanuel Vadot            reg = <0xf0b00000 0x40000>,
1425def4c47SEmmanuel Vadot                  <0xf0b40000 0x110>,
1435def4c47SEmmanuel Vadot                  <0xf0b40340 0x30>,
1445def4c47SEmmanuel Vadot                  <0xf0b40380 0x30>,
1455def4c47SEmmanuel Vadot                  <0xf0b40400 0x34>,
1465def4c47SEmmanuel Vadot                  <0xf0b40600 0x208>;
1475def4c47SEmmanuel Vadot            reg-names = "core", "reg", "intrl2_0", "intrl2_1",
1485def4c47SEmmanuel Vadot                        "fcb", "acb";
1495def4c47SEmmanuel Vadot            interrupts = <0 0x18 0>,
1505def4c47SEmmanuel Vadot                         <0 0x19 0>;
1515def4c47SEmmanuel Vadot            clocks = <&sw_switch>, <&sw_switch_mdiv>;
1525def4c47SEmmanuel Vadot            clock-names = "sw_switch", "sw_switch_mdiv";
1535def4c47SEmmanuel Vadot            brcm,num-gphy = <1>;
1545def4c47SEmmanuel Vadot            brcm,num-rgmii-ports = <2>;
1555def4c47SEmmanuel Vadot            brcm,fcb-pause-override;
1565def4c47SEmmanuel Vadot            brcm,acb-packets-inflight;
1575def4c47SEmmanuel Vadot
1585def4c47SEmmanuel Vadot            ports {
1595def4c47SEmmanuel Vadot                    #address-cells = <1>;
1605def4c47SEmmanuel Vadot                    #size-cells = <0>;
1615def4c47SEmmanuel Vadot
1625def4c47SEmmanuel Vadot                    port@0 {
1635def4c47SEmmanuel Vadot                            label = "gphy";
1645def4c47SEmmanuel Vadot                            reg = <0>;
1655def4c47SEmmanuel Vadot                    };
1665def4c47SEmmanuel Vadot            };
1675def4c47SEmmanuel Vadot    };
168