Skip to contentSkip to conversation

Axiado AX3000 SoC SPI DB controller driver

PATCH Applied Kuan-Jui Chiu 2 participants 5 messages Feb 15 – Feb 19

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Axiado AX3000 SoC SPI DB controller driver

This patch series introduces new SPI controller driver for Axiado AX3000 SoC and its evaluation board.

The SPI controller provides:
- Full-duplex and half-duplex transfer support
- Configurable clock polarity and phase
- Interrupt-driven

Vladimir Moravcevic (3):
spi: dt-bindings: axiado,ax3000-spi: Add binding for Axiado SPI DB
controller
spi: axiado: Add driver for Axiado SPI DB controller
MAINTAINERS: Add entries for the Axiado SPI DB controller

 .../bindings/spi/axiado,ax3000-spi.yaml       |   73 ++
 MAINTAINERS                                   |   11 +
 drivers/spi/Kconfig                           |   10 +
 drivers/spi/Makefile                          |    1 +
 drivers/spi/spi-axiado.c                      | 1007 +++++++++++++++++
 drivers/spi/spi-axiado.h                      |  133 +++
 6 files changed, 1235 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
 create mode 100644 drivers/spi/spi-axiado.c
 create mode 100644 drivers/spi/spi-axiado.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/3 spi: dt-bindings: axiado,ax3000-spi: Add binding for Axiado SPI DB controller

From: Vladimir Moravcevic <[email protected]>

Add documentation for Axiado Digital Block SPI controller.

---
 .../bindings/spi/axiado,ax3000-spi.yaml       | 73 +++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml new file +73 -0
new file mode 100644
index 000000000000..cd2aac66fca2
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/axiado,ax3000-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Axiado AX3000 SoC SPI controller
+
+maintainers:
+  - Vladimir Moravcevic <[email protected]>
+  - Tzu-Hao Wei <[email protected]>
+  - Swark Yang <[email protected]>
+  - Prasad Bolisetty <[email protected]>
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - axiado,ax3000-spi
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ref
+      - const: pclk
+
+  clocks:
+    maxItems: 2
+
+  num-cs:
+    description: |
+      Number of chip selects used.
+    $ref: /schemas/types.yaml#/definitions/uint32
+    minimum: 1
+    maximum: 4
+    default: 4
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clock-names
+  - clocks
+
+unevaluatedProperties: false
+
+examples:
+  - |
+   #include <dt-bindings/interrupt-controller/irq.h>
+   #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+   soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      spi@80510000 {
+         compatible = "axiado,ax3000-spi";
+         reg = <0x00 0x80510000 0x00 0x1000>;
+         clock-names = "ref", "pclk";
+         clocks = <&spi_clk>, <&apb_pclk>;
+         interrupt-parent = <&gic500>;
+         interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+         num-cs = <4>;
+      };
+   };
+...
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/3 spi: axiado: Add driver for Axiado SPI DB controller

In reply to Kuan-Jui Chiu

From: Vladimir Moravcevic <[email protected]>

The Axiado SPI controller is present in AX3000 SoC and Evaluation Board. This controller is operating in Host only mode.

---
 drivers/spi/Kconfig      |   10 +
 drivers/spi/Makefile     |    1 +
 drivers/spi/spi-axiado.c | 1007 ++++++++++++++++++++++++++++++++++++++
 drivers/spi/spi-axiado.h |  133 +++++
 4 files changed, 1151 insertions(+)
 create mode 100644 drivers/spi/spi-axiado.c
 create mode 100644 drivers/spi/spi-axiado.h
drivers/spi/Kconfig +10 -0
index 1872f9d54a5c..fa7836f5e6d2 100644
@@ -204,6 +204,16 @@ config SPI_AXI_SPI_ENGINE
 	  It is part of the SPI Engine framework that is used in some Analog Devices
 	  reference designs for FPGAs.
 
+config SPI_AXIADO
+	tristate "Axiado DB-H SPI controller"
+	depends on SPI_MEM
+	help
+	  Enable support for the SPI controller present on Axiado AX3000 SoCs.
+
+	  The implementation supports host-only mode and does not provide target
+	  functionality. It is intended for use cases where the SoC acts as the SPI
+	  host, communicating with peripheral devices such as flash memory.
+
 config SPI_BCM2835
 	tristate "BCM2835 SPI controller"
 	depends on GPIOLIB
drivers/spi/Makefile +1 -0
index 1f7c06a3091d..0cfc33a005e3 100644
@@ -32,6 +32,7 @@ obj-$(CONFIG_SPI_AT91_USART)		+= spi-at91-usart.o
 obj-$(CONFIG_SPI_ATH79)			+= spi-ath79.o
 obj-$(CONFIG_SPI_AU1550)		+= spi-au1550.o
 obj-$(CONFIG_SPI_AXI_SPI_ENGINE)	+= spi-axi-spi-engine.o
+obj-$(CONFIG_SPI_AXIADO)		+= spi-axiado.o
 obj-$(CONFIG_SPI_BCM2835)		+= spi-bcm2835.o
 obj-$(CONFIG_SPI_BCM2835AUX)		+= spi-bcm2835aux.o
 obj-$(CONFIG_SPI_BCM63XX)		+= spi-bcm63xx.o
drivers/spi/spi-axiado.c new file +1007 -0

1,007 lines not on this page · raw message

drivers/spi/spi-axiado.h new file +133 -0

133 lines not on this page · raw message

Signature · 1 line
2.34.1
#3 lore raw

PATCH 3/3 MAINTAINERS: Add entries for the Axiado SPI DB controller

In reply to Kuan-Jui Chiu

From: Vladimir Moravcevic <[email protected]>

Add the MAINTAINERS entries for the Axiado SPI DB controller.

---
 MAINTAINERS | 11 +++++++++++
 1 file changed, 11 insertions(+)
MAINTAINERS +11 -0
index 9137c8f50057..10b1f6f61afc 100644
@@ -4201,6 +4201,17 @@ W:	https://ez.analog.com/linux-software-drivers
 F:	Documentation/devicetree/bindings/pwm/adi,axi-pwmgen.yaml
 F:	drivers/pwm/pwm-axi-pwmgen.c
 
+AXIADO SPI DB DRIVER
+M:	Vladimir Moravcevic <[email protected]>
+M:	Tzu-Hao Wei <[email protected]>
+M:	Swark Yang <[email protected]>
+M:	Prasad Bolisetty <[email protected]>
+L:	[email protected]
+S:	Maintained
+F:	Documentation/devicetree/bindings/spi/axiado,ax3000-spi.yaml
+F:	drivers/spi/spi-axiado.c
+F:	drivers/spi/spi-axiado.h
+
 AZ6007 DVB DRIVER
 M:	Mauro Carvalho Chehab <[email protected]>
 L:	[email protected]
Signature · 1 line
2.34.1
#4 lore raw
In reply to Kuan-Jui Chiu
Quoted 2 lines · Kuan-Jui Chiu

This patch series introduces new SPI controller driver for Axiado AX3000 SoC and its evaluation board.

Applied to dev-6.18.

Cheers,

Andrew