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