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