Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1280061iog; Sat, 18 Jun 2022 05:33:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s+9+lBZkiT6krbpp2bIHdw0Wz4NiVkwLRoNTCs5GL0E+iSrxC1f8nCnN6g9zaJlkSxe60K X-Received: by 2002:a63:485d:0:b0:3fe:2b87:cef6 with SMTP id x29-20020a63485d000000b003fe2b87cef6mr13580806pgk.2.1655555606134; Sat, 18 Jun 2022 05:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655555606; cv=none; d=google.com; s=arc-20160816; b=AuA0W3L1VgTVuxQyB1/jc4cekWzzRzgr53bTei+bX2YGGiSGpJrxnmIHBIuBitl+lS 00McYNJPS0AYAso4C8RgUjC2LILzAPqJDLTlWyEXDNSHWaRY5qd5l5BO7Zr/j2PnBdCY CqSGtvowzsbRI/GqBf9tlIY/A3m2T3MDFrYGOxV/g2Dr8UTNrFeQfM52leHWt7ZjCb9f EaVF0/z9eHe36B759F5RDKUv1/x7uvz+vKwem/KHCsheOPO4X0/L2tLsBElCd0Z8JHEZ /HQV1H5hVkdnriSBmTtxf+V0qcVsWalaQ3BcPkxq/aR6akq1Ar0lX84vjtThPra263NB GZnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=n9g/PqG7lJoC3tmWnVa7QkZ4DkjcrfTJ4GH+uywTgjo=; b=cnNmrQaYVHaR66NHqimgUmb1j0olBQ6+HmU22TnSx4gH8hekZBQ5mNjVLkffHkmF25 svTmvQDlZ+9QfL2Yg6gJqDri5P7e/iaUz0lhyiiKthfq4EJXEAwFJqjvvAjKSLIHgv84 VmEjZfk5bHp89NBJ5HvHyV6Z5r25IwtT+qCViuZR6L4gwynggVmGgS+91QOoSwQFfm6i LKY4pxOl25f/Y6g8lrBtT/lZN/yiMmstPRC81R8srluHEfjwlhG2MJWTy9s8IBV5RXEa oBBTpIicVIRfTrvjQifvk1uAZjDF7yxpry5sGB+x3GoOsqofHFOxJmh4udFD83Z6+OU+ TNag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b="YKP/o6CN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 142-20020a630294000000b0040c74ec4000si2587783pgc.341.2022.06.18.05.33.14; Sat, 18 Jun 2022 05:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b="YKP/o6CN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=conchuod.ie Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235500AbiFRMcZ (ORCPT + 99 others); Sat, 18 Jun 2022 08:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234412AbiFRMcI (ORCPT ); Sat, 18 Jun 2022 08:32:08 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D84C3183A0 for ; Sat, 18 Jun 2022 05:32:06 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id i10so5053390wrc.0 for ; Sat, 18 Jun 2022 05:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conchuod.ie; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n9g/PqG7lJoC3tmWnVa7QkZ4DkjcrfTJ4GH+uywTgjo=; b=YKP/o6CNE+lQ/JvutgsR0jZOXfHfDWCY/dQhqMKd5OzvitLi7mgxOOlC22neXUi3t3 BN9TvFhMfSVyIRalfKp0Va337xJ573OA/jlHmNvKMC9gL9WCqqIk9PYa0TsCVpUjtR8B tbSkAAYjMwonv2CjEuI0NKpP3MKNtmcrz4U2Kau04jp49doWSVikIYXLNtIJ0CbxpRRk ACyFnBPLFEDO8mQ9dOPY47H5osv138u3PU28fgbHfr0fyUMw+29W9vwD1hyvLo5Y4+V/ UZtdS0DFsqY5lgkZ/53LD/FQ/OdBPmTBXN7bsmN9ILMpN1rxcP2HcJnRbBzUtni7FWjs qlYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n9g/PqG7lJoC3tmWnVa7QkZ4DkjcrfTJ4GH+uywTgjo=; b=krMHx0gwwszUWyv7Xa3wf5ALj8NGnVeDlshojp1UJd+LxLtZSPgR5zzlZgMfigEvu2 WCuBBAMpUeQr6kzOxlY+eCZ7EBuRnYKUP/Dq8PMElE87SEVXuqQAKhp/lFnE9XYoNtZ+ ZqByBpIvVxdpJXaklS3F+JPUDmcbTPID6Bfn+W+hbD2eMfFCIS7IkUqlEh9wZK0sn5XJ re1b/7Nbb1lGkgsELL7vignncPV7JI2URK/8QGnIezOQaXB3IMOnbwpy7CYIY52EG+1S HU+JJUqmOw4ot0xSMYmQjaqxUVGfeilOerDE/V8cVb8gpksFU0W6LA0HkTrK7K2dR1M0 QnBg== X-Gm-Message-State: AJIora/JAxlXHpD+/ZS7Y6lfsmTD2rCKrS5TyJOhj9hfdLSVabrpfh3u alwutPH1sgRCDTi+baXr8WbEAw== X-Received: by 2002:a5d:4251:0:b0:21b:885b:2fcc with SMTP id s17-20020a5d4251000000b0021b885b2fccmr1452539wrr.52.1655555526382; Sat, 18 Jun 2022 05:32:06 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id az10-20020adfe18a000000b00210396b2eaesm9292305wrb.45.2022.06.18.05.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 05:32:05 -0700 (PDT) From: Conor Dooley To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Serge Semin , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt Cc: 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: [PATCH 04/14] dt-bindings: dma: add Canaan k210 to Synopsys DesignWare DMA Date: Sat, 18 Jun 2022 13:30:26 +0100 Message-Id: <20220618123035.563070-5-mail@conchuod.ie> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220618123035.563070-1-mail@conchuod.ie> References: <20220618123035.563070-1-mail@conchuod.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 + - 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>; #dma-cells = <1>; dma-channels = <4>; snps,dma-masters = <2>; -- 2.36.1