1c66ec88fSEmmanuel Vadot* Synopsys DWC Ethernet QoS IP version 4.10 driver (GMAC)
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThis binding is deprecated, but it continues to be supported, but new
4c66ec88fSEmmanuel Vadotfeatures should be preferably added to the stmmac binding document.
5c66ec88fSEmmanuel Vadot
6c66ec88fSEmmanuel VadotThis binding supports the Synopsys Designware Ethernet QoS (Quality Of Service)
7c66ec88fSEmmanuel VadotIP block. The IP supports multiple options for bus type, clocking and reset
8c66ec88fSEmmanuel Vadotstructure, and feature list. Consequently, a number of properties and list
9c66ec88fSEmmanuel Vadotentries in properties are marked as optional, or only required in specific HW
10c66ec88fSEmmanuel Vadotconfigurations.
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotRequired properties:
13c66ec88fSEmmanuel Vadot- compatible: One of:
14c66ec88fSEmmanuel Vadot  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10"
15c66ec88fSEmmanuel Vadot    Represents the IP core when integrated into the Axis ARTPEC-6 SoC.
16c66ec88fSEmmanuel Vadot  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10"
17c66ec88fSEmmanuel Vadot    Represents the IP core when integrated into the NVIDIA Tegra186 SoC.
18c66ec88fSEmmanuel Vadot  - "snps,dwc-qos-ethernet-4.10"
19c66ec88fSEmmanuel Vadot    This combination is deprecated. It should be treated as equivalent to
20c66ec88fSEmmanuel Vadot    "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10". It is supported to be
21c66ec88fSEmmanuel Vadot    compatible with earlier revisions of this binding.
22c66ec88fSEmmanuel Vadot- reg: Address and length of the register set for the device
23c66ec88fSEmmanuel Vadot- clocks: Phandle and clock specifiers for each entry in clock-names, in the
24c66ec88fSEmmanuel Vadot  same order. See ../clock/clock-bindings.txt.
25c66ec88fSEmmanuel Vadot- clock-names: May contain any/all of the following depending on the IP
26c66ec88fSEmmanuel Vadot  configuration, in any order:
27c66ec88fSEmmanuel Vadot  - "tx"
28c66ec88fSEmmanuel Vadot    The EQOS transmit path clock. The HW signal name is clk_tx_i.
29c66ec88fSEmmanuel Vadot    In some configurations (e.g. GMII/RGMII), this clock also drives the PHY TX
30c66ec88fSEmmanuel Vadot    path. In other configurations, other clocks (such as tx_125, rmii) may
31c66ec88fSEmmanuel Vadot    drive the PHY TX path.
32c66ec88fSEmmanuel Vadot  - "rx"
33c66ec88fSEmmanuel Vadot    The EQOS receive path clock. The HW signal name is clk_rx_i.
34c66ec88fSEmmanuel Vadot    In some configurations (e.g. GMII/RGMII), this clock is derived from the
35c66ec88fSEmmanuel Vadot    PHY's RX clock output. In other configurations, other clocks (such as
36c66ec88fSEmmanuel Vadot    rx_125, rmii) may drive the EQOS RX path.
37c66ec88fSEmmanuel Vadot    In cases where the PHY clock is directly fed into the EQOS receive path
38c66ec88fSEmmanuel Vadot    without intervening logic, the DT need not represent this clock, since it
39c66ec88fSEmmanuel Vadot    is assumed to be fully under the control of the PHY device/driver. In
40c66ec88fSEmmanuel Vadot    cases where SoC integration adds additional logic to this path, such as a
41c66ec88fSEmmanuel Vadot    SW-controlled clock gate, this clock should be represented in DT.
42c66ec88fSEmmanuel Vadot  - "slave_bus"
43c66ec88fSEmmanuel Vadot    The CPU/slave-bus (CSR) interface clock. This applies to any bus type;
44c66ec88fSEmmanuel Vadot    APB, AHB, AXI, etc. The HW signal name is hclk_i (AHB) or clk_csr_i (other
45c66ec88fSEmmanuel Vadot    buses).
46c66ec88fSEmmanuel Vadot  - "master_bus"
47c66ec88fSEmmanuel Vadot    The master bus interface clock. Only required in configurations that use a
48c66ec88fSEmmanuel Vadot    separate clock for the master and slave bus interfaces. The HW signal name
49c66ec88fSEmmanuel Vadot    is hclk_i (AHB) or aclk_i (AXI).
50c66ec88fSEmmanuel Vadot  - "ptp_ref"
51c66ec88fSEmmanuel Vadot    The PTP reference clock. The HW signal name is clk_ptp_ref_i.
52c66ec88fSEmmanuel Vadot  - "phy_ref_clk"
53c66ec88fSEmmanuel Vadot    This clock is deprecated and should not be used by new compatible values.
54c66ec88fSEmmanuel Vadot    It is equivalent to "tx".
55c66ec88fSEmmanuel Vadot  - "apb_pclk"
56c66ec88fSEmmanuel Vadot    This clock is deprecated and should not be used by new compatible values.
57c66ec88fSEmmanuel Vadot    It is equivalent to "slave_bus".
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel Vadot  Note: Support for additional IP configurations may require adding the
60c66ec88fSEmmanuel Vadot  following clocks to this list in the future: clk_rx_125_i, clk_tx_125_i,
61c66ec88fSEmmanuel Vadot  clk_pmarx_0_i, clk_pmarx1_i, clk_rmii_i, clk_revmii_rx_i, clk_revmii_tx_i.
62c66ec88fSEmmanuel Vadot  Configurations exist where multiple similar clocks are used at once, e.g. all
63c66ec88fSEmmanuel Vadot  of clk_rx_125_i, clk_pmarx_0_i, clk_pmarx1_i. For this reason it is best to
64c66ec88fSEmmanuel Vadot  extend the binding with a separate clock-names entry for each of those RX
65c66ec88fSEmmanuel Vadot  clocks, rather than repurposing the existing "rx" clock-names entry as a
66c66ec88fSEmmanuel Vadot  generic/logical clock in a similar fashion to "master_bus" and "slave_bus".
67c66ec88fSEmmanuel Vadot  This will allow easy support for configurations that support multiple PHY
68c66ec88fSEmmanuel Vadot  interfaces using a mux, and hence need to have explicit control over
69c66ec88fSEmmanuel Vadot  specific RX clocks.
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot  The following compatible values require the following set of clocks:
72c66ec88fSEmmanuel Vadot  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
73c66ec88fSEmmanuel Vadot    - "slave_bus"
74c66ec88fSEmmanuel Vadot    - "master_bus"
75c66ec88fSEmmanuel Vadot    - "rx"
76c66ec88fSEmmanuel Vadot    - "tx"
77c66ec88fSEmmanuel Vadot    - "ptp_ref"
78c66ec88fSEmmanuel Vadot  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
79c66ec88fSEmmanuel Vadot    - "slave_bus"
80c66ec88fSEmmanuel Vadot    - "master_bus"
81c66ec88fSEmmanuel Vadot    - "tx"
82c66ec88fSEmmanuel Vadot    - "ptp_ref"
83c66ec88fSEmmanuel Vadot  - "snps,dwc-qos-ethernet-4.10" (deprecated):
84c66ec88fSEmmanuel Vadot    - "phy_ref_clk"
85c66ec88fSEmmanuel Vadot    - "apb_clk"
86c66ec88fSEmmanuel Vadot- interrupts: Should contain the core's combined interrupt signal
87c66ec88fSEmmanuel Vadot- phy-mode: See ethernet.txt file in the same directory
88c66ec88fSEmmanuel Vadot- resets: Phandle and reset specifiers for each entry in reset-names, in the
89c66ec88fSEmmanuel Vadot  same order. See ../reset/reset.txt.
90c66ec88fSEmmanuel Vadot- reset-names: May contain any/all of the following depending on the IP
91c66ec88fSEmmanuel Vadot  configuration, in any order:
92c66ec88fSEmmanuel Vadot  - "eqos". The reset to the entire module. The HW signal name is hreset_n
93c66ec88fSEmmanuel Vadot    (AHB) or aresetn_i (AXI).
94c66ec88fSEmmanuel Vadot
95c66ec88fSEmmanuel Vadot  The following compatible values require the following set of resets:
96c66ec88fSEmmanuel Vadot  (the reset properties may be omitted if empty)
97c66ec88fSEmmanuel Vadot  - "nvidia,tegra186-eqos", "snps,dwc-qos-ethernet-4.10":
98c66ec88fSEmmanuel Vadot    - "eqos".
99c66ec88fSEmmanuel Vadot  - "axis,artpec6-eqos", "snps,dwc-qos-ethernet-4.10":
100c66ec88fSEmmanuel Vadot    - None.
101c66ec88fSEmmanuel Vadot  - "snps,dwc-qos-ethernet-4.10" (deprecated):
102c66ec88fSEmmanuel Vadot    - None.
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel VadotOptional properties:
105c66ec88fSEmmanuel Vadot- dma-coherent: Present if dma operations are coherent
106c66ec88fSEmmanuel Vadot- phy-reset-gpios: Phandle and specifier for any GPIO used to reset the PHY.
107c66ec88fSEmmanuel Vadot  See ../gpio/gpio.txt.
108c66ec88fSEmmanuel Vadot- snps,en-lpi: If present it enables use of the AXI low-power interface
109c66ec88fSEmmanuel Vadot- snps,write-requests: Number of write requests that the AXI port can issue.
110c66ec88fSEmmanuel Vadot  It depends on the SoC configuration.
111c66ec88fSEmmanuel Vadot- snps,read-requests: Number of read requests that the AXI port can issue.
112c66ec88fSEmmanuel Vadot  It depends on the SoC configuration.
113*aa1a8ff2SEmmanuel Vadot- snps,burst-map: Bitmap of allowed AXI burst lengths, with the LSB
114c66ec88fSEmmanuel Vadot  representing 4, then 8 etc.
115c66ec88fSEmmanuel Vadot- snps,txpbl: DMA Programmable burst length for the TX DMA
116c66ec88fSEmmanuel Vadot- snps,rxpbl: DMA Programmable burst length for the RX DMA
117c66ec88fSEmmanuel Vadot- snps,en-tx-lpi-clockgating: Enable gating of the MAC TX clock during
118c66ec88fSEmmanuel Vadot  TX low-power mode.
119c66ec88fSEmmanuel Vadot- phy-handle: See ethernet.txt file in the same directory
120c66ec88fSEmmanuel Vadot- mdio device tree subnode: When the GMAC has a phy connected to its local
121c66ec88fSEmmanuel Vadot    mdio, there must be device tree subnode with the following
122c66ec88fSEmmanuel Vadot    required properties:
123c66ec88fSEmmanuel Vadot    - compatible: Must be "snps,dwc-qos-ethernet-mdio".
124c66ec88fSEmmanuel Vadot    - #address-cells: Must be <1>.
125c66ec88fSEmmanuel Vadot    - #size-cells: Must be <0>.
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot    For each phy on the mdio bus, there must be a node with the following
128c66ec88fSEmmanuel Vadot    fields:
129c66ec88fSEmmanuel Vadot
130c66ec88fSEmmanuel Vadot    - reg: phy id used to communicate to phy.
131c66ec88fSEmmanuel Vadot    - device_type: Must be "ethernet-phy".
132c66ec88fSEmmanuel Vadot    - fixed-mode device tree subnode: see fixed-link.txt in the same directory
133c66ec88fSEmmanuel Vadot
134c66ec88fSEmmanuel VadotThe MAC address will be determined using the optional properties
135c66ec88fSEmmanuel Vadotdefined in ethernet.txt.
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel VadotExamples:
138c66ec88fSEmmanuel Vadotethernet2@40010000 {
139c66ec88fSEmmanuel Vadot	clock-names = "phy_ref_clk", "apb_pclk";
140c66ec88fSEmmanuel Vadot	clocks = <&clkc 17>, <&clkc 15>;
141c66ec88fSEmmanuel Vadot	compatible = "snps,dwc-qos-ethernet-4.10";
142c66ec88fSEmmanuel Vadot	interrupt-parent = <&intc>;
143c66ec88fSEmmanuel Vadot	interrupts = <0x0 0x1e 0x4>;
144c66ec88fSEmmanuel Vadot	reg = <0x40010000 0x4000>;
145c66ec88fSEmmanuel Vadot	phy-handle = <&phy2>;
146c66ec88fSEmmanuel Vadot	phy-mode = "gmii";
147c66ec88fSEmmanuel Vadot	phy-reset-gpios = <&gpioctlr 43 GPIO_ACTIVE_LOW>;
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot	snps,en-tx-lpi-clockgating;
150c66ec88fSEmmanuel Vadot	snps,en-lpi;
151c66ec88fSEmmanuel Vadot	snps,write-requests = <2>;
152c66ec88fSEmmanuel Vadot	snps,read-requests = <16>;
153c66ec88fSEmmanuel Vadot	snps,burst-map = <0x7>;
154c66ec88fSEmmanuel Vadot	snps,txpbl = <8>;
155c66ec88fSEmmanuel Vadot	snps,rxpbl = <2>;
156c66ec88fSEmmanuel Vadot
157c66ec88fSEmmanuel Vadot	dma-coherent;
158c66ec88fSEmmanuel Vadot
159c66ec88fSEmmanuel Vadot	mdio {
160c66ec88fSEmmanuel Vadot		#address-cells = <0x1>;
161c66ec88fSEmmanuel Vadot		#size-cells = <0x0>;
162c66ec88fSEmmanuel Vadot		phy2: phy@1 {
163c66ec88fSEmmanuel Vadot			compatible = "ethernet-phy-ieee802.3-c22";
164c66ec88fSEmmanuel Vadot			device_type = "ethernet-phy";
165c66ec88fSEmmanuel Vadot			reg = <0x1>;
166c66ec88fSEmmanuel Vadot		};
167c66ec88fSEmmanuel Vadot	};
168c66ec88fSEmmanuel Vadot};
169