xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/brcm,b53.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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,b53.yaml#
55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65def4c47SEmmanuel Vadot
75def4c47SEmmanuel Vadottitle: Broadcom BCM53xx Ethernet switches
85def4c47SEmmanuel Vadot
95def4c47SEmmanuel Vadotmaintainers:
105def4c47SEmmanuel Vadot  - Florian Fainelli <f.fainelli@gmail.com>
115def4c47SEmmanuel Vadot
125def4c47SEmmanuel Vadotdescription:
135def4c47SEmmanuel Vadot  Broadcom BCM53xx Ethernet switches
145def4c47SEmmanuel Vadot
155def4c47SEmmanuel Vadotproperties:
165def4c47SEmmanuel Vadot  compatible:
175def4c47SEmmanuel Vadot    oneOf:
185def4c47SEmmanuel Vadot      - const: brcm,bcm5325
195def4c47SEmmanuel Vadot      - const: brcm,bcm53115
205def4c47SEmmanuel Vadot      - const: brcm,bcm53125
215def4c47SEmmanuel Vadot      - const: brcm,bcm53128
22*fac71e4eSEmmanuel Vadot      - const: brcm,bcm53134
235def4c47SEmmanuel Vadot      - const: brcm,bcm5365
245def4c47SEmmanuel Vadot      - const: brcm,bcm5395
255def4c47SEmmanuel Vadot      - const: brcm,bcm5389
265def4c47SEmmanuel Vadot      - const: brcm,bcm5397
275def4c47SEmmanuel Vadot      - const: brcm,bcm5398
285def4c47SEmmanuel Vadot      - items:
295def4c47SEmmanuel Vadot          - const: brcm,bcm11360-srab
305def4c47SEmmanuel Vadot          - const: brcm,cygnus-srab
315def4c47SEmmanuel Vadot      - items:
325def4c47SEmmanuel Vadot          - enum:
335def4c47SEmmanuel Vadot              - brcm,bcm53010-srab
345def4c47SEmmanuel Vadot              - brcm,bcm53011-srab
355def4c47SEmmanuel Vadot              - brcm,bcm53012-srab
365def4c47SEmmanuel Vadot              - brcm,bcm53018-srab
375def4c47SEmmanuel Vadot              - brcm,bcm53019-srab
385def4c47SEmmanuel Vadot          - const: brcm,bcm5301x-srab
395def4c47SEmmanuel Vadot      - items:
405def4c47SEmmanuel Vadot          - enum:
415def4c47SEmmanuel Vadot              - brcm,bcm11404-srab
425def4c47SEmmanuel Vadot              - brcm,bcm11407-srab
435def4c47SEmmanuel Vadot              - brcm,bcm11409-srab
445def4c47SEmmanuel Vadot              - brcm,bcm58310-srab
455def4c47SEmmanuel Vadot              - brcm,bcm58311-srab
465def4c47SEmmanuel Vadot              - brcm,bcm58313-srab
475def4c47SEmmanuel Vadot          - const: brcm,omega-srab
485def4c47SEmmanuel Vadot      - items:
495def4c47SEmmanuel Vadot          - enum:
505def4c47SEmmanuel Vadot              - brcm,bcm58522-srab
515def4c47SEmmanuel Vadot              - brcm,bcm58523-srab
525def4c47SEmmanuel Vadot              - brcm,bcm58525-srab
535def4c47SEmmanuel Vadot              - brcm,bcm58622-srab
545def4c47SEmmanuel Vadot              - brcm,bcm58623-srab
555def4c47SEmmanuel Vadot              - brcm,bcm58625-srab
565def4c47SEmmanuel Vadot              - brcm,bcm88312-srab
575def4c47SEmmanuel Vadot          - const: brcm,nsp-srab
585def4c47SEmmanuel Vadot      - items:
595def4c47SEmmanuel Vadot          - enum:
605def4c47SEmmanuel Vadot              - brcm,bcm3384-switch
61*fac71e4eSEmmanuel Vadot              - brcm,bcm6318-switch
625def4c47SEmmanuel Vadot              - brcm,bcm6328-switch
63*fac71e4eSEmmanuel Vadot              - brcm,bcm6362-switch
645def4c47SEmmanuel Vadot              - brcm,bcm6368-switch
65*fac71e4eSEmmanuel Vadot              - brcm,bcm63268-switch
665def4c47SEmmanuel Vadot          - const: brcm,bcm63xx-switch
675def4c47SEmmanuel Vadot
685def4c47SEmmanuel Vadotrequired:
695def4c47SEmmanuel Vadot  - compatible
705def4c47SEmmanuel Vadot  - reg
715def4c47SEmmanuel Vadot
72d5b0e70fSEmmanuel VadotallOf:
73cb7aa33aSEmmanuel Vadot  - $ref: dsa.yaml#/$defs/ethernet-ports
74d5b0e70fSEmmanuel Vadot  - if:
75d5b0e70fSEmmanuel Vadot      properties:
76d5b0e70fSEmmanuel Vadot        compatible:
77d5b0e70fSEmmanuel Vadot          contains:
78d5b0e70fSEmmanuel Vadot            enum:
79d5b0e70fSEmmanuel Vadot              - brcm,bcm5325
80d5b0e70fSEmmanuel Vadot              - brcm,bcm53115
81d5b0e70fSEmmanuel Vadot              - brcm,bcm53125
82d5b0e70fSEmmanuel Vadot              - brcm,bcm53128
83d5b0e70fSEmmanuel Vadot              - brcm,bcm5365
84d5b0e70fSEmmanuel Vadot              - brcm,bcm5395
85d5b0e70fSEmmanuel Vadot              - brcm,bcm5397
86d5b0e70fSEmmanuel Vadot              - brcm,bcm5398
87d5b0e70fSEmmanuel Vadot    then:
88d5b0e70fSEmmanuel Vadot      $ref: /schemas/spi/spi-peripheral-props.yaml
89d5b0e70fSEmmanuel Vadot
905def4c47SEmmanuel Vadot    # BCM585xx/586xx/88312 SoCs
91d5b0e70fSEmmanuel Vadot  - if:
925def4c47SEmmanuel Vadot      properties:
935def4c47SEmmanuel Vadot        compatible:
945def4c47SEmmanuel Vadot          contains:
955def4c47SEmmanuel Vadot            enum:
965def4c47SEmmanuel Vadot              - brcm,bcm58522-srab
975def4c47SEmmanuel Vadot              - brcm,bcm58523-srab
985def4c47SEmmanuel Vadot              - brcm,bcm58525-srab
995def4c47SEmmanuel Vadot              - brcm,bcm58622-srab
1005def4c47SEmmanuel Vadot              - brcm,bcm58623-srab
1015def4c47SEmmanuel Vadot              - brcm,bcm58625-srab
1025def4c47SEmmanuel Vadot              - brcm,bcm88312-srab
1035def4c47SEmmanuel Vadot    then:
1045def4c47SEmmanuel Vadot      properties:
1055def4c47SEmmanuel Vadot        reg:
1065def4c47SEmmanuel Vadot          minItems: 3
1075def4c47SEmmanuel Vadot          maxItems: 3
1085def4c47SEmmanuel Vadot        reg-names:
1095def4c47SEmmanuel Vadot          items:
1105def4c47SEmmanuel Vadot            - const: srab
1115def4c47SEmmanuel Vadot            - const: mux_config
1125def4c47SEmmanuel Vadot            - const: sgmii_config
1135def4c47SEmmanuel Vadot        interrupts:
1145def4c47SEmmanuel Vadot          minItems: 13
1155def4c47SEmmanuel Vadot          maxItems: 13
1165def4c47SEmmanuel Vadot        interrupt-names:
1175def4c47SEmmanuel Vadot          items:
1185def4c47SEmmanuel Vadot            - const: link_state_p0
1195def4c47SEmmanuel Vadot            - const: link_state_p1
1205def4c47SEmmanuel Vadot            - const: link_state_p2
1215def4c47SEmmanuel Vadot            - const: link_state_p3
1225def4c47SEmmanuel Vadot            - const: link_state_p4
1235def4c47SEmmanuel Vadot            - const: link_state_p5
1245def4c47SEmmanuel Vadot            - const: link_state_p7
1255def4c47SEmmanuel Vadot            - const: link_state_p8
1265def4c47SEmmanuel Vadot            - const: phy
1275def4c47SEmmanuel Vadot            - const: ts
1285def4c47SEmmanuel Vadot            - const: imp_sleep_timer_p5
1295def4c47SEmmanuel Vadot            - const: imp_sleep_timer_p7
1305def4c47SEmmanuel Vadot            - const: imp_sleep_timer_p8
1315def4c47SEmmanuel Vadot      required:
1325def4c47SEmmanuel Vadot        - interrupts
1335def4c47SEmmanuel Vadot    else:
1345def4c47SEmmanuel Vadot      properties:
1355def4c47SEmmanuel Vadot        reg:
1365def4c47SEmmanuel Vadot          maxItems: 1
1375def4c47SEmmanuel Vadot
1385def4c47SEmmanuel VadotunevaluatedProperties: false
1395def4c47SEmmanuel Vadot
1405def4c47SEmmanuel Vadotexamples:
1415def4c47SEmmanuel Vadot  - |
1425def4c47SEmmanuel Vadot    mdio {
1435def4c47SEmmanuel Vadot        #address-cells = <1>;
1445def4c47SEmmanuel Vadot        #size-cells = <0>;
1455def4c47SEmmanuel Vadot
1465def4c47SEmmanuel Vadot        ethernet-switch@1e {
1475def4c47SEmmanuel Vadot            compatible = "brcm,bcm53125";
1485def4c47SEmmanuel Vadot            reg = <30>;
1495def4c47SEmmanuel Vadot
1505def4c47SEmmanuel Vadot            ethernet-ports {
1515def4c47SEmmanuel Vadot                #address-cells = <1>;
1525def4c47SEmmanuel Vadot                #size-cells = <0>;
1535def4c47SEmmanuel Vadot
1545def4c47SEmmanuel Vadot                port@0 {
1555def4c47SEmmanuel Vadot                    reg = <0>;
1565def4c47SEmmanuel Vadot                    label = "lan1";
1575def4c47SEmmanuel Vadot                };
1585def4c47SEmmanuel Vadot
1595def4c47SEmmanuel Vadot                port@1 {
1605def4c47SEmmanuel Vadot                    reg = <1>;
1615def4c47SEmmanuel Vadot                    label = "lan2";
1625def4c47SEmmanuel Vadot                };
1635def4c47SEmmanuel Vadot
1645def4c47SEmmanuel Vadot                port@5 {
1655def4c47SEmmanuel Vadot                    reg = <5>;
1665def4c47SEmmanuel Vadot                    label = "cable-modem";
1675def4c47SEmmanuel Vadot                    phy-mode = "rgmii-txid";
1685def4c47SEmmanuel Vadot                    fixed-link {
1695def4c47SEmmanuel Vadot                        speed = <1000>;
1705def4c47SEmmanuel Vadot                        full-duplex;
1715def4c47SEmmanuel Vadot                    };
1725def4c47SEmmanuel Vadot                };
1735def4c47SEmmanuel Vadot
1745def4c47SEmmanuel Vadot                port@8 {
1755def4c47SEmmanuel Vadot                    reg = <8>;
1765def4c47SEmmanuel Vadot                    phy-mode = "rgmii-txid";
1775def4c47SEmmanuel Vadot                    ethernet = <&eth0>;
1785def4c47SEmmanuel Vadot                    fixed-link {
1795def4c47SEmmanuel Vadot                        speed = <1000>;
1805def4c47SEmmanuel Vadot                        full-duplex;
1815def4c47SEmmanuel Vadot                    };
1825def4c47SEmmanuel Vadot                };
1835def4c47SEmmanuel Vadot            };
1845def4c47SEmmanuel Vadot        };
1855def4c47SEmmanuel Vadot    };
1865def4c47SEmmanuel Vadot  - |
1875def4c47SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1885def4c47SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1895def4c47SEmmanuel Vadot
1905def4c47SEmmanuel Vadot    axi {
1915def4c47SEmmanuel Vadot        #address-cells = <1>;
1925def4c47SEmmanuel Vadot        #size-cells = <1>;
1935def4c47SEmmanuel Vadot
1945def4c47SEmmanuel Vadot        switch@36000 {
1955def4c47SEmmanuel Vadot            compatible = "brcm,bcm58623-srab", "brcm,nsp-srab";
1965def4c47SEmmanuel Vadot            reg = <0x36000 0x1000>,
1975def4c47SEmmanuel Vadot                  <0x3f308 0x8>,
1985def4c47SEmmanuel Vadot                  <0x3f410 0xc>;
1995def4c47SEmmanuel Vadot            reg-names = "srab", "mux_config", "sgmii_config";
2005def4c47SEmmanuel Vadot            interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
2015def4c47SEmmanuel Vadot                         <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
2025def4c47SEmmanuel Vadot                         <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
2035def4c47SEmmanuel Vadot                         <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
2045def4c47SEmmanuel Vadot                         <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
2055def4c47SEmmanuel Vadot                         <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
2065def4c47SEmmanuel Vadot                         <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
2075def4c47SEmmanuel Vadot                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
2085def4c47SEmmanuel Vadot                         <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
2095def4c47SEmmanuel Vadot                         <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
2105def4c47SEmmanuel Vadot                         <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
2115def4c47SEmmanuel Vadot                         <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
2125def4c47SEmmanuel Vadot                         <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
2135def4c47SEmmanuel Vadot            interrupt-names = "link_state_p0",
2145def4c47SEmmanuel Vadot                              "link_state_p1",
2155def4c47SEmmanuel Vadot                              "link_state_p2",
2165def4c47SEmmanuel Vadot                              "link_state_p3",
2175def4c47SEmmanuel Vadot                              "link_state_p4",
2185def4c47SEmmanuel Vadot                              "link_state_p5",
2195def4c47SEmmanuel Vadot                              "link_state_p7",
2205def4c47SEmmanuel Vadot                              "link_state_p8",
2215def4c47SEmmanuel Vadot                              "phy",
2225def4c47SEmmanuel Vadot                              "ts",
2235def4c47SEmmanuel Vadot                              "imp_sleep_timer_p5",
2245def4c47SEmmanuel Vadot                              "imp_sleep_timer_p7",
2255def4c47SEmmanuel Vadot                              "imp_sleep_timer_p8";
2265def4c47SEmmanuel Vadot
2275def4c47SEmmanuel Vadot            ethernet-ports {
2285def4c47SEmmanuel Vadot                #address-cells = <1>;
2295def4c47SEmmanuel Vadot                #size-cells = <0>;
2305def4c47SEmmanuel Vadot
2315def4c47SEmmanuel Vadot                port@0 {
2325def4c47SEmmanuel Vadot                    label = "port0";
2335def4c47SEmmanuel Vadot                    reg = <0>;
2345def4c47SEmmanuel Vadot                };
2355def4c47SEmmanuel Vadot
2365def4c47SEmmanuel Vadot                port@1 {
2375def4c47SEmmanuel Vadot                    label = "port1";
2385def4c47SEmmanuel Vadot                    reg = <1>;
2395def4c47SEmmanuel Vadot                };
2405def4c47SEmmanuel Vadot
2415def4c47SEmmanuel Vadot                port@2 {
2425def4c47SEmmanuel Vadot                    label = "port2";
2435def4c47SEmmanuel Vadot                    reg = <2>;
2445def4c47SEmmanuel Vadot                };
2455def4c47SEmmanuel Vadot
2465def4c47SEmmanuel Vadot                port@3 {
2475def4c47SEmmanuel Vadot                    label = "port3";
2485def4c47SEmmanuel Vadot                    reg = <3>;
2495def4c47SEmmanuel Vadot                };
2505def4c47SEmmanuel Vadot
2515def4c47SEmmanuel Vadot                port@4 {
2525def4c47SEmmanuel Vadot                    label = "port4";
2535def4c47SEmmanuel Vadot                    reg = <4>;
2545def4c47SEmmanuel Vadot                };
2555def4c47SEmmanuel Vadot
2565def4c47SEmmanuel Vadot                port@8 {
2575def4c47SEmmanuel Vadot                    ethernet = <&amac2>;
2585def4c47SEmmanuel Vadot                    reg = <8>;
2597ef62cebSEmmanuel Vadot                    phy-mode = "internal";
2607ef62cebSEmmanuel Vadot
2615def4c47SEmmanuel Vadot                    fixed-link {
2625def4c47SEmmanuel Vadot                        speed = <1000>;
2635def4c47SEmmanuel Vadot                        full-duplex;
2645def4c47SEmmanuel Vadot                    };
2655def4c47SEmmanuel Vadot                };
2665def4c47SEmmanuel Vadot            };
2675def4c47SEmmanuel Vadot        };
2685def4c47SEmmanuel Vadot    };
269