* [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI
@ 2025-10-27 13:29 Alex Elder
2025-10-27 13:29 ` [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Alex Elder @ 2025-10-27 13:29 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie, dlan, pjw
Cc: Frank.li, p.zabel, guodong, palmer, aou, alex, apatel, joel,
geert+renesas, cyy, heylenay, conor.dooley, fustini, linux-spi,
devicetree, imx, spacemit, linux-riscv, linux-kernel
This series adds support for the SpacemiT K1 SoC QSPI. This IP is
generally compatible with the Freescale QSPI driver, requiring three
minor changes to enable it to be supported. The changes are:
- Adding support for optional resets
- Having the clock *not* be disabled when changing its rate
- Allowing the size of storage blocks written to flash chips
to be set to something different from the AHB buffer size
This version of the series mainly adds sign-offs provided for v3.
-Alex
This series is available here:
https://github.com/riscstar/linux/tree/outgoing/qspi-v4
Version 4 incorporates comments recieved during review of v3:
- Moved the allOf block below the required section in patch 2
- Added Frank Li's Reviewed-by on patch 2, 4, and 5
- Added Paul Walmsley's Acked-by on patch 9
Here is version 3:
https://lore.kernel.org/lkml/20251024191550.194946-1-elder@riscstar.com/
Version 3 addresses comments recieved during review of v2:
- This version fully tested and confirmed to work on BPI-F3
- Added Acked-by from Conor on patches 1 and 2
- Added Reviewed-by from Frank on patches 1 and 6
- Moved the reset property conditional under allOf in the binding
- In patch 5, needs_clk_disable() is no longer inline
- Tweaked the description in patch 5
- Renamed a local variable to be "sfa_size" in patch 6
- Changed the subject line in patch 6
- The sfa_size field was not being assigned in spacemit_k1_data;
now it is set to SZ_1K
Here is version 2:
https://lore.kernel.org/lkml/20251023175922.528868-1-elder@riscstar.com/
Version 2 addresses comments recieved during review of v1:
- The "reset" property now only applies to spacemit,k1-qspi compatible.
- Patch 1 (previously patch 2) now points out that this is the first
non-Freescale device using the binding.
- Added Frank Li's Reviewed-by on patch 3.
- A quirk flag has been renamed to be QUADSPI_QUIRK_SKIP_CLK_DISABLE.
- The predicate for that quirk now returns bool type.
- All other similar predicates now return bool type; this is done in a
new patch (patch 4).
- If non-zero, new field fsl_qspi_devtype_data->sfa_size defines the
size of the serial flash regions, rather than ahb_buf_size.
- A continued line in the Kconfig is now aligned.
- Patch descriptions are wrapped at 75 columns.
Here is version 1:
https://lore.kernel.org/lkml/20251020165152.666221-1-elder@riscstar.com/
Alex Elder (9):
dt-bindings: spi: fsl-qspi: support SpacemiT K1
dt-bindings: spi: fsl-qspi: add optional resets
spi: fsl-qspi: add optional reset support
spi: fsl-qspi: switch predicates to bool
spi: fsl-qspi: add a clock disable quirk
spi: fsl-qspi: introduce sfa_size devtype data
spi: fsl-qspi: support the SpacemiT K1 SoC
riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3
riscv: defconfig: enable SPI_FSL_QUADSPI as a module
.../bindings/spi/fsl,spi-fsl-qspi.yaml | 21 ++++-
.../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 ++++
arch/riscv/configs/defconfig | 1 +
drivers/spi/Kconfig | 3 +-
drivers/spi/spi-fsl-qspi.c | 88 +++++++++++++------
7 files changed, 127 insertions(+), 29 deletions(-)
base-commit: 8fec172c82c2b5f6f8e47ab837c1dc91ee3d1b87
--
2.48.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
@ 2025-10-27 13:29 ` Alex Elder
2025-11-06 16:55 ` Mark Brown
2025-10-27 13:30 ` [PATCH v4 2/9] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Alex Elder @ 2025-10-27 13:29 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie
Cc: dlan, Frank.li, guodong, devicetree, linux-spi, imx, spacemit,
linux-riscv, linux-kernel, Conor Dooley, Frank Li
Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware. This
is the first non-Freescale device represented here. It has a nearly
identidal register set, and this binding correctly describes the hardware.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
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 f2dd20370dbb3..5e6aff1bc2ed3 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] 7+ messages in thread
* [PATCH v4 2/9] dt-bindings: spi: fsl-qspi: add optional resets
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-27 13:29 ` [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
@ 2025-10-27 13:30 ` Alex Elder
2025-11-07 10:15 ` (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Mark Brown
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Alex Elder @ 2025-10-27 13:30 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie
Cc: dlan, Frank.li, guodong, linux-spi, imx, devicetree, spacemit,
linux-riscv, linux-kernel, Frank Li, Conor Dooley
Allow two resets to be defined to support the SpacemiT K1 SoC QSPI IP.
Move the allOf block down, below the required section.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Alex Elder <elder@riscstar.com>
---
v4: - Moved the allOf block below the required section
- Added Frank Li's Reviewed-by
.../bindings/spi/fsl,spi-fsl-qspi.yaml | 20 ++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
index 5e6aff1bc2ed3..1d10cfbad86c7 100644
--- a/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
+++ b/Documentation/devicetree/bindings/spi/fsl,spi-fsl-qspi.yaml
@@ -9,9 +9,6 @@ title: Freescale Quad Serial Peripheral Interface (QuadSPI)
maintainers:
- Han Xu <han.xu@nxp.com>
-allOf:
- - $ref: spi-controller.yaml#
-
properties:
compatible:
oneOf:
@@ -55,6 +52,11 @@ properties:
- const: qspi_en
- const: qspi
+ resets:
+ items:
+ - description: SoC QSPI reset
+ - description: SoC QSPI bus reset
+
required:
- compatible
- reg
@@ -63,6 +65,18 @@ required:
- clocks
- clock-names
+allOf:
+ - $ref: spi-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ not:
+ contains:
+ const: spacemit,k1-qspi
+ then:
+ properties:
+ resets: false
+
unevaluatedProperties: false
examples:
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1
2025-10-27 13:29 ` [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
@ 2025-11-06 16:55 ` Mark Brown
0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2025-11-06 16:55 UTC (permalink / raw)
To: Alex Elder
Cc: robh, krzk+dt, conor+dt, han.xu, dlan, Frank.li, guodong,
devicetree, linux-spi, imx, spacemit, linux-riscv, linux-kernel,
Conor Dooley
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
On Mon, Oct 27, 2025 at 08:29:59AM -0500, Alex Elder wrote:
> Add the SpacemiT K1 SoC QSPI IP to the list of supported hardware. This
> is the first non-Freescale device represented here. It has a nearly
> identidal register set, and this binding correctly describes the hardware.
Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-27 13:29 ` [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
2025-10-27 13:30 ` [PATCH v4 2/9] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
@ 2025-11-07 10:15 ` Mark Brown
2025-11-12 10:23 ` Yixun Lan
2025-11-12 18:56 ` Conor Dooley
4 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2025-11-07 10:15 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, dlan, pjw, Alex Elder
Cc: Frank.li, p.zabel, guodong, palmer, aou, alex, apatel, joel,
geert+renesas, cyy, heylenay, conor.dooley, fustini, linux-spi,
devicetree, imx, spacemit, linux-riscv, linux-kernel
On Mon, 27 Oct 2025 08:29:58 -0500, Alex Elder wrote:
> This series adds support for the SpacemiT K1 SoC QSPI. This IP is
> generally compatible with the Freescale QSPI driver, requiring three
> minor changes to enable it to be supported. The changes are:
> - Adding support for optional resets
> - Having the clock *not* be disabled when changing its rate
> - Allowing the size of storage blocks written to flash chips
> to be set to something different from the AHB buffer size
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1
commit: bd352547df647be8a1e6c9d4ca2b54b459f3abc1
[2/9] dt-bindings: spi: fsl-qspi: add optional resets
commit: 873a46141460d209bb62eaa0dc9e7b67bff924a6
[3/9] spi: fsl-qspi: add optional reset support
commit: 106d7641e55a472e7523c1f525c77fb6d420064d
[4/9] spi: fsl-qspi: switch predicates to bool
commit: 6b398c1d3da7a673b13b1857f9fff4c15ee20cef
[5/9] spi: fsl-qspi: add a clock disable quirk
commit: 1797d254f5c4b46b295527a635af7321a3fe1318
[6/9] spi: fsl-qspi: introduce sfa_size devtype data
commit: 56931105074fe7e5fc9d54e3163df3b95075643c
[7/9] spi: fsl-qspi: support the SpacemiT K1 SoC
commit: abc9a349b87ac0fd3ba8787ca00971b59c2e1257
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] 7+ messages in thread
* Re: (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (2 preceding siblings ...)
2025-11-07 10:15 ` (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Mark Brown
@ 2025-11-12 10:23 ` Yixun Lan
2025-11-12 18:56 ` Conor Dooley
4 siblings, 0 replies; 7+ messages in thread
From: Yixun Lan @ 2025-11-12 10:23 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie, pjw, Alex Elder
Cc: Yixun Lan, Frank.li, p.zabel, guodong, palmer, aou, alex, apatel,
joel, geert+renesas, cyy, heylenay, conor.dooley, fustini,
linux-spi, devicetree, imx, spacemit, linux-riscv, linux-kernel
On Mon, 27 Oct 2025 08:29:58 -0500, Alex Elder wrote:
> This series adds support for the SpacemiT K1 SoC QSPI. This IP is
> generally compatible with the Freescale QSPI driver, requiring three
> minor changes to enable it to be supported. The changes are:
> - Adding support for optional resets
> - Having the clock *not* be disabled when changing its rate
> - Allowing the size of storage blocks written to flash chips
> to be set to something different from the AHB buffer size
>
> [...]
Applied, thanks!
[8/9] riscv: dts: spacemit: enable K1 SoC QSPI on BPI-F3
https://github.com/spacemit-com/linux/commit/41d34e0b5497f919229d32580fbe34386087458f
Best regards,
--
Yixun Lan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
` (3 preceding siblings ...)
2025-11-12 10:23 ` Yixun Lan
@ 2025-11-12 18:56 ` Conor Dooley
4 siblings, 0 replies; 7+ messages in thread
From: Conor Dooley @ 2025-11-12 18:56 UTC (permalink / raw)
To: robh, krzk+dt, conor+dt, han.xu, broonie, dlan, pjw, Alex Elder
Cc: conor, Conor Dooley, Frank.li, p.zabel, guodong, palmer, aou,
alex, apatel, joel, geert+renesas, cyy, heylenay, fustini,
linux-spi, devicetree, imx, spacemit, linux-riscv, linux-kernel
From: Conor Dooley <conor.dooley@microchip.com>
On Mon, 27 Oct 2025 08:29:58 -0500, Alex Elder wrote:
> This series adds support for the SpacemiT K1 SoC QSPI. This IP is
> generally compatible with the Freescale QSPI driver, requiring three
> minor changes to enable it to be supported. The changes are:
> - Adding support for optional resets
> - Having the clock *not* be disabled when changing its rate
> - Allowing the size of storage blocks written to flash chips
> to be set to something different from the AHB buffer size
>
> [...]
Applied to riscv-config-for-next, thanks!
[9/9] riscv: defconfig: enable SPI_FSL_QUADSPI as a module
(no commit info)
Thanks,
Conor.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-12 18:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 13:29 [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Alex Elder
2025-10-27 13:29 ` [PATCH v4 1/9] dt-bindings: spi: fsl-qspi: support SpacemiT K1 Alex Elder
2025-11-06 16:55 ` Mark Brown
2025-10-27 13:30 ` [PATCH v4 2/9] dt-bindings: spi: fsl-qspi: add optional resets Alex Elder
2025-11-07 10:15 ` (subset) [PATCH v4 0/9] spi: enable the SpacemiT K1 SoC QSPI Mark Brown
2025-11-12 10:23 ` Yixun Lan
2025-11-12 18:56 ` Conor Dooley
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).