* [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash
@ 2024-10-14 12:43 Stefan Kerkmann
2024-10-21 9:58 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kerkmann @ 2024-10-14 12:43 UTC (permalink / raw)
To: regressions
Cc: Dhruva Gole, Yoshitaka Ikeda, Mark Brown, linux-spi, linux-kernel,
kernel-team
Hello,
I have run into the same regression when probing a Micron MT25QL01 SPI-NOR flash
on a Intel CycloneV platform (socfpga) as Yoshitaka Ikeda[1]. The regression
manifests in read timeouts. Bisecting the issue tracked it down to commit
"d403fb6e76bf8 spi: cadence-quadspi: use STIG mode for small reads". Reverting
the commit resolves the issue on v6.12-rc3. There are no custom patches applied,
except for the debugging output mentioned in the linked thread.
The good case is as follows:
```
[ 1.063171] **********spi_mem_op dump**************
[ 1.063183] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 1.068093] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x9F
[ 1.073837] data: nbytes:0x6 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.079823] ***************************************
[ 1.086068] **********spi_mem_op dump**************
[ 1.090931] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
[ 1.095815] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.101543] data: nbytes:0x10 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.107547] ***************************************
[ 1.113835] **********spi_mem_op dump**************
[ 1.118695] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x10
[ 1.123573] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.129395] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.135392] ***************************************
[ 1.141592] **********spi_mem_op dump**************
[ 1.146471] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
[ 1.151335] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.157072] data: nbytes:0x88 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.163058] ***************************************
[ 1.169341] **********spi_mem_op dump**************
[ 1.174219] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x30
[ 1.179082] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.184904] data: nbytes:0x40 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.190890] ***************************************
[ 1.197183] **********spi_mem_op dump**************
[ 1.202045] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x80
[ 1.206925] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.212740] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.218736] ***************************************
[ 1.224916] **********spi_mem_op dump**************
[ 1.229776] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 1.234649] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x6
[ 1.240376] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
[ 1.246283] ***************************************
[ 1.252443] **********spi_mem_op dump**************
[ 1.257314] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 1.262176] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0xB7
[ 1.267917] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
[ 1.273914] ***************************************
[ 1.280074] **********spi_mem_op dump**************
[ 1.284946] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 1.289809] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x4
[ 1.295544] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
[ 1.301444] ***************************************
[ 1.307694] 5 fixed-partitions partitions found on MTD device ff705000.spi.0
[ 1.319593] Creating 5 MTD partitions on "ff705000.spi.0":
[ 1.325080] 0x000000000000-0x000000040000 : "preloader"
[ 1.331825] 0x000000040000-0x0000000c0000 : "bootloader"
[ 1.338645] 0x0000000c0000-0x0000000e0000 : "barebox-environment"
[ 1.346299] 0x0000000e0000-0x000000110000 : "state-storage"
[ 1.353319] 0x000000110000-0x000008000000 : "ubi"
```
With the STIG short read optimization enabled, the read timeouts occur:
```
[ 0.931469] **********spi_mem_op dump**************
[ 0.931482] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 0.936398] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x9F
[ 0.942129] data: nbytes:0x6 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 0.948132] ***************************************
[ 0.954369] **********spi_mem_op dump**************
[ 0.959233] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
[ 0.964117] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 0.969845] data: nbytes:0x10 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 0.975844] ***************************************
[ 1.482104] cadence-qspi ff705000.spi: Flash command execution timed out.
[ 1.493754] **********spi_mem_op dump**************
[ 1.493759] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x10
[ 1.498623] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
[ 1.504451] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
[ 1.510438] ***************************************
[ 1.516611] spi-nor spi0.0: operation failed with -110
[ 2.026639] cadence-qspi ff705000.spi: Flash command execution timed out.
[ 2.033430] **********spi_mem_op dump**************
[ 2.033437] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
[ 2.038300] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x6
[ 2.044041] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
[ 2.049942] ***************************************
[ 2.056112] spi-nor spi0.0: operation failed with -110
[ 2.066110] spi-nor spi0.0: probe with driver spi-nor failed with error -110
```
The DT node for the flash is as follows:
```
&qspi {
status = "okay";
flash0: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
/* Micron MT25QL01 */
compatible = "n25q00", "jedec,spi-nor";
reg = <0>; /* chip select */
spi-max-frequency = <100000000>;
m25p,fast-read;
cdns,page-size = <256>;
cdns,block-size = <16>; /* 2^16, 64KB */
cdns,read-delay = <4>; /* delay value in read data capture register */
cdns,tshsl-ns = <50>;
cdns,tsd2d-ns = <50>;
cdns,tchsh-ns = <4>;
cdns,tslch-ns = <4>;
};
};
```
Regards,
Stefan Kerkmann
[1]:
https://lore.kernel.org/lkml/OSZPR01MB70048CE259A3D63C4179199A8B659@OSZPR01MB7004.jpnprd01.prod.outlook.com/#t
#regzbot introduced: d403fb6e76bf854ef0f7d84e797e51b9494788e0
--
Pengutronix e.K. | Stefan Kerkmann |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-128 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash
2024-10-14 12:43 [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash Stefan Kerkmann
@ 2024-10-21 9:58 ` Linux regression tracking (Thorsten Leemhuis)
2024-10-22 16:39 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2024-10-21 9:58 UTC (permalink / raw)
To: Dhruva Gole
Cc: Yoshitaka Ikeda, Mark Brown, linux-spi, linux-kernel, kernel-team,
Stefan Kerkmann, regressions, Mark Brown
On 14.10.24 14:43, Stefan Kerkmann wrote:
>
> I have run into the same regression when probing a Micron MT25QL01 SPI-NOR flash
> on a Intel CycloneV platform (socfpga) as Yoshitaka Ikeda[1]. The regression
> manifests in read timeouts. Bisecting the issue tracked it down to commit
> "d403fb6e76bf8 spi: cadence-quadspi: use STIG mode for small reads".
Adding Dhruva Gole (author) and Mark Brown (committer) to the list of
recipients.
> Reverting
> the commit resolves the issue on v6.12-rc3. There are no custom patches applied,
> except for the debugging output mentioned in the linked thread.
The culprit afaics was merged for v6.3-rc1. Makes me wonder: would
reverting this now even an option to fix this in mainline, or would this
just lead to a regression for someone else?
Ciao, Thorsten
> The good case is as follows:
>
> ```
> [ 1.063171] **********spi_mem_op dump**************
> [ 1.063183] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 1.068093] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x9F
> [ 1.073837] data: nbytes:0x6 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.079823] ***************************************
> [ 1.086068] **********spi_mem_op dump**************
> [ 1.090931] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
> [ 1.095815] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.101543] data: nbytes:0x10 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.107547] ***************************************
> [ 1.113835] **********spi_mem_op dump**************
> [ 1.118695] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x10
> [ 1.123573] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.129395] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.135392] ***************************************
> [ 1.141592] **********spi_mem_op dump**************
> [ 1.146471] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
> [ 1.151335] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.157072] data: nbytes:0x88 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.163058] ***************************************
> [ 1.169341] **********spi_mem_op dump**************
> [ 1.174219] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x30
> [ 1.179082] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.184904] data: nbytes:0x40 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.190890] ***************************************
> [ 1.197183] **********spi_mem_op dump**************
> [ 1.202045] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x80
> [ 1.206925] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.212740] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.218736] ***************************************
> [ 1.224916] **********spi_mem_op dump**************
> [ 1.229776] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 1.234649] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x6
> [ 1.240376] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
> [ 1.246283] ***************************************
> [ 1.252443] **********spi_mem_op dump**************
> [ 1.257314] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 1.262176] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0xB7
> [ 1.267917] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
> [ 1.273914] ***************************************
> [ 1.280074] **********spi_mem_op dump**************
> [ 1.284946] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 1.289809] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x4
> [ 1.295544] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
> [ 1.301444] ***************************************
> [ 1.307694] 5 fixed-partitions partitions found on MTD device ff705000.spi.0
> [ 1.319593] Creating 5 MTD partitions on "ff705000.spi.0":
> [ 1.325080] 0x000000000000-0x000000040000 : "preloader"
> [ 1.331825] 0x000000040000-0x0000000c0000 : "bootloader"
> [ 1.338645] 0x0000000c0000-0x0000000e0000 : "barebox-environment"
> [ 1.346299] 0x0000000e0000-0x000000110000 : "state-storage"
> [ 1.353319] 0x000000110000-0x000008000000 : "ubi"
> ```
>
> With the STIG short read optimization enabled, the read timeouts occur:
>
> ```
> [ 0.931469] **********spi_mem_op dump**************
> [ 0.931482] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 0.936398] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x9F
> [ 0.942129] data: nbytes:0x6 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 0.948132] ***************************************
> [ 0.954369] **********spi_mem_op dump**************
> [ 0.959233] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x0
> [ 0.964117] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 0.969845] data: nbytes:0x10 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 0.975844] ***************************************
> [ 1.482104] cadence-qspi ff705000.spi: Flash command execution timed out.
> [ 1.493754] **********spi_mem_op dump**************
> [ 1.493759] addr: nbytes:0x3 , buswidth 0x1, dtr 0x0, val 0x10
> [ 1.498623] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x5A
> [ 1.504451] data: nbytes:0x8 , buswidth 0x1, dtr 0x0, data dir 0x1
> [ 1.510438] ***************************************
> [ 1.516611] spi-nor spi0.0: operation failed with -110
> [ 2.026639] cadence-qspi ff705000.spi: Flash command execution timed out.
> [ 2.033430] **********spi_mem_op dump**************
> [ 2.033437] addr: nbytes:0x0 , buswidth 0x0, dtr 0x0, val 0x0
> [ 2.038300] cmd: nbytes:0x1 , buswidth 0x1, dtr 0x0, opcode 0x6
> [ 2.044041] data: nbytes:0x0 , buswidth 0x0, dtr 0x0, data dir 0x0
> [ 2.049942] ***************************************
> [ 2.056112] spi-nor spi0.0: operation failed with -110
> [ 2.066110] spi-nor spi0.0: probe with driver spi-nor failed with error -110
> ```
>
> The DT node for the flash is as follows:
>
> ```
> &qspi {
> status = "okay";
>
> flash0: flash@0 {
> #address-cells = <1>;
> #size-cells = <1>;
> /* Micron MT25QL01 */
> compatible = "n25q00", "jedec,spi-nor";
> reg = <0>; /* chip select */
> spi-max-frequency = <100000000>;
> m25p,fast-read;
> cdns,page-size = <256>;
> cdns,block-size = <16>; /* 2^16, 64KB */
> cdns,read-delay = <4>; /* delay value in read data capture register */
> cdns,tshsl-ns = <50>;
> cdns,tsd2d-ns = <50>;
> cdns,tchsh-ns = <4>;
> cdns,tslch-ns = <4>;
> };
> };
> ```
>
> Regards,
> Stefan Kerkmann
>
> [1]:
> https://lore.kernel.org/lkml/OSZPR01MB70048CE259A3D63C4179199A8B659@OSZPR01MB7004.jpnprd01.prod.outlook.com/#t
>
> #regzbot introduced: d403fb6e76bf854ef0f7d84e797e51b9494788e0
>
#regzbot poke
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash
2024-10-21 9:58 ` Linux regression tracking (Thorsten Leemhuis)
@ 2024-10-22 16:39 ` Mark Brown
2024-10-24 7:12 ` Stefan Kerkmann
0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2024-10-22 16:39 UTC (permalink / raw)
To: Linux regressions mailing list
Cc: Dhruva Gole, Yoshitaka Ikeda, linux-spi, linux-kernel,
kernel-team, Stefan Kerkmann
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
On Mon, Oct 21, 2024 at 11:58:07AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> The culprit afaics was merged for v6.3-rc1. Makes me wonder: would
> reverting this now even an option to fix this in mainline, or would this
> just lead to a regression for someone else?
Given the description of the original commit I'd expect so. My guess
would be that this is either tuning of the lengths involved or a quirk
that's needed to disable STIG on some devices.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash
2024-10-22 16:39 ` Mark Brown
@ 2024-10-24 7:12 ` Stefan Kerkmann
2024-10-24 11:19 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kerkmann @ 2024-10-24 7:12 UTC (permalink / raw)
To: Mark Brown, Linux regressions mailing list
Cc: Dhruva Gole, Yoshitaka Ikeda, linux-spi, linux-kernel,
kernel-team
Hello,
On 22.10.24 18:39, Mark Brown wrote:
> On Mon, Oct 21, 2024 at 11:58:07AM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
>
>> The culprit afaics was merged for v6.3-rc1. Makes me wonder: would
>> reverting this now even an option to fix this in mainline, or would this
>> just lead to a regression for someone else?
>
> Given the description of the original commit I'd expect so. My guess
> would be that this is either tuning of the lengths involved or a quirk
> that's needed to disable STIG on some devices.
Adding a quirk came to my mind as well. I unfortunately do not have a different
QSPI chip to test against to see if it is a specific combination of peripheral
and chip or if using STIG is generally broken on the socfpga. With trying
different lenghts do you refeer to `CQSPI_STIG_DATA_LEN_MAX`?
Regards,
Stefan
--
Pengutronix e.K. | Stefan Kerkmann |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-128 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash
2024-10-24 7:12 ` Stefan Kerkmann
@ 2024-10-24 11:19 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2024-10-24 11:19 UTC (permalink / raw)
To: Stefan Kerkmann
Cc: Linux regressions mailing list, Dhruva Gole, Yoshitaka Ikeda,
linux-spi, linux-kernel, kernel-team
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On Thu, Oct 24, 2024 at 09:12:11AM +0200, Stefan Kerkmann wrote:
> On 22.10.24 18:39, Mark Brown wrote:
> > Given the description of the original commit I'd expect so. My guess
> > would be that this is either tuning of the lengths involved or a quirk
> > that's needed to disable STIG on some devices.
> Adding a quirk came to my mind as well. I unfortunately do not have a different
> QSPI chip to test against to see if it is a specific combination of peripheral
> and chip or if using STIG is generally broken on the socfpga. With trying
I guess if you do a very tightly defined quirk initially then it'll be
fixed for the systems we definitely know have problems and we can always
apply it to more systems later if we discover that it's a more
widespread issue.
> different lenghts do you refeer to `CQSPI_STIG_DATA_LEN_MAX`?
Yes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-24 11:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-14 12:43 [REGRESSION] spi: cadence-quadspi: STIG mode results in timeouts for Micron MT25QL01 flash Stefan Kerkmann
2024-10-21 9:58 ` Linux regression tracking (Thorsten Leemhuis)
2024-10-22 16:39 ` Mark Brown
2024-10-24 7:12 ` Stefan Kerkmann
2024-10-24 11:19 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).