hi everbody
i like to use qspi spi-nor on imx7dsabresd
i depoluated and polulated related Resistors
with mx7dsaresd_defconfig i added some define in imx7dsabresd.h and qspi related device tree ( i like to support sd and qspi and nand in u-boot)
what did i miss ? or how can i debug this problems ?
these are what i added in imx7dsabresd.h
#define CONFIG_FSL_QSPI
#define CONFIG_CMD_SF
#define CONFIG_MTD
#define CONFIG_DM_SPI_FLASH
#define CONFIG_SPI_FLASH
#define CONFIG_SF_DEFAULT_MODE 0
#define CONFIG_SF_FLASH_MACTRONIX
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
in u-boot i can probe qspi nor flash but i can't write or read ( not sure which is wrong , maybe both)
if i read spi-nor flash , no error messag but nothing is read
--- from u-boot console
=>
=> sf probe
SF: Detected mx25l51245g with page size 256 Bytes, erase size 64 KiB, total 64 MiB
=>
=> setenv ipaddr 10.1.1.177; setenv serverip 10.1.1.39
=> tftp 0x83000000 u-boot.tmp4 // this is for test bin
Using ethernet@30be0000 device
TFTP from server 10.1.1.39; our IP address is 10.1.1.177
Filename 'u-boot.tmp4'.
Load address: 0x83000000
Loading: #########################################
6.5 MiB/s
done
Bytes transferred = 588800 (8fc00 hex)
=> sf write 0x83000000 0 $filesize
device 0 offset 0x0, size 0x8fc00
SF: 588800 bytes @ 0x0 Written: OK
=> sf read 0x84000000 0 $filesize
device 0 offset 0x0, size 0x8fc00
SF: 588800 bytes @ 0x0 Read: OK
=> md 0x84000000 // no date was read from spi-nor
84000000: 00000000 00000800 00200000 00000000 .......... .....
84000010: 00000000 00000000 00000000 00000000 ................
84000020: 00000000 00000000 04000000 00000000 ................
84000030: 00080000 00000000 00000000 00000000 ................
84000040: 00002000 00000000 00000000 00000000 . ..............
84000050: 00000000 00000000 00020000 00000000 ................
84000060: 00000000 00000000 00000000 00000000 ................
84000070: 00000000 00000000 00400400 00000000 ..........@.....
84000080: 00000000 00000000 00000000 00000000 ................
84000090: 00000000 00000000 00000000 00000000 ................
840000a0: 00000000 00000000 20000000 00000000 ........... ....
840000b0: 00000000 00000000 00200000 00000000 .......... .....
840000c0: 00000000 00000000 00800000 00000000 ................
840000d0: 00000000 00000000 00000000 00400000 ..............@.
840000e0: 00000000 00000000 00000000 00000000 ................
840000f0: 00020000 00000000 00000000 00000000 ................
=> md 0x83000000
83000000: 402000d1 87800000 00000000 877ff42c .. @........,...
83000010: 877ff420 877ff400 00000000 00000000 ...............
83000020: 877ff000 00090000 00000000 40c401d2 ...............@
83000030: 047c01cc 04003430 0500404f 88033630 ..|.04..O@..06..
83000040: 00000040 84033630 00000040 00103930 @...06..@...09..
83000050: 02000000 00007a30 01000401 a0017a30 ....0z......0z..
83000060: 03004080 a4017a30 20001000 a8017a30 .@..0z..... 0z..
83000070: 04001080 64007a30 46004000 90047a30 ....0z.d.@.F0z..
83000080: 01000000 d0007a30 83000200 d4007a30 ....0z......0z..
83000090: 00006900 dc007a30 04003009 e0007a30 .i..0z...0..0z..
830000a0: 00000804 e4007a30 04001000 f4007a30 ....0z......0z..
830000b0: 3f030000 00017a30 09110809 04017a30 ...?0z......0z..
830000c0: 0d020700 08017a30 07040403 0c017a30 ....0z......0z..
830000d0: 06200000 10017a30 05020204 14017a30 .. .0z......0z..
830000e0: 02020303 20017a30 03080000 80017a30 ....0z. ....0z..
830000f0: 20008000 84017a30 00010002 90017a30 ... 0z......0z..
thank you
Hi Hyoung
one can try to use proper dts files:
https://community.nxp.com/t5/i-MX-Processors/iMX7D-boot-from-QSPI-NOR-flash/m-p/716311
Best regards
igor
hi igor
i did it already, in u-boot wth dm command i can see that device tree node
eth_phy_ge 1 [ + ] eth_phy_generic_drv | | `-- ethernet-phy@1
spi 0 [ + ] fsl_qspi | |-- spi@30bb0000
spi_flash 0 [ + ] spi_flash_std | | `-- mx25l51245g@0
is there any thing i shoud check ?
thank you