Skip to content

Commit a88ed59

Browse files
committed
boards: arm: Add Renesas Spider support
Renesas Spider board use a S4 SoC (r8a779f0). Add basic support for UART, GPIO and clock control. We are using SCIF0 as SCIF3 is used by Linux. Signed-off-by: Aymeric Aillet <[email protected]>
1 parent 9f243af commit a88ed59

File tree

8 files changed

+150
-0
lines changed

8 files changed

+150
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2023 IoT.bzh
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_RCAR_SPIDER_CR52
5+
bool "Cortex-R52 for Renesas Spider"
6+
depends on SOC_R8A779F0
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2023 IoT.bzh
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_RCAR_SPIDER_CR52
5+
6+
config BOARD
7+
default "rcar_spider_cr52"
8+
9+
endif # BOARD_RCAR_SPIDER_CR52

boards/arm/rcar_spider/board.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
board_runner_args(openocd "--use-elf")
3+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2023 IoT.bzh
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <dt-bindings/pinctrl/renesas/pinctrl-r8a779f0.h>
8+
9+
&pfc {
10+
scif0_data_tx_default: scif0_data_tx_default {
11+
pin = <PIN_RX0 FUNC_RX0>;
12+
};
13+
14+
scif0_data_rx_default: scif0_data_rx_default {
15+
pin = <PIN_TX0 FUNC_TX0>;
16+
};
17+
18+
scif3_data_tx_default: scif3_data_tx_default {
19+
pin = <PIN_HTX0 FUNC_TX3>;
20+
};
21+
22+
scif3_data_rx_default: scif3_data_rx_default {
23+
pin = <PIN_HRX0 FUNC_RX3>;
24+
};
25+
};
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright (c) 2023 IoT.bzh
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
*/
7+
8+
/dts-v1/;
9+
#include <arm/renesas/rcar/gen4/r8a779f0.dtsi>
10+
#include "rcar_spider_cr52-pinctrl.dtsi"
11+
12+
/ {
13+
model = "Renesas Spider board";
14+
compatible = "renesas,spider-cr52";
15+
16+
chosen {
17+
zephyr,sram = &sram0;
18+
zephyr,console = &scif0;
19+
};
20+
21+
leds {
22+
compatible = "gpio-leds";
23+
user_led: led_8 {
24+
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
25+
label = "User LED";
26+
};
27+
};
28+
29+
gpio_keys {
30+
compatible = "gpio-keys";
31+
/* Supposedly not working (cant use GPIO4 because of pfss) */
32+
user_button: sw10 {
33+
gpios = <&gpio4 13 GPIO_ACTIVE_LOW>;
34+
label = "User switch";
35+
};
36+
};
37+
38+
aliases {
39+
led0 = &user_led;
40+
sw0 = &user_button;
41+
};
42+
};
43+
44+
&scif0 {
45+
pinctrl-0 = <&scif0_data_tx_default &scif0_data_rx_default>;
46+
pinctrl-names = "default";
47+
status = "okay";
48+
};
49+
50+
&gpio0 {
51+
status = "okay";
52+
};
53+
54+
&gpio4 {
55+
status = "okay";
56+
};
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
identifier: rcar_spider_cr52
2+
name: Cortex r52 for Renesas Spider
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
supported:
9+
- gpio
10+
- clock_control
11+
- uart
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CONFIG_SOC_R8A779F0=y
2+
CONFIG_SOC_SERIES_RCAR_GEN4=y
3+
CONFIG_BOARD_RCAR_SPIDER_CR52=y
4+
CONFIG_CLOCK_CONTROL=y
5+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12500000
6+
CONFIG_CONSOLE=y
7+
CONFIG_RAM_CONSOLE=y
8+
CONFIG_FLASH_SIZE=0
9+
CONFIG_FLASH_BASE_ADDRESS=0
10+
CONFIG_SERIAL=y
11+
CONFIG_UART_CONSOLE=y
12+
CONFIG_UART_INTERRUPT_DRIVEN=y
13+
CONFIG_GPIO=y
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Renesas R-Car Spider S4 Cortex-R52 Board Config
2+
3+
source [find interface/ftdi/olimex-arm-usb-ocd-h.cfg]
4+
source [find target/renesas_rcar_reset_common.cfg]
5+
6+
set _CHIPNAME r8a779f0
7+
set _CORE_NAME r52
8+
set _TARGETNAME $_CHIPNAME.$_CORE_NAME
9+
set _CTINAME $_TARGETNAME.cti
10+
set _DAPNAME $_CHIPNAME.dap
11+
set DAP_TAPID 0x5ba00477
12+
13+
set CR52_DBGBASE 0x80c10000
14+
set CR52_CTIBASE 0x80c20000
15+
16+
adapter srst delay 1000
17+
adapter speed 20000
18+
global $_CHIPNAME
19+
transport select jtag
20+
21+
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $DAP_TAPID
22+
dap create $_DAPNAME -chain-position $_CHIPNAME.cpu
23+
24+
cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr $CR52_CTIBASE
25+
target create $_TARGETNAME armv8r -dap $_DAPNAME -ap-num 1 -dbgbase $CR52_DBGBASE -cti $_CTINAME
26+
27+
$_TARGETNAME configure -rtos auto

0 commit comments

Comments
 (0)