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