Skip to content
Open
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
70 changes: 70 additions & 0 deletions Documentation/devicetree/bindings/dma/spacemit,k1-pdma.yaml

@unicornx unicornx Jul 7, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2nd review:

存在类似 #319 (comment) 的问题,请改正

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/dma/spacemit,k1-pdma.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SpacemiT K1 PDMA Controller

maintainers:
- Guodong Xu <guodong@riscstar.com>

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

properties:
compatible:
enum:
- spacemit,k1-pdma
- spacemit,k3-pdma

reg:
maxItems: 1

interrupts:
description: Shared interrupt for all DMA channels
maxItems: 1

clocks:
maxItems: 1

resets:
maxItems: 1

dma-channels:
maximum: 16

'#dma-cells':
const: 1
description:
The DMA request number for the peripheral device.

required:
- compatible
- reg
- interrupts
- clocks
- resets
- dma-channels
- '#dma-cells'

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/clock/spacemit,k1-syscon.h>

soc {
#address-cells = <2>;
#size-cells = <2>;

dma-controller@d4000000 {
compatible = "spacemit,k1-pdma";
reg = <0x0 0xd4000000 0x0 0x4000>;
interrupts = <72>;
clocks = <&syscon_apmu CLK_DMA>;
resets = <&syscon_apmu RESET_DMA>;
dma-channels = <16>;
#dma-cells = <1>;
};
};
13 changes: 13 additions & 0 deletions arch/riscv/boot/dts/spacemit/k3.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,18 @@
#reset-cells = <1>;
};

pdma: dma-controller@d4000000 {
compatible = "spacemit,k3-pdma";
reg = <0x0 0xd4000000 0x0 0x4000>;
clocks = <&syscon_apmu CLK_APMU_DMA>;
resets = <&syscon_apmu RESET_APMU_DMA>;
interrupt-parent = <&saplic>;
interrupts = <72 IRQ_TYPE_LEVEL_HIGH>;
dma-channels = <16>;
#dma-cells = <1>;
status = "disabled";
};

uart0: serial@d4017000 {
compatible = "spacemit,k1-uart",
"intel,xscale-uart";
Expand Down Expand Up @@ -912,3 +924,4 @@
};
};
};

Loading
Loading