Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Fil Dunsky" <filipp.dunsky@gmail.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Richard Weinberger" <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v9 2/4] dt-bindings: mtd: Add Cortina CS7542 NAND controller
Date: Sun, 06 Dec 2026 14:42:09 +0000	[thread overview]
Message-ID: <sashiko-outbox-252486@kernel.org> (raw)
In-Reply-To: <20261206-b4-cs7542-nand-v9-2-b79bd1478bec@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] dt-bindings: mtd: cs7542-nand claims shared multi-interface
  flash controller
- [Low] dt-bindings: mtd: cortina,cs7542-nand omits hardware DMA
  properties
- [Low] dt-bindings: mtd: cs7542-nand reg minItems allows omitting data
  aperture
--

commit ce4d2c13d0ce1e664cc4d0a332e069a1b216c301
Author: Fil Dunsky <filipp.dunsky@gmail.com>

dt-bindings: mtd: Add Cortina CS7542 NAND controller

This commit adds a Devicetree binding schema for the Cortina Systems CS7542
NAND controller, describing its register block, optional banked data
aperture, clock, interrupt, shared reset, and NAND chip children.

> diff --git a/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml b/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml
> new file mode 100644
> index 0000000000000..7c9953c59127d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mtd/cortina,cs7542-nand.yaml
> @@ -0,0 +1,90 @@

[ ... ]

> +  The flash controller also has access to the shared SSP DMA engine;
> +  the programmed-I/O interface does not require that DMA resource.

[Severity: Low]
As reported by Miquel Raynal on v2 [1], should this binding include optional
dmas (and dma-names, if multiple channels exist) properties for the shared
SSP DMA engine?

Bindings should describe the hardware resources even when a driver uses
programmed I/O.  Because unevaluatedProperties: false is set, any DTS node
that wires up the DMA engine will fail dtbs_check until those properties are
added.

[ ... ]

> +properties:
> +  compatible:
> +    const: cortina,cs7542-nand
> +
> +  reg:
> +    minItems: 1
> +    items:
> +      - description: Flash controller registers
> +      - description: Banked NAND data aperture
> +
> +  reg-names:
> +    minItems: 1
> +    items:
> +      - const: regs
> +      - const: data

[Severity: Low]
Why do reg and reg-names allow omitting the banked NAND data aperture via
minItems: 1 for a single-SoC compatible?

Neither the binding nor the commit message documents a CS7542 variant where
the data aperture is absent.  Allowing it to be omitted lets incomplete DTS
nodes pass dtbs_check and risks breaking forward compatibility if a driver
later relies on that region.

[ ... ]

> +  interrupts:
> +    maxItems: 1
> +    description: Flash controller interrupt
> +
> +  resets:
> +    maxItems: 1
> +    description: Reset shared by the NAND, parallel NOR and serial flash
> +      interfaces in the flash controller
> +
> +patternProperties:
> +  "^nand@[2-9a-f]$": false
> +  "^nand@[01]$":
> +    type: object
> +    $ref: raw-nand-chip.yaml#
> +    properties:
> +      reg:
> +        minimum: 0
> +        maximum: 1
> +    unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - interrupts
> +
> +unevaluatedProperties: false

[Severity: Medium]
Should this binding model the shared flash controller as a parent node
instead of claiming it under a NAND-only compatible?

This schema gives cortina,cs7542-nand exclusive ownership of the flash
controller registers, interrupt, and reset, while nand-controller.yaml# and
patternProperties restrict children strictly to ^nand@[01]$.  The resets
description notes the same block also serves parallel NOR and serial flash.

Commit "mtd: rawnand: Add Cortina CS7542 controller support" exclusively
maps the 0x300-byte block of interleaved controller and NAND registers, so
a sibling NOR or serial flash node cannot claim it.  Locking in a NAND-only
ABI prevents adding those interfaces later without deprecating the binding.

Putting the shared registers, clock, interrupt, and reset in a parent flash
controller node (as in st,stm32-fmc2-ebi.yaml or arm,pl35x-smc.yaml) would
avoid tying the whole block to NAND.

[1] https://lore.kernel.org/r/87pkvryiii.fsf@bootlin.com

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261206-b4-cs7542-nand-v9-0-b79bd1478bec@gmail.com?part=2

  reply	other threads:[~2026-12-06 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-06 14:27 [PATCH v9 0/4] Add Cortina Systems CS7542 NAND controller support Fil Dunsky via B4 Relay
2026-12-06 14:27 ` [PATCH v9 1/4] mtd: rawnand: Honor controller raw page callbacks in ECC_NONE Fil Dunsky via B4 Relay
2026-12-06 14:27 ` [PATCH v9 2/4] dt-bindings: mtd: Add Cortina CS7542 NAND controller Fil Dunsky via B4 Relay
2026-12-06 14:42   ` sashiko-bot [this message]
2026-12-06 14:27 ` [PATCH v9 3/4] mtd: rawnand: Add Cortina CS7542 controller support Fil Dunsky via B4 Relay
2026-12-06 14:54   ` sashiko-bot
2026-12-06 14:27 ` [PATCH v9 4/4] MAINTAINERS: Add Cortina CS7542 NAND controller entry Fil Dunsky via B4 Relay

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-252486@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=filipp.dunsky@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=p.zabel@pengutronix.de \
    --cc=richard@nod.at \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vigneshr@ti.com \
    /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