QEMU-Arm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jamin Lin <jamin_lin@aspeedtech.com>
To: "Cédric Le Goater" <clg@kaod.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Troy Lee" <leetroy@gmail.com>,
	"Kane Chen" <kane_chen@aspeedtech.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Joel Stanley" <joel@jms.id.au>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"open list:ASPEED BMCs" <qemu-arm@nongnu.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>,
	"open list:Block layer core" <qemu-block@nongnu.org>
Cc: Jamin Lin <jamin_lin@aspeedtech.com>, Troy Lee <troy_lee@aspeedtech.com>
Subject: [PATCH v1 04/14] hw/block/m25p80: Add SFDP table for Winbond W25Q33PW flash
Date: Thu, 15 Oct 2026 05:56:47 +0000	[thread overview]
Message-ID: <20261015055642.106204-5-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20261015055642.106204-1-jamin_lin@aspeedtech.com>

Add the SFDP data table for the Winbond W25Q33PW flash device. The table
was generated from a real device under Linux by dumping the SFDP content
using the following command:

Example:

```
hexdump -v -e '8/1 "0x%02x, " "\n"' \
    /sys/bus/spi/devices/spi1.0/spi-nor/sfdp
```

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 hw/block/m25p80_sfdp.h |  1 +
 hw/block/m25p80.c      |  3 ++-
 hw/block/m25p80_sfdp.c | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/hw/block/m25p80_sfdp.h b/hw/block/m25p80_sfdp.h
index c1e532de5a..61544fb7cc 100644
--- a/hw/block/m25p80_sfdp.h
+++ b/hw/block/m25p80_sfdp.h
@@ -23,6 +23,7 @@ uint8_t m25p80_sfdp_mx25l25635e(uint32_t addr);
 uint8_t m25p80_sfdp_mx25l25635f(uint32_t addr);
 uint8_t m25p80_sfdp_mx66l1g45g(uint32_t addr);
 
