* [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
@ 2026-05-16 8:00 Chukun Pan
2026-05-16 12:58 ` Yixun Lan
2026-05-16 13:03 ` Yixun Lan
0 siblings, 2 replies; 6+ messages in thread
From: Chukun Pan @ 2026-05-16 8:00 UTC (permalink / raw)
To: Yixun Lan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Krzysztof Kozlowski, linux-riscv, devicetree,
linux-kernel, spacemit, Chukun Pan
Enable the QSPI controller and the XM25QU128C SPI NOR flash on the
OrangePi RV2 board. Add a flash partition layout from vendor UBoot.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
.../boot/dts/spacemit/k1-orangepi-rv2.dts | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
index c95ca38e3d4a..3081065cec0e 100644
--- a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
@@ -288,6 +288,51 @@ &pcie2 {
status = "okay";
};
+&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 = <&buck3_1v8>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ bootinfo@0 {
+ reg = <0x00000 0x010000>;
+ };
+
+ private@10000 {
+ reg = <0x10000 0x010000>;
+ };
+
+ fsbl@20000 {
+ reg = <0x20000 0x040000>;
+ };
+
+ env@60000 {
+ reg = <0x60000 0x010000>;
+ };
+
+ opensbi@70000 {
+ reg = <0x70000 0x030000>;
+ };
+
+ uboot@a00000 {
+ reg = <0xa0000 0x760000>;
+ };
+ };
+ };
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_2_cfg>;
--
2.34.1
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
2026-05-16 8:00 [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2 Chukun Pan
@ 2026-05-16 12:58 ` Yixun Lan
2026-05-16 13:03 ` Yixun Lan
1 sibling, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2026-05-16 12:58 UTC (permalink / raw)
To: Chukun Pan
Cc: Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Krzysztof Kozlowski, linux-riscv, devicetree,
linux-kernel, spacemit
Hi Chukun,
On 16:00 Sat 16 May , Chukun Pan wrote:
> Enable the QSPI controller and the XM25QU128C SPI NOR flash on the
> OrangePi RV2 board. Add a flash partition layout from vendor UBoot.
>
> Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
LGTM
Reviewed-by: Yixun Lan <dlan@kernel.org>
> ---
> .../boot/dts/spacemit/k1-orangepi-rv2.dts | 45 +++++++++++++++++++
> 1 file changed, 45 insertions(+)
--
Yixun Lan (dlan)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
2026-05-16 8:00 [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2 Chukun Pan
2026-05-16 12:58 ` Yixun Lan
@ 2026-05-16 13:03 ` Yixun Lan
2026-05-17 7:00 ` Chukun Pan
1 sibling, 1 reply; 6+ messages in thread
From: Yixun Lan @ 2026-05-16 13:03 UTC (permalink / raw)
To: Chukun Pan
Cc: Yixun Lan, Rob Herring, Paul Walmsley, Alexandre Ghiti, Albert Ou,
Conor Dooley, Krzysztof Kozlowski, linux-riscv, devicetree,
linux-kernel, spacemit
On Sat, 16 May 2026 16:00:30 +0800, Chukun Pan wrote:
> Enable the QSPI controller and the XM25QU128C SPI NOR flash on the
> OrangePi RV2 board. Add a flash partition layout from vendor UBoot.
Applied, thanks!
[1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
https://github.com/spacemit-com/linux/commit/dd5c5b54c3be5a1422f05a23370779235043434d
Best regards,
--
Yixun Lan <dlan@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
2026-05-16 13:03 ` Yixun Lan
@ 2026-05-17 7:00 ` Chukun Pan
2026-05-17 7:38 ` Yixun Lan
0 siblings, 1 reply; 6+ messages in thread
From: Chukun Pan @ 2026-05-17 7:00 UTC (permalink / raw)
To: dlan
Cc: alex, amadeus, aou, conor+dt, devicetree, krzk+dt, linux-kernel,
linux-riscv, pjw, robh, spacemit
Hi,
> Applied, thanks!
Wow, you're so fast!
The robot report has one typo:
> + uboot@a00000 {
> + reg = <0xa0000 0x760000>;
> + };
This should be:
```
uboot@a0000 {
```
Could you fix it? Or I can send the v2 patch.
Thanks,
Chukun
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
2026-05-17 7:00 ` Chukun Pan
@ 2026-05-17 7:38 ` Yixun Lan
0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2026-05-17 7:38 UTC (permalink / raw)
To: Chukun Pan
Cc: alex, aou, conor+dt, devicetree, krzk+dt, linux-kernel,
linux-riscv, pjw, robh, spacemit
Hi Chukun,
On 15:00 Sun 17 May , Chukun Pan wrote:
> Hi,
>
> > Applied, thanks!
>
> Wow, you're so fast!
> The robot report has one typo:
>
> > + uboot@a00000 {
> > + reg = <0xa0000 0x760000>;
> > + };
>
> This should be:
> ```
> uboot@a0000 {
> ```
>
> Could you fix it? Or I can send the v2 patch.
>
Ok, I will fix it
--
Yixun Lan (dlan)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <e92fc4a6-7a63-4d24-9c13-8fec3d8184d3@online.fr>]
* Re: [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2
[not found] <e92fc4a6-7a63-4d24-9c13-8fec3d8184d3@online.fr>
@ 2026-05-17 10:40 ` Chukun Pan
0 siblings, 0 replies; 6+ messages in thread
From: Chukun Pan @ 2026-05-17 10:40 UTC (permalink / raw)
To: legoll
Cc: alex, amadeus, aou, conor+dt, devicetree, dlan, krzk+dt,
linux-kernel, linux-riscv, pjw, robh, spacemit
Hi,
> but cannot see anything relevant to SPI in dmesg, whereas I see [Q]SPI
> in u-boot output, but there it is listed as:
> [ 0.887] SF: Detected XM25QH128A with page size 256 Bytes, erase size
> 64 KiB, total 16 MiB
> Which is not the same you tested (XM25QU128C).
Please do not trust the flash name printed by vendor UBoot.
XM25QU128C is 0x204118, while XM25QH128A is 0x207018.
~ # cat /sys/kernel/debug/spi-nor/spi0.0/params
name spi-nor-generic
id 20 41 18 20 41 18
size 16.0 MiB
You can also check the silkscreen of the SPI NOR flash. By
the way, the IO voltages of these two flashes are different.
> How can I know this patch is working properly ?
[ 1.116594] 6 fixed-partitions partitions found on MTD device d420c000.spi
[ 1.116609] Creating 6 MTD partitions on "d420c000.spi":
[ 1.116615] 0x000000000000-0x000000010000 : "bootinfo"
[ 1.119280] 0x000000010000-0x000000020000 : "private"
[ 1.120718] 0x000000020000-0x000000060000 : "fsbl"
[ 1.122064] 0x000000060000-0x000000070000 : "env"
[ 1.126373] 0x000000070000-0x0000000a0000 : "opensbi"
[ 1.127679] 0x0000000a0000-0x000000800000 : "uboot"
These partitions can be tested using the mtd command.
Or simply view the contents of these partitions:
~ # hexdump -C /dev/mtd0
Thanks,
Chukun
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-17 10:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 8:00 [PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2 Chukun Pan
2026-05-16 12:58 ` Yixun Lan
2026-05-16 13:03 ` Yixun Lan
2026-05-17 7:00 ` Chukun Pan
2026-05-17 7:38 ` Yixun Lan
[not found] <e92fc4a6-7a63-4d24-9c13-8fec3d8184d3@online.fr>
2026-05-17 10:40 ` Chukun Pan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox