U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Spacemit K3 enable Linux boot
@ 2026-11-16 10:26 E Shattow
  2026-11-16 10:26 ` [PATCH v3 1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: E Shattow @ 2026-11-16 10:26 UTC (permalink / raw)
  To: U-Boot Mailing List, Yixun Lan; +Cc: E Shattow

Adopt some fixes needed for Linux v7.2.10+ boot and enable
BOOTSTD_FULL together with minimal env addr variable defaults.

Build and test only with vendor BSP k3-br-v1.0.10 having reduced [1]
configuration to avoid a memory resource conflict. The vendor BSP SPL
in its default configuration attempts to load opensbi separately from
u-boot main app, and also attempts to load an embedded controller OS
image, neither of which is useful for mainline opensbi, mainline
Linux, and mainline U-Boot.

Changes since v2:
- Add patch 4/4 which adopts a proposed Linux series [2] to reduce the
  initial memory configuration to 8GiB for CoM260 and Pico-ITX boards

1: https://lore.kernel.org/u-boot/20261029003327.1890979-1-e@freeshell.de/
2: https://lore.kernel.org/linux-riscv/20261115195112.32120-1-e@freeshell.de/

E Shattow (3):
  riscv: dts: spacemit: k3: override reserved status of mimsic and
    maplic
  configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL
  riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override

Junhui Liu (1):
  riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC

 arch/riscv/dts/k3-com260-ifx-u-boot.dtsi | 9 +++++++++
 arch/riscv/dts/k3-pico-itx-u-boot.dtsi   | 9 +++++++++
 arch/riscv/dts/spacemit-k3-u-boot.dtsi   | 4 ++++
 configs/spacemit_k3_defconfig            | 9 +--------
 dts/upstream/src/riscv/spacemit/k3.dtsi  | 2 --
 include/configs/spacemit-k3.h            | 6 ++++++
 6 files changed, 29 insertions(+), 10 deletions(-)
 create mode 100644 arch/riscv/dts/k3-com260-ifx-u-boot.dtsi
 create mode 100644 arch/riscv/dts/k3-pico-itx-u-boot.dtsi


base-commit: 6487c50b8a40f2668ab98a892b9300ad5c181f38
-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
@ 2026-11-16 10:26 ` E Shattow
  2026-11-16 10:26 ` [PATCH v3 2/4] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC E Shattow
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: E Shattow @ 2026-11-16 10:26 UTC (permalink / raw)
  To: U-Boot Mailing List, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi,
	Tom Rini
  Cc: E Shattow, Troy Mitchell

Linux boot stalls when probing peripherals unless OpenSBI has the
enabled mimsic and maplic nodes. Override these nodes so Linux can boot.

Reported-by: Yixun Lan <dlan@kernel.org>
Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: E Shattow <e@freeshell.de>
---
 arch/riscv/dts/spacemit-k3-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/dts/spacemit-k3-u-boot.dtsi b/arch/riscv/dts/spacemit-k3-u-boot.dtsi
index 352e85e7de87..278b36acc79f 100644
--- a/arch/riscv/dts/spacemit-k3-u-boot.dtsi
+++ b/arch/riscv/dts/spacemit-k3-u-boot.dtsi
@@ -3,4 +3,8 @@
  * Copyright (C) 2026 Yixun Lan <dlan@kernel.org>
  */
 
+/* Override reserved status of mimsic and maplic for OpenSBI */
+&mimsic { status = "okay"; };
+&maplic { status = "okay"; };
+
 #include "spacemit-k3-binman.dtsi"
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/4] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
  2026-11-16 10:26 ` [PATCH v3 1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
@ 2026-11-16 10:26 ` E Shattow
  2026-11-16 10:26 ` [PATCH v3 3/4] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: E Shattow @ 2026-11-16 10:26 UTC (permalink / raw)
  To: U-Boot Mailing List, Sumit Garg, Yixun Lan, Tim Ouyang, Leo Liang,
	Yao Zi, Tom Rini, Guodong Xu
  Cc: E Shattow, Junhui Liu

From: Junhui Liu <junhui.liu@pigmoral.tech>

The mimsic node describes the machine-level IMSIC, whose MMIO region is
0x10000 (64 KiB) for all 8 harts. However, the node also specifies
riscv,guest-index-bits = <6>, and per the AIA specification the
per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
harts. The described region cannot hold even a single hart's files, so
the node contradicts itself. OpenSBI enforces exactly this constraint in
imsic_data_check() and rejects the node with -EINVAL, preventing the
M-level IMSIC from initializing:

  fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3
  init_coldboot: irqchip init failed (error -3)

Moreover, guest interrupt files exist to act as the supervisor-level
interrupt files of virtual harts; there is no machine-level counterpart.
riscv,num-guest-ids is equally meaningless for the machine-level IMSIC.

Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties
from the mimsic node so the node matches the actual hardware layout.

Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Yixun Lan <dlan@kernel.org>
Link: https://patch.msgid.link/20260729-k3-mimsic-fix-v1-1-368c0aec04b9@pigmoral.tech
Signed-off-by: Yixun Lan <dlan@kernel.org>

[ upstream commit: 01e2f07c44fc46180bdb10e70506f8acf44a53dd ]

(cherry picked from commit d44cd4bcf93bb5c99a4762ed5f11656b93f9e5cc)
---
 dts/upstream/src/riscv/spacemit/k3.dtsi | 2 --
 1 file changed, 2 deletions(-)

diff --git a/dts/upstream/src/riscv/spacemit/k3.dtsi b/dts/upstream/src/riscv/spacemit/k3.dtsi
index c3f2dce0969c..2d022e1364f1 100644
--- a/dts/upstream/src/riscv/spacemit/k3.dtsi
+++ b/dts/upstream/src/riscv/spacemit/k3.dtsi
@@ -1287,9 +1287,7 @@
 					      <&cpu4_intc 11>, <&cpu5_intc 11>,
 					      <&cpu6_intc 11>, <&cpu7_intc 11>;
 			msi-controller;
-			riscv,guest-index-bits = <6>;
 			riscv,hart-index-bits = <4>;
-			riscv,num-guest-ids = <511>;
 			riscv,num-ids = <511>;
 			status = "reserved";
 		};
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 3/4] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
  2026-11-16 10:26 ` [PATCH v3 1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
  2026-11-16 10:26 ` [PATCH v3 2/4] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC E Shattow
