linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Stefan Wahren <stefan.wahren@i2se.com>
Cc: "Vinod Koul" <vkoul@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Ray Jui" <rjui@broadcom.com>,
	"Scott Branden" <sbranden@broadcom.com>,
	"Jassi Brar" <jassisinghbrar@gmail.com>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>,
	"Amit Kucheria" <amitk@kernel.org>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org,
	devicetree@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-pwm@vger.kernel.org, linux-pm@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML
Date: Fri, 9 Jun 2023 15:48:28 -0600	[thread overview]
Message-ID: <20230609214828.GA2519714-robh@kernel.org> (raw)
In-Reply-To: <20230604121223.9625-4-stefan.wahren@i2se.com>

On Sun, Jun 04, 2023 at 02:12:16PM +0200, Stefan Wahren wrote:
> Convert the DT binding document for bcm2835-dma from .txt to YAML.
> Since brcm,dma-channel-mask is considered deprecated use the
> generic property.
> 
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> ---
>  .../bindings/dma/brcm,bcm2835-dma.txt         | 83 ----------------
>  .../bindings/dma/brcm,bcm2835-dma.yaml        | 98 +++++++++++++++++++
>  2 files changed, 98 insertions(+), 83 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
>  create mode 100644 Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> 
> diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
> deleted file mode 100644
> index b6a8cc0978cd..000000000000
> --- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.txt
> +++ /dev/null
> @@ -1,83 +0,0 @@
> -* BCM2835 DMA controller
> -
> -The BCM2835 DMA controller has 16 channels in total.
> -Only the lower 13 channels have an associated IRQ.
> -Some arbitrary channels are used by the firmware
> -(1,3,6,7 in the current firmware version).
> -The channels 0,2 and 3 have special functionality
> -and should not be used by the driver.
> -
> -Required properties:
> -- compatible: Should be "brcm,bcm2835-dma".
> -- reg: Should contain DMA registers location and length.
> -- interrupts: Should contain the DMA interrupts associated
> -		to the DMA channels in ascending order.
> -- interrupt-names: Should contain the names of the interrupt
> -		   in the form "dmaXX".
> -		   Use "dma-shared-all" for the common interrupt line
> -		   that is shared by all dma channels.
> -- #dma-cells: Must be <1>, the cell in the dmas property of the
> -		client device represents the DREQ number.
> -- brcm,dma-channel-mask: Bit mask representing the channels
> -			 not used by the firmware in ascending order,
> -			 i.e. first channel corresponds to LSB.
> -
> -Example:
> -
> -dma: dma@7e007000 {
> -	compatible = "brcm,bcm2835-dma";
> -	reg = <0x7e007000 0xf00>;
> -	interrupts = <1 16>,
> -		     <1 17>,
> -		     <1 18>,
> -		     <1 19>,
> -		     <1 20>,
> -		     <1 21>,
> -		     <1 22>,
> -		     <1 23>,
> -		     <1 24>,
> -		     <1 25>,
> -		     <1 26>,
> -		     /* dma channel 11-14 share one irq */
> -		     <1 27>,
> -		     <1 27>,
> -		     <1 27>,
> -		     <1 27>,
> -		     /* unused shared irq for all channels */
> -		     <1 28>;
> -	interrupt-names = "dma0",
> -			  "dma1",
> -			  "dma2",
> -			  "dma3",
> -			  "dma4",
> -			  "dma5",
> -			  "dma6",
> -			  "dma7",
> -			  "dma8",
> -			  "dma9",
> -			  "dma10",
> -			  "dma11",
> -			  "dma12",
> -			  "dma13",
> -			  "dma14",
> -			  "dma-shared-all";
> -
> -	#dma-cells = <1>;
> -	brcm,dma-channel-mask = <0x7f35>;
> -};
> -
> -
> -DMA clients connected to the BCM2835 DMA controller must use the format
> -described in the dma.txt file, using a two-cell specifier for each channel.
> -
> -Example:
> -
> -bcm2835_i2s: i2s@7e203000 {
> -	compatible = "brcm,bcm2835-i2s";
> -	reg = <	0x7e203000 0x24>;
> -	clocks = <&clocks BCM2835_CLOCK_PCM>;
> -
> -	dmas = <&dma 2>,
> -	       <&dma 3>;
> -	dma-names = "tx", "rx";
> -};
> diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> new file mode 100644
> index 000000000000..a09000a8131f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml
> @@ -0,0 +1,98 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/brcm,bcm2835-dma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: BCM2835 DMA controller
> +
> +maintainers:
> +  - Nicolas Saenz Julienne <nsaenz@kernel.org>
> +
> +description:
> +  The BCM2835 DMA controller has 16 channels in total. Only the lower
> +  13 channels have an associated IRQ. Some arbitrary channels are used by the
> +  VideoCore firmware (1,3,6,7 in the current firmware version). The channels
> +  0, 2 and 3 have special functionality and should not be used by the driver.
> +
> +allOf:
> +  - $ref: "dma-controller.yaml#"

