From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Takahiro Kuwano <tkuw584924@gmail.com>,
Fabio Estevam <festevam@denx.de>,
Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
Cc: michael@walle.cc, pratyush@kernel.org,
linux-mtd@lists.infradead.org,
linux-arm-kernel@lists.infradead.org, bacem.daassi@infineon.com,
miquel.raynal@bootlin.com, richard@nod.at
Subject: Re: [PATCH v2 2/6] mtd: spi-nor: add erase die (chip) capability
Date: Wed, 8 Nov 2023 08:54:57 +0000 [thread overview]
Message-ID: <fd8f31c2-1d1c-49ea-a226-4e00640fec52@linaro.org> (raw)
In-Reply-To: <f79aca29-1f11-698d-5384-7146c7c3cdc7@gmail.com>
On 11/8/23 08:06, Takahiro Kuwano wrote:
> Hi,
>
> On 11/3/2023 3:46 AM, Tudor Ambarus wrote:
>>
>>
>> On 11/2/23 18:33, Fabio Estevam wrote:
>>> On 02/11/2023 15:21, Tudor Ambarus wrote:
>>>
>>>> Let's see what gets to the SPI controller. Which SPI controller do you
>>>> use?
>>>
>>> I am using i.MX8MP, which has drivers/spi/spi-nxp-fspi.c.
>>>
>>> Here is the result:
>>>
>>> root@mcde3000a:~# flash_erase /dev/mtd0 0 0
>>> Erasing 131072 Kibyte @ 0 -- 0 [ 26.040903] spi-nor spi0.0: *****
>>> nor->reg_proto = 0x00010101
>>> % complete [ 26.049570] spi-nor spi0.0: *****
>>> [ 26.053849] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
>>> [ 26.059118] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
>>> [ 26.064539] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
>>> [ 26.069787] spi-nor spi0.0: *****
>>> [ 26.073118] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
>>> [ 26.078451] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
>>> [ 26.083949] spi-nor spi0.0: ***** op.addr.buswidth = 0x0
>>> [ 26.089368] spi-nor spi0.0: *****
>>> [ 26.092699] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
>>> [ 26.098123] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
>>> [ 26.103713] spi-nor spi0.0: *****
>>> [ 26.107045] spi-nor spi0.0: ***** op.data.buswidth = 0x00
>>> [ 26.112549] spi-nor spi0.0: ***** op.data.nbytes = 0
>>> [ 26.117727] spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
>>> [ 26.123589] spi-nor spi0.0: *****
>>> [ 26.127012] spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
>>> [ 26.132274] spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
>>> [ 26.137706] spi-nor spi0.0: ***** op.cmd.opcode = 0xc4
>>> [ 26.142956] spi-nor spi0.0: *****
>>> [ 26.146290] spi-nor spi0.0: ***** op.addr.nbytes = 0x04
>>> [ 26.151625] spi-nor spi0.0: ***** op.addr.buswidth = 0x01
>>> [ 26.157132] spi-nor spi0.0: ***** op.addr.buswidth = 0x4000000
>>> [ 26.163065] spi-nor spi0.0: *****
>>> [ 26.166402] spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
>>> [ 26.171815] spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
>>> [ 26.177405] spi-nor spi0.0: *****
>>> [ 26.180737] spi-nor spi0.0: ***** op.data.buswidth = 0x00
>>> [ 26.186241] spi-nor spi0.0: ***** op.data.nbytes = 0
>>> Erasing 131072 Kibyte @ 0 -- 100 % complete
>>>
>>
>> It looks good ...
>>
>>> root@mcde3000a:~# hexdump /dev/mtd0
>>> 0000000 a1d4 168c 4dad dfb2 2a3d c2af 0aae c18a
>>> 0000010 2d5f 177a c39f 46a4 f9cd b880 331e 2543
>>
>> but the patient is dead :). Would be good if Takahiro can test on IFX
>> too. In the meantime I'll try to find a n25q00, I remember I had one in
>> the past.
>>
> With your spi-nor/next-die-erase-v2-debug in linux-0day, die erase for IFX part
> (s25hs02gt) is working. Here is the log.
>
> 1st die:
>
> zynq> time mtd_debug erase /dev/mtd0 0 0x8000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x0
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 134217728 bytes from address 0x00000000 in flash
> real 7m 47.92s
> user 0m 0.00s
> sys 7m 47.92s
>
>
> 2nd die:
>
> zynq> time mtd_debug erase /dev/mtd0 0x8000000 0x8000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x8000000
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 134217728 bytes from address 0x08000000 in flash
> real 7m 44.97s
> user 0m 0.00s
> sys 7m 44.96s
>
>
> Both dice at once:
>
> zynq> time mtd_debug erase /dev/mtd0 0x0 0x10000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x0
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x8000000
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 268435456 bytes from address 0x00000000 in flash
> real 15m 44.17s
> user 0m 0.00s
> sys 15m 44.15s
>
great
>
> Infineon SEMPER flash family has 'blank check' feature that skips erase ops
> if the sector is already erased. It can be enabled by setting CFR3[5]=1.
> After enabling this, the subsequent erase times are reduced.
>
> 1st die:
>
> zynq> time mtd_debug erase /dev/mtd0 0 0x8000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x0
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 134217728 bytes from address 0x00000000 in flash
> real 0m 6.84s
> user 0m 0.00s
> sys 0m 6.84s
>
>
> 2nd die:
>
> zynq> time mtd_debug erase /dev/mtd0 0x8000000 0x8000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x8000000
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 134217728 bytes from address 0x08000000 in flash
> real 0m 6.70s
> user 0m 0.00s
> sys 0m 6.70s
>
>
> Both dice at once:
>
> zynq> time mtd_debug erase /dev/mtd0 0 0x10000000
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x0
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> spi-nor spi0.0: ***** nor->reg_proto = 0x00010101
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.cmd.nbytes = 0x01
> spi-nor spi0.0: ***** op.cmd.buswidth = 0x01
> spi-nor spi0.0: ***** op.cmd.opcode = 0x61
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.addr.nbytes = 0x04
> spi-nor spi0.0: ***** op.addr.buswidth = 0x01
> spi-nor spi0.0: ***** op.addr.buswidth = 0x8000000
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.dummy.nbytes = 0x00
> spi-nor spi0.0: ***** op.dummy.buswidth = 0x00
> spi-nor spi0.0: *****
> spi-nor spi0.0: ***** op.data.buswidth = 0x00
> spi-nor spi0.0: ***** op.data.nbytes = 0
> Erased 268435456 bytes from address 0x00000000 in flash
> real 0m 13.54s
> user 0m 0.00s
> sys 0m 13.54s
>
wonderful, thanks Takahiro! I'll send a v3.
Cheers,
ta
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-11-08 8:55 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 14:58 [PATCH v2 0/6] mtd: spi-nor: introduce die erase Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 1/6] mtd: spi-nor: use kernel sized types instead of c99 types Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 2/6] mtd: spi-nor: add erase die (chip) capability Tudor Ambarus
2023-11-01 16:04 ` Tudor Ambarus
2023-11-01 16:17 ` Fabio Estevam
2023-11-01 17:27 ` Tudor Ambarus
2023-11-02 16:43 ` Fabio Estevam
2023-11-02 17:36 ` Tudor Ambarus
2023-11-02 17:40 ` Fabio Estevam
2023-11-02 17:47 ` Tudor Ambarus
2023-11-02 17:54 ` Tudor Ambarus
2023-11-02 17:59 ` Tudor Ambarus
2023-11-02 18:01 ` Fabio Estevam
2023-11-02 18:21 ` Tudor Ambarus
2023-11-02 18:33 ` Fabio Estevam
2023-11-02 18:46 ` Tudor Ambarus
2023-11-02 18:56 ` Tudor Ambarus
2023-11-02 21:42 ` Fabio Estevam
2023-11-03 11:47 ` Tudor Ambarus
2023-11-03 12:30 ` Fabio Estevam
2023-11-03 12:53 ` Fabio Estevam
2023-11-03 13:26 ` Tudor Ambarus
2023-11-03 13:37 ` Fabio Estevam
2023-11-03 13:48 ` Tudor Ambarus
2023-11-03 14:16 ` Fabio Estevam
2023-11-03 14:37 ` Tudor Ambarus
2023-11-03 14:58 ` Fabio Estevam
2023-11-06 14:24 ` Tudor Ambarus
2023-11-06 9:34 ` Michael Walle
2023-11-06 14:23 ` Tudor Ambarus
2023-11-06 14:56 ` Tudor Ambarus
2023-11-09 9:09 ` Michael Walle
2023-11-15 7:06 ` Tudor Ambarus
2023-11-08 8:06 ` Takahiro Kuwano
2023-11-08 8:54 ` Tudor Ambarus [this message]
2023-11-01 14:58 ` [PATCH v2 3/6] mtd: spi-nor: spansion: enable die erase for multi die flashes Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 4/6] mtd: spi-nor: micron-st: " Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 5/6] mtd: spi-nor: remove NO_CHIP_ERASE flag Tudor Ambarus
2023-11-01 14:58 ` [PATCH v2 6/6] mtd: spi-nor: micron-st: Add support for mt25qu01g Tudor Ambarus
2023-11-01 15:54 ` [PATCH v2 0/6] mtd: spi-nor: introduce die erase Fabio Estevam
2023-11-15 6:10 ` Re (subset): " 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=fd8f31c2-1d1c-49ea-a226-4e00640fec52@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=Takahiro.Kuwano@infineon.com \
--cc=bacem.daassi@infineon.com \
--cc=festevam@denx.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=tkuw584924@gmail.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;
as well as URLs for NNTP newsgroup(s).