The Realtek Otto Switch ethernet MDIO controller supports different MDC
speeds ranging from 1.25MHz to 10MHz. Document the clock-frequency
attribute for the device tree.
There is neither an official documentation nor any obvious registers that
indicate a dependency to one of the hardware clocks. The usable setup bits
are more like hardcoded values than dividers. Without further details do
not add a clock reference.
Signed-off-by: Markus Stockhausen <redacted>
---
.../bindings/net/realtek,rtl9301-mdio.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml b/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml
index 67e0b23a8470..88502d017eed 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml
@@ -56,6 +56,9 @@ patternProperties:
reg:
maxItems: 1
+ clock-frequency:
+ default: 2500000
+
required:
- reg
@@ -71,6 +74,43 @@ required:
- compatible
- reg
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - realtek,rtl8380-mdio
+ - realtek,rtl8381-mdio
+ - realtek,rtl8382-mdio
+ then:
+ patternProperties:
+ '^mdio-bus@[0-3]$':
+ properties:
+ clock-frequency:
+ enum: [2500000, 10000000]
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - realtek,rtl8391-mdio
+ - realtek,rtl8392-mdio
+ - realtek,rtl8393-mdio
+ - realtek,rtl9301-mdio
+ - realtek,rtl9302b-mdio
+ - realtek,rtl9302c-mdio
+ - realtek,rtl9303-mdio
+ - realtek,rtl9311-mdio
+ - realtek,rtl9312-mdio
+ - realtek,rtl9313-mdio
+ then:
+ patternProperties:
+ '^mdio-bus@[0-3]$':
+ properties:
+ clock-frequency:
+ enum: [1250000, 2500000, 5000000]
+
unevaluatedProperties: false
examples:
--
2.55.0