@ 2026-11-16 10:26 ` E Shattow
  2026-11-16 10:26 ` [PATCH v3 4/4] riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override E Shattow
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: E Shattow @ 2026-11-16 10:26 UTC (permalink / raw)
  To: U-Boot Mailing List, Yixun Lan, Tom Rini; +Cc: E Shattow

Define minimal env variables for boot in spacemit-k3.h with fdtfile
as the CFG_EXTRA_ENV_SETTINGS sentinel, and enable CONFIG_BOOTSTD_FULL

Signed-off-by: E Shattow <e@freeshell.de>
---
 configs/spacemit_k3_defconfig | 9 +--------
 include/configs/spacemit-k3.h | 6 ++++++
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/configs/spacemit_k3_defconfig b/configs/spacemit_k3_defconfig
index f49442951c8f..9bf582564d07 100644
--- a/configs/spacemit_k3_defconfig
+++ b/configs/spacemit_k3_defconfig
@@ -19,25 +19,18 @@ CONFIG_RISCV_SMODE=y
 CONFIG_RISCV_ISA_ZICBOM=y
 CONFIG_STACK_SIZE=0x100000
 CONFIG_FIT=y
-CONFIG_SUPPORT_RAW_INITRD=y
+CONFIG_BOOTSTD_FULL=y
 CONFIG_SYS_CBSIZE=256
 CONFIG_SYS_PBSIZE=276
 # CONFIG_BOARD_INIT is not set
-CONFIG_HUSH_PARSER=y
 CONFIG_CMD_TLV_EEPROM=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MTD=y
-CONFIG_CMD_DHCP=y
 CONFIG_CMD_DNS=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_PING=y
 CONFIG_CMD_WGET=y
-CONFIG_CMD_PXE=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nor0=d420c000.spi"
 CONFIG_MTDPARTS_DEFAULT="d420c000.spi:128k(bootinfo),512k(fsbl),64k(env),1024k(esos),384k(opensbi),-(uboot)"
