Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/4] spi: sophgo: Fix SPI NOR errors and clock limits
@ 2026-09-17 14:29 Han Gao
  2026-09-17 14:29 ` [PATCH 1/4] spi: sg2044-nor: Return transfer errors Han Gao
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Han Gao @ 2026-09-17 14:29 UTC (permalink / raw)
  To: Mark Brown, Longbin Li, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti
  Cc: Han Gao, linux-spi, linux-kernel, devicetree, sophgo, linux-riscv,
	Han Gao, Hangfan Li

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@iscas.ac.cn/

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
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@iscas.ac.cn>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-17 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 14:29 [PATCH 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Han Gao
2026-09-17 14:29 ` [PATCH 1/4] spi: sg2044-nor: Return transfer errors Han Gao
2026-09-17 14:29 ` [PATCH 2/4] spi: sg2044-nor: Honor SPI clock limits Han Gao
2026-09-17 14:39   ` sashiko-bot
2026-09-17 20:38   ` Mark Brown
2026-09-17 14:29 ` [PATCH 3/4] riscv: dts: sophgo: Enable SPI NOR on SRD3-10 Han Gao
2026-09-17 14:29 ` [PATCH 4/4] riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHz Han Gao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox