From patchwork Sun Jul 14 16:28:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuntao Dai X-Patchwork-Id: 13732752 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 E1A86C3DA42 for ; Sun, 14 Jul 2024 16:30:00 +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=OrshjdpgzGCk6zJKIBmyYmpHkgBTu6gdPifbjmTKgPc=; b=eQdCcwte9tL2Dd b3buaTjgCStJAs1P+GRTgwX5cV+SlQC7pATXFf/4l4di2VM6OEv3kgWe0DAK1RCxJjSaIpyldfLJ3 4QsW91PDQNH9pUuODSV//MUQiLAi1/I6qj+2kh+lb7/qCVnNjmfDJ8Q+svE8rdgLtp+ZytsqxAV4+ CRp+8OThu6dzLYwrH421v+D0AQUQuyHEpO6Mzzx4GE8LSlV6M4KhwsM24PG8EmbxbDtU9NGhptQJx ku6wthXmoUkGtW/hJfikiR0VsGrdb5Rwe5g2ZbPP6OwMSbeAAqYtMGHiz2Yn5in0/GuaX4ff/pDgd x6tFd8NTQ1CupEyA/eMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sT26l-00000004mXI-21c5; Sun, 14 Jul 2024 16:29:55 +0000 Received: from mail-sy4aus01olkn20801.outbound.protection.outlook.com ([2a01:111:f403:2819::801] helo=AUS01-SY4-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sT26i-00000004mUx-1mWQ for linux-riscv@lists.infradead.org; Sun, 14 Jul 2024 16:29:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xnHh2EFMFjarSP4MIhckLLIXqsAUPncp1AlawUH+VP/vV9xpVeld2UI3aJvfw4gFHyXlYYCTPzHiaIiXd8ybhiBTWTgIwcYsZCHqRIfDsY5rCKvkW39Q3gerp8tUvAnF+/iAut2ALCNNQtUVsfdNXo2UnZcWwb6LduuvOsIkwbh15968sVzUalB9aBeBYp+bg/ccJe/0KkQeTcRVjtBUp5HcauDoJdU+TYXWZCDOc6hjZ5pJKH/922W7+1J2Y76LypxeNBh2yKvORQh+bnKQc87/gk1P4ZEz1UjH8mJQtM6Bd6SyuqO1lQif2jhga61/XVl+fATI6OC066nXcQazKw== 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=phmv+tQ1eyYFW0OxLr/9rfI6g4c70iqIJjQVYcaU9K8=; b=nBkQ5FOJu37Z858OORn6/aYFk9REW2QaqORpgqUMOjTKt/0tOL63BfqPxa/9xroLtZEaI/9BnpwuC0za6c6gMgBkKaBzZ/mdj/AfP/Y/7qKvzuPBRXgvg+uC/pmplDuaamr7BxkSZTcYoQqddqbZkDwJoc46YEhVZCPeFVm7L0lKbf2n3xbM0PIhjft5iDRD5GZitbXjegzW4aWHsVn1JqmtH2sm2WLToWBZz6Fu0k86c/5an+qHu/ErjkfWXRFT9taKz0sqKdv6/2a8ON8Ay4v/vVFX7WjcgV+rgAc4cNmuDf89hto+9SIXwp0v7xAawwO3Lp86SFHauiBwzmwPWg== 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=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=phmv+tQ1eyYFW0OxLr/9rfI6g4c70iqIJjQVYcaU9K8=; b=Z72MGWx3+HUj+mMEbomfGfVd2mbjXydXbTJiUp7LUipH4EZbDISRnaRa26xFdZBiwNyrsOOpfT0h5SV7hZud7TP+iuQnMXyCZEQMIDh5voUiVNzymyft+NXWJFziBZ2+QsraP75nc060aEQSdjyrpi5dlQN/gqaI4TokNGIR4FQd4S+Q3pmoJXOGT5OUyzvgNZOU4PAaPH7ndyFtMEg01Hop2NgbPOWfWq9HNbc/8tOMjjwcp49pJajN/B8VvBssJiOzto2QWQf6x1jLEM1H/UdePXbEW64xV05o4pyluXlUdmzs3MGmr46zoyKMoYBi5UF7Wf2fqfg1YTvcdNfGwA== Received: from SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:9b::8) by MEYP282MB1752.AUSP282.PROD.OUTLOOK.COM (2603:10c6:220:bc::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Sun, 14 Jul 2024 16:29:29 +0000 Received: from SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM ([fe80::ac24:7d2b:92fe:20c3]) by SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM ([fe80::ac24:7d2b:92fe:20c3%4]) with mapi id 15.20.7762.027; Sun, 14 Jul 2024 16:29:29 +0000 From: Yuntao Dai To: jassisinghbrar@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, unicorn_wang@outlook.com, inochiama@outlook.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Yuntao Dai Subject: [PATCH v2 0/3] riscv: sophgo: add mailbox support for cv18x SoCs Date: Mon, 15 Jul 2024 00:28:43 +0800 Message-ID: X-Mailer: git-send-email 2.17.1 X-TMN: [WMd+oALftthi6+lw2EBV1i0gMjxbfzTkZgWO5aiMDWM=] X-ClientProxiedBy: SI1PR02CA0008.apcprd02.prod.outlook.com (2603:1096:4:1f7::14) To SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:9b::8) X-Microsoft-Original-Message-ID: <20240714162843.9646-1-d1581209858@live.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SYBP282MB2238:EE_|MEYP282MB1752:EE_ X-MS-Office365-Filtering-Correlation-Id: c8491c91-2bbf-4b64-6eef-08dca4222138 X-Microsoft-Antispam: BCL:0;ARA:14566002|461199028|8060799006|19110799003|440099028|3412199025|1710799026; X-Microsoft-Antispam-Message-Info: wal2kdcyRBG2XVurXZs4IoSDz6m6/oRa7MSylLuJVEWCUNcuFJexvhJ7LE2tFR2rO4/exXrXPG4a4REsIoywbLMhCENs2zq/mHQP2UBEjFJoAamS1o43GtqkUYJzz+VMvmQMEEy4/pHDoHWArUxvfDYlvbzQoCdxG4z5tIESyLoCvtsRBb7xnmD4xXsg+N2G0OqV9zPdZ2uTiAlZDaXMudkg6x0kpFU7P0YY/tN+1o5k+BYdyJVYuOqEnuGDywU55RnmZjTtBLGUsaxk64mjramzUunYZIvCRv/sO0DIm8W0BTHCRbsDEcvMBl4AqgywTFsQiNC056d+x+ULpkXjnGtULPm9xQo+uHXMkL8ueX/fbD49W6o+I/2ZR/bcH7TbHAYV//Xg6wtUWz2Y4LIv1+ybESpni4Qbz4DO3IftMDrGeny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yoEDGz15qYo10jJkSzdTcBwMLl7YaCIutF3xRD718TtiTGRCydxHHKRC60U/g5mVe+SKjndeD8ilIuSmlXr2XhHXnSO/soSQLUudS3E6mhvgS/aDJfJGQSPfiDYE6YNeNObRlBfRZoHPyMYpQc8GHrxsdkWg31mFsRc4UE58te+tP3OzWyQ4Xj53xlC4XaUi/LWkTTwrJswcJ47VCtU+h9rV6TSQLxxMzNuFWcR5nK0mzCfBRcq0H6XM3GMnEY2887dQhf88V1fMHj93qjWUIARj6r3iAvUPFiVC3ejpSqyhb1MMCXIpW707Sc61+IidA7tcYVOwbAm+UA97u2tLI3cfXgHTpdKfEbV/Q0jaEBTiHnEAtHnio/FWMfi1uHsQM+78q3XVV7deZGHbV72BbqyyTUZDEDG496ZexdezWmAlor8e3En+2ntUiyGXUS/QhDLz3+aB7d3ssU4OqLl5ZgFyeXDaJOchzwf1JkngZvD+T3W5LDVs= X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-722bc.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: c8491c91-2bbf-4b64-6eef-08dca4222138 X-MS-Exchange-CrossTenant-AuthSource: SYBP282MB2238.AUSP282.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2024 16:29:27.6644 (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: MEYP282MB1752 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240714_092952_475864_F5310CD9 X-CRM114-Status: UNSURE ( 7.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 mailbox support for Sophgo cv18x SoCs, and test on both cv1800b SoC for milkv-duo and cv1812h SoC for milkv-duo256m Changes in v2: - drop 'recvid' 'sender' in dt-bindings - fix compatible to 'cv1800-mailbox', and change filenames too - change #mbox-cell to 2, for - add struct cv1800_mbox_chan_priv and function cv1800_mbox_xlate to extract informations in mbox devicetree node of mailbox client Yuntao Dai (3): dt-bindings: mailbox: add Sophgo cv18x SoCs mailbox riscv: dts: add mailbox for Sophgo cv18x SoCs mailbox: sophgo: add mailbox driver for cv18x SoCs .../mailbox/sophgo,cv1800-mailbox.yaml | 61 ++++++ arch/riscv/boot/dts/sophgo/cv18xx.dtsi | 9 + drivers/mailbox/Kconfig | 11 + drivers/mailbox/Makefile | 2 + drivers/mailbox/cv1800-mailbox.c | 203 ++++++++++++++++++ 5 files changed, 286 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/sophgo,cv1800-mailbox.yaml create mode 100644 drivers/mailbox/cv1800-mailbox.c