From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B5D1F00931; Thu, 3 Dec 2026 22:01:14 +0000 (UTC) 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== Subject: Re: [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell From: netdev-bot+sashiko@kernel.org To: joseph@telaak.dev 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 Date: Thu, 03 Dec 2026 22:01:13 +0000 Message-ID: <179633527382.3146.12751374093521833744@kernel.org> In-Reply-To: <20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev> References: <20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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