Netdev List
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: kyle.switch@motor-comm.com
Cc: andrew@lunn.ch, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	mmyangfl@gmail.com, horms@kernel.org, linux@armlinux.org.uk,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, david.laight.linux@gmail.com,
	ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com,
	jianmin.wang@motor-comm.com, wei.zhang@gl-inet.com,
	sijia.huang@gl-inet.com
Subject: Re: [PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224
Date: Thu, 03 Dec 2026 08:57:32 +0000	[thread overview]
Message-ID: <179628825219.3146.277687759104219817@kernel.org> (raw)
In-Reply-To: <20261202084022.3716891-5-kyle.switch@motor-comm.com>

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

  parent reply	other threads:[~2026-12-03  8:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02  8:40 [PATCH net-next v18 0/6] net: dsa: motorcomm: add support yt922x driver Kyle Switch
2026-12-02  8:40 ` [PATCH net-next v18 1/6] net: dsa: motorcomm: initialize dsa_switch based on chipid Kyle Switch
2026-12-03  8:57   ` netdev-bot+sashiko
2026-12-02  8:40 ` [PATCH net-next v18 2/6] net: dsa: motorcomm: use max_ports in series for port bounds checking Kyle Switch
2026-12-03  8:57   ` netdev-bot+sashiko
2026-12-02  8:40 ` [PATCH net-next v18 3/6] net: dsa: motorcomm: use GENMASK_U32() for mbus phy_mask Kyle Switch
2026-12-03  8:57   ` netdev-bot+sashiko
2026-12-02  8:40 ` [PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224 Kyle Switch
2026-12-02 22:58   ` Rob Herring (Arm)
2026-12-03  8:57   ` netdev-bot+sashiko [this message]
2026-12-02  8:40 ` [PATCH net-next v18 5/6] net: dsa: tag_yt922x: add support for Motorcomm YT922x tags Kyle Switch
2026-12-03  8:57   ` netdev-bot+sashiko
2026-12-02  8:40 ` [PATCH net-next v18 6/6] net: dsa: motorcomm: Add support for Motorcomm YT922x Kyle Switch
2026-12-03  8:57   ` netdev-bot+sashiko

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=179628825219.3146.277687759104219817@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=david.laight.linux@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jianmin.wang@motor-comm.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kyle.switch@motor-comm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ming.xu@motor-comm.com \
    --cc=mmyangfl@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sijia.huang@gl-inet.com \
    --cc=wei.zhang@gl-inet.com \
    --cc=xiaolin.xu@motor-comm.com \
    /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