Skip to content

Commit 65ccce3

Browse files
committed
spi: atcspi200: Add support for Andes ATCSPI200 SPI
Merge series from CL Wang <cl634@andestech.com>: This series adds support for the Andes ATCSPI200 SPI controller.
2 parents 8a3eb50 + 1303c29 commit 65ccce3

5 files changed

Lines changed: 781 additions & 0 deletions

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/spi/andestech,ae350-spi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Andes ATCSPI200 SPI controller
8+
9+
maintainers:
10+
- CL Wang <cl634@andestech.com>
11+
12+
properties:
13+
compatible:
14+
oneOf:
15+
- items:
16+
- enum:
17+
- andestech,qilai-spi
18+
- const: andestech,ae350-spi
19+
- const: andestech,ae350-spi
20+
21+
reg:
22+
maxItems: 1
23+
24+
clocks:
25+
maxItems: 1
26+
27+
num-cs:
28+
description: Number of chip selects supported
29+
maxItems: 1
30+
31+
dmas:
32+
items:
33+
- description: Transmit FIFO DMA channel
34+
- description: Receive FIFO DMA channel
35+
36+
dma-names:
37+
items:
38+
- const: tx
39+
- const: rx
40+
41+
patternProperties:
42+
"@[0-9a-f]+$":
43+
type: object
44+
additionalProperties: true
45+
46+
properties:
47+
spi-rx-bus-width:
48+
enum: [1, 4]
49+
50+
spi-tx-bus-width:
51+
enum: [1, 4]
52+
53+
allOf:
54+
- $ref: spi-controller.yaml#
55+
56+
required:
57+
- compatible
58+
- reg
59+
- clocks
60+
- dmas
61+
- dma-names
62+
63+
unevaluatedProperties: false
64+
65+
examples:
66+
- |
67+
spi@f0b00000 {
68+
compatible = "andestech,ae350-spi";
69+
reg = <0xf0b00000 0x100>;
70+
clocks = <&clk_spi>;
71+
dmas = <&dma0 0>, <&dma0 1>;
72+
dma-names = "tx", "rx";
73+
74+
#address-cells = <1>;
75+
#size-cells = <0>;
76+
77+
flash@0 {
78+
compatible = "jedec,spi-nor";
79+
reg = <0>;
80+
spi-tx-bus-width = <4>;
81+
spi-rx-bus-width = <4>;
82+
spi-cpol;
83+
spi-cpha;
84+
};
85+
};

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,6 +1817,12 @@ S: Supported
18171817
F: drivers/clk/analogbits/*
18181818
F: include/linux/clk/analogbits*
18191819

1820+
ANDES ATCSPI200 SPI DRIVER
1821+
M: CL Wang <cl634@andestech.com>
1822+
S: Supported
1823+
F: Documentation/devicetree/bindings/spi/andestech,ae350-spi.yaml
1824+
F: drivers/spi/spi-atcspi200.c
1825+
18201826
ANDROID DRIVERS
18211827
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18221828
M: Arve Hjønnevåg <arve@android.com>

drivers/spi/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,15 @@ config SPI_AR934X
136136
This enables support for the SPI controller present on the
137137
Qualcomm Atheros AR934X/QCA95XX SoCs.
138138

139+
config SPI_ATCSPI200
140+
tristate "Andes ATCSPI200 SPI controller"
141+
depends on ARCH_ANDES
142+
help
143+
SPI driver for Andes ATCSPI200 SPI controller.
144+
ATCSPI200 controller supports DMA and PIO modes. When DMA
145+
is not available, the driver automatically falls back to
146+
PIO mode.
147+
139148
config SPI_ATH79
140149
tristate "Atheros AR71XX/AR724X/AR913X SPI controller driver"
141150
depends on ATH79 || COMPILE_TEST

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ obj-$(CONFIG_SPI_APPLE) += spi-apple.o
2626
obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o
2727
obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o
2828
obj-$(CONFIG_SPI_ASPEED_SMC) += spi-aspeed-smc.o
29+
obj-$(CONFIG_SPI_ATCSPI200) += spi-atcspi200.o
2930
obj-$(CONFIG_SPI_ATMEL) += spi-atmel.o
3031
obj-$(CONFIG_SPI_ATMEL_QUADSPI) += atmel-quadspi.o
3132
obj-$(CONFIG_SPI_AT91_USART) += spi-at91-usart.o

0 commit comments

Comments
 (0)