Re: [PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224
From: netdev-bot+sashiko
Date: Thu Dec 03 2026 - 03:57:37 EST
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message's reasons for creating a separate
motorcomm,yt9224.yaml do not hold up, and the new file is a near-copy…
- [Low] The new motorcomm,yt9224.yaml drops the `reset-gpios` property
that its source binding motorcomm,yt921x.yaml defines (`reset-gpios:…
--
dt-bindings: net: dsa: add Motorcomm YT9224
This commit adds a standalone device tree binding, motorcomm,yt9224.yaml,
for the Motorcomm YT9224 switch. The chip has internal PHYs on ports 4-7
and SerDes on ports 0 and 8. The commit also adds the new file to the
existing YT921x MAINTAINERS entry.
> The YT9224 port layout differs from the YT921x family described by
> motorcomm,yt921x.yaml (internal PHYs on ports 0-7, SerDes on 8-9), so
> give it its own binding instead of extending the existing one. This
> also avoids the dt_binding_check failure caused by yt921x.yaml
> declaring compatible as a const for motorcomm,yt9215.
[Severity: Low]
Is this the right reason for a separate schema?
Neither schema describes a port layout. Both only reference
dsa.yaml#/$defs/ethernet-ports. Neither has patternProperties or reg limits
on the ethernet-port nodes.
motorcomm,yt921x.yaml already covers family members with quite different
port maps under one compatible. YT9213NB has PHYs on ports 1/3 and a GMAC
only on port 9. YT9218N has PHYs on ports 0-7 and no GMAC.
The driver also picks the port layout at runtime by chip ID, through the
yt921x_info table in drivers/net/dsa/motorcomm/chip.c, rather than from DT:
"YT9224", YT9224_MAJOR, 0, 0,
GENMASK(7, 4),
0,
BIT(8) | BIT(0),
On the dt_binding_check point, a new compatible is normally added by
changing this line in motorcomm,yt921x.yaml into an enum:
const: motorcomm,yt9215
Apart from that, the new file matches motorcomm,yt921x.yaml:
- the same reg enum
- the same mdio and mdio-external nodes and descriptions
- the same allOf reference
- unevaluatedProperties: false
- the same example layout
The only differences are the compatible, the description text and the
missing reset-gpios.
Could motorcomm,yt9224 be added to motorcomm,yt921x.yaml instead? If not,
could the commit message explain what the existing binding can't describe?
> diff --git a/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml
> new file mode 100644
> index 0000000000000..01b61b47d3726
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml
> @@ -0,0 +1,142 @@
[ ... ]
> +properties:
> + compatible:
> + const: motorcomm,yt9224
> +
> + reg:
> + enum: [0x0, 0x1d]
> +
> + mdio:
[ ... ]
> +allOf:
> + - $ref: dsa.yaml#/$defs/ethernet-ports
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/leds/common.h>
[Severity: Low]
Was reset-gpios meant to be dropped from this schema?
motorcomm,yt921x.yaml, which this file is based on, defines:
reset-gpios:
maxItems: 1
Its example also uses:
reset-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
This schema has no reset-gpios, and dsa.yaml#/$defs/ethernet-ports doesn't
add it either. With unevaluatedProperties: false, a board that wires the
YT9224 reset pin to a SoC GPIO can't describe it without failing
dt_binding_check and dtbs_check.
The example still includes dt-bindings/gpio/gpio.h and
dt-bindings/leds/common.h, but it doesn't use any GPIO or LED macro.
This suggests reset-gpios was removed by accident.
If the YT9224 has no reset input, could the commit message say so and the
unused includes be removed? Otherwise, should reset-gpios be restored?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261202084022.3716891-1-kyle.switch%40motor-comm.com