Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits
@ 2026-09-30 18:22 Han Gao
  2026-09-30 18:22 ` [PATCH v2 1/4] spi: sg2044-nor: Return transfer errors Han Gao
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Han Gao @ 2026-09-30 18:22 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, Hangfan Li, linux-spi, linux-kernel, devicetree, sophgo,
	linux-riscv, Han Gao

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>
---
Changes in v2:
- Advertise the controller maximum speed and use the fastest divider when
  the optional maximum speed is omitted (Mark Brown).
- Rebase onto Linux v7.3-rc5.
- Link to v1: https://lore.kernel.org/r/20260917-fix-sg204xspi-v1-0-5c95dac429a8@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                       | 56 ++++++++++++++++++----
 5 files changed, 77 insertions(+), 13 deletions(-)
---
base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e
change-id: 20260917-fix-sg204xspi-dad286928b1c

Best regards,
-- 
Han Gao <gaohan@iscas.ac.cn>


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

end of thread, other threads:[~2026-10-09  9:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-30 18:22 [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Han Gao
2026-09-30 18:22 ` [PATCH v2 1/4] spi: sg2044-nor: Return transfer errors Han Gao
2026-09-30 18:22 ` [PATCH v2 2/4] spi: sg2044-nor: Honor SPI clock limits Han Gao
2026-09-30 18:34   ` sashiko-bot
2026-09-30 18:22 ` [PATCH v2 3/4] riscv: dts: sophgo: Enable SPI NOR on SRD3-10 Han Gao
2026-09-30 18:22 ` [PATCH v2 4/4] riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHz Han Gao
2026-10-01 16:01 ` (subset) [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Mark Brown
2026-10-06 15:26 ` Mark Brown
2026-10-09  9:47 ` Inochi Amaoto

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