Skip to content
Permalink
Browse files

boards: arc: emsdp: add basic emsdp board support

* add basic emsdp board support

Signed-off-by: Watson Zeng <zhiwei@synopsys.com>
  • Loading branch information...
IRISZZW authored and carlescufi committed Jun 20, 2019
1 parent f71a0f4 commit bcba284e8f7cf0ad76a8e57f642e6aadc41ac291
@@ -171,6 +171,7 @@
/drivers/*/*xec* @franciscomunoz @albertofloyd @scottwcpg
/drivers/wifi/ @jukkar @tbursztyka @pfalcon
/drivers/wifi/eswifi/ @loicpoulain
/dts/arc/ @vonhust @ruuddw @iriszzw
/dts/arm/atmel/samr21.dtsi @benpicco
/dts/arm/st/ @erwango
/dts/arm/ti/cc13?2* @bwitherspoon
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_ARC_MPU_ENABLE arc_mpu_regions.c)
@@ -0,0 +1,16 @@
# Kconfig - DesignWare ARC EM Software Development Platform board configuration
#
# Copyright (c) 2019 Synopsys, Inc. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
config BOARD_EMSDP
bool "EM Software Development Platform"
depends on SOC_ARC_EMSDP
help
The ARC EM Software Development Platform (emsdp) is an FPGA based
development platform intended to support ARC licenses in developing
their software for the ARC EM processor family and ARC EM Subsystems.
It has the support for ARC EM4, EM5D, EM6, EM7D, EM9D and EM11D
processors. ARC EM Enhanced Security Package (ESP) and ARC EM
Subsystems (DFSS, SCSS, DSS) are also supported.
@@ -0,0 +1,47 @@
# Kconfig - DesignWare ARC EM Software Development Platform board configuration
#
# Copyright (c) 2019 Synopsys, Inc. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

if BOARD_EMSDP

config BOARD
default "emsdp"

config CPU_ARCEM
default y

if GPIO

config GPIO_DW
default y

if GPIO_DW

config GPIO_DW_0
default y

config GPIO_DW_1
default y

endif # GPIO_DW

endif # GPIO

if SERIAL

config UART_NS16550
default y

endif # SERIAL

if UART_CONSOLE

config UART_NS16550_PORT_0
default y

endif # UART_CONSOLE

endif # BOARD_EMSDP
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2019 Synopsys
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <generated_dts_board.h>
#include <soc.h>
#include <arch/arc/v2/mpu/arc_mpu.h>
#include <linker/linker-defs.h>

static struct arc_mpu_region mpu_regions[] = {
/* Region ICCM */
MPU_REGION_ENTRY("ICCM",
DT_ICCM_BASE_ADDRESS,
DT_ICCM_SIZE * 1024,
REGION_ROM_ATTR),
/* Region DCCM */
MPU_REGION_ENTRY("DCCM",
DT_DCCM_BASE_ADDRESS,
DT_DCCM_SIZE * 1024,
REGION_KERNEL_RAM_ATTR | REGION_DYNAMIC),
/* Region DDR RAM */
MPU_REGION_ENTRY("SRAM",
DT_INST_0_MMIO_SRAM_BASE_ADDRESS,
DT_INST_0_MMIO_SRAM_SIZE,
REGION_KERNEL_RAM_ATTR |
AUX_MPU_ATTR_KW | AUX_MPU_ATTR_KR | AUX_MPU_ATTR_UR |
AUX_MPU_ATTR_KE | AUX_MPU_ATTR_UE | REGION_DYNAMIC),
/* Region Peripheral */
MPU_REGION_ENTRY("PERIPHERAL",
0xF0000000,
64 * 1024,
REGION_KERNEL_RAM_ATTR),
};

struct arc_mpu_config mpu_config = {
.num_regions = ARRAY_SIZE(mpu_regions),
.mpu_regions = mpu_regions,
};
@@ -0,0 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

# TODO: can this board just use the usual openocd runner?
set(BOARD_FLASH_RUNNER em-starterkit)
set(BOARD_DEBUG_RUNNER em-starterkit)
board_finalize_runner_args(em-starterkit)
@@ -0,0 +1,85 @@
/* SPDX-License-Identifier: Apache-2.0 */

/ {
aliases {
led0 = &led0;
led1 = &led1;
led2 = &led2;
led3 = &led3;
led4 = &led4;
led5 = &led5;
led6 = &led6;
led7 = &led7;
led8 = &led8;
sw0 = &switch0;
sw1 = &switch1;
sw2 = &switch2;
sw2 = &switch3;
};

leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio1 0 0>;
label = "LED 0";
};
led1: led_1 {
gpios = <&gpio1 1 0>;
label = "LED 1";
};
led2: led_2 {
gpios = <&gpio1 2 0>;
label = "LED 2";
};
led3: led_3 {
gpios = <&gpio1 3 0>;
label = "LED 3";
};
led4: led_4 {
gpios = <&gpio1 4 0>;
label = "LED 4";
};
led5: led_5 {
gpios = <&gpio1 5 0>;
label = "LED 1";
};
led6: led_6 {
gpios = <&gpio1 6 0>;
label = "LED 2";
};
led7: led_7 {
gpios = <&gpio1 7 0>;
label = "LED 3";
};
led8: led_8 {
gpios = <&gpio1 8 0>;
label = "LED 4";
};

};

buttons {
compatible = "gpio-keys";
switch0: switch_0 {
/* gpio flags need validation */
gpios = <&gpio0 0 GPIO_INT_ACTIVE_LOW>;
label = "DIP SW1 - Switch 1";
};
switch1: switch_1 {
/* gpio flags need validation */
gpios = <&gpio0 1 GPIO_INT_ACTIVE_LOW>;
label = "DIP SW1 - Switch 2";
};
switch2: switch_2 {
/* gpio flags need validation */
gpios = <&gpio0 2 GPIO_INT_ACTIVE_LOW>;
label = "DIP SW1 - Switch 3";
};
switch3: switch_3 {
/* gpio flags need validation */
gpios = <&gpio0 3 GPIO_INT_ACTIVE_LOW>;
label = "DIP SW1 - Switch 4";
};
};

};
Binary file not shown.

0 comments on commit bcba284

Please sign in to comment.
You can’t perform that action at this time.