From patchwork Fri Mar 15 02:50:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13593015 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 C9FB6C54E5D for ; Fri, 15 Mar 2024 02:51:09 +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:References:In-Reply-To: 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: List-Owner; bh=0pASrTlwtDo/OC5uwGrY2CsMCqUAp+sEXlkrXSkeShw=; b=QGJ/OjbyuhfJaF U199BeJGuO3+lrGYq9XHgYS58ov79Owct3OWOKCGQw3NhfTZIC+fEZtOcHd4+3l7cZhDoDuLBtNuk wc+u5f1oRLe/OXoNQpjdd8K3YSs+DAaP2qNn5IRaw7GVvi1nKs9WtBBvS8EfZgyIp1NX3Q3EIAZZQ xye6dgMnsAWjZ56JbhcQuqXYPaXm1ZR/2PySvbmdPgg34KcK99SyA2jS8hw1LNGvUzMYzi0fTXMWW n/CxziKhyWCYU/gAN420MAHYIcnnUQTNFeK0XHxvq7y4sFKBazJejC+j9lndQg3Ly22cS40goe8CF QlfbAbKEg++0gRyrxthg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkxex-0000000GSlT-2tXe; Fri, 15 Mar 2024 02:51:03 +0000 Received: from mail-mw2nam12olkn20800.outbound.protection.outlook.com ([2a01:111:f403:2805::800] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkxet-0000000GSjE-3FvA for linux-riscv@lists.infradead.org; Fri, 15 Mar 2024 02:51:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RnLkqy2OP0EI/fJoQzDlCS08QiK7yAFMoAlN0TNDsQtGWNL1T6cal2IlXztzxm95pK6yrNpll9h/ODy8DhPXkZGVbpQUT205pBtFH9WQ250f9lFqoHSx3u1CfE1dz5DXLMAqXHmmqWL9/+1I7srJHwS8aCxVTHuzEqMS8pcJRf1GH0ONSscBPFlyDLeqqeQEXROUqxDF7lvpnWU46WTeWsnn52L9JXhz3Bg2eVxLrPnDYEH/1RZN19JsBMmhulBW/r3ffHwthIFuCSxqklWQ6ZJTLPfTFltBRoNJQCN5txULL8L3yOkACngeLPMPQZfv3WW4aJ7FdAXaEbIWT8CTMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6Y6biWoLFKWq0hm9lvtc9VvDK5jNTPCg1WF/TH/M2B4=; b=O/xKqembr3UdA7sNzQfuhomTxuUACRhRD95IfgeLP/S1zrlddueIDUeuJRwBH7lB6lvS65PfKf6+kg7wvm9gEyb4EzH61tJr/9Jtk0IE0CbUJ8CPC7lDnm7L8rpONaaSUT2qOm7AWsSeub5agSlgjGqXMfvKvWXRW6wQQXys2Dq8li3TGGyGYfzt/PNvtoO4pg0XXlvIttj5/+QXNK41OOz2I/ONhmjhAQ1xmtFMelgij48ECUWWkoKbtRCgjCXV9yza60jnrdF/4a3B2i+wnwsQvP9dNE3wpkl9fw/lReEPHeEmvqGiVa++YIpZen2gr6adPrqUNVkhaH+Do1woqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6Y6biWoLFKWq0hm9lvtc9VvDK5jNTPCg1WF/TH/M2B4=; b=OKqshR7+Q7gYNunNHYtKqPOsI+9m82Mv4jYlt1BGy/LVxyUVq0ygjWD2fuUEGd4pT0WNWnNfQn+nLmxdw+zsLnp3HQO47qpr1PYv91NvF3UXKpbIuoduKpZFNu2vMdFMD1lmDF8opfve/LTzxuN/DdUid++8d7xnUbrgOvkj7HtEN7cwBP4wfTjatoeIvNFpWtCmwZqrmiMuJnVuQ8hJ+0FcFpqdRv8mxyDw9p4nLe5r7rtQ/OkwG3hqO0Zqh/F/8lZItINvSnwVkGhhtVNlk4adpg8yLT+4PJ4g0RAy7X5QcqDeX5UGqre7hmiXJ9PG7iO52U1FyRkoR2G1p7SI+g== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by DS7PR20MB6264.namprd20.prod.outlook.com (2603:10b6:8:ee::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.20; Fri, 15 Mar 2024 02:50:54 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::8615:efe2:7c8e:2041]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::8615:efe2:7c8e:2041%3]) with mapi id 15.20.7386.021; Fri, 15 Mar 2024 02:50:54 +0000 From: Inochi Amaoto To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Inochi Amaoto Cc: Chen Wang , Jisheng Zhang , Liu Gui , Jingbao Qiu , dlan@gentoo.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Rob Herring Subject: [PATCH v3 1/4] dt-bindings: dmaengine: Add dmamux for CV18XX/SG200X series SoC Date: Fri, 15 Mar 2024 10:50:32 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: X-TMN: [P/3VFWK/Gi9d5MUPfvJr0NHkynog/V3mnx3Sk/kedRQ=] X-ClientProxiedBy: TYBP286CA0005.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::17) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240315025036.554158-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|DS7PR20MB6264:EE_ X-MS-Office365-Filtering-Correlation-Id: 3eac6f41-f7a0-4a06-34a4-08dc449abb73 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NfeI+o4/cFqe3PiCjV4PMVsNuiqDSPG7/HZSUMYECyeelurCXdSoP/1lpkOqgKp64ryr4IAWaC3jBbYjspKZYwSG/TLyZofsxYRWxYWzAvgN9kGZYaFk8o/5jYGKt7/UNxsxRutY3QbvzHHzUyfhzfKJHdc2qr5E2LwJBELSBNXgU8M8W/nc1qP/5eVukZUyDFNe5748Nn3eo9AKP/1BC4ce0QDxei5oVSdnQ8JciK0iUgWolQkGwTbxY3ZfRjLKbv1k2wTXrQCOdumqpPNxMeOZC3DRnXeTemPrfKoW0KZeVXaODvs4EPkYUyOoVgEFyhX9mevVnl5PozW6rnlKQXhBUdBGsb8B38LCXoCngJTmd0b6oBi9++QJ2t5gKErmtPTXiwNYAdTFpgFhRnXmtCBGK/L2NGWSZkrCum21Uzfa5XRxCSeOb9wGqKi3hZmO30HN0ncgmoXHp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rlqNrNN/QQ84+bxia2sLkYcNcseQVfhCJWBZAkA7e0mqSqONsuw4w+6ATO3yp76pewOAa5nGyzHpGJ8UW1DAcAW+FpUq7vPmWGOSPr5sIsx9e91m4GKVoElH7DaEE55RkAKG18efVNB9rpPXU5fz+AbNN9WKN3RDsceXQHGMQUjbU9hHUF1e4Dp4dumQNtS/x7eUEYilO5ZqEdP7cZNDSu8UggXxazNMtGbo1K8trvNS0ok0j5DdlP+WAULCW004/rGyz1aCoz3ySzMnDAYAxuMOaXve/tFesZodIShuLZIGGHnpYQEERug8v0KKjsHdB8g0yfpGHEAX1PqPewwnOfGHcO+SRQYWlnx8LAKicK4DZkX47jlJFrwiqeV7GGsY7mzNOZsssrm1lK6/ME2UgyPObOdiGVAeIzoIra30ga1p13zI0vnD3dEbkcriUZInAkasW4lm/j7qTXOFlW3znuUTKtFROYvKI1KZKpO8mCo9oA95bjk8AUjukSZUr+/zq6N8+jqEF2 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3eac6f41-f7a0-4a06-34a4-08dc449abb73 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2024 02:50:54.1578 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR20MB6264 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240314_195059_915022_93B50300 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org The DMA IP of Sophgo CV18XX/SG200X is based on a DW AXI CORE, with an additional channel remap register located in the top system control area. The DMA channel is exclusive to each core. Add the dmamux binding for CV18XX/SG200X series SoC Signed-off-by: Inochi Amaoto Reviewed-by: Rob Herring --- .../bindings/dma/sophgo,cv1800-dmamux.yaml | 44 +++++++++++++++ include/dt-bindings/dma/cv1800-dma.h | 55 +++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml create mode 100644 include/dt-bindings/dma/cv1800-dma.h -- 2.44.0 diff --git a/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml new file mode 100644 index 000000000000..8bcbf7beb432 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/sophgo,cv1800-dmamux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sophgo CV1800/SG200 Series DMA mux + +maintainers: + - Inochi Amaoto + +allOf: + - $ref: dma-router.yaml# + +properties: + compatible: + const: sophgo,cv1800-dmamux + + '#dma-cells': + const: 3 + description: + The first cells is DMA channel. The second one is device id. + The third one is the cpu id. + + dma-masters: + maxItems: 1 + + dma-requests: + const: 8 + +required: + - '#dma-cells' + - dma-masters + +additionalProperties: false + +examples: + - | + dma-router { + compatible = "sophgo,cv1800-dmamux"; + #dma-cells = <3>; + dma-masters = <&dmac>; + dma-requests = <8>; + }; diff --git a/include/dt-bindings/dma/cv1800-dma.h b/include/dt-bindings/dma/cv1800-dma.h new file mode 100644 index 000000000000..3ce9dac25259 --- /dev/null +++ b/include/dt-bindings/dma/cv1800-dma.h @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +#ifndef __DT_BINDINGS_DMA_CV1800_H__ +#define __DT_BINDINGS_DMA_CV1800_H__ + +#define DMA_I2S0_RX 0 +#define DMA_I2S0_TX 1 +#define DMA_I2S1_RX 2 +#define DMA_I2S1_TX 3 +#define DMA_I2S2_RX 4 +#define DMA_I2S2_TX 5 +#define DMA_I2S3_RX 6 +#define DMA_I2S3_TX 7 +#define DMA_UART0_RX 8 +#define DMA_UART0_TX 9 +#define DMA_UART1_RX 10 +#define DMA_UART1_TX 11 +#define DMA_UART2_RX 12 +#define DMA_UART2_TX 13 +#define DMA_UART3_RX 14 +#define DMA_UART3_TX 15 +#define DMA_SPI0_RX 16 +#define DMA_SPI0_TX 17 +#define DMA_SPI1_RX 18 +#define DMA_SPI1_TX 19 +#define DMA_SPI2_RX 20 +#define DMA_SPI2_TX 21 +#define DMA_SPI3_RX 22 +#define DMA_SPI3_TX 23 +#define DMA_I2C0_RX 24 +#define DMA_I2C0_TX 25 +#define DMA_I2C1_RX 26 +#define DMA_I2C1_TX 27 +#define DMA_I2C2_RX 28 +#define DMA_I2C2_TX 29 +#define DMA_I2C3_RX 30 +#define DMA_I2C3_TX 31 +#define DMA_I2C4_RX 32 +#define DMA_I2C4_TX 33 +#define DMA_TDM0_RX 34 +#define DMA_TDM0_TX 35 +#define DMA_TDM1_RX 36 +#define DMA_AUDSRC 37 +#define DMA_SPI_NAND 38 +#define DMA_SPI_NOR 39 +#define DMA_UART4_RX 40 +#define DMA_UART4_TX 41 +#define DMA_SPI_NOR1 42 + +#define DMA_CPU_A53 0 +#define DMA_CPU_C906_0 1 +#define DMA_CPU_C906_1 2 + + +#endif // __DT_BINDINGS_DMA_CV1800_H__