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,bcm74165-asp
21          - const: brcm,asp-v2.1
22      - items:
23          - enum:
24              - brcm,bcm72165-asp
25          - const: brcm,asp-v2.0
26
27  "#address-cells":
28    const: 1
29  "#size-cells":
30    const: 1
31
32  reg:
33    maxItems: 1
34
35  ranges: true
36
37  interrupts:
38    minItems: 1
39    items:
40      - description: RX/TX interrupt
41      - description: Port 0 Wake-on-LAN
42      - description: Port 1 Wake-on-LAN
43
44  clocks:
45    maxItems: 1
46
47  ethernet-ports:
48    type: object
49    properties:
50      "#address-cells":
51        const: 1
52      "#size-cells":
53        const: 0
54
55    patternProperties:
56      "^port@[0-9]+$":
57        type: object
58
59        $ref: ethernet-controller.yaml#
60
61        unevaluatedProperties: false
62
63        properties:
64          reg:
65            maxItems: 1
66            description: Port number
67
68          brcm,channel:
69            $ref: /schemas/types.yaml#/definitions/uint32
70            description: |
71              ASP Channel Number
72
73              The depacketizer channel that consumes packets from
74              the unimac/port.
75
76        required:
77          - reg
78          - brcm,channel
79
80    additionalProperties: false
81
82patternProperties:
83  "^mdio@[0-9a-f]+$":
84    type: object
85    $ref: brcm,unimac-mdio.yaml
86
87    description:
88      ASP internal UniMAC MDIO bus
89
90required:
91  - compatible
92  - reg
93  - interrupts
94  - clocks
95  - ranges
96
97additionalProperties: false
98
99examples:
100  - |
101    #include <dt-bindings/interrupt-controller/irq.h>
102    #include <dt-bindings/interrupt-controller/arm-gic.h>
103
104    ethernet@9c00000 {
105        compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0";
106        reg = <0x9c00000 0x1fff14>;
107        interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
108        ranges = <0x0 0x9c00000 0x1fff14>;
109        clocks = <&scmi 14>;
110        #address-cells = <1>;
111        #size-cells = <1>;
112
113        mdio@c614 {
114            compatible = "brcm,asp-v2.0-mdio";
115            reg = <0xc614 0x8>;
116            reg-names = "mdio";
117            #address-cells = <1>;
118            #size-cells = <0>;
119
120            phy0: ethernet-phy@1 {
121                reg = <1>;
122            };
123       };
124
125        mdio@ce14 {
126            compatible = "brcm,asp-v2.0-mdio";
127            reg = <0xce14 0x8>;
128            reg-names = "mdio";
129            #address-cells = <1>;
130            #size-cells = <0>;
131
132            phy1: ethernet-phy@1 {
133                reg = <1>;
134            };
135        };
136
137        ethernet-ports {
138            #address-cells = <1>;
139            #size-cells = <0>;
140
141            port@0 {
142                reg = <0>;
143                brcm,channel = <8>;
144                phy-mode = "rgmii";
145                phy-handle = <&phy0>;
146            };
147
148            port@1 {
149                reg = <1>;
150                brcm,channel = <9>;
151                phy-mode = "rgmii";
152                phy-handle = <&phy1>;
153            };
154        };
155    };
156