spi: atcspi200: Add support for Andes ATCSPI200 SPI controller
Subsystems (3)
CL Wang
maintainerv3 cover spi: atcspi200: Add support for Andes ATCSPI200 SPI controller
Hi all,
This series adds support for the Andes ATCSPI200 SPI controller.
Changes in v3:
- Reworked the DT binding to properly describe the compatible fallback relationship, defining "andestech,qilai-spi" as a platform-specific compatible that falls back to the generic "andestech,ae350-spi".
- Renamed the DT binding file from 'andestech,qilai-spi.yaml' to 'andestech,ae350-spi.yaml' to match the generic fallback compatible.
- Updated the 'compatible' property to use a 'oneOf' schema, enforcing the fallback requirement for the specific compatible string.
- Updated the MAINTAINERS entry to reflect the renamed DT binding file.
Patch overview:
- Patch 1: Adds the device tree binding documentation.
- Patch 2: Add ATCSPI200 SPI controller driver.
- Patch 3: Add MAINTAINERS entry for the ATCSPI200 SPI controller driver.
Comments and reviews are welcome.
Thanks for your time.
Best regards,
CL
CL Wang (3):
dt-bindings: spi: Add support for ATCSPI200 SPI controller
spi: atcspi200: Add ATCSPI200 SPI controller driver
MAINTAINERS: Add MAINTAINERS entry for the ATCSPI200 SPI controller
driver
.../bindings/spi/andestech,ae350-spi.yaml | 85 +++ MAINTAINERS | 6 + drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-atcspi200.c | 680 ++++++++++++++++++ 5 files changed, 781 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml create mode 100644 drivers/spi/spi-atcspi200.c
Signature · 1 line
2.34.1
CL Wang
maintainerPATCH v3 1/3 dt-bindings: spi: Add support for ATCSPI200 SPI controller
Document devicetree bindings for the Andes ATCSPI200 SPI controller.
---
Changes for v3:
- Reworked the DT binding to properly describe the compatible fallback relationship, defining "andestech,qilai-spi" as a platform-specific compatible that falls back to the generic "andestech,ae350-spi".
- Renamed the DT binding file from 'andestech,qilai-spi.yaml' to 'andestech,ae350-spi.yaml' to match the generic fallback compatible.
- Updated the 'compatible' property to use a 'oneOf' schema, enforcing the fallback requirement for the specific compatible string.
Changes for v2:
- Dropped the "spi_" prefix from dma-names as suggested.
- Updated the DT binding and documented all compatible strings.
- Added the "andestech,ae350-spi" compatible string.
--- .../bindings/spi/andestech,ae350-spi.yaml | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml
Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml new file +85 -0
@@ -0,0 +1,85 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/andestech,ae350-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Andes ATCSPI200 SPI controller + +maintainers: + - CL Wang <[email protected]> + +properties: + compatible: + oneOf: + - items: + - enum: + - andestech,qilai-spi + - const: andestech,ae350-spi + - const: andestech,ae350-spi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + num-cs: + description: Number of chip selects supported + maxItems: 1 + + dmas: + items: + - description: Transmit FIFO DMA channel + - description: Receive FIFO DMA channel + + dma-names: + items: + - const: tx + - const: rx + +patternProperties: + "@[0-9a-f]+$": + type: object + additionalProperties: true + + properties: + spi-rx-bus-width: + enum: [1, 4] + + spi-tx-bus-width: + enum: [1, 4] + +allOf: + - $ref: spi-controller.yaml# + +required: + - compatible + - reg + - clocks + - dmas + - dma-names + +unevaluatedProperties: false + +examples: + - | + spi@f0b00000 { + compatible = "andestech,ae350-spi"; + reg = <0xf0b00000 0x100>; + clocks = <&clk_spi>; + dmas = <&dma0 0>, <&dma0 1>; + dma-names = "tx", "rx"; + + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + spi-cpol; + spi-cpha; + }; + };
Signature · 1 line
2.34.1
Re: [PATCH V3 1/3] dt-bindings: spi: Add support for ATCSPI200 SPI controller
Quoted 3 lines · CL Wang
Document devicetree bindings for the Andes ATCSPI200 SPI controller.
Signed-off-by CL Wang <[email protected]>
pw-bot: not-applicable
CL Wang
maintainerPATCH v3 2/3 spi: atcspi200: Add ATCSPI200 SPI controller driver
In reply to CL WangAdd driver for the Andes ATCSPI200 SPI controller.
---
Changes for v3:
- No functional changes to the driver.
Changes for v2:
- Added missing clock disable/unprepare handling in probe error paths.
- Switched to devm_dma_request_chan() for proper DMA channel cleanup.
- Dropped the "spi_" prefix from dma-names as suggested.
- Added suspend/resume support for power management.
- Added the "andestech,ae350-spi" compatible string.
--- drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-atcspi200.c | 680 ++++++++++++++++++++++++++++++++++++ 3 files changed, 690 insertions(+) create mode 100644 drivers/spi/spi-atcspi200.c
drivers/spi/Kconfig +9 -0
@@ -136,6 +136,15 @@ config SPI_AR934X This enables support for the SPI controller present on the Qualcomm Atheros AR934X/QCA95XX SoCs. +config SPI_ATCSPI200 + tristate "Andes ATCSPI200 SPI controller" + depends on ARCH_ANDES + help + SPI driver for Andes ATCSPI200 SPI controller. + ATCSPI200 controller supports DMA and PIO modes. When DMA + is not available, the driver automatically falls back to + PIO mode. + config SPI_ATH79 tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver" depends on ATH79 || COMPILE_TEST
drivers/spi/Makefile +1 -0
@@ -26,6 +26,7 @@ obj-$(CONFIG_SPI_APPLE) += spi-apple.o obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o obj-$(CONFIG_SPI_ASPEED_SMC) += spi-aspeed-smc.o +obj-$(CONFIG_SPI_ATCSPI200) += spi-atcspi200.o obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o obj-$(CONFIG_SPI_ATMEL_QUADSPI) += atmel-quadspi.o obj-$(CONFIG_SPI_AT91_USART) += spi-at91-usart.o
drivers/spi/spi-atcspi200.c new file +680 -0
680 lines not on this page · raw message
Signature · 1 line
2.34.1
CL Wang
maintainerPATCH v3 3/3 MAINTAINERS: Add MAINTAINERS entry for the ATCSPI200 SPI controller driver
In reply to CL WangMAINTAINERS: Add entry for the Andes ATCSPI200 SPI controller driver
---
Changes for v3:
- Updated the MAINTAINERS entry to reflect the renamed DT binding file.
Changes for v2:
- Split the MAINTAINERS update into a separate patch.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -1804,6 +1804,12 @@ S: Supported F: drivers/clk/analogbits/* F: include/linux/clk/analogbits* +ANDES ATCSPI200 SPI DRIVER +M: CL Wang <[email protected]> +S: Supported +F: Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml +F: drivers/spi/spi-atcspi200.c + ANDROID DRIVERS M: Greg Kroah-Hartman <[email protected]> M: Arve Hjønnevåg <[email protected]>
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 12 lines · CL Wang
This series adds support for the Andes ATCSPI200 SPI controller.
Changes in v3:
- Reworked the DT binding to properly describe the compatible fallback relationship, defining "andestech,qilai-spi" as a platform-specific compatible that falls back to the generic "andestech,ae350-spi".
- Renamed the DT binding file from 'andestech,qilai-spi.yaml' to 'andestech,ae350-spi.yaml' to match the generic fallback compatible.
- Updated the 'compatible' property to use a 'oneOf' schema, enforcing the fallback requirement for the specific compatible string.
- Updated theMAINTAINERSentry to reflect the renamed DT binding file.
Quoted 1 line
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/3] dt-bindings: spi: Add support for ATCSPI200 SPI controller
commit: b2f06783081859b200a853f9682d831b6fc9982d
[2/3] spi: atcspi200: Add ATCSPI200 SPI controller driver
commit: 34e3815ea4597131d4324a4aa243d2201e672005
[3/3] MAINTAINERS: Add MAINTAINERS entry for the ATCSPI200 SPI controller driver
commit: 1303c2903889b01d581083ed92e439e7544dd3e5All 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