riscv: dts: spacemit: add initial support for MusePi Pro
Subsystems (3)
Troy Mitchell
reviewerv2 cover riscv: dts: spacemit: add initial support for MusePi Pro
This patchset adds initial device tree support for the MusePi Pro board.
Muse Pi Pro [1] is a single-board computer integrating a high-performance RISC-V 8-core processor, storage, I/O and expansion capabilities into a credit card-sized 1.8-inch board.
Link:
https://developer.spacemit.com/documentation?token=YJtdwnvvViPVcmkoPDpcvwfVnrh&type=pdf
[1]
---
Troy Mitchell (5):
dt-bindings: riscv: spacemit: add MusePi Pro board
riscv: dts: spacemit: add MusePi Pro board device tree
riscv: dts: spacemit: enable PDMA on MusePi Pro
riscv: dts: spacemit: enable eMMC on MusePi Pro
riscv: dts: spacemit: add Ethernet support for MusePi Pro
.../devicetree/bindings/riscv/spacemit.yaml | 1 + arch/riscv/boot/dts/spacemit/Makefile | 1 + arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 77 ++++++++++++++++++++++ 3 files changed, 79 insertions(+)
---
base-commit: 93e3e1281b369a386a4942bb50111def06902e1f
change-id: 20250928-k1-musepi-pro-dts-546d20c442ab
Best regards,
Signature · 1 line
Troy Mitchell <[email protected]>
Troy Mitchell
reviewerPATCH v2 1/5 dt-bindings: riscv: spacemit: add MusePi Pro board
Document the compatible string for the MusePi Pro [1]. It is a 1.8-inch single board computer based on the SpacemiT K1/M1 RISC-V SoC [2].
Here's a refined list of its core features for consideration:
- SoC: SpacemiT M1/K1, 8-core 64-bit RISC-V with 2.0 TOPS AI power. This suggests potential for light AI/ML workloads on-device.
- Memory: LPDDR4X @ 2400MT/s, available in 8GB & 16GB options. Sufficient for various workloads.
- Storage: Onboard eMMC 5.1 (64GB/128GB options). M.2 M-Key for NVMe SSD (2230 size), and a microSD slot (UHS-II) for expansion. Good variety for boot and data.
- Display: HDMI 1.4 (1080P@60Hz) and 2-lane MIPI DSI FPC (1080P@60Hz). Standard display options.
- Connectivity: Onboard Wi-Fi 6 & Bluetooth 5.2. A single Gigabit Ethernet port (RJ45). Given the stated markets, this should cover basic networking.
- USB: 4x USB 3.0 Type-A (host) and 1x USB 2.0 Type-C (device/OTG). Decent host capabilities.
- Expansion: Full-size miniPCIe slot for assorted modules (4G/5G, wireless etc.). A second M.2 M-Key (2230) for more general PCIe devices (SSD, PCIe-to-SATA, comm boards).
- GPIO: Standard 40-pin GPIO interface, as expected for an SBC.
- MIPI: Includes 1x 4-lane MIPI CSI FPC and 2x MIPI DSI FPC interfaces for cameras and displays.
- Clock: Onboard RTC with battery support.
---
Changelog in v2:
- modify commit message
- Link to v1: https://lore.kernel.org/all/[email protected]/
--- Documentation/devicetree/bindings/riscv/spacemit.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/riscv/spacemit.yaml +1 -0
@@ -22,6 +22,7 @@ properties: - enum: - bananapi,bpi-f3 - milkv,jupiter + - spacemit,musepi-pro - xunlong,orangepi-rv2 - const: spacemit,k1
Signature · 1 line
2.51.0
Re: [PATCH v2 1/5] dt-bindings: riscv: spacemit: add MusePi Pro board
Quoted 26 lines · Troy Mitchell
Document the compatible string for the MusePi Pro [1]. It is a 1.8-inch single board computer based on the SpacemiT K1/M1 RISC-V SoC [2].
Here's a refined list of its core features for consideration:
- SoC: SpacemiT M1/K1, 8-core 64-bit RISC-V with 2.0 TOPS AI power. This suggests potential for light AI/ML workloads on-device.
- Memory: LPDDR4X @ 2400MT/s, available in 8GB & 16GB options. Sufficient for various workloads.
- Storage: Onboard eMMC 5.1 (64GB/128GB options). M.2 M-Key for NVMe SSD (2230 size), and a microSD slot (UHS-II) for expansion. Good variety for boot and data.
- Display: HDMI 1.4 (1080P@60Hz) and 2-lane MIPI DSI FPC (1080P@60Hz). Standard display options.
- Connectivity: Onboard Wi-Fi 6 & Bluetooth 5.2. A single Gigabit Ethernet port (RJ45). Given the stated markets, this should cover basic networking.
- USB: 4x USB 3.0 Type-A (host) and 1x USB 2.0 Type-C (device/OTG). Decent host capabilities.
- Expansion: Full-size miniPCIe slot for assorted modules (4G/5G, wireless etc.). A second M.2 M-Key (2230) for more general PCIe devices (SSD, PCIe-to-SATA, comm boards).
- GPIO: Standard 40-pin GPIO interface, as expected for an SBC.
- MIPI: Includes 1x 4-lane MIPI CSI FPC and 2x MIPI DSI FPC interfaces for cameras and displays.
- Clock: Onboard RTC with battery support.
Quoted 4 lines
Signed-off-by Troy Mitchell <[email protected]>
pw-bot: not-applicable
Quoted 25 lines
---
Changelog in v2:
- modify commit message
- Link to v1: https://lore.kernel.org/all/[email protected]/--- Documentation/devicetree/bindings/riscv/spacemit.yaml | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/riscv/spacemit.yaml +1
-0@@ -22,6 +22,7 @@ properties: - enum: - bananapi,bpi-f3 - milkv,jupiter + - spacemit,musepi-pro - xunlong,orangepi-rv2 - const: spacemit,k1Signature · 2 lines
-- 2.51.0
Troy Mitchell
reviewerPATCH v2 2/5 riscv: dts: spacemit: add MusePi Pro board device tree
In reply to Troy MitchellAdd initial device tree support for the MusePi Pro board [1]. The board is using the SpacemiT K1/M1 SoC.
The device tree is adapted from the SpacemiT vendor tree [2].
Here's a refined list of its core features for consideration:
- SoC: SpacemiT M1/K1, 8-core 64-bit RISC-V with 2.0 TOPS AI power. This suggests potential for light AI/ML workloads on-device.
- Memory: LPDDR4X @ 2400MT/s, available in 8GB & 16GB options. Sufficient for various workloads.
- Storage: Onboard eMMC 5.1 (64GB/128GB options). M.2 M-Key for NVMe SSD (2230 size), and a microSD slot (UHS-II) for expansion. Good variety for boot and data.
- Display: HDMI 1.4 (1080P@60Hz) and 2-lane MIPI DSI FPC (1080P@60Hz). Standard display options.
- Connectivity: Onboard Wi-Fi 6 & Bluetooth 5.2. A single Gigabit Ethernet port (RJ45). Given the stated markets, this should cover basic networking.
- USB: 4x USB 3.0 Type-A (host) and 1x USB 2.0 Type-C (device/OTG). Decent host capabilities.
- Expansion: Full-size miniPCIe slot for assorted modules (4G/5G, wireless etc.). A second M.2 M-Key (2230) for more general PCIe devices (SSD, PCIe-to-SATA, comm boards).
- GPIO: Standard 40-pin GPIO interface, as expected for an SBC.
- MIPI: Includes 1x 4-lane MIPI CSI FPC and 2x MIPI DSI FPC interfaces for cameras and displays.
- Clock: Onboard RTC with battery support.
This minimal device tree enables booting into a serial console with UART output and a blinking LED.
---
Changelog in v2:
- modify commit message
- swap pinctrl-names and pinctrl-0 properties in uart0 node
- rename model: "MusePi Pro" -> "SpacemiT MusePi Pro"
- keep the dtb-$(CONFIG_ARCH_SPACEMIT) entries in alphabetical order
- Link to v1: https://lore.kernel.org/all/[email protected]/
--- arch/riscv/boot/dts/spacemit/Makefile | 1 + arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 40 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+)
arch/riscv/boot/dts/spacemit/Makefile +1 -0
@@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-bananapi-f3.dtb dtb-$(CONFIG_ARCH_SPACEMIT) += k1-milkv-jupiter.dtb +dtb-$(CONFIG_ARCH_SPACEMIT) += k1-musepi-pro.dtb dtb-$(CONFIG_ARCH_SPACEMIT) += k1-orangepi-rv2.dtb
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts new file +40 -0
@@ -0,0 +1,40 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2024 Yangyu Chen <[email protected]> + * Copyright (C) 2025 Troy Mitchell <[email protected]> + */ + +/dts-v1/; + +#include "k1.dtsi" +#include "k1-pinctrl.dtsi" + +/ { + model = "SpacemiT MusePi Pro"; + compatible = "spacemit,musepi-pro", "spacemit,k1"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0"; + }; + + leds { + compatible = "gpio-leds"; + + led1 { + label = "sys-led"; + gpios = <&gpio K1_GPIO(96) GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + default-state = "on"; + }; + }; +}; + +&uart0 { + pinctrl-0 = <&uart0_2_cfg>; + pinctrl-names = "default"; + status = "okay"; +};
Signature · 1 line
2.51.0
Troy Mitchell
reviewerPATCH v2 3/5 riscv: dts: spacemit: enable PDMA on MusePi Pro
In reply to Troy MitchellEnable the PDMA on the SpacemiT K1-based MusePi Pro board by setting its status to "okay".
--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +4 -0
@@ -33,6 +33,10 @@ led1 { }; }; +&pdma { + status = "okay"; +}; + &uart0 { pinctrl-0 = <&uart0_2_cfg>; pinctrl-names = "default";
Signature · 1 line
2.51.0
Troy Mitchell
reviewerPATCH v2 4/5 riscv: dts: spacemit: enable eMMC on MusePi Pro
In reply to Troy MitchellEnable the on-board eMMC for MusePi Pro with 8-bit bus and HS400 mode.
--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +10 -0
@@ -33,6 +33,16 @@ led1 { }; }; +&emmc { + bus-width = <8>; + mmc-hs400-1_8v; + mmc-hs400-enhanced-strobe; + non-removable; + no-sd; + no-sdio; + status = "okay"; +}; + &pdma { status = "okay"; };
Signature · 1 line
2.51.0
Troy Mitchell
reviewerPATCH v2 5/5 riscv: dts: spacemit: add Ethernet support for MusePi Pro
In reply to Troy MitchellMusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +23 -0
@@ -47,6 +47,29 @@ &pdma { status = "okay"; }; +ð0 { + phy-handle = <&rgmii0>; + phy-mode = "rgmii-id"; + pinctrl-0 = <&gmac0_cfg>; + pinctrl-names = "default"; + rx-internal-delay-ps = <0>; + tx-internal-delay-ps = <0>; + status = "okay"; + + mdio-bus { + #address-cells = <0x1>; + #size-cells = <0x0>; + + reset-gpios = <&gpio K1_GPIO(110) GPIO_ACTIVE_LOW>; + reset-delay-us = <10000>; + reset-post-delay-us = <100000>; + + rgmii0: phy@1 { + reg = <0x1>; + }; + }; +}; + &uart0 { pinctrl-0 = <&uart0_2_cfg>; pinctrl-names = "default";
Signature · 1 line
2.51.0
Re: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
Quoted 13 lines · Troy Mitchell
MusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
Signed-off-by Troy Mitchell <[email protected]>--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +0
-0
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts &pdma { · line 50
Quoted 4 lines
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1
-0@@ -47,6 +47,29 @@ &pdma { status = "okay"; }; +ð0 {
For node orders in board DTS for SpacemiT devices, usually we follow node name order because there's no unit address to go off of here, so for what we have here it should be emmc, eth0, pdma, uart.
See e.g. arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts and previous discussion [1].
Also, personally I think it would be fine to just add the whole k1-musepi-pro.dts in the same patch instead of splitting it up like this. I feel it would be easier to manage this way. For previous devices these nodes have been added piecemeal mostly because the drivers were being developed in parallel, but if you're going to base this on v6.18-rc1 there shouldn't be dependency problems.
Maybe Yixun can chime in about this as well.
Thanks,
Vivian "dramforever" Wang
Troy Mitchell
reviewerRe: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
Quoted 18 lines · Vivian Wang
Quoted 16 lines · Troy Mitchell
MusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
Signed-off-by Troy Mitchell <[email protected]>--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +0
-0@@ -47,6 +47,29 @@ &pdma { status = "okay"; };
Quoted 8 lines
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts &pdma { · line 50
Quoted 1 line
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1
-0+ð0 {For node orders in board DTS for SpacemiT devices, usually we follow node name order because there's no unit address to go off of here, so for what we have here it should be emmc, eth0, pdma, uart.
See e.g.
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtsand previous discussion [1].
Thanks for you point out!
Quoted 9 lines
Also, personally I think it would be fine to just add the whole
k1-musepi-pro.dtsin the same patch instead of splitting it up like this. I feel it would be easier to manage this way. For previous devices these nodes have been added piecemeal mostly because the drivers were being developed in parallel, but if you're going to base this on v6.18-rc1 there shouldn't be dependency problems.Maybe Yixun can chime in about this as well.
We have talked here [1]
Personally, I think splitting them makes the commit history clearer. I'm happy to merge them if others also think it's more appropriate.
- Troy
Quoted 7 lines
Thanks,
Vivian "dramforever" Wang
Re: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
Hi Troy, Vivian:
Quoted 2 lines · Troy Mitchell
Quoted 1 line · Vivian Wang
[snip]..
Quoted 7 lines
Quoted 2 lines
Maybe Yixun can chime in about this as well.
We have talked here [1]
Personally, I think splitting them makes the commit history clearer. I'm happy to merge them if others also think it's more appropriate.
I do not have strong preference, either way is fine for me If you plan to split the DT into fine patches, then go ahead
Signature · 1 line
Yixun Lan (dlan)
Troy Mitchell
reviewerRe: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
Quoted 7 lines · Yixun Lan
Hi Troy, Vivian:
Quoted 2 lines · Troy Mitchell
Quoted 1 line · Vivian Wang
[snip]..
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Maybe Yixun can chime in about this as well.
We have talked here [1]
Personally, I think splitting them makes the commit history clearer. I'm happy to merge them if others also think it's more appropriate.
I do not have strong preference, either way is fine for me If you plan to split the DT into fine patches, then go ahead
Thank you for your reconfirmation
- Troy
Quoted 4 lines
Signature · 2 lines
-- Yixun Lan (dlan)
Re: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
In reply to Yixun LanHi Troy,
Quoted 7 lines · Yixun Lan
Hi Troy, Vivian:
Quoted 2 lines · Troy Mitchell
Quoted 1 line · Vivian Wang
[snip]..
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Maybe Yixun can chime in about this as well.
We have talked here [1]
Personally, I think splitting them makes the commit history clearer. I'm happy to merge them if others also think it's more appropriate.
I do not have strong preference, either way is fine for me If you plan to split the DT into fine patches, then go ahead
please squash the patches, see Conor's suggestion here:
https://lore.kernel.org/all/20251010-confider-raven-0ad7a810e5de@spud/
Also, I'd plan to collect patches once v6.18-rc1 tagged, you can wait and do it after that..
Signature · 1 line
Yixun Lan (dlan)
Re: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
In reply to Troy MitchellQuoted 37 lines · Troy Mitchell
Quoted 18 lines · Vivian Wang
Quoted 16 lines · Troy Mitchell
MusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
Signed-off-by Troy Mitchell <[email protected]>--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +0
-0@@ -47,6 +47,29 @@ &pdma { status = "okay"; };Quoted 8 lines
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts &pdma { · line 50
Quoted 1 line
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1
-0+ð0 {For node orders in board DTS for SpacemiT devices, usually we follow node name order because there's no unit address to go off of here, so for what we have here it should be emmc, eth0, pdma, uart.
See e.g.
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtsand previous discussion [1].Thanks for you point out!
Quoted 8 lines
Also, personally I think it would be fine to just add the whole
k1-musepi-pro.dtsin the same patch instead of splitting it up like this. I feel it would be easier to manage this way. For previous devices these nodes have been added piecemeal mostly because the drivers were being developed in parallel, but if you're going to base this on v6.18-rc1 there shouldn't be dependency problems.
Quoted 5 lines
Quoted 1 line
Maybe Yixun can chime in about this as well.
We have talked here [1]
Personally, I think splitting them makes the commit history clearer. I'm happy to merge them if others also think it's more appropriate.
tbh, I don't think it makes much sense to add it piecemeal, you'd then end up potentially with dozens of commits for new platforms later in the life of the SoC.
When you're adding new boards, add them in as complete as possible a state from the beginning.
Re: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
In reply to Vivian WangQuoted 25 lines · Vivian Wang
Quoted 13 lines · Troy Mitchell
MusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
Signed-off-by Troy Mitchell <[email protected]>--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +0
-0arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts &pdma { · line 50
Quoted 4 lines
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1
-0@@ -47,6 +47,29 @@ &pdma { status = "okay"; }; +ð0 {For node orders in board DTS for SpacemiT devices, usually we follow node name order because there's no unit address to go off of here, so for what we have here it should be emmc, eth0, pdma, uart.
See e.g.
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtsand previous discussion [1].
Quoted 6 lines
Also, personally I think it would be fine to just add the whole
k1-musepi-pro.dtsin the same patch instead of splitting it up like this. I feel it would be easier to manage this way. For previous devices these nodes have been added piecemeal mostly because the drivers were being developed in parallel, but if you're going to base this on v6.18-rc1 there shouldn't be dependency problems.
... and also almost missed: this should have an ethernet0 alias. In the most common boot flow it's read by U-Boot to set mac-address so that both U-Boot and Linux use the same MAC address. This allows U-Boot to a persistent MAC address rather than having to use a random one.
Quoted 7 lines
Maybe Yixun can chime in about this as well.
Thanks,
Vivian "dramforever" Wang
Troy Mitchell
reviewerRe: [PATCH v2 5/5] riscv: dts: spacemit: add Ethernet support for MusePi Pro
Quoted 33 lines · Vivian Wang
Quoted 25 lines · Vivian Wang
Quoted 13 lines · Troy Mitchell
MusePi Pro features a single RGMII Ethernet port with PHY reset controlled by GPIO.
Signed-off-by Troy Mitchell <[email protected]>--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +0
-0arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts &pdma { · line 50
Quoted 4 lines
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +1
-0@@ -47,6 +47,29 @@ &pdma { status = "okay"; }; +ð0 {For node orders in board DTS for SpacemiT devices, usually we follow node name order because there's no unit address to go off of here, so for what we have here it should be emmc, eth0, pdma, uart.
See e.g.
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtsand previous discussion [1].Quoted 6 lines
Also, personally I think it would be fine to just add the whole
k1-musepi-pro.dtsin the same patch instead of splitting it up like this. I feel it would be easier to manage this way. For previous devices these nodes have been added piecemeal mostly because the drivers were being developed in parallel, but if you're going to base this on v6.18-rc1 there shouldn't be dependency problems.
Quoted 4 lines
... and also almost missed: this should have an ethernet0 alias. In the most common boot flow it's read by U-Boot to set mac-address so that both U-Boot and Linux use the same MAC address. This allows U-Boot to a persistent MAC address rather than having to use a random one.
Yes, I forgot to add that.. I'll add it in the next version.
Thanks!
- Troy
Quoted 9 lines
Quoted 7 lines
Maybe Yixun can chime in about this as well.
Thanks,
Vivian "dramforever" Wang