From patchwork Tue Feb 20 10:20:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13563846 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02olkn2069.outbound.protection.outlook.com [40.92.44.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C72660ED2; Tue, 20 Feb 2024 10:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.44.69 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708424432; cv=fail; b=VdlnwsABSpNw9fO2KOKv9RcrOt6BkBFhPul+eHdV/2v+HKPyVnczeBgvzrT2vt5IWkYCLzTwt4sD6b6zcm6xxM3mI/GulQ9n5VI2iYRUfMX22Isd4dJZAZEiLNFJ3TM8+t0rQKh9mhqsRgScbXR3oxUTZtPAKxxYd9SFipEOa6Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708424432; c=relaxed/simple; bh=gyy5jwaju35coA1NLIYiVhYlDzoZuCdbjcxOYEm3Dto=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=WlLpa3Wg3WvJSwY5dj9mYpEvQ9Z8RMDxaygXgWkQ30yzXmYWwEGsTQfonKax8q2MGeC8wsR9w/7KYIToUFRJmGXSh8Fyecbdpi7w9uN2vli9Elk4q0rNeDyUf4Ucdiz7PaoV9p3JrhPunw8xFSnWGURL1I4YgbTxXfxqnGs5OeI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=YTdeAf6j; arc=fail smtp.client-ip=40.92.44.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="YTdeAf6j" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dR1nMqgsmc5otO8L02Li6A6ISF3+zoipWQs90HcblPZNXeShw4hq5AIb48gxkK/vS3RhWsi5izUj/L7ft2LI7Xh+rrObuTmXFuZEzNy6zG+iBkdDUs/pH+O7JpmlSwzsAaQQAMq1VGxQs36UlqSP5tGrSLVsyjvxW/zJjJkwfERUWzo64yjOtanEyF5XC+cLrUXiGgeF8PU8N0YSN8WMnVlE5sRjFCEmU0pTYpaAsrCQGuTCH+o6McY27NTjKhK2v4gSzyXTBeS+6a/PlljQGmRMtabAi2Ext8O0WkwBddilW+JwfWP66GQqnu3HOLHj5b0oe3tYin+PsMblBmn3Xw== 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=q9y4GfvmMSRdx2AyYLR7SV3ok2Wz8X/1DcRtxIB0cug=; b=A02tJGwt5VI62ljCpigJGEiGn9yrCWwrjxyI5/aiJMlwBLz1cYO8WJ48trliu8W3Q9gpM6bNWMJkdruEgO0YuKEaKSBaG7Edsivhl0ZiW0Q//8XZkMmJaZ/mBmJV2VQDorwJoGeTJAh11khVsayHX4MZOK48p2c8xPLK5JeKPgugz7gvUdx8Q1rxRRFaXSwlbZtwLRuzbkekSL3fueisWmGstsgERLs77/1mPX6XzShBBckSkn0W3YsijO6LxDejoHuYzM9Zye0+CaY5PXPP5T13v6FpHoPxXH3Rg8VOAF/+l7TJELv3buGGpQHN1wultpz2OH9Sn7Bczmog/XY0cA== 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=q9y4GfvmMSRdx2AyYLR7SV3ok2Wz8X/1DcRtxIB0cug=; b=YTdeAf6jNTpQEzT9ViHoeB0E55Y9z64hrVm33x10uOvwL7GZoVQLDuQBvHxM0y8K68Ki6tUAsP0U5p3Xt0TlT74wYPVy6PQi5nddHGgttQNzAgxNup2E/LSA1HdMXHaDNmk1AYnSfaOXYDIkMWTSTuD3Efw2+I79vgaAUaemoCw+MzHvKwlnRCwHIpwJ/KMmGc8RlPKcxyTCFDfbBbT64MKZjgj+PStVlOSGj8nW+gUX08cmWHl0oyJ2KJNjVXjBt7A+O3iyytemt9lWBfWdx/v1wHnhmuPK+UZU00bJK0VDy3FadtOJSIMFUS2vU6Kdho1eJAV+Ad/ry6XwM2iGyw== Received: from PH7PR20MB4962.namprd20.prod.outlook.com (2603:10b6:510:1fa::6) by MW4PR20MB5156.namprd20.prod.outlook.com (2603:10b6:303:1ea::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.31; Tue, 20 Feb 2024 10:20:27 +0000 Received: from PH7PR20MB4962.namprd20.prod.outlook.com ([fe80::4719:8c68:6f:34ff]) by PH7PR20MB4962.namprd20.prod.outlook.com ([fe80::4719:8c68:6f:34ff%6]) with mapi id 15.20.7292.033; Tue, 20 Feb 2024 10:20:27 +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 Subject: [PATCH 1/4] dt-bindings: dmaengine: Add dmamux for CV18XX/SG200X series SoC Date: Tue, 20 Feb 2024 18:20:28 +0800 Message-ID: X-Mailer: git-send-email 2.43.2 In-Reply-To: References: X-TMN: [RsOGHVyKM6KT5nBM/G4YCPma1OebsM13A9hGmRSxFbo=] X-ClientProxiedBy: TY2PR01CA0017.jpnprd01.prod.outlook.com (2603:1096:404:a::29) To PH7PR20MB4962.namprd20.prod.outlook.com (2603:10b6:510:1fa::6) X-Microsoft-Original-Message-ID: <20240220102032.870200-1-inochiama@outlook.com> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR20MB4962:EE_|MW4PR20MB5156:EE_ X-MS-Office365-Filtering-Correlation-Id: c746c2e6-54d0-41ee-251a-08dc31fd8ecc X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6W0yA4qhXh/8Pc6vJZReiMgUYFDttPXGRbKJ6NcBenIpbbGox8Ii2i4AKa2JqitHidNe6swnFC2EsP+XM3wprtTuZtCOEFxlRIn1E+/qu6O/m8/ZQysqB81XMP84Ieh/aFvskF+9YfrX5AztmbIDoqW5UNMEbEVkneCnNkDNMlebLv9bujK2uRHQxAGEaphkIpTMi7zzbz7PujJfgI6tH+uHjH9PeaDeWIDqTXxoD6Qll6F5/0uYbWJSMESDnYaP14T3bfnP5ul2xYQR1R+S9TPQs/nMN8b4CX4siq/FyulCM3VId9li+F/P6+3mogy9hcBf62TNOuXKK5VVlqwDTmFkJ8Gp5jpwzT+Bw4i5oub8eWZ6vf9G6dWNu04eiQXKNQrGz0YoyTtswfA2OZVotMKj6rLYRqP4MTmld8W1Mb7Ea/yzu9vGRxF89neMK/byZ2uiv2lS0cmNYTdLsP2EJ9E+hkeLGwh4i5UAhiHO6ScRph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Do1PrJIijT35UEH6dC3EXgMWgaMIfn/5VQ/MWAnEiMGYnPyu35AdR5g5WMEedei9hTRUgGh9Vd9nMgi23/HkzFbK5T/yUX/W+QW2u6QVjjQUTKvOYN3GGFrjjGXKQmAjBYeoJ7XaL2N+pSxGyB2rNOO09acOyLe4AQwADf3+3UuurqDeLg29nekMr8ylM7A7xmOpinjIfQgrb0V/z9jHsZfVAdunewBU67Oefjo0us3wgRK9vrQ5QfBk4541YsaOawclLbP+L7JjyNwMu8k6G0ZyD5DYpSQ4IdjNu4I1Yi3lnlS6JNbW7OvoNDFm71IWrAjN3vX7wv16Gd2NGWdTCHVBUp4uULYUx/xK1xfeUh3O33f/Rl+Vxn4Fdduoud4ZwffPVeLTdbrw8p9XPMnCF5/DMRUWK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c746c2e6-54d0-41ee-251a-08dc31fd8ecc X-MS-Exchange-CrossTenant-AuthSource: PH7PR20MB4962.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 10:20:27.3730 (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: MW4PR20MB5156 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 --- .../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.43.2 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__