+uint8_t m25p80_sfdp_w25q33pw(uint32_t addr);
 uint8_t m25p80_sfdp_w25q256(uint32_t addr);
 uint8_t m25p80_sfdp_w25q512jv(uint32_t addr);
 uint8_t m25p80_sfdp_w25q80bl(uint32_t addr);
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index e88efd913b..0e4bd93f34 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -353,7 +353,8 @@ static const FlashPartInfo known_devices[] = {
     { INFO("w25x16",      0xef3015,      0,  64 << 10,  32, ER_4K) },
     { INFO("w25x32",      0xef3016,      0,  64 << 10,  64, ER_4K) },
     { INFO("w25q32",      0xef4016,      0,  64 << 10,  64, ER_4K) },
-    { INFO("w25q33pw",    0xef6016,      0,  64 << 10,  64, ER_4K) },
+    { INFO("w25q33pw",    0xef6016,      0,  64 << 10,  64, ER_4K),
+      .sfdp_read = m25p80_sfdp_w25q33pw },
     { INFO("w25x64",      0xef3017,      0,  64 << 10, 128, ER_4K) },
     { INFO("w25q64",      0xef4017,      0,  64 << 10, 128, ER_4K) },
     { INFO("w25q80",      0xef5014,      0,  64 << 10,  16, ER_4K) },
diff --git a/hw/block/m25p80_sfdp.c b/hw/block/m25p80_sfdp.c
index 87878c2bf0..8ac603e212 100644
--- a/hw/block/m25p80_sfdp.c
+++ b/hw/block/m25p80_sfdp.c
@@ -296,6 +296,42 @@ define_sfdp_read(mx66l1g45g);
  * Windbond
  */
 
+static const uint8_t sfdp_w25q33pw[] = {
+    0x53, 0x46, 0x44, 0x50, 0x0a, 0x01, 0x00, 0xff,
+    0x00, 0x08, 0x01, 0x17, 0x80, 0x00, 0x00, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xe5, 0x20, 0xf9, 0xff, 0xff, 0xff, 0xff, 0x01,
+    0x44, 0xeb, 0x08, 0x6b, 0x08, 0x3b, 0x42, 0xbb,
+    0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
+    0xff, 0xff, 0x44, 0xeb, 0x0c, 0x20, 0x0f, 0x52,
+    0x10, 0xd8, 0x00, 0x00, 0x14, 0x32, 0x01, 0x01,
+    0x81, 0xe3, 0x14, 0xc2, 0xe9, 0x63, 0x76, 0x33,
+    0x7a, 0x75, 0x7a, 0x75, 0xf7, 0xa9, 0xd5, 0x5c,
+    0x39, 0xf6, 0x6d, 0xff, 0xe9, 0x30, 0xf8, 0x80,
+    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00,
+    0x00, 0x00, 0x00, 0x00, 0xf7, 0xf5, 0xff, 0xff,
+    0x0f, 0x00, 0x00, 0x00, 0x06, 0x0d, 0x44, 0xbd,
+    0x27, 0xed, 0x08, 0x0d, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+};
+define_sfdp_read(w25q33pw);
+
 static const uint8_t sfdp_w25q256[] = {
     0x53, 0x46, 0x44, 0x50, 0x00, 0x01, 0x00, 0xff,
     0x00, 0x00, 0x01, 0x09, 0x80, 0x00, 0x00, 0xff,
-- 
2.53.0


  parent reply	other threads:[~2026-10-15  5:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15  5:56 [PATCH v1 00/14] hw/arm/aspeed: Add AST1040 FMC/SPI controllers and unimplemented devices Jamin Lin
2026-10-15  5:56 ` [PATCH v1 01/14] hw/ssi/aspeed_smc: Fix AST2700 segment end address decoding Jamin Lin
2026-10-15  5:56 ` [PATCH v1 02/14] hw/ssi/aspeed_smc: Fix AST2700 DMA flash address mask Jamin Lin
2026-10-27  3:27   ` Philippe Mathieu-Daudé
2026-10-15  5:56 ` [PATCH v1 03/14] hw/block/m25p80: Rename w25q32dw to w25q33pw Jamin Lin
2026-10-26 16:57   ` Cédric Le Goater
2026-10-27  1:32     ` Jamin Lin
2026-10-27  9:50       ` Cédric Le Goater
2026-10-28  1:11         ` Jamin Lin
2026-10-15  5:56 ` Jamin Lin [this message]
2026-10-15  5:56 ` [PATCH v1 05/14] hw/misc/aspeed_scu: Correct AST1040 A0 revision ID Jamin Lin
2026-10-15  5:56 ` [PATCH v1 06/14] hw/ssi/aspeed_smc: Add AST1040 FMC and SPI controllers Jamin Lin
2026-10-26 17:06   ` Cédric Le Goater
2026-10-28  1:12     ` Jamin Lin
2026-10-15  5:56 ` [PATCH v1 07/14] hw/arm/aspeed_ast1040: Add " Jamin Lin
2026-10-15  5:56 ` [PATCH v1 08/14] hw/arm/aspeed_ast1040: Add FMC and SPI filters as unimplemented devices Jamin Lin
2026-10-15  5:56 ` [PATCH v1 09/14] hw/arm/aspeed_ast1040: Add OTP as an unimplemented device Jamin Lin
2026-10-15  5:56 ` [PATCH v1 10/14] hw/arm/aspeed_ast1040: Add Anti-Tamper Controller (ATC) " Jamin Lin
2026-10-15  5:56 ` [PATCH v1 11/14] hw/arm/aspeed_ast1040: Add I3C " Jamin Lin
2026-10-27  3:29   ` Philippe Mathieu-Daudé
2026-10-15  5:56 ` [PATCH v1 12/14] hw/arm/aspeed_ast1040: Add Caliptra " Jamin Lin
2026-10-15  5:56 ` [PATCH v1 13/14] tests/qtest/aspeed_smc: Add AST1040 SMC tests Jamin Lin
2026-10-15  5:56 ` [PATCH v1 14/14] tests/functional/arm/test_aspeed_ast1040: Update AST1040 image to aspeed-mcu-fw-hub v01.00 Jamin Lin
2026-10-15  6:20 ` [PATCH v1 00/14] hw/arm/aspeed: Add AST1040 FMC/SPI controllers and unimplemented devices Cédric Le Goater

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=20261015055642.106204-5-jamin_lin@aspeedtech.com \
    --to=jamin_lin@aspeedtech.com \
    --cc=alistair@alistair23.me \
    --cc=andrew@codeconstruct.com.au \
    --cc=clg@kaod.org \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=joel@jms.id.au \
    --cc=kane_chen@aspeedtech.com \
    --cc=kwolf@redhat.com \
    --cc=leetroy@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.com \
    --cc=troy_lee@aspeedtech.com \
    /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