[PATCH 1/4] riscv: sophgo: milkv_duo: initial support added

Tom Rini trini at konsulko.com
Mon Jan 8 21:42:51 CET 2024


On Sun, Jan 07, 2024 at 07:27:07PM +0800, Kongyang Liu wrote:

> Add support for Sophgo's Milk-V Duo board, only minimal device tree and
> serial console are enabled, and it can boot via vendor first stage
> bootloader.
> 
> Signed-off-by: Kongyang Liu <seashell11234455 at gmail.com>
> 
> ---
> 
>  arch/riscv/Kconfig                 |  4 ++++
>  board/sophgo/milkv_duo/Kconfig     | 28 ++++++++++++++++++++++++++++
>  board/sophgo/milkv_duo/MAINTAINERS |  6 ++++++
>  board/sophgo/milkv_duo/Makefile    |  5 +++++
>  board/sophgo/milkv_duo/board.c     |  9 +++++++++
>  include/configs/milkv_duo.h        | 16 ++++++++++++++++

The defconfig patch should be folded in to this one.

[snip]
> diff --git a/board/sophgo/milkv_duo/board.c b/board/sophgo/milkv_duo/board.c
> new file mode 100644
> index 0000000000..eaa47be173
> --- /dev/null
> +++ b/board/sophgo/milkv_duo/board.c
> @@ -0,0 +1,9 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (c) 2024, Kongyang Liu <seashell11234455 at gmail.com>
> + */
> +
> +int board_init(void)
> +{
> +	return 0;
> +}

Shouldn't you enable caches here?

> diff --git a/include/configs/milkv_duo.h b/include/configs/milkv_duo.h
> new file mode 100644
> index 0000000000..dd1d146c50
> --- /dev/null
> +++ b/include/configs/milkv_duo.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (c) 2024, Kongyang Liu <seashell11234455 at gmail.com>
> + *
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#define CFG_SYS_SDRAM_BASE         0x80000000
> +
> +#define CFG_EXTRA_ENV_SETTINGS                 \
> +	"consoledev=ttyS0"                         \
> +	"baudrate=115200\0"                        \

We shouldn't need to set baudrate, it will be handled for us. Is
consoledev something that must be set? Can it all be done in a plain
text environment anyhow? Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240108/cbb43a61/attachment.sig>


More information about the U-Boot mailing list