spi: add driver for ar934x spi controller
Subsystems (2)
v4 cover spi: add driver for ar934x spi controller
This controller is a superset of the already supported qca,ar7100-spi. Besides the bit-bang mode in spi-ath79.c, this new controller added a new "shift register" mode, allowing faster spi operations. This mode doesn't need all the bit-bang code in spi-ath79.c and needs a different clock setup, so I decided to write a new driver for it instead of extending current spi-ath79 driver.
Changes since v3:
1. restore pin state in probe to terminate unfinished SPI transfer done by bootloader.
2. replace clock binding with ath79 pll as this is the actual clock binding used in all SoC supported by this driver.
Change since v2:
fix binding documentation check.
Changes since v1:
1. change comment at the beginning to C++ style
2. rename ar934x_spi_transfer_one to ar934x_spi_transfer_one_message
Chuanhong Guo (2):
spi: add driver for ar934x spi controller
dt-binding: spi: add bindings for spi-ar934x
.../bindings/spi/qca,ar934x-spi.yaml | 41 +++ drivers/spi/Kconfig | 7 + drivers/spi/Makefile | 1 + drivers/spi/spi-ar934x.c | 235 ++++++++++++++++++ 4 files changed, 284 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/qca,ar934x-spi.yaml create mode 100644 drivers/spi/spi-ar934x.c
Signature · 1 line
2.24.1
PATCH v4 1/2 spi: add driver for ar934x spi controller
This patch adds driver for SPI controller found in Qualcomm Atheros AR934x/QCA95xx SoCs.
This controller is a superset of the already supported qca,ar7100-spi. Besides the bit-bang mode in spi-ath79.c, this new controller added a new "shift register" mode, allowing faster spi operations.
---
Change since v3:
restore pin state in probe to terminate unfinished SPI transfer done by bootloader.
Change since v2: none.
Changes since v1:
1. change comment at the beginning to C++ style
2. rename ar934x_spi_transfer_one to ar934x_spi_transfer_one_message
drivers/spi/Kconfig | 7 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-ar934x.c | 235 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 243 insertions(+) create mode 100644 drivers/spi/spi-ar934x.c
drivers/spi/Kconfig +7 -0
@@ -62,6 +62,13 @@ config SPI_ALTERA help This is the driver for the Altera SPI Controller. +config SPI_AR934X + tristate "Qualcomm Atheros AR934X/QCA95XX SPI controller driver" + depends on ATH79 || COMPILE_TEST + help + This enables support for the SPI controller present on the + Qualcomm Atheros AR934X/QCA95XX SoCs. + config SPI_ATH79 tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver" depends on ATH79 || COMPILE_TEST
drivers/spi/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o # SPI master controller drivers (bus) obj-$(CONFIG_SPI_ALTERA) += spi-altera.o +obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o obj-$(CONFIG_SPI_ATMEL_QUADSPI) += atmel-quadspi.o
drivers/spi/spi-ar934x.c new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "spi: add driver for ar934x spi controller" to the spi tree
The patch
spi: add driver for ar934x spi controller
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7
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
Quoted 1 line
From
047980c582af665e1581e60ebf3e57977e621c23Mon Sep 17 00:00:00 2001
From: Chuanhong Guo <[email protected]>
Date: Mon, 10 Feb 2020 11:41:51 +0800
Subject: [PATCH] spi: add driver for ar934x spi controller
This patch adds driver for SPI controller found in Qualcomm Atheros AR934x/QCA95xx SoCs.
This controller is a superset of the already supported qca,ar7100-spi. Besides the bit-bang mode in spi-ath79.c, this new controller added a new "shift register" mode, allowing faster spi operations.
--- drivers/spi/Kconfig | 7 ++ drivers/spi/Makefile | 1 + drivers/spi/spi-ar934x.c | 235 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 243 insertions(+) create mode 100644 drivers/spi/spi-ar934x.c
drivers/spi/Kconfig +7 -0
@@ -62,6 +62,13 @@ config SPI_ALTERA help This is the driver for the Altera SPI Controller. +config SPI_AR934X + tristate "Qualcomm Atheros AR934X/QCA95XX SPI controller driver" + depends on ATH79 || COMPILE_TEST + help + This enables support for the SPI controller present on the + Qualcomm Atheros AR934X/QCA95XX SoCs. + config SPI_ATH79 tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver" depends on ATH79 || COMPILE_TEST
drivers/spi/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_SPI_LOOPBACK_TEST) += spi-loopback-test.o # SPI master controller drivers (bus) obj-$(CONFIG_SPI_ALTERA) += spi-altera.o +obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o obj-$(CONFIG_SPI_ATMEL_QUADSPI) += atmel-quadspi.o
drivers/spi/spi-ar934x.c new file +235 -0
235 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH v4 2/2 dt-binding: spi: add bindings for spi-ar934x
In reply to Chuanhong GuoAdd binding documentation for SPI controller in Qualcomm Atheros AR934x/QCA95xx SoCs.
---
Change since v3:
replace clock binding with ath79 pll as this is the actual clock binding used in all SoC supported by this driver.
Change since v2:
replace clock binding in example with a bogus spi_clock to fix dt binding check error.
Change since v1: none
.../bindings/spi/qca,ar934x-spi.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/qca,ar934x-spi.yaml
Documentation/devicetree/bindings/spi/qca,ar934x-spi.yaml new file +41 -0
@@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/qca,ar934x-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Atheros AR934x/QCA95xx SoC SPI controller + +maintainers: + - Chuanhong Guo <[email protected]> + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + const: qca,ar934x-spi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - '#address-cells' + - '#size-cells' + +examples: + - | + #include <dt-bindings/clock/ath79-clk.h> + spi: spi@1f000000 { + compatible = "qca,ar934x-spi"; + reg = <0x1f000000 0x1c>; + clocks = <&pll ATH79_CLK_AHB>; + #address-cells = <1>; + #size-cells = <0>; + };
Signature · 1 line
2.24.1
Mark Brown
maintainerApplied "dt-binding: spi: add bindings for spi-ar934x" to the spi tree
The patch
dt-binding: spi: add bindings for spi-ar934x
has been applied to the spi tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-5.7
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
Quoted 1 line
From
78af6edf180d4f007561fba735d0c5dbd1739e90Mon Sep 17 00:00:00 2001
From: Chuanhong Guo <[email protected]>
Date: Mon, 10 Feb 2020 11:41:52 +0800
Subject: [PATCH] dt-binding: spi: add bindings for spi-ar934x
Add binding documentation for SPI controller in Qualcomm Atheros AR934x/QCA95xx SoCs.
--- .../bindings/spi/qca,ar934x-spi.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/qca,ar934x-spi.yaml
Documentation/devicetree/bindings/spi/qca,ar934x-spi.yaml new file +41 -0
@@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/spi/qca,ar934x-spi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Atheros AR934x/QCA95xx SoC SPI controller + +maintainers: + - Chuanhong Guo <[email protected]> + +allOf: + - $ref: spi-controller.yaml# + +properties: + compatible: + const: qca,ar934x-spi + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - '#address-cells' + - '#size-cells' + +examples: + - | + #include <dt-bindings/clock/ath79-clk.h> + spi: spi@1f000000 { + compatible = "qca,ar934x-spi"; + reg = <0x1f000000 0x1c>; + clocks = <&pll ATH79_CLK_AHB>; + #address-cells = <1>; + #size-cells = <0>; + };
Signature · 1 line
2.20.1