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