🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16706

Re: [PATCH net-next v17 2/4] dt-bindings: net: dsa: add Microchip LAN9645x switch

#16706
From: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 16:42
159 lines
13531 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] Rob Herring's Reviewed-by is kept on the binding patch in Documen
  tation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml,…
- [Low] The schema does not actually limit port indexes to 0-8.
- [Low] The binding seems to leave out the register-based extraction
  interrupt.

--

dt-bindings: net: dsa: add Microchip LAN9645x switch

This adds a DT binding for the Microchip LAN9645x DSA switch family. The
SKU variants fall back to microchip,lan96455s-switch. The binding
describes 24 register targets through reg/reg-names, three interrupts and
the per-port RGMII internal delay constraints, and adds the file to
MAINTAINERS.

>     Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
>     Signed-off-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
>     Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
>
> ---
> Changes in v14:

[ ... ]

> - Describe all switch register targets in reg, and the analyzer and
>   PTP interrupts.

[ ... ]

> Changes in v12:
> - Remove Rob's Reviewed-by

[ ... ]

> - Describe the switch register targets in reg, with a matching reg-names,
>   following mscc,vsc7514-switch.yaml.

[Severity: Low]
Does Rob's Reviewed-by still apply to this version?

In v14, reg/reg-names becomes a fixed, ordered list of 24 targets. v14
also adds new interrupts and interrupt-names properties ("ptp", "ptp-ext",
"ana"). All of this is new DT ABI.

The v12 changelog dropped this tag for a similar reg/reg-names change.
Here the tag sits after the Signed-off-by, which suggests it was carried
over from an earlier posting.

Did Rob review v14? If not, should the tag be dropped so that the new
reg-names order and interrupt-names get DT maintainer review?

> 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..517bc4c00de30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml
> @@ -0,0 +1,208 @@

[ ... ]

> +  reg:
> +    items:
> +      - description: General configuration block target
> +      - description:
> +          CPU device queue system target, the register based frame injection
> +          and extraction interface

[ ... ]

> +  interrupts:
> +    items:
> +      - description: PTP timestamp ready interrupt
> +      - description: PTP synchronization interrupt from the PTP pins
> +      - description: Analyzer interrupt
> +
> +  interrupt-names:
> +    items:
> +      - const: ptp
> +      - const: ptp-ext
> +      - const: ana

[Severity: Low]
Is an interrupt for register-based extraction missing here?

The qs entry in reg is described as "the register based frame injection
and extraction interface". However, interrupts lists only ptp, ptp-ext and
ana, and there is no minItems.

The other bindings for this switch IP family all describe an xtr interrupt
next to the QS block:

  mscc,vsc7514-switch.yaml:      ptp_rdy, xtr, fdma
  microchip,lan966x-switch.yaml: xtr, fdma, ana, ptp, ptp-ext
  microchip,sparx5-switch.yaml:  xtr, fdma, ptp

The commit message names mscc,vsc7514-switch.yaml as the model. The driver
in this series also sets up manual extraction through QS_XTR_GRP_CFG(0) in
lan9645x_port_cpu_init().

If LAN9645x routes an xtr interrupt, how would this binding describe it?
Since the list is fixed, adding it later would need a fourth item plus
minItems: 3. I could not tell from the tree whether the hardware has a
separate xtr line, so this may be fine as it is.

> +  ethernet-ports:
> +    type: object
> +    additionalProperties: true
> +    patternProperties:
> +      "^(ethernet-)?port@[0-8]$":
> +        type: object
> +        description: Ethernet switch ports
> +        additionalProperties: true

[ ... ]

> +$ref: dsa.yaml#/$defs/ethernet-ports

[Severity: Low]
Does this actually limit port indexes to 0-8?

ethernet-ports has additionalProperties: true, so the local pattern only
constrains nodes that match it. The top-level $ref adds the broader
pattern from dsa.yaml:

Documentation/devicetree/bindings/net/dsa/dsa.yaml:
          "^(ethernet-)?port@[0-9a-f]+$":
            description: Ethernet switch ports
            $ref: dsa-port.yaml#
            unevaluatedProperties: false

