From: Yixun Lan <dlan@kernel.org>
To: Yao Zi <me@ziyao.cc>
Cc: u-boot@lists.u-boot-project.org,
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: Thu, 24 Sep 2026 01:21:31 +0000 [thread overview]
Message-ID: <20260924012131-GKG353745@kernel.org> (raw)
In-Reply-To: <arQT1qStODRtFxPo@pie>
Hi Yao,
On 18:00 Wed 23 Sep , Yao Zi wrote:
> 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.
>
Ok, will do
> > +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?
>
This is a copy & paste from k1's implementation while K1 has discrete
memory layout which 0x8000 0000 - 0xFFFF FFFF is iomem space
For K3, there is no such problem, so no need this function
> > + 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.
>
Ok, fair
--
Yixun Lan (dlan)
next prev parent reply other threads:[~2026-09-24 1:21 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
2026-09-24 1:21 ` Yixun Lan [this message]
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=20260924012131-GKG353745@kernel.org \
--to=dlan@kernel.org \
--cc=hfranco@baylibre.com \
--cc=junhui.liu@pigmoral.tech \
--cc=leo.liang@sifive.com \
--cc=me@ziyao.cc \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.