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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 764A8C433EF for ; Mon, 27 Jun 2022 23:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=mgYLGefsXyUO3rukWu2bzAwJJ9S+34CeCi010LxfYrw=; b=HNxYwW5WkAedAe bjkap6BGLKChRFH/+hpi1hRlmtAeAQ3V8cX/o9y5xKz1XRWUPsI6fOZRi7s6fWTT3HJRhpWglP5ZZ RqoyurvbMwwdnmbmpKXf0awT8F4MoIqvjCA7p9lAVh5orMi3kZ4NioBHcXjrhKG6/ifbDC5J2e2Lv QOyr+6RXhabZ93HuimLAYEQ60S0JjyyHbBdyidtLWFyBXTvz0ai5OyZVSsMFbNTgm+V/lpdw2EbC7 WQCfjFuk+hDvfSOAmxyMgLBHcjF2HqOubOR/sMwyPuP57CzIYuiKwDrFvjeUXuPR5CBGrfpspvRoD AaSc4O0gclRnwLrxPT0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5yAZ-003Gdp-JH; Mon, 27 Jun 2022 23:29:27 +0000 Received: from mail-io1-f50.google.com ([209.85.166.50]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5yAW-003Gc0-I4 for linux-riscv@lists.infradead.org; Mon, 27 Jun 2022 23:29:26 +0000 Received: by mail-io1-f50.google.com with SMTP id v185so4565042ioe.11 for ; Mon, 27 Jun 2022 16:29:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9G9xzfoHgo3vygEsJjR4zL+mofIOaG7ELAHu9EXTEgk=; b=6v+eVJplrAr7qpD9OP3n4j9DDl2ahAinwk4BHLG51j91UXinx9dWIGoLu0r+qVbld6 skdQwcpMKkYppWpVeSPT3BwCHT9HxIKlvFRsStV/DVqTi4HPw4vnFjOq9s+QE8eDpKPS zasdoyDNLdZARTfTSESTcmK9X5kJS7FoNbQg44A8WRbfYuicd24Z/V2JLVEyheQGjWEW iQXwP4rO12cO7gGPsfHvEcoYlkXbNzVxiB5mFaaF+Ar14ssKn/23q6T6ZRDe/jpB/Os4 bY8neg9AFC+fVvn/mc59F7kixvEgH0DMOlNoNI9c7khDH3upXauy0VLfEkJ4q7Yy7WVg baMA== X-Gm-Message-State: AJIora97a4AVbtsAYCA9bJRdyx3bWGSqqAeQuQjLmbSquK9aeqFHyBFw IMnzdOVmwAR84X3thnKxCA== X-Google-Smtp-Source: AGRyM1sVaI1eYRG04ScJ+CraadBpgnU6qQ4m5lVSPiS05KYADu+ifYinUFBXyTBFNfTqo7J/F/cw+w== X-Received: by 2002:a05:6602:729:b0:675:243e:a859 with SMTP id g9-20020a056602072900b00675243ea859mr6337527iox.58.1656372562103; Mon, 27 Jun 2022 16:29:22 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id i39-20020a023b67000000b00339e90e57e6sm5279502jaf.104.2022.06.27.16.29.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 16:29:21 -0700 (PDT) Received: (nullmailer pid 3167512 invoked by uid 1000); Mon, 27 Jun 2022 23:29:19 -0000 Date: Mon, 27 Jun 2022 17:29:19 -0600 From: Rob Herring To: Conor Dooley Cc: David Airlie , Daniel Vetter , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Serge Semin , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt , Thomas Gleixner , Paul Walmsley , Albert Ou , Conor Dooley , Masahiro Yamada , Damien Le Moal , Geert Uytterhoeven , Niklas Cassel , Dillon Min , Heng Sia , Jose Abreu , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-spi@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 04/14] dt-bindings: dma: add Canaan k210 to Synopsys DesignWare DMA Message-ID: <20220627232919.GA3158390-robh@kernel.org> References: <20220618123035.563070-1-mail@conchuod.ie> <20220618123035.563070-5-mail@conchuod.ie> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220618123035.563070-5-mail@conchuod.ie> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_162924_639306_8A4E691A X-CRM114-Status: GOOD ( 22.32 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Sat, Jun 18, 2022 at 01:30:26PM +0100, Conor Dooley wrote: > From: Conor Dooley > > The Canaan k210 apparently has a Sysnopsys Designware AXI DMA > controller, but according to the documentation & devicetree it has 6 > interrupts rather than the standard one. Add a custom compatible that > supports the 6 interrupt configuration which falls back to the standard > binding which is currently the one in use in the devicetree entry. But it works with only 1 interrupt? > > Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58 > Signed-off-by: Conor Dooley > --- > .../bindings/dma/snps,dw-axi-dmac.yaml | 35 ++++++++++++++----- > 1 file changed, 26 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > index 4324a94b26b2..bc85598151ef 100644 > --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > @@ -18,9 +18,13 @@ allOf: > > properties: > compatible: > - enum: > - - snps,axi-dma-1.01a > - - intel,kmb-axi-dma > + oneOf: > + - items: > + - const: canaan,k210-axi-dma > + - const: snps,axi-dma-1.01a I would drop this depending on your need for compatibility. Are you sure on the IP version? It's not really compatible if the number of interrupts is different. > + - enum: > + - snps,axi-dma-1.01a > + - intel,kmb-axi-dma > > reg: > minItems: 1 > @@ -33,9 +37,6 @@ properties: > - const: axidma_ctrl_regs > - const: axidma_apb_regs > > - interrupts: > - maxItems: 1 > - > clocks: > items: > - description: Bus Clock > @@ -92,6 +93,22 @@ properties: > minimum: 1 > maximum: 256 > > +if: > + properties: > + compatible: > + contains: > + const: canaan,k210-axi-dma > + > +then: > + properties: > + interrupts: > + maxItems: 6 > + > +else: > + properties: > + interrupts: > + maxItems: 1 > + > required: > - compatible > - reg > @@ -105,7 +122,7 @@ required: > - snps,priority > - snps,block-size > > -additionalProperties: false > +unevaluatedProperties: false > > examples: > - | > @@ -113,12 +130,12 @@ examples: > #include > /* example with snps,dw-axi-dmac */ > dmac: dma-controller@80000 { > - compatible = "snps,axi-dma-1.01a"; > + compatible = "canaan,k210-axi-dma", "snps,axi-dma-1.01a"; > reg = <0x80000 0x400>; > clocks = <&core_clk>, <&cfgr_clk>; > clock-names = "core-clk", "cfgr-clk"; > interrupt-parent = <&intc>; > - interrupts = <27>; > + interrupts = <27>, <28>, <29>, <30>, <31>, <32>; Does the example really need changing? The old one was correct, right? > #dma-cells = <1>; > dma-channels = <4>; > snps,dma-masters = <2>; > -- > 2.36.1 > > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv