board: emsdp: doc update and bug fixes

- update doc for different core configuration.

- fix some bugs in dts related files.

- add dts config and defconfig for different core configuration.

- end files with a newline in boards/arc/emsdp/board.dtsi

- remove unused head in boards/arc/emsdp/doc/index.rst

- ARC_MPU_VER in different core is fixed. so remove some useless code
  for ARC_MPU_VER judgements in Kconfig.defconfig.* files for emsdp

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
This commit is contained in:
Watson Zeng 2019-08-05 14:50:16 +08:00 committed by Carles Cufí
commit 80ca3e064e
35 changed files with 520 additions and 88 deletions

View file

@ -10,8 +10,6 @@ if BOARD_EMSDP
config BOARD
default "emsdp"
config CPU_ARCEM
default y
if GPIO

View file

@ -10,7 +10,6 @@
led5 = &led5;
led6 = &led6;
led7 = &led7;
led8 = &led8;
sw0 = &switch0;
sw1 = &switch1;
sw2 = &switch2;
@ -41,21 +40,16 @@
};
led5: led_5 {
gpios = <&gpio1 5 0>;
label = "LED 1";
label = "LED 5";
};
led6: led_6 {
gpios = <&gpio1 6 0>;
label = "LED 2";
label = "LED 6";
};
led7: led_7 {
gpios = <&gpio1 7 0>;
label = "LED 3";
label = "LED 7";
};
led8: led_8 {
gpios = <&gpio1 8 0>;
label = "LED 4";
};
};
buttons {
@ -82,4 +76,4 @@
};
};
};
};

View file

@ -24,6 +24,27 @@ For details about the board, see: `DesignWare ARC EM Software Development Platfo
Hardware
********
The EM Software Development Platform supports different core configurations, such as EM4,
EM5D, EM6, EM7D, EM9D, EM9D+ESP, EM11D, the default core configuration is EM11D. Use
:option:`CONFIG_SOC_EMSDP_EM4`, :option:`CONFIG_SOC_EMSDP_EM5D`,
:option:`CONFIG_SOC_EMSDP_EM6`, :option:`CONFIG_SOC_EMSDP_EM7D`,
:option:`CONFIG_SOC_EMSDP_EM7D_ESP`, :option:`CONFIG_SOC_EMSDP_EM9D` or
:option:`CONFIG_SOC_EMSDP_EM11D` to select different core configuration.
The following table shows the hardware features supported for different core configuration:
+-----------+-----+-----+------+------+----------+------+-------+
| Features | EM4 | EM6 | EM5D | EM7D | EM7D_ESP | EM9D | EM11D |
+===========+=====+=====+======+======+==========+======+=======+
| Caches | N | Y | N | Y | Y | N | Y |
+-----------+-----+-----+------+------+----------+------+-------+
| DSP | N | N | Y | Y | Y | Y | Y |
+-----------+-----+-----+------+------+----------+------+-------+
| XY Memory | N | N | N | N | N | Y | Y |
+-----------+-----+-----+------+------+----------+------+-------+
| Secure | N | N | N | N | Y | N | N |
+-----------+-----+-----+------+------+----------+------+-------+
For hardware feature details, refer to : `ARC EM Software Development Platform
<https://embarc.org/embarc_osp/doc/build/html/board/emsdp.html>`__
@ -177,12 +198,13 @@ Most of the time you will not be flashing your program but will instead debug
it using openocd and gdb. The program can be download via the USB cable into
the code and data memories.
Release Notes
*************
References
**********
.. _Digilent Pmod Modules: http://store.digilentinc.com/pmod-modules
.. target-notes::
.. _Putty website: http://www.putty.org
.. _Digilent Pmod Modules:
http://store.digilentinc.com/pmod-modules
.. _Putty website:
http://www.putty.org

View file

@ -25,6 +25,20 @@
};
&uart0 {
status = "ok";
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <107 1>;
};
gpio@f0002000 {
interrupts = <85 1>;
};
};
};

View file

@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM11D=y
CONFIG_BOARD_EMSDP=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <108 1>;
};
gpio@f0002000 {
interrupts = <86 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em4
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM4=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <107 1>;
};
gpio@f0002000 {
interrupts = <85 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em5d
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM5D=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <108 1>;
};
gpio@f0002000 {
interrupts = <86 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em6
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM6=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <107 1>;
};
gpio@f0002000 {
interrupts = <85 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em7d
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM7D=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <108 1>;
};
gpio@f0002000 {
interrupts = <86 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em7d_esp
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM7D_ESP=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <emsdp.dtsi>
#include "board.dtsi"
/ {
model = "emsdp";
compatible = "snps,emsdp", "snps,emsdp";
aliases {
uart-0 = &uart0;
};
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};
&uart0 {
status = "okay";
current-speed = <115200>;
};
/ {
soc {
uart@f0004000 {
interrupts = <107 1>;
};
gpio@f0002000 {
interrupts = <85 1>;
};
};
};

View file

@ -0,0 +1,12 @@
identifier: emsdp_em9d
name: EM Software Development Platform
type: mcu
arch: arc
toolchain:
- zephyr
- xtools
ram: 128
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,19 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARC=y
CONFIG_CPU_ARCEM=y
CONFIG_SOC_ARC_EMSDP=y
CONFIG_SOC_EMSDP_EM9D=y
CONFIG_BOARD_EMSDP=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_ARC_MPU_ENABLE=y
CONFIG_GPIO=y

View file

@ -19,7 +19,7 @@
cpu@0 {
device_type = "cpu";
compatible = "snps,arcem";
reg = <1>;
reg = <0>;
};
intc: arcv2-intc {
@ -61,7 +61,6 @@
reg = <0xf0004000 0x1000>;
label = "UART_0";
interrupt-parent = <&intc>;
interrupts = <107 1>;
};
gpio0: gpio@f0002000 {
@ -70,7 +69,6 @@
bits = <4>;
label = "GPIO_0";
interrupt-parent = <&intc>;
interrupts = <85 1>;
gpio-controller;
#gpio-cells = <2>;
};

View file

@ -19,6 +19,3 @@ elseif(CONFIG_SOC_EMSDP_EM11D)
zephyr_compile_options_ifdef(CONFIG_FLOAT -mfpu=fpuda_all)
endif()
zephyr_sources(
soc.c
)

View file

@ -19,9 +19,6 @@ config NUM_IRQS
# must be > the highest interrupt number used
default 128
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 100000000
source "soc/arc/snps_emsdp/Kconfig.defconfig.em4"
source "soc/arc/snps_emsdp/Kconfig.defconfig.em5d"
source "soc/arc/snps_emsdp/Kconfig.defconfig.em6"

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM11D
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 40000000
config CPU_EM4_FPUDA
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool y
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM11D

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM4
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 50000000
config CPU_EM4
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool n
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM4

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM5D
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 40000000
config CPU_EM4_FPUDA
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool y
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM5D

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM6
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 50000000
config CPU_EM6
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool n
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM6

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM7D
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 40000000
config CPU_EM4_FPUDA
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool y
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM7D

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM7D_ESP
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 50000000
config CPU_EM4_FPUDA
def_bool y
@ -27,21 +30,4 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool y
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
config IDLE_STACK_SIZE
default 2048
if ZTEST
config ZTEST_STACKSIZE
default 2048
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM7D_ESP

View file

@ -6,6 +6,9 @@
if SOC_EMSDP_EM9D
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 40000000
config CPU_EM4_FPUDA
def_bool y
@ -27,8 +30,6 @@ config CACHE_FLUSHING
config FP_FPU_DA
def_bool y
if (ARC_MPU_VER = 2)
config MAIN_STACK_SIZE
default 2048
@ -42,6 +43,4 @@ config ZTEST_STACKSIZE
endif # ZTEST
endif # ARC_MPU_VER
endif #SOC_EMSDP_EM9D

View file

@ -1,12 +0,0 @@
/*
* Copyright (c) 2019 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* This module provides routines to initialize and support soc-level hardware
* for the IoT Development Kit board.
*
*/

View file

@ -5,7 +5,7 @@
*/
/**
* @brief Board configuration macros for EM Starter kit board
* @brief Board configuration macros for EM Software Development Platform board
*
* This header file is used to specify and describe board-level
* aspects for the target.
@ -19,13 +19,6 @@
/* default system clock */
#define SYSCLK_DEFAULT_IOSC_HZ MHZ(100)
/*
* UART: use lr and sr to access subsystem uart IP
*/
// #define UART_NS16550_ACCESS_IOPORT
// #define UART_REG_ADDR_INTERVAL 4
/* ARC EM Core IRQs */
#define IRQ_TIMER0 16