Skip to content
Permalink
Browse files

boards: arm: add suport for Enclustra Mercury XU boards

This commit adds support for Enclustra's boards with ZynqMP SoC

Signed-off-by: Wojciech Sipak <wsipak@internships.antmicro.com>
  • Loading branch information...
wsipak committed Aug 29, 2019
1 parent d4f8079 commit 3a6674b027f4610298fce71a10c5dea2a661330b
@@ -0,0 +1,4 @@
# Copyright (c) 2019, Antmicro
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(board.c)
@@ -0,0 +1,6 @@
# Copyright (c) 2019, Antmicro
# SPDX-License-Identifier: Apache-2.0
config BOARD_MERCURY_XU_BOARD
bool "Mercury XU Board"
depends on SOC_XILINX_ZYNQMP
select DISABLE_TCM_ECC
@@ -0,0 +1,19 @@
# Copyright (c) 2019, Antmicro
# SPDX-License-Identifier: Apache-2.0

if BOARD_MERCURY_XU_BOARD

config BOARD
default "mercury_xu_board"

config BUILD_OUTPUT_STRIPPED
def_bool y

config FLASH_SIZE
int
default 64

config FLASH_BASE_ADDRESS
default 0x08000000

endif
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2019, Antmicro
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <init.h>
#define MIO_PIN_18 0xff180048
#define MIO_PIN_19 0xff18004c
#define MIO_PIN_38 0xff180098
#define MIO_PIN_39 0xff18009c

#define MIO_DEFAULT 0x0
#define MIO_UART0 0xc0

static int mercury_xu_board_init(struct device *port)
{
/* pinmux settings for uart */
sys_write32(MIO_UART0, MIO_PIN_38);
sys_write32(MIO_UART0, MIO_PIN_39);

/* disable misleading pinmux */
sys_write32(MIO_DEFAULT, MIO_PIN_18);
sys_write32(MIO_DEFAULT, MIO_PIN_19);

ARG_UNUSED(port);
return 0;
}

SYS_INIT(mercury_xu_board_init, PRE_KERNEL_2, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
@@ -0,0 +1,10 @@
/*
* Copyright (c) 2019, Antmicro
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __INC_BOARD_H
#define __INC_BOARD_H


#endif /* __INC_BOARD_H */
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2019, Antmicro
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <arm/xilinx/zynqmp.dtsi>

/ {
model = "Mercury XU";
compatible = "xlnx,zynqmp";

chosen {
zephyr,console = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};
};

&uart0 {
status = "okay";
current-speed = <115200>;
clock-frequency = <100000000>;
};

&ttc0 {
status = "okay";
clock-frequency = <100000000>;
};
@@ -0,0 +1,9 @@
# Copyright (c) 2019, Antmicro
identifier: mercury_xu_board
name: MERCURY-XU-BOARD
type: mcu
arch: arm
toolchain:
- zephyr
- gccarmemb
ram: 64
@@ -0,0 +1,19 @@
# Copyright (c) 2019, Antmicro
CONFIG_ARM=y
CONFIG_SOC_XILINX_ZYNQMP=y
CONFIG_BOARD_MERCURY_XU_BOARD=y

CONFIG_ISR_STACK_SIZE=1024
CONFIG_THREAD_STACK_INFO=y

# enable uart driver
CONFIG_SERIAL=y
CONFIG_UART_XLNX_PS=y

# enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# enable timer
CONFIG_XLNX_PSTTC_TIMER=y
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000

0 comments on commit 3a6674b

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