* [PATCH 0/2] riscv: dts: spacemit: mark K1 boot nodes bootph-pre-ram
@ 2026-10-12 23:56 ` Hung-Chun Tseng
0 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
A bootloader SPL on the SpacemiT K1 runs from SRAM and needs a handful
of nodes before DRAM is up: the root clocks and clock controllers, the
console UART, the boot media (SD, eMMC, QSPI NOR), the board EEPROM
used to identify the board, and the PMIC rails it programs before DRAM
training. Today mainline U-Boot carries the bootph-pre-ram tags for
these in per-board -u-boot.dtsi files.
When I sent a U-Boot patch adding another such file for the Milk-V
Jupiter, E Shattow asked for the tags to go upstream first, so every
K1 board gets them and the U-Boot overlays can shrink [1]. Earlier
there was no working mainline SPL for K1 to justify them; there is now.
Patch 1 tags the SoC nodes in k1.dtsi. Patch 2 tags the board-specific
EEPROM, PMIC rails and SPI NOR on the boards that have them. The set of
nodes matches what the mainline U-Boot SPL tags for the BPI-F3 and
MusePi Pro.
Testing: all K1 DTBs build, and dtbs_check is clean for them with and
without this series. I have not run an SPL built from these trees on
hardware. On a Milk-V Jupiter running Linux I checked that the EEPROM,
PMIC and SPI NOR answer at the addresses described.
[1] https://lore.kernel.org/u-boot/5d323a11-da4e-4071-bdeb-ab5c03e8f85e@freeshell.de/
Hung-Chun Tseng (2):
riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 5 +++++
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 6 ++++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 12 ++++++++++++
7 files changed, 53 insertions(+)
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] riscv: dts: spacemit: mark K1 boot nodes bootph-pre-ram
@ 2026-10-12 23:56 ` Hung-Chun Tseng
0 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
A bootloader SPL on the SpacemiT K1 runs from SRAM and needs a handful
of nodes before DRAM is up: the root clocks and clock controllers, the
console UART, the boot media (SD, eMMC, QSPI NOR), the board EEPROM
used to identify the board, and the PMIC rails it programs before DRAM
training. Today mainline U-Boot carries the bootph-pre-ram tags for
these in per-board -u-boot.dtsi files.
When I sent a U-Boot patch adding another such file for the Milk-V
Jupiter, E Shattow asked for the tags to go upstream first, so every
K1 board gets them and the U-Boot overlays can shrink [1]. Earlier
there was no working mainline SPL for K1 to justify them; there is now.
Patch 1 tags the SoC nodes in k1.dtsi. Patch 2 tags the board-specific
EEPROM, PMIC rails and SPI NOR on the boards that have them. The set of
nodes matches what the mainline U-Boot SPL tags for the BPI-F3 and
MusePi Pro.
Testing: all K1 DTBs build, and dtbs_check is clean for them with and
without this series. I have not run an SPL built from these trees on
hardware. On a Milk-V Jupiter running Linux I checked that the EEPROM,
PMIC and SPI NOR answer at the addresses described.
[1] https://lore.kernel.org/u-boot/5d323a11-da4e-4071-bdeb-ab5c03e8f85e@freeshell.de/
Hung-Chun Tseng (2):
riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 5 +++++
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 6 ++++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 12 ++++++++++++
7 files changed, 53 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
2026-10-12 23:56 ` Hung-Chun Tseng
@ 2026-10-12 23:56 ` Hung-Chun Tseng
-1 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
A bootloader SPL that follows the K1 BootROM runs from SRAM before DRAM
is up. It needs the root clocks, the clock and reset controllers, the
console UART, and the boot media controllers: SD (sdhci0), eMMC and
QSPI NOR. Mark these nodes bootph-pre-ram so an SPL can use the
upstream device tree as is, instead of carrying the tags in per-board
overlays.
These are the SoC nodes that the mainline U-Boot SPL for K1 currently
tags in its board -u-boot.dtsi files.
Assisted-by: claude-opus-5-5 dtbs_check
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index 3fabfd341..8ca98d15a 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -322,6 +322,7 @@ cluster1_l2_cache: l2-cache1 {
clocks {
vctcxo_1m: clock-1m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <1000000>;
clock-output-names = "vctcxo_1m";
#clock-cells = <0>;
@@ -329,6 +330,7 @@ vctcxo_1m: clock-1m {
vctcxo_24m: clock-24m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <24000000>;
clock-output-names = "vctcxo_24m";
#clock-cells = <0>;
@@ -336,6 +338,7 @@ vctcxo_24m: clock-24m {
vctcxo_3m: clock-3m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <3000000>;
clock-output-names = "vctcxo_3m";
#clock-cells = <0>;
@@ -343,6 +346,7 @@ vctcxo_3m: clock-3m {
osc_32k: clock-32k {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <32768>;
clock-output-names = "osc_32k";
#clock-cells = <0>;
@@ -586,6 +590,7 @@ i2c5: i2c@d4013800 {
syscon_apbc: system-controller@d4015000 {
compatible = "spacemit,k1-syscon-apbc";
reg = <0x0 0xd4015000 0x0 0x1000>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -857,6 +862,7 @@ pwm19: pwm@d4022c00 {
syscon_mpmu: system-controller@d4050000 {
compatible = "spacemit,k1-syscon-mpmu";
reg = <0x0 0xd4050000 0x0 0x209c>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -869,6 +875,7 @@ syscon_mpmu: system-controller@d4050000 {
pll: clock-controller@d4090000 {
compatible = "spacemit,k1-pll";
reg = <0x0 0xd4090000 0x0 0x1000>;
+ bootph-pre-ram;
clocks = <&vctcxo_24m>;
spacemit,mpmu = <&syscon_mpmu>;
#clock-cells = <1>;
@@ -877,6 +884,7 @@ pll: clock-controller@d4090000 {
syscon_apmu: system-controller@d4282800 {
compatible = "spacemit,k1-syscon-apmu";
reg = <0x0 0xd4282800 0x0 0x400>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -956,6 +964,7 @@ uart0: serial@d4017000 {
compatible = "spacemit,k1-uart",
"intel,xscale-uart";
reg = <0x0 0xd4017000 0x0 0x100>;
+ bootph-pre-ram;
clocks = <&syscon_apbc CLK_UART0>,
<&syscon_apbc CLK_UART0_BUS>;
clock-names = "core", "bus";
@@ -1085,6 +1094,7 @@ qspi: spi@d420c000 {
reg = <0x0 0xd420c000 0x0 0x1000>,
<0x0 0xb8000000 0x0 0xc00000>;
reg-names = "QuadSPI", "QuadSPI-memory";
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_QSPI_BUS>,
<&syscon_apmu CLK_QSPI>;
clock-names = "qspi_en", "qspi";
@@ -1328,6 +1338,7 @@ usb_dwc3: usb@c0a00000 {
sdhci0: mmc@d4280000 {
compatible = "spacemit,k1-sdhci";
reg = <0x0 0xd4280000 0x0 0x200>;
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_SDH_AXI>,
<&syscon_apmu CLK_SDH0>;
clock-names = "core", "io";
@@ -1341,6 +1352,7 @@ sdhci0: mmc@d4280000 {
emmc: mmc@d4281000 {
compatible = "spacemit,k1-sdhci";
reg = <0x0 0xd4281000 0x0 0x200>;
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_SDH_AXI>,
<&syscon_apmu CLK_SDH2>;
clock-names = "core", "io";
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
@ 2026-10-12 23:56 ` Hung-Chun Tseng
0 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
A bootloader SPL that follows the K1 BootROM runs from SRAM before DRAM
is up. It needs the root clocks, the clock and reset controllers, the
console UART, and the boot media controllers: SD (sdhci0), eMMC and
QSPI NOR. Mark these nodes bootph-pre-ram so an SPL can use the
upstream device tree as is, instead of carrying the tags in per-board
overlays.
These are the SoC nodes that the mainline U-Boot SPL for K1 currently
tags in its board -u-boot.dtsi files.
Assisted-by: claude-opus-5-5 dtbs_check
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index 3fabfd341..8ca98d15a 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -322,6 +322,7 @@ cluster1_l2_cache: l2-cache1 {
clocks {
vctcxo_1m: clock-1m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <1000000>;
clock-output-names = "vctcxo_1m";
#clock-cells = <0>;
@@ -329,6 +330,7 @@ vctcxo_1m: clock-1m {
vctcxo_24m: clock-24m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <24000000>;
clock-output-names = "vctcxo_24m";
#clock-cells = <0>;
@@ -336,6 +338,7 @@ vctcxo_24m: clock-24m {
vctcxo_3m: clock-3m {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <3000000>;
clock-output-names = "vctcxo_3m";
#clock-cells = <0>;
@@ -343,6 +346,7 @@ vctcxo_3m: clock-3m {
osc_32k: clock-32k {
compatible = "fixed-clock";
+ bootph-pre-ram;
clock-frequency = <32768>;
clock-output-names = "osc_32k";
#clock-cells = <0>;
@@ -586,6 +590,7 @@ i2c5: i2c@d4013800 {
syscon_apbc: system-controller@d4015000 {
compatible = "spacemit,k1-syscon-apbc";
reg = <0x0 0xd4015000 0x0 0x1000>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -857,6 +862,7 @@ pwm19: pwm@d4022c00 {
syscon_mpmu: system-controller@d4050000 {
compatible = "spacemit,k1-syscon-mpmu";
reg = <0x0 0xd4050000 0x0 0x209c>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -869,6 +875,7 @@ syscon_mpmu: system-controller@d4050000 {
pll: clock-controller@d4090000 {
compatible = "spacemit,k1-pll";
reg = <0x0 0xd4090000 0x0 0x1000>;
+ bootph-pre-ram;
clocks = <&vctcxo_24m>;
spacemit,mpmu = <&syscon_mpmu>;
#clock-cells = <1>;
@@ -877,6 +884,7 @@ pll: clock-controller@d4090000 {
syscon_apmu: system-controller@d4282800 {
compatible = "spacemit,k1-syscon-apmu";
reg = <0x0 0xd4282800 0x0 0x400>;
+ bootph-pre-ram;
clocks = <&osc_32k>, <&vctcxo_1m>, <&vctcxo_3m>,
<&vctcxo_24m>;
clock-names = "osc", "vctcxo_1m", "vctcxo_3m",
@@ -956,6 +964,7 @@ uart0: serial@d4017000 {
compatible = "spacemit,k1-uart",
"intel,xscale-uart";
reg = <0x0 0xd4017000 0x0 0x100>;
+ bootph-pre-ram;
clocks = <&syscon_apbc CLK_UART0>,
<&syscon_apbc CLK_UART0_BUS>;
clock-names = "core", "bus";
@@ -1085,6 +1094,7 @@ qspi: spi@d420c000 {
reg = <0x0 0xd420c000 0x0 0x1000>,
<0x0 0xb8000000 0x0 0xc00000>;
reg-names = "QuadSPI", "QuadSPI-memory";
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_QSPI_BUS>,
<&syscon_apmu CLK_QSPI>;
clock-names = "qspi_en", "qspi";
@@ -1328,6 +1338,7 @@ usb_dwc3: usb@c0a00000 {
sdhci0: mmc@d4280000 {
compatible = "spacemit,k1-sdhci";
reg = <0x0 0xd4280000 0x0 0x200>;
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_SDH_AXI>,
<&syscon_apmu CLK_SDH0>;
clock-names = "core", "io";
@@ -1341,6 +1352,7 @@ sdhci0: mmc@d4280000 {
emmc: mmc@d4281000 {
compatible = "spacemit,k1-sdhci";
reg = <0x0 0xd4281000 0x0 0x200>;
+ bootph-pre-ram;
clocks = <&syscon_apmu CLK_SDH_AXI>,
<&syscon_apmu CLK_SDH2>;
clock-names = "core", "io";
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
2026-10-12 23:56 ` Hung-Chun Tseng
@ 2026-10-12 23:56 ` Hung-Chun Tseng
-1 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
On K1 boards an SPL reads the board EEPROM (0x50 on i2c2) to identify
the board, and before DRAM training it programs the P1 PMIC (0x41 on
i2c8) rails buck1, buck3 and aldo1. Boards that boot from SPI NOR also
need the flash on QSPI.
Mark these board peripherals, and the I2C buses they sit on,
bootph-pre-ram on the boards that have them.
Assisted-by: claude-opus-5-5 dtbs_check
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 5 +++++
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 6 ++++++
6 files changed, 41 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
index 81c40df2a..6269d2ba7 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
@@ -64,6 +64,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c2_0_cfg>;
status = "okay";
@@ -71,6 +72,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>;
pagesize = <16>;
read-only;
@@ -93,6 +95,7 @@ serial-number {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -100,6 +103,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -113,6 +117,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -127,6 +132,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -155,6 +161,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 58035d886..e74505984 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -187,6 +187,7 @@ &qspi {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -194,6 +195,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
pagesize = <16>;
read-only;
@@ -216,6 +218,7 @@ serial-number {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -223,6 +226,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -236,6 +240,7 @@ pmic@41 {
regulators {
buck1_0v9: buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -250,6 +255,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -278,6 +284,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 635e95aad..406b7ca16 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -201,6 +201,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -208,6 +209,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c04";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC18 */
pagesize = <16>;
read-only;
@@ -223,6 +225,7 @@ product-name {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -230,6 +233,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -243,6 +247,7 @@ pmic@41 {
regulators {
buck1_0v9: buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -257,6 +262,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -285,6 +291,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -386,6 +393,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts b/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
index 246f8f2ab..0531bd003 100644
--- a/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
@@ -127,6 +127,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -134,6 +135,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
pagesize = <8>;
read-only;
@@ -159,6 +161,7 @@ num-macs {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -166,6 +169,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -179,6 +183,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -193,6 +198,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -221,6 +227,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -320,6 +327,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
index 2d1ba34cb..8e9bbbeb1 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
@@ -113,6 +113,7 @@ rgmii1: phy@1 {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -120,6 +121,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <&vcc4v0>;
vin2-supply = <&vcc4v0>;
@@ -133,6 +135,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -147,6 +150,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -175,6 +179,7 @@ buck6 {
};
aldo1_3v3: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index b907a1396..857b4ebe3 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -143,6 +143,7 @@ &pdma {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -150,6 +151,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <&vcc4v0>;
vin2-supply = <&vcc4v0>;
@@ -163,6 +165,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -177,6 +180,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -205,6 +209,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -298,6 +303,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
@ 2026-10-12 23:56 ` Hung-Chun Tseng
0 siblings, 0 replies; 8+ messages in thread
From: Hung-Chun Tseng @ 2026-10-12 23:56 UTC (permalink / raw)
To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
E Shattow, devicetree, linux-riscv, spacemit, linux-kernel
On K1 boards an SPL reads the board EEPROM (0x50 on i2c2) to identify
the board, and before DRAM training it programs the P1 PMIC (0x41 on
i2c8) rails buck1, buck3 and aldo1. Boards that boot from SPI NOR also
need the flash on QSPI.
Mark these board peripherals, and the I2C buses they sit on,
bootph-pre-ram on the boards that have them.
Assisted-by: claude-opus-5-5 dtbs_check
Signed-off-by: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
---
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 7 +++++++
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 8 ++++++++
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 5 +++++
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 6 ++++++
6 files changed, 41 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
index 81c40df2a..6269d2ba7 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
@@ -64,6 +64,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c2_0_cfg>;
status = "okay";
@@ -71,6 +72,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>;
pagesize = <16>;
read-only;
@@ -93,6 +95,7 @@ serial-number {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -100,6 +103,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -113,6 +117,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -127,6 +132,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -155,6 +161,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 58035d886..e74505984 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -187,6 +187,7 @@ &qspi {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -194,6 +195,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
pagesize = <16>;
read-only;
@@ -216,6 +218,7 @@ serial-number {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -223,6 +226,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -236,6 +240,7 @@ pmic@41 {
regulators {
buck1_0v9: buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -250,6 +255,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -278,6 +284,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
index 635e95aad..406b7ca16 100644
--- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
@@ -201,6 +201,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -208,6 +209,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c04";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC18 */
pagesize = <16>;
read-only;
@@ -223,6 +225,7 @@ product-name {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -230,6 +233,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -243,6 +247,7 @@ pmic@41 {
regulators {
buck1_0v9: buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -257,6 +262,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -285,6 +291,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -386,6 +393,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts b/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
index 246f8f2ab..0531bd003 100644
--- a/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
@@ -127,6 +127,7 @@ &pdma {
};
&i2c2 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c2_0_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -134,6 +135,7 @@ &i2c2 {
eeprom@50 {
compatible = "atmel,24c02";
reg = <0x50>;
+ bootph-pre-ram;
vcc-supply = <&buck3_1v8>; /* EEPROM_VCC1V8 */
pagesize = <8>;
read-only;
@@ -159,6 +161,7 @@ num-macs {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-0 = <&i2c8_cfg>;
pinctrl-names = "default";
status = "okay";
@@ -166,6 +169,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <®_vcc_4v>;
vin2-supply = <®_vcc_4v>;
@@ -179,6 +183,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -193,6 +198,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -221,6 +227,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -320,6 +327,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
index 2d1ba34cb..8e9bbbeb1 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
@@ -113,6 +113,7 @@ rgmii1: phy@1 {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -120,6 +121,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <&vcc4v0>;
vin2-supply = <&vcc4v0>;
@@ -133,6 +135,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -147,6 +150,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -175,6 +179,7 @@ buck6 {
};
aldo1_3v3: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index b907a1396..857b4ebe3 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -143,6 +143,7 @@ &pdma {
};
&i2c8 {
+ bootph-pre-ram;
pinctrl-names = "default";
pinctrl-0 = <&i2c8_cfg>;
status = "okay";
@@ -150,6 +151,7 @@ &i2c8 {
pmic@41 {
compatible = "spacemit,p1";
reg = <0x41>;
+ bootph-pre-ram;
interrupts = <64>;
vin1-supply = <&vcc4v0>;
vin2-supply = <&vcc4v0>;
@@ -163,6 +165,7 @@ pmic@41 {
regulators {
buck1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1050000>;
regulator-ramp-delay = <5000>;
@@ -177,6 +180,7 @@ buck2 {
};
buck3_1v8: buck3 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1800000>;
regulator-ramp-delay = <5000>;
@@ -205,6 +209,7 @@ buck6 {
};
aldo1: aldo1 {
+ bootph-pre-ram;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3400000>;
regulator-boot-on;
@@ -298,6 +303,7 @@ &qspi {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
+ bootph-pre-ram;
spi-max-frequency = <26500000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
2026-10-12 23:56 ` Hung-Chun Tseng
(?)
@ 2026-10-13 0:04 ` sashiko-bot
-1 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-10-13 0:04 UTC (permalink / raw)
To: Hung-Chun Tseng; +Cc: devicetree, conor+dt, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt: spacemit: k1: boot media incorrectly marked bootph-pre-ram in SoC dtsi
--
commit 8f0e131a27a4e9b047773ff808813b281fae2061
Author: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
riscv: dts: spacemit: k1: mark boot-critical SoC nodes bootph-pre-ram
This commit marks several K1 SoC nodes with the bootph-pre-ram tag to allow
a U-Boot SPL to use the upstream device tree directly. It adds the tag to
clocks, system controllers, UART, and boot media controllers (SD, eMMC,
and QSPI).
> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
> index 3fabfd34114b2..8ca98d15a117a 100644
> --- a/arch/riscv/boot/dts/spacemit/k1.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
[ ... ]
> @@ -1085,6 +1094,7 @@ qspi: spi@d420c000 {
> reg = <0x0 0xd420c000 0x0 0x1000>,
> <0x0 0xb8000000 0x0 0xc00000>;
> reg-names = "QuadSPI", "QuadSPI-memory";
> + bootph-pre-ram;
[Severity: Low]
Does adding the bootph-pre-ram tag globally to the QSPI boot media controller
in the SoC dtsi prevent individual boards from excluding the QSPI driver from
their SPL if they don't use it for early boot?
When a board includes k1.dtsi and enables a peripheral like QSPI for OS-level
storage but does not use it as the early boot medium, this inherited tag
forces the QSPI driver and node into the SPL anyway.
This unnecessarily inflates the U-Boot SPL binary size and increases SRAM
memory pressure.
Standard devicetree practice mandates that boot media phase tags be defined
in per-board .dts files or -u-boot.dtsi overlays corresponding to the actual
boot interfaces wired and used by that specific board.
> clocks = <&syscon_apmu CLK_QSPI_BUS>,
> <&syscon_apmu CLK_QSPI>;
> clock-names = "qspi_en", "qspi";
[ ... ]
> @@ -1328,6 +1338,7 @@ usb_dwc3: usb@c0a00000 {
> sdhci0: mmc@d4280000 {
> compatible = "spacemit,k1-sdhci";
> reg = <0x0 0xd4280000 0x0 0x200>;
> + bootph-pre-ram;
[Severity: Low]
Could this global bootph-pre-ram tag force the SD card controller driver into
the SPL even for boards that do not use it as their early boot medium?
> clocks = <&syscon_apmu CLK_SDH_AXI>,
> <&syscon_apmu CLK_SDH0>;
> clock-names = "core", "io";
> @@ -1341,6 +1352,7 @@ sdhci0: mmc@d4280000 {
> emmc: mmc@d4281000 {
> compatible = "spacemit,k1-sdhci";
> reg = <0x0 0xd4281000 0x0 0x200>;
> + bootph-pre-ram;
[Severity: Low]
Does adding this tag to the eMMC controller in the SoC dtsi cause the same
issue of forcing unnecessary drivers into the SPL for boards that boot from
other media?
> clocks = <&syscon_apmu CLK_SDH_AXI>,
> <&syscon_apmu CLK_SDH2>;
> clock-names = "core", "io";
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261012235624.77993-1-alan.tseng.cs@gmail.com?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
2026-10-12 23:56 ` Hung-Chun Tseng
(?)
@ 2026-10-13 0:08 ` sashiko-bot
-1 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-10-13 0:08 UTC (permalink / raw)
To: Hung-Chun Tseng; +Cc: robh, devicetree, conor+dt
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dts: missing bootph-pre-ram on pinctrl and regulator dependencies for SPL
--
commit 76ae02e32445137eb75156ac64fdd5ee85cb4ef0
Author: Hung-Chun Tseng <alan.tseng.cs@gmail.com>
riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram
This patch adds the bootph-pre-ram property to I2C buses, board EEPROMs, PMICs,
and QSPI flashes on various SpacemiT K1 boards. These additions enable
U-Boot's SPL to access the devices during the early boot phase before
DRAM training.
> diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> index 81c40df2a3663..6269d2ba78ed0 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
> @@ -93,6 +95,7 @@ serial-number {
> };
>
> &i2c8 {
> + bootph-pre-ram;
> pinctrl-names = "default";
> pinctrl-0 = <&i2c8_cfg>;
> status = "okay";
[Severity: Medium]
Will this I2C pinmux setup fail in the SPL?
The I2C bus is marked for SPL, but the pin configuration node i2c8_cfg in
k1-pinctrl.dtsi and the base pinctrl controller pinctrl@d401e000 in k1.dtsi
both lack the bootph-pre-ram property.
U-Boot's fdtgrep will strip these unmarked nodes from the SPL device tree,
which will prevent the I2C pins from being multiplexed correctly.
> @@ -100,6 +103,7 @@ &i2c8 {
> pmic@41 {
> compatible = "spacemit,p1";
> reg = <0x41>;
> + bootph-pre-ram;
> interrupts = <64>;
> vin1-supply = <®_vcc_4v>;
> vin2-supply = <®_vcc_4v>;
[Severity: Medium]
Will this PMIC probe fail in the SPL phase?
The PMIC relies on the reg_vcc_4v fixed regulator as its input supply, but
the reg_vcc_4v node was not marked with bootph-pre-ram.
Without this property, the fixed regulator will be excluded from the SPL
device tree, leading to dangling phandles and early boot probe failures for
the PMIC.
> diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> index 635e95aad14a5..406b7ca163db8 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
> +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts
[ ... ]
> @@ -386,6 +393,7 @@ &qspi {
> flash@0 {
> compatible = "jedec,spi-nor";
> reg = <0>;
> + bootph-pre-ram;
> spi-max-frequency = <26500000>;
> spi-rx-bus-width = <4>;
> spi-tx-bus-width = <4>;
[Severity: Medium]
Will this flash fail to operate during early boot?
The flash@0 node uses buck4_3v3 as its vcc-supply. While buck1 and buck3 were
marked with bootph-pre-ram in this patch, buck4_3v3 was omitted.
The missing property on buck4_3v3 will cause the supply node to be stripped
from the SPL device tree, breaking flash access before RAM is initialized.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261012235624.77993-1-alan.tseng.cs@gmail.com?part=2
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-13 0:08 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-12 23:56 [PATCH 0/2] riscv: dts: spacemit: mark K1 boot nodes bootph-pre-ram Hung-Chun Tseng
2026-10-12 23:56 ` Hung-Chun Tseng
2026-10-12 23:56 ` [PATCH 1/2] riscv: dts: spacemit: k1: mark boot-critical SoC " Hung-Chun Tseng
2026-10-12 23:56 ` Hung-Chun Tseng
2026-10-13 0:04 ` sashiko-bot
2026-10-12 23:56 ` [PATCH 2/2] riscv: dts: spacemit: mark K1 board boot devices bootph-pre-ram Hung-Chun Tseng
2026-10-12 23:56 ` Hung-Chun Tseng
2026-10-13 0:08 ` sashiko-bot
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.