[PATCH v4 01/14] spacemit: k1: support multi-board infrastructure
Anand Moon
linux.amoon at gmail.com
Tue May 19 07:23:58 CEST 2026
Hi Guodong,
Thanks,
On Tue, 19 May 2026 at 04:08, Guodong Xu <guodong at riscstar.com> wrote:
>
> From: Raymond Mao <raymond.mao at riscstar.com>
>
> Restructure K1 SoC support to handle multiple boards through a single
> configuration:
>
> 1. Rename bananapi-f3_defconfig to spacemit_k1_defconfig.
> 2. Move all K1 board files to board/spacemit/k1/.
> 3. Replace TARGET_BANANAPI_F3 with TARGET_SPACEMIT_K1 and rename the
> board's <board>.h header to k1.h.
>
> Eliminates the need for board-specific defconfigs while maintaining
> hardware compatibility.
>
> Signed-off-by: Raymond Mao <raymond.mao at riscstar.com>
> Signed-off-by: Guodong Xu <guodong at riscstar.com>
>
:~/mainline/u-boot/risc-v/u-boot-riscv$ b4 am
20260519-b4-k1-spl-bring-up-v4-0-3915a2a904c1 at riscstar.com
Looking up https://lore.kernel.org/all/20260519-b4-k1-spl-bring-up-v4-0-3915a2a904c1@riscstar.com/
Grabbing thread from
lore.kernel.org/all/20260519-b4-k1-spl-bring-up-v4-0-3915a2a904c1 at riscstar.com/t.mbox.gz
Analyzing 15 messages in the thread
Looking for additional code-review trailers on lore.kernel.org
Analyzing 51 code-review messages
Checking attestation on all messages, may take a moment...
---
[PATCH v4 1/14] spacemit: k1: support multi-board infrastructure
[PATCH v4 2/14] spacemit: k1: enable SPL with debug UART
[PATCH v4 3/14] configs: k1: enable early timer support
[PATCH v4 4/14] clk: spacemit: k1: prune SPL clock tree
[PATCH v4 5/14] configs: k1: add default option for clock driver in SPL
[PATCH v4 6/14] dts: k1: enable clocks in SPL
[PATCH v4 7/14] board: k1: initialize clock and serial devices in SPL
[PATCH v4 8/14] i2c: k1: add I2C driver support
[PATCH v4 9/14] spacemit: k1: add TLV EEPROM support in SPL
[PATCH v4 10/14] spacemit: k1: Add DDR firmware support to SPL
[PATCH v4 11/14] power: pmic: add support for Spacemit P1 PMIC
[PATCH v4 12/14] power: regulator: add support for Spacemit P1 SoC
[PATCH v4 13/14] board: k1: enable pmic in spl
[PATCH v4 14/14] doc: spacemit: add K1 SPL build and test guide
---
NOTE: install dkimpy for DKIM signature verification
---
Total patches: 14
---
Cover: ./v4_20260519_guodong_riscv_spacemit_k1_add_spl_support.cover
Link: https://patch.msgid.link/20260519-b4-k1-spl-bring-up-v4-0-3915a2a904c1@riscstar.com
Base: base-commit 52ec53db8f18ed476f30de3799067652948eba28 not known, ignoring
git am ./v4_20260519_guodong_riscv_spacemit_k1_add_spl_support.mbx
amoon at Dell-5430:~/mainline/u-boot/risc-v/u-boot-riscv$ git am
./v4_20260519_guodong_riscv_spacemit_k1_add_spl_support.mbx
Applying: spacemit: k1: support multi-board infrastructure
error: patch failed: configs/bananapi-f3_defconfig:6
error: configs/bananapi-f3_defconfig: patch does not apply
Patch failed at 0001 spacemit: k1: support multi-board infrastructure
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
amoon at Dell-5430:~/mainline/u-boot/risc-v/u-boot-riscv$
I could not apply these changes to the U-Boot mainline
Could you rebase the series on the U-Boot master branch?
Thanks
-Anand
> ---
> v4:
> - No change.
> ---
> arch/riscv/Kconfig | 8 ++++----
> arch/riscv/cpu/k1/Kconfig | 4 ++++
> board/spacemit/{bananapi-f3 => k1}/Kconfig | 6 +++---
> board/spacemit/{bananapi-f3 => k1}/MAINTAINERS | 4 ++--
> board/spacemit/{bananapi-f3 => k1}/Makefile | 0
> board/spacemit/{bananapi-f3 => k1}/board.c | 0
> configs/{bananapi-f3_defconfig => spacemit_k1_defconfig} | 2 +-
> doc/board/spacemit/bananapi-f3.rst | 2 +-
> include/configs/{bananapi-f3.h => k1.h} | 0
> 9 files changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index ad7589123c6..485067ed266 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -14,9 +14,6 @@ config TARGET_ANDES_AE350
> config TARGET_ANDES_VOYAGER
> bool "Support Andes Voyager Board"
>
> -config TARGET_BANANAPI_F3
> - bool "Support BananaPi F3 Board"
> -
> config TARGET_BEAGLEBOARD_BEAGLEVFIRE
> bool "Support BeagleBoard BeagleV-Fire Board (based on Microchip MPFS)"
>
> @@ -50,6 +47,9 @@ config TARGET_SIPEED_MAIX
> bool "Support Sipeed Maix Board"
> select SYS_CACHE_SHIFT_6
>
> +config TARGET_SPACEMIT_K1
> + bool "Support Spacemit K1 SoC"
> +
> config TARGET_STARFIVE_VISIONFIVE2
> bool "Support StarFive VisionFive2 Board"
> select BOARD_LATE_INIT
> @@ -119,7 +119,7 @@ source "board/sifive/unmatched/Kconfig"
> source "board/sipeed/maix/Kconfig"
> source "board/sophgo/milkv_duo/Kconfig"
> source "board/sophgo/licheerv_nano/Kconfig"
> -source "board/spacemit/bananapi-f3/Kconfig"
> +source "board/spacemit/k1/Kconfig"
> source "board/starfive/visionfive2/Kconfig"
> source "board/thead/th1520_lpi4a/Kconfig"
> source "board/xilinx/mbv/Kconfig"
> diff --git a/arch/riscv/cpu/k1/Kconfig b/arch/riscv/cpu/k1/Kconfig
> index 14201df80f2..3701bf2b5da 100644
> --- a/arch/riscv/cpu/k1/Kconfig
> +++ b/arch/riscv/cpu/k1/Kconfig
> @@ -2,6 +2,8 @@
> #
> # Copyright (C) 2024, Kongyang Liu <seashell11234455 at gmail.com>
>
> +if TARGET_SPACEMIT_K1
> +
> config SPACEMIT_K1
> bool
> select BINMAN
> @@ -17,3 +19,5 @@ config SPACEMIT_K1
> imply SPL_CPU
> imply SPL_OPENSBI
> imply SPL_LOAD_FIT
> +
> +endif
> diff --git a/board/spacemit/bananapi-f3/Kconfig b/board/spacemit/k1/Kconfig
> similarity index 79%
> rename from board/spacemit/bananapi-f3/Kconfig
> rename to board/spacemit/k1/Kconfig
> index f89fa9af2c7..1c615f89b64 100644
> --- a/board/spacemit/bananapi-f3/Kconfig
> +++ b/board/spacemit/k1/Kconfig
> @@ -1,7 +1,7 @@
> -if TARGET_BANANAPI_F3
> +if TARGET_SPACEMIT_K1
>
> config SYS_BOARD
> - default "bananapi-f3"
> + default "k1"
>
> config SYS_VENDOR
> default "spacemit"
> @@ -10,7 +10,7 @@ config SYS_CPU
> default "k1"
>
> config SYS_CONFIG_NAME
> - default "bananapi-f3"
> + default "k1"
>
> config TEXT_BASE
> default 0x00200000
> diff --git a/board/spacemit/bananapi-f3/MAINTAINERS b/board/spacemit/k1/MAINTAINERS
> similarity index 61%
> rename from board/spacemit/bananapi-f3/MAINTAINERS
> rename to board/spacemit/k1/MAINTAINERS
> index 131bad03181..b256cbe7978 100644
> --- a/board/spacemit/bananapi-f3/MAINTAINERS
> +++ b/board/spacemit/k1/MAINTAINERS
> @@ -1,6 +1,6 @@
> BananaPi F3
> M: Huan Zhou <pericycle.cc@@gmail.com>
> S: Maintained
> -F: board/spacemit/bananapi-f3/
> -F: configs/bananapi-f3_defconfig
> +F: board/spacemit/k1/
> +F: configs/spacemit_k1_defconfig
> F: doc/board/spacemit/bananapi-f3.rst
> diff --git a/board/spacemit/bananapi-f3/Makefile b/board/spacemit/k1/Makefile
> similarity index 100%
> rename from board/spacemit/bananapi-f3/Makefile
> rename to board/spacemit/k1/Makefile
> diff --git a/board/spacemit/bananapi-f3/board.c b/board/spacemit/k1/board.c
> similarity index 100%
> rename from board/spacemit/bananapi-f3/board.c
> rename to board/spacemit/k1/board.c
> diff --git a/configs/bananapi-f3_defconfig b/configs/spacemit_k1_defconfig
> similarity index 95%
> rename from configs/bananapi-f3_defconfig
> rename to configs/spacemit_k1_defconfig
> index adecbee10f2..fae561bbf8a 100644
> --- a/configs/bananapi-f3_defconfig
> +++ b/configs/spacemit_k1_defconfig
> @@ -6,7 +6,7 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x1000000
> CONFIG_DEFAULT_DEVICE_TREE="spacemit/k1-bananapi-f3"
> CONFIG_SYS_BOOTM_LEN=0xa000000
> CONFIG_SYS_LOAD_ADDR=0x200000
> -CONFIG_TARGET_BANANAPI_F3=y
> +CONFIG_TARGET_SPACEMIT_K1=y
> CONFIG_ARCH_RV64I=y
> CONFIG_RISCV_SMODE=y
> CONFIG_FIT=y
> diff --git a/doc/board/spacemit/bananapi-f3.rst b/doc/board/spacemit/bananapi-f3.rst
> index f2220950a3a..1ece2ce9d02 100644
> --- a/doc/board/spacemit/bananapi-f3.rst
> +++ b/doc/board/spacemit/bananapi-f3.rst
> @@ -29,7 +29,7 @@ built for SpacemiT K1 SoC as below:
> .. code-block:: console
>
> cd <U-Boot-dir>
> - make bananapi-f3_defconfig
> + make spacemit_k1_defconfig
> make OPENSBI=<OpenSBI-dir>/build/platform/generic/firmware/fw_dynamic.bin
>
> This will generate u-boot.itb
> diff --git a/include/configs/bananapi-f3.h b/include/configs/k1.h
> similarity index 100%
> rename from include/configs/bananapi-f3.h
> rename to include/configs/k1.h
>
> --
> 2.43.0
>
More information about the U-Boot
mailing list