All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Spacemit K3 enable Linux boot
@ 2026-10-28 18:45 E Shattow
  2026-10-28 18:45 ` [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: E Shattow @ 2026-10-28 18:45 UTC (permalink / raw)
  To: u-boot, 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
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. Instructions and supplemental patches for
the reduced vendor BSP build are co-dependent on this series; a
follow-up will be posted with details after this series is sent.

E Shattow (3):
  riscv: dts: spacemit: k3: override reserved status of mimsic and
    maplic
  riscv: dts: spacemit: k3: adopt override to drop M-level IMSIC guest
    props
  configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL

 arch/riscv/dts/spacemit-k3-u-boot.dtsi | 12 ++++++++++++
 configs/spacemit_k3_defconfig          |  9 +--------
 include/configs/spacemit-k3.h          |  6 ++++++
 3 files changed, 19 insertions(+), 8 deletions(-)


base-commit: 03e45557e1f38a39a0c80fe30483130ff376cf92
-- 
2.53.0


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

* [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-28 18:45 [PATCH v1 0/3] Spacemit K3 enable Linux boot E Shattow
@ 2026-10-28 18:45 ` E Shattow
  2026-10-28 22:01   ` Anirudh Srinivasan
  2026-10-28 18:45 ` [PATCH v1 2/3] riscv: dts: spacemit: k3: adopt override to drop M-level IMSIC guest props E Shattow
  2026-10-28 18:45 ` [PATCH v1 3/3] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
  2 siblings, 1 reply; 10+ messages in thread
From: E Shattow @ 2026-10-28 18:45 UTC (permalink / raw)
  To: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini; +Cc: E Shattow

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>
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] 10+ messages in thread

* [PATCH v1 2/3] riscv: dts: spacemit: k3: adopt override to drop M-level IMSIC guest props
  2026-10-28 18:45 [PATCH v1 0/3] Spacemit K3 enable Linux boot E Shattow
  2026-10-28 18:45 ` [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
@ 2026-10-28 18:45 ` E Shattow
  2026-10-28 18:45 ` [PATCH v1 3/3] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow
  2 siblings, 0 replies; 10+ messages in thread
From: E Shattow @ 2026-10-28 18:45 UTC (permalink / raw)
  To: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini; +Cc: E Shattow

Adopt Linux next-for-v7.4 01e2f07c44fc ("riscv: dts: spacemit: k3: Drop
guest properties from M-level IMSIC"). Resolves OpenSBI failure:

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

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

diff --git a/arch/riscv/dts/spacemit-k3-u-boot.dtsi b/arch/riscv/dts/spacemit-k3-u-boot.dtsi
index 278b36acc79f..721e2d3cbb61 100644
--- a/arch/riscv/dts/spacemit-k3-u-boot.dtsi
+++ b/arch/riscv/dts/spacemit-k3-u-boot.dtsi
@@ -7,4 +7,12 @@
 &mimsic { status = "okay"; };
 &maplic { status = "okay"; };
 
+/* Linux next-for-v7.4 01e2f07c44fc
+ * ("riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC")
+ */
+&mimsic {
+	/delete-property/ riscv,guest-index-bits;
+	/delete-property/ riscv,num-guest-ids;
+};
+
 #include "spacemit-k3-binman.dtsi"
-- 
2.53.0


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

* [PATCH v1 3/3] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL
  2026-10-28 18:45 [PATCH v1 0/3] Spacemit K3 enable Linux boot E Shattow
  2026-10-28 18:45 ` [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
  2026-10-28 18:45 ` [PATCH v1 2/3] riscv: dts: spacemit: k3: adopt override to drop M-level IMSIC guest props E Shattow
@ 2026-10-28 18:45 ` E Shattow
  2 siblings, 0 replies; 10+ messages in thread
From: E Shattow @ 2026-10-28 18:45 UTC (permalink / raw)
  To: u-boot, 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] 10+ messages in thread

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-28 18:45 ` [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
@ 2026-10-28 22:01   ` Anirudh Srinivasan
  2026-10-28 22:35     ` E Shattow
  0 siblings, 1 reply; 10+ messages in thread
From: Anirudh Srinivasan @ 2026-10-28 22:01 UTC (permalink / raw)
  To: E Shattow; +Cc: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini

On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
> 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>
> 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"; };

This should be fixed in the DT in linux. I guess you could carry this
patch till it is fixed in linux.

> +
>  #include "spacemit-k3-binman.dtsi"
> -- 
> 2.53.0
> 

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

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-28 22:01   ` Anirudh Srinivasan
@ 2026-10-28 22:35     ` E Shattow
  2026-10-29  6:34       ` Troy Mitchell
  0 siblings, 1 reply; 10+ messages in thread
From: E Shattow @ 2026-10-28 22:35 UTC (permalink / raw)
  To: Anirudh Srinivasan
  Cc: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini,
	Troy Mitchell, Guodong Xu

Hi Anirudh, CC: Troy Mitchell, Guodong Xu

On 10/28/26 15:01, Anirudh Srinivasan wrote:
> On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
>> 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>
>> 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"; };
> 
> This should be fixed in the DT in linux. I guess you could carry this
> patch till it is fixed in linux.
> 
>> +
>>  #include "spacemit-k3-binman.dtsi"
>> -- 
>> 2.53.0
>>

The upstream commit that adds these nodes as reserved status is:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56f37e391a626

Quote, "...Also add M-mode APLIC (maplic) and IMSIC (mimsic) nodes to
represent the hardware topology and ready for potential firmware usage."

When the mainline OpenSBI series lands adding SpacemiT K3 support:

https://lore.kernel.org/opensbi/20261028-spacemit-k3-v6-0-01d984f60941@linux.spacemit.com/

...then I think we could send this upstream?

Thanks for the review, -E

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

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-28 22:35     ` E Shattow
@ 2026-10-29  6:34       ` Troy Mitchell
  2026-10-29  6:39         ` Troy Mitchell
  2026-10-29 14:22         ` Anirudh Srinivasan
  0 siblings, 2 replies; 10+ messages in thread
From: Troy Mitchell @ 2026-10-29  6:34 UTC (permalink / raw)
  To: E Shattow, Anirudh Srinivasan
  Cc: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini,
	Troy Mitchell, Guodong Xu

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

On Thu Oct 29, 2026 at 6:35 AM +08, E Shattow wrote:
> Hi Anirudh, CC: Troy Mitchell, Guodong Xu
>
> On 10/28/26 15:01, Anirudh Srinivasan wrote:
>> On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
>>> 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>
>>> 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"; };
>> 
>> This should be fixed in the DT in linux. I guess you could carry this
>> patch till it is fixed in linux.
I think status = "reserved" in k3.dtsi is correct and should stay.
The DT spec defines "reserved" as a device that is operational
but should not be used, typically because it is controlled by
another software component such as platform firmware.

That is exactly the case for the M-level IMSIC and APLIC.
>> 
>>> +
>>>  #include "spacemit-k3-binman.dtsi"
>>> -- 
>>> 2.53.0
>>>
>
> The upstream commit that adds these nodes as reserved status is:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56f37e391a626
>
> Quote, "...Also add M-mode APLIC (maplic) and IMSIC (mimsic) nodes to
> represent the hardware topology and ready for potential firmware usage."
>
> When the mainline OpenSBI series lands adding SpacemiT K3 support:
>
> https://lore.kernel.org/opensbi/20261028-spacemit-k3-v6-0-01d984f60941@linux.spacemit.com/
>
> ...then I think we could send this upstream?
Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>

>
> Thanks for the review, -E


-- 
Troy Mitchell


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-29  6:34       ` Troy Mitchell
@ 2026-10-29  6:39         ` Troy Mitchell
  2026-10-29 14:22         ` Anirudh Srinivasan
  1 sibling, 0 replies; 10+ messages in thread
From: Troy Mitchell @ 2026-10-29  6:39 UTC (permalink / raw)
  To: Troy Mitchell, E Shattow, Anirudh Srinivasan
  Cc: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini,
	Guodong Xu

[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]

On Thu Oct 29, 2026 at 2:34 PM +08, Troy Mitchell wrote:
> On Thu Oct 29, 2026 at 6:35 AM +08, E Shattow wrote:
>> Hi Anirudh, CC: Troy Mitchell, Guodong Xu
I realized after sending that you CC'd the wrong Guodong email.
I've corrected it here.

>>
>> On 10/28/26 15:01, Anirudh Srinivasan wrote:
>>> On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
>>>> 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>
>>>> 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"; };
>>> 
>>> This should be fixed in the DT in linux. I guess you could carry this
>>> patch till it is fixed in linux.
> I think status = "reserved" in k3.dtsi is correct and should stay.
> The DT spec defines "reserved" as a device that is operational
> but should not be used, typically because it is controlled by
> another software component such as platform firmware.
>
> That is exactly the case for the M-level IMSIC and APLIC.
>>> 
>>>> +
>>>>  #include "spacemit-k3-binman.dtsi"
>>>> -- 
>>>> 2.53.0
>>>>
>>
>> The upstream commit that adds these nodes as reserved status is:
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56f37e391a626
>>
>> Quote, "...Also add M-mode APLIC (maplic) and IMSIC (mimsic) nodes to
>> represent the hardware topology and ready for potential firmware usage."
>>
>> When the mainline OpenSBI series lands adding SpacemiT K3 support:
>>
>> https://lore.kernel.org/opensbi/20261028-spacemit-k3-v6-0-01d984f60941@linux.spacemit.com/
>>
>> ...then I think we could send this upstream?
> Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>
>>
>> Thanks for the review, -E


-- 
Troy Mitchell


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

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

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-29  6:34       ` Troy Mitchell
  2026-10-29  6:39         ` Troy Mitchell
@ 2026-10-29 14:22         ` Anirudh Srinivasan
  2026-10-29 16:34           ` E Shattow
  1 sibling, 1 reply; 10+ messages in thread
From: Anirudh Srinivasan @ 2026-10-29 14:22 UTC (permalink / raw)
  To: Troy Mitchell
  Cc: E Shattow, u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi,
	Tom Rini, Guodong Xu

Hi Troy,

On Thu, Oct 29, 2026 at 1:37 AM Troy Mitchell
<troy.mitchell@linux.spacemit.com> wrote:
>
> On Thu Oct 29, 2026 at 6:35 AM +08, E Shattow wrote:
> > Hi Anirudh, CC: Troy Mitchell, Guodong Xu
> >
> > On 10/28/26 15:01, Anirudh Srinivasan wrote:
> >> On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
> >>> 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>
> >>> 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"; };
> >>
> >> This should be fixed in the DT in linux. I guess you could carry this
> >> patch till it is fixed in linux.
> I think status = "reserved" in k3.dtsi is correct and should stay.
> The DT spec defines "reserved" as a device that is operational
> but should not be used, typically because it is controlled by
> another software component such as platform firmware.
>
> That is exactly the case for the M-level IMSIC and APLIC.

The DT should be a description of the hw, not just the bits that linux
cares about. This is why I'm asking for this to be in the linux DT.
The changes that E is proposing here will have effect in the DT that
u-boot passes to linux anyway.

> >>
> >>> +
> >>>  #include "spacemit-k3-binman.dtsi"
> >>> --
> >>> 2.53.0
> >>>
> >
> > The upstream commit that adds these nodes as reserved status is:
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56f37e391a626
> >
> > Quote, "...Also add M-mode APLIC (maplic) and IMSIC (mimsic) nodes to
> > represent the hardware topology and ready for potential firmware usage."
> >
> > When the mainline OpenSBI series lands adding SpacemiT K3 support:
> >
> > https://lore.kernel.org/opensbi/20261028-spacemit-k3-v6-0-01d984f60941@linux.spacemit.com/
> >
> > ...then I think we could send this upstream?
> Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>
> >
> > Thanks for the review, -E
>
>
> --
> Troy Mitchell
>

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

* Re: [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic
  2026-10-29 14:22         ` Anirudh Srinivasan
@ 2026-10-29 16:34           ` E Shattow
  0 siblings, 0 replies; 10+ messages in thread
From: E Shattow @ 2026-10-29 16:34 UTC (permalink / raw)
  To: Anirudh Srinivasan, Troy Mitchell
  Cc: u-boot, Yixun Lan, Tim Ouyang, Leo Liang, Yao Zi, Tom Rini,
	Guodong Xu

Hi Anirudh, Troy, et. al.

On 10/29/26 07:22, Anirudh Srinivasan wrote:
> Hi Troy,
> 
> On Thu, Oct 29, 2026 at 1:37 AM Troy Mitchell
> <troy.mitchell@linux.spacemit.com> wrote:
>>
>> On Thu Oct 29, 2026 at 6:35 AM +08, E Shattow wrote:
>>> Hi Anirudh, CC: Troy Mitchell, Guodong Xu
>>>
>>> On 10/28/26 15:01, Anirudh Srinivasan wrote:
>>>> On Wed, Oct 28, 2026 at 11:45:05AM -0700, E Shattow wrote:
>>>>> 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>
>>>>> 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"; };
>>>>
>>>> This should be fixed in the DT in linux. I guess you could carry this
>>>> patch till it is fixed in linux.
>> I think status = "reserved" in k3.dtsi is correct and should stay.
>> The DT spec defines "reserved" as a device that is operational
>> but should not be used, typically because it is controlled by
>> another software component such as platform firmware.
>>
>> That is exactly the case for the M-level IMSIC and APLIC.
> 
> The DT should be a description of the hw, not just the bits that linux
> cares about. This is why I'm asking for this to be in the linux DT.
> The changes that E is proposing here will have effect in the DT that
> u-boot passes to linux anyway.
> 

The mainline OpenSBI series supporting K3 has now landed. As promised
I've sent a patch upstream to Linux so that we may continue discussion
about the required mimsic and maplic status there:

https://lore.kernel.org/lkml/20261029162343.1896134-1-e@freeshell.de/

>>>>
>>>>> +
>>>>>  #include "spacemit-k3-binman.dtsi"
>>>>> --
>>>>> 2.53.0
>>>>>
>>>
>>> The upstream commit that adds these nodes as reserved status is:
>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56f37e391a626
>>>
>>> Quote, "...Also add M-mode APLIC (maplic) and IMSIC (mimsic) nodes to
>>> represent the hardware topology and ready for potential firmware usage."
>>>
>>> When the mainline OpenSBI series lands adding SpacemiT K3 support:
>>>
>>> https://lore.kernel.org/opensbi/20261028-spacemit-k3-v6-0-01d984f60941@linux.spacemit.com/
>>>
>>> ...then I think we could send this upstream?
>> Acked-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
>>
>>>
>>> Thanks for the review, -E
>>
>>
>> --
>> Troy Mitchell
>>

Thanks everyone for advice about this, I think it will be okay in any
decision about whether to change this in devicetree-rebasing upstream,
to carry these changes here as-needed in U-Boot for passing to OpenSBI.
Let's get consensus with discussion on LKML and then if there is
something more narrow in scope needed that can be done from U-Boot for
changing these nodes to pass to OpenSBI, I am open to that possibility too

-E

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

end of thread, other threads:[~2026-10-29 16:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28 18:45 [PATCH v1 0/3] Spacemit K3 enable Linux boot E Shattow
2026-10-28 18:45 ` [PATCH v1 1/3] riscv: dts: spacemit: k3: override reserved status of mimsic and maplic E Shattow
2026-10-28 22:01   ` Anirudh Srinivasan
2026-10-28 22:35     ` E Shattow
2026-10-29  6:34       ` Troy Mitchell
2026-10-29  6:39         ` Troy Mitchell
2026-10-29 14:22         ` Anirudh Srinivasan
2026-10-29 16:34           ` E Shattow
2026-10-28 18:45 ` [PATCH v1 2/3] riscv: dts: spacemit: k3: adopt override to drop M-level IMSIC guest props E Shattow
2026-10-28 18:45 ` [PATCH v1 3/3] configs: spacemit: k3: enable CONFIG_BOOTSTD_FULL E Shattow

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.