So nodes such as ethernet-port@9 or ethernet-port@10 pass
dt_binding_check. They also skip the local RGMII rule that limits
rx/tx-internal-delay-ps to [0, 2000].

A DT like that only fails at probe time, in dsa_switch_parse_ports_of():

net/dsa/dsa.c:dsa_switch_parse_ports_of() {
    ...
		if (reg >= ds->num_ports) {
			dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n",
				port, reg, ds->num_ports);
			of_node_put(port);
			err = -EINVAL;
			goto out_put_node;
    ...
}

renesas,rzn1-a5psw.yaml, which this binding follows, has the same pattern.

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111-dsa_lan9645x_switch_driver_base-v17-0-83a471c5bddb%40microchip.com
Technical Details
Message-ID: <179476095646.2199510.9931492504412224156@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363769-linux-kernel-netdev=dewy.ru
References: <20261111-dsa_lan9645x_switch_driver_base-v17-2-83a471c5bddb@microchip.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363769-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v17 2/4] dt-bindings: net: dsa: add Microchip
 LAN9645x switch
Date: Sun, 15 Nov 2026 16:42:36 +0000
Organization: Usenet Network
Message-ID: <179476095646.2199510.9931492504412224156@kernel.org>
References: <20261111-dsa_lan9645x_switch_driver_base-v17-2-83a471c5bddb@microchip.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1852817"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:DTDOQS6J8SbqsRPmIibDyRRPj6Q= sha256:shYQDhMutkjxjfn9sQtyOSPfxWiZWRKaRkNTBxBbjjc=
	sha1:LFVPauHggJeusQDVZgxojbL9ZVg= sha256:Bbn+fQFh/pFOckghF2g3oKNsnparYDNXS6k+VKakexo=
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 E6596114A14; Sun, 15 Nov 2026 19:43:14 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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 Ol1-gQxZ8VFG;
	Sun, 15 Nov 2026 19:43:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363769-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 75D0D114A17; Sun, 15 Nov 2026 19:43:02 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 7D1B93D7EA; Sun, 15 Nov 2026 16:42:46 +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=1794760964;
	b=gPWVq7XjkNzMpjidvTdjbJ0nEU4x6wSzwu/OWIIgVXVrpLHW5/ZuVbmNDSIE/zuyCISn
	 eFPL4pq/bOcOTaSAhHb+mqYd6J3+YiJ0StQLiFaOjHSFUvqZql5vVDgDac+a4zG/5NVzJ
	 gQDbx7wme99TSZoNh7q1tpWkDJsvsZTEOX3KWuN8PgWuu4zA5pI+Ur0JPg/fZXWOtGawU
	 VmOO2+zqtXx6EZNloYfe629yC3xHYf0kpDpVI4msPE+Xh+zMdcr+o5BcAYjL4O0/MQdeY
	 I/hB8qtWIJ4d2PMphLFJRqSJ6aklSqQ/7sGWHhJ8ZEjlPOyr7lkN6DTfRoLtHMTxOSA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794760964;
	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=SKT44NERHrbeiUkH8IFwuUOsyFYZL/+SFv7p0N27XuU=;
	b=01Iw12ns4eqkBZ30eoPT7AwQhmrW309qpX+obtL1BKtLn6UoI10EWkY6/fe9PsQyHnTx
	 O7fQooK8z2TmLyJe0j6AXVNhX8XVCTa9d/2O7ANy+gPsaODAZHcFeUvasy77m/7NTBEBs
	 zXDrwDpngOtC19GJ/6FThTUQqXg/K+QQ/A7fLKCabMIV0ydSkKa3czDXLxNXZr83NKhAK
	 D3Fpbvo362xqMVsDLx7NN8oy4C/fMWyPzgRk0WIWO1cp33W+zE2Iz/p1tID02Xdzfk/og
	 rfQd9lcFTwO8dRd1Bs1oL6X1LtBC4qxfY8OdMI0/9bMhP1JUYaKwfoFWgSbj+ISk0hw==
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=eOdFwUnk;
	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 69538606A327;
	Sun, 15 Nov 2026 16:42:44 +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=eOdFwUnk
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=1794760958;
	b=qLFLTQ2129IdCQpUoYIXGrNP0NaUL481n0Flzo9NwiNZ5eOihO6jFpTn2HlGlduY9/e/
	 RwG4Q2mWTakYA1oZ0bd+L0Cdim7FGpbt+UxeNDLU5JyRafTJZUFO1Zaua0Tkm68Ea3IwS
	 S9yqZSmKNTd0aENzZ5WIKw1hnvX1R3JbBLIJFFn0bAoj3uO2NNW7Hxs5KvRefi8vfryUy
	 y61MUTkMW/4NUYl5aNrcCNdonVKdjoEdxNHgsTKRbo+kD8D7A9gO4Rx8ZMJN8F4FM5rcM
	 vVaNN/mF4mhuy+QVUIKjVO9TNtLogCes8pI3urNtGK4ylJypKcdf7THXckfZ2P63j0g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794760958;
	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=SKT44NERHrbeiUkH8IFwuUOsyFYZL/+SFv7p0N27XuU=;
	b=4jErt6a/D2DWnHvMId9HvskFWT7YqCDdSTsdKeg7JMvaE6c9bFsRiOl6lxMmHypfw7rD
	 YOLiMADEIsEZpcJuJlXdS1qrQ4IqTYEhozUzMx7tMR5Wsoh3iXsjYn2j878HkGGfVCWa1
	 pd9fAg1Ru3UCl8NMcMXeHnK7VHX6QgqimFfNDxanUaz1LmxGTfVTEiyy4ZdOCtMRG+NHQ
	 zCm/NC/5s3Ck0P3Qk8SltNs9IyPVXxd167BLruiEFMEZWKaIbvOh2yENL780jVW+smx0B
	 BRwxnogxq7XP172u7+tOK5Xufcc0PfmcVdtpeLfBqugr3TJZewCz/XlZ2RPaFJi4u8g==
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=eOdFwUnk;
	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 8816C606A329;
	Sun, 15 Nov 2026 16:42:38 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2D2C1F000C7;
	Sun, 15 Nov 2026 16:42:36 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794760958;
	bh=SKT44NERHrbeiUkH8IFwuUOsyFYZL/+SFv7p0N27XuU=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=eOdFwUnkinp7pD4T0EhYZE5hfW+BRu4bJKbxxvYRX/QFt4ToY8aFl8Mo9rq2xdjcc
	 nPoeud+wPqXQzdOGu1PPAHHdG3NYjQqbxIJdI6eKzG64DSkp5puyrT1PJDsc4mzmiT
	 g9t+tEbuJW7PaetNeKKIZyplOYEzH90ZqU6xYIaAmj4OgNSYnuzyA9eUYVdEglT7yK
	 uwhFVzBHWBkYDoNC1PbW9mv6Wd8eTqQHSopBx90eEEA7LLnnVgzFfpSZaBZCTkwGNV
	 QMA91KF3EUeCVT8iRxtJ132g3bqZJ/5/GOA58A9sAVl0Y5tX5ArIeD2txlb3U4AQc+
	 XjN7qA08bI8vg==
X-Cc: UNGLinuxDriver@microchip.com, andrew@lunn.ch, olteanv@gmail.com,
 davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
 robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
 woojung.huh@microchip.com, linux@armlinux.org.uk,
 Steen.Hegelund@microchip.com, daniel.machon@microchip.com,
 geert+renesas@glider.be, magnus.damm@gmail.com, edumazet@kernel.org,
 richardcochran@gmail.com, linux-kernel@vger.kernel.org,
 netdev@vger.kernel.org, devicetree@vger.kernel.org,
 linux-renesas-soc@vger.kernel.org
X-In-Reply-To: <20261111-dsa_lan9645x_switch_driver_base-v17-2-83a471c5bddb@microchip.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