Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 1 | * TSEC-compatible ethernet nodes |
| 2 | |
| 3 | Properties: |
| 4 | |
Hou Zhiqiang | 5966b6d | 2020-07-16 18:09:14 +0800 | [diff] [blame] | 5 | - compatible : Should be "fsl,etsec2" or "gianfar" |
Bin Meng | ef4f7e3 | 2021-03-14 20:15:00 +0800 | [diff] [blame] | 6 | - reg : Offset and length of the register set for the device. If this is |
| 7 | missing, a subnode with a name prefix "queue-group" must be provided to |
| 8 | provide the <reg> property. |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 9 | - phy-handle : See ethernet.txt file in the same directory. |
| 10 | - phy-connection-type : See ethernet.txt file in the same directory. This |
| 11 | property is only really needed if the connection is of type "rgmii-id", |
| 12 | "rgmii-rxid" and "rgmii-txid" as all other connection types are detected |
| 13 | by hardware. |
Bin Meng | ef4f7e3 | 2021-03-14 20:15:00 +0800 | [diff] [blame] | 14 | - ranges : an <empty> value if subnode "queue-group" is present, specifying |
| 15 | that no address translation is required between them TSEC parent node and |
| 16 | the child "queue-group" node. |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 17 | |
| 18 | Example: |
| 19 | ethernet@24000 { |
Hou Zhiqiang | 27c2470 | 2020-05-03 22:48:41 +0800 | [diff] [blame] | 20 | compatible = "fsl,etsec2"; |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 21 | reg = <0x24000 0x1000>; |
| 22 | phy-handle = <&phy0>; |
| 23 | phy-connection-type = "sgmii"; |
| 24 | }; |
| 25 | |
Bin Meng | ef4f7e3 | 2021-03-14 20:15:00 +0800 | [diff] [blame] | 26 | An alternate description with "queue-group" subnode example: |
| 27 | ethernet@24000 { |
| 28 | compatible = "fsl,etsec2"; |
| 29 | phy-handle = <&phy0>; |
| 30 | phy-connection-type = "sgmii"; |
| 31 | ranges; |
| 32 | |
| 33 | queue-group { |
| 34 | reg = <0x24000 0x1000>; |
| 35 | }; |
| 36 | }; |
| 37 | |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 38 | Child nodes of the TSEC controller are typically the individual PHY devices |
| 39 | connected via the MDIO bus (sometimes the MDIO bus controller is separate). |
| 40 | |
| 41 | * MDIO IO device |
| 42 | |
| 43 | The MDIO is a bus to which the PHY devices are connected. For each |
| 44 | device that exists on this bus, a PHY node should be created. |
| 45 | |
| 46 | Required properties: |
| 47 | - compatible : Should define the compatible device type for the |
Vladimir Oltean | 7c043ea | 2019-07-19 00:29:58 +0300 | [diff] [blame] | 48 | mdio. Currently supported string/device is "fsl,etsec2-mdio". |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 49 | - reg : Offset and length of the register set for the device |
| 50 | |
| 51 | Example: |
| 52 | |
| 53 | mdio@24520 { |
Vladimir Oltean | 7c043ea | 2019-07-19 00:29:58 +0300 | [diff] [blame] | 54 | compatible = "fsl,etsec2-mdio"; |
Bin Meng | a8ccf75 | 2016-01-11 22:41:23 -0800 | [diff] [blame] | 55 | reg = <0x24520 0x20>; |
| 56 | |
| 57 | ethernet-phy@0 { |
| 58 | reg = <0>; |
| 59 | }; |
| 60 | }; |
Bin Meng | 74314f1 | 2016-01-11 22:41:25 -0800 | [diff] [blame] | 61 | |
| 62 | * TBI Internal MDIO bus |
| 63 | |
| 64 | As of this writing, every tsec is associated with an internal TBI PHY. |
| 65 | This PHY is accessed through the local MDIO bus. These buses are defined |
| 66 | similarly to the mdio buses. The TBI PHYs underneath them are similar to |
| 67 | normal PHYs, but the reg property is considered instructive, rather than |
| 68 | descriptive. The reg property should be chosen so it doesn't interfere |
| 69 | with other PHYs on the bus. The TBI PHYs are referred to by a "tbi-handle" |
| 70 | property under the tsec node, which has a similar meaning of "phy-handle". |
| 71 | |
| 72 | Example: |
| 73 | ethernet@24000 { |
| 74 | phy-handle = <&tbi1>; |
| 75 | }; |
| 76 | |
| 77 | mdio@24520 { |
| 78 | tbi1: tbi-phy@1f { |
| 79 | reg = <0x1f>; |
| 80 | }; |
| 81 | }; |