QSPI Flash erase/program problem in LS2085A based Platform

cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI Flash erase/program problem in LS2085A based Platform

1,386 Views
jitenpatel
Contributor II

Hi all,

I am using custom based board based on LS2085A QDS. I am booting the board from QSPI Flash (S25FS256S). I am able to create partitions on QSPI flash but not able to do erase/read/program on any partition. I am using kernel version 4.1.r0 that comes with EAR6 release.

Below are the dmesg logs for fsl-qauadsp driver probe:-

[    1.272892] fsl-quadspi 20c0000.quadspi: s25fs256s1 (32768 Kbytes)

[    1.303815] 7 ofpart partitions found on MTD device 20c0000.quadspi

[    1.310081] Creating 7 MTD partitions on "20c0000.quadspi":

[    1.315659] 0x000000000000-0x000000020000 : "PBL"

[    1.320752] 0x000000020000-0x0000000c0000 : "U-BOOT"

[    1.326037] 0x0000000c0000-0x0000000e0000 : "U-BOOT_ENV"

[    1.331653] 0x0000000e0000-0x000000100000 : "DPL"

[    1.336666] 0x000000100000-0x000000120000 : "DPC"

[    1.341668] 0x000000120000-0x0000003a0000 : "MC"

[    1.346591] 0x0000003a0000-0x0000003c0000 : "DTB"

[    1.351615] fsl-quadspi 20c0000.quadspi: Unsupported cmd 0x13

When I am trying to erase/program using mtd-utils (flash_erase/flashcp commands), I am getting the below logs:-

root@ls2085aqds:~# flash_erase /dev/mtd3 0 0

Erasing 64 Kiby[  287.824907] fsl-quadspi 20c0000.quadspi: Unsupported cmd 0xdc

te @ 0 --  0 % c[  287.832067] fsl-quadspi 20c0000.quadspi: Unsupported cmd 0xdc

Erasing 64 Kibyte @ 10000 -- 100 % complete

root@ls2085aqds:~# flashcp datafile /dev/mtd3

[  437.314467] fsl-quadspi 20c0000.quadspi: Unsupported cmd 0xdc

QSPI flash(S25FS256S) supports the commands (0xdc)for sector erase.Can anyone tell what could be the problem.

Labels (1)
Tags (1)
0 Kudos
6 Replies

294 Views
ralfgoebel
Contributor III

Hi,

I think that a flash size of more than 16 MB requires usage of 4-byte-address commands (see spi_nor_scan() in drivers/mtd/spi-nor/spi-nor.c). But the LS QSPI driver seems to implement only the basic 3-byte-address commands (=> drivers/mtd/spi-nor/fsl-quadspi.c).

Ralf

0 Kudos

294 Views
dhruvalkumarpat
Contributor III

My flash part(s25fl164k) is 8MB in size. So it shouldn't matter  I guess.

0 Kudos

294 Views
ralfgoebel
Contributor III

Are you really getting the same command code 0xdc in the error message?

Ralf

0 Kudos

294 Views
dhruvalkumarpat
Contributor III

What I meant by same error means I am not been able to read or write at all and my screen get freeze. I did not get any error message and I have to reboot the system. Also when I boot up I get "Unsupported cmd 0x03"  error message.

Thanks

Dhruval

0 Kudos

294 Views
dhruvalkumarpat
Contributor III

Following changes in spi-nor.c  solved my problem .

{ "s25fl164k",  INFO(0x014017,      0,  64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

Thanks

Dhruval

0 Kudos

294 Views
dhruvalkumarpat
Contributor III

Having similar problem , my board is based on ls1021aiot and uses ls1020a processor. I am using s25fl164k part . My u-boot resides in qspi flash but at linux I can not access qspi because of the exact same issue mentioned above.

Thanks

Dhruval

0 Kudos