From patchwork Wed Jun 5 00:33:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Animesh Agarwal X-Patchwork-Id: 13686062 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 47597C25B78 for ; Wed, 5 Jun 2024 00:35:17 +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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=i1RXHZDVmYgIYriUZ5Qjz17EPaybdPO8IhqzwvWkLFs=; b=FIJfu9+qNpsm7U iXaYBKPt1pBJXiOIgoynOZj04uKG/0bFqKg9rgU7mpMDrG14v/YQLK6QA7qQ3Q0VQchqZtELMXJ/x TrgxPpzIw1shvRz3yVIweGySOr3WGPbmRF9/tK7OGUQRJoFp3M1EbzuLKgYbOmAIRb8tIcrvN8Oe5 qM8w5lIqpTChM22MbxkP40VFyaZomqhNyavTXTg0FK53+7zQcgskl69MdhZ7eaoua/WvJ8ow60ZvS tYL6UHYqhrRrrtpYnNVQgiF2INmqTtWzKoefowBzIZLNLzIB7SJzCJjrp8Vdt87QV0fO/Y1qI/M+o mOMarQyfekJQaC8esBKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEecN-00000004J8c-3gSr; Wed, 05 Jun 2024 00:35:07 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEecK-00000004J7S-2UzP for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2024 00:35:06 +0000 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-6c821775f82so2808529a12.0 for ; Tue, 04 Jun 2024 17:35:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717547702; x=1718152502; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aA1Z+/uHiESL1C6u0AjoSDSysxD/CrSzTPkHsaRkf14=; b=SziCKNUdScfWW8DangF02a/WiiIiN8z/kXw8Rv1fXPvUBYpB/wRfseN7SkZaQeux0/ 7vq7SkG8Vyfwsp9ooZMkaGeBMYM6zYyGtff/RV6BW2BqvJhq/En0oM7IObrGLBglucIH vhaqtrZH0JLXyj07Y+I0evpxX0J7Twgf5Q3Om+iXRRztSi5rPszjCK+2FF8CJmcnjN1i zn4LVeTrTP8saTDd3841dFxaeUqufAgkNIrpFOWMFnUdTdEPKIzxN5pwoinr86TAT6is gYxc//weUD8BczIh7yH5xnsOCJA1ROo1D8KhRbigyAPDLxUyj02v//V18m+rluBCbD2x fWlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717547702; x=1718152502; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aA1Z+/uHiESL1C6u0AjoSDSysxD/CrSzTPkHsaRkf14=; b=TBpoOvUghiD1Us/yg9HbGsjJykD1Nd0AumQA+TiusUwE9k3fZhNOGd4pFptE48+0wQ e2KKhOxO4EksvbfdmG8jeaJzXLeAVt2Ig81ZAqzd4tmLS8k74c8vR0WYCMANjVl5qy1b v5iwGGNwyVNsK/86GbDDSBtmaub1+T/KC32stcFi3nExlKKMz9uC83CsRy8Qgig107ny Arv3qtMu2uxvLnLONhvY+CzsTSLF2EOb/74nY7J8zNltV6BMjH4QXZ5Le1psc6oAsi3i ik3M1ASUAeS7JtMh0vH4PQvfONazXFw7UnCLo59nW38fL1jxF5pTonCB1o8XERMwYHNw jiXg== X-Forwarded-Encrypted: i=1; AJvYcCXocRk7/IT2eg8M9RZgvJDhvL/PyPdqaHex3pdQwAC73EafGm39+W38teAH8WUGw8hFO85RukTUuAUrNIQJk+R+ba38AB3h1D++WxS8loCT12d427E= X-Gm-Message-State: AOJu0YzFjIEFtyLEki2dz36GbxKCmvw35rsyQ/4f9nG8BZH6pOW7p9nd GGGPmMkDL5U1xkvx770D6BkWNdrse82RUywRWz3gpnHaj6ZuZ5rf X-Google-Smtp-Source: AGHT+IECMtofxgy9m+D2qICFDygqTx1znDOV3RpwpoCHC+OgquuNMQwqWRxprF0EbPSuxaU3FXhRcw== X-Received: by 2002:a05:6a20:3c90:b0:1b1:d2a5:c7b1 with SMTP id adf61e73a8af0-1b2b713c6d7mr1471794637.49.1717547701948; Tue, 04 Jun 2024 17:35:01 -0700 (PDT) Received: from fedora.one.one.one.one ([2405:201:6013:c0b2:ea4b:30e0:4e3a:ab56]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70262c7d382sm4557087b3a.106.2024.06.04.17.34.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 17:35:01 -0700 (PDT) From: Animesh Agarwal To: Cc: animeshagarwal28@gmail.com, Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] dt-bindings: dma: fsl,imx-dma: Convert to dtschema Date: Wed, 5 Jun 2024 06:03:49 +0530 Message-ID: <20240605003356.46458-1-animeshagarwal28@gmail.com> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240604_173504_766341_61925958 X-CRM114-Status: GOOD ( 19.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert the fsl i.MX DMA controller bindings to DT schema. Remove old and deprecated properties #dma-channels and #dma-requests. Signed-off-by: Animesh Agarwal Reviewed-by: Krzysztof Kozlowski --- Changes in v3: - Changed maximum: 16 back to const: 16 as the device use exactly 16 channels. Changes in v2: - Added description for each interrupt item. - Changed dma-channels: const: 16 to maximum: 16. - Removed unnecessary '|' character. - Dropped unused label. --- .../devicetree/bindings/dma/fsl,imx-dma.yaml | 56 +++++++++++++++++++ .../devicetree/bindings/dma/fsl-imx-dma.txt | 50 ----------------- 2 files changed, 56 insertions(+), 50 deletions(-) create mode 100644 Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml delete mode 100644 Documentation/devicetree/bindings/dma/fsl-imx-dma.txt diff --git a/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml new file mode 100644 index 000000000000..902a11f65be2 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/fsl,imx-dma.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/fsl,imx-dma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Direct Memory Access (DMA) Controller for i.MX + +maintainers: + - Animesh Agarwal + +allOf: + - $ref: dma-controller.yaml# + +properties: + compatible: + enum: + - fsl,imx1-dma + - fsl,imx21-dma + - fsl,imx27-dma + + reg: + maxItems: 1 + + interrupts: + items: + - description: DMA complete interrupt + - description: DMA Error interrupt + minItems: 1 + + "#dma-cells": + const: 1 + + dma-channels: + const: 16 + + dma-requests: + description: Number of DMA requests supported. + +required: + - compatible + - reg + - interrupts + - "#dma-cells" + +additionalProperties: false + +examples: + - | + dma-controller@10001000 { + compatible = "fsl,imx27-dma"; + reg = <0x10001000 0x1000>; + interrupts = <32 33>; + #dma-cells = <1>; + dma-channels = <16>; + }; diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt deleted file mode 100644 index 1c9929d53727..000000000000 --- a/Documentation/devicetree/bindings/dma/fsl-imx-dma.txt +++ /dev/null @@ -1,50 +0,0 @@ -* Freescale Direct Memory Access (DMA) Controller for i.MX - -This document will only describe differences to the generic DMA Controller and -DMA request bindings as described in dma/dma.txt . - -* DMA controller - -Required properties: -- compatible : Should be "fsl,-dma". chip can be imx1, imx21 or imx27 -- reg : Should contain DMA registers location and length -- interrupts : First item should be DMA interrupt, second one is optional and - should contain DMA Error interrupt -- #dma-cells : Has to be 1. imx-dma does not support anything else. - -Optional properties: -- dma-channels : Number of DMA channels supported. Should be 16. -- #dma-channels : deprecated -- dma-requests : Number of DMA requests supported. -- #dma-requests : deprecated - -Example: - - dma: dma@10001000 { - compatible = "fsl,imx27-dma"; - reg = <0x10001000 0x1000>; - interrupts = <32 33>; - #dma-cells = <1>; - dma-channels = <16>; - }; - - -* DMA client - -Clients have to specify the DMA requests with phandles in a list. - -Required properties: -- dmas: List of one or more DMA request specifiers. One DMA request specifier - consists of a phandle to the DMA controller followed by the integer - specifying the request line. -- dma-names: List of string identifiers for the DMA requests. For the correct - names, have a look at the specific client driver. - -Example: - - sdhci1: sdhci@10013000 { - ... - dmas = <&dma 7>; - dma-names = "rx-tx"; - ... - };