From: Pratyush Yadav <pratyush@kernel.org>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: Cheng Ming Lin <linchengming884@gmail.com>,
pratyush@kernel.org, mwalle@kernel.org,
miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
alvinzhou@mxic.com.tw, leoyu@mxic.com.tw,
Cheng Ming Lin <chengminglin@mxic.com.tw>
Subject: Re: [PATCH 1/2] mtd: spi-nor: macronix: Add post_sfdp fixups for Quad Input Page Program
Date: Fri, 07 Feb 2025 15:01:17 +0000 [thread overview]
Message-ID: <mafs034gpztmq.fsf@kernel.org> (raw)
In-Reply-To: <1c1da131-a7b1-4c2e-9866-d7833a134033@linaro.org> (Tudor Ambarus's message of "Fri, 7 Feb 2025 08:37:10 +0000")
On Fri, Feb 07 2025, Tudor Ambarus wrote:
> Hi, Cheng,
>
> On 2/7/25 8:18 AM, Cheng Ming Lin wrote:
>> Although certain Macronix NOR flash support the Quad Input Page Program
>> feature, the corresponding information in the 4-byte Address Instruction
>> Table of these flash is not properly filled. As a result, this feature
>> cannot be enabled as expected.
>
> You need to prove that all the flashes that you touch need this fixup,
> i.e. dump their SFDP and show where's the wrong bit in the SFDP table.
>
> Identifying wrong bit in the SFDP tables would be easy to spot if we had
> a SFDP decoder. Something that we all agree that'd be a good thing to
> have, but nobody can allocate time to do it. Pratyush I remember has
> started a draft. Are you interested in introducing a SFDP decoder in
> mtd-utils?
Yes, will do. For now, you can find it here [0]. It doesn't yet support
all the tables but does have the basic ones. Feel free to give it a spin
and let me know if you find any bugs or issues.
I ran it on the SFDP for the first flash in the cover letter and this is
what it says:
--------------------------------
4-byte Address Instruction Table
--------------------------------
ID: 0xff84
Major Version: 0x1
Minor Version: 0x0
Length (in bytes): 0x08
+--------------------------------------------------------------------------------------------------+
| DWORD 1 |
+-------+---------------------------------------------------------------------------------+--------+
| Bits | Description | Value |
+-------+---------------------------------------------------------------------------------+--------+
| 0 | Support for (1S-1S-1S) READ Command, Instruction=13h | 0b1 |
| 1 | Support for (1S-1S-1S) FAST_READ Command, Instruction=0Ch | 0b1 |
| 2 | Support for (1S-1S-2S) FAST_READ Command, Instruction=3Ch | 0b1 |
| 3 | Support for (1S-2S-2S) FAST_READ Command, Instruction=BCh | 0b1 |
| 4 | Support for (1S-1S-4S) FAST_READ Command, Instruction=6Ch | 0b1 |
| 5 | Support for (1S-4S-4S) FAST_READ Command, Instruction=ECh | 0b1 |
| 6 | Support for (1S-1S-1S) Page Program Command, Instruction=12h | 0b1 |
| 7 | Support for (1S-1S-4S) Page Program Command, Instruction=34h | 0b0 |
| 8 | Support for (1S-4S-4S) Page Program Command, Instruction=3Eh | 0b1 |
| 9 | Support for Erase Command – Type 1 size, Instruction lookup in next Dword | 0b1 |
| 10 | Support for Erase Command – Type 2 size, Instruction lookup in next Dword | 0b1 |
| 11 | Support for Erase Command – Type 3 size, Instruction lookup in next Dword | 0b1 |
| 12 | Support for Erase Command – Type 4 size, Instruction lookup in next Dword | 0b0 |
| 13 | Support for (1S-1D-1D) DTR_Read Command, Instruction=0Eh | 0b0 |
| 14 | Support for (1S-2D-2D) DTR_Read Command, Instruction=BEh | 0b0 |
| 15 | Support for (1S-4D-4D) DTR_Read Command, Instruction=EEh | 0b1 |
| 16 | Support for volatile individual sector lock Read command, Instruction=E0h | 0b1 |
| 17 | Support for volatile individual sector lock Write command, Instruction=E1h | 0b1 |
| 18 | Support for non-volatile individual sector lock read command, Instruction=E2h | 0b1 |
| 19 | Support for non-volatile individual sector lock write command, Instruction=E3h | 0b1 |
| 20 | Support for (1S-1S-8S) FAST_READ Command, Instruction=7Ch | 0b1 |
| 21 | Support for (1S-8S-8S) FAST_READ Command, Instruction=CCh | 0b1 |
| 22 | Support for (1S-8D-8D) DTR_READ Command, Instruction=FDh | 0b1 |
| 23 | Support for (1S-1S-8S) Page Program Command, Instruction=84h | 0b1 |
| 24 | Support for (1S-8S-8S) Page Program Command, Instruction=8Eh | 0b1 |
| 31:25 | Reserved | 0x7f |
+-------+---------------------------------------------------------------------------------+--------+
+--------------------------------------------------------------------------------------------------+
| DWORD 2 |
+-------------+--------------------------------------------------------------------+---------------+
| Bits | Description | Value |
+-------------+--------------------------------------------------------------------+---------------+
| 7:0 | Instruction for Erase Type 1 | 0x21 |
| 15:8 | Instruction for Erase Type 2 | 0x5c |
| 23:16 | Instruction for Erase Type 3 | 0xdc |
| 31:24 | Instruction for Erase Type 4 | 0xff |
+-------------+--------------------------------------------------------------------+---------------+
>
> Also, if you touch all these flashes, will you please update them and
> get rid of the stray flash info fields? I'm thinking of name, size, and
> no_sfdp_flags.
>
[0] https://github.com/prati0100/parse-sfdp.git
--
Regards,
Pratyush Yadav
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2025-02-07 15:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 8:18 [PATCH 0/2] Add support for Quad Input Page Program Cheng Ming Lin
2025-02-07 8:18 ` [PATCH 1/2] mtd: spi-nor: macronix: Add post_sfdp fixups " Cheng Ming Lin
2025-02-07 8:36 ` Michael Walle
2025-02-10 3:16 ` Cheng Ming Lin
2025-02-07 8:37 ` Tudor Ambarus
2025-02-07 15:01 ` Pratyush Yadav [this message]
2025-02-10 3:27 ` Cheng Ming Lin
2025-02-10 7:48 ` Tudor Ambarus
2025-02-10 7:49 ` Cheng Ming Lin
2025-02-07 8:18 ` [PATCH 2/2] mtd: spi-nor: macronix: Add support for Macronix NOR Flash Cheng Ming Lin
2025-02-07 8:39 ` Michael Walle
2025-02-07 11:32 ` Pratyush Yadav
2025-02-10 6:15 ` Cheng Ming Lin
2025-02-07 8:43 ` Tudor Ambarus
2025-02-07 9:23 ` Michael Walle
2025-02-07 9:53 ` 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=mafs034gpztmq.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=alvinzhou@mxic.com.tw \
--cc=chengminglin@mxic.com.tw \
--cc=leoyu@mxic.com.tw \
--cc=linchengming884@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@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