From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B40E8C433E1 for ; Thu, 16 Jul 2020 19:49:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D75020657 for ; Thu, 16 Jul 2020 19:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LQObHkt1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D75020657 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8v4IeW8LEaFc0D7luhprniQSFyzVZNwCb93RqN1QqMM=; b=LQObHkt1BjJ4MsM0lSZ3ttq+y b3WZv9cwjroPgKBvcV3StJpng9FeE9NnQzwahrkzqOKVt5T+VgS7wzKA39G6kYbx+ZIhvcpHOmZ9q 0N/z5riZ1qQ/0PB1IINaLZxLQeRqPViND9EyDPDl04dIcMqcrn7DojZZBnT23oTTr5gP3NHDSoIVb 1Q+P28AB8HlpHWolmfidCThB0U+p81lK2zmb28iFMtY08qjpnjp0AoBIX5O6/GuDzlwxPHXIVZZ6j b+swtgIdOa/TN8hesUjQ8Wirc4puMzjxlzw0Fw5in8Ar9OLNrYHbxWGgGofEcyEXCkjHVnoDJAOul KuwpQKi0w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw9rE-0002s8-To; Thu, 16 Jul 2020 19:47:52 +0000 Received: from mail-io1-f68.google.com ([209.85.166.68]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jw9rB-0002rc-VM for linux-arm-kernel@lists.infradead.org; Thu, 16 Jul 2020 19:47:51 +0000 Received: by mail-io1-f68.google.com with SMTP id e64so7290941iof.12 for ; Thu, 16 Jul 2020 12:47:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JhCyixCktHEpyKaSj8J8HBrewJpvrxr4Dobi9P1P5eg=; b=Dih3JuafPxIdt7ksFxUlQCnj00lA5k+wYof/AikBTkAtXAxkzFGpIA4HHoIYBTvpsK 7y6nu3hDmlqIY487AgMRjSwnYaKuB0SXzhmCJLudCS3HtgIUi0KEScyZSjAJfAFbiW8P AONxpBVfyJd68+rBZc3k9ipcEVYS05rnz5zul7H2QkInUsvdPid+JVebQOggopfFu9C0 whsUal1xDCZLjp6R4rxL0g479tzzuToQPfZu6hDr1nI6EhPcHWFyv+gYSM58xpXnO0s8 oUbrqEHDJvNYxpYBC2qvt70zTSCRfObYrvQ1S6nnuzW5nRuW8oLjLaHbspZiHuxYUEBl QhJg== X-Gm-Message-State: AOAM532fP3zxw3EO5iiEb4X6WxaUTnhUNVizXwoeZ3+QRUOszHRY0djq x1PKbCpJyaF6M5HslqK/+w== X-Google-Smtp-Source: ABdhPJzNpwEG5H8u/oWt6PabRVpHiT4bMEtqypidWvr8oM/6+PNVOrAOA5uh9w5O8XFY9KPSmwmwTQ== X-Received: by 2002:a02:5e88:: with SMTP id h130mr7093109jab.116.1594928868688; Thu, 16 Jul 2020 12:47:48 -0700 (PDT) Received: from xps15 ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id v13sm3195024iox.12.2020.07.16.12.47.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 12:47:48 -0700 (PDT) Received: (nullmailer pid 2731552 invoked by uid 1000); Thu, 16 Jul 2020 19:47:46 -0000 Date: Thu, 16 Jul 2020 13:47:46 -0600 From: Rob Herring To: Robin Gong Subject: Re: [PATCH v2 6/9] dt-bindings: dma: add fsl-edma3 yaml Message-ID: <20200716194746.GA2716872@bogus> References: <1594748508-22179-1-git-send-email-yibin.gong@nxp.com> <1594748508-22179-7-git-send-email-yibin.gong@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1594748508-22179-7-git-send-email-yibin.gong@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200716_154750_060228_F7682C49 X-CRM114-Status: GOOD ( 19.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, will@kernel.org, angelo@sysam.it, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, vkoul@kernel.org, linux-imx@nxp.com, kernel@pengutronix.de, catalin.marinas@arm.com, dmaengine@vger.kernel.org, dan.j.williams@intel.com, festevam@gmail.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 15, 2020 at 01:41:45AM +0800, Robin Gong wrote: > Add device binding doc for fsl-edma3 driver. > > Signed-off-by: Robin Gong > --- > .../devicetree/bindings/dma/nxp,fsl-edma3.yaml | 134 +++++++++++++++++++++ > 1 file changed, 134 insertions(+) > create mode 100644 Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml > > diff --git a/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml b/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml > new file mode 100644 > index 00000000..ebdad90 > --- /dev/null > +++ b/Documentation/devicetree/bindings/dma/nxp,fsl-edma3.yaml > @@ -0,0 +1,134 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/dma/nxp,fsl-edma3.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP eDMA3 Controller > + > +maintainers: > + - Robin Gong > + > +allOf: > + - $ref: "dma-controller.yaml#" > + > +properties: > + compatible: > + items: > + - enum: > + - fsl,imx8qm-edma # i.mx8qm/qxp > + > + reg: > + minItems: 2 > + maxItems: 32 Needs some sort of description as to what each region is. > + > + interrupts: > + minItems: 2 > + maxItems: 32 ditto > + > + interrupt-names: > + minItems: 2 > + maxItems: 32 > + items: > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" What about interrupts 8-31? If you want a pattern for all entries, you do: items: pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])-tx|rx+$" (If 'items' is a schema instead of a list, then it applies to all entries.) What does edma[0-2] correspond to? The names should be local to the instance. Really, what's the point of names that just have the channel number in them? The driver can create names dynamically if needed. We already have properties to define how many channels and a mask of present channels. > + > + '#dma-cells': > + const: 3 > + description: | > + The 1st cell specifies the channel ID. > + > + The 2nd cell specifies the channel priority. > + > + The 3rd cell specifies the channel attributes: > + bit0 transmit or receive. > + 0 = transmit > + 1 = receive > + bit1 local or remote access. > + 0 = local > + 1 = remote > + bit2 dualfifo case or not(only in Audio cyclic now). > + 0 = not dual fifo case > + 1 = dualfifo case. > + > + dma-channels: > + minimum: 2 > + maximum: 32 > + > + power-domains: > + minItems: 2 > + maxItems: 32 > + > + power-domain-names: > + minItems: 2 > + maxItems: 32 > + items: > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" > + - pattern: "^edma[0-2]-chan([0-9]|[1-2][0-9]|3[0-1])+$" Again, why do you need names here? > + > +required: > + - compatible > + - reg > + - interrupts > + - interrupt-names > + - '#dma-cells' > + - dma-channels > + - power-domains > + - power-domain-names > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + > + edma2: dma-controller@5a1f0000 { > + compatible = "fsl,imx8qm-edma"; > + reg = <0x5a280000 0x10000>, /* channel8 UART0 rx */ > + <0x5a290000 0x10000>, /* channel9 UART0 tx */ > + <0x5a2a0000 0x10000>, /* channel10 UART1 rx */ > + <0x5a2b0000 0x10000>, /* channel11 UART1 tx */ > + <0x5a2c0000 0x10000>, /* channel12 UART2 rx */ > + <0x5a2d0000 0x10000>, /* channel13 UART2 tx */ > + <0x5a2e0000 0x10000>, /* channel14 UART3 rx */ > + <0x5a2f0000 0x10000>; /* channel15 UART3 tx */ > + #dma-cells = <3>; > + dma-channels = <8>; > + interrupts = , > + , > + , > + , > + , > + , > + , > + ; > + interrupt-names = "edma2-chan8-rx", "edma2-chan9-tx", > + "edma2-chan10-rx", "edma2-chan11-tx", > + "edma2-chan12-rx", "edma2-chan13-tx", > + "edma2-chan14-rx", "edma2-chan15-tx"; > + power-domains = <&pd IMX_SC_R_DMA_2_CH8>, > + <&pd IMX_SC_R_DMA_2_CH9>, > + <&pd IMX_SC_R_DMA_2_CH10>, > + <&pd IMX_SC_R_DMA_2_CH11>, > + <&pd IMX_SC_R_DMA_2_CH12>, > + <&pd IMX_SC_R_DMA_2_CH13>, > + <&pd IMX_SC_R_DMA_2_CH14>, > + <&pd IMX_SC_R_DMA_2_CH15>; > + power-domain-names = "edma2-chan8", "edma2-chan9", > + "edma2-chan10", "edma2-chan11", > + "edma2-chan12", "edma2-chan13", > + "edma2-chan14", "edma2-chan15"; > + }; > -- > 2.7.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel