Help needed with uboot for CHIP
Maxime Ripard
maxime at cerno.tech
Mon Mar 22 19:28:09 CET 2021
Hi,
On Sun, Mar 21, 2021 at 08:04:08PM +0530, Gunjan Gupta wrote:
> I figured out the why SPL was not loading U-Boot from NAND.
>
> Apparently the logic to use PIO instead of DMA that was introduced in
> 6ddbb1e936c78cdef1e7395039fa7020c5c75326
> <https://github.com/u-boot/u-boot/commit/6ddbb1e936c78cdef1e7395039fa7020c5c75326>
> may
> be was not as generic as it was supposed to be. I tried adding hexdump in
> nand_read_page and found that on CHIP the logic was not reading and real
> data. Instead all of the bytes were set to 0s.
>
> I have created a patch to provide an option to use the older version of
> nand_read_page function that was present just before the above mentioned
> commit.
>
> With the attached patches and some config changes the Upstream U-Boot works
> fine on CHIP. I have tested the attached patches on CHIP with 8GB Hynix
> nand along with the following extra configurations.
An MLC NAND without proper support will work fine until it won't. I
would strongly discourage you to use it.
> CONFIG_MTD=y
> CONFIG_CMD_MTD=y
> CONFIG_CMD_MTDPARTS=y
> CONFIG_MTDIDS_DEFAULT="nand0=sunxi-nand.0"
> CONFIG_MTDPARTS_DEFAULT="mtdparts=sunxi-nand.0:4m(spl),4m(spl-backup),4m(uboot),4m(env),-(yaffs2)"
> CONFIG_MTD_RAW_NAND=y
> CONFIG_SYS_NAND_BLOCK_SIZE=0x400000
> CONFIG_SYS_NAND_PAGE_SIZE=0x4000
> CONFIG_SYS_NAND_OOBSIZE=0x680
> CONFIG_ENV_IS_IN_NAND=y
> CONFIG_ENV_SIZE=0x400000
> CONFIG_ENV_OFFSET=0xc00000
> CONFIG_FASTBOOT_FLASH_NAND=y
> CONFIG_YAFFS2=y
>
> @Andre will it be possible to get the attached patches merged into the
> U-Boot?
And we definitely shouldn't make it easy
Maxime
More information about the U-Boot
mailing list