u-boot/drivers/mtd
Andrea Scian 05dcb5be50 mtd: mxs_nand_spl: fix nand_command protocol violation
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@dave.eu>
CC: Stefano Babic <sbabic@denx.de>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2022-06-29 09:26:44 -04:00
..
nand mtd: mxs_nand_spl: fix nand_command protocol violation 2022-06-29 09:26:44 -04:00
onenand doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
spi spi: spi_flash_probe_bus_cs() rely on DT for spi speed and mode 2022-05-23 09:33:10 -04:00
ubi mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
ubispl drivers/mtd/ubispl/ubispl.c: Fix spelling of "mismatched". 2022-01-13 07:57:49 -05:00
altera_qspi.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
cfi_flash.c mtd: cfi: change CONFIG_SYS_MAX_FLASH_BANKS_DETECT as boolean 2022-01-21 14:01:35 -05:00
cfi_mtd.c mtd: cfi_mtd: populate mtd->dev with flash_info->dev 2022-02-01 10:56:25 +01:00
hbmc-am654.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
jedec_flash.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig Convert CONFIG_MTD_CONCAT to Kconfig 2022-05-11 09:22:24 -04:00
Makefile mtd: remove SPEAr flash driver st_smi 2021-09-24 12:09:47 -04:00
mtd-uclass.c dm: define LOG_CATEGORY for all uclass 2021-07-06 10:38:03 -06:00
mtd_uboot.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mtdconcat.c mtd: Remove mtd_erase_callback() entirely 2021-10-23 15:47:33 +05:30
mtdcore.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
mtdcore.h mtd: move definitions to enlarge their range 2018-09-20 20:10:49 +05:30
mtdpart.c mtd: Update the way partitions are parsed 2022-04-11 11:39:19 -04:00
pic32_flash.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
renesas_rpc_hf.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
stm32_flash.c common: Drop flash.h from common header 2020-05-18 14:53:28 -04:00
stm32_flash.h stm32: stm32f4: move flash driver to mtd driver location 2016-03-26 18:49:28 -04:00