boards: riscv: Add support for SparkFun RED-V Things Plus
Add support for SparkFun RED-V Things Plus board that is a development board with a SiFive FE310-G002 RISC-V SoC. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
parent
6e25082db0
commit
7317490703
9 changed files with 289 additions and 0 deletions
6
boards/riscv/sparkfun_red_v_things_plus/Kconfig.board
Normal file
6
boards/riscv/sparkfun_red_v_things_plus/Kconfig.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_SPARKFUN_RED_V_THINGS_PLUS
|
||||
bool "SparkFun RED-V Things Plus board"
|
||||
depends on SOC_RISCV_SIFIVE_FREEDOM
|
21
boards/riscv/sparkfun_red_v_things_plus/Kconfig.defconfig
Normal file
21
boards/riscv/sparkfun_red_v_things_plus/Kconfig.defconfig
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_SPARKFUN_RED_V_THINGS_PLUS
|
||||
|
||||
config BOARD
|
||||
default "sparkfun_red_v_things_plus"
|
||||
|
||||
config HAS_FLASH_LOAD_OFFSET
|
||||
default y
|
||||
|
||||
config FLASH_BASE_ADDRESS
|
||||
default $(dt_node_reg_addr_hex,/soc/spi@10014000,1)
|
||||
|
||||
config FLASH_LOAD_OFFSET
|
||||
default 0x0
|
||||
|
||||
config SYS_CLOCK_TICKS_PER_SEC
|
||||
default 128
|
||||
|
||||
endif
|
8
boards/riscv/sparkfun_red_v_things_plus/board.cmake
Normal file
8
boards/riscv/sparkfun_red_v_things_plus/board.cmake
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2019 SiFive Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
board_runner_args(jlink "--device=FE310")
|
||||
board_runner_args(jlink "--iface=JTAG")
|
||||
board_runner_args(jlink "--speed=4000")
|
||||
board_runner_args(jlink "--tool-opt=-jtagconf -1,-1")
|
||||
board_runner_args(jlink "--tool-opt=-autoconnect 1")
|
||||
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
Binary file not shown.
After Width: | Height: | Size: 214 KiB |
64
boards/riscv/sparkfun_red_v_things_plus/doc/index.rst
Normal file
64
boards/riscv/sparkfun_red_v_things_plus/doc/index.rst
Normal file
|
@ -0,0 +1,64 @@
|
|||
.. _sparkfun_red_v_things_plus:
|
||||
|
||||
SparkFun RED-V Things Plus
|
||||
##########################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The SparkFun RED-V Things Plus is a development board with
|
||||
a SiFive FE310-G002 RISC-V SoC.
|
||||
|
||||
.. image:: img/sparkfun_red_v_things_plus.jpg
|
||||
:align: center
|
||||
:alt: SparkFun RED-V Things Plus board
|
||||
|
||||
For more information about the SparkFun RED-V Things Plus and SiFive FE310-G002:
|
||||
|
||||
- `SparkFun RED-V Things Plus Website`_
|
||||
- `SiFive FE310-G002 Datasheet`_
|
||||
- `SiFive FE310-G002 User Manual`_
|
||||
|
||||
Programming and debugging
|
||||
*************************
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Applications for the ``sparkfun_red_v_things_plus`` board configuration can be built as usual
|
||||
(see :ref:`build_an_application`) using the corresponding board name:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:board: sparkfun_red_v_things_plus
|
||||
:goals: build
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
The SparkFun RED-V Things Plus uses Segger J-Link OB for flashing and debugging.
|
||||
To flash and debug the board, you'll need to install the
|
||||
`Segger J-Link Software and Documentation Pack
|
||||
<https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack>`_
|
||||
and choose version V6.46a or later (Downloads for Windows, Linux, and macOS are
|
||||
available).
|
||||
|
||||
With the Segger J-Link Software installed, you can flash the application as usual
|
||||
(see :ref:`build_an_application` and :ref:`application_run` for more details):
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:board: sparkfun_red_v_things_plus
|
||||
:goals: flash
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
Refer to the detailed overview about :ref:`application_debugging`.
|
||||
|
||||
.. _SparkFun RED-V Things Plus Website:
|
||||
https://www.sparkfun.com/products/15799
|
||||
|
||||
.. _SiFive FE310-G002 Datasheet:
|
||||
https://sifive.cdn.prismic.io/sifive/4999db8a-432f-45e4-bab2-57007eed0a43_fe310-g002-datasheet-v1p2.pdf
|
||||
|
||||
.. _SiFive FE310-G002 User Manual:
|
||||
https://sifive.cdn.prismic.io/sifive/034760b5-ac6a-4b1c-911c-f4148bb2c4a5_fe310-g002-v1p5.pdf
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Antmicro <www.antmicro.com>
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/pinctrl/sifive-pinctrl.h>
|
||||
|
||||
&pinctrl {
|
||||
/* UART0 */
|
||||
uart0_rx_default: uart0_rx_default {
|
||||
pinmux = <16 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
uart0_tx_default: uart0_tx_default {
|
||||
pinmux = <17 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
|
||||
/* SPI1 */
|
||||
spi1_cs0_default: spi1_cs0_default {
|
||||
pinmux = <2 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
spi1_mosi_default: spi1_mosi_default {
|
||||
pinmux = <3 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
spi1_miso_default: spi1_miso_default {
|
||||
pinmux = <4 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
spi1_sck_default: spi1_sck_default {
|
||||
pinmux = <5 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
spi1_cs2_default: spi1_cs2_default {
|
||||
pinmux = <9 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
spi1_cs3_default: spi1_cs3_default {
|
||||
pinmux = <10 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
|
||||
/* PWM0 */
|
||||
pwm0_0_default: pwm0_0_default {
|
||||
pinmux = <0 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm0_1_default: pwm0_1_default {
|
||||
pinmux = <1 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm0_2_default: pwm0_2_default {
|
||||
pinmux = <2 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm0_3_default: pwm0_3_default {
|
||||
pinmux = <3 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
|
||||
/* PWM1 */
|
||||
pwm1_0_default: pwm1_0_default {
|
||||
pinmux = <20 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm1_1_default: pwm1_1_default {
|
||||
pinmux = <19 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm1_2_default: pwm1_2_default {
|
||||
pinmux = <21 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm1_3_default: pwm1_3_default {
|
||||
pinmux = <22 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
|
||||
/* PWM2 */
|
||||
pwm2_0_default: pwm2_0_default {
|
||||
pinmux = <10 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm2_1_default: pwm2_1_default {
|
||||
pinmux = <11 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm2_2_default: pwm2_2_default {
|
||||
pinmux = <12 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
pwm2_3_default: pwm2_3_default {
|
||||
pinmux = <13 SIFIVE_PINMUX_IOF1>;
|
||||
};
|
||||
|
||||
/* I2C0 */
|
||||
i2c0_0_default: i2c0_0_default {
|
||||
pinmux = <12 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
i2c0_1_default: i2c0_1_default {
|
||||
pinmux = <13 SIFIVE_PINMUX_IOF0>;
|
||||
};
|
||||
};
|
|
@ -0,0 +1,71 @@
|
|||
/* Copyright (c) 2018 SiFive, Inc. */
|
||||
/* Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com> */
|
||||
/* SPDX-License-Identifier: Apache-2.0 */
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <sifive/riscv32-fe310.dtsi>
|
||||
#include "sparkfun_red_v_things_plus-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "SparkFun RED-V Things Plus";
|
||||
compatible = "sparkfun,red-v_things_plus";
|
||||
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
watchdog0 = &wdog0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
zephyr,console = &uart0;
|
||||
zephyr,shell-uart = &uart0;
|
||||
zephyr,sram = &dtim;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* disabled (used by Flash ROM by default) */
|
||||
&spi0 {
|
||||
reg = <0x10014000 0x1000 0x20010000 0x3c0900>;
|
||||
flash0: flash@0 {
|
||||
compatible = "issi,is25lp032", "jedec,spi-nor";
|
||||
status = "disabled";
|
||||
size = <33554432>;
|
||||
jedec-id = [96 60 16];
|
||||
reg = <0>;
|
||||
spi-max-frequency = <133000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi1_cs0_default &spi1_cs2_default &spi1_cs3_default
|
||||
&spi1_mosi_default &spi1_miso_default &spi1_sck_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-0 = <&i2c0_0_default &i2c0_1_default>;
|
||||
pinctrl-names = "default";
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
identifier: sparkfun_red_v_things_plus
|
||||
name: SparkFun RED-V Things Plus
|
||||
type: mcu
|
||||
arch: riscv32
|
||||
toolchain:
|
||||
- zephyr
|
||||
ram: 16
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
||||
supported:
|
||||
- uart
|
||||
- gpio
|
||||
- i2c
|
||||
- spi
|
||||
- pwm
|
||||
- watchdog
|
|
@ -0,0 +1,14 @@
|
|||
# Copyright (c) 2022 TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_RISCV_SIFIVE_FREEDOM=y
|
||||
CONFIG_SOC_RISCV_SIFIVE_FREEDOM=y
|
||||
CONFIG_BOARD_SPARKFUN_RED_V_THINGS_PLUS=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_SIFIVE_PORT_0=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_RISCV_CORE_E31=y
|
||||
CONFIG_BUILD_OUTPUT_HEX=y
|
Loading…
Add table
Add a link
Reference in a new issue