Skip to content

Commit c0a2817

Browse files
author
Vince Bridgers
committed
stmmac: Add properties for transmit and receive fifo sizes
The Synopsys stmmac fifo sizes are configurable, and need to be known in order to configure certain controller features. This patch adds tx-fifo-depth and rx-fifo-depth properties to the stmmac document file. Signed-off-by: Vince Bridgers <vbridger@opensource.altera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 37161a7 commit c0a2817

File tree

2 files changed

+50
-5
lines changed

2 files changed

+50
-5
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
The following properties are common to the Ethernet controllers:
2+
3+
- local-mac-address: array of 6 bytes, specifies the MAC address that was
4+
assigned to the network device;
5+
- mac-address: array of 6 bytes, specifies the MAC address that was last used by
6+
the boot program; should be used in cases where the MAC address assigned to
7+
the device by the boot program is different from the "local-mac-address"
8+
property;
9+
- max-speed: number, specifies maximum speed in Mbit/s supported by the device;
10+
- max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than
11+
the maximum frame size (there's contradiction in ePAPR).
12+
- phy-mode: string, operation mode of the PHY interface; supported values are
13+
"mii", "gmii", "sgmii", "qsgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id",
14+
"rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto
15+
standard property;
16+
- phy-connection-type: the same as "phy-mode" property but described in ePAPR;
17+
- phy-handle: phandle, specifies a reference to a node representing a PHY
18+
device; this property is described in ePAPR and so preferred;
19+
- phy: the same as "phy-handle" property, not recommended for new bindings.
20+
- phy-device: the same as "phy-handle" property, not recommended for new
21+
bindings.
22+
- rx-fifo-depth: the size of the controller's receive fifo in bytes. This
23+
is used for components that can have configurable receive fifo sizes,
24+
and is useful for determining certain configuration settings such as
25+
flow control thresholds.
26+
- tx-fifo-depth: the size of the controller's transmit fifo in bytes. This
27+
is used for components that can have configurable fifo sizes.
28+
29+
Child nodes of the Ethernet controller are typically the individual PHY devices
30+
connected via the MDIO bus (sometimes the MDIO bus controller is separate).
31+
They are described in the phy.txt file in this same directory.

Documentation/devicetree/bindings/net/stmmac.txt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,21 @@ Required properties:
1919

2020
Optional properties:
2121
- mac-address: 6 bytes, mac address
22-
- snps,max-mtu Maximum mtu size permitted. Useful since
23-
the Synopsys EMAC transmit and receive fifos are
24-
configurable by Core Consultant, resulting in
25-
different maximum mtus for different instances
26-
of the device.
22+
- resets: Should contain a phandle to the STMMAC reset signal, if any
23+
- reset-names: Should contain the reset signal name "stmmaceth", if a
24+
reset phandle is given
25+
- max-frame-size: See ethernet.txt file in the same directory
26+
- clocks: If present, the first clock should be the GMAC main clock,
27+
further clocks may be specified in derived bindings.
28+
- clock-names: One name for each entry in the clocks property, the
29+
first one should be "stmmaceth".
30+
- clk_ptp_ref: this is the PTP reference clock; in case of the PTP is
31+
available this clock is used for programming the Timestamp Addend Register.
32+
If not passed then the system clock will be used and this is fine on some
33+
platforms.
34+
- snps,burst_len: The AXI burst lenth value of the AXI BUS MODE register.
35+
- tx-fifo-depth: See ethernet.txt file in the same directory
36+
- rx-fifo-depth: See ethernet.txt file in the same directory
2737

2838
Examples:
2939

@@ -38,4 +48,8 @@ Examples:
3848
snps,max-mtu = <4062>;
3949
snps,multicast-filter-bins = <256>;
4050
snps,perfect-filter-entries = <128>;
51+
rx-fifo-depth = <16384>;
52+
tx-fifo-depth = <16384>;
53+
clocks = <&clock>;
54+
clock-names = "stmmaceth";
4155
};

0 commit comments

Comments
 (0)