๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26221

Re: [PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224

#26221
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 08:57
123 lines
12262 bytes
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
Technical Details
Message-ID: <179628825219.3146.277687759104219817@kernel.org>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376416-linux-kernel-netdev=dewy.ru
References: <20261202084022.3716891-5-kyle.switch@motor-comm.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376416-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224
Date: Thu, 03 Dec 2026 08:57:32 +0000
Organization: Usenet Network
Message-ID: <179628825219.3146.277687759104219817@kernel.org>
References: <20261202084022.3716891-5-kyle.switch@motor-comm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2441221"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:jR7GvVgowRpkegBoCYy9gxuYFsc= sha256:m7XyNjj0bw0fksovoEgmjA5rK+sjhXAXEyd9RvOXwek=
	sha1:lBM6CXJDNXvhRfkEWw1IcBSUD1c= sha256:w1eWVAudpLezhWQOw6QWxiDDKBrVEgvxbLWsWsOelKs=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id EBE8D11787E; Thu,  3 Dec 2026 11:57:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id uMs9vaMuK6iG;
	Thu,  3 Dec 2026 11:57:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376416-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 7CC0E11788A; Thu,  3 Dec 2026 11:57:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4F7E026200; Thu,  3 Dec 2026 08:57:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796288254;
	b=TugAgD19yTmHUMQVXjV9yjTh7VFaNNq0xiQVyjG74kW6nGnybAk82+325Wb2tWiKdZT/
	 +sE6X8mqxGWDUnzToZHcC4TBpgSBicupX4zWoZ8e8wuTkO2+YnO0CnT/KIhCX74KCP5xt
	 B0B/PO6uAnjobaqxpH8XHQkYfBQXCrlYFYVB58IctsvnEAxBnDlnCzJqNC4KCh53euicy
	 3hIDr27RUHMgKmNh4c4Z+KmDYL5gNO0gWv6ZlMzrt4p/QJy1d5Ckv4KGF8afWx0z+SjFe
	 cQOT+g+PwQ/ZPFQIl+dhQpym6aNjuU0WMzwcvqTmJr0xgYa9TeU4kcWtQ1W66tIzTqw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796288254;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=xuNJsq5UPIo4aR7kj2wEeowtVZrsa/1ClftfhiyX+9s=;
	b=vh+67GfQ9pDJFWGySG8V7+p1kE+jNoixz6YAASrSZXK7iY63JnkcPdxUsPhNg90bsFKI
	 bjlSknAR3KgvyMpdfkCNzLkT1cI2hrLZy81AfVI5V5PAwmf+FRAh5hpuKKuUyaPDikyE8
	 51wnyEWsPmKyitHBd3PkEmG7OkqnaNoviwtk9q5H1e1QYHxnoqwD7fJ858IRm/lGU1ej9
	 kyLAA9MCr1i+/V8Y9slkMPhPntv5YdaDcudgs7ccbkj4+Ua2BUzy70ZpCKzNM6DqBOpD7
	 bt7iyjo1ASRyrUERC4PBpCP33ZzwTi7Gnro9frPtGOA4HwH2aQHaRIqDKIVb1bIQjGA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bQVp4Gwd;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id BB994606A33F;
	Thu,  3 Dec 2026 08:57:34 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bQVp4Gwd
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796288253;
	b=xWmyS3/99wQjAOjV/lYb3/mxY39kWlkpTg33nO1f5hLai9vuNg07MFTfKgqUhgZogY14
	 QyCtUF1a6/LfiQ9cSykkKIhm6uSVrVHzuOGIFb0zArIKGOtWqIRXqScjJN6pvEvS88y1N
	 +vmyFQmj7IqBaczF+qETDSqujOPtl4s72p2cmJfbYAWW1eJu1IpCqXKY2hfBSwxhreSmy
	 oEqbWVidK36k0yYxo2W67axJAhOY2JhQWEdu8hB/N8eYKjCXvegPUELOPVhsraPJB2xtC
	 pIdHObjCBQnpNOmU35jAv6vkEBkznNWDL5V6m4RYgaiXQL5hKAKUpyL9rVHzUQ009wg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796288253;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=xuNJsq5UPIo4aR7kj2wEeowtVZrsa/1ClftfhiyX+9s=;
	b=Owu99J60f5JfINjBOc5LDUJQsyxX/BNh2/P1Jv3I2Rf1J9W9rqiQKxyLQM5h58onnh1k
	 aIlcv1koBR14D70eBh2sXAKSfBFyszXCh4A06VCeeZ/2LuaYgVeN9uTQxVvnfPqdPP1Vm
	 fvX/AwQjdoDanMvWEXoY8yOwEW9VunE64zMFBJg1npWNWNuMQ6hxo8DIy/f7qn2iutItU
	 aRcAMhyTiBXkVFyJyk3NPqZjilOs6VuCeVIzBqyezKltjc9HtSou1v5dG+9Q85SXXKkMQ
	 GB/CiktWXaJx8/Hq9VwdbBvv3qjKadInOmAs7Kc/QZL0zg9WklK/Ut3cFXohMEemFkw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bQVp4Gwd;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9361606A32D;
	Thu,  3 Dec 2026 08:57:33 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B8DB1F000C1;
	Thu,  3 Dec 2026 08:57:32 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796288253;
	bh=xuNJsq5UPIo4aR7kj2wEeowtVZrsa/1ClftfhiyX+9s=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=bQVp4GwdH0ySdxOHCzFM9PZBMP5uT6Gwm2e1cNI7WtzZ9AXcvId5zlWmwQmQxOcpO
	 kMQCSAh2vcZ+k0psd1kqCEr0PxUaSTiAqItbQ0t1fLhEOH/0bprHqHKncyvANDUuyL
	 JWw6xmrKhThuMDlQeHpyRMhmo4ZPJSIbVU0o5lgnWN/gTXgCQtG0OYgD/kaR8gQMlB
	 pQX33QLl1f0G9xmHWO0jlwJceGN6yLlQ8MFc01RZtgks9i8F6wIV2MAQM4+HzTSMbX
	 mv8mQtipGg48R4ealaMvNpvoM6fVqVVokDnAer0OlyFnMx+7N1Cof7GZpUdT1xY73K
	 LVoQAdfljF5jg==
X-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
X-In-Reply-To: <20261202084022.3716891-5-kyle.switch@motor-comm.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list