U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yao Zi <me@ziyao.cc>
To: Yixun Lan <dlan@kernel.org>, u-boot@lists.u-boot-project.org
Cc: Yao Zi <me@ziyao.cc>, Tim Ouyang <tim609@andestech.com>,
	Leo Liang <leo.liang@sifive.com>, Tom Rini <trini@konsulko.com>,
	Michal Simek <michal.simek@amd.com>,
	Raymond Mao <raymond.mao@riscstar.com>,
	Hiago De Franco <hfranco@baylibre.com>,
	Junhui Liu <junhui.liu@pigmoral.tech>
Subject: Re: [PATCH 1/4] board: spacemit: add SpacemiT K3 Pico-ITX
Date: Wed, 23 Sep 2026 18:00:54 +0000	[thread overview]
Message-ID: <arQT1qStODRtFxPo@pie> (raw)
In-Reply-To: <20260923-00-basic-spacemit-k3-v1-1-fa1015f2cd1b@kernel.org>

On Wed, Sep 23, 2026 at 12:46:45PM +0000, Yixun Lan wrote:
> Add initial support for K3 Pico-ITX board, in this version, the DRAM
> information is parsed from DTS "/memory" node. And with UART enabled,
> the U-Boot serial console works fine now.
> 
> Signed-off-by: Yixun Lan <dlan@kernel.org>
> ---
>  arch/riscv/Kconfig            |  5 +++++
>  arch/riscv/cpu/k3/Kconfig     | 18 ++++++++++++++++++
>  arch/riscv/cpu/k3/Makefile    |  5 +++++
>  arch/riscv/cpu/k3/dram.c      | 29 +++++++++++++++++++++++++++++
>  board/spacemit/k3/Kconfig     | 30 ++++++++++++++++++++++++++++++
>  board/spacemit/k3/MAINTAINERS |  8 ++++++++
>  board/spacemit/k3/Makefile    |  5 +++++
>  board/spacemit/k3/board.c     |  4 ++++
>  include/configs/k3.h          | 13 +++++++++++++
>  9 files changed, 117 insertions(+)

...

> diff --git a/arch/riscv/cpu/k3/dram.c b/arch/riscv/cpu/k3/dram.c
> new file mode 100644
> index 00000000000..203d72a5da1
> --- /dev/null
> +++ b/arch/riscv/cpu/k3/dram.c
> @@ -0,0 +1,29 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2026 Yixun Lan <dlan@kernel.org>
> + */
> +
> +#include <fdtdec.h>
> +#include <init.h>
> +#include <linux/sizes.h>
> +#include <asm/global_data.h>

Please sort the headers alphabetically.

> +DECLARE_GLOBAL_DATA_PTR;
> +
> +int dram_init(void)
> +{
> +	return fdtdec_setup_mem_size_base();
> +}
> +
> +int dram_init_banksize(void)
> +{
> +	return fdtdec_setup_memory_banksize();
> +}
> +
> +phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
> +{
> +	if (gd->ram_size > SZ_2G)
> +		return gd->ram_base + SZ_2G;

What's the intention of this limitation?

> +	return gd->ram_base + gd->ram_size;
> +}

...

> diff --git a/board/spacemit/k3/Makefile b/board/spacemit/k3/Makefile
> new file mode 100644
> index 00000000000..bd5343be789
> --- /dev/null
> +++ b/board/spacemit/k3/Makefile
> @@ -0,0 +1,5 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# Copyright (C) 2026 Yixun Lan <dlan@kernel.org>
> +
> +obj-y := board.o
> diff --git a/board/spacemit/k3/board.c b/board/spacemit/k3/board.c
> new file mode 100644
> index 00000000000..29994e49ce8
> --- /dev/null
> +++ b/board/spacemit/k3/board.c
> @@ -0,0 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) 2026 Yixun Lan <dlan@kernel.org>
> + */

I think it makes sense to omit the source if it's empty for now.

Regards,
Yao Zi

  reply	other threads:[~2026-09-23 18:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 12:46 [PATCH 0/4] riscv: spacemit: Add support for K3 Pico-ITX board Yixun Lan
2026-09-23 12:46 ` [PATCH 1/4] board: spacemit: add SpacemiT K3 Pico-ITX Yixun Lan
2026-09-23 18:00   ` Yao Zi [this message]
2026-09-24  1:21     ` Yixun Lan
2026-09-23 12:46 ` [PATCH 2/4] riscv: dts: spacemit: k3: add binman node Yixun Lan
2026-09-23 12:46 ` [PATCH 3/4] configs: spacemit: Add K3 default configuration Yixun Lan
2026-09-23 12:46 ` [PATCH 4/4] doc: spacemit: k3: Add Pico-ITX board Yixun Lan
2026-09-25  5:26 ` [PATCH 0/4] riscv: spacemit: Add support for K3 " E Shattow
2026-10-01 11:19   ` Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=arQT1qStODRtFxPo@pie \
    --to=me@ziyao.cc \
    --cc=dlan@kernel.org \
    --cc=hfranco@baylibre.com \
    --cc=junhui.liu@pigmoral.tech \
    --cc=leo.liang@sifive.com \
    --cc=michal.simek@amd.com \
    --cc=raymond.mao@riscstar.com \
    --cc=tim609@andestech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox