]> Git Repo - linux.git/commitdiff
dt-bindings: net: dsa: make phylink bindings required for CPU/DSA ports
authorVladimir Oltean <[email protected]>
Thu, 18 Aug 2022 11:54:56 +0000 (14:54 +0300)
committerJakub Kicinski <[email protected]>
Tue, 23 Aug 2022 00:45:46 +0000 (17:45 -0700)
It is desirable that new DSA drivers are written to expect that all
their ports register with phylink, and not rely on the DSA core's
workarounds to skip this process.

To that end, DSA is being changed to warn existing drivers when such DT
blobs are in use, and to opt new drivers out of the workarounds.

Introduce another layer of validation in the DSA DT schema, and assert
that CPU and DSA ports must have phylink-related properties present.

Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Vladimir Oltean <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Documentation/devicetree/bindings/net/dsa/dsa-port.yaml

index 09317e16cb5dbde4e792a17ef90c37e60c9bcd5c..10ad7e71097b57d7fa08bc58004b35423ff4b640 100644 (file)
@@ -76,6 +76,23 @@ properties:
 required:
   - reg
 
+# CPU and DSA ports must have phylink-compatible link descriptions
+if:
+  oneOf:
+    - required: [ ethernet ]
+    - required: [ link ]
+then:
+  allOf:
+    - required:
+        - phy-mode
+    - oneOf:
+        - required:
+            - fixed-link
+        - required:
+            - phy-handle
+        - required:
+            - managed
+
 additionalProperties: true
 
 ...
This page took 0.047154 seconds and 4 git commands to generate.