LS2088A QSPI flash corrupting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS2088A QSPI flash corrupting

1,479 Views
yutiamonkar
Contributor I

Hi 

I am using MT25Q512A QSPI flash for a custom LS2088A board.I am able to boot the board by flashing PBL and uboot into the QSPI flash.I am using the following partitions in the QSPI Flash:

 
0x0            -   0xFFFF       --- PBL (64KB)
0x10000    -   0x10FFFF   --- U-boot(1MB)
0x110000  -   0xE0FFFF   --- Kernel(13MB)
0xE10000  -   0xE1FFFF   --- DTB(64KB)
0xE20000  -   0x171FFFF  --- Ramdisk(9MB)
0x2910000 -   0x2E0FFFF  --- MC(5MB)
0x2E10000 -   0x2E1FFFF  --- DPC(64KB)
0x2E20000 -   0x2E2FFFF  --- DPL(64KB)
 
I am able to flash PBL, Uboot, kernel, MC, DPC, DPL into the flash in U-Boot using sf commands. But when I try to flash the ramdisk it is corrupting the flash and I am unable to boot the board. But when I flash the ramdisk alone without kernel image then it is not corrupting the flash.
Labels (1)
0 Kudos
8 Replies

1,003 Views
pradeep_t
Contributor III

Hi Ufedor,

We are also facing same issue, can we get the solution

0 Kudos

1,003 Views
yutiamonkar
Contributor I

Hi 

How to set the QSPI in 32bit mode? In u-boot code they have mentioned the following about 4-Byte addressing mode:

/*
* So far, the 4-byte address mode haven't been supported in U-Boot,
* and make sure the chip (> 16MiB) in default 3-byte address mode,
* in case of warm bootup, the chip was set to 4-byte mode in kernel.
*/

if (flash->size >> (flash->dual_flash & SF_DUAL_STACKED_FLASH ? 1 : 0)
> SPI_FLASH_16MB_BOUN) {
if (spi_flash_cmd_4B_addr_switch(flash, false, idcode[0]) < 0)
debug("SF: enter 3B address mode failed\n");
}

0 Kudos

1,003 Views
ufedor
NXP Employee
NXP Employee

Please create a Technical Case:

https://community.freescale.com/thread/381898 

0 Kudos

1,003 Views
yutiamonkar
Contributor I

Hi 
After flashing kernel/ramdisk,if I write any file greater than 5MB into the consecutive location,it corrupts the previous partitions of the flash.For eg:If I flash kernel at 0x110000 location and then write any file greater than 5 MB consecutive to this location (0xE10000) it corrupts the flash.

0 Kudos

1,002 Views
ufedor
NXP Employee
NXP Employee

It looks like the QSPI is operating in 24-bit mode.

0 Kudos

1,002 Views
yutiamonkar
Contributor I

Hi 

Please find attached the uboot and spi flash programming operation logs.

0 Kudos

1,002 Views
ufedor
NXP Employee
NXP Employee

From the provided logs it is not clear how the issue manifests itself.

Also, what exactly means:

> when I flash the ramdisk alone without kernel image then it is not corrupting the flash.

0 Kudos

1,002 Views
ufedor
NXP Employee
NXP Employee

Please provide U-Boot booting log and log for all the SPI flash programming operations.

0 Kudos