riscv: canaan: k230_canmv: Add initial support

Add support for K230 CanMV board with serial console and usb otg
support. It can boot via vendor's u-boot-spl and boot into Linux
via tftp through the onboard RTL8152.

Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
Junhui Liu 2025-01-15 00:46:40 +08:00 committed by Leo Yu-Chi Liang
parent 78d9ce3e36
commit 9c402a54df
5 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,19 @@
if TARGET_K230_CANMV
config SYS_BOARD
default "k230_canmv"
config SYS_VENDOR
default "canaan"
config SYS_CPU
default "k230"
config TEXT_BASE
default 0x0
config BOARD_SPECIFIC_OPTIONS
def_bool y
select CANAAN_K230
endif

View file

@ -0,0 +1,6 @@
K230 CANMV
M: Junhui Liu <junhui.liu@pigmoral.tech>
S: Maintained
F: board/canaan/k230_canmv/
F: configs/k230_canmv_defconfig
F: doc/board/canaan/k230_canmv.rst

View file

@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2025, Junhui Liu <junhui.liu@pigmoral.tech>
obj-y += board.o

View file

@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2025, Junhui Liu <junhui.liu@pigmoral.tech>
*/
int board_init(void)
{
return 0;
}

View file

@ -0,0 +1,19 @@
CONFIG_RISCV=y
CONFIG_SYS_MALLOC_F_LEN=0x40000
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80400000
CONFIG_DEFAULT_DEVICE_TREE="k230-canmv"
CONFIG_SYS_LOAD_ADDR=0xc000000
CONFIG_TARGET_K230_CANMV=y
CONFIG_ARCH_RV64I=y
CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="K230# "
CONFIG_CMD_USB=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SYS_NS16550=y
CONFIG_SYS_NS16550_MEM32=y
CONFIG_USB=y
CONFIG_USB_DWC2=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_RTL8152=y