1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 # Copyright 2019 BayLibre, SAS
5 $id: "http://devicetree.org/schemas/net/stm32-dwmac.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
8 title: STMicroelectronics STM32 / MCU DWMAC glue layer controller
11 - Alexandre Torgue <alexandre.torgue@st.com>
12 - Christophe Roullier <christophe.roullier@st.com>
15 This file documents platform glue layer for stmmac.
17 # We need a select here so we don't match all nodes with 'snps,dwmac'
29 - $ref: "snps,dwmac.yaml#"
37 - const: snps,dwmac-4.20a
41 - const: snps,dwmac-4.10a
45 - const: snps,dwmac-3.50a
50 - description: GMAC main clock
51 - description: MAC TX clock
52 - description: MAC RX clock
53 - description: For MPU family, used for power mode
54 - description: For MPU family, used for PHY without quartz
68 $ref: "/schemas/types.yaml#/definitions/phandle-array"
70 Should be phandle/offset pair. The phandle to the syscon node which
71 encompases the glue register, and the offset of the control register
75 set this property in RGMII PHY when you want to select RCC clock instead of ETH_CLK125.
80 set this property in RMII mode when you have PHY without crystal 50MHz and want to
81 select RCC clock instead of ETH_REF_CLK.
90 unevaluatedProperties: false
94 #include <dt-bindings/interrupt-controller/arm-gic.h>
95 #include <dt-bindings/clock/stm32mp1-clks.h>
96 #include <dt-bindings/reset/stm32mp1-resets.h>
97 #include <dt-bindings/mfd/stm32h7-rcc.h>
99 ethernet0: ethernet@5800a000 {
100 compatible = "st,stm32mp1-dwmac", "snps,dwmac-4.20a";
101 reg = <0x5800a000 0x2000>;
102 reg-names = "stmmaceth";
103 interrupts = <&intc GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
104 interrupt-names = "macirq";
105 clock-names = "stmmaceth",
110 clocks = <&rcc ETHMAC>,
115 st,syscon = <&syscfg 0x4>;
117 snps,axi-config = <&stmmac_axi_config_0>;
122 //Example 2 (MCU example)
123 ethernet1: ethernet@40028000 {
124 compatible = "st,stm32-dwmac", "snps,dwmac-3.50a";
125 reg = <0x40028000 0x8000>;
126 reg-names = "stmmaceth";
127 interrupts = <0 61 0>, <0 62 0>;
128 interrupt-names = "macirq", "eth_wake_irq";
129 clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
130 clocks = <&rcc 0 25>, <&rcc 0 26>, <&rcc 0 27>;
131 st,syscon = <&syscfg 0x4>;
138 ethernet2: ethernet@40027000 {
139 compatible = "st,stm32-dwmac", "snps,dwmac-4.10a";
140 reg = <0x40028000 0x8000>;
141 reg-names = "stmmaceth";
143 interrupt-names = "macirq";
144 clock-names = "stmmaceth", "mac-clk-tx", "mac-clk-rx";
145 clocks = <&rcc 62>, <&rcc 61>, <&rcc 60>;
146 st,syscon = <&syscfg 0x4>;