diff --git a/include/configs/spacemit-k3.h b/include/configs/spacemit-k3.h
index 9dd545e2a3b2..39d10059926e 100644
--- a/include/configs/spacemit-k3.h
+++ b/include/configs/spacemit-k3.h
@@ -6,6 +6,12 @@
 #ifndef __SPACEMIT_K3_H
 #define __SPACEMIT_K3_H
 
+#define CFG_EXTRA_ENV_SETTINGS \
+	"ramdisk_addr_r=0x130000000\0" \
+	"fdt_addr_r=0x138000000\0" \
+	"kernel_addr_r=0x140000000\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0"
+
 #define CFG_SYS_NS16550_IER	0x40
 
 #define RISCV_SMODE_TIMER_FREQ	24000000
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 4/4] riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
                   ` (2 preceding siblings ...)
  2026-11-16 10:26 ` [PATCH v3 3/4] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
@ 2026-11-16 10:26 ` E Shattow
  2026-11-18  7:32 ` [PATCH v3 0/4] Spacemit K3 enable Linux boot Yixun Lan
  2026-11-18 12:11 ` Yixun Lan
  5 siblings, 0 replies; 7+ messages in thread
From: E Shattow @ 2026-11-16 10:26 UTC (permalink / raw)
  To: U-Boot Mailing List, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini,
	Yixun Lan
  Cc: E Shattow

Adopt [1] "SpacemiT K3 use 8gb memory size on CoM260 and Pico-ITX"

1: https://lore.kernel.org/linux-riscv/20261115195112.32120-1-e@freeshell.de/

Signed-off-by: E Shattow <e@freeshell.de>
---
 arch/riscv/dts/k3-com260-ifx-u-boot.dtsi | 9 +++++++++
 arch/riscv/dts/k3-pico-itx-u-boot.dtsi   | 9 +++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 arch/riscv/dts/k3-com260-ifx-u-boot.dtsi
 create mode 100644 arch/riscv/dts/k3-pico-itx-u-boot.dtsi

diff --git a/arch/riscv/dts/k3-com260-ifx-u-boot.dtsi b/arch/riscv/dts/k3-com260-ifx-u-boot.dtsi
new file mode 100644
index 000000000000..cce42122a015
--- /dev/null
+++ b/arch/riscv/dts/k3-com260-ifx-u-boot.dtsi
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (c) 2026 E Shattow <e@freeshell.de>
+ */
+
+/* https://lore.kernel.org/linux-riscv/20261115195112.32120-2-e@freeshell.de/
+ * riscv: dts: spacemit: k3: use com260 8gb memory configuration
+ */
+/ { memory@100000000 { reg = <0x1 0x00000000 0x2 0x00000000>; }; };
diff --git a/arch/riscv/dts/k3-pico-itx-u-boot.dtsi b/arch/riscv/dts/k3-pico-itx-u-boot.dtsi
new file mode 100644
index 000000000000..8995d5e137eb
--- /dev/null
+++ b/arch/riscv/dts/k3-pico-itx-u-boot.dtsi
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+/*
+ * Copyright (c) 2026 E Shattow <e@freeshell.de>
+ */
+
+/* https://lore.kernel.org/linux-riscv/20261115195112.32120-3-e@freeshell.de/
+ * riscv: dts: spacemit: k3: use pico-itx 8gb memory configuration
+ */
+/ { memory@100000000 { reg = <0x1 0x00000000 0x2 0x00000000>; }; };
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/4] Spacemit K3 enable Linux boot
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
                   ` (3 preceding siblings ...)
  2026-11-16 10:26 ` [PATCH v3 4/4] riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override E Shattow
@ 2026-11-18  7:32 ` Yixun Lan
  2026-11-18 12:11 ` Yixun Lan
  5 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2026-11-18  7:32 UTC (permalink / raw)
  To: E Shattow; +Cc: U-Boot Mailing List


On 02:26 Mon 16 Nov     , E Shattow wrote:
> Adopt some fixes needed for Linux v7.2.10+ boot and enable
> BOOTSTD_FULL together with minimal env addr variable defaults.
> 
> Build and test only with vendor BSP k3-br-v1.0.10 having reduced [1]
> configuration to avoid a memory resource conflict. The vendor BSP SPL
> in its default configuration attempts to load opensbi separately from
> u-boot main app, and also attempts to load an embedded controller OS
> image, neither of which is useful for mainline opensbi, mainline
> Linux, and mainline U-Boot.
> 
> Changes since v2:
> - Add patch 4/4 which adopts a proposed Linux series [2] to reduce the
>   initial memory configuration to 8GiB for CoM260 and Pico-ITX boards
> 
> 1: https://lore.kernel.org/u-boot/20261029003327.1890979-1-e@freeshell.de/
> 2: https://lore.kernel.org/linux-riscv/20261115195112.32120-1-e@freeshell.de/
> 
> E Shattow (3):
>   riscv: dts: spacemit: k3: override reserved status of mimsic and
>     maplic
>   configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL
>   riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override
> 
> Junhui Liu (1):
>   riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
> 
>  arch/riscv/dts/k3-com260-ifx-u-boot.dtsi | 9 +++++++++
>  arch/riscv/dts/k3-pico-itx-u-boot.dtsi   | 9 +++++++++
>  arch/riscv/dts/spacemit-k3-u-boot.dtsi   | 4 ++++
>  configs/spacemit_k3_defconfig            | 9 +--------
>  dts/upstream/src/riscv/spacemit/k3.dtsi  | 2 --
>  include/configs/spacemit-k3.h            | 6 ++++++
>  6 files changed, 29 insertions(+), 10 deletions(-)
>  create mode 100644 arch/riscv/dts/k3-com260-ifx-u-boot.dtsi
>  create mode 100644 arch/riscv/dts/k3-pico-itx-u-boot.dtsi
> 
For the series, 

Reviewed-by: Yixun Lan <dlan@kernel.org>

-- 
Yixun Lan (dlan)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 0/4] Spacemit K3 enable Linux boot
  2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
                   ` (4 preceding siblings ...)
  2026-11-18  7:32 ` [PATCH v3 0/4] Spacemit K3 enable Linux boot Yixun Lan
@ 2026-11-18 12:11 ` Yixun Lan
  5 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2026-11-18 12:11 UTC (permalink / raw)
  To: U-Boot Mailing List, E Shattow; +Cc: Yixun Lan


