boards/riscv: add new riscv platform-it8xxx2
We create a new platform for our chip series it8xxx2. It is a riscv base soc. Signed-off-by: Cheryl Su <cheryl.su@ite.com.tw>
This commit is contained in:
parent
430952f0b2
commit
968dd2107b
|
@ -233,6 +233,7 @@
|
|||
/drivers/pcie/ @andrewboie
|
||||
/drivers/peci/ @albertofloyd @franciscomunoz @scottwcpg
|
||||
/drivers/pinmux/*hsdk* @iriszzw
|
||||
/drivers/pinmux/*it8xxx2* @ite
|
||||
/drivers/ps2/ @albertofloyd @franciscomunoz @scottwcpg
|
||||
/drivers/pwm/*sam0* @nzmichaelh
|
||||
/drivers/pwm/*stm32* @gmarull
|
||||
|
@ -272,6 +273,7 @@
|
|||
/drivers/timer/cortex_m_systick.c @ioannisg
|
||||
/drivers/timer/altera_avalon_timer_hal.c @wentongwu
|
||||
/drivers/timer/riscv_machine_timer.c @nategraff-sifive @kgugala @pgielda
|
||||
/drivers/timer/ite_it8xxx2_timer.c @ite
|
||||
/drivers/timer/xlnx_psttc_timer* @wjliang @stephanosio
|
||||
/drivers/timer/cc13x2_cc26x2_rtc_timer.c @vanti
|
||||
/drivers/timer/cavs_timer.c @dcpleung
|
||||
|
@ -317,6 +319,7 @@
|
|||
/dts/arm/silabs/efm32jg12b* @chrta
|
||||
/dts/arm/silabs/efm32pg12b* @chrta
|
||||
/dts/arm/silabs/efr32mg21* @l-alfred
|
||||
/dts/riscv/it8xxx2.dtsi @ite
|
||||
/dts/riscv/microsemi-miv.dtsi @galak
|
||||
/dts/riscv/rv32m1* @MaureenHelm
|
||||
/dts/riscv/riscv32-fe310.dtsi @nategraff-sifive
|
||||
|
|
6
boards/riscv/it8xxx2_evb/CMakeLists.txt
Normal file
6
boards/riscv/it8xxx2_evb/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
#
|
||||
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
6
boards/riscv/it8xxx2_evb/Kconfig.board
Normal file
6
boards/riscv/it8xxx2_evb/Kconfig.board
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BOARD_IT8XXX2_EVB
|
||||
bool "IT8XXX2 EV-board"
|
||||
depends on SOC_IT8XXX2
|
8
boards/riscv/it8xxx2_evb/Kconfig.defconfig
Normal file
8
boards/riscv/it8xxx2_evb/Kconfig.defconfig
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_IT8XXX2_EVB
|
||||
|
||||
config BOARD
|
||||
default "it8xxx2_evb"
|
||||
endif
|
2
boards/riscv/it8xxx2_evb/board.cmake
Normal file
2
boards/riscv/it8xxx2_evb/board.cmake
Normal file
|
@ -0,0 +1,2 @@
|
|||
set(EMU_PLATFORM renode)
|
||||
set(RENODE_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/support/it8xxx2_evb.resc)
|
98
boards/riscv/it8xxx2_evb/doc/index.rst
Normal file
98
boards/riscv/it8xxx2_evb/doc/index.rst
Normal file
|
@ -0,0 +1,98 @@
|
|||
.. _it8xxx2_evb:
|
||||
|
||||
ITE IT8XXX2 series
|
||||
######################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The IT8XXX2 is a 32-bit RISC-V Micro-controller.
|
||||
And a highly integrated embedded controller with system functions.
|
||||
It is suitable for mobile system applications.
|
||||
|
||||
.. figure:: it81302_board.jpg
|
||||
:width: 2016px
|
||||
:height: 1512px
|
||||
:align: center
|
||||
:alt: It81302 EVB
|
||||
|
||||
To find out more about ITE, visit our World Wide Web at:`ITE's website`_
|
||||
|
||||
|
||||
Hardware
|
||||
********
|
||||
The IT8XXX2 series contains different chip types(ex, it81302, it83202),
|
||||
and they support different hardware features.
|
||||
Listing the IT81302 hardware features as following:
|
||||
|
||||
- RISC-V RV32IMAFC instruction set
|
||||
- 4KB instruction cache size
|
||||
- 60KB SDRAM in total
|
||||
- Built-in 32.768 kHz clock generator
|
||||
- PWM, eSPI, LPC, FLASH, UART, GPIO, Timer, Watchdog, ADC, JTAG
|
||||
- 6 SMBus channels, with 3 DMA controllers, compatiable with I2C
|
||||
- SPI master/slave
|
||||
- USB Type-c CC Logic
|
||||
- USB Power Delivery
|
||||
- Support KB scan
|
||||
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
currently supports the following hardware features:
|
||||
|
||||
.. list-table:: Supported Features
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Interface
|
||||
- Controller
|
||||
- Driver/Component
|
||||
* - NVIC
|
||||
- on-chip
|
||||
- interrupt controller
|
||||
* - TIMER
|
||||
- on-chip
|
||||
- timer
|
||||
* - UART
|
||||
- on-chip
|
||||
- serial
|
||||
* - GPIO
|
||||
- on-chip
|
||||
- gpio
|
||||
|
||||
Programming and debugging
|
||||
*************************
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
Applications for the ``it8xxx2_evb`` board configuration can be built as usual
|
||||
(see :`Zephyr Getting Started Guide`_):
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:board: it8xxx2_evb
|
||||
:goals: build
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
In order to upload the application to the device,
|
||||
you'll need our winflash tool and download board.
|
||||
You can get the winflash tool at here:`Download Link`_
|
||||
Use the winflash.exe tool to program a zephyr application
|
||||
to the it8xxx2 board flash.
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
Supporting uart debug, currently.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _ITE's website: http://www.ite.com.tw/en/product/view?mid=149
|
||||
.. _Zephyr Getting Started Guide: https://docs.zephyrproject.org/latest/getting_started/index.html
|
||||
.. _Download Link: http://www.ite.com.tw/en/product/view?mid=149
|
BIN
boards/riscv/it8xxx2_evb/doc/it81302_board.jpg
Normal file
BIN
boards/riscv/it8xxx2_evb/doc/it81302_board.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 931 KiB |
BIN
boards/riscv/it8xxx2_evb/doc/ite_Downloadboard_v4.jpg
Normal file
BIN
boards/riscv/it8xxx2_evb/doc/ite_Downloadboard_v4.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 951 KiB |
65
boards/riscv/it8xxx2_evb/it8xxx2_evb.dts
Normal file
65
boards/riscv/it8xxx2_evb/it8xxx2_evb.dts
Normal file
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* Copyright (c) ITE, All Rights Reserved
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <it8xxx2.dtsi>
|
||||
|
||||
/ {
|
||||
model = "IT8XXX2 EV-Board";
|
||||
compatible = "riscv, it8xxx2_evb";
|
||||
chosen {
|
||||
zephyr,console = &uart1;
|
||||
zephyr,shell-uart = &uart1;
|
||||
zephyr,bt-uart = &uart2;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,flash-controller = &flashctrl;
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
};
|
||||
&gpiob {
|
||||
status = "okay";
|
||||
};
|
||||
&gpiof {
|
||||
status = "okay";
|
||||
};
|
||||
&uart1 {
|
||||
status = "okay";
|
||||
current-speed = <115200>;
|
||||
clock-frequency = <1804800>;
|
||||
};
|
||||
&uart2 {
|
||||
status = "okay";
|
||||
current-speed = <460800>;
|
||||
clock-frequency = <1804800>;
|
||||
};
|
||||
&flash0 {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
boot_partition: partition@0 {
|
||||
label = "mcuboot";
|
||||
reg = <0x00000000 0x20000>;
|
||||
};
|
||||
slot0_partition: partition@20000 {
|
||||
label = "image-0";
|
||||
reg = <0x00020000 0x20000>;
|
||||
};
|
||||
slot1_partition: partition@40000 {
|
||||
label = "image-1";
|
||||
reg = <0x00040000 0x10000>;
|
||||
};
|
||||
scratch_partition: partition@50000 {
|
||||
label = "image-scratch";
|
||||
reg = <0x00050000 0x10000>;
|
||||
};
|
||||
storage_partition: partition@60000 {
|
||||
label = "storage";
|
||||
reg = <0x00060000 0x20000>;
|
||||
};
|
||||
};
|
||||
};
|
11
boards/riscv/it8xxx2_evb/it8xxx2_evb.yaml
Normal file
11
boards/riscv/it8xxx2_evb/it8xxx2_evb.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
identifier: it8xxx2_evb
|
||||
name: it8xxx2_evb
|
||||
type: mcu
|
||||
arch: riscv
|
||||
toolchain:
|
||||
- zephyr
|
||||
ram: 60
|
||||
testing:
|
||||
ignore_tags:
|
||||
- net
|
||||
- bluetooth
|
30
boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig
Normal file
30
boards/riscv/it8xxx2_evb/it8xxx2_evb_defconfig
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright (c) 2020 ITE Corporation. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
CONFIG_SOC_SERIES_RISCV32_IT8XXX2=y
|
||||
CONFIG_SOC_IT8XXX2=y
|
||||
CONFIG_BOARD_IT8XXX2_EVB=y
|
||||
CONFIG_BOOT_DELAY=1
|
||||
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_PINMUX_ITE_IT8XXX2=y
|
||||
CONFIG_ITE_IT8XXX2_TIMER=y
|
||||
CONFIG_GEN_IRQ_VECTOR_TABLE=n
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
CONFIG_UART_NS16550=y
|
||||
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||
CONFIG_TICKLESS_CAPABLE=y
|
||||
|
||||
CONFIG_XIP=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_OUTPUT_PRINT_MEMORY_USAGE=n
|
||||
CONFIG_LINKER_ORPHAN_SECTION_PLACE=y
|
||||
CONFIG_COMPILER_OPT="-mcmodel=medlow"
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_GPIO_ITE_IT8XXX2=y
|
||||
CONFIG_LEGACY_TIMEOUT_API=y
|
31
boards/riscv/it8xxx2_evb/pinmux.c
Normal file
31
boards/riscv/it8xxx2_evb/pinmux.c
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2020 ITE Corporation. All Rights Reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
*/
|
||||
|
||||
#include <init.h>
|
||||
#include <drivers/pinmux.h>
|
||||
#include <soc.h>
|
||||
|
||||
static int it8xxx2_evb_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
const struct device *p =
|
||||
device_get_binding(CONFIG_PINMUX_ITE_IT8XXX2_NAME);
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay)
|
||||
pinmux_pin_set(p, 0, IT8XXX2_PINMUX_IOF1);
|
||||
pinmux_pin_set(p, 56, IT8XXX2_PINMUX_IOF1);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart1), okay) */
|
||||
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay)
|
||||
pinmux_pin_set(p, 3, IT8XXX2_PINMUX_IOF1);
|
||||
pinmux_pin_set(p, 59, IT8XXX2_PINMUX_IOF1);
|
||||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(uart2), okay) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(it8xxx2_evb_pinmux_init, PRE_KERNEL_1, CONFIG_PINMUX_INIT_PRIORITY);
|
17
boards/riscv/it8xxx2_evb/support/it8xxx2_evb.resc
Normal file
17
boards/riscv/it8xxx2_evb/support/it8xxx2_evb.resc
Normal file
|
@ -0,0 +1,17 @@
|
|||
:name: ITE-evb
|
||||
:description: This script is prepared to run Zephyr on a Mi-V RISC-V board.
|
||||
|
||||
$name?="ITE-evb"
|
||||
|
||||
using sysbus
|
||||
mach create $name
|
||||
machine LoadPlatformDescription @platforms/boards/it8xxx2_evb.repl
|
||||
|
||||
showAnalyzer uart
|
||||
cpu PerformanceInMips 80
|
||||
|
||||
macro reset
|
||||
"""
|
||||
sysbus LoadELF $bin
|
||||
"""
|
||||
runMacro $reset
|
Loading…
Reference in a new issue