Commit 045d0501 authored by Sean Anderson's avatar Sean Anderson Committed by David S. Miller

dt-bindings: net: fman: Add additional interface properties

At the moment, mEMACs are configured almost completely based on the
phy-connection-type. That is, if the phy interface is RGMII, it assumed
that RGMII is supported. For some interfaces, it is assumed that the
RCW/bootloader has set up the SerDes properly. This is generally OK, but
restricts runtime reconfiguration. The actual link state is never
reported.

To address these shortcomings, the driver will need additional
information. First, it needs to know how to access the PCS/PMAs (in
order to configure them and get the link status). The SGMII PCS/PMA is
the only currently-described PCS/PMA. Add the XFI and QSGMII PCS/PMAs as
well. The XFI (and 10GBASE-KR) PCS/PMA is a c45 "phy" which sits on the
same MDIO bus as SGMII PCS/PMA. By default they will have conflicting
addresses, but they are also not enabled at the same time by default.
Therefore, we can let the XFI PCS/PMA be the default when
phy-connection-type is xgmii. This will allow for
backwards-compatibility.

QSGMII, however, cannot work with the current binding. This is because
the QSGMII PCS/PMAs are only present on one MAC's MDIO bus. At the
moment this is worked around by having every MAC write to the PCS/PMA
addresses (without checking if they are present). This only works if
each MAC has the same configuration, and only if we don't need to know
the status. Because the QSGMII PCS/PMA will typically be located on a
different MDIO bus than the MAC's SGMII PCS/PMA, there is no fallback
for the QSGMII PCS/PMA.
Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00af103d
...@@ -85,9 +85,39 @@ properties: ...@@ -85,9 +85,39 @@ properties:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
description: A reference to the IEEE1588 timer description: A reference to the IEEE1588 timer
phys:
description: A reference to the SerDes lane(s)
maxItems: 1
phy-names:
items:
- const: serdes
pcsphy-handle: pcsphy-handle:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle-array
description: A reference to the PCS (typically found on the SerDes) minItems: 1
maxItems: 3
deprecated: true
description: See pcs-handle.
pcs-handle:
minItems: 1
maxItems: 3
description: |
A reference to the various PCSs (typically found on the SerDes). If
pcs-handle-names is absent, and phy-connection-type is "xgmii", then the first
reference will be assumed to be for "xfi". Otherwise, if pcs-handle-names is
absent, then the first reference will be assumed to be for "sgmii".
pcs-handle-names:
minItems: 1
maxItems: 3
items:
enum:
- sgmii
- qsgmii
- xfi
description: The type of each PCS in pcsphy-handle.
tbi-handle: tbi-handle:
$ref: /schemas/types.yaml#/definitions/phandle $ref: /schemas/types.yaml#/definitions/phandle
...@@ -100,6 +130,10 @@ required: ...@@ -100,6 +130,10 @@ required:
- fsl,fman-ports - fsl,fman-ports
- ptp-timer - ptp-timer
dependencies:
pcs-handle-names:
- pcs-handle
allOf: allOf:
- $ref: ethernet-controller.yaml# - $ref: ethernet-controller.yaml#
- if: - if:
...@@ -110,14 +144,6 @@ allOf: ...@@ -110,14 +144,6 @@ allOf:
then: then:
required: required:
- tbi-handle - tbi-handle
- if:
properties:
compatible:
contains:
const: fsl,fman-memac
then:
required:
- pcsphy-handle
unevaluatedProperties: false unevaluatedProperties: false
...@@ -138,8 +164,9 @@ examples: ...@@ -138,8 +164,9 @@ examples:
reg = <0xe8000 0x1000>; reg = <0xe8000 0x1000>;
fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>; fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
ptp-timer = <&ptp_timer0>; ptp-timer = <&ptp_timer0>;
pcsphy-handle = <&pcsphy4>; pcs-handle = <&pcsphy4>, <&qsgmiib_pcs1>;
phy-handle = <&sgmii_phy1>; pcs-handle-names = "sgmii", "qsgmii";
phy-connection-type = "sgmii"; phys = <&serdes1 1>;
phy-names = "serdes";
}; };
... ...
...@@ -320,8 +320,9 @@ For internal PHY device on internal mdio bus, a PHY node should be created. ...@@ -320,8 +320,9 @@ For internal PHY device on internal mdio bus, a PHY node should be created.
See the definition of the PHY node in booting-without-of.txt for an See the definition of the PHY node in booting-without-of.txt for an
example of how to define a PHY (Internal PHY has no interrupt line). example of how to define a PHY (Internal PHY has no interrupt line).
- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY. - For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY, - For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY.
PCS PHY addr must be '0'. The PCS PHY address should correspond to the value of the appropriate
MDEV_PORT.
EXAMPLE EXAMPLE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment