Hannes Schmelzer | db40c1a | 2017-03-23 15:11:43 +0100 | [diff] [blame] | 1 | Fixed link Device Tree binding |
| 2 | ------------------------------ |
| 3 | |
| 4 | Some Ethernet MACs have a "fixed link", and are not connected to a |
| 5 | normal MDIO-managed PHY device. For those situations, a Device Tree |
| 6 | binding allows to describe a "fixed link". |
| 7 | |
Bin Meng | 1c196b3 | 2021-03-14 20:14:45 +0800 | [diff] [blame] | 8 | Note there are two ways to describe a fixed PHY attached to an |
| 9 | Ethernet device: |
Hannes Schmelzer | db40c1a | 2017-03-23 15:11:43 +0100 | [diff] [blame] | 10 | |
Bin Meng | 1c196b3 | 2021-03-14 20:14:45 +0800 | [diff] [blame] | 11 | - The new DT binding, where 'fixed-link' is a sub-node of the Ethernet |
| 12 | MAC device node, with the following properties: |
| 13 | |
| 14 | * 'speed' (integer, mandatory), to indicate the link speed. Accepted |
| 15 | values are 10, 100 and 1000 |
| 16 | * 'full-duplex' (boolean, optional), to indicate that full duplex is |
| 17 | used. When absent, half duplex is assumed. |
| 18 | * 'pause' (boolean, optional), to indicate that pause should be |
| 19 | enabled. |
| 20 | * 'asym-pause' (boolean, optional), to indicate that asym_pause should |
| 21 | be enabled. |
| 22 | |
| 23 | - The old DT binding, where 'fixed-link' is a property with 5 cells |
| 24 | encoding various information about the fixed PHY, in the form of |
| 25 | <phy_id, full-duplex, speed, pause, asym-pause>. |
| 26 | |
| 27 | * 'phy_id', emulated PHY ID, choose any but unique to the all specified |
| 28 | fixed-links. Note U-Boot deliberately ignores the 'phy_id' and |
| 29 | unconditionally uses PHY_FIXED_ID. |
| 30 | * 'full-duplex', 0 for half duplex or 1 for full duplex |
| 31 | * 'speed', link speed in Mbits/sec, accepts only 10, 100 and 1000 |
| 32 | * 'pause', 0 for no pause, 1 for pause |
| 33 | * 'asym-pause', 0 for no asymmetric pause, 1 for asymmetric pause |
Hannes Schmelzer | db40c1a | 2017-03-23 15:11:43 +0100 | [diff] [blame] | 34 | |
| 35 | Examples: |
| 36 | |
Bin Meng | 1c196b3 | 2021-03-14 20:14:45 +0800 | [diff] [blame] | 37 | The new binding: |
| 38 | |
Hannes Schmelzer | db40c1a | 2017-03-23 15:11:43 +0100 | [diff] [blame] | 39 | ethernet@0 { |
| 40 | ... |
| 41 | fixed-link { |
| 42 | speed = <1000>; |
| 43 | full-duplex; |
| 44 | }; |
| 45 | ... |
| 46 | }; |
Bin Meng | 1c196b3 | 2021-03-14 20:14:45 +0800 | [diff] [blame] | 47 | |
| 48 | The old binding: |
| 49 | |
| 50 | ethernet@0 { |
| 51 | ... |
| 52 | fixed-link = <0 1 1000 0 0>; |
| 53 | ... |
| 54 | }; |