Re: [PATCH v2 3/4] dt-bindings: mtd: macronix,mx25l12833f: add SPI-NOR chip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 1 Jul 2024 at 12:15, Tudor Ambarus <tudor.ambarus@xxxxxxxxxx> wrote:
>
>
>
> On 7/1/24 10:46 AM, Erez wrote:
> > When using mx25l12805d, we do not read SFDP.
> > As it uses the no-SFDP flags.
> > When using mx25l12833f hardware with mx25l12805d driver, it did not
> > try to read the SFDP.
> > Yet mx25l12833f does have SFDP, when I remove the no-SFDP flags, the
> > driver fetch the SFDP.
> >
> > Secondly SFDP does not contain OTP information.
> >
> > mx25l12805d has two OTP regions of 128 KiB and 384 KiB (yes asymmetric).
> > While mx25l12833f has two OTP regions of 512 KiB.
> >
> > How do we handle it?
>
> You would first try to parse SFDP and initialize the flash based on
> SFDP. If there's no SFDP then you fallback to the flags declared at
> flash declaration. Esben had a try recently, see [1]. I don't know if
> there's any progress in that direction.

That's great. I probably haven't seen it yet, as I used kernel 6.5 based.
However the OTP is not in the SFDP.
Reading the SFDP with "mx25l12805d" does improve :-)
if a user wants to use the OTP, he must specify "mx25l12833f".
Perhaps less likely, but yet no other solution for OTP at the moment.
I would not go to a kernel config for this.

>
> Also, you haven't mentioned anything about the testing. Do you have the
> flash?

I test the code with mx25l12833f hardware, with an older version of
the kernel, 6.5 I think.
It is a kernel provided by Microchip with their setting, The SPI-NOR
driver is vanilla.

In my testing using kernel 6.5 with a Microchip based board.
Before changing, the kernel driver, was using the "mx25l12805d"
setting and did NOT read the SFDP.
Once I added the "mx25l12833f" without any no-sfdp flags, the driver
did read the SFDP.
The driver can find "mx25l12833f" with a read ID, once I remove the
"mx25l12805d" setting, I did test that too.
Adding the new 'SPI_NOR_TRY_SFDP' is great. but does not provide proper OTP!

All the testings were done using the same mx25l12833f hardware, only
the settings in the driver were changed.

I am no longer in contact with the company that provides me the hardware.
And as this is a Microchip based hardware it is difficult to use the
latest kernel.

Anyhow as mx25l12805d hardware has not been sold since 2010, it is
hard to get one.
I do not want to change any setting of mx25l12805d without testing!

Anyhow my patch is focused on the new Macronix OTP callbacks.
I do not care about the "mx25l12833f" or "mx25l12805d" compatibilities
or settings.
If I had a different Macronix chip with a unique ID, I would gladly test it.

I only add them as the kernel rule is that new functions must be used
and tested with real hardware.

Erez

>
> [1]
> https://lore.kernel.org/linux-mtd/20240603-macronix-mx25l3205d-fixups-v2-0-ff98da26835c@xxxxxxxxxx/




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux