Add support for Infineon S28HL256T and S28HL02GT
Subsystems (2)
cover Add support for Infineon S28HL256T and S28HL02GT
From: Takahiro Kuwano <[email protected]>
Those are 3.0V, 256Mb/2Gb NOR Flash devices with Octal interface. Same fanctionalities with 1.8V version that are already supported.
Takahiro Kuwano (2):
mtd: spi-nor: spansion: Add support for S28HL256T
mtd: spi-nor: spansion: Add support for S28HL02GT
drivers/mtd/spi-nor/spansion.c | 8 ++++++++ 1 file changed, 8 insertions(+)
Signature · 6 lines
2.34.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 1/2 mtd: spi-nor: spansion: Add support for S28HL256T
From: Takahiro Kuwano <[email protected]>
Infineon S28HL256T is 3.0V, 256Mb Flash device with Octal interface. It has the same functionalities with S28HS256T(1.8V).
---
Tested on Xilinx Zynq-7000 board and Infineon internal SPI controller.
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id 345a19
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer spansion
zynq> xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 53464450080105fe00000114000100ff84000102500100ff050001055801 00ff8700011c6c0100ff0a000104dc0100ff81000116ec0100ffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffffffffffffffffffff7218affffffff0f000000000000 0000eeffffffffff0000ffff00000c2100ff00ff12dc23faff8b82e7ffe1 ec2319497ab07ab0f766805c000000fff910f8a10000087c0000bc020000 0000ffff7e7e41129fff21ffffdc00ee800b7171656500b0ff96a80b0000 0c551ca20000800000000000c0ccffeb88fbffeb00650090060500a10065 009600650095716503d0716503d0a46bfb0290a579a20040288e0000ff00 0000ff0071650690716506900000000000000000716506d1716506d17165 0691716506910000ff000000ff00716505d5716505d50000a01500000601 000000000080710500004306fc65ff0804008000fc65ff4002008000fd65 ff0402008000fe0002fff1ff0100f8ff0100f8fffb01fe0102fff8fffb01 f8ff0100f1ff0100fe0204fff1ff0000f8ff0200f8fff701f8ff0200f1ff 0000ff0400fff8ffff01
zynq> sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp c6192565cabd0fdf52af924e204ed18b5bd2dc5f129a680da8cb0bda34d5464b /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/capabilities Supported read modes by the flash
1S-1S-1S
opcode 0x13 mode cycles 0 dummy cycles 0 1S-1S-8S opcode 0x7c mode cycles 0 dummy cycles 8 8D-8D-8D opcode 0xee mode cycles 0 dummy cycles 24
Supported page program modes by the flash
1S-1S-1S
opcode 0x12
8D-8D-8D
opcode 0x12
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/params
name (null) id 34 5a 19 0f 03 90 size 32.0 MiB write size 16 page size 256 address nbytes 4 flags 4B_OPCODES | HAS_4BAIT | HAS_16BIT_SR | IO_MODE_EN_VOLATILE | SOFT_RESET | ECC
opcodes
read 0xee dummy cycles 24 erase 0xdc program 0x12 8D extension repeat
protocols
read 8D-8D-8D write 8D-8D-8D register 8D-8D-8D
erase commands
21 (4.00 KiB) [2]
dc (256 KiB) [3]
c7 (32.0 MiB)
sector map
region (in hex) | erase mask | overlaid
------------------+------------+----------
00000000-0001ffff | [ 2 ] | no 00020000-0003ffff | [ 3] | yes 00040000-01ffffff | [ 3] | no
zynq> mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 33554432 (32M)
mtd.erasesize = 262144 (256K)
mtd.writesize = 16
mtd.oobsize = 0
regions = 3
region[0].offset = 0x00000000
region[0].erasesize = 4096 (4K)
region[0].numblocks = 32
region[0].regionindex = 0
region[1].offset = 0x00020000
region[1].erasesize = 131072 (128K)
region[1].numblocks = 1
region[1].regionindex = 1
region[2].offset = 0x00040000
region[2].erasesize = 262144 (256K)
region[2].numblocks = 127
region[2].regionindex = 2
zynq> ./test_spi.sh
random: crng init done
2+0 records in
2+0 records out
2097152 bytes (2.0MB) copied, 3.049923 seconds, 671.5KB/s
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read 0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0200000 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read
Copied 2097152 bytes from spi_test to address 0x00000000 in flash Copied 2097152 bytes from address 0x00000000 in flash to spi_read d97ac743a6fa312253c374d13a6b61f8f6a11c6cb34f37e7449de93f404383bb spi_read d97ac743a6fa312253c374d13a6b61f8f6a11c6cb34f37e7449de93f404383bb spi_test
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read d97ac743a6fa312253c374d13a6b61f8f6a11c6cb34f37e7449de93f404383bb spi_test
drivers/mtd/spi-nor/spansion.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/spansion.c +4 -0
@@ -957,6 +957,10 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s25hs02gt", .mfr_flags = USE_CLPEF, .fixups = &s25hx_t_fixups + }, { + .id = SNOR_ID(0x34, 0x5a, 0x19), + .mfr_flags = USE_CLPEF, + .fixups = &s28hx_t_fixups, }, { .id = SNOR_ID(0x34, 0x5a, 0x1a), .name = "s28hl512t",
Signature · 6 lines
2.34.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 1/2] mtd: spi-nor: spansion: Add support for S28HL256T
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Pratyush Yadav
maintainerRe: [PATCH 1/2] mtd: spi-nor: spansion: Add support for S28HL256T
In reply to [email protected]Quoted 8 lines · On Thu, Dec 19 2024, [email protected] wrote:
From: Takahiro Kuwano <[email protected]>
Infineon S28HL256T is 3.0V, 256Mb Flash device with Octal interface. It has the same functionalities with S28HS256T(1.8V).
Signed-off-by Takahiro Kuwano <[email protected]>---
[...]
drivers/mtd/spi-nor/spansion.c static const struct flash_info spansion_nor_parts[] = { · line 960
Quoted 9 lines
drivers/mtd/spi-nor/spansion.c +1
-0@@ -957,6 +957,10 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s25hs02gt", .mfr_flags = USE_CLPEF, .fixups = &s25hx_t_fixups + }, {
Even though we don't add name for new flashes in the flash_info, I think it is still a good idea to have a comment above an entry for which flash(es) it is for. This would make it easy later to track down more information about a particular entry.
So unless someone objects, I will add a comment above the flash entry with the name of the flash in both patches before applying.
Quoted 6 lines
drivers/mtd/spi-nor/spansion.c +3
-0+ .id = SNOR_ID(0x34, 0x5a, 0x19), + .mfr_flags = USE_CLPEF, + .fixups = &s28hx_t_fixups, }, { .id = SNOR_ID(0x34, 0x5a, 0x1a), .name = "s28hl512t",
Signature · 6 lines
Regards, Pratyush Yadav ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
PATCH 2/2 mtd: spi-nor: spansion: Add support for S28HL02GT
In reply to [email protected]From: Takahiro Kuwano <[email protected]>
Infineon S28HL02GT is 3.0V, 2Gb Flash device with Octal interface. It has the same functionalities with S28HS02GT.
---
Tested on Xilinx Zynq-7000 board and Infineon internal SPI controller.
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/jedec_id 345a1c
zynq> cat /sys/bus/spi/devices/spi0.0/spi-nor/manufacturer spansion
zynq> xxd -p /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 53464450080106fe00000114000100ff84000102500100ff050001055801 00ff8700011c6c0100ff88000102dc0100ff81000118040200ff0a000104 f40100ffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff fffffffffffffffffffffffffffffffff7218affffffff7f000000000000 0000eeffffffffff0000ffff00000c2100ff00ff12dc23faff8b82e7ffec ec2319497ab07ab0f766805c000000fff910c0a1000000000000bc020000 0000ffff6e6e41120ffe21ffffdc00ee800b7171656500b0ff9600000000 0c551ca20000800000000000c0ccfffb88fbfffb00650090066500b10065 009600650095716503d0716503d0a46bfb0290a579a20040288e0000ff00 0000ff0071650690716506900000000000000000716506d1716506d17165 0691716506910000ff000000ff00716505d5716505d50000a01500008008 000000080000801000000010000080180000001800000601000000008000 710600030600fc65ff0804008000fc65ff0402008000fc65ff0804008008 fd65ff0402008008fe0202fff1ff0100f8ff0100f8fffb0ffe0902fff8ff fb0ff8ff0100f1ff0100fe0104fff1ff0100f8ff0100f8fff70ff8ff0100 f1ff0100ff0a00fff8ffff0f
zynq> sha256sum /sys/bus/spi/devices/spi0.0/spi-nor/sfdp 505d69bc6aa512d9ac9594df95c189f0f3b2564e74be9be11b45d6923416903a /sys/bus/spi/devices/spi0.0/spi-nor/sfdp
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/capabilities Supported read modes by the flash
1S-1S-1S
opcode 0x13 mode cycles 0 dummy cycles 0 8D-8D-8D opcode 0xee mode cycles 0 dummy cycles 20
Supported page program modes by the flash
1S-1S-1S
opcode 0x12
8D-8D-8D
opcode 0x12
zynq> cat /sys/kernel/debug/spi-nor/spi0.0/params
name (null) id 34 5a 1c 0f 00 90 size 256 MiB write size 16 page size 256 address nbytes 4 flags 4B_OPCODES | HAS_4BAIT | HAS_16BIT_SR | IO_MODE_EN_VOLATILE | SOFT_RESET | ECC
opcodes
read 0xee dummy cycles 24 erase 0xdc program 0x12 8D extension repeat
protocols
read 8D-8D-8D write 8D-8D-8D register 8D-8D-8D
erase commands
dc (256 KiB) [3]
c7 (256 MiB)
sector map
region (in hex) | erase mask | overlaid
------------------+------------+----------
00000000-0fffffff | [ 3] | no
zynq> mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 268435456 (256M)
mtd.erasesize = 262144 (256K)
mtd.writesize = 16
mtd.oobsize = 0
regions = 0
zynq> ./test_spi.sh
random: crng init done
2+0 records in
2+0 records out
2097152 bytes (2.0MB) copied, 2.324596 seconds, 881.0KB/s
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read 0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0200000 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read
Copied 2097152 bytes from spi_test to address 0x00000000 in flash Copied 2097152 bytes from address 0x00000000 in flash to spi_read dca531fddad35d06dd7a667fb7adf847728b4b1cd0a7e4dd189e6c7c09782e51 spi_read dca531fddad35d06dd7a667fb7adf847728b4b1cd0a7e4dd189e6c7c09782e51 spi_test
Erased 2097152 bytes from address 0x00000000 in flash
Copied 2097152 bytes from address 0x00000000 in flash to spi_read 4bda3a28f4ffe603c0ec1258c0034d65a1a0d35ab7bd523a834608adabf03cc5 spi_read dca531fddad35d06dd7a667fb7adf847728b4b1cd0a7e4dd189e6c7c09782e51 spi_test
drivers/mtd/spi-nor/spansion.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mtd/spi-nor/spansion.c +4 -0
@@ -971,6 +971,10 @@ static const struct flash_info spansion_nor_parts[] = { .name = "s28hl01gt", .mfr_flags = USE_CLPEF, .fixups = &s28hx_t_fixups, + }, { + .id = SNOR_ID(0x34, 0x5a, 0x1c), + .mfr_flags = USE_CLPEF, + .fixups = &s28hx_t_fixups, }, { .id = SNOR_ID(0x34, 0x5b, 0x19), .mfr_flags = USE_CLPEF,
Signature · 6 lines
2.34.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/2] mtd: spi-nor: spansion: Add support for S28HL02GT
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 4 lines · On Thu, Dec 19 2024, [email protected] wrote:
From: Takahiro Kuwano <[email protected]>
Those are 3.0V, 256Mb/2Gb NOR Flash devices with Octal interface. Same fanctionalities with 1.8V version that are already supported.
Applied to spi-nor/next with the changes I mentioned. Thanks!
Signature · 6 lines
Regards, Pratyush Yadav ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/