All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Md Sadre Alam" <md.alam@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 1/3] arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND
Date: Thu, 16 Jul 2026 06:10:13 +0000	[thread overview]
Message-ID: <20260716061013.CF0B41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260716-quad_dts-v1-1-74d86792944a@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [Medium] The device tree changes attempt to enable Quad SPI mode, but the underlying controller driver hardcodes single-bit transfers.
--

--- Patch [1]: [PATCH 1/3] arm64: dts: qcom: ipq9574-rdp-common: Enable quad SPI mode for SPI-NAND ---
commit fa94f9522a125598be3f36fef708de141603218d
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 to enable quad SPI transfers.

> diff --git a/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq9574-rdp-common.dtsi
> index 62877b46f9b3f..86138529ba77e 100644
> --- 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: Medium]
This is a pre-existing issue, but does enabling the 4-bit bus width here
actually result in quad SPI transfers?

Looking at the QPIC controller driver in drivers/spi/spi-qpic-snand.c,
qcom_spi_cmd_mapping() intercepts generic SPI NAND opcodes and hardcodes
SPI_TRANSFER_MODE_x1:

drivers/spi/spi-qpic-snand.c:qcom_spi_cmd_mapping() {
        ...
	case SPINAND_READ:
		if (snandc->qspi->raw_rw) {
			*cmd = (PAGE_ACC | LAST_PAGE | SPI_TRANSFER_MODE_x1 |
					SPI_WP | SPI_HOLD | OP_PAGE_READ);
		} else {
			*cmd = (PAGE_ACC | LAST_PAGE | SPI_TRANSFER_MODE_x1 |
					SPI_WP | SPI_HOLD | OP_PAGE_READ_WITH_ECC);
		}
        ...
}

It appears the driver completely ignores the bus widths negotiated by the
spi-mem framework, meaning transfers will silently remain single-bit.

Are there companion patches to the controller driver to handle the wider
bus widths, or is this device tree change ineffective on its own?

>  	};
>  };

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

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

Thread overview: 10+ 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 [this message]
2026-07-16 17:52   ` Konrad Dybcio
2026-07-16  5:55 ` [PATCH 2/3] arm64: dts: qcom: ipq5424-rdp466: " Md Sadre Alam
2026-07-16  6:05   ` sashiko-bot
2026-07-16 17:52   ` Konrad Dybcio
2026-07-16  5:55 ` [PATCH 3/3] arm64: dts: qcom: ipq5332-rdp-common: " Md Sadre Alam
2026-07-16 17:52   ` Konrad Dybcio
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=20260716061013.CF0B41F000E9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.