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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6963C433EF for ; Mon, 27 Jun 2022 23:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240762AbiF0X3Z (ORCPT ); Mon, 27 Jun 2022 19:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241073AbiF0X3X (ORCPT ); Mon, 27 Jun 2022 19:29:23 -0400 Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F32F02E0; Mon, 27 Jun 2022 16:29:22 -0700 (PDT) Received: by mail-io1-f42.google.com with SMTP id m13so11310849ioj.0; 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=yqYAwuyoJKZSa312XTnivAQHPii87hASp8fSD23h96MXfF55DyKtOsOkdE+7H/myeI WtDpvLz5iY2z7QGMVcjEHNy5oOHMuPOqkbEIC+NjuBaM5NZxzbSHq8VqLwTH7x+L7tNZ pB/13F7ZCiObiF/QeifRoIg/rXXNPU1sL18ryRuJBj9hL/KTFaWaSQkrCRoGu7C5JCtv 6riterv80nscCBEpC9BFTm+VcufYH7NvuL2zcKWWx9E3zT6psggXMmLzC0PK3NjjJQS4 idEH6FV9f4m2WncrC0S2JxSjp9TDiA97TPHLvjVvqRhdqDvHl8WtnoJC4nZnQ0vM3BdQ dbrQ== X-Gm-Message-State: AJIora9KzyTtlhlVWC7564NccuB9opvmX6D9HgiW6J+2AAckfHySJG18 hNxLDKXjD2jKuM2w+jD8JQ== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220618123035.563070-5-mail@conchuod.ie> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 > >