flashchips: Add XMC XM25RH256C
There is no public datasheet available. However, given that all the
512C variants are almost identical, we're going to assume the same
for the RH256C. That is, a QH256C plus RPMC features. Its device id
has been confirmed by Priyo on the flashprog mailing list.
Change-Id: Ie4c5a3102a0ba00b5e5683988959df17cbc5c1b7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/576
diff --git a/flashchips.c b/flashchips.c
index 6dc4193..6f28a24 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -26152,6 +26152,68 @@
{
.vendor = "XMC",
+ .name = "XM25RH256C",
+ .bustype = BUS_SPI,
+ .id.type = ID_SPI_RDID,
+ .id.manufacture = ST_ID,
+ .id.model = XMC_XM25RH256C,
+ .total_size = 32768,
+ .page_size = 256,
+ /* supports SFDP */
+ .feature_bits = FEATURE_WRSR_EITHER | FEATURE_WRSR_EXT2 | FEATURE_WRSR2 | FEATURE_WRSR3 |
+ FEATURE_OTP | FEATURE_4BA | FEATURE_QPI_SRP,
+ .dummy_cycles = { .qpi_read_params = { 2, 4, 6, 8 } },
+ .tested = TEST_UNTESTED,
+ .block_erasers =
+ {
+ {
+ .eraseblocks = { {4 * 1024, 8192} },
+ .block_erase = spi_block_erase_21,
+ }, {
+ .eraseblocks = { {4 * 1024, 8192} },
+ .block_erase = spi_block_erase_20,
+ }, {
+ .eraseblocks = { {32 * 1024, 1024} },
+ .block_erase = spi_block_erase_52,
+ }, {
+ .eraseblocks = { {64 * 1024, 512} },
+ .block_erase = spi_block_erase_dc,
+ }, {
+ .eraseblocks = { {64 * 1024, 512} },
+ .block_erase = spi_block_erase_d8,
+ }, {
+ .eraseblocks = { {32 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_60,
+ }, {
+ .eraseblocks = { {32 * 1024 * 1024, 1} },
+ .block_erase = spi_block_erase_c7,
+ }
+ },
+ .printlock = spi_prettyprint_status_register_bp3_srwd,
+ .unlock = spi_disable_blockprotect_bp3_srwd,
+ .write = spi_chip_write_256,
+ .read = spi_chip_read,
+ .voltage = {2700, 3600},
+ .reg_bits =
+ {
+ .qe = {STATUS2, 1, RW},
+ .dc = {{STATUS3, 3, RW}, {STATUS3, 4, RW}}, /* for SPI mode only */
+ .srp = {STATUS1, 7, RW},
+ .srl = {STATUS2, 0, RW},
+ .bp = {{STATUS1, 2, RW}, {STATUS1, 3, RW}, {STATUS1, 4, RW}, {STATUS1, 5, RW}},
+ .tb = {STATUS1, 6, RW},
+ .cmp = {STATUS2, 6, RW},
+ },
+ .wp_write_cfg = spi_wp_write_cfg,
+ .wp_read_cfg = spi_wp_read_cfg,
+ .wp_get_ranges = spi_wp_get_available_ranges,
+ .decode_range = decode_range_spi25,
+ .prepare_access = spi_prepare_io,
+ .finish_access = spi_finish_io,
+ },
+
+ {
+ .vendor = "XMC",
.name = "XM25RH512C",
.bustype = BUS_SPI,
.id.type = ID_SPI_RDID,