From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Mauro Lima <mauro.lima@eclypsium.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Pratyush Yadav <p.yadav@ti.com>,
Tudor Ambarus <tudor.ambarus@linaro.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] spi: intel: only check locked opmenu for SW sequencer operations
Date: Mon, 9 Nov 2026 15:22:22 +0100 [thread overview]
Message-ID: <20261109142222.GT176724@black.igk.intel.com> (raw)
In-Reply-To: <20261108203728.25735-1-rosenp@gmail.com>
Hi,
On Sun, Nov 08, 2026 at 12:37:28PM -0800, Rosen Penev wrote:
> On controllers that use the software sequencer for register access (LPT
> and BYT), intel_spi_supports_mem_op() rejects any operation whose opcode
> is not in the BIOS-locked OPMENU. However the check is applied to every
> operation, including normal data reads and writes which are always
> executed by the hardware sequencer and never consult the OPMENU.
>
> On a Dell Precision M4800 (Lynx Point) the BIOS locks OPMENU to
> {02, 3b, 20, 05, 9f, 9f, 00, 00}, which lacks both READ (0x03) and
> FAST_READ (0x0b). As a result every read op is rejected and spi-nor
> fails to probe both flash components:
>
> intel-spi intel-spi: 0x3 not supported
> intel-spi intel-spi: 0xb not supported
> spi-nor spi0.0: can't select read settings supported by both the SPI controller and memory.
> spi-nor spi0.0: probe with driver spi-nor failed with error -22
>
> Only enforce the OPMENU check for operations that actually go through
> the software sequencer: register reads/writes when swseq_reg is set and
> erase when swseq_erase is set.
>
> Write Enable (0x06) and Write Disable (0x04) are excluded as well, even
> though they are register writes. WREN is never issued from the OPMENU:
> intel_spi_write_reg() verifies it is in PREOP_OPTYPE and uses it as the
> atomic preopcode of the next cycle. WRDI is not sent to the flash at
> all. Rejecting them whenever they are missing from the OPMENU, as on the
> M4800 where 0x06 is only in PREOP_OPTYPE, makes every program and erase
> fail with -EOPNOTSUPP.
>
> With this both flash chips (W25Q64 and W25Q32) probe and read back
> correctly.
>
> Fixes: e23e5a05d1fd ("mtd: spi-nor: intel-spi: Convert to SPI MEM")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
prev parent reply other threads:[~2026-11-09 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 20:37 Rosen Penev
2026-11-09 14:22 ` Mika Westerberg [this message]
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=20261109142222.GT176724@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mauro.lima@eclypsium.com \
--cc=p.yadav@ti.com \
--cc=rosenp@gmail.com \
--cc=tudor.ambarus@linaro.org \
/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
all inboxes | Powered by JetHome®