From: sashiko-bot@kernel.org
To: "Jens Emil Schulz Østergaard" <jensemil.schulzostergaard@microchip.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH net-next v7 2/9] dt-bindings: net: lan9645x: add LAN9645X switch bindings
Date: Thu, 04 Jun 2026 07:26:42 +0000 [thread overview]
Message-ID: <20260604072643.5E5D51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603-dsa_lan9645x_switch_driver_base-v7-2-b2f90e676707@microchip.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema's patternProperties regex `^ethernet-port@[0-8]$` is too restrictive, allowing node names like `port@X` to bypass switch-specific port constraints.
- [Medium] The binding enforces a fixed 2000ps internal delay and uses `phy-mode = "rgmii"` in the example, which explicitly violates the core Ethernet controller DT guidelines.
--
commit 8516a555bd26f4b1d70ac6a8947c1ce165b314b8
Author: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
dt-bindings: net: lan9645x: add LAN9645X switch bindings
This commit adds device tree bindings for the LAN9645X multi-port Gigabit
AVB/TSN Ethernet switch. It uses a fallback compatible for the smallest SKU,
microchip,lan96455s-switch.
> diff --git a/Documentation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml b/Documentation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml
> new file mode 100644
> index 0000000000000..043fb48922b41
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml
[ ... ]
> + ethernet-ports:
> + type: object
> + patternProperties:
> + "^ethernet-port@[0-8]$":
[Severity: Medium]
Will this restrictive pattern allow node names like port@X to bypass the
switch-specific port constraints defined here?
The base schema dsa.yaml allows switch ports to be named either port@X or
ethernet-port@X. By restricting this regex, a port@X node would be valid
under dsa.yaml but fail to match this block, bypassing the internal delay
constraints and the unevaluatedProperties check.
Could this be updated to "^(ethernet-)?port@[0-8]$" to match the base
schema?
> + type: object
> + description: Ethernet switch ports
> +
> + $ref: dsa-port.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + rx-internal-delay-ps:
> + const: 2000
> +
> + tx-internal-delay-ps:
> + const: 2000
[Severity: Medium]
Does forcing these delays to a hardcoded 2000ps violate the core Ethernet
controller guidelines?
Enforcing a constant 2000 requires every device tree to include this as
redundant boilerplate. Typically, a full 2ns delay should be handled
implicitly by the driver when using an internal-delay phy-mode, using
explicit delay properties only for sub-nanosecond fine-tuning.
[ ... ]
> + ethernet-port@7 {
> + reg = <7>;
> + phy-mode = "rgmii";
> + ethernet = <&cpu_host_port>;
> + rx-internal-delay-ps = <2000>;
> + tx-internal-delay-ps = <2000>;
[Severity: Medium]
Is this example combining phy-mode = "rgmii" with 2000ps internal MAC
delays allowed by the networking device tree guidelines?
The ethernet-controller.yaml explicitly rejects this pattern, stating that
a value of 2000ps and a phy-mode of "rgmii" is invalid. If the MAC provides
the full 2ns delay, the interface is functionally operating in an
internal-delay mode, and phy-mode = "rgmii-id" should be used instead.
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + pause;
> + };
> + };
> + };
> + };
> +...
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603-dsa_lan9645x_switch_driver_base-v7-0-b2f90e676707@microchip.com?part=2
next prev parent reply other threads:[~2026-06-04 7:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 7:25 [PATCH net-next v7 0/9] net: dsa: add DSA support for the LAN9645x switch chip family Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 1/9] net: dsa: add tag driver for LAN9645X Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 2/9] dt-bindings: net: lan9645x: add LAN9645X switch bindings Jens Emil Schulz Østergaard
2026-06-04 7:26 ` sashiko-bot [this message]
2026-06-03 7:25 ` [PATCH net-next v7 3/9] net: dsa: lan9645x: add autogenerated register macros Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 4/9] net: dsa: lan9645x: add basic dsa driver for LAN9645X Jens Emil Schulz Østergaard
2026-06-03 12:37 ` Andrew Lunn
2026-06-04 7:26 ` sashiko-bot
2026-06-03 7:25 ` [PATCH net-next v7 5/9] net: dsa: lan9645x: add bridge support Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 6/9] net: dsa: lan9645x: add vlan support Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 7/9] net: dsa: lan9645x: add mac table integration Jens Emil Schulz Østergaard
2026-06-04 7:26 ` sashiko-bot
2026-06-03 7:25 ` [PATCH net-next v7 8/9] net: dsa: lan9645x: add mdb management Jens Emil Schulz Østergaard
2026-06-03 7:25 ` [PATCH net-next v7 9/9] net: dsa: lan9645x: add port statistics Jens Emil Schulz Østergaard
2026-06-04 7:26 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260604072643.5E5D51F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jensemil.schulzostergaard@microchip.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox