Article View: linux.kernel.netdev
Article #26594Re: [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 22:01
Date: Thu, 03 Dec 2026 22:01
142 lines
13706 bytes
13706 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] Commit "dt-bindings: net: ethernet-controller: Allow a device-
specific nvmem cell" loosens the common schema inβ¦
- [Low] The common schema in ethernet-controller.yaml (and the Siflower
binding added later in the series, which copies it) fixes `mac-β¦
- [Low] dt-bindings: net: nvmem-cells enumerates entries in free-form
description
--
dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell
This commit relaxes nvmem-cells and nvmem-cell-names in
ethernet-controller.yaml so that a second nvmem cell, specific to the
device, can follow the mac-address cell. The first user is the Siflower
SF19A2890 GMAC, which keeps per-unit RGMII delay calibration in nvmem.
> diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> index 30b2a335116e9..da27ff8012eba 100644
> --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> +++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
> @@ -22,12 +22,17 @@ properties:
> Specifies maximum speed in Mbit/s supported by the device.
>
> nvmem-cells:
> - maxItems: 1
> + minItems: 1
> + maxItems: 2
> description:
> - Reference to an nvmem node for the MAC address
> + Reference to an nvmem node for the MAC address, then optionally to a
> + cell that the device's own binding describes
>
> nvmem-cell-names:
> - const: mac-address
> + minItems: 1
> + items:
> + - const: mac-address
[Severity: Low]
The nvmem-cells description now lists both entries in prose. It also
restates that the second entry is optional, which minItems: 1 already
says.
nvmem-cell-names below becomes an items list with a fixed position for
each entry. Would it be clearer to describe nvmem-cells the same way,
with one description per entry? For example:
nvmem-cells:
minItems: 1
items:
- description: MAC address
- description: Cell named by the device's own binding
That keeps nvmem-cells and nvmem-cell-names in step. The text for each
entry also stays accurate when a device binding narrows the list, as
siflower,sf19a2890-gmac.yaml does later in this series.
Bindings normally use items with per-entry descriptions when each
entry has a fixed position. maxItems with a single free-form
description is meant for lists of interchangeable entries, and that
is not what this property is any more.
This has no runtime effect. It is only about how the schema documents
the property.
[Severity: Low]
With mac-address fixed at index 0, how can a node use the device-specific
cell when the MAC address is not stored in nvmem? Take a SF19A2890 board
that has only the calibration cell:
nvmem-cells = <&rgmii_delay>;
nvmem-cell-names = "rgmii-delay";
This would fail validation, because item 0 must be const: mac-address. The
MAC could still come from mac-address or local-mac-address set by the
bootloader.
At runtime both cells are optional and looked up by name. This is in
drivers/net/ethernet/stmicro/stmmac/dwmac-sf19a2890.c, added later in this
series:
cell = devm_nvmem_cell_get(dev, "rgmii-delay");
if (IS_ERR(cell)) {
if (PTR_ERR(cell) == -ENOENT)
return 0;
and this is in of_get_mac_address_nvmem() in net/core/of_net.c:
cell = of_nvmem_cell_get(np, "mac-address");
So only the schema needs the fixed position. To pass dtbs_check, a board
would have to add a mac-address nvmem cell it doesn't otherwise use. That
cell would not override a MAC set by the bootloader, because
of_get_mac_address() checks the DT properties before it falls back to
nvmem.
siflower,sf19a2890-gmac.yaml, added later in the series, uses the same
order. The commit message says "Allow a second cell after mac-address", so
the order seems deliberate, but it doesn't handle this case.
Would an items: enum: list, as used in qcom,ath10k.yaml, work better here?
> + - description: Named by the device's own binding
[Severity: Low]
This entry has only a description, with no const, enum or pattern, and
nvmem-cells now allows maxItems: 2. Does that mean any binding that
references ethernet-controller.yaml without narrowing these properties now
accepts any second nvmem cell?
For example, fsl,fec.yaml passes both properties through unchanged:
nvmem-cells: true
nvmem-cell-names: true
nxp,dwmac-imx.yaml, microchip,lan95xx.yaml and marvell,prestera.yaml do the
same. The switch port bindings also inherit this through
ethernet-switch-port.yaml.
On those nodes, this now passes dt_binding_check and dtbs_check:
nvmem-cells = <&a>, <&b>;
nvmem-cell-names = "mac-address", "anything";
Before this patch, const: mac-address rejected it. The drivers for these
nodes never read a second cell. The generic consumer,
of_get_mac_address_nvmem(), only looks up "mac-address" by name.
Later in the series, siflower,sf19a2890-gmac.yaml pins this entry to
const: rgmii-delay, so the Siflower binding is constrained. Every other
binding that uses the common schema has no constraint on the second name.
--
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261201-sf19a2890-gmac-v2-0-8d2c513db496%40telaak.dev
Technical Details
Message-ID:
<179633527382.3146.12751374093521833744@kernel.org>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!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-376890-linux-kernel-netdev=dewy.ruReferences:
<20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!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-376890-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell Date: Thu, 03 Dec 2026 22:01:13 +0000 Organization: Usenet Network Message-ID: <179633527382.3146.12751374093521833744@kernel.org> References: <20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2608563"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:16xekh2ZB/ZUxqZa5e88b2ITo6c= sha256:7fwwCiPQTzw+nP99TwUgYvSzsz1EBVZxzCrHs9aD438= sha1:X3W2dB/zTmw4paNpixV/GpLGIbE= sha256:uDKwmJNVuus+vZa2lNZjPOwIVc3xMM19imZtvzMsPeY= 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 5D1B4117A49; Fri, 4 Dec 2026 01:02:30 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.64 X-Spam-Status: No, score=-3.64 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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 dt797oKvhJvv; Fri, 4 Dec 2026 01:02:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376890-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 F3528117971; Fri, 4 Dec 2026 01:02:16 +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 B17F12B09C; Thu, 3 Dec 2026 22:01:17 +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=1796335276; b=HmBHcmeq/pYj7Iso5Gyw4qD9s7KgCVUG3g2Mfn2NFhgUcY7M5h6XoEUjFKpD9rJS2YSG CozYxs0Sl7L4jwTY9dpmO8QS+y84hfm4gUXjkwIC2HEjTjp4LmCk4ehNOEnnM6CxgFlrM Ju0/JtyrgODfziubiEGV35dhV9ynUyW+6UHwTsNNDAj7ganUpivm8eSTmE0xMM5I/aTO9 jOxbfZb7Tm3dOXZzCagxjZ93OKOmdqNjV7HBzjuVo7hPVNoWrO6PF0obpa6RdoEdeDrKA DRMkLGlIi+6GVBCgL7HZnLu504xl0SU11KTJbUaMh7w9mqdy5kkHevqLNTDaM4ierpg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796335276; 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=ul9rDg9U/9RZ5dkOJMbba1q3vMBTmJnj6vyAuoJ1HUo=; b=aG1JqGO5CpYtoJ/ymjSlAFJkzl/g89qV0vMbNnlRsOWZ9WcSQw5bmCUf+TynrGVt2FJf Bm7rRLi96BD534BH0ocZu16jmtX0UsqtiWlfpBKMVqiqMUR26G9RpBpdFUxZLN/w+mJFz uTqRuWiUN/TqldXOSqrFXOSini1UZ37yduTEFf+ipm9i2GgZqlhuzDorgUjViKDkmBKpq YLrbEz4DXLZk33nEp2fFZmhOjKyveMFft5QWsrSrSc49yW4ZoHIs5XXsPIx8hlt8edmcF zCryDlj0bYfxQT7RuZURuWu5Ad1KTMCFON64LHO6P7JxFGLcUaOswOezEp2VwsETD1A== 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=fDFv1oB2; 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 DBAA0606A33A; Thu, 3 Dec 2026 22:01:16 +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=fDFv1oB2 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=1796335276; b=4bTEr2geAHy4xmSaNTFa1aw/Hu4c2vzjpogU5N6cMnDmmEa7zvTCY6pNUIA75OcVuVWU AoppVi2iH7uw16sCQ07pzpJEMV1sm91OKZBSN+c2Y5N3DvJqseLzKRVR5cyl4x4fso8Qs F+EPo5dvImRX6Ez/uYSJdhjFDpjZGr8mVS3I+4L8ciQRqBx/EGE3HAmrY6PinY3U89rfI 8+lZ2ZZg4bn6k+F2HSFbtL1VsoYq/pk32vs51Ozs/VCo4IqWAcPOvmYefgwAbUttR3i8W qVGlBkSGvHB8EJBxJXbWwhZeEB/4FX29pfuPLdSLjmQSiXuZP8d3EF3s+i6rS3OSXcQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796335276; 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=ul9rDg9U/9RZ5dkOJMbba1q3vMBTmJnj6vyAuoJ1HUo=; b=yGic8p+ZFNMLT1IsWSnaZk4lrBGnKN7Iut3ar+87ofDh2NnYkVQxY0SeZVoFrICUvT2O CBp8/q6aC1xLfFOWTVMwwNf2mfmEsiyciIO2bSUSLPrP9ewZA4ENtg8kQhb/QxS+nYmWv ORsYW1l1qfbgwD3IlyKC5H1u6pKw+WSZZGnp/ILn/Xu+sGS/4medTnyZaQSOSyo1/xf1n tHzOx5CI4A+sCRx4/a2Gd4A9WKr2A3eVZ8b5zeUPnlnAH+aPl03lGkBoGDwOBr5xb9r5o eCJxMcM0w+GjivD71dn9g7pwiQ4OPeQh3ylolvJXKpGoaGmHxcL4CJ8FWNxlguS+HRA== 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=fDFv1oB2; 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 07D7C606A322; Thu, 3 Dec 2026 22:01:15 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B5D1F00931; Thu, 3 Dec 2026 22:01:14 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796335275; bh=ul9rDg9U/9RZ5dkOJMbba1q3vMBTmJnj6vyAuoJ1HUo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=fDFv1oB24kJ4QYwKsCNaRNqBruaFW3vxRETnjfloexATk1Tm/ax7dtpwhhYY2FMKE GrLNhrlt3iCelu4L1aee/6EOX7JUyNxxGkDp9g3L3if3Zzv2zEx1wcwxEr/cLZn5vX NJD3uYyV+TTWNo1YVeaBO6XRupaefkLmJk+DRcTQ40KyOp7jpginOeAk9DnUZBRuKH kgC0La7RV+OYMg+OIoX6mG2ftAyRlsXhETElOeAbo91AwOz7lc6BnbpSmbwDpZJuhy LQHvHmXwNSkVPjdcpMGqW1hoMbObxRl/HM1VwlhYts2xacNAEQPzhDeiSxIpjNyscq co0Qz/Sf71/dg== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, richardcochran@gmail.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, maxime.chevallier@bootlin.com, mcoquelin.stm32@gmail.com, gch981213@gmail.com, linux@armlinux.org.uk, linux-mips@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-In-Reply-To: <20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev> 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