Skip to content

Commit

Permalink
boards: riscv: add initial support of adp_xc7k_ae350 board
Browse files Browse the repository at this point in the history
Adding adp_xc7k_ae350 board support based on andes_ae350 soc. It's base
support and only contains uart/gpio drivers.

Signed-off-by: Jim Shu <[email protected]>
  • Loading branch information
cwshu authored and nashif committed Aug 30, 2021
1 parent e4cb346 commit f9726c9
Show file tree
Hide file tree
Showing 10 changed files with 553 additions and 0 deletions.
6 changes: 6 additions & 0 deletions boards/riscv/adp_xc7k_ae350/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD_ADP_XC7K_AE350
bool "Andes ADP-XC7K AE350 Platform"
depends on SOC_RISCV_ANDES_AE350
5 changes: 5 additions & 0 deletions boards/riscv/adp_xc7k_ae350/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD
default "adp_xc7k_ae350" if BOARD_ADP_XC7K_AE350
154 changes: 154 additions & 0 deletions boards/riscv/adp_xc7k_ae350/adp_xc7k_ae350.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*
* Copyright (c) 2021 Andes Technology Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <andes_v5_ae350.dtsi>

/ {
model = "Andes ADP-XC7K AE350";
compatible = "andestech,adp_xc7k_ae350";

aliases {
gpio-0 = &gpio0;
led0 = &seg7_led1_g;
led1 = &seg7_led2_g;
sw0 = &user_button1;
};

chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,sram = &dram;
zephyr,flash = &flash0;
};

leds {
compatible = "gpio-leds";

seg7_led1_a: led_1 {
label = "7SEG LED1 A";
gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
};
seg7_led1_b: led_2 {
label = "7SEG LED1 B";
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
};
seg7_led1_c: led_3 {
label = "7SEG LED1 C";
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
};
seg7_led1_d: led_4 {
label = "7SEG LED1 D";
gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
};
seg7_led1_e: led_5 {
label = "7SEG LED1 E";
gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
};
seg7_led1_f: led_6 {
label = "7SEG LED1 F";
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
};
seg7_led1_g: led_7 {
label = "7SEG LED1 G";
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
};
seg7_led1_dp: led_8 {
label = "7SEG LED1 DP";
gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
};

seg7_led2_a: led_9 {
label = "7SEG LED2 A";
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
};
seg7_led2_b: led_10 {
label = "7SEG LED2 B";
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
};
seg7_led2_c: led_11 {
label = "7SEG LED2 C";
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
};
seg7_led2_d: led_12 {
label = "7SEG LED2 D";
gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
};
seg7_led2_e: led_13 {
label = "7SEG LED2 E";
gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
};
seg7_led2_f: led_14 {
label = "7SEG LED2 F";
gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
};
seg7_led2_g: led_15 {
label = "7SEG LED2 G";
gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
};
seg7_led2_dp: led_16 {
label = "7SEG LED2 DP";
gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
};
};

gpio_keys {
compatible = "gpio-keys";

user_button1: button_1 {
label = "User SW1";
gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
};
user_button2: button_2 {
label = "User SW2";
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
};
user_button3: button_3 {
label = "User SW3";
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
};
user_button4: button_4 {
label = "User SW4";
gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
};
user_button5: button_5 {
label = "User SW5";
gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
};
user_button6: button_6 {
label = "User SW6";
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
};
user_button7: button_7 {
label = "User SW7";
gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
};
};

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

&gpio0 {
status = "okay";
};

&spi0 {
status = "okay";
flash0: flash@0 {
compatible = "jedec,spi-nor";
label = "JEDEC SPI-NOR";
reg = <0>;
size = <16777216>;
spi-max-frequency = <1000000>;
jedec-id = [c2 25 35];
status = "okay";
};
};
13 changes: 13 additions & 0 deletions boards/riscv/adp_xc7k_ae350/adp_xc7k_ae350.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
identifier: adp_xc7k_ae350
name: Andes ADP-XC7K AE350
type: mcu
arch: riscv32
toolchain:
- zephyr
- cross-compile
ram: 512
supported:
- gpio
testing:
ignore_tags:
- bluetooth
43 changes: 43 additions & 0 deletions boards/riscv/adp_xc7k_ae350/adp_xc7k_ae350_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CONFIG_SOC_SERIES_RISCV_ANDES_V5=y
CONFIG_SOC_RISCV_ANDES_AE350=y
CONFIG_BOARD_ADP_XC7K_AE350=y
CONFIG_XIP=n
CONFIG_PLIC=y
CONFIG_RISCV_MACHINE_TIMER=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_PRINTK=y
CONFIG_BOOT_BANNER=y

# Serial driver options
CONFIG_SERIAL=y
CONFIG_UART_NS16550=y

# GPIO driver options
CONFIG_GPIO=y
CONFIG_GPIO_ANDES_ATCGPIO100=y

# RV64 options
#CONFIG_RV64I_CPU=y

# FPU (single precision) options
#CONFIG_FPU=y
#CONFIG_FPU_SHARING=y
#CONFIG_FLOAT_HARD=y
#CONFIG_SINGLE_PRECISION_FPU=y

# FPU (double precision) options
#CONFIG_FPU=y
#CONFIG_FPU_SHARING=y
#CONFIG_FLOAT_HARD=y
#CONFIG_DOUBLE_PRECISION_FPU=y

# HW DSP options
#CONFIG_SOC_ANDES_V5_HWDSP=y

# Cache options
CONFIG_CACHE_ENABLE=y

# Nocache memory options
#CONFIG_SOC_ANDES_V5_PMA=y
#CONFIG_NOCACHE_MEMORY=y
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f9726c9

Please sign in to comment.