diff mbox series

[net-next,v5,1/2] dt-bindings: net: microchip,ksz: document microchip,rmii-clk-internal

Message ID 0ea1db6b2f2e93c3531645f98888775a4d3165d4.1700841353.git.ante.knezic@helmholz.de
State New
Headers show
Series net: dsa: microchip: enable setting rmii reference | expand

Commit Message

Ante Knezic Nov. 24, 2023, 4:01 p.m. UTC
Add documentation for selecting reference rmii clock on KSZ88X3 devices
Signed-off-by: Ante Knezic <ante.knezic@helmholz.de>
---
 .../devicetree/bindings/net/dsa/microchip,ksz.yaml | 38 +++++++++++++++++++++-
 1 file changed, 37 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
index b3029c64d0d5..3cebb9c9b1c8 100644
--- a/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/microchip,ksz.yaml
@@ -11,7 +11,6 @@  maintainers:
   - Woojung Huh <Woojung.Huh@microchip.com>
 
 allOf:
-  - $ref: dsa.yaml#/$defs/ethernet-ports
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
 
 properties:
@@ -78,6 +77,43 @@  required:
   - compatible
   - reg
 
+if:
+  not:
+    properties:
+      compatible:
+        enum:
+          - microchip,ksz8863
+          - microchip,ksz8873
+then:
+  $ref: dsa.yaml#/$defs/ethernet-ports
+else:
+  patternProperties:
+    "^(ethernet-)?ports$":
+      patternProperties:
+        "^(ethernet-)?port@[0-2]$":
+          $ref: dsa-port.yaml#
+          properties:
+            microchip,rmii-clk-internal:
+              $ref: /schemas/types.yaml#/definitions/flag
+              description:
+	        When ksz88x3 is acting as clock provier (via REFCLKO) it
+		can select between internal and external RMII reference
+		clock. Internal reference clock means that the clock for
+		the RMII of ksz88x3 is provided by the ksz88x3 internally
+		and the REFCLKI pin is unconnected. For the external
+		reference clock, the clock needs to be fed back to ksz88x3
+		via REFCLKI.
+		If microchip,rmii-clk-internal is set, ksz88x3 will provide
+		rmii reference clock internally, otherwise reference clock
+		should be provided externally.
+          if:
+            not:
+              required: [ ethernet ]
+          then:
+            properties:
+              microchip,rmii-clk-internal: false
+          unevaluatedProperties: false
+
 unevaluatedProperties: false
 
 examples: