Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1629558pxb; Wed, 9 Feb 2022 00:34:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuPEX6Fkn0eWqvPslmlERo3cbNhpMKPThvRs7a1qrCuSnmzhAdVbrTR3o70Ldo3NUpVIxh X-Received: by 2002:a17:902:d4ca:: with SMTP id o10mr1129822plg.29.1644395651117; Wed, 09 Feb 2022 00:34:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644395651; cv=none; d=google.com; s=arc-20160816; b=zugPlINcBOdxS0nWYEyEA5itCPQm6gt9NuQZo0UENJ7JhWREWJSaoqPxxc7I5Ol+kq leppp8LFTMkLCYe0rxpuh+vvyBPmU2UNWmeICTMaQ3kYoQnBoSAYNctRhejhYKPZKmbg oD9x2Qqnxsr1qXVafoFQnkL6/j2MzM8HBdUgvQe9sHY/x9zg3QZ8eIsNu9dUTr/c4yEK Py5J5CDziGqQBuAjeMcKjWqmQ/xvv45Q7cscm7DIsH1A2rVJbMJObY5Ai/ZNfjZGIIAp K1zSfiZoMGBX94STsqjtXcQtMpziDnY3HGuO3C9LYIjvqkdLfjFvZAX1mQkcjRCNrSYg stRw== 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=osho4FvgLzowJuFLyZCnSgKHB8Ho1YEMLsQwVPBIhrQ=; b=zG6EetPYmZAgUvnO48eUy2LB8/VSe8yubisMjurhv09PbULMKj5Z2pSlmCaPOn/oWo 0KsEMc6sTT3UMm32Ou63oSOgBDpkNdno4oCbAnSkxMNNgyWdpouplaLAlMMIr/w4s2nC Eq8bFClIVwcSs7mt82c7HFre4JrzhHtVPyV7f+O0mV9Tbl0FfMWeJYw5R5kwHfQj5ATL 98TzyrWLvSp8sFAq564Kl0OWtObdIuWlSlSK1UYi6zZ8dieSeTNwTrXVjVq3zJJw++yt tsyRW86KcpP049q0LI8xaOaNlyeebWxutbVufHpyrp5PhA6TltNFNuXJcgy9Kmx82/jx FVhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=aYEV+dyL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u10si3367955ple.311.2022.02.09.00.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 00:34:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=aYEV+dyL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA946C050CD7; Wed, 9 Feb 2022 00:34:00 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242642AbiBGGgE (ORCPT + 99 others); Mon, 7 Feb 2022 01:36:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233718AbiBGGbR (ORCPT ); Mon, 7 Feb 2022 01:31:17 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15F78C043188 for ; Sun, 6 Feb 2022 22:30:51 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id t9so8185471plg.13 for ; Sun, 06 Feb 2022 22:30:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=osho4FvgLzowJuFLyZCnSgKHB8Ho1YEMLsQwVPBIhrQ=; b=aYEV+dyLB+amBduXwKLTJW/3/KSl0vdvVUWqaLhgwH4B52TecfYl5wCP1ZsiORX1CB 6hlKB8KJmLK9j+we7MeXGW6G05ckobQjwsznT1kEQiadEJyLHzDccSzCK9AzYAuaTRCM K4KcKEkTnnNOt1MxOYkMnFNv3yFdmEFTCib5cwP+6y/bm82FjQbng91jGTlkRTjSNeGB +WdbeFm4zHYH/AZll9BgHaTYRZ2bjnigbxMujoB+FVhkClPBDL0Cywwc+18lTVbUP5Q7 Ax4GJY29WBjjomuDf+oLTC/bLe713unqaaNjg2z2DmSWFEbapAdr5MvSsxKjydf2Fhfk Bo1g== 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=osho4FvgLzowJuFLyZCnSgKHB8Ho1YEMLsQwVPBIhrQ=; b=EV65Cu3Q+WtCkatKhWxI+1K7jMHt2DikcQsMEzDnFZJY8TjBn/6vgiGeNpRuS0balZ 6BbVkCI5H2PmdlaADGjkp+U13GkTXLHkrR3X0DKCxhPF9CZj55ApiPlW9YEDsj66OAtv 3k9xU+YbQRdLjN1BXkAUrxecIZJHynI+NCgBi057L4b0fbvIqv3NXQhVgaLhCofxNw6Z 4kaora7h4JdoAmRLc2euwbTlWwfkN7y28ZC2BdgUjaV1mHjDzistmMHrrL551iNQjaua 1KqKkvup/N9EYpDBH4OJFNfC142iTXjKSeCEpDkcf9kSprZ0/fJnveGzOy6ptxpW17u3 a/3w== X-Gm-Message-State: AOAM533bkOdJk413wsYXi7ufehpt9xhJAt7CZjZAhQdYl8rwDmjcf+oo hFs/WYIjbYiVicNsDUIi27mhQw== X-Received: by 2002:a17:90a:eb0f:: with SMTP id j15mr7879986pjz.155.1644215450600; Sun, 06 Feb 2022 22:30:50 -0800 (PST) Received: from hsinchu16.internal.sifive.com (59-124-168-89.hinet-ip.hinet.net. [59.124.168.89]) by smtp.gmail.com with ESMTPSA id i10sm5266634pjd.2.2022.02.06.22.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 22:30:50 -0800 (PST) From: Zong Li To: robh+dt@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, krzysztof.kozlowski@canonical.com, conor.dooley@microchip.com, geert@linux-m68k.org, bin.meng@windriver.com, green.wan@sifive.com, vkoul@kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Zong Li , Palmer Dabbelt Subject: [PATCH v5 1/3] dt-bindings: Add dma-channels property and modify compatible Date: Mon, 7 Feb 2022 14:30:38 +0800 Message-Id: <30430019105af445d52b7a48331c106f8e6d6816.1644215230.git.zong.li@sifive.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Add dma-channels property, then we can determine how many channels there by device tree, rather than statically defining it in PDMA driver. In addition, we also modify the compatible for PDMA versioning scheme. Signed-off-by: Zong Li Suggested-by: Palmer Dabbelt --- .../bindings/dma/sifive,fu540-c000-pdma.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml index 75ad898c59bc..92f410f54d72 100644 --- a/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml +++ b/Documentation/devicetree/bindings/dma/sifive,fu540-c000-pdma.yaml @@ -25,7 +25,15 @@ description: | properties: compatible: items: - - const: sifive,fu540-c000-pdma + - enum: + - sifive,fu540-c000-pdma + - const: sifive,pdma0 + description: + Should be "sifive,-pdma" and "sifive,pdma". + Supported compatible strings are - + "sifive,fu540-c000-pdma" for the SiFive PDMA v0 as integrated onto the + SiFive FU540 chip resp and "sifive,pdma0" for the SiFive PDMA v0 IP block + with no chip integration tweaks. reg: maxItems: 1 @@ -34,6 +42,12 @@ properties: minItems: 1 maxItems: 8 + dma-channels: + description: For backwards-compatibility, the default value is 4 + minimum: 1 + maximum: 4 + default: 4 + '#dma-cells': const: 1 @@ -48,8 +62,9 @@ additionalProperties: false examples: - | dma@3000000 { - compatible = "sifive,fu540-c000-pdma"; + compatible = "sifive,fu540-c000-pdma", "sifive,pdma0"; reg = <0x3000000 0x8000>; + dma-channels = <4>; interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>, <30>; #dma-cells = <1>; }; -- 2.31.1