Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3286813iog; Mon, 27 Jun 2022 12:55:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tDM+9wRqVrOHKjAToQ9WRHxsbwlN3ycoTpUv1+z+YzjFzaGosMIXJ018NwGMKnAxFbQ6pC X-Received: by 2002:a17:907:1c1a:b0:726:2ce1:955e with SMTP id nc26-20020a1709071c1a00b007262ce1955emr13732836ejc.566.1656359715771; Mon, 27 Jun 2022 12:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656359715; cv=none; d=google.com; s=arc-20160816; b=kuwzGU1AXZwTks9CuMa1lVeMU/trXumZcsNQpkHqTW0FNwjcQy3KMO8SpKKYhwd53J UiP2HNc7DK3asO5xTuqpWO0NvMoQMe8paC6ULv/wDUNmSlvCsLfAa0XkU3CZFMmbY9AP xU7SQ+aqhcHQxf1ylLGfUAVzZrvBakHfJYDHXZQJeIbQbeMdryda+cbez5BdESdlmerE 836it/l/sJHUB8mC4yILuDlvbXqSysq7M5BHzYS3xxTAZGXwYCt9sQWUNfPQkNXEm3E/ WdtWw3NUfEayGZQHrQi6VTkqWFYFXirh864uVQbFPqnZJPQqKXhAuEtsKGx4XFM5jDZd 3O1Q== 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=kjY53JaVzED7+wd9K8n82ntFNbgMLDrOzvHlFsPw2MU641EbBwwVh6BzPbdHcliabJ r8b2e2SRpASR4MSZCYASKLV0SBPbXUKJlYUZmwGjyhb8KWbIb3/fJDuemiaOHbGznZoR 2n2mYSfLUohB5NHiRiY0NuysyPc7/CbPVvxIXp47xjbjSL++bZ8nu3iyF1ll177Cu+ox zAQ3fzqt0n8Kz3xDwcjYuT564vNRJjLKFSWAYQ4sLUrFbOr3wJmo+H2dg3Nj7UjRo+VT aRRff+unqIVs7SZYVsiRfQ9RivUVIk/yhl1D3aLvj2WmZT4zEFCUVTqAXpaLAZUXJf1w szLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@conchuod.ie header.s=google header.b=fBShLNpQ; 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 eb10-20020a0564020d0a00b0043767ebf185si12454799edb.242.2022.06.27.12.54.51; Mon, 27 Jun 2022 12:55:15 -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=fBShLNpQ; 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 S240521AbiF0Tli (ORCPT + 99 others); Mon, 27 Jun 2022 15:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240440AbiF0Tl0 (ORCPT ); Mon, 27 Jun 2022 15:41:26 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9748C1705E for ; Mon, 27 Jun 2022 12:41:24 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id u12-20020a05600c210c00b003a02b16d2b8so6261771wml.2 for ; Mon, 27 Jun 2022 12:41:24 -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=fBShLNpQtv7TUZ91barPFgoTIEUnvm+iOoWI9KSV5y0be3zWz++I0wVDa70W2a6UsW iXrpn0eNJnshM7Kg55T3v/FLL9Q2mB7Ai4DrCGnyMbVk6pF/REgpCn9dUSy7lyAopAD9 j3r06NCn19/uMcLoNccxZH0ckot2X1xiVMt7CCRH8wCkuk+NvcyyAXTP5JeicxJF3HpN rRSWQ2U4ZoJ4LKlwoYlXVySg7PhPnChMKHnphYYQUG21xodnEwaQiTi5aEuy06+GQjjH UFLICFNEkOOqHMpGQhj4Pn3kP2UFmRFdOmnFY32LKUWdvF9DjtySRJa8hHsK5o6snFRV hdcw== 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=NjFKYOd4LE00adcvx0oQdVa1w5xy93LeYwkqJWLecqRYnDG7PdlXlSwQVzI6Ko7LQk 3mY9IbIOxwnGnief9TBsgdkJqy2T9hJdBmNK60IhxihoOBhOFvsbZIgZpXIVUTtxTaWs NQpmG0pgFx7iG/zqMA8kip4NhPcWzaUsIDGDzTJVsZBGDNoJLq+QIIrVJ0KA4beQho4h bEpM/OqxdktRwE7h7nIj7aeqbMiYSGnwPKOk27rFoEMoGbyp2wSkwGeXHvbC9TEjnkcB i+558G+fbfXWvDjXssNiMeNslwGKIHQdhOQuReD8wUNzDo+/XamyQ7CHhM30qaCAKHcp NUmw== X-Gm-Message-State: AJIora/7zSsRii5WmlcIjkCk2DFqGOu+aB9zC+p8pQc+G8j0vJcHYJKf 2C9dgtwQm7mC9UY9XeasbKzclg== X-Received: by 2002:a05:600c:210d:b0:3a0:2eea:bf4b with SMTP id u13-20020a05600c210d00b003a02eeabf4bmr17630369wml.28.1656358883905; Mon, 27 Jun 2022 12:41:23 -0700 (PDT) Received: from henark71.. ([51.37.234.167]) by smtp.gmail.com with ESMTPSA id e9-20020a5d4e89000000b0021a3a87fda9sm11428047wru.47.2022.06.27.12.41.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 12:41:23 -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 v2 05/16] dt-bindings: dma: add Canaan k210 to Synopsys DesignWare DMA Date: Mon, 27 Jun 2022 20:39:53 +0100 Message-Id: <20220627194003.2395484-6-mail@conchuod.ie> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220627194003.2395484-1-mail@conchuod.ie> References: <20220627194003.2395484-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