[PATCH] mtd: spi-nor: xmc: add locking to XM25QH128A

Michael Walle posted 1 patch 1 month, 2 weeks ago
drivers/mtd/spi-nor/xmc.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] mtd: spi-nor: xmc: add locking to XM25QH128A
Posted by Michael Walle 1 month, 2 weeks ago
Add support for locking to the XM25QH128A part.

Reported-by: Takino <stayer.opt1f@icloud.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221825
Signed-off-by: Michael Walle <mwalle@kernel.org>
---
Hi Takino,

please test it and reply with a "Tested-by" tag. With your full name if
you like. I didn't get that from the bug report.
---
 drivers/mtd/spi-nor/xmc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
index d5a06054b0dd..d3b52eb93e2c 100644
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
@@ -19,6 +19,7 @@ static const struct flash_info xmc_nor_parts[] = {
 		.name = "XM25QH128A",
 		.size = SZ_16M,
 		.no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+		.flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP | SPI_NOR_HAS_TB,
 	},
 };
 
-- 
2.47.3
Re: [PATCH] mtd: spi-nor: xmc: add locking to XM25QH128A
Posted by Michael Walle 3 weeks, 3 days ago
On Tue, 11 Aug 2026 08:44:44 +0200, Michael Walle wrote:
> Add support for locking to the XM25QH128A part.

Applied, thanks!

[1/1] mtd: spi-nor: xmc: add locking to XM25QH128A
      commit: 3c2464c70284eb5443a18ea7ee2f815a06d91a5b

Best regards,
-- 
Michael Walle <mwalle@kernel.org>
RE: [PATCH] mtd: spi-nor: xmc: add locking to XM25QH128A
Posted by Takahiro.Kuwano@infineon.com 1 month, 2 weeks ago
> Add support for locking to the XM25QH128A part.
> 
> Reported-by: Takino <stayer.opt1f@icloud.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221825
> Signed-off-by: Michael Walle <mwalle@kernel.org>

Reviewed-by: Takahiro Kuwano <takahiro.kuwano@infineon.com>

> ---
> Hi Takino,
> 
> please test it and reply with a "Tested-by" tag. With your full name if
> you like. I didn't get that from the bug report.
> ---
>  drivers/mtd/spi-nor/xmc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
> index d5a06054b0dd..d3b52eb93e2c 100644
> --- a/drivers/mtd/spi-nor/xmc.c
> +++ b/drivers/mtd/spi-nor/xmc.c
> @@ -19,6 +19,7 @@ static const struct flash_info xmc_nor_parts[] = {
>                 .name = "XM25QH128A",
>                 .size = SZ_16M,
>                 .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> +               .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP | SPI_NOR_HAS_TB,
>         },
>  };
> 
> --
> 2.47.3
Re: [PATCH] mtd: spi-nor: xmc: add locking to XM25QH128A
Posted by fonkism@icloud.com 1 month, 2 weeks ago
> On 11 Aug 2026, at 08:44, Michael Walle <mwalle@kernel.org> wrote:
> 
> Add support for locking to the XM25QH128A part.
> 
> Reported-by: Takino <stayer.opt1f@icloud.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221825
> Signed-off-by: Michael Walle <mwalle@kernel.org>

Tested-by: Wei, Takino <stayer.opt1f@icloud.com> # on Fedora 44 / 7.1.6-201

Tested to the max of my abilities here; the driver no longer returns “EOPNOTSUPP”.
It now returns “unlocked" which is technically correct as the bits are not set.
Intel locks it using a different mechanism and could’ve/should’ve also set the bits.
This likely needs a BIOS update to properly fix it. Which may never happen.

Regards,
Takino.

> ---
> Hi Takino,
> 
> please test it and reply with a "Tested-by" tag. With your full name if
> you like. I didn't get that from the bug report.
> ---
> drivers/mtd/spi-nor/xmc.c | 1 +
> 1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
> index d5a06054b0dd..d3b52eb93e2c 100644
> --- a/drivers/mtd/spi-nor/xmc.c
> +++ b/drivers/mtd/spi-nor/xmc.c
> @@ -19,6 +19,7 @@ static const struct flash_info xmc_nor_parts[] = {
> .name = "XM25QH128A",
> .size = SZ_16M,
> .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
> + .flags = SPI_NOR_HAS_LOCK | SPI_NOR_4BIT_BP | SPI_NOR_HAS_TB,
> },
> };
> 
> -- 
> 2.47.3
>