From patchwork Tue Aug 27 06:48:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13778985 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 BBC55C5320E for ; Tue, 27 Aug 2024 06:50:16 +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=G4Ipu3dFwbAOOFZuFUabW1VguQsesN4WwkIsx0YkNRQ=; b=zkjrBfuimBBaxT yOEV6S40QTr7WSd8IiTmOVq0AENt6RdsqSfbwWELRF2hPWlyGrLiR90zygUyiZ/ACvz3FPpJaMfuu VcykoGas+NKnKIXkHtywuYVwqpCzc0nt6WubBmkbeIGlRixSQGj1ldT4NDoCfhmN5zXufMh8zJ5l8 rEGnRe/FQvGEXbfTtlA9wELJB3RnMgowgct6uucQ1X2tOrgmeTZN78lWKaH3GyojWrvCJyPeeM9Pm 2KswKsQrPrp0K3/tToRns+Zcybe9Zerg2yODbSl7jVRoevyb39B0k31kI+W0Th+S/Vqi/GaASvV34 kS+agIu3FB31sLl0CiAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siq1r-0000000A5bN-3Ymi; Tue, 27 Aug 2024 06:50:11 +0000 Received: from mail-dm6nam12olkn2082b.outbound.protection.outlook.com ([2a01:111:f403:2c17::82b] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siq1f-0000000A5V3-420S for linux-riscv@lists.infradead.org; Tue, 27 Aug 2024 06:50:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KgtjAE0OkG4BP6LyIUk8mmj10ZJf27yBx4lbRJYj3HQ6KFi6YuNb6wIdv63fCjZEoD1WqkPTcMn4KnNn8JV0KqJvk/vMH9S83a+K2KdXN5PDQiS2nt06Et19yFq0jpsogsTllLl2ye2kMfpHU7DnQKVRSydDvxUTCmQcvNkWSDGjU58sW+tYxf1bjeMxoVpQqRzk6yH8JSL2kdyab18GPA3wLxShbys3Z1K61BlcuOHUKxJe2e+dEquRdwYmHiOoMwHzL3S4GmbqATVCsLz1uIX/gpNJZF+jZXuwtVTEaTWXFh10Gkgf2zrMxrsC7yMmZftKZdL6SopguECksNv4/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Mo4PA/EshPnhNpeVdtaP8xDELtLm+fQPpOw2VYvKD7s=; b=By+abC7KNaohvQmRPN48Al3F8OhKjDT4GRxvK818hNkZMAdCcLOiE24YBGCId1YNzrSBzp1y74EqjtgDo2iYRWQOt6cIB3/IOyOBoFUp0kWHFyPKJTod/OL5ZBzaDxhGTiEQZmRmI1F9qUnG+zsQsuC+SP7+0GCLgnjvLLWIG1sXBL0Dy05bxsXZ3fII5LR2I6hMepST81yZks/YhNXuHA24XuJAXGoWZVqFR3Uns8ZBnHsCom/b5O67LLctcNxG5h7hX+fa1w+QF/bq189wSADTM8mM8rWGE0ASo05A9frpOXkBVYTlwgaV4GVaM3DgIaZdYhg/flj27K+j5Vjklg== 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=Mo4PA/EshPnhNpeVdtaP8xDELtLm+fQPpOw2VYvKD7s=; b=fxC92KEBvD1Ct/QDLV1gfgDuzkK1Y3oYCXpRCWhHEbMvF7CDDIuzqE7EXhKpSSVOY1oKQ1U4GAsZRGr7nOXL5oYOmnX4q4yJHdIvLaE1LwflYSpjJ7BkjayZitO9RYN+Bihtim+LkMw7RmMF+nRdHn+d/UK8rzHDpYAwVYwJPYbIo1uBFWeuhKXunXMEzfQ9w9Auv55YJnNGPiV3tCt7KVZnvMQqkQCRaVCyQhREjcHrQoyy1+0ZtXyE1aE46f+pg5muMIQgd+WHBHrWzEtciJu7vSgqcy+DMg8us1/w3TZRJNS6ZjWPqwjD3ACOVDVX5ELjmBKM3BcCZedfJLaV6w== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by DM3PR20MB6939.namprd20.prod.outlook.com (2603:10b6:0:42::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Tue, 27 Aug 2024 06:49:54 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::ab0b:c0d3:1f91:d149%4]) with mapi id 15.20.7897.021; Tue, 27 Aug 2024 06:49:54 +0000 From: Inochi Amaoto To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v12 0/3] riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs Date: Tue, 27 Aug 2024 14:48:49 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 X-TMN: [dMwwi6QimMzRlleiV7vzaY1GWJbvvAZz7ZmYNUdowXM=] X-ClientProxiedBy: TYCP286CA0107.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::9) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240827064850.739895-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|DM3PR20MB6939:EE_ X-MS-Office365-Filtering-Correlation-Id: 68e8a3be-5020-448a-8719-08dcc664745d X-Microsoft-Antispam: BCL:0;ARA:14566002|15080799006|5072599009|19110799003|8022599003|8060799006|461199028|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: wAnbX2VtVWX1zcS0G8ytlo1QHtkuGgsbUQvl7avc8d+uILbZjOgM7+7Y/qLmhxdMvq3Kmx1AQcpLqKkjmAEy8FO5jpAelUV0ZUgUIjAZ0XO0cB3Qu5JHiPONGiIk0P5rV18ZE+ktb+ZIVTTghtJ0dVMK3QMG7UXbKUI3vo9L+9ZDbjy8OJh4bwiB/CeDVntdrlw/0/NlJaw/JS3idlTvoh6uDLQ71KAUfMoWTorGQXIfXGl6Z74kStD1nbuYRFANhW2r+OAKMnuQlXzfA+7nX2olopcf0S9Ca9HTPRsbTPUb8YdB11TGt1C069ZYZxNfBGT+MWhEgCNppIApScU1nZDtDdC0FZSzRmAbOkTTcfCu5lY7UDo0E2vg/mo5hY25UuMyBCFC/S2fA3hC/RfINVbbDYRkbVBSKnb1TUUbihcxk3CfD3UfNe/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+5p2HI3jF61q8nbELLZNlZ+SsnwRh4fYuj5nJj5M2cj1+M5fxQWpWuKH98bRvlXyxrlV8tovN5pLPPqa5ESGgLLlj0GjqO0TL4JC9IlhMQlWPLktBkWuqDiOSoZCx0y5J5zb5/X/jx0AC1xq7JeIcIKqoKHujB8RZxxJ3Vc6tLMCqvujeY5dm9lt+4liaA5o2FVV039wmLjQckZ5nzutzpTxpGvV/eKP5II4LRX5etBU8pgVIORTGCk/OsEzyE/OomD2qXIESkO4Hni+MkQVW+7f6v0BIIKJzwfqTun/SNOor3U6ShIsHj7aMSJmMIPA9hWkp/wGFFGWMS+tYEW7KdQEs0U59/f8a4caWMQ0Mn06zcOulETxTs82fyYTVufu3XQCwW74QaXPUaUMUqtA3e2CYgb52TM7Z/qXgG6widoqusIh8gYM+j69cZzFCWOeRO7JkHn1al1om4YGKI36CpzbodmhG4jFwh6YXw1Y1IJlP12lZ/yzOXbK/WtF2E8RkhDCWwHax/d9Fy9nqQeYNkqcrgAaCtbdhcQHvJT1EzoyYfkuBuO8zMI0w1ojGcbJJtvkvbIQepLU+gd3hnGWD8+wHFxFpq5Vta X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68e8a3be-5020-448a-8719-08dcc664745d X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 06:49:54.4648 (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: DM3PR20MB6939 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_235000_083725_76C1D9E2 X-CRM114-Status: GOOD ( 11.07 ) 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 Add dma multiplexer support for the Sophgo CV1800/SG2000 SoCs. As the syscon device of CV1800 have a usb phy subdevices. The binding of the syscon can not be complete without the usb phy is finished. As a result, the binding of syscon is removed and will be evolved in its original series after the usb phy binding is fully explored. Changed from v11: 1. init all the field of the driver data. Changed from v10: 1. binding: fixed binding id. Changed from v9: 1. binding: rename to cv1800b-dmamux. 2. binding: remove the unused formatting. Changed from v8: 1. change compatible name from cv1800-dmamux to cv1800b-dmamux 2. use guard to simpify spinlock process. Changed from v7: 1. remove unused variable Changed from v6: 1. fix copyright time. 2. driver only output mapping info in when debugging. 3. remove dma-master check in the driver init since the binding always require it. Changed from v5: 1. remove dead binding header. 2. make "reg" required so the syscon binding can have the same example node of the dmamux binding. Changed from v4: 1. remove the syscon binding since it can not be complete (still lack some subdevices) 2. add reg description for the binding, 3. remove the fixed channel assign for dmamux binding 3. driver adopt to the binding change. Now the driver allocates all the channel when initing and maps the request chan to the channel dynamicly. Changed from v3: 1. fix dt-binding address issue. Changed from v2: 1. add reg property of dmamux node in the binding of patch 2 Changed from v1: 1. fix wrong title of patch 2. Inochi Amaoto (3): dt-bindings: dmaengine: Add dma multiplexer for CV18XX/SG200X series SoC soc/sophgo: add top sysctrl layout file for CV18XX/SG200X dmaengine: add driver for Sophgo CV18XX/SG200X dmamux .../bindings/dma/sophgo,cv1800b-dmamux.yaml | 51 ++++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/cv1800-dmamux.c | 257 ++++++++++++++++++ include/soc/sophgo/cv1800-sysctl.h | 30 ++ 5 files changed, 348 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800b-dmamux.yaml create mode 100644 drivers/dma/cv1800-dmamux.c create mode 100644 include/soc/sophgo/cv1800-sysctl.h --- 2.46.0