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, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 1/3] arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND
Date: Fri, 07 Aug 2026 16:45:15 +0000	[thread overview]
Message-ID: <20260807164516.5AE181F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260807-quad_dts-v2-1-6f578d4152b7@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 writes because the spi-qpic-snand driver explicitly rejects Quad Program Load opcodes.
--

--- Patch [1]: [PATCH v2 1/3] arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND ---
commit bae8660983c8ddf15356080523eb2d131962463a
Author: Md Sadre Alam <md.alam@oss.qualcomm.com>

arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND

This commit sets the SPI-NAND device node to use 4-bit transmit and receive
bus widths. This allows the controller and flash to use quad mode instead of
single-bit transfers.

> diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> --- a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
[ ... ]
> @@ -249,6 +249,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 enabling a 4-bit transmit bus width break SPI NAND writes on this board?

When spi-tx-bus-width is set to 4, the spi-nand core will probe for Quad
Program Load operations (e.g., opcode 0x32) and select it as the default page
write operation.

However, the spi-qpic-snand driver only appears to support single-bit program
load opcodes:

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

Because the driver rejects the Quad Program Load opcodes, writes will fail
with -EOPNOTSUPP.

Additionally, even if the mapping were updated, it looks like the driver
ignores the data buffer for any opcode other than SPINAND_PROGRAM_LOAD:

drivers/spi/spi-qpic-snand.c:qcom_spi_write_page() {
	...
	if (op->cmd.opcode == SPINAND_PROGRAM_LOAD)
		snandc->qspi->data_buf = (u8 *)op->data.buf.out;
	...
}

Should the spi-tx-bus-width addition be omitted until the spi-qpic-snand
driver is updated to support Quad Program Load operations?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260807-quad_dts-v2-0-6f578d4152b7@oss.qualcomm.com?part=1

  reply	other threads:[~2026-08-07 16:45 UTC|newest]

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

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=20260807164516.5AE181F000E9@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