LS1012A custom board not detect spi flash

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

LS1012A custom board not detect spi flash

Jump to solution
368 Views
fxc-miya
Contributor I

Hello,

I created u-boot image using Yocto using following commands:

 

repo init -u https://github.com/nxp-qoriq/yocto-sdk -b kirkstone
repo sync
. setup-env -m ls1012afrwy
bitbake u-boot-qoriq

 

The custom board was created based on ls1012a-frwy, and the qspi flash was changed to mx25u12832f.Therefore, the definition of qspiflash was changed in dts file(fsl-ls1012a-frwy.dts).

And config file (configs/ls1012afrwy_qspi_defconfig) is changed following

 

CONFIG_SPI_FLASH_WINBOND=y  ---> CONFIG_SPI_FLASH_MACRONIX=y

 

Build u-boot image and RCW binary is write to flash via external spi-flash writer.

Then booting up. Bootloader can not recognizes the flash chip:

Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
 
Boot log:

 

U-Boot 2022.04+fsl+g181859317b (Nov 15 2022 - 06:28:05 +0000)

SoC:  LS1012A Rev2.0 (0x87040120)
Clock Configuration:
       CPU0(A53):1000 MHz
       Bus:      250  MHz  DDR:      1000 MT/s
Reset Configuration Word (RCW):
       00000000: 0800000a 00000000 00000000 00000000
       00000010: 33050000 c000000c 40000000 00001800
       00000020: 00000000 00000000 00000000 00004562
       00000030: 00000000 10802120 00000096 00000000
DRAM:  446 MiB
Core:  11 devices, 8 uclasses, devicetree: separate
Using SERDES1 Protocol: 13061 (0x3305)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  0
=> 

 

 

 

Labels (1)
0 Kudos
1 Solution
272 Views
yipingwang
NXP TechSupport
NXP TechSupport

You should read qspi with the following commands.

