Difference between revisions of "R-Car/Boards/Salvator-XS"

From eLinux.org
Jump to: navigation, search
(Improve section on WoL)
(Add wakeonlan <hostname>)
(9 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
= Introduction =
 
= Introduction =
  
This is the Wiki for the Renesas R-Car H3 ES2.0 and M3-W Salvator-XS (Salvator-X 2nd version) board (RTP0RC7795SIPB0012S resp. RTP0RC7796SIPB0012S).
+
This is the Wiki for the Renesas Salvator-XS (Salvator-X 2nd version) board, which is available in different versions, depending on the actual SiP mounted:
 +
* RTP0RC7795SIPB0012S (with R-Car H3 ES2.0),
 +
* RTP0RC7796SIPB0012S (with R-Car M3-W),
 +
* RTP0RC77965SIPB012S (with R-Car M3-N).
 
Refer to the [[R-Car]] page for information about Renesas' R-Car SoC family.
 
Refer to the [[R-Car]] page for information about Renesas' R-Car SoC family.
  
Line 10: Line 13:
 
Use a micro-USB cable to connect to "Debug Serial 0".
 
Use a micro-USB cable to connect to "Debug Serial 0".
 
Serial settings are 115200 8N1.
 
Serial settings are 115200 8N1.
 +
 +
Unfortunately the CP2102 USB-to-UART bridges on Salvator-XS boards have the same serial strings (0001 resp. 00002 for Debug Serial 0 resp. 1), complicating identifying consoles on multiple boards.
 +
If you have multiple boards connected to the same host and you want stable serial ports, there are two options:
 +
# Refer to the ports using the symbolic links under /dev/serial/by-path/, instead of the /dev/ttyUSB* names,
 +
# Program the ports' serial strings to your liking (e.g. salvator-xs-1884-debug0) using the tool at https://github.com/DiUS/cp210x-cfg, and refer to the ports using the symbolic links under /dev/serial/by-id/, instead of the /dev/ttyUSB* names.
  
 
= Booting Linux =
 
= Booting Linux =
Line 17: Line 25:
 
   * DTB: arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dtb (for R-Car H3)
 
   * DTB: arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dtb (for R-Car H3)
 
   * DTB: arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dtb (for R-Car M3-W)
 
   * DTB: arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dtb (for R-Car M3-W)
 +
  * DTB: arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dtb (for R-Car M3-N)
  
 
U-Boot boot command:
 
U-Boot boot command:
Line 23: Line 32:
 
tftpboot 0x49f00000 r8a7795-salvator-xs.dtb (for R-Car H3)
 
tftpboot 0x49f00000 r8a7795-salvator-xs.dtb (for R-Car H3)
 
tftpboot 0x49f00000 r8a7796-salvator-xs.dtb (for R-Car M3-W)
 
tftpboot 0x49f00000 r8a7796-salvator-xs.dtb (for R-Car M3-W)
 +
tftpboot 0x49f00000 r8a77965-salvator-xs.dtb (for R-Car M3-N)
 
booti 0x48080000 - 0x49f00000
 
booti 0x48080000 - 0x49f00000
 
</pre>
 
</pre>
 +
  
 
= Suspend-to-RAM =
 
= Suspend-to-RAM =
Line 36: Line 47:
  
 
Caveats:
 
Caveats:
* Before you can use the above, you must configure the PMIC for DDR Backup Mode first, using the command below, followed by switching SW23 off. Note that this must be repeated after each wake-up.
+
* Before you can use the above, you must configure the PMIC for DDR Backup Mode first, using the command below, followed by switching SW23 off:
 +
<pre>
 +
echo on > /sys/bus/i2c/drivers/bd9571mwv/*/bd9571mwv-regulator*/backup_mode
 +
</pre>
 +
* On kernels up to and including v4.18, the "backup_mode" sysfs file doesn't exist. Hence you must use i2cset instead, and repeat this operation after each wake-up:
 
<pre>
 
<pre>
 
i2cset -f -y 7 0x30 0x20 0x0F
 
i2cset -f -y 7 0x30 0x20 0x0F
Line 67: Line 82:
  
 
* gpio-keys: Not enabled in the upstream kernel due to sharing of GPIOs between switches and LEDs, but see [[#Remote Control|Remote Control]] below.
 
* gpio-keys: Not enabled in the upstream kernel due to sharing of GPIOs between switches and LEDs, but see [[#Remote Control|Remote Control]] below.
* ravb: Configure using one of:
+
* ravb (Ethernet): Configure using one of:
 
<pre>
 
<pre>
 
ethtool -s eth0 wol g # Enable wake on MagicPacket
 
ethtool -s eth0 wol g # Enable wake on MagicPacket
Line 74: Line 89:
 
Wake-up by sending a MagicPacket from another system using:
 
Wake-up by sending a MagicPacket from another system using:
 
<pre>
 
<pre>
wakeonlan <mac-address> | <ip-address> # <ip-address> must be in /etc/ethers
+
wakeonlan <mac-address> | <hostname> | <ip-address> # <hostname> or <ip-address> must be in /etc/ethers
 
</pre>
 
</pre>
* sh-sci: Disabled by default
+
* sh-sci (Serial): Disabled by default
 
* usb: Disabled by default
 
* usb: Disabled by default
  
Line 105: Line 120:
 
|EXIO-D pin 46
 
|EXIO-D pin 46
 
|Samtec QTE-020 or -040
 
|Samtec QTE-020 or -040
|Needs [https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/commit/?h=topic/board-farm&id=70f58c8b8c920b10913ea4dd442587e35e996e9b arm64: dts: salvator-common: Enable GP2_1 for wake-up]
+
|Needs ''arm64: dts: salvator-common: Enable GP2_1 for wake-up'' from [https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/board-farm renesas-drivers#topic/board-farm]
 
|-
 
|-
 
|ACC OFF
 
|ACC OFF
Line 113: Line 128:
 
|CN7 pin 4
 
|CN7 pin 4
 
|Samtec QTE-020 or -040, and 5¼ HDD power
 
|Samtec QTE-020 or -040, and 5¼ HDD power
|Pull high '''via 10K resistor''' to power off
+
|Pull high '''via 10K resistor''' to power off (47K to D12.0V might be better, cfr. [[R-Car/Boards/Ebisu|Ebisu]], but is untested)
 
|}
 
|}

Revision as of 22:54, 4 June 2019

Introduction

This is the Wiki for the Renesas Salvator-XS (Salvator-X 2nd version) board, which is available in different versions, depending on the actual SiP mounted:

  • RTP0RC7795SIPB0012S (with R-Car H3 ES2.0),
  • RTP0RC7796SIPB0012S (with R-Car M3-W),
  • RTP0RC77965SIPB012S (with R-Car M3-N).

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.

Unfortunately the CP2102 USB-to-UART bridges on Salvator-XS boards have the same serial strings (0001 resp. 00002 for Debug Serial 0 resp. 1), complicating identifying consoles on multiple boards. If you have multiple boards connected to the same host and you want stable serial ports, there are two options:

  1. Refer to the ports using the symbolic links under /dev/serial/by-path/, instead of the /dev/ttyUSB* names,
  2. Program the ports' serial strings to your liking (e.g. salvator-xs-1884-debug0) using the tool at https://github.com/DiUS/cp210x-cfg, and refer to the ports using the symbolic links under /dev/serial/by-id/, instead of the /dev/ttyUSB* names.

Booting Linux

 * Kernel config: defconfig
 * Kernel image: arch/arm64/boot/Image
 * DTB: arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dtb (for R-Car H3)
 * DTB: arch/arm64/boot/dts/renesas/r8a7796-salvator-xs.dtb (for R-Car M3-W)
 * DTB: arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dtb (for R-Car M3-N)

U-Boot boot command:

tftpboot 0x48080000 Image
tftpboot 0x49f00000 r8a7795-salvator-xs.dtb (for R-Car H3)
tftpboot 0x49f00000 r8a7796-salvator-xs.dtb (for R-Car M3-W)
tftpboot 0x49f00000 r8a77965-salvator-xs.dtb (for R-Car M3-N)
booti 0x48080000 - 0x49f00000


Suspend-to-RAM

PSCI System Suspend

The system can be suspended by triggering a PSCI System Suspend:

echo mem > /sys/power/state

Caveats:

  • Before you can use the above, you must configure the PMIC for DDR Backup Mode first, using the command below, followed by switching SW23 off:
echo on > /sys/bus/i2c/drivers/bd9571mwv/*/bd9571mwv-regulator*/backup_mode
  • On kernels up to and including v4.18, the "backup_mode" sysfs file doesn't exist. Hence you must use i2cset instead, and repeat this operation after each wake-up:
i2cset -f -y 7 0x30 0x20 0x0F
  • PSCI System Suspend supports wake-up by PMIC only. Switch SW23 on to resume the system.

Suspend-to-Idle

If you want to suspend the system, and wake up through other wake-up sources, you must use Suspend-to-Idle instead of PSCI System Suspend.

The system can be suspended ("frozen") using:

echo freeze > /sys/power/state

Alternatively (since v4.10), you can configure the system to use Suspend-to-Idle by default:

echo s2idle > /sys/power/mem_sleep

After that, you can suspend the system using the standard:

echo mem > /sys/power/state

Wake-Up Sources

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

  • gpio-keys: Not enabled in the upstream kernel due to sharing of GPIOs between switches and LEDs, but see Remote Control below.
  • ravb (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

Remote Control

Operation Signal A Pin A Signal B Pin B Connector needed Comments
Reset #MRB/SYSRSTn EXIO-D pin 66 GND EXIO-D pin 58 Samtec QTE-020 or -040
Wake-Up IRQ1n/GP2_01 EXIO-D pin 50 GND EXIO-D pin 46 Samtec QTE-020 or -040 Needs arm64: dts: salvator-common: Enable GP2_1 for wake-up from renesas-drivers#topic/board-farm
ACC OFF #RSTB/EX_PWRONn EXIO-D pin 68 D5.0V CN7 pin 4 Samtec QTE-020 or -040, and 5¼ HDD power Pull high via 10K resistor to power off (47K to D12.0V might be better, cfr. Ebisu, but is untested)