On Mon, 16 Nov 2026 02:26:26 -0800, E Shattow wrote:
> Adopt some fixes needed for Linux v7.2.10+ boot and enable
> BOOTSTD_FULL together with minimal env addr variable defaults.
> 
> Build and test only with vendor BSP k3-br-v1.0.10 having reduced [1]
> configuration to avoid a memory resource conflict. The vendor BSP SPL
> in its default configuration attempts to load opensbi separately from
> u-boot main app, and also attempts to load an embedded controller OS
> image, neither of which is useful for mainline opensbi, mainline
> Linux, and mainline U-Boot.
> 
> [...]

Applied, thanks! Queued in SpacemiT custodian tree, for-main branch

[1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/04b254b7484006f5870ceacdb6c545a7c3b4d8b6
[2/4] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/b77730ecf6b0e977d857c38a397a48014e7c77ab
[3/4] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/6a8ea4096ab5973e5a4621580dfbc267f10c8cec
[4/4] riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override
      https://git.u-boot-project.org/u-boot/custodians/u-boot-spacemit/-/commit/ffdf122644c936510b74a26390b694ed4cdfa1c6

Best regards,
-- 
Yixun Lan <dlan@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-18 12:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 10:26 [PATCH v3 0/4] Spacemit K3 enable Linux boot E Shattow
2026-11-16 10:26 ` [PATCH v3 1/4] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
2026-11-16 10:26 ` [PATCH v3 2/4] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC E Shattow
2026-11-16 10:26 ` [PATCH v3 3/4] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
2026-11-16 10:26 ` [PATCH v3 4/4] riscv: dts: spacemit: k3: adopt com260/pico-itx 8gb memory override E Shattow
2026-11-18  7:32 ` [PATCH v3 0/4] Spacemit K3 enable Linux boot Yixun Lan
2026-11-18 12:11 ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox