Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Md Sadre Alam" <md.alam@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/3] arm64: dts: qcom: ipq5424-rdp466: Enable quad SPI mode for SPI-NAND
Date: Thu, 16 Jul 2026 06:05:30 +0000	[thread overview]
Message-ID: <20260716060530.925091F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260716-quad_dts-v1-2-74d86792944a@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Adding `spi-tx-bus-width = <4>` breaks SPI-NAND page writes because the underlying QPIC SPI controller driver does not support quad program opcodes, and `spi-rx-bus-width = <4>` silently fails to enable quad reads.
--

--- Patch [2]: [PATCH 2/3] arm64: dts: qcom: ipq5424-rdp466: Enable quad SPI mode for SPI-NAND ---
commit d94d344a7a9d7f1e09d33f7fca995cd1adf27026
Author: Md Sadre Alam <md.alam@oss.qualcomm.com>

arm64: dts: qcom: ipq5424-rdp466: Enable quad SPI mode for SPI-NAND

This commit configures the SPI-NAND device to use 4-bit bus widths for
both transmit and receive by adding spi-rx-bus-width and spi-tx-bus-width
properties to the device tree.

> diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> --- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
> @@ -257,6 +257,8 @@ flash@0 {
>  		nand-ecc-engine = <&qpic_nand>;
>  		nand-ecc-strength = <4>;
>  		nand-ecc-step-size = <512>;
> +		spi-rx-bus-width = <4>;
> +		spi-tx-bus-width = <4>;

[Severity: High]
Does setting spi-tx-bus-width to 4 break SPI-NAND page writes on this
platform?

The SPI-NAND core parses this property and will attempt to issue quad
program opcodes during page writes. However, looking at the underlying QPIC
SPI controller driver, it appears to reject any program load opcode except
the 1-bit 0x84 opcode:

drivers/spi/spi-qpic-snand.c:qcom_spi_cmd_mapping() {
    ...
    default:
        dev_err(snandc->dev, "Opcode not supported: %u\n", opcode);
        return -EOPNOTSUPP;
}

When the core issues a quad program opcode (like 0x32), the driver will
return -EOPNOTSUPP, causing all write operations to the storage to fail. Is
the QPIC SPI driver missing support for quad page program opcodes, or should
the tx width remain at 1-bit in the device tree?

>  	};
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260716-quad_dts-v1-0-74d86792944a@oss.qualcomm.com?part=2

  reply	other threads:[~2026-07-16  6:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  5:55 [PATCH 0/3] Enable quad SPI mode for SPI-NAND on IPQ RDP boards Md Sadre Alam
2026-07-16  5:55 ` [PATCH 1/3] arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND Md Sadre Alam
2026-07-16  6:10   ` sashiko-bot
2026-07-16  5:55 ` [PATCH 2/3] arm64: dts: qcom: ipq5424-rdp466: " Md Sadre Alam
2026-07-16  6:05   ` sashiko-bot [this message]
2026-07-16  5:55 ` [PATCH 3/3] arm64: dts: qcom: ipq5332-rdp-common: " Md Sadre Alam
2026-07-16  6:47 ` [PATCH 0/3] Enable quad SPI mode for SPI-NAND on IPQ RDP boards Mukesh Ojha

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=20260716060530.925091F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=md.alam@oss.qualcomm.com \
    --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