[PATCH 1/1] riscv: dts: spacemit: enable QSPI for OrangePi RV2

Chukun Pan amadeus at jmu.edu.cn
Sun May 17 03:40:40 PDT 2026


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



More information about the linux-riscv mailing list