* [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
` (5 more replies)
0 siblings, 6 replies; 8+ 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] 8+ messages in thread
* [PATCH v2 1/4] spi: sg2044-nor: Return transfer errors
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 ` Han Gao
2026-09-30 18:22 ` [PATCH v2 2/4] spi: sg2044-nor: Honor SPI clock limits Han Gao
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ 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 transfer helpers return errors, but both dispatchers discard them.
Return these errors to the SPI memory layer instead of reporting success.
Fixes: de16c322eefb ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
drivers/spi/spi-sg2044-nor.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
index f3bcb8a1b92bb1ceee298fa0b720f55f22cf20c3..ff026ca0f76635fee959d7502f457d43dbec0706 100644
--- a/drivers/spi/spi-sg2044-nor.c
+++ b/drivers/spi/spi-sg2044-nor.c
@@ -307,15 +307,15 @@ static ssize_t sg2044_spifmc_tran_cmd(struct sg2044_spifmc *spifmc,
return 0;
}
-static void sg2044_spifmc_trans(struct sg2044_spifmc *spifmc,
- const struct spi_mem_op *op)
+static int sg2044_spifmc_trans(struct sg2044_spifmc *spifmc,
+ const struct spi_mem_op *op)
{
if (op->data.dir == SPI_MEM_DATA_IN)
- sg2044_spifmc_read(spifmc, op);
+ return sg2044_spifmc_read(spifmc, op);
else if (op->data.dir == SPI_MEM_DATA_OUT)
- sg2044_spifmc_write(spifmc, op);
+ return sg2044_spifmc_write(spifmc, op);
else
- sg2044_spifmc_tran_cmd(spifmc, op);
+ return sg2044_spifmc_tran_cmd(spifmc, op);
}
static ssize_t sg2044_spifmc_trans_reg(struct sg2044_spifmc *spifmc,
@@ -389,19 +389,20 @@ static int sg2044_spifmc_exec_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{
struct sg2044_spifmc *spifmc;
+ int ret;
spifmc = spi_controller_get_devdata(mem->spi->controller);
mutex_lock(&spifmc->lock);
if (op->addr.nbytes == 0)
- sg2044_spifmc_trans_reg(spifmc, op);
+ ret = sg2044_spifmc_trans_reg(spifmc, op);
else
- sg2044_spifmc_trans(spifmc, op);
+ ret = sg2044_spifmc_trans(spifmc, op);
mutex_unlock(&spifmc->lock);
- return 0;
+ return ret;
}
static const struct spi_controller_mem_ops sg2044_spifmc_mem_ops = {
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/4] spi: sg2044-nor: Honor SPI clock limits
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 ` 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
` (3 subsequent siblings)
5 siblings, 1 reply; 8+ 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 fixed divider ignores device and operation clock limits. Calculate
the divider before each transfer so SCK does not exceed either limit.
Advertise the controller maximum speed so the SPI core supplies a default
when the device omits its maximum speed. Use the fastest divider when no
speed limit is supplied.
Fixes: de16c322eefb ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
drivers/spi/spi-sg2044-nor.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
index ff026ca0f76635fee959d7502f457d43dbec0706..bc9a8ee9bce448ccb2cad63f83ce54e30cbb0ea8 100644
--- a/drivers/spi/spi-sg2044-nor.c
+++ b/drivers/spi/spi-sg2044-nor.c
@@ -385,6 +385,29 @@ static ssize_t sg2044_spifmc_trans_reg(struct sg2044_spifmc *spifmc,
return 0;
}
+static int sg2044_spifmc_set_speed(struct sg2044_spifmc *spifmc,
+ unsigned int speed_hz)
+{
+ unsigned long rate = clk_get_rate(spifmc->clk);
+ u64 div;
+ u32 reg;
+
+ if (!rate)
+ return -EINVAL;
+
+ /* SCK = HCLK / (2 * (SckDiv + 1)); round down the resulting SCK. */
+ div = speed_hz ? DIV_ROUND_UP_ULL(rate, 2ULL * speed_hz) : 1;
+ if (div > SPIFMC_CTRL_SCK_DIV_MASK + 1)
+ return -EINVAL;
+
+ reg = readl(spifmc->io_base + SPIFMC_CTRL);
+ reg &= ~SPIFMC_CTRL_SCK_DIV_MASK;
+ reg |= div - 1;
+ writel(reg, spifmc->io_base + SPIFMC_CTRL);
+
+ return 0;
+}
+
static int sg2044_spifmc_exec_op(struct spi_mem *mem,
const struct spi_mem_op *op)
{
@@ -395,11 +418,18 @@ static int sg2044_spifmc_exec_op(struct spi_mem *mem,
mutex_lock(&spifmc->lock);
+ ret = sg2044_spifmc_set_speed(spifmc, op->max_freq ?
+ min(op->max_freq, mem->spi->max_speed_hz) :
+ mem->spi->max_speed_hz);
+ if (ret)
+ goto out_unlock;
+
if (op->addr.nbytes == 0)
ret = sg2044_spifmc_trans_reg(spifmc, op);
else
ret = sg2044_spifmc_trans(spifmc, op);
+out_unlock:
mutex_unlock(&spifmc->lock);
return ret;
@@ -409,6 +439,10 @@ static const struct spi_controller_mem_ops sg2044_spifmc_mem_ops = {
.exec_op = sg2044_spifmc_exec_op,
};
+static const struct spi_controller_mem_caps sg2044_spifmc_mem_caps = {
+ .per_op_freq = true,
+};
+
static void sg2044_spifmc_init(struct sg2044_spifmc *spifmc)
{
u32 tran_csr;
@@ -448,6 +482,10 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
if (IS_ERR(spifmc->clk))
return dev_err_probe(dev, PTR_ERR(spifmc->clk), "Cannot get and enable AHB clock\n");
+ ctrl->max_speed_hz = clk_get_rate(spifmc->clk) / 2;
+ if (!ctrl->max_speed_hz)
+ return dev_err_probe(dev, -EINVAL, "Invalid AHB clock rate\n");
+
spifmc->dev = &pdev->dev;
spifmc->ctrl = ctrl;
@@ -459,6 +497,7 @@ static int sg2044_spifmc_probe(struct platform_device *pdev)
ctrl->bits_per_word_mask = SPI_BPW_MASK(8);
ctrl->auto_runtime_pm = false;
ctrl->mem_ops = &sg2044_spifmc_mem_ops;
+ ctrl->mem_caps = &sg2044_spifmc_mem_caps;
ctrl->mode_bits = SPI_RX_DUAL | SPI_TX_DUAL | SPI_RX_QUAD | SPI_TX_QUAD;
ret = devm_mutex_init(dev, &spifmc->lock);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 3/4] riscv: dts: sophgo: Enable SPI NOR on SRD3-10
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:22 ` Han Gao
2026-09-30 18:22 ` [PATCH v2 4/4] riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHz Han Gao
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ 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
From: Hangfan Li <lihangfan@iscas.ac.cn>
Enable both SPI NOR controllers at 12.5 MHz, matching EDK2.
Signed-off-by: Hangfan Li <lihangfan@iscas.ac.cn>
Co-developed-by: Han Gao <gaohan@iscas.ac.cn>
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
.../boot/dts/sophgo/sg2044-sophgo-srd3-10.dts | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-srd3-10.dts b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-srd3-10.dts
index fed3d9a384a00ccfc91dfa1531f799aa397a5dde..88ddc8e793f62b4119b2df92ba6357c8e6e75c46 100644
--- a/arch/riscv/boot/dts/sophgo/sg2044-sophgo-srd3-10.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2044-sophgo-srd3-10.dts
@@ -109,6 +109,30 @@ &sd {
status = "okay";
};
+&spifmc0 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <12500000>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <1>;
+ };
+};
+
+&spifmc1 {
+ status = "okay";
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <12500000>;
+ spi-tx-bus-width = <1>;
+ spi-rx-bus-width = <1>;
+ };
+};
+
&uart0 {
/* for firmware */
status = "reserved";
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 4/4] riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHz
2026-09-30 18:22 [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Han Gao
` (2 preceding siblings ...)
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 ` 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
5 siblings, 0 replies; 8+ 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
Use 12.5 MHz on the SG2042 EVBs and Milk-V Pioneer to match the vendor
kernel. The existing 50 MHz limit raises SCK once the driver starts
honoring spi-max-frequency.
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
---
arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts | 4 ++--
arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts | 2 +-
arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
index b116dfa904cd982dc41c8cffdc770d4d0f81e0a7..9f403e564694eae14913f6ab23080a6333df15ae 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-evb-v1.dts
@@ -256,7 +256,7 @@ &spifmc0 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <50000000>;
+ spi-max-frequency = <12500000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
@@ -268,7 +268,7 @@ &spifmc1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <50000000>;
+ spi-max-frequency = <12500000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts b/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
index b2ceae2d8829ec16c99c2ea2b040c433b819093e..d8c5814f22581076e6b5114f762d4fd090681b80 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-evb-v2.dts
@@ -244,7 +244,7 @@ &spifmc1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <50000000>;
+ spi-max-frequency = <12500000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
diff --git a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
index ecf8c1e290792c3a27651040eae3c603741cd0c7..4f39eb56b364894f17b97d482b6d9d867a32ad2e 100644
--- a/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
+++ b/arch/riscv/boot/dts/sophgo/sg2042-milkv-pioneer.dts
@@ -177,7 +177,7 @@ &spifmc0 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <50000000>;
+ spi-max-frequency = <12500000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
@@ -189,7 +189,7 @@ &spifmc1 {
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
- spi-max-frequency = <50000000>;
+ spi-max-frequency = <12500000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/4] spi: sg2044-nor: Honor SPI clock limits
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
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-09-30 18:34 UTC (permalink / raw)
To: Han Gao; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] spi: sg2044-nor: severe lock contention due to clk_get_rate() in fast path
--
commit d5eb2cd92142b8e5a4297344fc25807495e0c3fc
Author: Han Gao <gaohan@iscas.ac.cn>
spi: sg2044-nor: Honor SPI clock limits
This commit dynamically calculates the clock divider before each transfer to
ensure the SCK does not exceed device or operation limits. It also advertises
the controller maximum speed to the SPI core to supply a default when omitted.
> diff --git a/drivers/spi/spi-sg2044-nor.c b/drivers/spi/spi-sg2044-nor.c
> index ff026ca0f7663..bc9a8ee9bce44 100644
> --- a/drivers/spi/spi-sg2044-nor.c
> +++ b/drivers/spi/spi-sg2044-nor.c
[ ... ]
> @@ -385,6 +385,29 @@ static ssize_t sg2044_spifmc_trans_reg(struct sg2044_spifmc *spifmc,
> return 0;
> }
>
> +static int sg2044_spifmc_set_speed(struct sg2044_spifmc *spifmc,
> + unsigned int speed_hz)
> +{
> + unsigned long rate = clk_get_rate(spifmc->clk);
[Severity: High]
Does this introduce severe lock contention by acquiring the clock
framework's global mutex on every SPI transfer?
During every SPI memory operation, the fast path executes:
sg2044_spifmc_exec_op() -> sg2044_spifmc_set_speed() -> clk_get_rate()
Because clk_get_rate() takes a global mutex, doing this redundantly on
every transfer can drastically impact the performance of the system and
delay other subsystems interacting with clocks.
Could the clock rate be cached in the device struct during probe() instead
of being queried per-operation?
> + u64 div;
> + u32 reg;
> +
> + if (!rate)
> + return -EINVAL;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001-fix-sg204xspi-v2-0-014dbaf22b5e@iscas.ac.cn?part=2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits
2026-09-30 18:22 [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Han Gao
` (3 preceding siblings ...)
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 ` Mark Brown
2026-10-06 15:26 ` Mark Brown
5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-10-01 16:01 UTC (permalink / raw)
To: Longbin Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Han Gao
Cc: Han Gao, Hangfan Li, linux-spi, linux-kernel, devicetree, sophgo,
linux-riscv
On Thu, 01 Oct 2026 02:22:49 +0800, Han Gao wrote:
> spi: sophgo: Fix SPI NOR errors and clock limits
>
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/4] spi: sg2044-nor: Return transfer errors
https://git.kernel.org/broonie/spi/c/53cdc4266b93
[2/4] spi: sg2044-nor: Honor SPI clock limits
https://git.kernel.org/broonie/spi/c/ed400c241b3c
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits
2026-09-30 18:22 [PATCH v2 0/4] spi: sophgo: Fix SPI NOR errors and clock limits Han Gao
` (4 preceding siblings ...)
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
5 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2026-10-06 15:26 UTC (permalink / raw)
To: Longbin Li, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chen Wang, Inochi Amaoto, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Han Gao
Cc: Han Gao, Hangfan Li, linux-spi, linux-kernel, devicetree, sophgo,
linux-riscv
On Thu, 01 Oct 2026 02:22:49 +0800, Han Gao wrote:
> spi: sophgo: Fix SPI NOR errors and clock limits
>
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.3
Thanks!
[1/4] spi: sg2044-nor: Return transfer errors
https://git.kernel.org/broonie/spi/c/e130c54fbb60
[2/4] spi: sg2044-nor: Honor SPI clock limits
https://git.kernel.org/broonie/spi/c/61d44a2c07b2
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-10-07 10:24 UTC | newest]
Thread overview: 8+ 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox