Thread (10 messages) 10 messages, 4 authors, 22d ago

Re: [PATCH net-next v2 1/3] dt-bindings: net: realtek,rtl9301-mdio: Add clock-frequency

From: netdev-bot+sashiko@kernel.org
Date: 2026-09-09 03:20:11
Also in: netdev

Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider:

Critical: 0 · High: 0 · Medium: 0 · Low: 1

- [Low] Concern (validated as a FALSE POSITIVE, retained only because
  requires_validation=true): the claim is that the new `clock-frequency`…

--

dt-bindings: net: realtek,rtl9301-mdio: Add clock-frequency

This documents a per-bus clock-frequency property for the Realtek Otto
switch MDIO controller, with a default of 2.5MHz and per-family enums of
the supported MDC rates. No clock reference is added because the setup
bits do not look like dividers of a known hardware clock.
quoted hunk ↗ jump to hunk
diff --git a/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml b/Documentation/devicetree/bindings/net/realtek,rtl9301-mdio.yaml
index 67e0b23a8470e..88502d017eedb 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
+
[Severity: Low]
This isn't a bug, just a note on ordering for anyone reading this patch
standalone: at this commit nothing in tree reads clock-frequency for this
binding, so on its own the property and the documented 2.5MHz default are
not yet implemented.

The consumer arrives later in the same series, in
drivers/net/mdio/mdio-realtek-rtl9300.c:otto_emdio_probe_one():

	if (of_property_read_u32(node, "clock-frequency", &freq))
		freq = 2500000;
	err = priv->info->set_bus_frequency(bus, freq);
	if (err)
		return dev_err_probe(dev, err, "cannot set frequency %u for MDIO bus %d\n",
				     freq, mdio_bus);

with per-family .set_bus_frequency callbacks whose accepted values match
the enums added below, so the schema and the driver agree once the whole
series is applied. Nothing to change here.
quoted hunk ↗ jump to hunk
     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]
[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260906081946.3499898-1-markus.stockhausen%40gmx.de
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help