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@antmicro.com>
This commit is contained in:
parent
56c06e852b
commit
ff0dd82da0
7 changed files with 108 additions and 0 deletions
4
boards/arm/mercury_xu/CMakeLists.txt
Normal file
4
boards/arm/mercury_xu/CMakeLists.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Copyright (c) 2020, Antmicro
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
zephyr_library()
|
||||||
|
zephyr_library_sources(board.c)
|
5
boards/arm/mercury_xu/Kconfig.board
Normal file
5
boards/arm/mercury_xu/Kconfig.board
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2020, Antmicro
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
config BOARD_MERCURY_XU
|
||||||
|
bool "Mercury XU Board"
|
||||||
|
depends on SOC_XILINX_ZYNQMP_RPU
|
16
boards/arm/mercury_xu/Kconfig.defconfig
Normal file
16
boards/arm/mercury_xu/Kconfig.defconfig
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
# Copyright (c) 2020, Antmicro
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if BOARD_MERCURY_XU
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "mercury_xu"
|
||||||
|
|
||||||
|
config FLASH_SIZE
|
||||||
|
int
|
||||||
|
default 64
|
||||||
|
|
||||||
|
config FLASH_BASE_ADDRESS
|
||||||
|
default 0x08000000
|
||||||
|
|
||||||
|
endif
|
30
boards/arm/mercury_xu/board.c
Normal file
30
boards/arm/mercury_xu/board.c
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020, 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_init(const 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_init, PRE_KERNEL_2,
|
||||||
|
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
30
boards/arm/mercury_xu/mercury_xu.dts
Normal file
30
boards/arm/mercury_xu/mercury_xu.dts
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020, Antmicro
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <arm/xilinx/zynqmp_rpu.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 = <99999901>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&ttc0 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <5000000>;
|
||||||
|
};
|
8
boards/arm/mercury_xu/mercury_xu.yaml
Normal file
8
boards/arm/mercury_xu/mercury_xu.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2020, Antmicro
|
||||||
|
identifier: mercury_xu
|
||||||
|
name: MERCURY-XU
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
15
boards/arm/mercury_xu/mercury_xu_defconfig
Normal file
15
boards/arm/mercury_xu/mercury_xu_defconfig
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Copyright (c) 2020, Antmicro
|
||||||
|
CONFIG_SOC_XILINX_ZYNQMP_RPU=y
|
||||||
|
CONFIG_BOARD_MERCURY_XU=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=100
|
Loading…
Add table
Add a link
Reference in a new issue