@@ -56,49 +56,51 @@ properties:
description:
Specifies interface type between the Ethernet device and a physical
layer (PHY) device.
- enum:
- # There is not a standard bus between the MAC and the PHY,
- # something proprietary is being used to embed the PHY in the
- # MAC.
- - internal
- - mii
- - gmii
- - sgmii
- - qsgmii
- - tbi
- - rev-mii
- - rmii
- - rev-rmii
-
- # RX and TX delays are added by the MAC when required
- - rgmii
-
- # RGMII with internal RX and TX delays provided by the PHY,
- # the MAC should not add the RX or TX delays in this case
- - rgmii-id
-
- # RGMII with internal RX delay provided by the PHY, the MAC
- # should not add an RX delay in this case
- - rgmii-rxid
-
- # RGMII with internal TX delay provided by the PHY, the MAC
- # should not add an TX delay in this case
- - rgmii-txid
- - rtbi
- - smii
- - xgmii
- - trgmii
- - 1000base-x
- - 2500base-x
- - 5gbase-r
- - rxaui
- - xaui
-
- # 10GBASE-KR, XFI, SFI
- - 10gbase-kr
- - usxgmii
- - 10gbase-r
- - 25gbase-r
+ minItems: 1
+ items:
+ enum:
+ # There is not a standard bus between the MAC and the PHY,
+ # something proprietary is being used to embed the PHY in the
+ # MAC.
+ - internal
+ - mii
+ - gmii
+ - sgmii
+ - qsgmii
+ - tbi
+ - rev-mii
+ - rmii
+ - rev-rmii
+
+ # RX and TX delays are added by the MAC when required
+ - rgmii
+
+ # RGMII with internal RX and TX delays provided by the PHY,
+ # the MAC should not add the RX or TX delays in this case
+ - rgmii-id
+
+ # RGMII with internal RX delay provided by the PHY, the MAC
+ # should not add an RX delay in this case
+ - rgmii-rxid
+
+ # RGMII with internal TX delay provided by the PHY, the MAC
+ # should not add an TX delay in this case
+ - rgmii-txid
+ - rtbi
+ - smii
+ - xgmii
+ - trgmii
+ - 1000base-x
+ - 2500base-x
+ - 5gbase-r
+ - rxaui
+ - xaui
+
+ # 10GBASE-KR, XFI, SFI
+ - 10gbase-kr
+ - usxgmii
+ - 10gbase-r
+ - 25gbase-r
phy-mode:
$ref: "#/properties/phy-connection-type"
Sometimes, an ethernet PHY may communicate with ethernet controller with different PHY connection types, and the software should be able to choose between them. Existing example is one SerDes lane capable of `1000base-x`, `2500base-x` and `sgmii` when connecting Marvell switches with Marvell ethernet controller. Currently we mention only one of these modes in device-tree, and software assumes the other modes are also supported, since they use the same SerDes lanes. But a board may be able to support `1000base-x` and not support `2500base-x`, for example due to the higher frequency not working correctly on a particular board. Another example is the Marvell 88X3310 PHY, which supports connecting the MAC with the PHY with `xaui` and `rxaui`. The MAC may also support both modes, but it is possible that a particular board doesn't have these modes wired (since they use multiple SerDes lanes). In order for the kernel to know which modes are supported on the board, we need to be able to specify them all in the device-tree. Change the property `phy-connection-type` of an ethernet controller to be an array of the enumerated strings, with at least one item defined, if the property is mentioned. Signed-off-by: Marek Behún <kabel@kernel.org> --- .../bindings/net/ethernet-controller.yaml | 88 ++++++++++--------- 1 file changed, 45 insertions(+), 43 deletions(-)