Skip to content

Commit e8f08ee

Browse files
Sergei Shtylyovdavem330
authored andcommitted
DT: net: document Ethernet bindings in one place
This patch is an attempt to gather the Ethernet related bindings in one file, like it's done in the MMC and some other subsystems. It should save some of the trouble of documenting several properties over and over in each binding document, instead only making reference to the main file. I have used the Embedded Power Architecture(TM) Platform Requirements (ePAPR) standard as a base for the properties description, also documenting some ad-hoc properties that have been introduced over time despite having direct analogs in ePAPR. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6df3efc commit e8f08ee

20 files changed

+53
-85
lines changed

Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,9 @@ Required properties:
55
"allwinner,sun4i-emac")
66
- reg: address and length of the register set for the device.
77
- interrupts: interrupt for the device
8-
- phy: A phandle to a phy node defining the PHY address (as the reg
9-
property, a single integer).
8+
- phy: see ethernet.txt file in the same directory.
109
- clocks: A phandle to the reference clock for this device
1110

12-
Optional properties:
13-
- (local-)mac-address: mac address to be used by this driver
14-
1511
Example:
1612

1713
emac: ethernet@01c0b000 {

Documentation/devicetree/bindings/net/arc_emac.txt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,12 @@ Required properties:
66
- interrupts: Should contain the EMAC interrupts
77
- clock-frequency: CPU frequency. It is needed to calculate and set polling
88
period of EMAC.
9-
- max-speed: Maximum supported data-rate in Mbit/s. In some HW configurations
10-
bandwidth of external memory controller might be a limiting factor. That's why
11-
it's required to specify which data-rate is supported on current SoC or FPGA.
12-
For example if only 10 Mbit/s is supported (10BASE-T) set "10". If 100 Mbit/s is
13-
supported (100BASE-TX) set "100".
14-
- phy: PHY device attached to the EMAC via MDIO bus
9+
- max-speed: see ethernet.txt file in the same directory.
10+
- phy: see ethernet.txt file in the same directory.
1511

1612
Child nodes of the driver are the individual PHY devices connected to the
1713
MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.
1814

19-
Optional properties:
20-
- mac-address: 6 bytes, mac address
21-
2215
Examples:
2316

2417
ethernet@c0fc2000 {

Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Required properties:
77
- interrupts: must be two cells, the first cell is the general purpose
88
interrupt line, while the second cell is the interrupt for the ring
99
RX and TX queues operating in ring mode
10-
- phy-mode: String, operation mode of the PHY interface. Supported values are
11-
"mii", "rgmii", "rgmii-txid", "rev-mii", "moca". Analogous to ePAPR
12-
"phy-connection-type" values
10+
- phy-mode: see ethernet.txt file in the same directory
1311
- address-cells: should be 1
1412
- size-cells: should be 1
1513

@@ -20,9 +18,8 @@ Optional properties:
2018
- clock-names: When provided, names of the functional clock phandles, first
2119
name should be "enet" and second should be "enet-wol".
2220

23-
- phy-handle: A phandle to a phy node defining the PHY address (as the reg
24-
property, a single integer), used to describe configurations where a PHY
25-
(internal or external) is used.
21+
- phy-handle: See ethernet.txt file in the same directory; used to describe
22+
configurations where a PHY (internal or external) is used.
2623

2724
- fixed-link: When the GENET interface is connected to a MoCA hardware block or
2825
when operating in a RGMII to RGMII type of connection, or when the MDIO bus is

Documentation/devicetree/bindings/net/cavium-mix.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ Properties:
1818
- interrupts: Two interrupt specifiers. The first is the MIX
1919
interrupt routing and the second the routing for the AGL interrupts.
2020

21-
- mac-address: Optional, the MAC address to assign to the device.
22-
23-
- local-mac-address: Optional, the MAC address to assign to the device
24-
if mac-address is not specified.
25-
26-
- phy-handle: Optional, a phandle for the PHY device connected to this device.
21+
- phy-handle: Optional, see ethernet.txt file in the same directory.
2722

2823
Example:
2924
ethernet@1070000100800 {

Documentation/devicetree/bindings/net/cavium-pip.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,7 @@ Properties for PIP port which is a child the PIP interface:
3535

3636
- reg: The port number within the interface group.
3737

38-
- mac-address: Optional, the MAC address to assign to the device.
39-
40-
- local-mac-address: Optional, the MAC address to assign to the device
41-
if mac-address is not specified.
42-
43-
- phy-handle: Optional, a phandle for the PHY device connected to this device.
38+
- phy-handle: Optional, see ethernet.txt file in the same directory.
4439

4540
Example:
4641

Documentation/devicetree/bindings/net/cdns-emac.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ Required properties:
66
or the generic form: "cdns,emac".
77
- reg: Address and length of the register set for the device
88
- interrupts: Should contain macb interrupt
9-
- phy-mode: String, operation mode of the PHY interface.
10-
Supported values are: "mii", "rmii".
11-
12-
Optional properties:
13-
- local-mac-address: 6 bytes, mac address
9+
- phy-mode: see ethernet.txt file in the same directory.
1410

1511
Examples:
1612

Documentation/devicetree/bindings/net/cpsw.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Optional properties:
2828
Slave Properties:
2929
Required properties:
3030
- phy_id : Specifies slave phy id
31-
- phy-mode : The interface between the SoC and the PHY (a string
32-
that of_get_phy_mode() can understand)
33-
- mac-address : Specifies slave MAC address
31+
- phy-mode : See ethernet.txt file in the same directory
32+
- mac-address : See ethernet.txt file in the same directory
3433

3534
Optional properties:
3635
- dual_emac_res_vlan : Specifies VID to be used to segregate the ports

Documentation/devicetree/bindings/net/davicom-dm9000.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ Required properties:
99
- interrupts : interrupt specifier specific to interrupt controller
1010

1111
Optional properties:
12-
- local-mac-address : A bytestring of 6 bytes specifying Ethernet MAC address
13-
to use (from firmware or bootloader)
1412
- davicom,no-eeprom : Configuration EEPROM is not available
1513
- davicom,ext-phy : Use external PHY
1614

Documentation/devicetree/bindings/net/davinci_emac.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ Required properties:
1717
Miscellaneous Interrupt>
1818

1919
Optional properties:
20-
- phy-handle: Contains a phandle to an Ethernet PHY.
20+
- phy-handle: See ethernet.txt file in the same directory.
2121
If absent, davinci_emac driver defaults to 100/FULL.
22-
- local-mac-address : 6 bytes, mac address
2322
- ti,davinci-rmii-en: 1 byte, 1 means use RMII
2423
- ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM?
2524

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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", "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+
23+
Child nodes of the Ethernet controller are typically the individual PHY devices
24+
connected via the MDIO bus (sometimes the MDIO bus controller is separate).
25+
They are described in the phy.txt file in this same directory.

Documentation/devicetree/bindings/net/fsl-fec.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ Required properties:
44
- compatible : Should be "fsl,<soc>-fec"
55
- reg : Address and length of the register set for the device
66
- interrupts : Should contain fec interrupt
7-
- phy-mode : String, operation mode of the PHY interface.
8-
Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
9-
"rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii".
7+
- phy-mode : See ethernet.txt file in the same directory
108

119
Optional properties:
12-
- local-mac-address : 6 bytes, mac address
1310
- phy-reset-gpios : Should specify the gpio for phy reset
1411
- phy-reset-duration : Reset duration in milliseconds. Should present
1512
only if property "phy-reset-gpios" is available. Missing the property

Documentation/devicetree/bindings/net/fsl-tsec-phy.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,17 @@ Properties:
3838
- model : Model of the device. Can be "TSEC", "eTSEC", or "FEC"
3939
- compatible : Should be "gianfar"
4040
- reg : Offset and length of the register set for the device
41-
- local-mac-address : List of bytes representing the ethernet address of
42-
this controller
4341
- interrupts : For FEC devices, the first interrupt is the device's
4442
interrupt. For TSEC and eTSEC devices, the first interrupt is
4543
transmit, the second is receive, and the third is error.
46-
- phy-handle : The phandle for the PHY connected to this ethernet
47-
controller.
44+
- phy-handle : See ethernet.txt file in the same directory.
4845
- fixed-link : <a b c d e> where a is emulated phy id - choose any,
4946
but unique to the all specified fixed-links, b is duplex - 0 half,
5047
1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no
5148
pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause.
52-
- phy-connection-type : a string naming the controller/PHY interface type,
53-
i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii",
54-
"tbi", or "rtbi". This property is only really needed if the connection
55-
is of type "rgmii-id", as all other connection types are detected by
56-
hardware.
49+
- phy-connection-type : See ethernet.txt file in the same directory.
50+
This property is only really needed if the connection is of type
51+
"rgmii-id", as all other connection types are detected by hardware.
5752
- fsl,magic-packet : If present, indicates that the hardware supports
5853
waking up via magic packet.
5954
- bd-stash : If present, indicates that the hardware supports stashing

Documentation/devicetree/bindings/net/lpc-eth.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ Required properties:
66
- interrupts: Should contain ethernet controller interrupt
77

88
Optional properties:
9-
- phy-mode: String, operation mode of the PHY interface.
10-
Supported values are: "mii", "rmii" (default)
9+
- phy-mode: See ethernet.txt file in the same directory. If the property is
10+
absent, "rmii" is assumed.
1111
- use-iram: Use LPC32xx internal SRAM (IRAM) for DMA buffering
12-
- local-mac-address : 6 bytes, mac address
1312

1413
Example:
1514

Documentation/devicetree/bindings/net/macb.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@ Required properties:
88
the Cadence GEM, or the generic form: "cdns,gem".
99
- reg: Address and length of the register set for the device
1010
- interrupts: Should contain macb interrupt
11-
- phy-mode: String, operation mode of the PHY interface.
12-
Supported values are: "mii", "rmii", "gmii", "rgmii".
11+
- phy-mode: See ethernet.txt file in the same directory.
1312
- clock-names: Tuple listing input clock names.
1413
Required elements: 'pclk', 'hclk'
1514
Optional elements: 'tx_clk'
1615
- clocks: Phandles to input clocks.
1716

18-
Optional properties:
19-
- local-mac-address: 6 bytes, mac address
20-
2117
Examples:
2218

2319
macb0: ethernet@fffc4000 {

Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ Required properties:
44
- compatible: should be "marvell,armada-370-neta".
55
- reg: address and length of the register set for the device.
66
- interrupts: interrupt for the device
7-
- phy: A phandle to a phy node defining the PHY address (as the reg
8-
property, a single integer).
9-
- phy-mode: The interface between the SoC and the PHY (a string that
10-
of_get_phy_mode() can understand)
7+
- phy: See ethernet.txt file in the same directory.
8+
- phy-mode: See ethernet.txt file in the same directory
119
- clocks: a pointer to the reference clock for this device.
1210

1311
Example:

Documentation/devicetree/bindings/net/marvell-orion-net.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Required port properties:
3636
"marvell,kirkwood-eth-port".
3737
- reg: port number relative to ethernet controller, shall be 0, 1, or 2.
3838
- interrupts: port interrupt.
39-
- local-mac-address: 6 bytes MAC address.
39+
- local-mac-address: See ethernet.txt file in the same directory.
4040

4141
Optional port properties:
4242
- marvell,tx-queue-size: size of the transmit ring buffer.
@@ -48,7 +48,7 @@ Optional port properties:
4848

4949
and
5050

51-
- phy-handle: phandle reference to ethernet PHY.
51+
- phy-handle: See ethernet.txt file in the same directory.
5252

5353
or
5454

Documentation/devicetree/bindings/net/micrel-ks8851.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ Required properties:
44
- compatible = "micrel,ks8851-ml" of parallel interface
55
- reg : 2 physical address and size of registers for data and command
66
- interrupts : interrupt connection
7-
8-
Optional properties:
9-
- local-mac-address : Ethernet mac address to use

Documentation/devicetree/bindings/net/smsc-lan91c111.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Required properties:
66
- interrupts : interrupt connection
77

88
Optional properties:
9-
- phy-device : phandle to Ethernet phy
10-
- local-mac-address : Ethernet mac address to use
9+
- phy-device : see ethernet.txt file in the same directory
1110
- reg-io-width : Mask of sizes (in bytes) of the IO accesses that
1211
are supported on the device. Valid value for SMSC LAN91c111 are
1312
1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning

Documentation/devicetree/bindings/net/smsc911x.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ Required properties:
66
- interrupts : Should contain SMSC LAN interrupt line
77
- interrupt-parent : Should be the phandle for the interrupt controller
88
that services interrupts for this device
9-
- phy-mode : String, operation mode of the PHY interface.
10-
Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
11-
"rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi", "smii".
9+
- phy-mode : See ethernet.txt file in the same directory
1210

1311
Optional properties:
1412
- reg-shift : Specify the quantity to shift the register offsets by
@@ -23,7 +21,6 @@ Optional properties:
2321
external PHY
2422
- smsc,save-mac-address : Indicates that mac address needs to be saved
2523
before resetting the controller
26-
- local-mac-address : 6 bytes, mac address
2724

2825
Examples:
2926

Documentation/devicetree/bindings/net/stmmac.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ Required properties:
1010
- interrupt-names: Should contain the interrupt names "macirq"
1111
"eth_wake_irq" if this interrupt is supported in the "interrupts"
1212
property
13-
- phy-mode: String, operation mode of the PHY interface.
14-
Supported values are: "mii", "rmii", "gmii", "rgmii".
13+
- phy-mode: See ethernet.txt file in the same directory.
1514
- snps,reset-gpio gpio number for phy reset.
1615
- snps,reset-active-low boolean flag to indicate if phy reset is active low.
1716
- snps,reset-delays-us is triplet of delays
@@ -28,12 +27,10 @@ Required properties:
2827
ignored if force_thresh_dma_mode is set.
2928

3029
Optional properties:
31-
- mac-address: 6 bytes, mac address
3230
- resets: Should contain a phandle to the STMMAC reset signal, if any
3331
- reset-names: Should contain the reset signal name "stmmaceth", if a
3432
reset phandle is given
35-
- max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather
36-
than the maximum frame size.
33+
- max-frame-size: See ethernet.txt file in the same directory
3734

3835
Examples:
3936

0 commit comments

Comments
 (0)