[PATCH] mtd: mxs_nand_spl: fix nand_command protocol violation

Tom Rini trini at konsulko.com
Wed Jun 29 15:47:03 CEST 2022


On Tue, Jun 21, 2022 at 10:05:10PM +0200, Michael Trimarchi wrote:

> From: Andrea Scian <andrea.scian at dave.eu>
> 
> mxs_nand_command() implementation assume that it's working with a
> LP NAND, which is a common case nowadays and thus uses two bytes
> for column address.
> 
> However this is wrong for NAND_CMD_READID and NAND_CMD_PARAM, which
> expects only one byte of column address, even for LP NANDs.
> This leads to ONFI detection problem with some NAND manufacturer (like
> Winbond) but not with others (like Samsung and Spansion)
> 
> We fix this with a simple workaround to avoid the 2nd byte column address
> for those two commands.
> 
> Also align the code with nand_base to support 16 bit devices.
> 
> Tested on an iMX6SX device with:
> * Winbond W29N04GVSIAA
> * Spansion S34ML04G100TF100
> * Samsung K9F4G08U00
> 
> Tested on imx8mn device with:
> * Windbond W29N04GV
> 
> Signed-off-by: Andrea Scian <andrea.scian at dave.eu>
> CC: Stefano Babic <sbabic at denx.de>
> Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>
> Reviewed-by: Fabio Estevam <festevam at denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220629/64903a7c/attachment.sig>


More information about the U-Boot mailing list