From patchwork Tue Mar 26 01:44:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13603240 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 0B578C54E64 for ; Tue, 26 Mar 2024 01:46: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=sxh0AGi9X19bq5HkKSdFocqU1lwlqzrAYj4uy0DZolQ=; b=2B66ZOx8Foc09w +w6tRA5xGQuGBNLWoa9OLxEvfg4E+2cHII9ZK33B4Mrz0uSddv/KpF4CoCqV+RXmw7+wJunAzkIFD oV20DRd8ZOnc8y+VVf9Dz7DcZ/JG8iUGnhApaVZfvIn1wu/IvQ4MENjNupRCSBR8i9Go12K2EqunQ dMnbTwr8zhcaiOZt4W62cME1bXqHVw54uoYoq7ssOiYG8Q490QCPVD/nl2sPSV1Wg3IqYJxNbMIIf zvz5n6SJZ/TcLgPkQKVALBz9aVthwu/C0gDeG5hhoHaXENX+YMYj/FjSmFxgYaGYIOwtrri5zvtZY azxakYfhoWlvbx66cS7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rovtE-00000002gcD-3Nu4; Tue, 26 Mar 2024 01:46:12 +0000 Received: from mail-dm6nam10olkn2082c.outbound.protection.outlook.com ([2a01:111:f400:7e88::82c] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rovtA-00000002gbQ-2CZW for linux-riscv@lists.infradead.org; Tue, 26 Mar 2024 01:46:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z2M4cBHpDZPbq5QXS5LYR6WmsY+CcmrQTH8tX4QNKAtbQmlJSOo7DHdhlFuVzNrCWkQR/GLVB3PYLYhM3sGrjS+veIQGtjn4N4pg1nW0vjKXIcCJHPCo88S0OM/DT0JKy61rqWRPqC4HBlPU2NMD9d3gao8BsmHo5ugwTCkDnIZItH0+gFeBhG6n/RAU9O9BI86kh3CQ1j4FEaS9We3XMzOw64DLOoxFizhr9HxoES24mDX6FDQ68aiw/jH/rpOuIFmX9sBwEHfC7bXZf/muuQdBB/gmQOfFxkP7fm+SL2mIi4TwKB026Sa5Mgd4GbYAmbvygDM3L1CNbxwq6CK1XQ== 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=MdkQt52g9uJtdXtq+jz2W+aZgvDttT9s15+lo7z9waY=; b=LNab+QzXgOer8H8c/22hiomnvCw4vZ1mgXm5wfRWbZ4moOLTAmCEgdPXnzZK1qVipJQmphm2xulIsT9TTAgWfGJZsnKVshrGxfFuV+aoXmtsD0bqoLc/QK+h46wBH0rl/VN/JSmF8+JRyGicvl0LLRBYcaRdY20U9xY/eZtg77O63PJtXEe3vsko1sObOHcFVFRfuI8K57jPt718g2MrWdbFN2gBIWy/dZnaGFjmf39eMEXH3yFlqlU905gd5wh8SX9zHrCsknhIqaMzLT8wDeIvwiSPchVyd60qoBQRN08QuB8mm6S4eWea+6m99dIDYTZBefW4u7+GvvzT+Y8jJg== 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=MdkQt52g9uJtdXtq+jz2W+aZgvDttT9s15+lo7z9waY=; b=rVq79Ow4raGli0ZNKtNTvLf/bMFFIyRFvedBbQu+YA66oUN7eDHua7F7SN2cVjzmB6r2VWcruMYCqLeqq0UcSMMGxargJWm/VXIQNVww7lj8E2lfnUHrefVoZV+IF/Y1fhjuELAUdWtHKBA/eDyGMMCcvnalSyoimS2NAAz1hBVk4mii8vCeRxCopxl8hd/EQJS8go5oVvTdSQQPXvN0OmsCgp0N4/yTiwBO/XVEuEpHCXjuxc47Tj3tBJjFB/cWwKNVxdLFJPwk4z6vLbpXXIxsd/DEdWsSEEWJG+m5XmSdtOhhn/Bj3mqcAGhfchgl97fsFyi/UDBzsjF7UqteDw== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH7PR20MB4964.namprd20.prod.outlook.com (2603:10b6:510:1f8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.30; Tue, 26 Mar 2024 01:45:59 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::182f:841b:6e76:b819]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::182f:841b:6e76:b819%2]) with mapi id 15.20.7409.026; Tue, 26 Mar 2024 01:45:59 +0000 From: Inochi Amaoto To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen Wang , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: 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 Subject: [PATCH v5 0/3] riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs Date: Tue, 26 Mar 2024 09:44:42 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 X-TMN: [Ju1t0qvI7T8hiqR8uq1Ul808I7/Wh2jNUdsJZP6iPS8=] X-ClientProxiedBy: TYWP286CA0026.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::15) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240326014443.323406-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH7PR20MB4964:EE_ X-MS-Office365-Filtering-Correlation-Id: 4dc25f8a-c435-497c-f99a-08dc4d367c76 X-MS-Exchange-SLBlob-MailProps: dx7TrgQSB6d4xbak4tYeMB0D40EITU90IEA4cw4u+gAPEBoWQiljB7PDMloCu9jbplGGDPF6WxHyB62/+AbTvv0mCcWRymB43/tOS41c7Oz/XWNhfSPezQiGPWi/vFIuwA0f8so+4CqUZQdCeUDQMqmKmNlNifmI6XKkRme71+WZikvNrwBN+7maLPAVnYOQLaQz+FEh2ysP6nPIRYnE257sZ1BoY4I6LkfzJKSz386xRV8/wRXYGkVOQWZphv78iIjLNLBpxwKweGNxHZrIhRFbg5v0cibfoZQw1u4/Bm+3Y9Yx2ri5gjpVC4DeBAnjSKPVvFf9vLXVwddQxPhROkWv6j0IoqeLaNhnkhuJFn8SitqeVwJ29/+LBZcKD2Jn1zPQkARMKgKKNsYmLLs7Q88E8MOWW3iMNk7VC2jdzu2ZRb5Nd/Dp1JGAnVEsqNNK6leE9huEZQZ6fnMVZl+zo4PTepQaQnhcJD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FkhuxVr9OYGmHLtaVxlv/Qtc0vUOvQbZK0wamNyG3d3HUpmBzgwKHZhd09ABuBAicVtacgsjcrPQeD6sFAC0+C2k1Fai2uHnIuaiabJ+0ET7n510WNHcSiqmYE9fPvQJW1DG3pS8v+DL53cGO6nxK/znxAK+wDB5mcvYW X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4dc25f8a-c435-497c-f99a-08dc4d367c76 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2024 01:45:59.5968 (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: PH7PR20MB4964 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240325_184609_082459_15054C59 X-CRM114-Status: UNSURE ( 8.81 ) X-CRM114-Notice: Please train this message. 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. 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 dmamux 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,cv1800-dmamux.yaml | 48 ++++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/cv1800-dmamux.c | 268 ++++++++++++++++++ include/dt-bindings/dma/cv1800-dma.h | 55 ++++ include/soc/sophgo/cv1800-sysctl.h | 30 ++ 6 files changed, 411 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml create mode 100644 drivers/dma/cv1800-dmamux.c create mode 100644 include/dt-bindings/dma/cv1800-dma.h create mode 100644 include/soc/sophgo/cv1800-sysctl.h --- 2.44.0