riscv: spacemit: Add support for K3 Pico-ITX board
Subsystems (2)
Yixun Lan
maintainerv4 cover riscv: spacemit: Add support for K3 Pico-ITX board
Add initial support for SpacemiT K3 Pico-ITX board, the config file will enable all basic components which make it able to run into U-Boot serial console.
The series actually depend on previous sent patches, I'm not adding dependency to this series, but list it here for reference.
Pinctrl:
https://patch.msgid.link/[email protected]
GPIO:
https://patch.msgid.link/[email protected]
clock and reset:
https://patch.msgid.link/[email protected]
---
Changes in v4:
- update doc
- add separate binman.dtsi file
- Link to v3: https://patch.msgid.link/[email protected]
Changes in v3:
- rename header and dtsi file with vendor prefix
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- drop board_get_usable_ram_top()
- drop empty source file
- Link to v1: https://patch.msgid.link/[email protected]
---
Yixun Lan (4):
board: spacemit: add SpacemiT K3 Pico-ITX
riscv: dts: spacemit: k3: add binman node
configs: spacemit: Add K3 default configuration
doc: spacemit: k3: Add Pico-ITX board
arch/riscv/Kconfig | 5 + arch/riscv/cpu/k3/Kconfig | 18 +++ arch/riscv/cpu/k3/Makefile | 5 + arch/riscv/cpu/k3/dram.c | 21 ++++ arch/riscv/dts/spacemit-k3-binman.dtsi | 6 + arch/riscv/dts/spacemit-k3-u-boot.dtsi | 6 + board/spacemit/k3/Kconfig | 30 +++++ board/spacemit/k3/MAINTAINERS | 8 ++ configs/spacemit_k3_defconfig | 51 ++++++++ doc/board/spacemit/index.rst | 1 + doc/board/spacemit/spacemit-pico-itx.rst | 200 +++++++++++++++++++++++++++++++ include/configs/spacemit-k3.h | 13 ++ 12 files changed, 364 insertions(+)
---
base-commit: cf615aafae36fc49f55e3e6a3648d29201b26d51
change-id: 20260921-00-basic-spacemit-k3-838119645d39
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>
Yixun Lan
maintainerPATCH v4 1/4 board: spacemit: add SpacemiT K3 Pico-ITX
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.
--- arch/riscv/Kconfig | 5 +++++ arch/riscv/cpu/k3/Kconfig | 18 ++++++++++++++++++ arch/riscv/cpu/k3/Makefile | 5 +++++ arch/riscv/cpu/k3/dram.c | 21 +++++++++++++++++++++ board/spacemit/k3/Kconfig | 30 ++++++++++++++++++++++++++++++ board/spacemit/k3/MAINTAINERS | 8 ++++++++ include/configs/spacemit-k3.h | 13 +++++++++++++ 7 files changed, 100 insertions(+)
arch/riscv/Kconfig +5 -0
@@ -53,6 +53,9 @@ config TARGET_SIPEED_MAIX config TARGET_SPACEMIT_K1 bool "Support Spacemit K1 SoC" +config TARGET_SPACEMIT_K3 + bool "Support SpacemiT K3 SoC" + config TARGET_STARFIVE_VISIONFIVE2 bool "Support StarFive VisionFive2 Board" select BOARD_LATE_INIT
@@ -124,6 +127,7 @@ source "board/sophgo/milkv_duo/Kconfig" source "board/sophgo/milkv_duo_256m/Kconfig" source "board/sophgo/licheerv_nano/Kconfig" source "board/spacemit/k1/Kconfig" +source "board/spacemit/k3/Kconfig" source "board/starfive/visionfive2/Kconfig" source "board/thead/th1520_lpi4a/Kconfig" source "board/xilinx/mbv/Kconfig"
@@ -138,6 +142,7 @@ source "arch/riscv/cpu/mpfs/Kconfig" source "arch/riscv/cpu/generic/Kconfig" source "arch/riscv/cpu/jh7110/Kconfig" source "arch/riscv/cpu/k1/Kconfig" +source "arch/riscv/cpu/k3/Kconfig" source "arch/riscv/cpu/k230/Kconfig" source "arch/riscv/cpu/th1520/Kconfig"
arch/riscv/cpu/k3/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SPACEMIT_K3 + bool + select BINMAN + select ARCH_EARLY_INIT_R + select SYS_CACHE_SHIFT_6 + imply CPU + imply CPU_RISCV + imply RISCV_TIMER if RISCV_SMODE + imply CMD_CPU + imply OF_UPSTREAM + +endif
arch/riscv/cpu/k3/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +obj-y += dram.o
arch/riscv/cpu/k3/dram.c new file +21 -0
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#include <fdtdec.h> +#include <init.h> +#include <linux/sizes.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +return fdtdec_setup_mem_size_base (); +} + +int dram_init_banksize (void ) +{ +return fdtdec_setup_memory_banksize (); +}
board/spacemit/k3/Kconfig new file +30 -0
@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SYS_BOARD + default "k3" + +config SYS_VENDOR + default "spacemit" + +config SYS_CPU + default "k3" + +config SYS_CONFIG_NAME + default "spacemit-k3" + +config TEXT_BASE + default 0x102000000 + +config SPL_OPENSBI_LOAD_ADDR + hex + default 0x100000000 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SPACEMIT_K3 + +endif
board/spacemit/k3/MAINTAINERS new file +8 -0
@@ -0,0 +1,8 @@ +SPACEMIT K3 +M: Yixun Lan <[email protected]> +S: Maintained +F: arch/riscv/cpu/k3/ +F: board/spacemit/k3/ +F: configs/spacemit_k3_defconfig +F: include/configs/k3.h +F: arch/riscv/dts/k3-u-boot.dtsi
include/configs/spacemit-k3.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#ifndef __SPACEMIT_K3_H +#define __SPACEMIT_K3_H + +#define CFG_SYS_NS16550_IER 0x40 + +#define RISCV_SMODE_TIMER_FREQ 24000000 + +#endif /* __SPACEMIT_K3_H */
Signature · 1 line
2.56.0
Re: [PATCH v4 1/4] board: spacemit: add SpacemiT K3 Pico-ITX
Hi Yixun, we should refresh MAINTAINERS such as file rename and added changes requested are now settled. Keep R-by tag from me on the refresh if there's no v5 before merge, thanks!
Quoted 150 lines · Yixun Lan
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.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- arch/riscv/Kconfig | 5 +++++ arch/riscv/cpu/k3/Kconfig | 18 ++++++++++++++++++ arch/riscv/cpu/k3/Makefile | 5 +++++ arch/riscv/cpu/k3/dram.c | 21 +++++++++++++++++++++ board/spacemit/k3/Kconfig | 30 ++++++++++++++++++++++++++++++ board/spacemit/k3/MAINTAINERS | 8 ++++++++ include/configs/spacemit-k3.h | 13 +++++++++++++ 7 files changed, 100 insertions(+)arch/riscv/Kconfig +5
-0@@ -53,6 +53,9 @@ config TARGET_SIPEED_MAIX config TARGET_SPACEMIT_K1 bool "Support Spacemit K1 SoC" +config TARGET_SPACEMIT_K3 + bool "Support SpacemiT K3 SoC" + config TARGET_STARFIVE_VISIONFIVE2 bool "Support StarFive VisionFive2 Board" select BOARD_LATE_INIT@@ -124,6 +127,7 @@ source "board/sophgo/milkv_duo/Kconfig" source "board/sophgo/milkv_duo_256m/Kconfig" source "board/sophgo/licheerv_nano/Kconfig" source "board/spacemit/k1/Kconfig" +source "board/spacemit/k3/Kconfig" source "board/starfive/visionfive2/Kconfig" source "board/thead/th1520_lpi4a/Kconfig" source "board/xilinx/mbv/Kconfig"@@ -138,6 +142,7 @@ source "arch/riscv/cpu/mpfs/Kconfig" source "arch/riscv/cpu/generic/Kconfig" source "arch/riscv/cpu/jh7110/Kconfig" source "arch/riscv/cpu/k1/Kconfig" +source "arch/riscv/cpu/k3/Kconfig" source "arch/riscv/cpu/k230/Kconfig" source "arch/riscv/cpu/th1520/Kconfig"arch/riscv/cpu/k3/Kconfig new file +18
-0@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SPACEMIT_K3 + bool + select BINMAN + select ARCH_EARLY_INIT_R + select SYS_CACHE_SHIFT_6 + imply CPU + imply CPU_RISCV + imply RISCV_TIMER if RISCV_SMODE + imply CMD_CPU + imply OF_UPSTREAM + +endifarch/riscv/cpu/k3/Makefile new file +5
-0@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +obj-y += dram.oarch/riscv/cpu/k3/dram.c new file +21
-0@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#include <fdtdec.h> +#include <init.h> +#include <linux/sizes.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +return fdtdec_setup_mem_size_base (); +} + +int dram_init_banksize (void ) +{ +return fdtdec_setup_memory_banksize (); +}board/spacemit/k3/Kconfig new file +30
-0@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SYS_BOARD + default "k3" + +config SYS_VENDOR + default "spacemit" + +config SYS_CPU + default "k3" + +config SYS_CONFIG_NAME + default "spacemit-k3" + +config TEXT_BASE + default 0x102000000 + +config SPL_OPENSBI_LOAD_ADDR + hex + default 0x100000000 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SPACEMIT_K3 + +endifboard/spacemit/k3/MAINTAINERS new file +0
-0
board/spacemit/k3/MAINTAINERS line 7
Quoted 7 lines
board/spacemit/k3/MAINTAINERS new file +7
-0@@ -0,0 +1,8 @@ +SPACEMIT K3 +M: Yixun Lan <[email protected]> +S: Maintained +F: arch/riscv/cpu/k3/ +F: board/spacemit/k3/ +F: configs/spacemit_k3_defconfig +F: include/configs/k3.h
-F: include/configs/k3.h
+F: include/configs/spacemit-k3.h
board/spacemit/k3/MAINTAINERS line 8
Quoted 1 line
board/spacemit/k3/MAINTAINERS new file +1
-0+F: arch/riscv/dts/k3-u-boot.dtsi
-F: arch/riscv/dts/k3-u-boot.dtsi
+F: arch/riscv/dts/spacemit-k3-binman.dtsi
+F: arch/riscv/dts/spacemit-k3-u-boot.dtsi
Note aside that K1 dtsi are listed in source tree root MAINTAINERS, which is probably needing to be changed separately and follow the example of per-board like you are doing here for K3. We are missing something in per-board MAINTAINERS here for doc/board/spacemit/spacemit-pico-itx.rst and it could be added here or not, it is matching anyways by the source tree root MAINTAINERS on 'spacemit' search.
Other modified files (with required dependency patches applied) for our reference:
not applicable arch/riscv/Kconfigdrivers/clk/spacemit/Kconfigdrivers/clk/spacemit/Makefiledrivers/clk/spacemit/clk-k3.cdrivers/clk/spacemit/clk_common.hdrivers/clk/spacemit/clk_mix.cdrivers/clk/spacemit/clk_mix.hdrivers/clk/spacemit/clk_pll.cdrivers/clk/spacemit/clk_pll.hdrivers/gpio/Kconfigdrivers/gpio/spacemit_gpio.c
not applicable drivers/reset/Kconfig
not applicable drivers/reset/Makefiledrivers/reset/spacemit/Kconfigdrivers/reset/spacemit/Makefiledrivers/reset/spacemit/reset-spacemit-common.cdrivers/reset/spacemit/reset-spacemit-common.hdrivers/reset/spacemit/reset-spacemit-k1.cdrivers/reset/spacemit/reset-spacemit-k3.cinclude/soc/spacemit/k3-reset.hinclude/soc/spacemit/k3-syscon.h
With the expectation that those drivers' patches are to be merged in-order before this K3 Pico-ITX series, I think this all makes good sense, and all dependency series will be covered by source tree root MAINTAINERS on 'spacemit' search.
Quoted 10 lines
include/configs/spacemit-k3.h new file +3
-0@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2026 Yixun Lan <[email protected]>
include/configs/spacemit-k3.h line 13
Quoted 10 lines
include/configs/spacemit-k3.h new file +10
-0+*/ + +#ifndef __SPACEMIT_K3_H +#define __SPACEMIT_K3_H + +#define CFG_SYS_NS16550_IER 0x40 + +#define RISCV_SMODE_TIMER_FREQ 24000000 + +#endif /* __SPACEMIT_K3_H */
Yixun Lan
maintainerRe: [PATCH v4 1/4] board: spacemit: add SpacemiT K3 Pico-ITX
Hi E Shattow,
Quoted 4 lines · E Shattow
Hi Yixun, we should refresh
MAINTAINERSsuch as file rename and added changes requested are now settled. Keep R-by tag from me on the refresh if there's no v5 before merge, thanks!
Ok, I will no send a new version, since it's really minor changes
Quoted 201 lines · Yixun Lan
Quoted 157 lines
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.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- arch/riscv/Kconfig | 5 +++++ arch/riscv/cpu/k3/Kconfig | 18 ++++++++++++++++++ arch/riscv/cpu/k3/Makefile | 5 +++++ arch/riscv/cpu/k3/dram.c | 21 +++++++++++++++++++++ board/spacemit/k3/Kconfig | 30 ++++++++++++++++++++++++++++++ board/spacemit/k3/MAINTAINERS | 8 ++++++++ include/configs/spacemit-k3.h | 13 +++++++++++++ 7 files changed, 100 insertions(+)arch/riscv/Kconfig +5
-0@@ -53,6 +53,9 @@ config TARGET_SIPEED_MAIX config TARGET_SPACEMIT_K1 bool "Support Spacemit K1 SoC" +config TARGET_SPACEMIT_K3 + bool "Support SpacemiT K3 SoC" + config TARGET_STARFIVE_VISIONFIVE2 bool "Support StarFive VisionFive2 Board" select BOARD_LATE_INIT@@ -124,6 +127,7 @@ source "board/sophgo/milkv_duo/Kconfig" source "board/sophgo/milkv_duo_256m/Kconfig" source "board/sophgo/licheerv_nano/Kconfig" source "board/spacemit/k1/Kconfig" +source "board/spacemit/k3/Kconfig" source "board/starfive/visionfive2/Kconfig" source "board/thead/th1520_lpi4a/Kconfig" source "board/xilinx/mbv/Kconfig"@@ -138,6 +142,7 @@ source "arch/riscv/cpu/mpfs/Kconfig" source "arch/riscv/cpu/generic/Kconfig" source "arch/riscv/cpu/jh7110/Kconfig" source "arch/riscv/cpu/k1/Kconfig" +source "arch/riscv/cpu/k3/Kconfig" source "arch/riscv/cpu/k230/Kconfig" source "arch/riscv/cpu/th1520/Kconfig"arch/riscv/cpu/k3/Kconfig new file +18
-0@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SPACEMIT_K3 + bool + select BINMAN + select ARCH_EARLY_INIT_R + select SYS_CACHE_SHIFT_6 + imply CPU + imply CPU_RISCV + imply RISCV_TIMER if RISCV_SMODE + imply CMD_CPU + imply OF_UPSTREAM + +endifarch/riscv/cpu/k3/Makefile new file +5
-0@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +obj-y += dram.oarch/riscv/cpu/k3/dram.c new file +21
-0@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#include <fdtdec.h> +#include <init.h> +#include <linux/sizes.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +return fdtdec_setup_mem_size_base (); +} + +int dram_init_banksize (void ) +{ +return fdtdec_setup_memory_banksize (); +}board/spacemit/k3/Kconfig new file +30
-0@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SYS_BOARD + default "k3" + +config SYS_VENDOR + default "spacemit" + +config SYS_CPU + default "k3" + +config SYS_CONFIG_NAME + default "spacemit-k3" + +config TEXT_BASE + default 0x102000000 + +config SPL_OPENSBI_LOAD_ADDR + hex + default 0x100000000 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SPACEMIT_K3 + +endifboard/spacemit/k3/MAINTAINERS new file +7
-0@@ -0,0 +1,8 @@ +SPACEMIT K3 +M: Yixun Lan <[email protected]> +S: Maintained +F: arch/riscv/cpu/k3/ +F: board/spacemit/k3/ +F: configs/spacemit_k3_defconfig +F: include/configs/k3.h(quoted diff) +1
-1-F: include/configs/k3.h +F: include/configs/spacemit-k3.hQuoted 2 lines
board/spacemit/k3/MAINTAINERS new file +1
-0+F: arch/riscv/dts/k3-u-boot.dtsi(quoted diff) +2
-1-F: arch/riscv/dts/k3-u-boot.dtsi +F: arch/riscv/dts/spacemit-k3-binman.dtsi +F: arch/riscv/dts/spacemit-k3-u-boot.dtsiNote aside that K1 dtsi are listed in source tree root
MAINTAINERS, which is probably needing to be changed separately and follow the example of per-board like you are doing here for K3. We are missing something in per-boardMAINTAINERShere fordoc/board/spacemit/spacemit-pico-itx.rstand it could be added here or not, it is matching anyways by the source tree rootMAINTAINERSon 'spacemit' search.Other modified files (with required dependency patches applied) for our reference:
not applicable
arch/riscv/Kconfigdrivers/clk/spacemit/Kconfigdrivers/clk/spacemit/Makefiledrivers/clk/spacemit/clk-k3.cdrivers/clk/spacemit/clk_common.hdrivers/clk/spacemit/clk_mix.cdrivers/clk/spacemit/clk_mix.hdrivers/clk/spacemit/clk_pll.cdrivers/clk/spacemit/clk_pll.hdrivers/gpio/Kconfigdrivers/gpio/spacemit_gpio.c
not applicabledrivers/reset/Kconfig
not applicabledrivers/reset/Makefiledrivers/reset/spacemit/Kconfigdrivers/reset/spacemit/Makefiledrivers/reset/spacemit/reset-spacemit-common.cdrivers/reset/spacemit/reset-spacemit-common.hdrivers/reset/spacemit/reset-spacemit-k1.cdrivers/reset/spacemit/reset-spacemit-k3.cinclude/soc/spacemit/k3-reset.hinclude/soc/spacemit/k3-syscon.h
Quoted 5 lines
With the expectation that those drivers' patches are to be merged in-order before this K3 Pico-ITX series, I think this all makes good sense, and all dependency series will be covered by source tree root
MAINTAINERSon 'spacemit' search.
Ok, I will do some adjustment for the file name, maybe only keep the K3 specific files..
But, I'd rather not bother to add all the files which already covered by 'spacemit' keyword imply with the top MAINTAINERS file, it would simplify the file list a bit..
Quoted 14 lines
Quoted 14 lines
include/configs/spacemit-k3.h new file +8
-0@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#ifndef __SPACEMIT_K3_H +#define __SPACEMIT_K3_H +
Quoted 8 lines
include/configs/spacemit-k3.h line 13
Quoted 6 lines
include/configs/spacemit-k3.h new file +5
-0+#define CFG_SYS_NS16550_IER 0x40 + +#define RISCV_SMODE_TIMER_FREQ 24000000 + +#endif /* __SPACEMIT_K3_H */ Reviewed-by E Shattow <[email protected]>
Thanks for the review
Signature · 1 line
Yixun Lan (dlan)
Re: [PATCH v4 1/4] board: spacemit: add SpacemiT K3 Pico-ITX
Hi Yixun,
Quoted 218 lines · Yixun Lan
Hi E Shattow,
Quoted 4 lines · E Shattow
Hi Yixun, we should refresh
MAINTAINERSsuch as file rename and added changes requested are now settled. Keep R-by tag from me on the refresh if there's no v5 before merge, thanks!Ok, I will no send a new version, since it's really minor changes
Quoted 201 lines · Yixun Lan
Quoted 157 lines
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.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- arch/riscv/Kconfig | 5 +++++ arch/riscv/cpu/k3/Kconfig | 18 ++++++++++++++++++ arch/riscv/cpu/k3/Makefile | 5 +++++ arch/riscv/cpu/k3/dram.c | 21 +++++++++++++++++++++ board/spacemit/k3/Kconfig | 30 ++++++++++++++++++++++++++++++ board/spacemit/k3/MAINTAINERS | 8 ++++++++ include/configs/spacemit-k3.h | 13 +++++++++++++ 7 files changed, 100 insertions(+)arch/riscv/Kconfig +5
-0@@ -53,6 +53,9 @@ config TARGET_SIPEED_MAIX config TARGET_SPACEMIT_K1 bool "Support Spacemit K1 SoC" +config TARGET_SPACEMIT_K3 + bool "Support SpacemiT K3 SoC" + config TARGET_STARFIVE_VISIONFIVE2 bool "Support StarFive VisionFive2 Board" select BOARD_LATE_INIT@@ -124,6 +127,7 @@ source "board/sophgo/milkv_duo/Kconfig" source "board/sophgo/milkv_duo_256m/Kconfig" source "board/sophgo/licheerv_nano/Kconfig" source "board/spacemit/k1/Kconfig" +source "board/spacemit/k3/Kconfig" source "board/starfive/visionfive2/Kconfig" source "board/thead/th1520_lpi4a/Kconfig" source "board/xilinx/mbv/Kconfig"@@ -138,6 +142,7 @@ source "arch/riscv/cpu/mpfs/Kconfig" source "arch/riscv/cpu/generic/Kconfig" source "arch/riscv/cpu/jh7110/Kconfig" source "arch/riscv/cpu/k1/Kconfig" +source "arch/riscv/cpu/k3/Kconfig" source "arch/riscv/cpu/k230/Kconfig" source "arch/riscv/cpu/th1520/Kconfig"arch/riscv/cpu/k3/Kconfig new file +18
-0@@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SPACEMIT_K3 + bool + select BINMAN + select ARCH_EARLY_INIT_R + select SYS_CACHE_SHIFT_6 + imply CPU + imply CPU_RISCV + imply RISCV_TIMER if RISCV_SMODE + imply CMD_CPU + imply OF_UPSTREAM + +endifarch/riscv/cpu/k3/Makefile new file +5
-0@@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +obj-y += dram.oarch/riscv/cpu/k3/dram.c new file +21
-0@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#include <fdtdec.h> +#include <init.h> +#include <linux/sizes.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int dram_init (void ) +{ +return fdtdec_setup_mem_size_base (); +} + +int dram_init_banksize (void ) +{ +return fdtdec_setup_memory_banksize (); +}board/spacemit/k3/Kconfig new file +30
-0@@ -0,0 +1,30 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright (C) 2026 Yixun Lan <[email protected]> + +if TARGET_SPACEMIT_K3 + +config SYS_BOARD + default "k3" + +config SYS_VENDOR + default "spacemit" + +config SYS_CPU + default "k3" + +config SYS_CONFIG_NAME + default "spacemit-k3" + +config TEXT_BASE + default 0x102000000 + +config SPL_OPENSBI_LOAD_ADDR + hex + default 0x100000000 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select SPACEMIT_K3 + +endifboard/spacemit/k3/MAINTAINERS new file +7
-0@@ -0,0 +1,8 @@ +SPACEMIT K3 +M: Yixun Lan <[email protected]> +S: Maintained +F: arch/riscv/cpu/k3/ +F: board/spacemit/k3/ +F: configs/spacemit_k3_defconfig +F: include/configs/k3.h(quoted diff) +1
-1-F: include/configs/k3.h +F: include/configs/spacemit-k3.hQuoted 2 lines
board/spacemit/k3/MAINTAINERS new file +1
-0+F: arch/riscv/dts/k3-u-boot.dtsi(quoted diff) +2
-1-F: arch/riscv/dts/k3-u-boot.dtsi +F: arch/riscv/dts/spacemit-k3-binman.dtsi +F: arch/riscv/dts/spacemit-k3-u-boot.dtsiNote aside that K1 dtsi are listed in source tree root
MAINTAINERS, which is probably needing to be changed separately and follow the example of per-board like you are doing here for K3. We are missing something in per-boardMAINTAINERShere fordoc/board/spacemit/spacemit-pico-itx.rstand it could be added here or not, it is matching anyways by the source tree rootMAINTAINERSon 'spacemit' search.Other modified files (with required dependency patches applied) for our reference:
not applicable
arch/riscv/Kconfigdrivers/clk/spacemit/Kconfigdrivers/clk/spacemit/Makefiledrivers/clk/spacemit/clk-k3.cdrivers/clk/spacemit/clk_common.hdrivers/clk/spacemit/clk_mix.cdrivers/clk/spacemit/clk_mix.hdrivers/clk/spacemit/clk_pll.cdrivers/clk/spacemit/clk_pll.hdrivers/gpio/Kconfigdrivers/gpio/spacemit_gpio.c
not applicabledrivers/reset/Kconfig
not applicabledrivers/reset/Makefiledrivers/reset/spacemit/Kconfigdrivers/reset/spacemit/Makefiledrivers/reset/spacemit/reset-spacemit-common.cdrivers/reset/spacemit/reset-spacemit-common.hdrivers/reset/spacemit/reset-spacemit-k1.cdrivers/reset/spacemit/reset-spacemit-k3.cinclude/soc/spacemit/k3-reset.hinclude/soc/spacemit/k3-syscon.hQuoted 5 lines
With the expectation that those drivers' patches are to be merged in-order before this K3 Pico-ITX series, I think this all makes good sense, and all dependency series will be covered by source tree root
MAINTAINERSon 'spacemit' search.Ok, I will do some adjustment for the file name, maybe only keep the K3 specific files..
Quoted 4 lines
But, I'd rather not bother to add all the files which already covered by 'spacemit' keyword imply with the top
MAINTAINERSfile, it would simplify the file list a bit..
Acknowledged, I agree, and thanks. -E
Quoted 24 lines
Quoted 14 lines
Quoted 14 lines
include/configs/spacemit-k3.h new file +8
-0@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright (C) 2026 Yixun Lan <[email protected]> +*/ + +#ifndef __SPACEMIT_K3_H +#define __SPACEMIT_K3_H +Quoted 8 lines
include/configs/spacemit-k3.h line 13
Quoted 6 lines
include/configs/spacemit-k3.h new file +5
-0+#define CFG_SYS_NS16550_IER 0x40 + +#define RISCV_SMODE_TIMER_FREQ 24000000 + +#endif /* __SPACEMIT_K3_H */ Reviewed-by E Shattow <[email protected]>Thanks for the review
Yixun Lan
maintainerPATCH v4 2/4 riscv: dts: spacemit: k3: add binman node
In reply to Yixun LanSpacemiT K3 follow the standard riscv binman layout, which has opensbi and U-Boot proper, so include the common binman dtsi file.
--- arch/riscv/dts/spacemit-k3-binman.dtsi | 6 ++++++ arch/riscv/dts/spacemit-k3-u-boot.dtsi | 6 ++++++ 2 files changed, 12 insertions(+)
arch/riscv/dts/spacemit-k3-binman.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2026 Yixun Lan <[email protected]> + */ + +#include "binman.dtsi"
arch/riscv/dts/spacemit-k3-u-boot.dtsi new file +6 -0
@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2026 Yixun Lan <[email protected]> + */ + +#include "spacemit-k3-binman.dtsi"
Signature · 1 line
2.56.0
Re: [PATCH v4 2/4] riscv: dts: spacemit: k3: add binman node
Quoted 29 lines · Yixun Lan
SpacemiT K3 follow the standard riscv binman layout, which has opensbi and U-Boot proper, so include the common binman dtsi file.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- arch/riscv/dts/spacemit-k3-binman.dtsi | 6 ++++++ arch/riscv/dts/spacemit-k3-u-boot.dtsi | 6 ++++++ 2 files changed, 12 insertions(+)arch/riscv/dts/spacemit-k3-binman.dtsi new file +6
-0@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2026 Yixun Lan <[email protected]> + */ + +#include "binman.dtsi"arch/riscv/dts/spacemit-k3-u-boot.dtsi new file +0
-0
arch/riscv/dts/spacemit-k3-u-boot.dtsi line 6
Quoted 6 lines
arch/riscv/dts/spacemit-k3-u-boot.dtsi new file +6
-0@@ -0,0 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Copyright (C) 2026 Yixun Lan <[email protected]> + */ + +#include "spacemit-k3-binman.dtsi"
Thanks Yixun for preparing this,
Yixun Lan
maintainerPATCH v4 3/4 configs: spacemit: Add K3 default configuration
In reply to Yixun LanAdd the default configuration for SpacemiT K3 boards, using the Pico-ITX device tree as the default.
Configure U-Boot to run in RISC-V supervisor mode and enable the platform clock, reset, GPIO, pinctrl, I2C, PMIC and regulator drivers. Also configure the memory layout, debug UART and basic filesystem commands required to boot on the platform.
--- configs/spacemit_k3_defconfig | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
configs/spacemit_k3_defconfig new file +51 -0
@@ -0,0 +1,51 @@ +CONFIG_RISCV=y +CONFIG_SYS_MALLOC_LEN=0x1000000 +CONFIG_SYS_MALLOC_F_LEN=0x80000 +CONFIG_NR_DRAM_BANKS=2 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x102300000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="spacemit/k3-pico-itx" +CONFIG_SYS_BOOTM_LEN=0xa000000 +CONFIG_SYS_LOAD_ADDR=0x102000000 +CONFIG_DEBUG_UART_BASE=0xd4017000 +CONFIG_DEBUG_UART_CLOCK=14700000 +CONFIG_TARGET_SPACEMIT_K3=y +CONFIG_ARCH_RV64I=y +CONFIG_CMODEL_MEDANY=y +CONFIG_RISCV_SMODE=y +CONFIG_RISCV_ISA_ZICBOM=y +CONFIG_STACK_SIZE=0x100000 +CONFIG_FIT=y +CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_SYS_CBSIZE=256 +CONFIG_SYS_PBSIZE=276 +# CONFIG_BOARD_INIT is not set +CONFIG_HUSH_PARSER=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_DEVICE_TREE_INCLUDES="spacemit-k3-u-boot.dtsi" +CONFIG_SYSCON=y +CONFIG_CLK_SPACEMIT=y +CONFIG_CLK_SPACEMIT_K3=y +CONFIG_SPACEMIT_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_SPACEMIT_K1=y +CONFIG_MISC=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SPACEMIT_K1=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_SPACEMIT_P1=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_SPACEMIT_P1=y +CONFIG_DEBUG_UART_NS16550=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_SYS_NS16550=y +CONFIG_SYS_NS16550_MEM32=y +CONFIG_TIMER_EARLY=y
Signature · 1 line
2.56.0
Re: [PATCH v4 3/4] configs: spacemit: Add K3 default configuration
Quoted 62 lines · Yixun Lan
Add the default configuration for SpacemiT K3 boards, using the Pico-ITX device tree as the default.
Configure U-Boot to run in RISC-V supervisor mode and enable the platform clock, reset, GPIO, pinctrl, I2C, PMIC and regulator drivers. Also configure the memory layout, debug UART and basic filesystem commands required to boot on the platform.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- configs/spacemit_k3_defconfig | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)configs/spacemit_k3_defconfig new file +41
-0@@ -0,0 +1,51 @@ +CONFIG_RISCV=y +CONFIG_SYS_MALLOC_LEN=0x1000000 +CONFIG_SYS_MALLOC_F_LEN=0x80000 +CONFIG_NR_DRAM_BANKS=2 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x102300000 +CONFIG_DM_GPIO=y +CONFIG_DEFAULT_DEVICE_TREE="spacemit/k3-pico-itx" +CONFIG_SYS_BOOTM_LEN=0xa000000 +CONFIG_SYS_LOAD_ADDR=0x102000000 +CONFIG_DEBUG_UART_BASE=0xd4017000 +CONFIG_DEBUG_UART_CLOCK=14700000 +CONFIG_TARGET_SPACEMIT_K3=y +CONFIG_ARCH_RV64I=y +CONFIG_CMODEL_MEDANY=y +CONFIG_RISCV_SMODE=y +CONFIG_RISCV_ISA_ZICBOM=y +CONFIG_STACK_SIZE=0x100000 +CONFIG_FIT=y +CONFIG_SUPPORT_RAW_INITRD=y +CONFIG_SYS_CBSIZE=256 +CONFIG_SYS_PBSIZE=276 +# CONFIG_BOARD_INIT is not set +CONFIG_HUSH_PARSER=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_DEVICE_TREE_INCLUDES="spacemit-k3-u-boot.dtsi" +CONFIG_SYSCON=y +CONFIG_CLK_SPACEMIT=y +CONFIG_CLK_SPACEMIT_K3=y +CONFIG_SPACEMIT_GPIO=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_SPACEMIT_K1=y +CONFIG_MISC=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SPACEMIT_K1=y +CONFIG_DM_PMIC=y
configs/spacemit_k3_defconfig line 51
Quoted 10 lines
configs/spacemit_k3_defconfig new file +10
-0+CONFIG_PMIC_SPACEMIT_P1=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_SPACEMIT_P1=y +CONFIG_DEBUG_UART_NS16550=y +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_DEBUG_UART_ANNOUNCE=y +CONFIG_SYS_NS16550=y +CONFIG_SYS_NS16550_MEM32=y +CONFIG_TIMER_EARLY=y
On condition of patch dependencies applied as outlined in the cover letter to provide PINCTRL_SPACEMIT_K1 SPACEMIT_GPIO (implied RESET_SPACEMIT_K3) CLK_SPACEMIT_K3 ; With that,
Yixun Lan
maintainerRe: [PATCH v4 3/4] configs: spacemit: Add K3 default configuration
Hi E Shatto,
Quoted 15 lines · E Shattow
Quoted 14 lines · Yixun Lan
Add the default configuration for SpacemiT K3 boards, using the Pico-ITX device tree as the default.
Configure U-Boot to run in RISC-V supervisor mode and enable the platform clock, reset, GPIO, pinctrl, I2C, PMIC and regulator drivers. Also configure the memory layout, debug UART and basic filesystem commands required to boot on the platform.
Reviewed-by E Shattow <[email protected]>Signed-off-by Yixun Lan <[email protected]>--- configs/spacemit_k3_defconfig | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+)
...
Quoted 5 lines
On condition of patch dependencies applied as outlined in the cover letter to provide
PINCTRL_SPACEMIT_K1SPACEMIT_GPIO(impliedRESET_SPACEMIT_K3)CLK_SPACEMIT_K3; With that,
Yes, I've checked, it's all correct, no worry
Quoted 1 line
Reviewed-by E Shattow <[email protected]>
Signature · 1 line
Yixun Lan (dlan)
Yixun Lan
maintainerPATCH v4 4/4 doc: spacemit: k3: Add Pico-ITX board
In reply to Yixun LanAdd documentation for how to test the mainline U-Boot on SpacemiT K3 Pico-ITX board, currently it still rely on using vendor FSBL.bin file to initialize DDR and boot U-Boot proper, and the opensbi firmware is built from an on-going mainline branch.
--- doc/board/spacemit/index.rst | 1 + doc/board/spacemit/spacemit-pico-itx.rst | 200 +++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+)
doc/board/spacemit/index.rst +1 -0
@@ -8,4 +8,5 @@ SpacemiT bananapi-f3 k1-mmc k1-spl + spacemit-pico-itx
doc/board/spacemit/spacemit-pico-itx.rst new file +200 -0
200 lines not on this page · raw message
Signature · 1 line
2.56.0
Re: [PATCH v4 4/4] doc: spacemit: k3: Add Pico-ITX board
Quoted 218 lines · Yixun Lan
Add documentation for how to test the mainline U-Boot on SpacemiT K3 Pico-ITX board, currently it still rely on using vendor FSBL.bin file to initialize DDR and boot U-Boot proper, and the opensbi firmware is built from an on-going mainline branch.
Signed-off-by Yixun Lan <[email protected]>--- doc/board/spacemit/index.rst | 1 + doc/board/spacemit/spacemit-pico-itx.rst | 200 +++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+)doc/board/spacemit/index.rst +1
-0@@ -8,4 +8,5 @@ SpacemiT bananapi-f3 k1-mmc k1-spl + spacemit-pico-itxdoc/board/spacemit/spacemit-pico-itx.rst new file +190
-0@@ -0,0 +1,200 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +SpacemiT K3 Pico-ITX +==================== + +Building +~~~~~~~~ +1. Add a RISC-V toolchain to your PATH + +2. Setup cross compilation environment variable: + + .. code-block:: console + + export CROSS_COMPILE=<riscv64 toolchain prefix> + +3. U-Boot for SpacemiT K3 SoC requires OpenSBI in-development generic +platform object fw_dynamic.bin to be included in the Flattened Image +Tree blob. OpenSBI may be first built as below: + + .. code-block:: console + + # Clone OpenSBI fork sources with K3 specific patches + git clone https://github.com/spacemit-com/opensbi-upstream opensbi + cd opensbi + make PLATFORM=generic + +4. Then build U-Boot as following: + + .. code-block:: console + + cd <U-Boot-dir> + make spacemit_k3_defconfig + make OPENSBI=<OpenSBI-dir>/build/platform/generic/firmware/fw_dynamic.bin + +This will generate u-boot.itb + +Testing +~~~~~~~ +Currently there is no U-Boot SPL build target. It is required to use 'FSBL.bin' vendor +board support package SPL for DDR initialization and testing u-boot.itb. Please test with +fastboot command via USB download. + +First, retrieve Bianbu Linux image from archive_ and extract the FSBL.bin firmware. + +Second, hold the FEL button of Pico-ITX board, then press reset button and release it . +The board will enter into firmware download mode. + + .. code-block:: none + + sys: 0x10001200 + bm:2 + usb_init : enter 3296,3072 + usb_core_init : enter + DWC3_GRXTHRCFG:0x4400000 + ROM: usb download handler + rst + done H + setup= 0x1000680 0x400000, + rst + done H + setup= 0x290500 0x0, + setup= 0x1000680 0x120000, + setup= 0x2000680 0x90000, + setup= 0x2000680 0x200000, + setup= 0x3000680 0xff0000, + setup= 0x3020680 0xff0409, + setup= 0x3010680 0xff0409, + setup= 0x10900 0x0, + usb_rx_bytes : start len[4096] + setup= 0x3020680 0xff0409, + setup= 0x3040680 0xff0409, + +Run following command to test: + + .. code-block:: console + + fastboot stage FSBL.bin + fastboot continue + sleep 10 + fastboot stage u-boot.itb + fastboot continue + +.. _archive: https://archive.spacemit.com/image/k3/version/bianbu/v4.0.7/ +.. _uboot: https://bianbu-linux.spacemit.com/en/device/boot#21-firmware-layout + +Booting +~~~~~~~ +Sample boot log +~~~~~~~~~~~~~~~ + .. code-block:: none + + sys: 0x10001200 + bm:2 + usb_init : enter 3296,3072 + usb_core_init : enter + DWC3_GRXTHRCFG:0x4400000 + ROM: usb download handler + rst + done H + setup= 0x1000680 0x400000, + rst + done H + setup= 0x2f0500 0x0, + setup= 0x1000680 0x120000, + setup= 0x2000680 0x90000, + setup= 0x2000680 0x200000, + setup= 0x3000680 0xff0000, + setup= 0x3020680 0xff0409, + setup= 0x3010680 0xff0409, + setup= 0x10900 0x0, + usb_rx_bytes : start len[4096] + setup= 0x3020680 0xff0409, + setup= 0x3040680 0xff0409, + fastboot_handle_command: max-download-size + usb_tx_bytes : start len[14] + usb_rx_bytes : start len[4096] + fastboot_handle_command: 00072b20 + Starting download of 469792 bytes + usb_tx_bytes : start len[12] + usb_rx_bytes : start len[469792] + usb_tx_bytes : start len[4] + usb_rx_bytes : start len[4096] + fastboot_handle_command: continue + usb_tx_bytes : start len[4] + j... + U-Boot SPL 2022.10 (Sep 07 2026 - 11:31:13 +0000) + LPDDR5 total size: 16 GB, data rate: 6400 MT/s + DDR training consume 5625ms + .. + OpenSBI v1.9-72-g13a401f8 + ____ _____ ____ _____ + / __ \ / ____| _ \_ _| + | | | |_ __ ___ _ __ | (___ | |_) || | + | | | | '_ \ / _ \ '_ \ \___ \| _ < | | + | |__| | |_) | __/ | | |____) | |_) || |_ + \____/| .__/ \___|_| |_|_____/|____/_____| + | | + |_| + Platform Name : SpacemiT K3 Pico-ITX + Platform Features : medeleg + Platform HART Count : 8 + Platform HART Protection : pmp + Platform IPI Device : aclint-mswi + Platform Timer Device : aclint-mtimer @ 24000000Hz + Platform Console Device : uart8250 + Platform HSM Device : spacemit-k3-hsm + Platform PMU Device : --- + Platform Reboot Device : spacemit-p1-reset + Platform Shutdown Device : spacemit-p1-reset + Platform Suspend Device : --- + Platform CPPC Device : --- + Firmware Base : 0x100000000 + Firmware Size : 416 KB + Firmware RW Offset : 0x40000 + Firmware RW Size : 160 KB + Firmware Heap Offset : 0x57000 + Firmware Heap Size : 68 KB (total), 1 KB (reserved), 14 KB (used), 52 KB (free) + Firmware Scratch Size : 4096 B (total), 1472 B (used), 2624 B (free) + Runtime SBI Version : 3.0 + Standard SBI Extensions : time,rfnc,ipi,base,hsm,srst,pmu,dbcn,fwft,legacy,dbtr,sse + Experimental SBI Extensions : none + Domain0 Name : root + Domain0 Init Order : 0xffffffff + Domain0 Boot HART : 0 + Domain0 HARTs : 0x0*,0x1*,0x2*,0x3*,0x4*,0x5*,0x6*,0x7* + Domain0 Region00 : 0x0000000100000000-0x000000010003ffff M: (F,R,X) S/U: () + Domain0 Region01 : 0x0000000100040000-0x000000010007ffff M: (F,R,W) S/U: () + Domain0 Region02 : 0x00000000d4017000-0x00000000d4017fff M: (I,R,W) S/U: (R,W) + Domain0 Region03 : 0x00000000e081c000-0x00000000e081ffff M: (I,R,W) S/U: () + Domain0 Region04 : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X) + Domain0 Next Address : 0x0000000102000000 + Domain0 Next Arg1 : 0x0000000102091398 + Domain0 Next Mode : S-mode + Domain0 SysReset : yes + Domain0 SysSuspend : yes + Boot HART ID : 0 + Boot HART Domain : root + Boot HART Priv Version : v1.12 + Boot HART Base ISA : rv64imafdcbvhx + Boot HART ISA Extensions : smaia,smstateen,sscofpmf,sstc,zicntr,zihpm,smcntrpmf,zicboz,zicbom,svpbmt,sdtrig,svade,ssstateen,v,f,d + Boot HART PMP Count : 16 + Boot HART PMP Granularity : 12 bits + Boot HART PMP Address Bits : 38 + Boot HART MHPM Info : 16 (0x0007fff8) + Boot HART Debug Triggers : 4 triggers + Boot HART MIDELEG : 0x0000000000003666 + Boot HART MEDELEG : 0x0000000000f0b509 + + <debug_uart> +
doc/board/spacemit/spacemit-pico-itx.rst line 200
Quoted 10 lines
doc/board/spacemit/spacemit-pico-itx.rst new file +10
-0+ U-Boot 2026.10-rc4-00501-g9fba7b59df42 (Sep 22 2026 - 13:08:33 +0000) + + DRAM: 16 GiB + Core: 433 devices, 15 uclasses, devicetree: separate + Loading Environment from nowhere...Loading Environment from nowhere... OK + In: serial@d4017000 + Out: serial@d4017000 + Err: serial@d4017000 + Net: No ethernet found. + =>
Quoted 52 lines · Yixun Lan
Add initial support for SpacemiT K3 Pico-ITX board, the config file will enable all basic components which make it able to run into U-Boot serial console.
The series actually depend on previous sent patches, I'm not adding dependency to this series, but list it here for reference.
Pinctrl:
https://patch.msgid.link/[email protected]GPIO:
https://patch.msgid.link/[email protected]clock and reset:
https://patch.msgid.link/[email protected]Signed-off-by Yixun Lan <[email protected]>---
Changes in v4:
- update doc
- add separatebinman.dtsifile
- Link to v3: https://patch.msgid.link/[email protected]Changes in v3:
- rename header and dtsi file with vendor prefix
- Link to v2: https://patch.msgid.link/[email protected]Changes in v2:
- dropboard_get_usable_ram_top()
- drop empty source file
- Link to v1: https://patch.msgid.link/[email protected]---
Yixun Lan (4):
board: spacemit: add SpacemiT K3 Pico-ITX
riscv: dts: spacemit: k3: add binman node
configs: spacemit: Add K3 default configuration
doc: spacemit: k3: Add Pico-ITX boardarch/riscv/Kconfig | 5 + arch/riscv/cpu/k3/Kconfig | 18 +++ arch/riscv/cpu/k3/Makefile | 5 + arch/riscv/cpu/k3/dram.c | 21 ++++ arch/riscv/dts/spacemit-k3-binman.dtsi | 6 + arch/riscv/dts/spacemit-k3-u-boot.dtsi | 6 + board/spacemit/k3/Kconfig | 30 +++++ board/spacemit/k3/MAINTAINERS | 8 ++ configs/spacemit_k3_defconfig | 51 ++++++++ doc/board/spacemit/index.rst | 1 + doc/board/spacemit/spacemit-pico-itx.rst | 200 +++++++++++++++++++++++++++++++ include/configs/spacemit-k3.h | 13 ++ 12 files changed, 364 insertions(+)
Quoted 8 lines
---
base-commit:cf615aafae36fc49f55e3e6a3648d29201b26d51
change-id: 20260921-00-basic-spacemit-k3-838119645d39Best regards,
Signature · 1 line
Yixun Lan <[email protected]>
Looking forward to this series being merged :)
FYI after the merge I will coordinate to adopt any devicetree-rebasing cherry-pick and -u-boot.dtsi overrides that are needed. When there will be an SPI NOR driver and "sf" SPI flash command then we have all components for using mainline u-boot 'u-boot.itb' as a board recovery tool with uart and network download methods. The devicetree nodes for this should be easy to adopt. I can write some documentation about compiling and flashing the vendor board support package firmware using mainline u-boot 'u-boot.itb', and eventually mainline SPL too when that may be possible.
Cheers,
-E
Quoted 8 lines · Yixun Lan
Add initial support for SpacemiT K3 Pico-ITX board, the config file will enable all basic components which make it able to run into U-Boot serial console.
The series actually depend on previous sent patches, I'm not adding dependency to this series, but list it here for reference.
[...]
Applied, thanks!
[1/4] board: spacemit: add SpacemiT K3 Pico-ITX
https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/31d3bdb0e37d568e951f6b861999c8e9e7132b40 [2/4] riscv: dts: spacemit: k3: add binman node https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/262a0267b6635eab951c0070229976ba75aedf2d [3/4] configs: spacemit: Add K3 default configuration https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/d56972c3f331de89e19a4c6d21ea2a53416f84db [4/4] doc: spacemit: k3: Add Pico-ITX board https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/ee7bd2529853076ca717a5cf61ec232992fdfa58
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>