=> sf probe 0:0
SF: Detected w25q16dw with page size 256 Bytes, erase size 4 KiB, total 2 MiB
=> sf read 0x82000000 0 100
device 0 offset 0x0, size 0x100
SF: 256 bytes @ 0x0 Read: OK
=> md 0x82000000 100
82000000: 01ee0100 aa55aa55 00000000 0800000a ....U.U.........
82000010: 00000000 00000000 c000000c 33050000 ...............3
82000020: 00001800 40000000 00000000 00000000 .......@........
82000030: 000c47f2 00000000 1082a120 00000000 .G...... .......
82000040: 00000000 00000096 40100000 09570604 ...........@..W.
82000050: 50100000 0957015c 00000000 09570600 ...P\.W.......W.
82000060: 0000009c 09570418 00502880 09ea08dc ......W..(P.....
82000070: 00010000 09ee1a00 10000000 09570604 ..............W.
82000080: 00001000 09570158 000fffff 096100c0 ....X.W.......a.
82000090: f40300aa 81000000 f60302aa f50301aa ................
820000a0: 000681d2 f70303aa 00101ed5 a018a6f2 ................
820000b0: 007f0110 df3f03d5 df3f03d5 00c01ed5 ......?...?.....
820000c0: 410182d2 6b000094 000001aa 00103ed5 ...A...k.....>..
820000d0: 81000040 00101ed5 004780d2 df3f03d5 @.........G...?.
820000e0: 000090d2 00111ed5 20131ed5 2010a0f2 ........... ...
820000f0: 009c1bd5 001c80d2 000080d2 ff4403d5 ..............D.
82000100: aa1e03fd 58000360 94001178 58000320 ....`..Xx... ..X
82000110: 58000341 94001186 aa1d03fe d65f03c0 A..X.........._.
82000120: 58000280 1400118b d65f03c0 1000b6a0 ...X......_.....
82000130: d5384241 f100303f 540000a0 f100203f AB8.?0.....T? ..
82000140: 540000a0 f100103f 540000a0 d51ec000 ...T?......T....
82000150: 14000004 d51cc000 14000002 d518c000 ................
82000160: d65f03c0 17ffffb2 017d7840 00000000 .._.....@x}.....
82000170: 01401000 00000000 01402000 00000000 ..@...... @.....
82000180: 90000000 f9459c01 b9400020 32070000 ......E. .@....2

View solution in original post

0 Kudos
3 Replies
285 Views
fxc-miya
Contributor I

I tried adding "CONFIG_FSL_QSPI=y" in u-boot configuratoin.

As a result, the Flash device was recognized.

U-Boot 2022.04+fsl+g181859317b (Nov 15 2022 - 06:28:05 +0000)

SoC:  LS1012A Rev2.0 (0x87040120)
Clock Configuration:
       CPU0(A53):1000 MHz
       Bus:      250  MHz  DDR:      1000 MT/s
Reset Configuration Word (RCW):
       00000000: 0800000a 00000000 00000000 00000000
       00000010: 33050000 c000000c 40000000 00001800
       00000020: 00000000 00000000 00000000 00004562
       00000030: 00000000 10802120 00000096 00000000
DRAM:  446 MiB
PPA Firmware: Version LSDK-18.09
Core:  12 devices, 9 uclasses, devicetree: fit
Using SERDES1 Protocol: 13061 (0x3305)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from SPIFlash... SF: Detected mx25u12832f with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
In:    serial
Out:   serial
Err:   serial
Model: LEX3891-2QF Board
Board: LEX3891-2QF DIPSW: 03740000
Net:   No ethernet found.
Hit any key to stop autoboot:  0
=>


However, if you dump the memory address of Flash space, it will be reset.

=> md 40010000
"Synchronous Abort" handler, esr 0x96000210
elr: 0000000040169860 lr : 00000000401697ac (reloc)
elr: 000000009bdaf860 lr : 000000009bdaf7ac
x0 : 0000000000000009 x1 : 000000009b842768
x2 : 00000000fffffffe x3 : 0000000000000020
x4 : 0000000000000000 x5 : 000000009b842760
x6 : 0000000000000030 x7 : 000000009b8426b0
x8 : 0000000000000010 x9 : 0000000000000008
x10: 00000000ffffffd8 x11: 0000000000000010
x12: 000000000001869f x13: 000000009b8429d8
x14: 000000009b842ae0 x15: 0000000000000021
x16: 000000009bd57554 x17: 0000ffff83d53560
x18: 000000009b843dc0 x19: 0000000000000004
x20: 0000000000000004 x21: 0000000000000004
x22: 0000000040010000 x23: 000000009b842769
x24: 0000000000000000 x25: 000000009b842718
x26: 000000009bdc7ade x27: 0000000000000008
x28: 0000000000000004 x29: 000000009b8426b0

Code: 2a0403f3 17ffffca 7100129f 54000181 (b94002c3)
Resetting CPU ...

### ERROR ### Please RESET the board ###


Is there any way to prevent this?

0 Kudos
273 Views
yipingwang
NXP TechSupport
NXP TechSupport

You should read qspi with the following commands.

=> sf probe 0:0
SF: Detected w25q16dw with page size 256 Bytes, erase size 4 KiB, total 2 MiB
=> sf read 0x82000000 0 100
device 0 offset 0x0, size 0x100
SF: 256 bytes @ 0x0 Read: OK
=> md 0x82000000 100
82000000: 01ee0100 aa55aa55 00000000 0800000a ....U.U.........
82000010: 00000000 00000000 c000000c 33050000 ...............3
82000020: 00001800 40000000 00000000 00000000 .......@........
82000030: 000c47f2 00000000 1082a120 00000000 .G...... .......
82000040: 00000000 00000096 40100000 09570604 ...........@..W.
82000050: 50100000 0957015c 00000000 09570600 ...P\.W.......W.
82000060: 0000009c 09570418 00502880 09ea08dc ......W..(P.....
82000070: 00010000 09ee1a00 10000000 09570604 ..............W.
82000080: 00001000 09570158 000fffff 096100c0 ....X.W.......a.
82000090: f40300aa 81000000 f60302aa f50301aa ................
820000a0: 000681d2 f70303aa 00101ed5 a018a6f2 ................
820000b0: 007f0110 df3f03d5 df3f03d5 00c01ed5 ......?...?.....
820000c0: 410182d2 6b000094 000001aa 00103ed5 ...A...k.....>..
820000d0: 81000040 00101ed5 004780d2 df3f03d5 @.........G...?.
820000e0: 000090d2 00111ed5 20131ed5 2010a0f2 ........... ...
820000f0: 009c1bd5 001c80d2 000080d2 ff4403d5 ..............D.
82000100: aa1e03fd 58000360 94001178 58000320 ....`..Xx... ..X
82000110: 58000341 94001186 aa1d03fe d65f03c0 A..X.........._.
82000120: 58000280 1400118b d65f03c0 1000b6a0 ...X......_.....
82000130: d5384241 f100303f 540000a0 f100203f AB8.?0.....T? ..
82000140: 540000a0 f100103f 540000a0 d51ec000 ...T?......T....
82000150: 14000004 d51cc000 14000002 d518c000 ................
82000160: d65f03c0 17ffffb2 017d7840 00000000 .._.....@x}.....
82000170: 01401000 00000000 01402000 00000000 ..@...... @.....
82000180: 90000000 f9459c01 b9400020 32070000 ......E. .@....2

0 Kudos
292 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following topic to modify u-boot source code.

https://community.nxp.com/t5/Layerscape/LS1046A-custom-board-starting-u-boot/td-p/1548518

0 Kudos