From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Jaime Liao <jaimeliao.tw@gmail.com>,
linux-mtd@lists.infradead.org, pratyush@kernel.org,
michael@walle.cc, miquel.raynal@bootlin.com
Cc: leoyu@mxic.com.tw, JaimeLiao <jaimeliao@mxic.com.tw>
Subject: Re: [PATCH v2 2/2] mtd: spi-nor: add support for Macronix Octal flash
Date: Thu, 27 Jul 2023 10:54:18 +0100 [thread overview]
Message-ID: <a2e8544b-f97b-e318-1c98-7f424b1c810c@linaro.org> (raw)
In-Reply-To: <20230727091610.234132-3-jaimeliao.tw@gmail.com>
On 7/27/23 10:16, Jaime Liao wrote:
> From: JaimeLiao <jaimeliao@mxic.com.tw>
>
> Adding Macronix Octal flash for Octal DTR support.
>
> The octaflash series can be divided into the following types:
>
> MX25 series : Serial NOR Flash.
> MX66 series : Serial NOR Flash with stacked die.(Size larger than 1Gb)
> LM/UM series : Up to 250MHz clock frequency with both DTR/STR operation.
> LW/UW series : Support simultaneous Read-while-Write operation in multiple
> bank architecture. Read-while-write feature which means read
> data one bank while another bank is programing or erasing.
>
> MX25LM : 3.0V Octal I/O
> -https://www.mxic.com.tw/Lists/Datasheet/Attachments/8729/MX25LM51245G,%203V,%20512Mb,%20v1.1.pdf
>
> MX25UM : 1.8V Octal I/O
> -https://www.mxic.com.tw/Lists/Datasheet/Attachments/8967/MX25UM51245G,%201.8V,%20512Mb,%20v1.5.pdf
>
> MX66LM : 3.0V Octal I/O with stacked die
> -https://www.mxic.com.tw/Lists/Datasheet/Attachments/8748/MX66LM1G45G,%203V,%201Gb,%20v1.1.pdf
>
> MX66UM : 1.8V Octal I/O with stacked die
> -https://www.mxic.com.tw/Lists/Datasheet/Attachments/8711/MX66UM1G45G,%201.8V,%201Gb,%20v1.1.pdf
>
> MX25LW : 3.0V Octal I/O with Read-while-Write
> MX25UW : 1.8V Octal I/O with Read-while-Write
> MX66LW : 3.0V Octal I/O with Read-while-Write and stack die
> MX66UW : 1.8V Octal I/O with Read-while-Write and stack die
>
> MX25UM51245G : 512Mb flash, with Word mode data output format when Octal DTR read
> MX25UM51345G : 512Mb flash, with Byte mode data output format when Octal DTR read
split this in multiple patches and send a patch for each family please.
>
> Macronix Octal flash with two types, "byte mode" and "word mode".
> Because of word mode flash with byte swap issue when Octal DTR read,
> adding byte mode flash in this patchset only.
Please reformulate this paragraph. So all these flashes that you're adding
don't swap bytes on a 2 byte boundary?
>
> About LW/UW series, please contact us freely if you have any
> questions. For adding Octal NOR Flash IDs, we have validated
> each Flash on plateform zynq-picozed.
remove this paragraph.
>
> As below are the SFDP table dump.
I'd like you to do some sanity checks as well, using mtd_debug. There
was a script that I advertised, please search ml for other flash updates
to see how to do it.
>
> zynq> cat jedec_id
> c2943c
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx66uw2g345gx0
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff7f00ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff87790100841200e2cc04674630b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000a00001445988043061f0021dcffff
> zynq> md5sum sfdp
> 839ad44d1e758bea30bd9917ba763ba6 sfdp
>
> zynq> cat jedec_id
> c2843c
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx66uw2g345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff7f00ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff87790100841200e2cc04674630b030b0f4bdd55c
> 000000ff101000200000147c00007c234800000000007777000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000000001445988043061f0021dcffff
> zynq> md5sum sfdp
> 00447475e039e67c256a8d75d5885ae8 sfdp
>
> zynq> cat jedec_id
> c2843a
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx25uw51345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff1f00ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff8b7901008f1200e2cc04674630b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000a00001445988043060f0021dcffff
> zynq> md5sum sfdp
> cdccbfad3c384e77f3a5f7847b57b148 sfdp
>
> zynq> cat jedec_id
> c28439
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx25uw25345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff0f00ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff87790100841200d2cc04674630b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000a00001445988043060f0021dcffff
> zynq> md5sum sfdp
> f7712440f8ce0adb538dfa0c10579c79 sfdp
>
> zynq> cat jedec_id
> c28339
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx25um25345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff0f00ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff87690100821200d2cc02673830b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 040900001445988043060f0021dcffff
> zynq> md5sum sfdp
> 950e623745a002e1747008592e6dbdf9 sfdp
>
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx25uw12345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff0700ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff8b7901008f1200c9cc04674630b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000a00001445988043060f0021dcffff
> zynq> md5sum sfdp
> a3eb609c08894c84270ad06efc03766c sfdp
>
> zynq> cat jedec_id
> c28437
> zynq> cat manufacturer
> macronix
> zynq> cat partname
> mx25uw6345g
> zynq> xxd -p sfdp
> 53464450080104fd00070114400000ff8701011c900000ff0a0001080001
> 00ff05000105200100ff84000102340100ff0000000000000000ffffffff
> ffffffffe5208affffffff0300ff00ff00ff00ffeeffffffffff00ffffff
> 00ff0c2010d800ff00ff8b7901008f1200c4cc04674630b030b0f4bdd55c
> 000000ff101000200000000000007c234800000000008888000000000000
> 00400fd1fff30fd1fff300050090000500b1002b0095002b0096727103b8
> 727103b80000000090a3188200c069960000000000000000727100987271
> 00b8727100990000000072710098727100f872710099727100f900000000
> 00000000011501d0727106d8000086500000060100000000020001030002
> 00000000060100000000000072060002000000eec0697272717100d8f7f6
> 000a00001445988043060f0021dcffff
> zynq> md5sum sfdp
> c6fb57b8fdd4c35b5f0dacc4a1f7d4f4 sfdp
>
> Signed-off-by: JaimeLiao <jaimeliao@mxic.com.tw>
> ---
> drivers/mtd/spi-nor/macronix.c | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/macronix.c b/drivers/mtd/spi-nor/macronix.c
> index b397fd274868..a5aee10590b8 100644
> --- a/drivers/mtd/spi-nor/macronix.c
> +++ b/drivers/mtd/spi-nor/macronix.c
> @@ -99,8 +99,8 @@ static const struct flash_info macronix_nor_parts[] = {
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
> FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
> { "mx25uw51245g", INFOB(0xc2813a, 0, 0, 0, 4)
> - PARSE_SFDP
> - FLAGS(SPI_NOR_RWW) },
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
why? Here you don't add a new flash, but change an existing one.
Add a dedicated patch for this. Why can't you use SFDP?
> { "mx25v8035f", INFO(0xc22314, 0, 64 * 1024, 16)
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> SPI_NOR_QUAD_READ) },
> @@ -119,6 +119,28 @@ static const struct flash_info macronix_nor_parts[] = {
> { "mx66u2g45g", INFO(0xc2253c, 0, 64 * 1024, 4096)
> NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
> FIXUP_FLAGS(SPI_NOR_4B_OPCODES) },
> + { "mx66uw2g345g", INFOB(0xc2843c, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_READ | SPI_NOR_OCTAL_DTR_READ |
> + SPI_NOR_OCTAL_DTR_PP) },
PARSE_SFDP instead.
> + { "mx66uw2g345gx0", INFOB(0xc2943c, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_READ | SPI_NOR_OCTAL_DTR_READ |
> + SPI_NOR_OCTAL_DTR_PP) },
> + { "mx25uw51345g", INFOB(0xc2843a, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
> + { "mx25um25345g", INFO(0xc28339, 0, 0, 0)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
> + { "mx25uw25345g", INFOB(0xc28439, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
> + { "mx25uw12345g", INFOB(0xc28438, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
> + { "mx25uw6345g", INFOB(0xc28437, 0, 0, 0, 4)
> + FLAGS(SPI_NOR_RWW)
> + NO_SFDP_FLAGS(SECT_4K | SPI_NOR_OCTAL_DTR_READ | SPI_NOR_OCTAL_DTR_PP) },
PARSE_SFDP for all the flashes please.
> };
>
> static int macronix_nor_octal_dtr_en(struct spi_nor *nor)
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2023-07-27 9:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 9:16 [PATCH v2 0/2] Add octal DTR support for Macronix flash Jaime Liao
2023-07-27 9:16 ` [PATCH v2 1/2] mtd: spi-nor: add Octal " Jaime Liao
2023-07-27 10:00 ` Tudor Ambarus
2023-07-27 10:04 ` Tudor Ambarus
2023-07-27 10:11 ` Michael Walle
2023-07-28 9:46 ` Michael Walle
2023-07-28 11:01 ` Tudor Ambarus
2023-08-01 7:24 ` liao jaime
2023-08-01 8:16 ` Tudor Ambarus
2023-08-01 9:33 ` liao jaime
2023-07-27 9:16 ` [PATCH v2 2/2] mtd: spi-nor: add support for Macronix Octal flash Jaime Liao
2023-07-27 9:54 ` Tudor Ambarus [this message]
2023-07-27 10:04 ` Michael Walle
2023-07-27 10:10 ` Tudor Ambarus
2023-07-27 10:12 ` Michael Walle
2023-07-27 10:14 ` Tudor Ambarus
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=a2e8544b-f97b-e318-1c98-7f424b1c810c@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=jaimeliao.tw@gmail.com \
--cc=jaimeliao@mxic.com.tw \
--cc=leoyu@mxic.com.tw \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
/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