Thread (10 messages) flat view 10 messages, 3 authors, 9d ago

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

From: sashiko-bot@kernel.org
Date: 2026-09-04 12:22:01

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The `clock-frequency` property in the device tree schema is missing required hardware bounds constraints.
--

commit 740105b9d636a18be6fb1810649547d948475058
Author: Markus Stockhausen [off-list ref]

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

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.
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..6db3315ce96b3 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]
Does this schema definition lack the required bounds constraints for the clock
frequency?

The commit message explicitly states the hardware supports MDC speeds ranging
from 1.25MHz to 10MHz. However, without bounds constraints like minimum and
maximum or an enum array, dt_binding_check will successfully validate device
trees that specify physically impossible clock frequencies.

If a device tree author sets an out-of-range clock-frequency (such as 200MHz)
in a DTS file under patternProperties:^mdio-bus@[0-3]$, schema validation will
incorrectly pass.

Should this property definition enforce the physical hardware constraints with
minimum: 1250000 and maximum: 10000000 (or a predefined enum list) to
accurately enforce the described limitations?
     required:
       - reg
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260903122119.2638354-1-markus.stockhausen@gmx.de?part=1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help