public inbox for linux-mips@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Binbin Zhou <zhoubinbin@loongson.cn>
Cc: Binbin Zhou <zhoubb.aaron@gmail.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>,
	dmaengine@vger.kernel.org,
	Xiaochuang Mao <maoxiaochuan@loongson.cn>,
	Huacai Chen <chenhuacai@kernel.org>,
	Xuerui Wang <kernel@xen0n.name>,
	loongarch@lists.linux.dev, devicetree@vger.kernel.org,
	Keguang Zhang <keguang.zhang@gmail.com>,
	linux-mips@vger.kernel.org, jeffbai@aosc.io
Subject: Re: [PATCH v2 3/4] dt-bindings: dmaengine: Add Loongson Multi-Channel DMA controller
Date: Mon, 9 Feb 2026 21:03:46 -0600	[thread overview]
Message-ID: <20260210030346.GA2406064-robh@kernel.org> (raw)
In-Reply-To: <36cc977f0746095196354b631f0b158365208a0e.1770605931.git.zhoubinbin@loongson.cn>

On Mon, Feb 09, 2026 at 11:04:20AM +0800, Binbin Zhou wrote:
> 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.
> 
> Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
>  .../bindings/dma/loongson,ls2k0300-dma.yaml   | 78 +++++++++++++++++++
>  MAINTAINERS                                   |  3 +-
>  2 files changed, 80 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
> 
> diff --git a/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml b/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
> new file mode 100644
> index 000000000000..77e5df47ec01
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
> @@ -0,0 +1,78 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/loongson,ls2k0300-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Looongson-2 Multi-Channel DMA controller
> +
> +description:
> +  The Loongson-2 Multi-Channel DMA controller is used for transferring data
> +  between system memory and the peripherals on the APB bus.
> +
> +maintainers:
> +  - Binbin Zhou <zhoubinbin@loongson.cn>
> +
> +allOf:
> +  - $ref: dma-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - loongson,ls2k0300-dma
> +      - loongson,ls2k3000-dma
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 4
> +    maxItems: 8

I'm assuming this is 1 interrupt per channel? If so, add a description 
saying that.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  '#dma-cells':
> +    const: 2
> +    description: |
> +      DMA request from clients consists of 2 cells:
> +        1. Channel index
> +        2. Transfer request factor number, If no transfer factor, use 0.
> +           The number is SoC-specific, and this should be specified with
> +           relation to the device to use the DMA controller.
> +
> +  dma-channels:
> +    enum: [4, 8]
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - '#dma-cells'
> +  - dma-channels
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/clock/loongson,ls2k-clk.h>
> +
> +    dma-controller@1612c000 {
> +        compatible = "loongson,ls2k0300-dma";
> +        reg = <0x1612c000 0xff>;
> +        interrupt-parent = <&liointc0>;
> +        interrupts = <23 IRQ_TYPE_LEVEL_HIGH>,
> +                     <24 IRQ_TYPE_LEVEL_HIGH>,
> +                     <25 IRQ_TYPE_LEVEL_HIGH>,
> +                     <26 IRQ_TYPE_LEVEL_HIGH>,
> +                     <27 IRQ_TYPE_LEVEL_HIGH>,
> +                     <28 IRQ_TYPE_LEVEL_HIGH>,
> +                     <29 IRQ_TYPE_LEVEL_HIGH>,
> +                     <30 IRQ_TYPE_LEVEL_HIGH>;
> +        clocks = <&clk LS2K0300_CLK_APB_GATE>;
> +        #dma-cells = <2>;
> +        dma-channels = <8>;
> +    };
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 27f77b68d596..d3cb541aee2a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -14772,10 +14772,11 @@ S:	Maintained
>  F:	Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml
>  F:	drivers/gpio/gpio-loongson-64bit.c
>  
> -LOONGSON-2 APB DMA DRIVER
> +LOONGSON-2 DMA DRIVER
>  M:	Binbin Zhou <zhoubinbin@loongson.cn>
>  L:	dmaengine@vger.kernel.org
>  S:	Maintained
> +F:	Documentation/devicetree/bindings/dma/loongson,ls2k0300-dma.yaml
>  F:	Documentation/devicetree/bindings/dma/loongson,ls2x-apbdma.yaml
>  F:	drivers/dma/loongson/loongson2-apb-dma.c
>  
> -- 
> 2.52.0
> 

  reply	other threads:[~2026-02-10  3:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09  3:04 [PATCH v2 0/4] dmaengine: Add Loongson Multi-Channel DMA controller support Binbin Zhou
2026-02-09  3:04 ` [PATCH v2 1/4] dmaengine: loongson: New directory for Loongson DMA controllers drivers Binbin Zhou
2026-02-09 16:48   ` Frank Li
2026-02-10  1:27     ` Binbin Zhou
2026-02-26  8:07       ` Huacai Chen
2026-02-09  3:04 ` [PATCH v2 2/4] dmaengine: loongson: loongson2-apb: Convert to dmaenginem_async_device_register() Binbin Zhou
2026-02-09 16:51   ` Frank Li
2026-02-09  3:04 ` [PATCH v2 3/4] dt-bindings: dmaengine: Add Loongson Multi-Channel DMA controller Binbin Zhou
2026-02-10  3:03   ` Rob Herring [this message]
2026-02-10  6:02     ` Binbin Zhou
2026-02-09  3:04 ` [PATCH v2 4/4] dmaengine: loongson: New driver for the " Binbin Zhou
2026-02-09 17:04   ` Frank Li
2026-02-10  7:41     ` Binbin Zhou
2026-02-10 12:02       ` Binbin Zhou
2026-02-10 15:27         ` Frank Li
2026-02-24 12:59           ` Binbin Zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260210030346.GA2406064-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jeffbai@aosc.io \
    --cc=keguang.zhang@gmail.com \
    --cc=kernel@xen0n.name \
    --cc=krzk+dt@kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=maoxiaochuan@loongson.cn \
    --cc=vkoul@kernel.org \
    --cc=zhoubb.aaron@gmail.com \
    --cc=zhoubinbin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox