xref: /linux/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml (revision 4b660dbd9ee2059850fd30e0df420ca7a38a1856)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/brcm,asp-v2.0.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Broadcom ASP 2.0 Ethernet controller
8
9maintainers:
10  - Justin Chen <justin.chen@broadcom.com>
11  - Florian Fainelli <florian.fainelli@broadcom.com>
12
13description: Broadcom Ethernet controller first introduced with 72165
14
15properties:
16  compatible:
17    oneOf:
18      - items:
19          - enum:
20              - brcm,bcm74165b0-asp
21          - const: brcm,asp-v2.2
22      - items:
23          - enum:
24              - brcm,bcm74165-asp
25          - const: brcm,asp-v2.1
26      - items:
27          - enum:
28              - brcm,bcm72165-asp
29          - const: brcm,asp-v2.0
30
31  "#address-cells":
32    const: 1
33  "#size-cells":
34    const: 1
35
36  reg:
37    maxItems: 1
38
39  ranges: true
40
41  interrupts:
42    minItems: 1
43    items:
44      - description: RX/TX interrupt
45      - description: Port 0 Wake-on-LAN
46      - description: Port 1 Wake-on-LAN
47
48  clocks:
49    maxItems: 1
50
51  ethernet-ports:
52    type: object
53    properties:
54      "#address-cells":
55        const: 1
56      "#size-cells":
57        const: 0
58
59    patternProperties:
60      "^port@[0-9a-f]+$":
61        type: object
62
63        $ref: ethernet-controller.yaml#
64
65        unevaluatedProperties: false
66
67        properties:
68          reg:
69            maxItems: 1
70            description: Port number
71
72          brcm,channel:
73            $ref: /schemas/types.yaml#/definitions/uint32
74            description: |
75              ASP Channel Number
76
77              The depacketizer channel that consumes packets from
78              the unimac/port.
79
80        required:
81          - reg
82          - brcm,channel
83
84    additionalProperties: false
85
86patternProperties:
87  "^mdio@[0-9a-f]+$":
88    type: object
89    $ref: brcm,unimac-mdio.yaml
90
91    description:
92      ASP internal UniMAC MDIO bus
93
94required:
95  - compatible
96  - reg
97  - interrupts
98  - clocks
99  - ranges
100
101additionalProperties: false
102
103examples:
104  - |
105    #include <dt-bindings/interrupt-controller/irq.h>
106    #include <dt-bindings/interrupt-controller/arm-gic.h>
107
108    ethernet@9c00000 {
109        compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0";
110        reg = <0x9c00000 0x1fff14>;
111        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
112        ranges = <0x0 0x9c00000 0x1fff14>;
113        clocks = <&scmi 14>;
114        #address-cells = <1>;
115        #size-cells = <1>;
116
117        mdio@c614 {
118            compatible = "brcm,asp-v2.0-mdio";
119            reg = <0xc614 0x8>;
120            reg-names = "mdio";
121            #address-cells = <1>;
122            #size-cells = <0>;
123
124            phy0: ethernet-phy@1 {
125                reg = <1>;
126            };
127       };
128
129        mdio@ce14 {
130            compatible = "brcm,asp-v2.0-mdio";
131            reg = <0xce14 0x8>;
132            reg-names = "mdio";
133            #address-cells = <1>;
134            #size-cells = <0>;
135
136            phy1: ethernet-phy@1 {
137                reg = <1>;
138            };
139        };
140
141        ethernet-ports {
142            #address-cells = <1>;
143            #size-cells = <0>;
144
145            port@0 {
146                reg = <0>;
147                brcm,channel = <8>;
148                phy-mode = "rgmii";
149                phy-handle = <&phy0>;
150            };
151
152            port@1 {
153                reg = <1>;
154                brcm,channel = <9>;
155                phy-mode = "rgmii";
156                phy-handle = <&phy1>;
157            };
158        };
159    };
160