From patchwork Fri Aug 2 08:31:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13751237 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 B413BC3DA49 for ; Fri, 2 Aug 2024 08:32:48 +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=BgpaFOXqd57VYqC7Rt7lbU22PUJh/uC3lIs6BK2It00=; b=E9B/3nZF/5GYQY p4cS/mcGvnRHQ+MCL2BE1MsfwQvt5qbILrD6pbTGKeUWD1Ah4Mc5MunnzIsqY8KFfgW+FBYLfKjE8 IsHPkB5TopDFp1yK/w1Dkj00Wk3khzU9x3PccZXE4QcLZfAzQfHKH2+wVTL8nfZBHcQOWCWruezGV 3YmPuTNGdNJcTbYhF8eigv9W8KvgdQG8HApp3aFcTiTvrZzR6k7M0M+/6V2qMrxH3IEVHjv1EeMBI xPYNWfiC4YsKgSa3Xkkhu7JA86Txtk5Z2FBsPwwSFbsM5v7VtkDfVEdWX+iRlCg3dhPq07Jfup81O Jdc68liDt8XSR23kSSVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZniP-0000000874I-3VCX; Fri, 02 Aug 2024 08:32:45 +0000 Received: from mail-dm6nam11olkn20801.outbound.protection.outlook.com ([2a01:111:f403:2c15::801] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZniH-0000000871j-1UP9 for linux-riscv@lists.infradead.org; Fri, 02 Aug 2024 08:32:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C7IwuYOrkaUZxgGhVjL9sAs6ejuUrpoWBDE/U5BMdNVvM/oCtVSt3IWEneNtWar5489hLaDkdP8tVtJ7MMdvcg+YAICuK+ip84ISBrwXJC3IZhuMd92Js0OpcDzfjg/I44mtB+xG95FUPYo++EwK2ryx++kTWcHfsbAYBGzGbqDITs/YdEEbn2kvOV0QkdJHjJuifZTYWy/ztGgFBDHWilooWMP+w6uTjyjGsfP3y+/PiKwySpcY61FZbZV2kw/Xsu1ql1g25Nmmstut3mLY48NUDnjmgpMGncNVG3VNmXbJzhrOvbLZILO5hQ/QGmcoRsHmttNT6whM3ije+MRbQQ== 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=/pextPI+wqNmLsc0K/svaxd7L0mRDUMAtpOQf+6CsfA=; b=qP5sUO72rUmPlRjW1/cJtngQOwLUL8JxaDtj74TpKhdXOv0A7Wgf2OdQme/ky3eMNCTBbiSdtPX0xgl8OJikVRPHje7oRgVhT9O/b1G5eC1nVpmtLy8dsT3NRrVcVhmwAAZNwu1j+mqQDtHhcjaz35reCoMNSrmfwEv0APplhojrTRwCDfRNSVkzcPCHBSM0biYAw+gXBimC9HuB8rM11qR2+63aStmq21/nTok51tM3oqhgfljdWFsTtugHjIWmH6WPb0bdSJNRbfwOvz8z5puAnitKZvasfgEuQMBegt9r2lShjRsmTtp8aWjAILso+T+rf6S7Rs90dGOyK2PKDg== 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=/pextPI+wqNmLsc0K/svaxd7L0mRDUMAtpOQf+6CsfA=; b=VUhjbLoy5sSpDSu2wOHNhhp+v9FkVvt5cY/11oJP7sZR/Jdss0oaKKhL7/2FXsO1dXq/Cm9EeUXYxV/hv/+6ptjx4Rj4YrEuBMWckpeRVM5vHNDiusXWe902v6OsXnsBw9oSxyNxqXJ/vslNvkvAvY1GyzAoIRXXYVZnqCzFgf1Ol56Bo8BdLcc1mpYpjDrSeZdp146lIq2AVfo3AypbzP7XVieXObcjjUTv8D3Wy6fvn2zlgbYiLfrpg6e3YO/sveGTei4f1+1HoSTkZIRo4GdEaccXkKshwwuVnNLkfhRAoeEnP5HGCNf+ACM1bCIz9uaPamB7HMNZGHtBsXnjDQ== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by CH3PR20MB7441.namprd20.prod.outlook.com (2603:10b6:610:1e5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.23; Fri, 2 Aug 2024 08:32:32 +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.7828.023; Fri, 2 Aug 2024 08:32:32 +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 v9 0/3] riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs Date: Fri, 2 Aug 2024 16:31:59 +0800 Message-ID: X-Mailer: git-send-email 2.46.0 X-TMN: [Y2GrmuNqxRsTNGpBW9QLSg4nEXt73RUWBAqnOVrJgvA=] X-ClientProxiedBy: TY2PR06CA0023.apcprd06.prod.outlook.com (2603:1096:404:42::35) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240802083200.1286151-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|CH3PR20MB7441:EE_ X-MS-Office365-Filtering-Correlation-Id: 87503412-5d33-409b-f8d5-08dcb2cda65d X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|5072599009|8060799006|19110799003|3412199025|440099028|1710799026; X-Microsoft-Antispam-Message-Info: oxTy0w0jnPhmSFNEAZtJZOE2FLooTG0KBfthd1IyWaCgO06Xjz+IVAvNrFHYx3AdXsG4wZFCkY7Yl7CrQmFNrg4Y8UFR36YutmuLKOJvVr4lEjKGsH+XFPrFLDbwj9vlmOV5kJo7kOpQJfG6lyUiW25FujlfFMAmOxb6w/4u3ct5efFuL7ln3TmClm7XGF9aD097BoaViLDn+peZNBERPBfZ87ZcNLtr0XLssi9SuxfJLTAMZshxyzNFqeWeWF9k4Ye0hL2N1ecsDiTAm+XkXlAkuPscaVDOEo+/7YbOTPQ7ig33QspTbMIOg7xZwjcbGEFhI6pDjBuS/3gCOU2bh/y178yny9xBdvgRWV3nfkiA05jNo/V4H6mIMDymgkeqD/2Hu3crzWX5Yozr/ASq4Eh2cXHRL6iIKxxR4V3aQ6Q/jF6o/FkDMA9EL59WDatNL7+M3Ul5P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hkZYNWw6Yn42/kMSO9OXsXiVjFbxWCpe4YZwi2TUdcPjMDCH9zWsRPTXX+qtTX80NPQ3qlUeTZuw4SAq9GagXWcjZcuR6yzpT0PmGQOUtR6RJLPQhYI2UshKN1Pd96N2+tzcOTqKpj5tw1RYjYG6/3AC1zSjhDUc9odGSkNRREL5yhWLOqSFlFhAZG+uD/Vqm3/GI7zvBm9OPE+kRvrl0y9a9IgfJjGnpjmY5FyWyi1TyP4atjaoWQDKdp1K8KYsiQHfiz8rBfpdRBpHLtiaN/OdX+yHz9iN8VxGcveJLQ91fA8t7+KElPHIfR2deVJ5s3D8JhAOQ0qKAhFaOVNieucSBUR5d2PNvYEKpGWuFQs0NSvD3owZ78KI4l66UwMuvaKWYOkiokjuhHMK76h+7ahMn9kXnzuQtfpvEpt8eqTC+Vl7AZFgSTFSNb+OvnZCX/jOM0fTmm1EoBKcvBthlalt1TpnmWoUdhwMqDwEE21OlkxwDTpD8QV2CAiaHRNFmGISLmky+s7u9ALhCvh0bklhu X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87503412-5d33-409b-f8d5-08dcb2cda65d X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2024 08:32:32.1533 (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: CH3PR20MB7441 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_013237_430253_7DB200DD X-CRM114-Status: GOOD ( 10.89 ) 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 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,cv1800-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,cv1800-dmamux.yaml create mode 100644 drivers/dma/cv1800-dmamux.c create mode 100644 include/soc/sophgo/cv1800-sysctl.h --- 2.46.0