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