Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddma: Add Phytium DDMA controller driver support #142

Merged
merged 2 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions Documentation/devicetree/bindings/dma/phytium-ddma.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
title: Phytium DDMA Controller bindings

description:
The Phytium DDMA is a general-purpose direct memory access
controller capable of supporting 8 independent DMA channels.
Each channel can have up to 32 requests.DMA clients connected
to the Phytium DDMA controller must use the format described
in the dma.txt file, using a two-cell specifier for each
channel:
a phandle to the DMA controller plus the following two integer cells:
1. The channel id
2. The request line number

maintainers:
- Huang Jie <huangjie1663@phytium.com.cn>

allOf:
- $ref: "dma-controller.yaml#"

properties:
"#dma-cells":
const: 2

compatible:
const: phytium,ddma

reg:
maxItems: 1

interrupts:
maxItems: 1

dma-channels:
minItems: 1
maxItems: 8
description: it indicates that the number of channels are used

required:
- compatible
- reg
- interrupts
- dma-channels

unevaluatedProperties: false

examples:
ddma0: ddma@28003000 {
compatible = "phytium,ddma";
reg = <0x0 0x28003000 0x0 0x1000>;
interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <2>;
dma-channels = <8>;
};
...
8 changes: 8 additions & 0 deletions drivers/dma/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,14 @@ config XILINX_ZYNQMP_DPDMA
driver provides the dmaengine required by the DisplayPort subsystem
display driver.

config PHYTIUM_DDMA
bool "Phytium PE220x DDMA support"
depends on (ARCH_PHYTIUM || COMPILE_TEST)
select DMA_ENGINE
select DMA_VIRTUAL_CHANNELS
help
Enable support for Phytium PE220x DDMA controller.

# driver files
source "drivers/dma/bestcomm/Kconfig"

Expand Down
1 change: 1 addition & 0 deletions drivers/dma/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,4 @@ obj-y += mediatek/
obj-y += qcom/
obj-y += ti/
obj-y += xilinx/
obj-y += phytium/
1 change: 1 addition & 0 deletions drivers/dma/phytium/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_PHYTIUM_DDMA) += phytium-ddmac.o
Loading