* [PATCH 1/6] riscv: dts: spacemit: add LEDs for Milk-V Jupiter board
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 7:54 ` Javier Martinez Canillas
2026-03-22 20:28 ` [PATCH 2/6] riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter Aurelien Jarno
` (4 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
The Milk-V Jupiter board provides support for two LEDs through the front
panel header. The "Power LED" indicates the system is running, and the
"HDD LED" shows disk activity. Configure the corresponding LED triggers
accordingly.
Caveats:
- The LEDs are driven through a 4.7k series resistor, making them
quite faint.
- The disk activity trigger requires a storage controller on the M.2 or
PCIe interface. That said, it matches the purpose and the vendor
kernel.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
.../boot/dts/spacemit/k1-milkv-jupiter.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 9959c8023ece0..3cd83c5924e4f 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -21,6 +21,23 @@ chosen {
stdout-path = "serial0";
};
+ leds {
+ compatible = "gpio-leds";
+
+ led1 {
+ label = "pwr-led";
+ gpios = <&gpio K1_GPIO(96) GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "default-on";
+ default-state = "on";
+ };
+
+ led2 {
+ label = "hdd-led";
+ gpios = <&gpio K1_GPIO(92) GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "disk-activity";
+ };
+ };
+
reg_dc_in: regulator-dc-in-12v {
compatible = "regulator-fixed";
regulator-name = "dc_in_12v";
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 1/6] riscv: dts: spacemit: add LEDs for Milk-V Jupiter board
2026-03-22 20:28 ` [PATCH 1/6] riscv: dts: spacemit: add LEDs for Milk-V Jupiter board Aurelien Jarno
@ 2026-03-24 7:54 ` Javier Martinez Canillas
0 siblings, 0 replies; 18+ messages in thread
From: Javier Martinez Canillas @ 2026-03-24 7:54 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Aurelien Jarno <aurelien@aurel32.net> writes:
Hello Aurelien,
> The Milk-V Jupiter board provides support for two LEDs through the front
> panel header. The "Power LED" indicates the system is running, and the
> "HDD LED" shows disk activity. Configure the corresponding LED triggers
> accordingly.
>
> Caveats:
> - The LEDs are driven through a 4.7k series resistor, making them
> quite faint.
> - The disk activity trigger requires a storage controller on the M.2 or
> PCIe interface. That said, it matches the purpose and the vendor
> kernel.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
Looks good to me.
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 2/6] riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
2026-03-22 20:28 ` [PATCH 1/6] riscv: dts: spacemit: add LEDs for Milk-V Jupiter board Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 7:55 ` Javier Martinez Canillas
2026-03-22 20:28 ` [PATCH 3/6] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
` (3 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
The Milk-V Jupiter board includes a 24c04 eeprom on the i2c2 bus. The
eeprom contains an ONIE TLV table, which on the board I tested only
provides a product-name entry. Expose it via an onie,tlv-layout nvmem
layout.
The eeprom is marked as read-only since its contents are not supposed to
be modified.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
.../boot/dts/spacemit/k1-milkv-jupiter.dts | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 3cd83c5924e4f..bd48208a370cf 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -108,6 +108,28 @@ &pdma {
status = "okay";
};
+&i2c2 {
+ pinctrl-0 = <&i2c2_0_cfg>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ eeprom@50 {
+ compatible = "atmel,24c04";
+ reg = <0x50>;
+ vcc-supply = <&buck3_1v8>; /* EEPROM_VCC18 */
+ pagesize = <16>;
+ read-only;
+ size = <512>;
+
+ nvmem-layout {
+ compatible = "onie,tlv-layout";
+
+ product-name {
+ };
+ };
+ };
+};
+
&i2c8 {
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 2/6] riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 2/6] riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter Aurelien Jarno
@ 2026-03-24 7:55 ` Javier Martinez Canillas
0 siblings, 0 replies; 18+ messages in thread
From: Javier Martinez Canillas @ 2026-03-24 7:55 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Aurelien Jarno <aurelien@aurel32.net> writes:
> The Milk-V Jupiter board includes a 24c04 eeprom on the i2c2 bus. The
> eeprom contains an ONIE TLV table, which on the board I tested only
> provides a product-name entry. Expose it via an onie,tlv-layout nvmem
> layout.
>
> The eeprom is marked as read-only since its contents are not supposed to
> be modified.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 3/6] riscv: dts: spacemit: add i2c aliases on Milk-V Jupiter
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
2026-03-22 20:28 ` [PATCH 1/6] riscv: dts: spacemit: add LEDs for Milk-V Jupiter board Aurelien Jarno
2026-03-22 20:28 ` [PATCH 2/6] riscv: dts: spacemit: add 24c04 eeprom on Milk-V Jupiter Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 7:56 ` Javier Martinez Canillas
2026-03-22 20:28 ` [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR " Aurelien Jarno
` (2 subsequent siblings)
5 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Add i2c aliases for i2c2 and i2c8 on Milk-V Jupiter. This is useful to
keep a stable number for the /dev entries after loading the i2c-dev
module.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index bd48208a370cf..836311c3f035c 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -15,6 +15,8 @@ aliases {
ethernet0 = ð0;
ethernet1 = ð1;
serial0 = &uart0;
+ i2c2 = &i2c2;
+ i2c8 = &i2c8;
};
chosen {
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 3/6] riscv: dts: spacemit: add i2c aliases on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 3/6] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
@ 2026-03-24 7:56 ` Javier Martinez Canillas
0 siblings, 0 replies; 18+ messages in thread
From: Javier Martinez Canillas @ 2026-03-24 7:56 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Aurelien Jarno <aurelien@aurel32.net> writes:
> Add i2c aliases for i2c2 and i2c8 on Milk-V Jupiter. This is useful to
> keep a stable number for the /dev entries after loading the i2c-dev
> module.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
` (2 preceding siblings ...)
2026-03-22 20:28 ` [PATCH 3/6] riscv: dts: spacemit: add i2c aliases " Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 9:02 ` Yixun Lan
2026-03-22 20:28 ` [PATCH 5/6] riscv: dts: spacemit: enable USB 3 ports " Aurelien Jarno
2026-03-22 20:28 ` [PATCH 6/6] riscv: dts: spacemit: enable PCIe " Aurelien Jarno
5 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Add the QSPI controller node for the Milk-V Jupiter board and describe
the attached SPI NOR flash (GD25Q64E).
The flash supports a frequency up to 133MHz (80 MHz for reads), and the
SoC supports a frequency up to 104 MHz. However tests have shown that
the flash is not reliably detected above 26.5 MHz, consistent with
frequency used in the vendor kernel. Therefore, use this frequency.
The m25p,fast-read properties is taken from the vendor kernel.
Add a corresponding flash partition layout, matching the layout and the
names used in the vendor U-Boot.
Also add the bootph-pre-ram property to make the device tree usable by
early firmware/bootloaders without modification, as U-Boot is stored on
this NOR flash.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
.../boot/dts/spacemit/k1-milkv-jupiter.dts | 44 ++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 836311c3f035c..05ab5df50be51 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -173,7 +173,7 @@ buck3_1v8: buck3 {
regulator-always-on;
};
- buck4 {
+ buck4_3v3: buck4 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3300000>;
regulator-ramp-delay = <5000>;
@@ -256,6 +256,48 @@ dldo7 {
};
};
+&qspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&qspi_cfg>;
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <26500000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
+ vcc-supply = <&buck4_3v3>; /* QSPI_VCC1833 */
+ m25p,fast-read;
+ bootph-pre-ram;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ bootinfo@0 {
+ reg = <0x0 0x10000>;
+ };
+ private@10000 {
+ reg = <0x10000 0x10000>;
+ };
+ fsbl@20000 {
+ reg = <0x20000 0x40000>;
+ };
+ env@60000 {
+ reg = <0x60000 0x10000>;
+ };
+ opensbi@70000 {
+ reg = <0x70000 0x30000>;
+ };
+ uboot@a00000 {
+ reg = <0xa0000 0x760000>;
+ };
+ };
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_2_cfg>;
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR " Aurelien Jarno
@ 2026-03-24 9:02 ` Yixun Lan
2026-03-24 17:07 ` Yao Zi
2026-03-24 21:19 ` Aurelien Jarno
0 siblings, 2 replies; 18+ messages in thread
From: Yixun Lan @ 2026-03-24 9:02 UTC (permalink / raw)
To: Aurelien Jarno
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> Add the QSPI controller node for the Milk-V Jupiter board and describe
> the attached SPI NOR flash (GD25Q64E).
>
> The flash supports a frequency up to 133MHz (80 MHz for reads), and the
> SoC supports a frequency up to 104 MHz. However tests have shown that
> the flash is not reliably detected above 26.5 MHz, consistent with
> frequency used in the vendor kernel. Therefore, use this frequency.
>
..
> The m25p,fast-read properties is taken from the vendor kernel.
>
So long as this is verified and works fine on board?
> Add a corresponding flash partition layout, matching the layout and the
> names used in the vendor U-Boot.
>
..
> Also add the bootph-pre-ram property to make the device tree usable by
> early firmware/bootloaders without modification, as U-Boot is stored on
> this NOR flash.
Is the dtb file actually used by U-Boot? I'd highly doubt about this,
if not the case or has not been tested, I'd suggest then not to add
this property..
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> .../boot/dts/spacemit/k1-milkv-jupiter.dts | 44 ++++++++++++++++++-
> 1 file changed, 43 insertions(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> index 836311c3f035c..05ab5df50be51 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> @@ -173,7 +173,7 @@ buck3_1v8: buck3 {
> regulator-always-on;
> };
>
> - buck4 {
> + buck4_3v3: buck4 {
> regulator-min-microvolt = <500000>;
> regulator-max-microvolt = <3300000>;
> regulator-ramp-delay = <5000>;
> @@ -256,6 +256,48 @@ dldo7 {
> };
> };
>
> +&qspi {
> + pinctrl-names = "default";
> + pinctrl-0 = <&qspi_cfg>;
> + status = "okay";
> +
> + flash@0 {
> + compatible = "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <26500000>;
> + spi-rx-bus-width = <4>;
> + spi-tx-bus-width = <4>;
> + vcc-supply = <&buck4_3v3>; /* QSPI_VCC1833 */
> + m25p,fast-read;
> + bootph-pre-ram;
> +
> + partitions {
> + compatible = "fixed-partitions";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + bootinfo@0 {
> + reg = <0x0 0x10000>;
> + };
> + private@10000 {
> + reg = <0x10000 0x10000>;
> + };
> + fsbl@20000 {
> + reg = <0x20000 0x40000>;
> + };
> + env@60000 {
> + reg = <0x60000 0x10000>;
> + };
> + opensbi@70000 {
> + reg = <0x70000 0x30000>;
> + };
> + uboot@a00000 {
> + reg = <0xa0000 0x760000>;
> + };
> + };
> + };
> +};
> +
> &uart0 {
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_2_cfg>;
> --
> 2.51.0
>
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-24 9:02 ` Yixun Lan
@ 2026-03-24 17:07 ` Yao Zi
2026-03-24 21:59 ` Yixun Lan
2026-03-24 21:19 ` Aurelien Jarno
1 sibling, 1 reply; 18+ messages in thread
From: Yao Zi @ 2026-03-24 17:07 UTC (permalink / raw)
To: Yixun Lan, Aurelien Jarno
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
On Tue, Mar 24, 2026 at 05:02:20PM +0800, Yixun Lan wrote:
> Hi Aurelien,
>
> On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> > Add the QSPI controller node for the Milk-V Jupiter board and describe
> > the attached SPI NOR flash (GD25Q64E).
> >
> > The flash supports a frequency up to 133MHz (80 MHz for reads), and the
> > SoC supports a frequency up to 104 MHz. However tests have shown that
> > the flash is not reliably detected above 26.5 MHz, consistent with
> > frequency used in the vendor kernel. Therefore, use this frequency.
> >
> ..
> > The m25p,fast-read properties is taken from the vendor kernel.
> >
> So long as this is verified and works fine on board?
>
> > Add a corresponding flash partition layout, matching the layout and the
> > names used in the vendor U-Boot.
> >
> ..
> > Also add the bootph-pre-ram property to make the device tree usable by
> > early firmware/bootloaders without modification, as U-Boot is stored on
> > this NOR flash.
> Is the dtb file actually used by U-Boot? I'd highly doubt about this,
> if not the case or has not been tested, I'd suggest then not to add
> this property..
Currently no, but it would be a bogus if we could do it at introduction
of the device, if it's really necessary in pre-DRAM stages of
bootloaders, e.g. U-Boot SPL. This would reduce the duplicated work of
downstream projects if they decide to switch to Linux upstream
devicetree.
As SpacemiT K1 supports booting from flash, the description of flash
nodes are likely useful for pre-DRAM bootloaders.
> >
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Best regards,
Yao Zi
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-24 17:07 ` Yao Zi
@ 2026-03-24 21:59 ` Yixun Lan
0 siblings, 0 replies; 18+ messages in thread
From: Yixun Lan @ 2026-03-24 21:59 UTC (permalink / raw)
To: Yao Zi
Cc: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Yao,
On 17:07 Tue 24 Mar , Yao Zi wrote:
> On Tue, Mar 24, 2026 at 05:02:20PM +0800, Yixun Lan wrote:
> > Hi Aurelien,
> >
> > On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> > > Add the QSPI controller node for the Milk-V Jupiter board and describe
> > > the attached SPI NOR flash (GD25Q64E).
> > >
> > > The flash supports a frequency up to 133MHz (80 MHz for reads), and the
> > > SoC supports a frequency up to 104 MHz. However tests have shown that
> > > the flash is not reliably detected above 26.5 MHz, consistent with
> > > frequency used in the vendor kernel. Therefore, use this frequency.
> > >
> > ..
> > > The m25p,fast-read properties is taken from the vendor kernel.
> > >
> > So long as this is verified and works fine on board?
> >
> > > Add a corresponding flash partition layout, matching the layout and the
> > > names used in the vendor U-Boot.
> > >
> > ..
> > > Also add the bootph-pre-ram property to make the device tree usable by
> > > early firmware/bootloaders without modification, as U-Boot is stored on
> > > this NOR flash.
> > Is the dtb file actually used by U-Boot? I'd highly doubt about this,
> > if not the case or has not been tested, I'd suggest then not to add
> > this property..
>
> Currently no, but it would be a bogus if we could do it at introduction
> of the device, if it's really necessary in pre-DRAM stages of
> bootloaders, e.g. U-Boot SPL. This would reduce the duplicated work of
> downstream projects if they decide to switch to Linux upstream
> devicetree.
>
All above arguments are based on assumption, I object to add things randomly
without real test proved.
Let's wait once U-Boot actually switch to use upstream devicetree.
> As SpacemiT K1 supports booting from flash, the description of flash
> nodes are likely useful for pre-DRAM bootloaders.
>
This is still a 'likely' ..
> > >
> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>
> Best regards,
> Yao Zi
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-24 9:02 ` Yixun Lan
2026-03-24 17:07 ` Yao Zi
@ 2026-03-24 21:19 ` Aurelien Jarno
2026-03-24 22:09 ` Yixun Lan
1 sibling, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-24 21:19 UTC (permalink / raw)
To: Yixun Lan
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Yixun,
On 2026-03-24 17:02, Yixun Lan wrote:
> Hi Aurelien,
>
> On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> > Add the QSPI controller node for the Milk-V Jupiter board and describe
> > the attached SPI NOR flash (GD25Q64E).
> >
> > The flash supports a frequency up to 133MHz (80 MHz for reads), and the
> > SoC supports a frequency up to 104 MHz. However tests have shown that
> > the flash is not reliably detected above 26.5 MHz, consistent with
> > frequency used in the vendor kernel. Therefore, use this frequency.
> >
> ..
> > The m25p,fast-read properties is taken from the vendor kernel.
> >
> So long as this is verified and works fine on board?
Yes, it's works. And the datasheet also mentions fast read being
supported.
> > Add a corresponding flash partition layout, matching the layout and the
> > names used in the vendor U-Boot.
> >
> ..
> > Also add the bootph-pre-ram property to make the device tree usable by
> > early firmware/bootloaders without modification, as U-Boot is stored on
> > this NOR flash.
> Is the dtb file actually used by U-Boot? I'd highly doubt about this,
> if not the case or has not been tested, I'd suggest then not to add
> this property..
It is currently not used by U-Boot, currently SPL support is not
available, but patches have been posted to added it. I just wanted to
anticipate the addition of the Milk-V Jupiter board in U-boot, but if
that hurt, i can remove it (or you can removed it when merging).
Regards
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://aurel32.net
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter
2026-03-24 21:19 ` Aurelien Jarno
@ 2026-03-24 22:09 ` Yixun Lan
0 siblings, 0 replies; 18+ messages in thread
From: Yixun Lan @ 2026-03-24 22:09 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V ARCHITECTURE,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 22:19 Tue 24 Mar , Aurelien Jarno wrote:
> Hi Yixun,
>
> On 2026-03-24 17:02, Yixun Lan wrote:
> > Hi Aurelien,
..
> > ..
> > > Also add the bootph-pre-ram property to make the device tree usable by
> > > early firmware/bootloaders without modification, as U-Boot is stored on
> > > this NOR flash.
> > Is the dtb file actually used by U-Boot? I'd highly doubt about this,
> > if not the case or has not been tested, I'd suggest then not to add
> > this property..
>
> It is currently not used by U-Boot, currently SPL support is not
> available, but patches have been posted to added it. I just wanted to
> anticipate the addition of the Milk-V Jupiter board in U-boot, but if
> that hurt, i can remove it (or you can removed it when merging).
Not hurt since it isn't really used in Kernel, but I just don't
want to add things without test..
I can remove it if there is no other changes, then no iteration needed.
Let's wait a few more days to see if people have additional comments for
this series
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] riscv: dts: spacemit: enable USB 3 ports on Milk-V Jupiter
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
` (3 preceding siblings ...)
2026-03-22 20:28 ` [PATCH 4/6] riscv: dts: spacemit: enable QSPI and add SPI NOR " Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 8:01 ` Javier Martinez Canillas
2026-03-22 20:28 ` [PATCH 6/6] riscv: dts: spacemit: enable PCIe " Aurelien Jarno
5 siblings, 1 reply; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V SPACEMIT SoC Support,
open list:RISC-V SPACEMIT SoC Support
Enable the DWC3 USB 3.0 controller (USB#2 port in the K1 datasheet) and
its associated combo_phy (USB 3 PHY) and usbphy2 (USB 2 PHY) on the
Milk-V Jupiter board.
The board uses a VLI VL817 hub, providing four ports. Two are routed to
the 3.0 type-A connectors, and two to the F_USB3 front USB header. The
hub requires two separate 5V power supplies: one for the hub itself and
one for the USB connectors. Add an always-on regulator sourcing 5V from
the DC-IN input, along with two GPIO-controlled fixed regulators to
manage the hub and connectors power supplies.
Note that the board also provides four USB 2.0 ports (two via type-A
connectors and two via the F_USB2 front USB header), but these are
handled by a different controller (USB#1 port in the K1 datasheet).
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
.../boot/dts/spacemit/k1-milkv-jupiter.dts | 62 +++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 05ab5df50be51..4432f8287eb5c 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -58,6 +58,41 @@ reg_vcc_4v: regulator-vcc-4v {
regulator-always-on;
vin-supply = <®_dc_in>;
};
+
+ reg_vcc_5v: regulator-vcc-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-boot-on;
+ regulator-always-on;
+ vin-supply = <®_dc_in>;
+ };
+
+ regulator-usb3-vbus-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "USB30_VBUS";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ vin-supply = <®_vcc_5v>;
+ gpio = <&gpio K1_GPIO(97) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ usb3_hub_5v: regulator-usb3-hub-5v {
+ compatible = "regulator-fixed";
+ regulator-name = "USB30_HUB";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <®_vcc_5v>;
+ gpio = <&gpio K1_GPIO(123) GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+};
+
+&combo_phy {
+ status = "okay";
};
ð0 {
@@ -303,3 +338,30 @@ &uart0 {
pinctrl-0 = <&uart0_2_cfg>;
status = "okay";
};
+
+&usbphy2 {
+ status = "okay";
+};
+
+&usb_dwc3 {
+ dr_mode = "host";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ hub_2_0: hub@1 {
+ compatible = "usb2109,2817";
+ reg = <0x1>;
+ vdd-supply = <&usb3_hub_5v>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb2109,817";
+ reg = <0x2>;
+ vdd-supply = <&usb3_hub_5v>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio K1_GPIO(124) GPIO_ACTIVE_LOW>;
+ };
+};
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 5/6] riscv: dts: spacemit: enable USB 3 ports on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 5/6] riscv: dts: spacemit: enable USB 3 ports " Aurelien Jarno
@ 2026-03-24 8:01 ` Javier Martinez Canillas
0 siblings, 0 replies; 18+ messages in thread
From: Javier Martinez Canillas @ 2026-03-24 8:01 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yixun Lan
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V SPACEMIT SoC Support,
open list:RISC-V SPACEMIT SoC Support
Aurelien Jarno <aurelien@aurel32.net> writes:
> Enable the DWC3 USB 3.0 controller (USB#2 port in the K1 datasheet) and
> its associated combo_phy (USB 3 PHY) and usbphy2 (USB 2 PHY) on the
> Milk-V Jupiter board.
>
> The board uses a VLI VL817 hub, providing four ports. Two are routed to
> the 3.0 type-A connectors, and two to the F_USB3 front USB header. The
> hub requires two separate 5V power supplies: one for the hub itself and
> one for the USB connectors. Add an always-on regulator sourcing 5V from
> the DC-IN input, along with two GPIO-controlled fixed regulators to
> manage the hub and connectors power supplies.
>
> Note that the board also provides four USB 2.0 ports (two via type-A
> connectors and two via the F_USB2 front USB header), but these are
> handled by a different controller (USB#1 port in the K1 datasheet).
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 6/6] riscv: dts: spacemit: enable PCIe ports on Milk-V Jupiter
2026-03-22 20:28 [PATCH 0/6] riscv: dts: spacemit: enable more devices Aurelien Jarno
` (4 preceding siblings ...)
2026-03-22 20:28 ` [PATCH 5/6] riscv: dts: spacemit: enable USB 3 ports " Aurelien Jarno
@ 2026-03-22 20:28 ` Aurelien Jarno
2026-03-24 8:02 ` Javier Martinez Canillas
2026-03-26 7:34 ` Yixun Lan
5 siblings, 2 replies; 18+ messages in thread
From: Aurelien Jarno @ 2026-03-22 20:28 UTC (permalink / raw)
To: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V SPACEMIT SoC Support,
open list:RISC-V SPACEMIT SoC Support
Enable the two PCIe controller along with and their associated PHY. They
are routed to the M.2 M-key connector and to the the PCIe x8 slot.
Add an always-on regulator sourcing 3.3V from the DC-IN input, to power
the PCIe ports.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
.../boot/dts/spacemit/k1-milkv-jupiter.dts | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 4432f8287eb5c..d59dea4149ae7 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -40,6 +40,16 @@ led2 {
};
};
+ pcie_vcc_3v3: regulator-pcie-vcc3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "pcie_vcc3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ vin-supply = <®_dc_in>;
+ };
+
reg_dc_in: regulator-dc-in-12v {
compatible = "regulator-fixed";
regulator-name = "dc_in_12v";
@@ -291,6 +301,38 @@ dldo7 {
};
};
+&pcie1_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie1_3_cfg>;
+ status = "okay";
+};
+
+&pcie1_port {
+ phys = <&pcie1_phy>;
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+};
+
+&pcie1 {
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ status = "okay";
+};
+
+&pcie2_phy {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pcie2_4_cfg>;
+ status = "okay";
+};
+
+&pcie2_port {
+ phys = <&pcie2_phy>;
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+};
+
+&pcie2 {
+ vpcie3v3-supply = <&pcie_vcc_3v3>;
+ status = "okay";
+};
+
&qspi {
pinctrl-names = "default";
pinctrl-0 = <&qspi_cfg>;
--
2.51.0
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH 6/6] riscv: dts: spacemit: enable PCIe ports on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 6/6] riscv: dts: spacemit: enable PCIe " Aurelien Jarno
@ 2026-03-24 8:02 ` Javier Martinez Canillas
2026-03-26 7:34 ` Yixun Lan
1 sibling, 0 replies; 18+ messages in thread
From: Javier Martinez Canillas @ 2026-03-24 8:02 UTC (permalink / raw)
To: Aurelien Jarno, linux-kernel, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti
Cc: Aurelien Jarno,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V SPACEMIT SoC Support,
open list:RISC-V SPACEMIT SoC Support
Aurelien Jarno <aurelien@aurel32.net> writes:
> Enable the two PCIe controller along with and their associated PHY. They
> are routed to the M.2 M-key connector and to the the PCIe x8 slot.
>
> Add an always-on regulator sourcing 3.3V from the DC-IN input, to power
> the PCIe ports.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 6/6] riscv: dts: spacemit: enable PCIe ports on Milk-V Jupiter
2026-03-22 20:28 ` [PATCH 6/6] riscv: dts: spacemit: enable PCIe " Aurelien Jarno
2026-03-24 8:02 ` Javier Martinez Canillas
@ 2026-03-26 7:34 ` Yixun Lan
1 sibling, 0 replies; 18+ messages in thread
From: Yixun Lan @ 2026-03-26 7:34 UTC (permalink / raw)
To: Aurelien Jarno
Cc: linux-kernel, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list:RISC-V SPACEMIT SoC Support,
open list:RISC-V SPACEMIT SoC Support
Hi Aurelien,
On 21:28 Sun 22 Mar , Aurelien Jarno wrote:
> Enable the two PCIe controller along with and their associated PHY. They
> are routed to the M.2 M-key connector and to the the PCIe x8 slot.
~~~~~~drop one
>
> Add an always-on regulator sourcing 3.3V from the DC-IN input, to power
> the PCIe ports.
>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Can you re-spin one more version? along with previous bootph-pre-ram
change, you might also wanna adjust the commit message accordingly..
P.S, It's easy for me to pick from the list instead of amending locally
--
Yixun Lan (dlan)
^ permalink raw reply [flat|nested] 18+ messages in thread