-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <aymeric.aillet@iot.bzh>
- Loading branch information
Showing
8 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 IoT.bzh | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_RCAR_SPIDER_CR52 | ||
bool "Cortex-R52 for Renesas Spider" | ||
depends on SOC_R8A779F0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023 IoT.bzh | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_RCAR_SPIDER_CR52 | ||
|
||
config BOARD | ||
default "rcar_spider_cr52" | ||
|
||
endif # BOARD_RCAR_SPIDER_CR52 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
board_runner_args(openocd "--use-elf") | ||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (c) 2023 IoT.bzh | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <dt-bindings/pinctrl/renesas/pinctrl-r8a779f0.h> | ||
|
||
&pfc { | ||
scif0_data_tx_default: scif0_data_tx_default { | ||
pin = <PIN_RX0 FUNC_RX0>; | ||
}; | ||
|
||
scif0_data_rx_default: scif0_data_rx_default { | ||
pin = <PIN_TX0 FUNC_TX0>; | ||
}; | ||
|
||
scif3_data_tx_default: scif3_data_tx_default { | ||
pin = <PIN_HTX0 FUNC_TX3>; | ||
}; | ||
|
||
scif3_data_rx_default: scif3_data_rx_default { | ||
pin = <PIN_HRX0 FUNC_RX3>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright (c) 2023 IoT.bzh | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <arm/renesas/rcar/gen4/r8a779f0.dtsi> | ||
#include "rcar_spider_cr52-pinctrl.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
model = "Renesas Spider board"; | ||
compatible = "renesas,spider-cr52"; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,console = &scif0; | ||
zephyr,shell-uart = &scif0; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
user_led: led_8 { | ||
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; | ||
label = "User LED"; | ||
}; | ||
}; | ||
|
||
gpio_keys { | ||
compatible = "gpio-keys"; | ||
user_button: sw10 { | ||
gpios = <&gpio4 13 GPIO_ACTIVE_LOW>; | ||
label = "User switch"; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
|
||
aliases { | ||
led0 = &user_led; | ||
sw0 = &user_button; | ||
}; | ||
}; | ||
|
||
&scif0 { | ||
pinctrl-0 = <&scif0_data_tx_default &scif0_data_rx_default>; | ||
pinctrl-names = "default"; | ||
status = "okay"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&gpio4 { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
identifier: rcar_spider_cr52 | ||
name: Cortex r52 for Renesas Spider | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
- gnuarmemb | ||
supported: | ||
- gpio | ||
- clock_control | ||
- uart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CONFIG_SOC_R8A779F0=y | ||
CONFIG_SOC_SERIES_RCAR_GEN4=y | ||
CONFIG_BOARD_RCAR_SPIDER_CR52=y | ||
CONFIG_CLOCK_CONTROL=y | ||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=12500000 | ||
CONFIG_CONSOLE=y | ||
CONFIG_RAM_CONSOLE=y | ||
CONFIG_FLASH_SIZE=0 | ||
CONFIG_FLASH_BASE_ADDRESS=0 | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=y | ||
CONFIG_GPIO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Renesas R-Car Spider S4 Cortex-R52 Board Config | ||
|
||
source [find interface/ftdi/olimex-arm-usb-ocd-h.cfg] | ||
source [find target/renesas_rcar_reset_common.cfg] | ||
|
||
set _CHIPNAME r8a779f0 | ||
set _CORE_NAME r52 | ||
set _TARGETNAME $_CHIPNAME.$_CORE_NAME | ||
set _CTINAME $_TARGETNAME.cti | ||
set _DAPNAME $_CHIPNAME.dap | ||
set DAP_TAPID 0x5ba00477 | ||
|
||
set CR52_DBGBASE 0x80c10000 | ||
set CR52_CTIBASE 0x80c20000 | ||
|
||
adapter srst delay 1000 | ||
adapter speed 20000 | ||
global $_CHIPNAME | ||
transport select jtag | ||
|
||
jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x01 -irmask 0x0f -expected-id $DAP_TAPID | ||
dap create $_DAPNAME -chain-position $_CHIPNAME.cpu | ||
|
||
cti create $_CTINAME -dap $_DAPNAME -ap-num 1 -baseaddr $CR52_CTIBASE | ||
target create $_TARGETNAME armv8r -dap $_DAPNAME -ap-num 1 -dbgbase $CR52_DBGBASE -cti $_CTINAME | ||
|
||
$_TARGETNAME configure -rtos auto |