* [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 17:44 ` Conor Dooley
2025-10-20 16:51 ` [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
` (6 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie
Cc: dlan, guodong, devicetree, linux-spi, imx, spacemit, linux-riscv,
linux-kernel
Allow two resets to be optionally included for the Freescale QSPI driver.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
index f2dd20370dbb3..0315a13fe319a 100644
--- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
+++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
@@ -54,6 +54,11 @@ properties:
- const: qspi_en
- const: qspi
+ resets:
+ items:
+ - description: SoC QSPI reset
+ - description: SoC QSPI bus reset
+
required:
- compatible
- reg
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets
2025-10-20 16:51 ` [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
@ 2025-10-20 17:44 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
0 siblings, 1 reply; 28+ messages in thread
From: Conor Dooley @ 2025-10-20 17:44 UTC (permalink / raw)
To: Alex Elder
Cc: robh, krzk+dt, conor+dt, han.xu, broonie, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
On Mon, Oct 20, 2025 at 11:51:44AM -0500, Alex Elder wrote:
> Allow two resets to be optionally included for the Freescale QSPI driver.
This is a binding, please don't mention the driver here.
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> index f2dd20370dbb3..0315a13fe319a 100644
> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> @@ -54,6 +54,11 @@ properties:
> - const: qspi_en
> - const: qspi
>
> + resets:
> + items:
> + - description: SoC QSPI reset
> + - description: SoC QSPI bus reset
If none of the fsl devices have resets, this should be added alongside
the new spacemit compatible and not permitted for the other compatibles.
> +
> required:
> - compatible
> - reg
> --
> 2.48.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets
2025-10-20 17:44 ` Conor Dooley
@ 2025-10-20 18:06 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-20 18:06 UTC (permalink / raw)
To: Conor Dooley
Cc: robh, krzk+dt, conor+dt, han.xu, broonie, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
On 10/20/25 12:44 PM, Conor Dooley wrote:
> On Mon, Oct 20, 2025 at 11:51:44AM -0500, Alex Elder wrote:
>> Allow two resets to be optionally included for the Freescale QSPI driver.
>
> This is a binding, please don't mention the driver here.
OK, I will reword it in v2.
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> index f2dd20370dbb3..0315a13fe319a 100644
>> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> @@ -54,6 +54,11 @@ properties:
>> - const: qspi_en
>> - const: qspi
>>
>> + resets:
>> + items:
>> + - description: SoC QSPI reset
>> + - description: SoC QSPI bus reset
>
> If none of the fsl devices have resets, this should be added alongside
> the new spacemit compatible and not permitted for the other compatibles.
I thought that, being optional, this kind of constraint wasn't
strictly necessary.
Anyway, I'll find out first whether the resets are even required,
and if they are I'll rework this the way you suggest.
Thank you for your very quick review.
-Alex
>> +
>> required:
>> - compatible
>> - reg
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-20 16:51 ` [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 17:39 ` Conor Dooley
2025-10-20 17:41 ` Conor Dooley
2025-10-20 16:51 ` [PATCH 3/8] spi: fsl-qspi: add optional reset support Alex Elder
` (5 subsequent siblings)
7 siblings, 2 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: han.xu, broonie, robh, krzk+dt, conor+dt
Cc: dlan, guodong, devicetree, linux-spi, imx, spacemit, linux-riscv,
linux-kernel
Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
index 0315a13fe319a..5bbda4bc33350 100644
--- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
+++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
@@ -22,6 +22,7 @@ properties:
- fsl,imx6ul-qspi
- fsl,ls1021a-qspi
- fsl,ls2080a-qspi
+ - spacemit,k1-qspi
- items:
- enum:
- fsl,ls1043a-qspi
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 16:51 ` [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
@ 2025-10-20 17:39 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
2025-10-20 17:41 ` Conor Dooley
1 sibling, 1 reply; 28+ messages in thread
From: Conor Dooley @ 2025-10-20 17:39 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
On Mon, Oct 20, 2025 at 11:51:45AM -0500, Alex Elder wrote:
> Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> index 0315a13fe319a..5bbda4bc33350 100644
> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> @@ -22,6 +22,7 @@ properties:
> - fsl,imx6ul-qspi
> - fsl,ls1021a-qspi
> - fsl,ls2080a-qspi
> + - spacemit,k1-qspi
Are the newly added resets mandatory for the spacemit platform?
> - items:
> - enum:
> - fsl,ls1043a-qspi
> --
> 2.48.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 17:39 ` Conor Dooley
@ 2025-10-20 18:06 ` Alex Elder
2025-10-20 18:26 ` Mark Brown
0 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 18:06 UTC (permalink / raw)
To: Conor Dooley
Cc: han.xu, broonie, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
On 10/20/25 12:39 PM, Conor Dooley wrote:
> On Mon, Oct 20, 2025 at 11:51:45AM -0500, Alex Elder wrote:
>> Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> index 0315a13fe319a..5bbda4bc33350 100644
>> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> @@ -22,6 +22,7 @@ properties:
>> - fsl,imx6ul-qspi
>> - fsl,ls1021a-qspi
>> - fsl,ls2080a-qspi
>> + - spacemit,k1-qspi
>
> Are the newly added resets mandatory for the spacemit platform?
This is interesting. I never even tried it without specifying them.
I just tried it, and at least on my system QSPI functioned without
defining these resets. I will ask SpacemiT about this. If they are
not needed I will omit the first patch (which added optional resets),
and won't use them.
Thanks for pointing this out.
-Alex
>
>> - items:
>> - enum:
>> - fsl,ls1043a-qspi
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 18:06 ` Alex Elder
@ 2025-10-20 18:26 ` Mark Brown
2025-10-20 18:37 ` Alex Elder
2025-10-20 18:39 ` Conor Dooley
0 siblings, 2 replies; 28+ messages in thread
From: Mark Brown @ 2025-10-20 18:26 UTC (permalink / raw)
To: Alex Elder
Cc: Conor Dooley, han.xu, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
On Mon, Oct 20, 2025 at 01:06:46PM -0500, Alex Elder wrote:
> On 10/20/25 12:39 PM, Conor Dooley wrote:
> > > + - spacemit,k1-qspi
> > Are the newly added resets mandatory for the spacemit platform?
> This is interesting. I never even tried it without specifying them.
> I just tried it, and at least on my system QSPI functioned without
> defining these resets. I will ask SpacemiT about this. If they are
> not needed I will omit the first patch (which added optional resets),
> and won't use them.
It might be safer to describe them, otherwise things are vulnerable to
issues like the bootloader not leaving things in a predictable state.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 18:26 ` Mark Brown
@ 2025-10-20 18:37 ` Alex Elder
2025-10-20 18:39 ` Conor Dooley
1 sibling, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-20 18:37 UTC (permalink / raw)
To: Mark Brown
Cc: Conor Dooley, han.xu, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
On 10/20/25 1:26 PM, Mark Brown wrote:
> On Mon, Oct 20, 2025 at 01:06:46PM -0500, Alex Elder wrote:
>> On 10/20/25 12:39 PM, Conor Dooley wrote:
>
>>>> + - spacemit,k1-qspi
>
>>> Are the newly added resets mandatory for the spacemit platform?
>
>> This is interesting. I never even tried it without specifying them.
>
>> I just tried it, and at least on my system QSPI functioned without
>> defining these resets. I will ask SpacemiT about this. If they are
>> not needed I will omit the first patch (which added optional resets),
>> and won't use them.
>
> It might be safer to describe them, otherwise things are vulnerable to
> issues like the bootloader not leaving things in a predictable state.
I mentioned exactly this in my message to SpacemiT just now.
And yes, regardless of their answer, you're probably right.
It is *possible* that these resets must be de-asserted, so
it's safest to describe them.
Conor please if you disagree with this, please say so.
Otherwise I think I'll keep them in the next version
Thanks.
-Alex
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 18:26 ` Mark Brown
2025-10-20 18:37 ` Alex Elder
@ 2025-10-20 18:39 ` Conor Dooley
2025-10-22 4:34 ` Alex Elder
1 sibling, 1 reply; 28+ messages in thread
From: Conor Dooley @ 2025-10-20 18:39 UTC (permalink / raw)
To: Mark Brown
Cc: Alex Elder, han.xu, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
On Mon, Oct 20, 2025 at 07:26:17PM +0100, Mark Brown wrote:
> On Mon, Oct 20, 2025 at 01:06:46PM -0500, Alex Elder wrote:
> > On 10/20/25 12:39 PM, Conor Dooley wrote:
>
> > > > + - spacemit,k1-qspi
>
> > > Are the newly added resets mandatory for the spacemit platform?
>
> > This is interesting. I never even tried it without specifying them.
>
> > I just tried it, and at least on my system QSPI functioned without
> > defining these resets. I will ask SpacemiT about this. If they are
> > not needed I will omit the first patch (which added optional resets),
> > and won't use them.
>
> It might be safer to describe them, otherwise things are vulnerable to
> issues like the bootloader not leaving things in a predictable state.
Yeah, if a linux driver requires that a bootloader set up a clock or
de-assert a reset etc, then the binding should mark them required since,
as you say, a bootloader change might do away with that de-assertion.
Additionally, the stage doing that de-assertion etc could be U-Boot
or barebox, which import devicetrees from Linux, so making sure that
the resets are present has that benefit too.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 18:39 ` Conor Dooley
@ 2025-10-22 4:34 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-22 4:34 UTC (permalink / raw)
To: Conor Dooley, Mark Brown
Cc: han.xu, robh, krzk+dt, conor+dt, dlan, guodong, devicetree,
linux-spi, imx, spacemit, linux-riscv, linux-kernel
On 10/20/25 1:39 PM, Conor Dooley wrote:
> On Mon, Oct 20, 2025 at 07:26:17PM +0100, Mark Brown wrote:
>> On Mon, Oct 20, 2025 at 01:06:46PM -0500, Alex Elder wrote:
>>> On 10/20/25 12:39 PM, Conor Dooley wrote:
>>
>>>>> + - spacemit,k1-qspi
>>
>>>> Are the newly added resets mandatory for the spacemit platform?
>>
>>> This is interesting. I never even tried it without specifying them.
>>
>>> I just tried it, and at least on my system QSPI functioned without
>>> defining these resets. I will ask SpacemiT about this. If they are
>>> not needed I will omit the first patch (which added optional resets),
>>> and won't use them.
>>
>> It might be safer to describe them, otherwise things are vulnerable to
>> issues like the bootloader not leaving things in a predictable state.
>
> Yeah, if a linux driver requires that a bootloader set up a clock or
> de-assert a reset etc, then the binding should mark them required since,
> as you say, a bootloader change might do away with that de-assertion.
> Additionally, the stage doing that de-assertion etc could be U-Boot
> or barebox, which import devicetrees from Linux, so making sure that
> the resets are present has that benefit too.
OK, so the resets property (added in patch 1) will stay. It will
be defined such that it is an optional property, and only when the
compatible string includes "spacemit,k1-qspi".
-Alex
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 16:51 ` [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
2025-10-20 17:39 ` Conor Dooley
@ 2025-10-20 17:41 ` Conor Dooley
2025-10-20 18:06 ` Alex Elder
1 sibling, 1 reply; 28+ messages in thread
From: Conor Dooley @ 2025-10-20 17:41 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]
On Mon, Oct 20, 2025 at 11:51:45AM -0500, Alex Elder wrote:
> Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
Also, you should really explain why this spacemit device is the first
one to be in what's been an fsl-specific binding for now in the commit
message.
pw-bot: changes-requested
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> index 0315a13fe319a..5bbda4bc33350 100644
> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> @@ -22,6 +22,7 @@ properties:
> - fsl,imx6ul-qspi
> - fsl,ls1021a-qspi
> - fsl,ls2080a-qspi
> + - spacemit,k1-qspi
> - items:
> - enum:
> - fsl,ls1043a-qspi
> --
> 2.48.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 17:41 ` Conor Dooley
@ 2025-10-20 18:06 ` Alex Elder
2025-10-20 18:41 ` Conor Dooley
0 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 18:06 UTC (permalink / raw)
To: Conor Dooley
Cc: han.xu, broonie, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
On 10/20/25 12:41 PM, Conor Dooley wrote:
> On Mon, Oct 20, 2025 at 11:51:45AM -0500, Alex Elder wrote:
>> Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
>
> Also, you should really explain why this spacemit device is the first
> one to be in what's been an fsl-specific binding for now in the commit
> message.
I'm not sure how much of an explanation you're looking for, but
yes, I agree with you, it stands out that it's the first one, so
I at least should have acknowledged that. I'll add something
here in the next version.
-Alex
> pw-bot: changes-requested
>
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> index 0315a13fe319a..5bbda4bc33350 100644
>> --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
>> @@ -22,6 +22,7 @@ properties:
>> - fsl,imx6ul-qspi
>> - fsl,ls1021a-qspi
>> - fsl,ls2080a-qspi
>> + - spacemit,k1-qspi
>> - items:
>> - enum:
>> - fsl,ls1043a-qspi
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-20 18:06 ` Alex Elder
@ 2025-10-20 18:41 ` Conor Dooley
0 siblings, 0 replies; 28+ messages in thread
From: Conor Dooley @ 2025-10-20 18:41 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, robh, krzk+dt, conor+dt, dlan, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1819 bytes --]
On Mon, Oct 20, 2025 at 01:06:50PM -0500, Alex Elder wrote:
> On 10/20/25 12:41 PM, Conor Dooley wrote:
> > On Mon, Oct 20, 2025 at 11:51:45AM -0500, Alex Elder wrote:
> > > Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware.
> >
> > Also, you should really explain why this spacemit device is the first
> > one to be in what's been an fsl-specific binding for now in the commit
> > message.
>
> I'm not sure how much of an explanation you're looking for, but
> yes, I agree with you, it stands out that it's the first one, so
> I at least should have acknowledged that. I'll add something
> here in the next version.
Even just mentioning that the register interface etc is nigh identical.
Otherwise this just looks like picking a random file to put the
compatible in. Remember, this is independent from the driver change and
must be justified in its own commit message.
>
> -Alex
>
> > pw-bot: changes-requested
> >
> > >
> > > Signed-off-by: Alex Elder <elder@riscstar.com>
> > > ---
> > > Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> > > index 0315a13fe319a..5bbda4bc33350 100644
> > > --- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> > > +++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
> > > @@ -22,6 +22,7 @@ properties:
> > > - fsl,imx6ul-qspi
> > > - fsl,ls1021a-qspi
> > > - fsl,ls2080a-qspi
> > > + - spacemit,k1-qspi
> > > - items:
> > > - enum:
> > > - fsl,ls1043a-qspi
> > > --
> > > 2.48.1
> > >
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 3/8] spi: fsl-qspi: add optional reset support
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-20 16:51 ` [PATCH 1/8] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
2025-10-20 16:51 ` [PATCH 2/8] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 19:07 ` Frank Li
2025-10-20 16:51 ` [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk Alex Elder
` (4 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: han.xu, broonie, p.zabel
Cc: dlan, guodong, linux-spi, imx, spacemit, linux-riscv,
linux-kernel
Add support for one or more optional exclusive resets. These
simply need to be deasserted at probe time, and can remain that
way for the life of the device.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
drivers/spi/spi-fsl-qspi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index c887abb028d77..1e27647dd2a09 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -36,6 +36,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_qos.h>
+#include <linux/reset.h>
#include <linux/sizes.h>
#include <linux/spi/spi.h>
@@ -267,6 +268,7 @@ struct fsl_qspi {
const struct fsl_qspi_devtype_data *devtype_data;
struct mutex lock;
struct completion c;
+ struct reset_control *resets;
struct clk *clk, *clk_en;
struct pm_qos_request pm_qos_req;
struct device *dev;
@@ -857,6 +859,8 @@ static void fsl_qspi_cleanup(void *data)
{
struct fsl_qspi *q = data;
+ reset_control_assert(q->resets);
+
fsl_qspi_clk_disable_unprep(q);
mutex_destroy(&q->lock);
@@ -902,6 +906,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
if (!q->ahb_addr)
return -ENOMEM;
+ q->resets = devm_reset_control_array_get_optional_exclusive(dev);
+ if (IS_ERR(q->resets))
+ return PTR_ERR(q->resets);
+
/* find the clocks */
q->clk_en = devm_clk_get(dev, "qspi_en");
if (IS_ERR(q->clk_en))
@@ -923,6 +931,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
if (ret)
return ret;
+ ret = reset_control_deassert(q->resets);
+ if (ret)
+ return ret;
+
/* find the irq */
ret = platform_get_irq(pdev, 0);
if (ret < 0)
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 3/8] spi: fsl-qspi: add optional reset support
2025-10-20 16:51 ` [PATCH 3/8] spi: fsl-qspi: add optional reset support Alex Elder
@ 2025-10-20 19:07 ` Frank Li
2025-10-22 4:34 ` Alex Elder
0 siblings, 1 reply; 28+ messages in thread
From: Frank Li @ 2025-10-20 19:07 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, p.zabel, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On Mon, Oct 20, 2025 at 11:51:46AM -0500, Alex Elder wrote:
> Add support for one or more optional exclusive resets. These
> simply need to be deasserted at probe time, and can remain that
> way for the life of the device.
Nit: please wrap at 75 chars
Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> drivers/spi/spi-fsl-qspi.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
> index c887abb028d77..1e27647dd2a09 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -36,6 +36,7 @@
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/pm_qos.h>
> +#include <linux/reset.h>
> #include <linux/sizes.h>
>
> #include <linux/spi/spi.h>
> @@ -267,6 +268,7 @@ struct fsl_qspi {
> const struct fsl_qspi_devtype_data *devtype_data;
> struct mutex lock;
> struct completion c;
> + struct reset_control *resets;
> struct clk *clk, *clk_en;
> struct pm_qos_request pm_qos_req;
> struct device *dev;
> @@ -857,6 +859,8 @@ static void fsl_qspi_cleanup(void *data)
> {
> struct fsl_qspi *q = data;
>
> + reset_control_assert(q->resets);
> +
> fsl_qspi_clk_disable_unprep(q);
>
> mutex_destroy(&q->lock);
> @@ -902,6 +906,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
> if (!q->ahb_addr)
> return -ENOMEM;
>
> + q->resets = devm_reset_control_array_get_optional_exclusive(dev);
> + if (IS_ERR(q->resets))
> + return PTR_ERR(q->resets);
> +
> /* find the clocks */
> q->clk_en = devm_clk_get(dev, "qspi_en");
> if (IS_ERR(q->clk_en))
> @@ -923,6 +931,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> + ret = reset_control_deassert(q->resets);
> + if (ret)
> + return ret;
> +
> /* find the irq */
> ret = platform_get_irq(pdev, 0);
> if (ret < 0)
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 3/8] spi: fsl-qspi: add optional reset support
2025-10-20 19:07 ` Frank Li
@ 2025-10-22 4:34 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-22 4:34 UTC (permalink / raw)
To: Frank Li
Cc: han.xu, broonie, p.zabel, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On 10/20/25 2:07 PM, Frank Li wrote:
> On Mon, Oct 20, 2025 at 11:51:46AM -0500, Alex Elder wrote:
>> Add support for one or more optional exclusive resets. These
>> simply need to be deasserted at probe time, and can remain that
>> way for the life of the device.
>
> Nit: please wrap at 75 chars
You're saying wrap at *longer* lengths, right? If not, please
clarify. I'll update in v2.
Thanks for the review.
-Alex
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
>
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> drivers/spi/spi-fsl-qspi.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
>> index c887abb028d77..1e27647dd2a09 100644
>> --- a/drivers/spi/spi-fsl-qspi.c
>> +++ b/drivers/spi/spi-fsl-qspi.c
>> @@ -36,6 +36,7 @@
>> #include <linux/of.h>
>> #include <linux/platform_device.h>
>> #include <linux/pm_qos.h>
>> +#include <linux/reset.h>
>> #include <linux/sizes.h>
>>
>> #include <linux/spi/spi.h>
>> @@ -267,6 +268,7 @@ struct fsl_qspi {
>> const struct fsl_qspi_devtype_data *devtype_data;
>> struct mutex lock;
>> struct completion c;
>> + struct reset_control *resets;
>> struct clk *clk, *clk_en;
>> struct pm_qos_request pm_qos_req;
>> struct device *dev;
>> @@ -857,6 +859,8 @@ static void fsl_qspi_cleanup(void *data)
>> {
>> struct fsl_qspi *q = data;
>>
>> + reset_control_assert(q->resets);
>> +
>> fsl_qspi_clk_disable_unprep(q);
>>
>> mutex_destroy(&q->lock);
>> @@ -902,6 +906,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>> if (!q->ahb_addr)
>> return -ENOMEM;
>>
>> + q->resets = devm_reset_control_array_get_optional_exclusive(dev);
>> + if (IS_ERR(q->resets))
>> + return PTR_ERR(q->resets);
>> +
>> /* find the clocks */
>> q->clk_en = devm_clk_get(dev, "qspi_en");
>> if (IS_ERR(q->clk_en))
>> @@ -923,6 +931,10 @@ static int fsl_qspi_probe(struct platform_device *pdev)
>> if (ret)
>> return ret;
>>
>> + ret = reset_control_deassert(q->resets);
>> + if (ret)
>> + return ret;
>> +
>> /* find the irq */
>> ret = platform_get_irq(pdev, 0);
>> if (ret < 0)
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (2 preceding siblings ...)
2025-10-20 16:51 ` [PATCH 3/8] spi: fsl-qspi: add optional reset support Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 19:13 ` Frank Li
2025-10-20 16:51 ` [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip Alex Elder
` (3 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: han.xu, broonie
Cc: dlan, guodong, linux-spi, imx, spacemit, linux-riscv,
linux-kernel
The SpacemiT K1 SoC QSPI implementation needs to avoid shutting
off the clock when changing its rate. Add a new quirk to indicate
the clock should not be disabled/enabled when changing its rate
for operations.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
drivers/spi/spi-fsl-qspi.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index 1e27647dd2a09..703a7df394c00 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -197,6 +197,11 @@
*/
#define QUADSPI_QUIRK_USE_TDH_SETTING BIT(5)
+/*
+ * Do not disable the "qspi" clock when changing its rate.
+ */
+#define QUADSPI_QUIRK_NO_CLK_DISABLE BIT(6)
+
struct fsl_qspi_devtype_data {
unsigned int rxfifo;
unsigned int txfifo;
@@ -306,6 +311,11 @@ static inline int needs_tdh_setting(struct fsl_qspi *q)
return q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING;
}
+static inline int needs_clk_disable(struct fsl_qspi *q)
+{
+ return !(q->devtype_data->quirks & QUADSPI_QUIRK_NO_CLK_DISABLE);
+}
+
/*
* An IC bug makes it necessary to rearrange the 32-bit data.
* Later chips, such as IMX6SLX, have fixed this bug.
@@ -536,15 +546,18 @@ static void fsl_qspi_select_mem(struct fsl_qspi *q, struct spi_device *spi,
if (needs_4x_clock(q))
rate *= 4;
- fsl_qspi_clk_disable_unprep(q);
+ if (needs_clk_disable(q))
+ fsl_qspi_clk_disable_unprep(q);
ret = clk_set_rate(q->clk, rate);
if (ret)
return;
- ret = fsl_qspi_clk_prep_enable(q);
- if (ret)
- return;
+ if (needs_clk_disable(q)) {
+ ret = fsl_qspi_clk_prep_enable(q);
+ if (ret)
+ return;
+ }
q->selected = spi_get_chipselect(spi, 0);
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk
2025-10-20 16:51 ` [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk Alex Elder
@ 2025-10-20 19:13 ` Frank Li
2025-10-22 4:34 ` Alex Elder
0 siblings, 1 reply; 28+ messages in thread
From: Frank Li @ 2025-10-20 19:13 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On Mon, Oct 20, 2025 at 11:51:47AM -0500, Alex Elder wrote:
> The SpacemiT K1 SoC QSPI implementation needs to avoid shutting
> off the clock when changing its rate. Add a new quirk to indicate
> the clock should not be disabled/enabled when changing its rate
> for operations.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> drivers/spi/spi-fsl-qspi.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
> index 1e27647dd2a09..703a7df394c00 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -197,6 +197,11 @@
> */
> #define QUADSPI_QUIRK_USE_TDH_SETTING BIT(5)
>
> +/*
> + * Do not disable the "qspi" clock when changing its rate.
> + */
> +#define QUADSPI_QUIRK_NO_CLK_DISABLE BIT(6)
NO_CLK_DISALBE look likes not clk disable capability. Maybe
QUADSPI_QUIRK_SKIP_CLK_DISABLE
> +
> struct fsl_qspi_devtype_data {
> unsigned int rxfifo;
> unsigned int txfifo;
> @@ -306,6 +311,11 @@ static inline int needs_tdh_setting(struct fsl_qspi *q)
> return q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING;
> }
>
> +static inline int needs_clk_disable(struct fsl_qspi *q)
bool type?
Frank
> +{
> + return !(q->devtype_data->quirks & QUADSPI_QUIRK_NO_CLK_DISABLE);
> +}
> +
> /*
> * An IC bug makes it necessary to rearrange the 32-bit data.
> * Later chips, such as IMX6SLX, have fixed this bug.
> @@ -536,15 +546,18 @@ static void fsl_qspi_select_mem(struct fsl_qspi *q, struct spi_device *spi,
> if (needs_4x_clock(q))
> rate *= 4;
>
> - fsl_qspi_clk_disable_unprep(q);
> + if (needs_clk_disable(q))
> + fsl_qspi_clk_disable_unprep(q);
>
> ret = clk_set_rate(q->clk, rate);
> if (ret)
> return;
>
> - ret = fsl_qspi_clk_prep_enable(q);
> - if (ret)
> - return;
> + if (needs_clk_disable(q)) {
> + ret = fsl_qspi_clk_prep_enable(q);
> + if (ret)
> + return;
> + }
>
> q->selected = spi_get_chipselect(spi, 0);
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk
2025-10-20 19:13 ` Frank Li
@ 2025-10-22 4:34 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-22 4:34 UTC (permalink / raw)
To: Frank Li
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On 10/20/25 2:13 PM, Frank Li wrote:
> On Mon, Oct 20, 2025 at 11:51:47AM -0500, Alex Elder wrote:
>> The SpacemiT K1 SoC QSPI implementation needs to avoid shutting
>> off the clock when changing its rate. Add a new quirk to indicate
>> the clock should not be disabled/enabled when changing its rate
>> for operations.
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> drivers/spi/spi-fsl-qspi.c | 21 +++++++++++++++++----
>> 1 file changed, 17 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
>> index 1e27647dd2a09..703a7df394c00 100644
>> --- a/drivers/spi/spi-fsl-qspi.c
>> +++ b/drivers/spi/spi-fsl-qspi.c
>> @@ -197,6 +197,11 @@
>> */
>> #define QUADSPI_QUIRK_USE_TDH_SETTING BIT(5)
>>
>> +/*
>> + * Do not disable the "qspi" clock when changing its rate.
>> + */
>> +#define QUADSPI_QUIRK_NO_CLK_DISABLE BIT(6)
>
> NO_CLK_DISALBE look likes not clk disable capability. Maybe
>
> QUADSPI_QUIRK_SKIP_CLK_DISABLE
OK, that's better.
>
>> +
>> struct fsl_qspi_devtype_data {
>> unsigned int rxfifo;
>> unsigned int txfifo;
>> @@ -306,6 +311,11 @@ static inline int needs_tdh_setting(struct fsl_qspi *q)
>> return q->devtype_data->quirks & QUADSPI_QUIRK_USE_TDH_SETTING;
>> }
>>
>> +static inline int needs_clk_disable(struct fsl_qspi *q)
>
> bool type?
Yes I agree with this suggestion. However all of the other
needs_*() functions return int and are marked inline (neither
of which I would normally do).
You want me to add a patch to update the others too? If I
do that it will look more like this:
static bool needs_swap_endian(struct fsl_qspi *q)
{
return !!(q->devtype_data->quirks & QUADSPI_QUIRK_SWAP_ENDIAN);
}
-Alex
>
> Frank
>
>> +{
>> + return !(q->devtype_data->quirks & QUADSPI_QUIRK_NO_CLK_DISABLE);
>> +}
>> +
>> /*
>> * An IC bug makes it necessary to rearrange the 32-bit data.
>> * Later chips, such as IMX6SLX, have fixed this bug.
>> @@ -536,15 +546,18 @@ static void fsl_qspi_select_mem(struct fsl_qspi *q, struct spi_device *spi,
>> if (needs_4x_clock(q))
>> rate *= 4;
>>
>> - fsl_qspi_clk_disable_unprep(q);
>> + if (needs_clk_disable(q))
>> + fsl_qspi_clk_disable_unprep(q);
>>
>> ret = clk_set_rate(q->clk, rate);
>> if (ret)
>> return;
>>
>> - ret = fsl_qspi_clk_prep_enable(q);
>> - if (ret)
>> - return;
>> + if (needs_clk_disable(q)) {
>> + ret = fsl_qspi_clk_prep_enable(q);
>> + if (ret)
>> + return;
>> + }
>>
>> q->selected = spi_get_chipselect(spi, 0);
>>
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (3 preceding siblings ...)
2025-10-20 16:51 ` [PATCH 4/8] spi: fsl-qspi: add a clock disable quirk Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 19:20 ` Frank Li
2025-10-20 16:51 ` [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC Alex Elder
` (2 subsequent siblings)
7 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: han.xu, broonie
Cc: dlan, guodong, linux-spi, imx, spacemit, linux-riscv,
linux-kernel
In fsl_qspi_default_setup(), four registers define the size
of blocks of data to written to each of four chips that
comprise SPI NOR flash storage. They are currently defined
to be the same as the AHB buffer size (which is always 1KB).
The SpacemiT QSPI has an AHB buffer size of 512 bytes, but
requires these four sizes to be multiples of 1024 bytes.
Rather than add a new quirk to support this scenario, just
define the four sizes to be 1KB rather than being dependent
on the AHB buffer size.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
drivers/spi/spi-fsl-qspi.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index 703a7df394c00..9ecb756b33dba 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -795,17 +795,14 @@ static int fsl_qspi_default_setup(struct fsl_qspi *q)
* In HW there can be a maximum of four chips on two buses with
* two chip selects on each bus. We use four chip selects in SW
* to differentiate between the four chips.
- * We use ahb_buf_size for each chip and set SFA1AD, SFA2AD, SFB1AD,
- * SFB2AD accordingly.
+ *
+ * We use 1K for each chip and set SFA1AD, SFA2AD, SFB1AD, SFB2AD
+ * accordingly.
*/
- qspi_writel(q, q->devtype_data->ahb_buf_size + addr_offset,
- base + QUADSPI_SFA1AD);
- qspi_writel(q, q->devtype_data->ahb_buf_size * 2 + addr_offset,
- base + QUADSPI_SFA2AD);
- qspi_writel(q, q->devtype_data->ahb_buf_size * 3 + addr_offset,
- base + QUADSPI_SFB1AD);
- qspi_writel(q, q->devtype_data->ahb_buf_size * 4 + addr_offset,
- base + QUADSPI_SFB2AD);
+ qspi_writel(q, addr_offset + 1 * SZ_1K, base + QUADSPI_SFA1AD);
+ qspi_writel(q, addr_offset + 2 * SZ_1K, base + QUADSPI_SFA2AD);
+ qspi_writel(q, addr_offset + 3 * SZ_1K, base + QUADSPI_SFB1AD);
+ qspi_writel(q, addr_offset + 4 * SZ_1K, base + QUADSPI_SFB2AD);
q->selected = -1;
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip
2025-10-20 16:51 ` [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip Alex Elder
@ 2025-10-20 19:20 ` Frank Li
2025-10-22 4:34 ` Alex Elder
0 siblings, 1 reply; 28+ messages in thread
From: Frank Li @ 2025-10-20 19:20 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On Mon, Oct 20, 2025 at 11:51:48AM -0500, Alex Elder wrote:
> In fsl_qspi_default_setup(), four registers define the size
> of blocks of data to written to each of four chips that
> comprise SPI NOR flash storage. They are currently defined
> to be the same as the AHB buffer size (which is always 1KB).
>
> The SpacemiT QSPI has an AHB buffer size of 512 bytes, but
> requires these four sizes to be multiples of 1024 bytes.
I think it'd better to add field at fsl_qspi_devtype_data, like
sfa_size.
sz = q->devtype_data->sfa_size ? q->devtype_data->sfa_size : q->devtype_data->ahb_buf_size.
qspi_writel(q, addr_offset + 1 * sz, base + QUADSPI_SFA1AD);
...
Frank
>
> Rather than add a new quirk to support this scenario, just
> define the four sizes to be 1KB rather than being dependent
> on the AHB buffer size.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> drivers/spi/spi-fsl-qspi.c | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
> index 703a7df394c00..9ecb756b33dba 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -795,17 +795,14 @@ static int fsl_qspi_default_setup(struct fsl_qspi *q)
> * In HW there can be a maximum of four chips on two buses with
> * two chip selects on each bus. We use four chip selects in SW
> * to differentiate between the four chips.
> - * We use ahb_buf_size for each chip and set SFA1AD, SFA2AD, SFB1AD,
> - * SFB2AD accordingly.
> + *
> + * We use 1K for each chip and set SFA1AD, SFA2AD, SFB1AD, SFB2AD
> + * accordingly.
> */
> - qspi_writel(q, q->devtype_data->ahb_buf_size + addr_offset,
> - base + QUADSPI_SFA1AD);
> - qspi_writel(q, q->devtype_data->ahb_buf_size * 2 + addr_offset,
> - base + QUADSPI_SFA2AD);
> - qspi_writel(q, q->devtype_data->ahb_buf_size * 3 + addr_offset,
> - base + QUADSPI_SFB1AD);
> - qspi_writel(q, q->devtype_data->ahb_buf_size * 4 + addr_offset,
> - base + QUADSPI_SFB2AD);
> + qspi_writel(q, addr_offset + 1 * SZ_1K, base + QUADSPI_SFA1AD);
> + qspi_writel(q, addr_offset + 2 * SZ_1K, base + QUADSPI_SFA2AD);
> + qspi_writel(q, addr_offset + 3 * SZ_1K, base + QUADSPI_SFB1AD);
> + qspi_writel(q, addr_offset + 4 * SZ_1K, base + QUADSPI_SFB2AD);
>
> q->selected = -1;
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip
2025-10-20 19:20 ` Frank Li
@ 2025-10-22 4:34 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-22 4:34 UTC (permalink / raw)
To: Frank Li
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On 10/20/25 2:20 PM, Frank Li wrote:
> On Mon, Oct 20, 2025 at 11:51:48AM -0500, Alex Elder wrote:
>> In fsl_qspi_default_setup(), four registers define the size
>> of blocks of data to written to each of four chips that
>> comprise SPI NOR flash storage. They are currently defined
>> to be the same as the AHB buffer size (which is always 1KB).
>>
>> The SpacemiT QSPI has an AHB buffer size of 512 bytes, but
>> requires these four sizes to be multiples of 1024 bytes.
>
> I think it'd better to add field at fsl_qspi_devtype_data, like
> sfa_size.
OK.
> sz = q->devtype_data->sfa_size ? q->devtype_data->sfa_size : q->devtype_data->ahb_buf_size.
Why not just set sfa_size always then?
Anyway my biggest concern on this was what to call it. What
does "sfa" stand for?
I'll do it the way you suggest for v2.
Thanks.
-Alex
>
> qspi_writel(q, addr_offset + 1 * sz, base + QUADSPI_SFA1AD);
> ...
>
> Frank
>>
>> Rather than add a new quirk to support this scenario, just
>> define the four sizes to be 1KB rather than being dependent
>> on the AHB buffer size.
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> drivers/spi/spi-fsl-qspi.c | 17 +++++++----------
>> 1 file changed, 7 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
>> index 703a7df394c00..9ecb756b33dba 100644
>> --- a/drivers/spi/spi-fsl-qspi.c
>> +++ b/drivers/spi/spi-fsl-qspi.c
>> @@ -795,17 +795,14 @@ static int fsl_qspi_default_setup(struct fsl_qspi *q)
>> * In HW there can be a maximum of four chips on two buses with
>> * two chip selects on each bus. We use four chip selects in SW
>> * to differentiate between the four chips.
>> - * We use ahb_buf_size for each chip and set SFA1AD, SFA2AD, SFB1AD,
>> - * SFB2AD accordingly.
>> + *
>> + * We use 1K for each chip and set SFA1AD, SFA2AD, SFB1AD, SFB2AD
>> + * accordingly.
>> */
>> - qspi_writel(q, q->devtype_data->ahb_buf_size + addr_offset,
>> - base + QUADSPI_SFA1AD);
>> - qspi_writel(q, q->devtype_data->ahb_buf_size * 2 + addr_offset,
>> - base + QUADSPI_SFA2AD);
>> - qspi_writel(q, q->devtype_data->ahb_buf_size * 3 + addr_offset,
>> - base + QUADSPI_SFB1AD);
>> - qspi_writel(q, q->devtype_data->ahb_buf_size * 4 + addr_offset,
>> - base + QUADSPI_SFB2AD);
>> + qspi_writel(q, addr_offset + 1 * SZ_1K, base + QUADSPI_SFA1AD);
>> + qspi_writel(q, addr_offset + 2 * SZ_1K, base + QUADSPI_SFA2AD);
>> + qspi_writel(q, addr_offset + 3 * SZ_1K, base + QUADSPI_SFB1AD);
>> + qspi_writel(q, addr_offset + 4 * SZ_1K, base + QUADSPI_SFB2AD);
>>
>> q->selected = -1;
>>
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (4 preceding siblings ...)
2025-10-20 16:51 ` [PATCH 5/8] spi: fsl-qspi: allot 1KB per chip Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 19:23 ` Frank Li
2025-10-20 16:51 ` [PATCH 7/8] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3 Alex Elder
2025-10-20 16:51 ` [PATCH 8/8] riscv: defconfig: enable SPI_FSL_QUADSPI as a module Alex Elder
7 siblings, 1 reply; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: han.xu, broonie, dlan
Cc: guodong, linux-spi, imx, spacemit, linux-riscv, linux-kernel
Allow the SPI_FSL_QUADSPI Kconfig option to be selected if
ARCH_SPACEMIT enabled.
Add support for the SpacemiT K1 SoC in the Freescale QSPI driver
by defining the device type data for its QSPI implementation.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
drivers/spi/Kconfig | 3 ++-
drivers/spi/spi-fsl-qspi.c | 10 ++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 4d8f00c850c14..2e3d8bd06ceb2 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -435,7 +435,8 @@ config SPI_FSL_LPSPI
config SPI_FSL_QUADSPI
tristate "Freescale QSPI controller"
- depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
+ depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || \
+ ARCH_SPACEMIT || COMPILE_TEST
depends on HAS_IOMEM
help
This enables support for the Quad SPI controller in master mode.
diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
index 9ecb756b33dba..f4f9cf127d3fe 100644
--- a/drivers/spi/spi-fsl-qspi.c
+++ b/drivers/spi/spi-fsl-qspi.c
@@ -267,6 +267,15 @@ static const struct fsl_qspi_devtype_data ls2080a_data = {
.little_endian = true,
};
+static const struct fsl_qspi_devtype_data spacemit_k1_data = {
+ .rxfifo = SZ_128,
+ .txfifo = SZ_256,
+ .ahb_buf_size = SZ_512,
+ .invalid_mstrid = QUADSPI_BUFXCR_INVALID_MSTRID,
+ .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_NO_CLK_DISABLE,
+ .little_endian = true,
+};
+
struct fsl_qspi {
void __iomem *iobase;
void __iomem *ahb_addr;
@@ -998,6 +1007,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = {
{ .compatible = "fsl,imx6ul-qspi", .data = &imx6ul_data, },
{ .compatible = "fsl,ls1021a-qspi", .data = &ls1021a_data, },
{ .compatible = "fsl,ls2080a-qspi", .data = &ls2080a_data, },
+ { .compatible = "spacemit,k1-qspi", .data = &spacemit_k1_data, },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC
2025-10-20 16:51 ` [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC Alex Elder
@ 2025-10-20 19:23 ` Frank Li
2025-10-22 4:34 ` Alex Elder
0 siblings, 1 reply; 28+ messages in thread
From: Frank Li @ 2025-10-20 19:23 UTC (permalink / raw)
To: Alex Elder
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On Mon, Oct 20, 2025 at 11:51:49AM -0500, Alex Elder wrote:
> Allow the SPI_FSL_QUADSPI Kconfig option to be selected if
> ARCH_SPACEMIT enabled.
>
> Add support for the SpacemiT K1 SoC in the Freescale QSPI driver
> by defining the device type data for its QSPI implementation.
>
> Signed-off-by: Alex Elder <elder@riscstar.com>
> ---
> drivers/spi/Kconfig | 3 ++-
> drivers/spi/spi-fsl-qspi.c | 10 ++++++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index 4d8f00c850c14..2e3d8bd06ceb2 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -435,7 +435,8 @@ config SPI_FSL_LPSPI
>
> config SPI_FSL_QUADSPI
> tristate "Freescale QSPI controller"
> - depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
> + depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || \
> + ARCH_SPACEMIT || COMPILE_TEST
^
align to here
Frank
> depends on HAS_IOMEM
> help
> This enables support for the Quad SPI controller in master mode.
> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
> index 9ecb756b33dba..f4f9cf127d3fe 100644
> --- a/drivers/spi/spi-fsl-qspi.c
> +++ b/drivers/spi/spi-fsl-qspi.c
> @@ -267,6 +267,15 @@ static const struct fsl_qspi_devtype_data ls2080a_data = {
> .little_endian = true,
> };
>
> +static const struct fsl_qspi_devtype_data spacemit_k1_data = {
> + .rxfifo = SZ_128,
> + .txfifo = SZ_256,
> + .ahb_buf_size = SZ_512,
> + .invalid_mstrid = QUADSPI_BUFXCR_INVALID_MSTRID,
> + .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_NO_CLK_DISABLE,
> + .little_endian = true,
> +};
> +
> struct fsl_qspi {
> void __iomem *iobase;
> void __iomem *ahb_addr;
> @@ -998,6 +1007,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = {
> { .compatible = "fsl,imx6ul-qspi", .data = &imx6ul_data, },
> { .compatible = "fsl,ls1021a-qspi", .data = &ls1021a_data, },
> { .compatible = "fsl,ls2080a-qspi", .data = &ls2080a_data, },
> + { .compatible = "spacemit,k1-qspi", .data = &spacemit_k1_data, },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC
2025-10-20 19:23 ` Frank Li
@ 2025-10-22 4:34 ` Alex Elder
0 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-22 4:34 UTC (permalink / raw)
To: Frank Li
Cc: han.xu, broonie, dlan, guodong, linux-spi, imx, spacemit,
linux-riscv, linux-kernel
On 10/20/25 2:23 PM, Frank Li wrote:
> On Mon, Oct 20, 2025 at 11:51:49AM -0500, Alex Elder wrote:
>> Allow the SPI_FSL_QUADSPI Kconfig option to be selected if
>> ARCH_SPACEMIT enabled.
>>
>> Add support for the SpacemiT K1 SoC in the Freescale QSPI driver
>> by defining the device type data for its QSPI implementation.
>>
>> Signed-off-by: Alex Elder <elder@riscstar.com>
>> ---
>> drivers/spi/Kconfig | 3 ++-
>> drivers/spi/spi-fsl-qspi.c | 10 ++++++++++
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
>> index 4d8f00c850c14..2e3d8bd06ceb2 100644
>> --- a/drivers/spi/Kconfig
>> +++ b/drivers/spi/Kconfig
>> @@ -435,7 +435,8 @@ config SPI_FSL_LPSPI
>>
>> config SPI_FSL_QUADSPI
>> tristate "Freescale QSPI controller"
>> - depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
>> + depends on ARCH_MXC || SOC_LS1021A || ARCH_LAYERSCAPE || \
>> + ARCH_SPACEMIT || COMPILE_TEST
> ^
> align to here
OK. I was mimicking what I saw on the only other instances of
a continued line in the file, SPI_BCM_QSPI.
-Alex
>
> Frank
>
>> depends on HAS_IOMEM
>> help
>> This enables support for the Quad SPI controller in master mode.
>> diff --git a/drivers/spi/spi-fsl-qspi.c b/drivers/spi/spi-fsl-qspi.c
>> index 9ecb756b33dba..f4f9cf127d3fe 100644
>> --- a/drivers/spi/spi-fsl-qspi.c
>> +++ b/drivers/spi/spi-fsl-qspi.c
>> @@ -267,6 +267,15 @@ static const struct fsl_qspi_devtype_data ls2080a_data = {
>> .little_endian = true,
>> };
>>
>> +static const struct fsl_qspi_devtype_data spacemit_k1_data = {
>> + .rxfifo = SZ_128,
>> + .txfifo = SZ_256,
>> + .ahb_buf_size = SZ_512,
>> + .invalid_mstrid = QUADSPI_BUFXCR_INVALID_MSTRID,
>> + .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_NO_CLK_DISABLE,
>> + .little_endian = true,
>> +};
>> +
>> struct fsl_qspi {
>> void __iomem *iobase;
>> void __iomem *ahb_addr;
>> @@ -998,6 +1007,7 @@ static const struct of_device_id fsl_qspi_dt_ids[] = {
>> { .compatible = "fsl,imx6ul-qspi", .data = &imx6ul_data, },
>> { .compatible = "fsl,ls1021a-qspi", .data = &ls1021a_data, },
>> { .compatible = "fsl,ls2080a-qspi", .data = &ls2080a_data, },
>> + { .compatible = "spacemit,k1-qspi", .data = &spacemit_k1_data, },
>> { /* sentinel */ }
>> };
>> MODULE_DEVICE_TABLE(of, fsl_qspi_dt_ids);
>> --
>> 2.48.1
>>
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 7/8] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (5 preceding siblings ...)
2025-10-20 16:51 ` [PATCH 6/8] spi: fsl-qspi: support the SpacemiT K1 SoC Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
2025-10-20 16:51 ` [PATCH 8/8] riscv: defconfig: enable SPI_FSL_QUADSPI as a module Alex Elder
7 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, dlan
Cc: pjw, palmer, aou, alex, guodong, devicetree, spacemit,
linux-riscv, linux-kernel
Define DTS nodes to enable support for QSPI on the K1 SoC, including
the pin control configuration used. Enable QSPI on the Banana Pi
BPI-F3 board.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
.../boot/dts/spacemit/k1-bananapi-f3.dts | 6 ++++++
arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 21 +++++++++++++++++++
arch/riscv/boot/dts/spacemit/k1.dtsi | 16 ++++++++++++++
3 files changed, 43 insertions(+)
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
index 33ca816bfd4b3..2f3750f7fd6f3 100644
--- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
+++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts
@@ -258,6 +258,12 @@ dldo7 {
};
};
+&qspi {
+ pinctrl-names = "default";
+ pinctrl-0 = <&qspi_cfg>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_2_cfg>;
diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
index 4eef81d583f3d..e922e05ff856d 100644
--- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
@@ -73,6 +73,27 @@ i2c8-0-pins {
};
};
+ qspi_cfg: qspi-cfg {
+ qspi-pins {
+ pinmux = <K1_PADCONF(98, 0)>, /* QSPI_DATA3 */
+ <K1_PADCONF(99, 0)>, /* QSPI_DATA2 */
+ <K1_PADCONF(100, 0)>, /* QSPI_DATA1 */
+ <K1_PADCONF(101, 0)>, /* QSPI_DATA0 */
+ <K1_PADCONF(102, 0)>; /* QSPI_CLK */
+
+ bias-disable;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+
+ qspi-cs1-pins {
+ pinmux = <K1_PADCONF(103, 0)>; /* QSPI_CS1 */
+ bias-pull-up = <0>;
+ drive-strength = <19>;
+ power-source = <3300>;
+ };
+ };
+
/omit-if-no-ref/
uart0_0_cfg: uart0-0-cfg {
uart0-0-pins {
diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
index af35f9cd64351..47f97105bff0b 100644
--- a/arch/riscv/boot/dts/spacemit/k1.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
@@ -823,6 +823,22 @@ uart9: serial@d4017800 {
status = "disabled";
};
+ qspi: spi@d420c000 {
+ compatible = "spacemit,k1-qspi";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x0 0xd420c000 0x0 0x1000>,
+ <0x0 0xb8000000 0x0 0xc00000>;
+ reg-names = "QuadSPI", "QuadSPI-memory";
+ clocks = <&syscon_apmu CLK_QSPI_BUS>,
+ <&syscon_apmu CLK_QSPI>;
+ clock-names = "qspi_en", "qspi";
+ resets = <&syscon_apmu RESET_QSPI>,
+ <&syscon_apmu RESET_QSPI_BUS>;
+ interrupts = <117>;
+ status = "disabled";
+ };
+
/* sec_uart1: 0xf0612000, not available from Linux */
};
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 8/8] riscv: defconfig: enable SPI_FSL_QUADSPI as a module
2025-10-20 16:51 [PATCH 0/8] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (6 preceding siblings ...)
2025-10-20 16:51 ` [PATCH 7/8] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3 Alex Elder
@ 2025-10-20 16:51 ` Alex Elder
7 siblings, 0 replies; 28+ messages in thread
From: Alex Elder @ 2025-10-20 16:51 UTC (permalink / raw)
To: pjw, palmer, aou, alex, dlan
Cc: guodong, emil.renner.berthing, geert+renesas, fustini, ben717,
apatel, joel, spacemit, linux-riscv, linux-kernel
The SpacemiT K1 SoC QSPI IP uses the Freescale driver. Enable it
as a module in the default kernel configuration for RISC-V.
Signed-off-by: Alex Elder <elder@riscstar.com>
---
arch/riscv/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index fc2725cbca187..48afe30d42e88 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -158,6 +158,7 @@ CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_MV64XXX=m
CONFIG_SPI=y
CONFIG_SPI_CADENCE_QUADSPI=m
+CONFIG_SPI_FSL_QUADSPI=m
CONFIG_SPI_PL022=m
CONFIG_SPI_SIFIVE=y
CONFIG_SPI_SUN6I=y
--
2.48.1
^ permalink raw reply related [flat|nested] 28+ messages in thread