Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Joseph Telaak" <joseph@telaak.dev>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell
Date: Wed, 02 Dec 2026 07:00:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-245013@kernel.org> (raw)
In-Reply-To: <20261201-sf19a2890-gmac-v2-1-8d2c513db496@telaak.dev>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: net: positional nvmem-cell-names forces
  mac-address first
- [Low] dt-bindings: net: nvmem-cells enumerates entries in free-form
  description
--

commit f11b8b4f92dfebe292cc8f64c3cad8dd865e4cab
Author: Joseph Telaak <joseph@telaak.dev>

dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell

This commit extends nvmem-cells and nvmem-cell-names in
ethernet-controller.yaml to allow a second, device-specific nvmem cell
after mac-address.

> 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

[Severity: Low]
For a fixed two-entry nvmem-cells property corresponding to the
nvmem-cell-names items list below, DT binding conventions prefer an items
list carrying a per-entry description rather than maxItems with a free-form
description that enumerates the entries and restates their optionality.

>    nvmem-cell-names:
> -    const: mac-address
> +    minItems: 1
> +    items:
> +      - const: mac-address
> +      - description: Named by the device's own binding

[Severity: Medium]
Does defining nvmem-cell-names as a positional items tuple require index 0
to always be mac-address while leaving index 1 unconstrained across every
binding that inherits ethernet-controller.yaml?

Because items validates by array index, any Ethernet controller node that
specifies only a device-specific nvmem cell (such as factory RGMII delay
calibration in an SoC .dtsi where the MAC address does not come from nvmem)
will fail dtbs_check unless mac-address is also provided first.  At the
same time, bindings that inherit nvmem-cell-names from
ethernet-controller.yaml without overriding it now permit a second nvmem
cell with any arbitrary name.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261201-sf19a2890-gmac-v2-0-8d2c513db496@telaak.dev?part=1

  reply	other threads:[~2026-12-02  7:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-01  7:00 [PATCH net-next v2 0/3] net: stmmac: Add the Siflower SF19A2890 glue Joseph Telaak via B4 Relay
2026-12-01  7:00 ` [PATCH net-next v2 1/3] dt-bindings: net: ethernet-controller: Allow a device-specific nvmem cell Joseph Telaak via B4 Relay
2026-12-02  7:00   ` sashiko-bot [this message]
2026-12-01  7:00 ` [PATCH net-next v2 2/3] dt-bindings: net: Add Siflower SF19A2890 GMAC Joseph Telaak via B4 Relay
2026-12-02  7:00   ` sashiko-bot
2026-12-01  7:00 ` [PATCH net-next v2 3/3] net: stmmac: Add Siflower SF19A2890 glue Joseph Telaak via B4 Relay
2026-12-02  7:00   ` sashiko-bot

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=sashiko-outbox-245013@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joseph@telaak.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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