[PATCH v4 1/6] mtd: spi-nor: Add manufacturer read id function

Michael Walle michael at walle.cc
Fri Oct 13 02:04:04 PDT 2023


Hi,

Am 2023-10-13 10:23, schrieb liao jaime:
>> >> > After checking with Macronix designer, a-a-b-b-c-c is the data
>> >> > arrangement for
>> >> > read id operation of flash in 8D-8D-8D.
>> >>
>> >> Could you please point to any specification? I doubt there is one
>> >> and every vendor will do it slightly differently. I mean we already
>> >> have some flashes which (apparently) reply to RDID in 8d8d8d.
>> >>
>> >> For example, see the Semper flash datasheet:
>> >> https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HS512T_S28HS01GT_S28HL256T_S28HL512T_S28HL01GT_256-Mb_(32-MB)_512-Mb_(64-MB)_1-Gb_(128-MB)_HS-T_(1.8-V)_HL-T_(3.0-V)_Semper_Flash_with_Octal_Interface-DataSheet-v03_00-EN.pdf?fileId=8ac78c8c7d0d8da4017d0ee6bca96f97&da=t
>> >>
>> >> Have a look at Table 78 (or search for RDIDN_4_0) and Figure 28.
>> > For Figure 28 in this datasheet, I think it means that data latch
>> > while DS raising and falling edge.
>> > The data arrangement of read id follow the 9.2(Manufacturer and Device
>> > ID).
>> > As below are the data arrangement for vendors.
>> > For Infineon, a-b-c-d-e-f
>> > For Micron, a-b-c-d-e-f
>> > For Macronix, a-a-b-b-c-c
>> 
>> So there is no standard among vendors, infineon as well as micron is
>> using 8d8d8d and macronix is using 8d8d8s. And - please correct me if
> Macronix read id operation is not 8d8d8s, it just look like 8d8d8s on 
> datasheet
> but flash send 2 bytes data per DQS cycle exactly.

Two DQS edges, yes.

> I think whether to use 8d or 8s depends on how many times data is 
> latched
> within per cycle.

I see and I agree with you. The flash behaves like it's in 8d8d8d mode, 
but
just send every byte of the id twice. Well, then I'd argue, it's a quirk 
of
your flash.

So Tudor and Pratyush want to hide that away in macronix.c. I would like 
to
see this handled in the core, because all flashes do the very same after
switching to octal mode and that is trying to do a rdid and see whether
they got a sane response. And during cleanup I noticed that this code is
pretty much copy and paste among all these flashes and looks very
open-coded.

But to move forward here, keep it in macronix.c.

>> I'm wrong - the data strobe signal is optional.
> As I know, data strobe signal is needed when 8D-8D-8D mode.
> Infineon data strobe signal called "DS".
> Macronix and Micron data strobe signal called "DQS"

Maybe Pratyush can help here. But as far as I know, the data strobe
is optional. E.g. on a layerscape ls1028 you can use an internal dummy
strobe if it's not connected. The timing is then determined by pad
delays.

-michael



More information about the linux-mtd mailing list