Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sergei Shtylyov and committed by
David S. Miller
e8f08ee0 6df3efcc

+53 -85
+1 -5
Documentation/devicetree/bindings/net/allwinner,sun4i-emac.txt
··· 5 5 "allwinner,sun4i-emac") 6 6 - reg: address and length of the register set for the device. 7 7 - 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. 10 9 - clocks: A phandle to the reference clock for this device 11 - 12 - Optional properties: 13 - - (local-)mac-address: mac address to be used by this driver 14 10 15 11 Example: 16 12
+2 -9
Documentation/devicetree/bindings/net/arc_emac.txt
··· 6 6 - interrupts: Should contain the EMAC interrupts 7 7 - clock-frequency: CPU frequency. It is needed to calculate and set polling 8 8 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. 15 11 16 12 Child nodes of the driver are the individual PHY devices connected to the 17 13 MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. 18 - 19 - Optional properties: 20 - - mac-address: 6 bytes, mac address 21 14 22 15 Examples: 23 16
+3 -6
Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt
··· 7 7 - interrupts: must be two cells, the first cell is the general purpose 8 8 interrupt line, while the second cell is the interrupt for the ring 9 9 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 13 11 - address-cells: should be 1 14 12 - size-cells: should be 1 15 13 ··· 18 20 - clock-names: When provided, names of the functional clock phandles, first 19 21 name should be "enet" and second should be "enet-wol". 20 22 21 - - phy-handle: A phandle to a phy node defining the PHY address (as the reg 22 - property, a single integer), used to describe configurations where a PHY 23 - (internal or external) is used. 23 + - phy-handle: See ethernet.txt file in the same directory; used to describe 24 + configurations where a PHY (internal or external) is used. 24 25 25 26 - fixed-link: When the GENET interface is connected to a MoCA hardware block or 26 27 when operating in a RGMII to RGMII type of connection, or when the MDIO bus is
+1 -6
Documentation/devicetree/bindings/net/cavium-mix.txt
··· 18 18 - interrupts: Two interrupt specifiers. The first is the MIX 19 19 interrupt routing and the second the routing for the AGL interrupts. 20 20 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. 27 22 28 23 Example: 29 24 ethernet@1070000100800 {
+1 -6
Documentation/devicetree/bindings/net/cavium-pip.txt
··· 35 35 36 36 - reg: The port number within the interface group. 37 37 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. 44 39 45 40 Example: 46 41
+1 -5
Documentation/devicetree/bindings/net/cdns-emac.txt
··· 6 6 or the generic form: "cdns,emac". 7 7 - reg: Address and length of the register set for the device 8 8 - 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. 14 10 15 11 Examples: 16 12
+2 -3
Documentation/devicetree/bindings/net/cpsw.txt
··· 28 28 Slave Properties: 29 29 Required properties: 30 30 - 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 34 33 35 34 Optional properties: 36 35 - dual_emac_res_vlan : Specifies VID to be used to segregate the ports
-2
Documentation/devicetree/bindings/net/davicom-dm9000.txt
··· 9 9 - interrupts : interrupt specifier specific to interrupt controller 10 10 11 11 Optional properties: 12 - - local-mac-address : A bytestring of 6 bytes specifying Ethernet MAC address 13 - to use (from firmware or bootloader) 14 12 - davicom,no-eeprom : Configuration EEPROM is not available 15 13 - davicom,ext-phy : Use external PHY 16 14
+1 -2
Documentation/devicetree/bindings/net/davinci_emac.txt
··· 17 17 Miscellaneous Interrupt> 18 18 19 19 Optional properties: 20 - - phy-handle: Contains a phandle to an Ethernet PHY. 20 + - phy-handle: See ethernet.txt file in the same directory. 21 21 If absent, davinci_emac driver defaults to 100/FULL. 22 - - local-mac-address : 6 bytes, mac address 23 22 - ti,davinci-rmii-en: 1 byte, 1 means use RMII 24 23 - ti,davinci-no-bd-ram: boolean, does EMAC have BD RAM? 25 24
+25
Documentation/devicetree/bindings/net/ethernet.txt
··· 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.
+1 -4
Documentation/devicetree/bindings/net/fsl-fec.txt
··· 4 4 - compatible : Should be "fsl,<soc>-fec" 5 5 - reg : Address and length of the register set for the device 6 6 - 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 10 8 11 9 Optional properties: 12 - - local-mac-address : 6 bytes, mac address 13 10 - phy-reset-gpios : Should specify the gpio for phy reset 14 11 - phy-reset-duration : Reset duration in milliseconds. Should present 15 12 only if property "phy-reset-gpios" is available. Missing the property
+4 -9
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
··· 38 38 - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" 39 39 - compatible : Should be "gianfar" 40 40 - 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 43 41 - interrupts : For FEC devices, the first interrupt is the device's 44 42 interrupt. For TSEC and eTSEC devices, the first interrupt is 45 43 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. 48 45 - fixed-link : <a b c d e> where a is emulated phy id - choose any, 49 46 but unique to the all specified fixed-links, b is duplex - 0 half, 50 47 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no 51 48 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. 57 52 - fsl,magic-packet : If present, indicates that the hardware supports 58 53 waking up via magic packet. 59 54 - bd-stash : If present, indicates that the hardware supports stashing
+2 -3
Documentation/devicetree/bindings/net/lpc-eth.txt
··· 6 6 - interrupts: Should contain ethernet controller interrupt 7 7 8 8 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. 11 11 - use-iram: Use LPC32xx internal SRAM (IRAM) for DMA buffering 12 - - local-mac-address : 6 bytes, mac address 13 12 14 13 Example: 15 14
+1 -5
Documentation/devicetree/bindings/net/macb.txt
··· 8 8 the Cadence GEM, or the generic form: "cdns,gem". 9 9 - reg: Address and length of the register set for the device 10 10 - 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. 13 12 - clock-names: Tuple listing input clock names. 14 13 Required elements: 'pclk', 'hclk' 15 14 Optional elements: 'tx_clk' 16 15 - clocks: Phandles to input clocks. 17 - 18 - Optional properties: 19 - - local-mac-address: 6 bytes, mac address 20 16 21 17 Examples: 22 18
+2 -4
Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
··· 4 4 - compatible: should be "marvell,armada-370-neta". 5 5 - reg: address and length of the register set for the device. 6 6 - 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 11 9 - clocks: a pointer to the reference clock for this device. 12 10 13 11 Example:
+2 -2
Documentation/devicetree/bindings/net/marvell-orion-net.txt
··· 36 36 "marvell,kirkwood-eth-port". 37 37 - reg: port number relative to ethernet controller, shall be 0, 1, or 2. 38 38 - interrupts: port interrupt. 39 - - local-mac-address: 6 bytes MAC address. 39 + - local-mac-address: See ethernet.txt file in the same directory. 40 40 41 41 Optional port properties: 42 42 - marvell,tx-queue-size: size of the transmit ring buffer. ··· 48 48 49 49 and 50 50 51 - - phy-handle: phandle reference to ethernet PHY. 51 + - phy-handle: See ethernet.txt file in the same directory. 52 52 53 53 or 54 54
-3
Documentation/devicetree/bindings/net/micrel-ks8851.txt
··· 4 4 - compatible = "micrel,ks8851-ml" of parallel interface 5 5 - reg : 2 physical address and size of registers for data and command 6 6 - interrupts : interrupt connection 7 - 8 - Optional properties: 9 - - local-mac-address : Ethernet mac address to use
+1 -2
Documentation/devicetree/bindings/net/smsc-lan91c111.txt
··· 6 6 - interrupts : interrupt connection 7 7 8 8 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 11 10 - reg-io-width : Mask of sizes (in bytes) of the IO accesses that 12 11 are supported on the device. Valid value for SMSC LAN91c111 are 13 12 1, 2 or 4. If it's omitted or invalid, the size would be 2 meaning
+1 -4
Documentation/devicetree/bindings/net/smsc911x.txt
··· 6 6 - interrupts : Should contain SMSC LAN interrupt line 7 7 - interrupt-parent : Should be the phandle for the interrupt controller 8 8 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 12 10 13 11 Optional properties: 14 12 - reg-shift : Specify the quantity to shift the register offsets by ··· 21 23 external PHY 22 24 - smsc,save-mac-address : Indicates that mac address needs to be saved 23 25 before resetting the controller 24 - - local-mac-address : 6 bytes, mac address 25 26 26 27 Examples: 27 28
+2 -5
Documentation/devicetree/bindings/net/stmmac.txt
··· 10 10 - interrupt-names: Should contain the interrupt names "macirq" 11 11 "eth_wake_irq" if this interrupt is supported in the "interrupts" 12 12 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. 15 14 - snps,reset-gpio gpio number for phy reset. 16 15 - snps,reset-active-low boolean flag to indicate if phy reset is active low. 17 16 - snps,reset-delays-us is triplet of delays ··· 27 28 ignored if force_thresh_dma_mode is set. 28 29 29 30 Optional properties: 30 - - mac-address: 6 bytes, mac address 31 31 - resets: Should contain a phandle to the STMMAC reset signal, if any 32 32 - reset-names: Should contain the reset signal name "stmmaceth", if a 33 33 reset phandle is given 34 - - max-frame-size: Maximum Transfer Unit (IEEE defined MTU), rather 35 - than the maximum frame size. 34 + - max-frame-size: See ethernet.txt file in the same directory 36 35 37 36 Examples: 38 37