From patchwork Fri Mar 29 02:03:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13609959 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04olkn2104.outbound.protection.outlook.com [40.92.45.104]) (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 692AA2C697; Fri, 29 Mar 2024 02:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.45.104 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711677826; cv=fail; b=VUZ4KLGKqsgtiErR4kJ5lKPjXPut9hS3SbXR44EBF36gzZm3hkwNSZQ3iduG0kJSGBtZNMbsKmpDTtDsDYNaJX3rD7IumgTWFxeZnyGc9WVP0QHya3rVFFC3bCBIyaz93EGOf18whMasZFXWvlLUAJjnGipM+niUydWv9/UYIDk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711677826; c=relaxed/simple; bh=hbzh6iVmNlaACTGef4rLTvavFSRVZgWomwmU67chwWM=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=FavCM2VoUFR0zi+wfbt1Ig1BuarBcSY1qGZX/12kEDvqvcU3MRjr7BTJBPCGKCddU4HKLE12C+21q8+hOSgnwlEOrZaZnVmHEhgesa9OEMWc1at6F44AK9DKxB0avv8UNLvv+AMJWiY16RR1UphbrI7dwWdB6XglXmtoVWN8BU0= 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=fDD/CJYs; arc=fail smtp.client-ip=40.92.45.104 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="fDD/CJYs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eGqMO/8VOf4tqiurwdC+tU3a5EK+n2fmqXFuOwn0Y+f4li52WcUCjKqfQKni9kwf7SAfgUInKt9LFtAgLMM4IujFC3RqfVcS/3OS4iW0NTDJRsJOc6eKtRg2fTGmjZph1NTilCaMFRIrbF1weC/YdtEqx+ncs75sByC8XGKo0f4PPqo6PVGNA0wAOVvV4kM2PSuqqGrKUj22nmJafyXw0opmyCJ79jmmxdi21oEXmA7d3VPZBDCzcIWrhhKTlj4QDeXdm/ThofA+xMUkM4Cbg8g/THNNtcG3TFGsg2ORA0GPONEZBoIyNDz2iKDUebsQIamWFFthI9WKXDtlWARGKQ== 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=h6gTyBk0v5vgj6unpPBd91+KDAaaauyd4jg+5NST+vA=; b=JW/P85FBtJdicP7kRQG5Fqbp2uoYiauTuqiAtn5l5eONhIFlpdvpRPzLqc/mL4S2Y03Fm/cMSdQwzVCTqZOvG8Zuf+XdskEg5a2CP3F6vPVURYCC+clk8kS4+lHW1XykvHYgAwuFfc3FWjAG4niPs6LnB8ek8Nci0Fhv131ItHZPGH4Md5A7ErWJR5wOtBtlZe2269EsCVCJkyeESPhAUwothvlUE1XtkR9ExHdFiRN7NyUg3oyNpS+1vBAbaLmaBNYJNd4J72zrmj2p9TGsUmmEjdrAkyin/XsDgS5aAt3NQiyTKD/EKlnbEoWZMSRRKYgvcvXDQGaQ2RvTqofnwA== 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=h6gTyBk0v5vgj6unpPBd91+KDAaaauyd4jg+5NST+vA=; b=fDD/CJYsrxgSSRtQU1qR7XPo/5wamcB+Df1O9mJXRsc6Qa4zTqbt/cg5zXCyszBZxamcMs1OWRlQVpMz54Q7jbUme+NWhRGcrHOuBk4R2o/thWP/cthZwULexYFUtWkc0JDaYCCTj9Qoe/5ey7WEDEEQkosDMpzLMTs39hu80Ofu539PaRvv868MgEs5refuokKm8+IHRz9B4rYKEwxycxk93psQG85zrdrhMq+XmFTk7RA5aiq0wrnpOulE8Teu8T1OiQwj+kXzHqEPMs/cShBl3Ettgl1hu7EgLrCqCk6VtIiohj9l3tO/+oN0r3Oq67caR3MyIcjaA7vAlRKyGQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by SJ0PR20MB4438.namprd20.prod.outlook.com (2603:10b6:a03:42e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.33; Fri, 29 Mar 2024 02:03:41 +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.039; Fri, 29 Mar 2024 02:03:41 +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 v6 0/3] riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs Date: Fri, 29 Mar 2024 10:03:19 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 X-TMN: [4VFe4J8sA1aADwdXjUhJcSnfcfgbLYET5A6M+sNv1v4=] X-ClientProxiedBy: TYCP286CA0204.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:385::8) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240329020320.370923-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: IA1PR20MB4953:EE_|SJ0PR20MB4438:EE_ X-MS-Office365-Filtering-Correlation-Id: 61b270d3-9593-4659-a70c-08dc4f9474ca X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Mt3t8AiAud8gUbq/SIaAmc9kb9In85pEmYq8PxhN6qAEhKbplRwdbhAL9oq8l5eUReTLcXvZzAiYUyZNBae6I6DMynlkPX6aK4dDbIdnrt7cdZcKS+jnL4njYvKyaRQgNk3wBC+s+4V2tIJ0Qo7/KZEKgu2esia5fSGxXg3y3jInvjqxyL6rmTio/2oELbaZklJ2OGjkh5HtpNZNULzthNi5QfipMJRqB92JCAeEUlNV16wzS4HRVArBoqn9FleKH4aUrfv15F4CHWadJHna71qOvciWDqWyNuqpoXGUbFQw+TFruhtoA+ioC8T65oKsiT+aQFIx0f1xAzw0FbqL2hipx6UYtwfeoybPCKmt9TUpr+eSkI9BJbq6w3g3Ea0TO2Yo7jsIXZ1jfrogwjD9L3OVPO1Ivoeg0QrCTO1YqUWAHkOknDqQlRD5Ni/OznOSEf8Lv4H53GvI+a1Fqw4t3Rb5wFmN+jRl4WnNjfE3/w2nXzbf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fGt0UsBto1GJOex2lV+SW+t8+2aLYREHmTMmVb8MgKuImfwI/Ey+pAjrUZLPkcxAP7DCSCTUAps96BTcPkFLqaSOlvyKQMNLC3gVYTNJoy0wfux4cy8aKNgdcjz5PAVk6Nk8zTiEiLoZQR6rpoTxXxp7EKVSd3q72eUhRigIbqd+AI9CooQm6sr0D5iTrGR5QaTM57pvD+/Prz6PoKn7lyPJuBddKAJ24kW/wZ4lEjKVXF9s1zFOhwSR/YsZxqpeE32DVcxm9KvqooNcvWXZgcxr3xeiTwQlYxnVGX5/KDZW1MhKdtBYpor+UktWeFXmey4/febRc8GYdLUUYa3Em5O3Yww84miTbd23tX8+d5oQwSGGZBtkeqLc2F+L3cNipgA9Wcs39DDjiupqD X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61b270d3-9593-4659-a70c-08dc4f9474ca X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2024 02:03:41.5141 (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: SJ0PR20MB4438 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 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,cv1800-dmamux.yaml | 51 ++++ drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/cv1800-dmamux.c | 267 ++++++++++++++++++ include/soc/sophgo/cv1800-sysctl.h | 30 ++ 5 files changed, 358 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/sophgo,cv1800-dmamux.yaml create mode 100644 drivers/dma/cv1800-dmamux.c create mode 100644 include/soc/sophgo/cv1800-sysctl.h --- 2.44.0