From patchwork Fri Apr 12 07:06:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13627015 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 60418C00A94 for ; Fri, 12 Apr 2024 07:06:30 +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=Em32nshIMhbpK4XReBvCZetQjq6pYnJz5QyI4qvW6TA=; b=xpIAGdIMAweh82 HCi8VM3sOURN+dtIEQr2QiB69eZ6TBlQRW5tv6gMAylIWyzkdko3iXvcANm7g0IHyJZKa+JJrLl5r vTEH4aIFHsbM74I4ogAPjI5X5uhho0isfVyrYy5Oj4pMU6D/7TOm13YWsAV/Zz92e2fThWyXtrZw1 KfvBsl/oMYIWre3iqjjQjjYCS4IY5f9qWWczR3n33zb07kV/Wlf63j4DAxIWpxIrj3T/FjKmWBuYC IFGXXeuO5pkiuCaBf+Y5FWxQFvoFzxzD6b5DgCSiuMUlSd4cB7ubf9MDnINf2Kejwa+cE9ouEFvYk x1Cgdfzkdm1XhKBRhj7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvAzS-0000000FkRi-2Td4; Fri, 12 Apr 2024 07:06:26 +0000 Received: from mail-dm6nam11olkn20800.outbound.protection.outlook.com ([2a01:111:f403:2c15::800] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rvAzO-0000000FkPg-2pV1 for linux-riscv@lists.infradead.org; Fri, 12 Apr 2024 07:06:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jy7QPJxTTHTliNKDmoo2BzM41+Mmg60yCD9gZ8wUDo/YqhcI2hWHOnjT3uyi4n4r07XvCbArNE4XOolTD/8Z5n0hAEp2y2GxPyeBvjFHqSEGtX1u+13UwLWUnXDL5vUgQg2q+1l9zlO7zX7Mt8Ijtaw3OB7bt1VjasUu/MzMmtFZaBEhCE4Fx7qXBwEN0QayOoiqxz+f8Bg8yIfiQ+2l15hdgROCvT7QUT/suFm2IAoNbdGxrkfibAmPL+QVPXGfL8jz5q2jhutJdcwLTQOlBw4pIRSEHJ2TDEUr/V0D1cPogsrsn6Qp2bzK0ArMVS8ToY4E1we8HJXueMLeoHbY6g== 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=PSdhpdIFY/BUNL2KPiiab+YLI170g9vlizGWY0C00TU=; b=mfDjBJ+n9cjpk3EDIv6/29kPQjQTzWanZkc5qLJwNcRmRAR/cAlf4Zwl2WEK6B2oCXRCoPEaDPFQQTSxrfuUoqqnt2nDdV5TjBHUwAoawiiX47SMrSiW/qgqEXlWkDVBo6JefNabdzw1japjeC0Bs8sM9vttmP8EXkrha7vdpXNmxnu2Or3SqGLNRUzCDlqCQR21ypLwvB0utoLgWQOPs9n3b+fiPyZB3tXOzdqDrJCNQM0r6iPv5tPXcc2hLl4FIg5o1PQ2jrH5EOh4MeCnrGxmuoxniLDim1INJdtiV8OPCe1c7eaCKQb1L3s7bhr80k9sr2nw5xmIKtDu9enGPg== 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=PSdhpdIFY/BUNL2KPiiab+YLI170g9vlizGWY0C00TU=; b=gelWtiffPjO5yMHeRclpjFfU8KuQsTEO4P2U3p+iEEfKlKAqzuqYHMR/zO2DEfMUhaoB5/bomuC895LXMcZNilIkSNCpyI52B4bjJU5sb3wxpXfNd3BCSfb4DMkv6eRTWqpfjbitKDBW6XFtG0SaFw8epjxNFbRihKdKsCUpigass7DNEy0HARUONPPoaJCAWzNh6gF8X8jmtPB+2faF8dSkQcIpmeD8JI4iQK/2ZhBgMF3McNkgf7SVFoRxxRzq/fS9bx49Y+dy/Mas18IK9Fsa191UtJU+uqmXj4m3zStWAHLH/aShHO9XfsPFmEEhVHEF1Gq0pTK1s5O+ih4awg== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by SA1PR20MB7440.namprd20.prod.outlook.com (2603:10b6:806:3e1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.56; Fri, 12 Apr 2024 07:06:17 +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.042; Fri, 12 Apr 2024 07:06:17 +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 v8 0/3] riscv: sophgo: add dmamux support for Sophgo CV1800/SG2000 SoCs Date: Fri, 12 Apr 2024 15:06:26 +0800 Message-ID: X-Mailer: git-send-email 2.44.0 X-TMN: [MtOayi7d3Pd2QjF5KvyqRN5W3CdgWaYyz81OJLYLavs=] X-ClientProxiedBy: TYCP286CA0330.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3b7::19) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20240412070632.59800-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|SA1PR20MB7440:EE_ X-MS-Office365-Filtering-Correlation-Id: e1361809-e541-4834-1c0d-08dc5abf0c86 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KUdqQT7qdudnd+Wp8zVlmJOdsrJ2Ey8ts0ej8Iul7gOKq8xdZ2xUclnEeoCGgPg3m43qiTwNKXw86GXeDbPKz6Wyar3WyWxr8C6+dPnFDHypLSHdjj8eEA1UpE8TorlSArQq/BbYD/2zf+VPQfFJ8MytyvX2nnshMeS7ng5HYNA/bgcj/Rz0O0Pb47w9eUME/2Nxuuu9nPoPSrSd/NmQafwVmomKFmJCrGEOVVFqR0tQFrixJ1/NNemwfzRJNDQ4cCDccQ7OBlt1vjn/C/AbZJTBJlsPhnppKcDHZNmaHuvu8nZcAbnpHOXhfz4Ye6eFn23magDIO1ZU+tSITYzc6iO06NjGF0PtzDoLHFdD8B5FgURBYBDGEfHo9tTjAkmZ8Vl/al71iKaH7jTS2GCCQZ4T5GWsxkS+qFFgXll3Vn/PzGK68QKlHJlP827iBUZ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bQe4+O7YbN2tZ+AbL/W0ZBaCd0pOxDcxLWZNKTvw6A3ZVpWDW5/+KaXf/oHT6VeRtZUb9PUEZ5W+FMxPrgWXv11FeVGqxwz1JUZFmmmXpYvqFUjTxKaVThjeozyrCj6UGixUQydsUTs+HTaD1rQHeQxnmr3dgF8/7fmHKFcP+5TrHGVOYUyH8B9Z+6wCg5cxK0XomzAT9GmV1zKKJ6A6oKtdloJJfdLInI2BSCfV/jq77K2jSQCe92MZozEza548Rle0mlGEgk2RJu1Dtk7g5xiVSDd8xWN9JheGYIwr8Pk6KlaRhhYfoIVYV3yYyQLWuhg8sViOGhKi/AKkuFHfrYQA7nXV/zNdAh8hiuxdHdW+xys6lbO0sd21UanCe47p3q2QhWUycRV7pwcY8GFkws2CWHVnzy3bJT0vkec9P/u3zxUPnXeiD X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e1361809-e541-4834-1c0d-08dc5abf0c86 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 07:06:17.6984 (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: SA1PR20MB7440 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240412_000622_969833_C2B8FC0A X-CRM114-Status: UNSURE ( 9.92 ) 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. 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 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 | 259 ++++++++++++++++++ include/soc/sophgo/cv1800-sysctl.h | 30 ++ 5 files changed, 350 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