Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Udaya Kiran Challa" <challauday369@gmail.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4] spi: dt-bindings: microchip,pic32mzda-spi: Convert to DT schema
Date: Fri, 14 Aug 2026 09:21:33 +0000	[thread overview]
Message-ID: <20260814092137.E38071F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260814083221.34606-1-challauday369@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The schema incorrectly restricts `cs-gpios` to `maxItems: 1` and makes it strictly required, breaking multi-device and grounded-CS SPI bus configurations.
--

--- Patch [1]: [PATCH v4] spi: dt-bindings: microchip,pic32mzda-spi: Convert to DT schema ---
commit fca958be633f7ae75e390f0bb61a2c6c29a85193
Author: Udaya Kiran Challa <challauday369@gmail.com>

spi: dt-bindings: microchip,pic32mzda-spi: Convert to DT schema

Convert Microchip PIC32 SPI controller devicetree binding from legacy text
format to DT schema.

Link to v3: https://lore.kernel.org/all/20260617101009.148851-1-challauday369@gmail.com/
Link to v2: https://lore.kernel.org/all/20260615115311.515404-1-challauday369@gmail.com/
Link to v1: https://lore.kernel.org/all/20260614175005.435826-1-challauday369@gmail.com/

> diff --git a/Documentation/devicetree/bindings/spi/microchip,pic32mzda-spi.yaml b/Documentation/devicetree/bindings/spi/microchip,pic32mzda-spi.yaml
> new file mode 100644
> index 0000000000000..2ef3480fa63e4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/microchip,pic32mzda-spi.yaml

[ ... ]

> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: mck0
> +
> +  cs-gpios:
> +    maxItems: 1

[Severity: Medium]
Does this limit the controller to a single device? The legacy text binding
explicitly allowed multiple pins to be used for chip selects. 

The SPI core in drivers/spi/spi.c supports multiple devices by dynamically
expanding the number of chip selects if multiple GPIOs are provided. Setting
this to a maximum of one breaks valid multiplexed SPI bus configurations.

> +
> +  dmas:
> +    items:
> +      - description: RX DMA channel
> +      - description: TX DMA channel

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - interrupt-names
> +  - clocks
> +  - clock-names
> +  - cs-gpios

[Severity: Medium]
Should cs-gpios be strictly required? 

Making it mandatory breaks device tree backward compatibility for valid
hardware configurations where a single SPI device's chip select is permanently
tied to its active state (e.g., tied to ground). In such tied-low
configurations, no software chip select toggling is needed, so the property
is legitimately omitted from the hardware description.

> +
> +unevaluatedProperties: false
> +
> +examples:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260814083221.34606-1-challauday369@gmail.com?part=1

  reply	other threads:[~2026-08-14  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  8:32 [PATCH v4] spi: dt-bindings: microchip,pic32mzda-spi: Convert to DT schema Udaya Kiran Challa
2026-08-14  9:21 ` sashiko-bot [this message]
2026-08-14 14:54 ` Mark Brown

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=20260814092137.E38071F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=challauday369@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --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