From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <mwalle@kernel.org>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: [PATCH v4] mtd: spi-nor: atmel: add at25sf321 entry
Date: Sat, 16 Nov 2024 11:55:55 +0100 [thread overview]
Message-ID: <20241116-spi-nor-v4-1-3de8ac6fd0be@gmail.com> (raw)
Add entry for the at25sf321 32Mbit SPI flash.
This flash is populated on a custom board and was tested at
10MHz frequency using the "ti,da830-spi" SPI controller.
Link: https://www.renesas.com/en/document/dst/at25sf321-datasheet?r=1608801
Reviewed-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
---
root# cat /sys/class/spi_master/spi1/spi1.1/spi-nor/partname
at25sf321
root# cat /sys/class/spi_master/spi1/spi1.1/spi-nor/jedec_id
1f8701
root# cat /sys/class/spi_master/spi1/spi1.1/spi-nor/manufacturer
atmel
root# cat /sys/kernel/debug/spi-nor/spi1.1/capabilities
Supported read modes by the flash
1S-1S-1S
opcode 0x03
mode cycles 0
dummy cycles 0
1S-1S-1S (fast read)
opcode 0x0b
mode cycles 0
dummy cycles 8
1S-1S-2S
opcode 0x3b
mode cycles 0
dummy cycles 8
1S-2S-2S
opcode 0xbb
mode cycles 4
dummy cycles 0
1S-1S-4S
opcode 0x6b
mode cycles 0
dummy cycles 8
1S-4S-4S
opcode 0xeb
mode cycles 2
dummy cycles 4
Supported page program modes by the flash
1S-1S-1S
opcode 0x02
root# mtd_debug info /dev/mtd6
mtd.type = MTD_NORFLASH
mtd.flags = MTD_BIT_WRITEABLE
mtd.size = 65536 (64K)
mtd.erasesize = 4096 (4K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0
SINGLE
======
spi-rx-bus-width = <1>;
spi-tx-bus-width = <1>;
root# cat /sys/kernel/debug/spi-nor/spi1.1/params
name at25sf321
id 1f 87 01
size 4.00 MiB
write size 1
page size 256
address nbytes 3
flags HAS_16BIT_SR
opcodes
read 0x0b
dummy cycles 8
erase 0x20
program 0x02
8D extension none
protocols
read 1S-1S-1S
write 1S-1S-1S
register 1S-1S-1S
erase commands
20 (4.00 KiB) [0]
d8 (64.0 KiB) [1]
c7 (4.00 MiB)
sector map
region (in hex) | erase mask | flags
------------------+------------+----------
00000000-003fffff | [01 ] |
DUAL
======
spi-rx-bus-width = <2>;
spi-tx-bus-width = <2>;
root# cat /sys/kernel/debug/spi-nor/spi1.1/params
name at25sf321
id 1f 87 01
size 4.00 MiB
write size 1
page size 256
address nbytes 3
flags HAS_16BIT_SR | SOFT_RESET
opcodes
read 0x0b
dummy cycles 8
erase 0x20
program 0x02
8D extension repeat
protocols
read 1S-1S-1S
write 1S-1S-1S
register 1S-1S-1S
erase commands
20 (4.00 KiB) [1]
52 (32.0 KiB) [2]
d8 (64.0 KiB) [3]
c7 (4.00 MiB)
sector map
region (in hex) | erase mask | flags
------------------+------------+----------
00000000-003fffff | [ 123] |
QUAD
======
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
root# cat /sys/kernel/debug/spi-nor/spi1.1/params
name at25sf321
id 1f 87 01
size 4.00 MiB
write size 1
page size 256
address nbytes 3
flags HAS_16BIT_SR | SOFT_RESET
opcodes
read 0x0b
dummy cycles 8
erase 0x20
program 0x02
8D extension repeat
protocols
read 1S-1S-1S
write 1S-1S-1S
register 1S-1S-1S
erase commands
20 (4.00 KiB) [1]
52 (32.0 KiB) [2]
d8 (64.0 KiB) [3]
c7 (4.00 MiB)
sector map
region (in hex) | erase mask | flags
------------------+------------+----------
00000000-003fffff | [ 123] |
---
Changes in v4:
- Join line for link in description
- Removed .name as the ID is reused by different chips
- Link to v3: https://lore.kernel.org/r/20241115-spi-nor-v3-1-93ec584177cb@gmail.com
Changes in v3:
- Add SPI_NOR_DUAL_READ and SPI_NOR_QUAD_READ flags
- Link to v2: https://lore.kernel.org/r/20241029-spi-nor-v2-1-e166c3900e19@gmail.com
Changes in v2:
- Change from at25sf321b to at25sf321
- Link to v1: https://lore.kernel.org/r/20241018-spi-nor-v1-1-d725bfb701ec@gmail.com
---
drivers/mtd/spi-nor/atmel.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/mtd/spi-nor/atmel.c b/drivers/mtd/spi-nor/atmel.c
index 45d1153a04a07b7c61f46b117311b24ab695038f..82c592f0a1e156e6871785d58b670f76a0c03911 100644
--- a/drivers/mtd/spi-nor/atmel.c
+++ b/drivers/mtd/spi-nor/atmel.c
@@ -238,6 +238,10 @@ static const struct flash_info atmel_nor_parts[] = {
.flags = SPI_NOR_HAS_LOCK,
.no_sfdp_flags = SECT_4K,
.fixups = &at25fs_nor_fixups
+ }, {
+ .id = SNOR_ID(0x1f, 0x87, 0x01),
+ .size = SZ_4M,
+ .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
},
};
---
base-commit: 200289db261f0c8131a5756133e9d30966289c3b
change-id: 20241018-spi-nor-dc29698dea0f
Best regards,
--
Marcus Folkesson <marcus.folkesson@gmail.com>
next reply other threads:[~2024-11-16 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-16 10:55 Marcus Folkesson [this message]
2024-11-25 14:05 ` Pratyush Yadav
2024-12-06 15:28 ` Pratyush Yadav
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=20241116-spi-nor-v4-1-3de8ac6fd0be@gmail.com \
--to=marcus.folkesson@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®