Thread (19 messages) 19 messages, 3 authors, 7d ago

Re: [PATCH net-next v10 4/6] dt-bindings: net: rockchip-dwmac: document pcs-handle

flat view

From: Coia Prant <hidden>
Date: 2026-10-06 13:55:50
Also in: linux-arm-kernel, linux-devicetree, linux-rockchip, lkml

On October 6, 2026 9:48:02 PM GMT+08:00, Rob Herring [off-list ref] wrote:
On Tue, Oct 06, 2026 at 06:30:06AM +0800, Coia Prant wrote:
quoted
The Rockchip GMAC binding needs to describe the PCS reference used by
the SGMII support added later in this series. The property will be
parsed by rk_pcs_init(), and a missing phandle fails the probe. Add it
and require it when phy-mode is "sgmii" on rockchip,rk3568-gmac, the
only SoC in this binding that has SGMII support.

Signed-off-by: Coia Prant <redacted>
---
 .../bindings/net/rockchip-dwmac.yaml           | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
index 80c252845349c..bb7540e838033 100644
--- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml
@@ -120,6 +120,12 @@ properties:
     maximum: 0x7F
     default: 0x10
 
+  pcs-handle:
+    description:
+      Specifies a reference to a node representing the PCS device
+      connected to this GMAC. Required when phy-mode is "sgmii".
+    maxItems: 1
+
   phy-supply:
     description: PHY regulator
 
@@ -159,6 +165,18 @@ allOf:
         clocks:
           minItems: 5
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3568-gmac
+        phy-mode:
+          contains:
+            const: sgmii
The 'if' will also be true if 'phy-mode' is not present. Probably not 
what you want? You need 'required: [ phy-mode ]'.

Rob
Hi Rob,

Right, thanks. Without 'required: [ phy-mode ]' the 'if' matches whenever
the compatible matches, even if phy-mode is absent. I'll add it and send
a respin.

Thanks,
Coia
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help