Drop quotes. Please check elsewhere in the series.

With that fixed,

Reviewed-by: Rob Herring <robh@kernel.org>

> +
> +properties:
> +  compatible:
> +    const: brcm,bcm2835-dma
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    description:
> +      Should contain the DMA interrupts associated to the DMA channels in
> +      ascending order.
> +    minItems: 1
> +    maxItems: 16
> +
> +  interrupt-names:
> +    minItems: 1
> +    maxItems: 16
> +
> +  '#dma-cells':
> +    description: The single cell represents the DREQ number.
> +    const: 1
> +
> +  dma-channel-mask:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - "#dma-cells"
> +  - dma-channel-mask
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    dma-controller@7e007000 {
> +      compatible = "brcm,bcm2835-dma";
> +      reg = <0x7e007000 0xf00>;
> +      interrupts = <1 16>,
> +                   <1 17>,
> +                   <1 18>,
> +                   <1 19>,
> +                   <1 20>,
> +                   <1 21>,
> +                   <1 22>,
> +                   <1 23>,
> +                   <1 24>,
> +                   <1 25>,
> +                   <1 26>,
> +                   /* dma channel 11-14 share one irq */
> +                   <1 27>,
> +                   <1 27>,
> +                   <1 27>,
> +                   <1 27>,
> +                   /* unused shared irq for all channels */
> +                   <1 28>;
> +      interrupt-names = "dma0",
> +                        "dma1",
> +                        "dma2",
> +                        "dma3",
> +                        "dma4",
> +                        "dma5",
> +                        "dma6",
> +                        "dma7",
> +                        "dma8",
> +                        "dma9",
> +                        "dma10",
> +                        "dma11",
> +                        "dma12",
> +                        "dma13",
> +                        "dma14",
> +                        "dma-shared-all";
> +        #dma-cells = <1>;
> +        dma-channel-mask = <0x7f35>;
> +    };
> +
> +...
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-06-09 21:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-04 12:12 [PATCH 00/10] ARM: dts: bcm283x: Improve device-trees and bindings Stefan Wahren
2023-06-04 12:12 ` [PATCH 01/10] ARM: dts: bcm283x: Fix pinctrl groups Stefan Wahren
2023-06-04 12:12 ` [PATCH 02/10] dmaengine: bcm2835: also support generic dma-channel-mask Stefan Wahren
2023-06-10 10:52   ` Stefan Wahren
2023-06-04 12:12 ` [PATCH 03/10] dt-bindings: dma: convert bcm2835-dma bindings to YAML Stefan Wahren
2023-06-09 21:48   ` Rob Herring [this message]
2023-06-04 12:12 ` [PATCH 04/10] ARM: dts: bcm2835: adjust DMA nodes Stefan Wahren
2023-06-09 21:54   ` Rob Herring
2023-06-04 12:12 ` [PATCH 05/10] dt-bindings: pwm: convert pwm-bcm2835 bindings to YAML Stefan Wahren
2023-06-07  7:56   ` Uwe Kleine-König
2023-06-09 21:59     ` Rob Herring
2023-06-13  9:02       ` Stefan Wahren
2023-06-13  9:30         ` Uwe Kleine-König
2023-06-09 21:55   ` Rob Herring
2023-06-04 12:12 ` [PATCH 06/10] ARM: dts: bcm283x: Increase pwm-cells Stefan Wahren
2023-06-07  7:56   ` Uwe Kleine-König
2023-06-04 12:12 ` [PATCH 07/10] dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML Stefan Wahren
2023-06-09 21:56   ` Rob Herring
2023-06-04 12:12 ` [PATCH 08/10] dt-bindings: mmc: convert bcm2835-sdhost " Stefan Wahren
2023-06-09 21:56   ` Rob Herring
2023-06-12 14:16   ` Ulf Hansson
2023-06-04 12:12 ` [PATCH 09/10] dt-bindings: thermal: convert bcm2835-thermal " Stefan Wahren
2023-06-09 21:59   ` Rob Herring
2023-06-13  8:25   ` Daniel Lezcano
2023-06-04 12:12 ` [PATCH 10/10] dt-bindings: timer: convert bcm2835-system-timer " Stefan Wahren
2023-06-09 22:00   ` Rob Herring

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=20230609214828.GA2519714-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=amitk@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=jassisinghbrar@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rjui@broadcom.com \
    --cc=rui.zhang@intel.com \
    --cc=sbranden@broadcom.com \
    --cc=stefan.wahren@i2se.com \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=vkoul@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).