Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: dmaengine: Add Loongson Multi-Channel DMA controller

The Loongson-2K0300/Loongson-2K3000 have built-in multi-channel DMA
controllers, which are similar except for some of the register offsets
and number of channels.

Obviously, this is quite different from the APB DMA controller used in
the Loongson-2K0500/Loongson-2K1000, such as the latter being a
single-channel DMA controller.

To avoid cluttering a single dt-binding file, add a new yaml file.

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/135802de72b84f643d0b0624f3f79f13777147a1.1772853681.git.zhoubinbin@loongson.cn
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Binbin Zhou and committed by
Vinod Koul
7a65e81e 9de4303f

+83 -1
+81
Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/dma/loongson,ls2k0300-dma.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Looongson-2 Multi-Channel DMA controller 8 + 9 + description: 10 + The Loongson-2 Multi-Channel DMA controller is used for transferring data 11 + between system memory and the peripherals on the APB bus. 12 + 13 + maintainers: 14 + - Binbin Zhou <zhoubinbin@loongson.cn> 15 + 16 + allOf: 17 + - $ref: dma-controller.yaml# 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - loongson,ls2k0300-dma 23 + - loongson,ls2k3000-dma 24 + 25 + reg: 26 + maxItems: 1 27 + 28 + interrupts: 29 + description: 30 + Should contain all of the per-channel DMA interrupts in ascending order 31 + with respect to the DMA channel index. 32 + minItems: 4 33 + maxItems: 8 34 + 35 + clocks: 36 + maxItems: 1 37 + 38 + '#dma-cells': 39 + const: 2 40 + description: | 41 + DMA request from clients consists of 2 cells: 42 + 1. Channel index 43 + 2. Transfer request factor number, If no transfer factor, use 0. 44 + The number is SoC-specific, and this should be specified with 45 + relation to the device to use the DMA controller. 46 + 47 + dma-channels: 48 + enum: [4, 8] 49 + 50 + required: 51 + - compatible 52 + - reg 53 + - interrupts 54 + - clocks 55 + - '#dma-cells' 56 + - dma-channels 57 + 58 + unevaluatedProperties: false 59 + 60 + examples: 61 + - | 62 + #include <dt-bindings/interrupt-controller/irq.h> 63 + #include <dt-bindings/clock/loongson,ls2k-clk.h> 64 + 65 + dma-controller@1612c000 { 66 + compatible = "loongson,ls2k0300-dma"; 67 + reg = <0x1612c000 0xff>; 68 + interrupt-parent = <&liointc0>; 69 + interrupts = <23 IRQ_TYPE_LEVEL_HIGH>, 70 + <24 IRQ_TYPE_LEVEL_HIGH>, 71 + <25 IRQ_TYPE_LEVEL_HIGH>, 72 + <26 IRQ_TYPE_LEVEL_HIGH>, 73 + <27 IRQ_TYPE_LEVEL_HIGH>, 74 + <28 IRQ_TYPE_LEVEL_HIGH>, 75 + <29 IRQ_TYPE_LEVEL_HIGH>, 76 + <30 IRQ_TYPE_LEVEL_HIGH>; 77 + clocks = <&clk LS2K0300_CLK_APB_GATE>; 78 + #dma-cells = <2>; 79 + dma-channels = <8>; 80 + }; 81 + ...
+2 -1
MAINTAINERS
··· 14948 14948 F: Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml 14949 14949 F: drivers/gpio/gpio-loongson-64bit.c 14950 14950 14951 - LOONGSON-2 APB DMA DRIVER 14951 + LOONGSON-2 DMA DRIVER 14952 14952 M: Binbin Zhou <zhoubinbin@loongson.cn> 14953 14953 L: dmaengine@vger.kernel.org 14954 14954 S: Maintained 14955 + F: Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml 14955 14956 F: Documentation/devicetree/bindings/dma/loongson,ls2x-apbdma.yaml 14956 14957 F: drivers/dma/loongson/loongson2-apb-dma.c 14957 14958