Skip to content

Commit 317fb4c

Browse files
committed
support for amlogic the new SPI IP
Merge series from Xianwei Zhao <[email protected]>: Introduced support for the new SPI IP (SPISG). The SPISG is a communication-oriented SPI controller from Amlogic,supporting three operation modes: PIO, block DMA, and scatter-gather DMA. Add the drivers and device tree bindings corresponding to the SPISG.
2 parents 1f590fa + 0ef2a97 commit 317fb4c

File tree

5 files changed

+966
-0
lines changed

5 files changed

+966
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
# Copyright (C) 2025 Amlogic, Inc. All rights reserved
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/spi/amlogic,a4-spisg.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Amlogic SPI Scatter-Gather Controller
9+
10+
maintainers:
11+
- Xianwei Zhao <[email protected]>
12+
- Sunny Luo <[email protected]>
13+
14+
allOf:
15+
- $ref: spi-controller.yaml#
16+
17+
properties:
18+
compatible:
19+
const: amlogic,a4-spisg
20+
21+
reg:
22+
maxItems: 1
23+
24+
interrupts:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 2
29+
30+
clock-names:
31+
items:
32+
- const: core
33+
- const: pclk
34+
35+
resets:
36+
maxItems: 1
37+
38+
required:
39+
- compatible
40+
- reg
41+
- interrupts
42+
- clocks
43+
- clock-names
44+
45+
unevaluatedProperties: false
46+
47+
examples:
48+
- |
49+
#include <dt-bindings/interrupt-controller/arm-gic.h>
50+
spi@50000 {
51+
compatible = "amlogic,a4-spisg";
52+
reg = <0x50000 0x38>;
53+
interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
54+
clocks = <&clkc 37>,
55+
<&clkc 93>;
56+
clock-names = "core", "pclk";
57+
#address-cells = <1>;
58+
#size-cells = <0>;
59+
};

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,15 @@ S: Maintained
13061306
F: Documentation/devicetree/bindings/rtc/amlogic,a4-rtc.yaml
13071307
F: drivers/rtc/rtc-amlogic-a4.c
13081308

1309+
AMLOGIC SPISG DRIVER
1310+
M: Sunny Luo <[email protected]>
1311+
M: Xianwei Zhao <[email protected]>
1312+
1313+
1314+
S: Maintained
1315+
F: Documentation/devicetree/bindings/spi/amlogic,a4-spisg.yaml
1316+
F: drivers/spi/spi-amlogic-spisg.c
1317+
13091318
AMPHENOL CHIPCAP 2 DRIVER
13101319
M: Javier Carrasco <[email protected]>
13111320

drivers/spi/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ config SPI_AMLOGIC_SPIFC_A1
9999
This enables master mode support for the SPIFC (SPI flash
100100
controller) available in Amlogic A1 (A113L SoC).
101101

102+
config SPI_AMLOGIC_SPISG
103+
tristate "Amlogic SPISG controller"
104+
depends on COMMON_CLK
105+
depends on ARCH_MESON || COMPILE_TEST
106+
help
107+
This enables master mode support for the SPISG (SPI scatter-gather
108+
communication controller), which is available on platforms such as
109+
Amlogic A4 SoCs.
110+
102111
config SPI_APPLE
103112
tristate "Apple SoC SPI Controller platform driver"
104113
depends on ARCH_APPLE || COMPILE_TEST

drivers/spi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-$(CONFIG_SPI_ALTERA) += spi-altera-platform.o
2020
obj-$(CONFIG_SPI_ALTERA_CORE) += spi-altera-core.o
2121
obj-$(CONFIG_SPI_ALTERA_DFL) += spi-altera-dfl.o
2222
obj-$(CONFIG_SPI_AMLOGIC_SPIFC_A1) += spi-amlogic-spifc-a1.o
23+
obj-$(CONFIG_SPI_AMLOGIC_SPISG) += spi-amlogic-spisg.o
2324
obj-$(CONFIG_SPI_APPLE) += spi-apple.o
2425
obj-$(CONFIG_SPI_AR934X) += spi-ar934x.o
2526
obj-$(CONFIG_SPI_ARMADA_3700) += spi-armada-3700.o

0 commit comments

Comments
 (0)