From: "Jan Petrous (OSS)" With SGMII, the PCS is one of the SerDes XPCS instances. The MAC references its SerDes lane through phys, with the lane, the PHY type, the XPCS instance and the highest speed in the argument cells, and the SerDes node that provides the PCS through pcs-handle. The pcs-handle type comes from ethernet-controller.yaml. Only maxItems: 1 is added, as the MAC has a single PCS. phy-mode "sgmii" requires both properties, and each of them requires the other. Signed-off-by: Jan Petrous (OSS) --- .../devicetree/bindings/net/nxp,s32-dwmac.yaml | 30 +++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml index fcad2274302d..219a033b889d 100644 --- a/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/nxp,s32-dwmac.yaml @@ -15,7 +15,8 @@ description: The SoC series S32G2xx and S32G3xx feature one DWMAC instance, the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII interface over Pinctrl device or the output can be routed - to the embedded SerDes for SGMII connectivity. + to the embedded SerDes for SGMII connectivity, in which case the + SerDes lane is referenced via phys and the PCS via pcs-handle. The DWMAC instances have connected all RX/TX queues interrupts, enabling load balancing of data traffic across all CPU cores. @@ -81,6 +82,19 @@ properties: - const: rx - const: ptp_ref + pcs-handle: + maxItems: 1 + description: + phandle pointing to the SerDes node that provides the SGMII PCS for + this MAC. See + Documentation/devicetree/bindings/phy/nxp,s32g-serdes.yaml. + + phys: + maxItems: 1 + description: + The SerDes lane that carries the SGMII link, with the lane, the PHY + type, the XPCS instance and the highest speed in the argument cells. + power-domains: maxItems: 1 @@ -88,8 +102,22 @@ required: - clocks - clock-names +dependentRequired: + pcs-handle: [ phys ] + phys: [ pcs-handle ] + allOf: - $ref: snps,dwmac.yaml# + - if: + properties: + phy-mode: + const: sgmii + required: + - phy-mode + then: + required: + - pcs-handle + - phys unevaluatedProperties: false -- 2.55.0