xref: /OK3568_Linux_fs/u-boot/doc/SPI/README.sh_qspi_test (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun-------------------------------------------------
2*4882a593Smuzhiyun   Simple steps used to test the SH-QSPI at U-Boot
3*4882a593Smuzhiyun-------------------------------------------------
4*4882a593Smuzhiyun
5*4882a593Smuzhiyun#0, Currently, SH-QSPI is used by lager board (Renesas ARM SoC R8A7790)
6*4882a593Smuzhiyun    and koelsch board (Renesas ARM SoC R8A7791). These boot from SPI ROM
7*4882a593Smuzhiyun    basically. Thus, U-Boot start, SH-QSPI will is operating normally.
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun#1, build U-Boot and load u-boot.bin
10*4882a593Smuzhiyun
11*4882a593Smuzhiyun  => tftpboot 40000000 u-boot.bin
12*4882a593Smuzhiyun  sh_eth Waiting for PHY auto negotiation to complete.. done
13*4882a593Smuzhiyun  sh_eth: 100Base/Half
14*4882a593Smuzhiyun  Using sh_eth device
15*4882a593Smuzhiyun  TFTP from server 192.168.169.1; our IP address is 192.168.169.79
16*4882a593Smuzhiyun  Filename 'u-boot.bin'.
17*4882a593Smuzhiyun  Load address: 0x40000000
18*4882a593Smuzhiyun  Loading: ############
19*4882a593Smuzhiyun    2.5 MiB/s
20*4882a593Smuzhiyun  done
21*4882a593Smuzhiyun  Bytes transferred = 175364 (2ad04 hex)
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun#2, Commands to erase/write u-boot to flash device
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun  Note: This method is description of the lager board. If you want to use the
26*4882a593Smuzhiyun  other boards, please change the value according to each environment.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  =>  sf probe 0
29*4882a593Smuzhiyun  SF: Detected S25FL512S_256K with page size 512 Bytes, erase size 64 KiB, total 64 MiB
30*4882a593Smuzhiyun  => sf erase 80000 40000
31*4882a593Smuzhiyun  SF: 262144 bytes @ 0x80000 Erased: OK
32*4882a593Smuzhiyun  => sf write 40000000 80000 175364
33*4882a593Smuzhiyun  SF: 1528676 bytes @ 0x80000 Written: OK
34*4882a593Smuzhiyun  =>
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun#3, Push reset button.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun  If you're written correctly and driver works properly, U-Boot starts.
39