xref: /linux/Documentation/devicetree/bindings/net/cdns,macb.yaml (revision a4eb44a6435d6d8f9e642407a4a06f65eb90ca04)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/cdns,macb.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Cadence MACB/GEM Ethernet controller
8
9maintainers:
10  - Nicolas Ferre <nicolas.ferre@microchip.com>
11  - Claudiu Beznea <claudiu.beznea@microchip.com>
12
13properties:
14  compatible:
15    oneOf:
16      - items:
17          - enum:
18              - cdns,at91rm9200-emac  # Atmel at91rm9200 SoC
19          - const: cdns,emac          # Generic
20
21      - items:
22          - enum:
23              - cdns,zynq-gem         # Xilinx Zynq-7xxx SoC
24              - cdns,zynqmp-gem       # Xilinx Zynq Ultrascale+ MPSoC
25          - const: cdns,gem           # Generic
26
27      - items:
28          - enum:
29              - cdns,at91sam9260-macb # Atmel at91sam9 SoCs
30              - cdns,sam9x60-macb     # Microchip sam9x60 SoC
31          - const: cdns,macb          # Generic
32
33      - items:
34          - enum:
35              - atmel,sama5d3-macb    # 10/100Mbit IP on Atmel sama5d3 SoCs
36          - enum:
37              - cdns,at91sam9260-macb # Atmel at91sam9 SoCs.
38          - const: cdns,macb          # Generic
39
40      - enum:
41          - atmel,sama5d29-gem        # GEM XL IP (10/100) on Atmel sama5d29 SoCs
42          - atmel,sama5d2-gem         # GEM IP (10/100) on Atmel sama5d2 SoCs
43          - atmel,sama5d3-gem         # Gigabit IP on Atmel sama5d3 SoCs
44          - atmel,sama5d4-gem         # GEM IP (10/100) on Atmel sama5d4 SoCs
45          - cdns,at32ap7000-macb      # Other 10/100 usage or use the generic form
46          - cdns,np4-macb             # NP4 SoC devices
47          - microchip,sama7g5-emac    # Microchip SAMA7G5 ethernet interface
48          - microchip,sama7g5-gem     # Microchip SAMA7G5 gigabit ethernet interface
49          - sifive,fu540-c000-gem     # SiFive FU540-C000 SoC
50          - cdns,emac                 # Generic
51          - cdns,gem                  # Generic
52          - cdns,macb                 # Generic
53
54  reg:
55    minItems: 1
56    items:
57      - description: Basic register set
58      - description: GEMGXL Management block registers on SiFive FU540-C000 SoC
59
60  interrupts:
61    minItems: 1
62    maxItems: 8
63    description: One interrupt per available hardware queue
64
65  clocks:
66    minItems: 1
67    maxItems: 5
68
69  clock-names:
70    minItems: 1
71    items:
72      - enum: [ ether_clk, hclk, pclk ]
73      - enum: [ hclk, pclk ]
74      - const: tx_clk
75      - enum: [ rx_clk, tsu_clk ]
76      - const: tsu_clk
77
78  local-mac-address: true
79
80  phy-mode: true
81
82  phy-handle: true
83
84  fixed-link: true
85
86  iommus:
87    maxItems: 1
88
89  power-domains:
90    maxItems: 1
91
92  '#address-cells':
93    const: 1
94
95  '#size-cells':
96    const: 0
97
98  mdio:
99    type: object
100    description:
101      Node containing PHY children. If this node is not present, then PHYs will
102      be direct children.
103
104patternProperties:
105  "^ethernet-phy@[0-9a-f]$":
106    type: object
107    $ref: ethernet-phy.yaml#
108
109    properties:
110      reset-gpios: true
111
112      magic-packet:
113        description:
114          Indicates that the hardware supports waking up via magic packet.
115
116    unevaluatedProperties: false
117
118required:
119  - compatible
120  - reg
121  - interrupts
122  - clocks
123  - clock-names
124  - phy-mode
125
126allOf:
127  - $ref: ethernet-controller.yaml#
128
129  - if:
130      not:
131        properties:
132          compatible:
133            contains:
134              const: sifive,fu540-c000-gem
135    then:
136      properties:
137        reg:
138          maxItems: 1
139
140unevaluatedProperties: false
141
142examples:
143  - |
144    macb0: ethernet@fffc4000 {
145            compatible = "cdns,at32ap7000-macb";
146            reg = <0xfffc4000 0x4000>;
147            interrupts = <21>;
148            phy-mode = "rmii";
149            local-mac-address = [3a 0e 03 04 05 06];
150            clock-names = "pclk", "hclk", "tx_clk";
151            clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
152            #address-cells = <1>;
153            #size-cells = <0>;
154
155            ethernet-phy@1 {
156                    reg = <0x1>;
157                    reset-gpios = <&pioE 6 1>;
158            };
159    };
160