[PATCH 0/4] spi: sophgo: Fix SPI NOR errors and clock limits
From: Han Gao
Date: Thu Sep 17 2026 - 10:57:55 EST
The SG204x SPI NOR driver ignores transfer errors and clock limits.
Fix both, enable SPI NOR on SRD3-10, and use 12.5 MHz on SRD3-10 and
SG2042 to match EDK2 and the vendor kernel, respectively.
Tested on SRD3-12 at 12.5 MHz: both flashes identify correctly, SFDP
reads succeed, and two full 64 MiB reads per flash match.
The SRD3-10 patch supersedes the earlier submission [1]. Please disregard
that version, which used a 133 MHz flash clock limit.
[1] https://lore.kernel.org/all/20260902-sg2044-dts-v1-1-aa1fd1a4ec0d@xxxxxxxxxxx/
Signed-off-by: Han Gao <gaohan@xxxxxxxxxxx>
---
Han Gao (3):
spi: sg2044-nor: Return transfer errors
spi: sg2044-nor: Honor SPI clock limits
riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHz
Hangfan Li (1):
riscv: dts: sophgo: Enable SPI NOR on SRD3-10
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 4 +-
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 2 +-
.../riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 4 +-
.../boot/dts/sophgo/sg2044-sophgo-srd3-10.dts | 24 ++++++++++
drivers/spi/spi-sg2044-nor.c | 52 ++++++++++++++++++----
5 files changed, 73 insertions(+), 13 deletions(-)
---
base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
change-id: 20260917-fix-sg204xspi-dad286928b1c
Best regards,
--
Han Gao <gaohan@xxxxxxxxxxx>