From eLinux.org
< R-Car
Revision as of 06:40, 7 December 2020 by Geert (talk | contribs) (Update zImage load address to avoid having to copy the compressed kernel image)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


This is the Wiki for the Renesas R-Car M2-W Koelsch board (RTP0RC7791SEB00010S). Refer to the R-Car page for information about Renesas' R-Car SoC family.

Serial Console

Use a micro-USB cable to connect to "Debug Serial 0". Serial settings are 115200 8N1.

Booting Linux

 * Kernel config: shmobile_defconfig
 * Kernel image: arch/arm/boot/zImage
 * DTB: arch/arm/boot/dts/r8a7791-koelsch.dtb

U-Boot boot command:

tftp 42000000 zImage
tftp 50000000 r8a7791-koelsch.dtb
bootz 42000000 - 50000000

Make sure 'fdt_high' is set to 0xffffffff!



The system can be suspended using:

echo mem > /sys/power/state

Wake-Up Sources

Suspend-to-RAM supports the following wake-up sources:

  • gpio-keys: Wake-up using either:
    • Slide switches SW2-1..SW2-4
    • Push buttons SW30..SW26
  • sh_eth (Ethernet): Configure using one of:
ethtool -s eth0 wol g # Enable wake on MagicPacket
ethtool -s eth0 wol d # Disable

Wake-up by sending a MagicPacket from another system using:

wakeonlan <mac-address> | <hostname> | <ip-address> # <hostname> or <ip-address> must be in /etc/ethers
  • sh-sci (Serial): Disabled by default
  • usb: Disabled by default


Updating U-Boot

You may want to update U-Boot in case of upgrade or if the board you received does not have the U-Boot flashed. Follow these steps carefully to flash U-Boot:

  1. Set SW17 to pin 3 side. This selects 4MB SPI Flash with MiniMonitor as a boot device.
    Switch pin layout
    MiniMonitor is loaded via SPI boot interface of R-Car M2.
  2. Connect to serial console over microUSB.
    minicom -b 38400 -D DEVICE
  3. Switch the board ON or reset it.
    You should see the following output on the console (version numbers can be different):
    | KOELSCH SPI_BOOT_LOADER             V0.04 2013.07.03 |                                                                                                                                              
    |       -----   QUAD READ (DMA Version)   -----        |                                                                                                                                              
     SPI BOOT DEVICE : S25FL032                                                                                                                                                                           
     Now Loading ... ok                                                                                                                                                                                   
    KOELSCH MiniMonitor SPI_BOOT                                                                                                                                                                          
     Work memory DRAM (H'40200000-)                                                                                                                                                                       
     2013.07.16 Ver0.04 ** Program on DRAM (H'40000000-)  **
  4. Execute the ls command:
    > ls
    Load Program to Spiflash memory (U16:S25FL512S)
  5. You should be able to see the following output:
    SW18[5:1]=OFF! Setting OK? (Push Y key)

    Enter y to confirm.

  6. You should be able to see the following output:
    SW16 1pin-Side! Setting OK? (Push Y key)

    Enter y to confirm.

  7. You should be able to see the following output:
    SW17 1pin-Side! Setting OK? (Push Y key)

    Set SW17 to pin 1 side then enter y to confirm.
    Switch pin layout

  8. You should be able to see the following output:
    Load Program to Spiflash memory (U16:S25FL512S)                                                                                                                                                       
    Please select,SPI-FLASH Save Area.                                                                                                                                                                    
     1:Loader Program : Program to execute on SecureRAM                                                                                                                                                   
            SPI_Address = H' 000_0000-H' 003_FFFF                                                                                                                                                         
     2:User Program : Program to execute on DRAM or SecureRAM                                                                                                                                             
            SPI_Address = H' 008_0000-H' 3FF_FFFF                                                                                                                                                         
      Select area(1-2)>

    Select area by entering 2 and pressing <enter>.

  9. You should be able to see the following output:
    -- User Program ----------------------------                                                                                                                                                          
    Please Input User Program Start Address :

    Enter program address e6304000 and press <enter>.

  10. You should be able to see the following output:
    Work RAM(H'50000000-H'53FFFFFF) Clear....         
    please send ! ('.' & CR stop load)

    Now you need to send the new U-Boot image in srec format over the serial console. There are different ways of doing this in in different terminal applications, here minicom is used.

    Use Ctrl+A, S, choose ascii, then locate u-boot.srec file and hit <enter>. Transmission should start immediately and the progress counter should be displayed, once the transmission is finished you should be able to see the following:

    +------------[ascii upload - Press CTRL-C to quit]------------+                                         
    |ASCII upload of "u-boot.srec"                                |                                         
    |                                                             |                                         
    |678.6 Kbytes transferred at 3839 CPS... Done.                |                                         
    |                                                             |                                         
    | READY: press any key to continue...                         |                                         
    |                                                             |                                         
    |                                                             |                                         

    Press <enter> to confirm.

  11. You should be able to see the following output:
    SPI Data Clear(H'FF) Check :H'00080000-000BFFFF,Clear OK?(y/n)

    Enter y to confirm.

  12. You should be able to see the following output:
    SAVE SPI-FLASH....... complete!                                                                                  
    ==========  SPI Flash Sector1 Save Information  =========                                                        
     Program Start Address :  H'E6304000                                                                             
     Program Size          :  H'000388BC                                                                             

    U-Boot is now updated, reset the board and try it out!

    Remember to change baud rate if you are using something different then 38400.

  13. If you are updating from a old U-Boot version which already had a environment present make sure that the following variables are present in your new U-Boot environment (values for variables are the default ones but might be different on other systems?).

Test procedures