From patchwork Sat Nov 18 07:06:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 13459897 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 85D20C2BB3F for ; Sat, 18 Nov 2023 07:07:11 +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=Wh3KwZfxHmDRyRiO/sParwSXJoxcg4BunN20JwX/FyI=; b=MYveoXwRhdRGu6 RrTm7RXjWWC2hIZa8GAD6y1itrgfHxAPl5NZMY/xdVUJzxr+oLU3Z+SUlc6bDPyn6TLgT/oejg/0Y d8Q8ML8Xb5lfKeaF+iIhnQkq1lad+G4znH4RRnTuVaYRBCdLtREGeOE70Vo875Q24L6DfTBsPBn3+ XCfcsNjFpVm4al20jzDjazv+OcwTluAvCFmuKPYuNERUL2HMkVAC0SNsTX3+/6FmN9zmm7BKaNgCO VGZISuCgpZFRLQUidEEL/zqjRUfrvceFHQuQFsZNbY7K9EgJh2ViXt9asoDXgrLE5fTfo7GS0qO0a mlLocUxgTPDTUj0p9qmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r4FPx-007znN-1E; Sat, 18 Nov 2023 07:07:01 +0000 Received: from mail-bn7nam10olkn2082e.outbound.protection.outlook.com ([2a01:111:f400:7e8a::82e] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r4FPt-007zmZ-2Z for linux-riscv@lists.infradead.org; Sat, 18 Nov 2023 07:06:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WhMRhqlaVFj4vqW7JJfFX8Mi/fG+bRkpHxgUb46lPulDrWi90MJDWzAJ+wfLVOD/Eb9KO0a0I2cQN7Y87Ev5CaapG11qDcgSPLqwkH4gr43yHoEIwn89GU6Oa03kDx26SbJ0UO8L+PB+M5HcGT8TDq1ClTAaX+yMaqy05G0Amba7cqKXEZXsRWlh+5pjtJIvmfOn07P0rHWQtyMpwg3X9xgXTy8jBoDcimdcBRBBuD7ug/s7RN8TKzi1q9EeMyx8a+m6Onh5w5ZMKzx8dYsos0/EmJia+NC2wBOiz8Ij44nsvGjE5QqsirrG192bTc7jWz8+jLzQPTBeRrzaeJdwJA== 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=Hlf8FnDWSTHfVTubIk7o87G5BEnajV8kZyL+pd1HgBU=; b=NLyufc719oybi3mZpxUYjDyEOBNmI9V1brwUmkvm0oPbIBOZozpCfTIhul2eY33qSVrg8GlevK7X10jJKgsqbmZHyAXVbL+Kk1S/wMgxa1yIwyfFDP9s6LAI/SyfNIpqe7CMmOjSjcUNA5lRrL+QNjJ++l1RvsUIS2cRtfxyFIwcy+ygX2tHQMNsJvD7Gb4XCrnlSJwKUFElVqEFvYYyiRi66YUEkqS0suWoSXu4bsj8rDOlXFLGH4lCTOqrs1gigZZdlZUnrmKoJ7IIfGNjoHKz5JvaV0EQrFZg2icUBlE8vh1vmmLIyJ1raX5I7jsZblkg7AeOTgs/6WEJ5ucY7Q== 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=Hlf8FnDWSTHfVTubIk7o87G5BEnajV8kZyL+pd1HgBU=; b=XJSLDVvdcTFVC3XqgaxMsPusNNkkIWnUU7bK6Uw5ZNZ1KxYSF8no0fSZXmwG/3HTJbR4OuudDAzb9Tln9d11AjWPsViRd3SmuwV9S+cbzGlbJP4dR10rjeKF2m8pxmTJWmnfWf00oz6dcz6qGgmdo2yfuKfUdUbVGwsLoFywDKjmhNVh2WGCEDcSg6on4fUiyiwFxqiio0HiRInRd3XUp5IhLqj31EsIvhj36GOP3rSqrWcCzA23JiKnUbZRLswzOcwKSK1ILYC22m5DnH3EuhqJ685+MWx4U/mAJXBtASyjsAs155ep2StoIDX99p+B8hin9n7Oe8KNVNWThaZQDA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by DS0PR20MB5788.namprd20.prod.outlook.com (2603:10b6:8:148::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Sat, 18 Nov 2023 07:06:44 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8%6]) with mapi id 15.20.7002.025; Sat, 18 Nov 2023 07:06:44 +0000 From: Inochi Amaoto To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chao Wei , Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Inochi Amaoto , Xiaoguang Xing , Guo Ren Cc: Anup Patel , Samuel Holland , Jisheng Zhang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 0/2] Change the sg2042 timer layout to fit aclint format Date: Sat, 18 Nov 2023 15:06:36 +0800 Message-ID: X-Mailer: git-send-email 2.42.1 X-TMN: [Dz05Plhc5Z5eVXOB+AzIVt/VNzFMjl7zZlC2aPIOXww=] X-ClientProxiedBy: SI2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:4:186::16) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231118070639.244948-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|DS0PR20MB5788:EE_ X-MS-Office365-Filtering-Correlation-Id: 020369a9-a1f9-4be9-5591-08dbe804ebe7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XR7ek868x8iXNJxAMiuC0y/y5cBxTZe93iDV7OcJEr+ZKALyITe5Wt/Ln3QWA8KohA32DJ/psJAIIu5ssAdYvLvX2AaQAit7hpHNwFpOu2EC/wVs1ABVRxH+7PYWJO4PDj6N2R0Dffe9leG4FeYRKJJMF66Br5rqzF8fZ71NEuM+ckS44yMhfmKAyGXHR+uGUiKa9Lq0VQzBHplHDA6fJr3slYDQjMped4pnd67wIheV8xbeRCFxzmJyGlapIlsA7fnINPNCGJ0vad69yjk9LoSriUC1bgXn2GNuM2zcjPmLXTu+iHmx3A+1Y2GRxV88copOOGnuwkN9WNUMkXJ8zgiJJYzrHtafxQf5Y4I8sy+HFZ3vVxYfH8ZlYz5fpq2La/YuESjiJwensngDEi4/4vSE5nk48FvZaccLQkUOFyeNkIvSa9hxTrZCQPzhJfEzpJAmOGkJDHJ3ihC7354dd065ROsI94Wxj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T90EdvRTVTJfMxadheVCecWdUVLmCmwCa1iWSsEtMvwLYk2BSI358XAtcGMJsJ+L1H45N17JSQSbMSpIWWqf9rBUCNJtmA4QGrw6t+WToZux4Rg/KrqXGPh6lnIZP5BPkKTnoFeYcE0OCX9pYtolHR2+8PKjR/VyjYnY2rWL5oMjvZSFcyYl16ajxFe8pdgWlaiDynh5w6ptThTt8BEFEWOQtldhVBu+4TKVwvHqANhhBq29j4E0/w6OlVoRB3lpWtadpoqxJfpCBoCylI2/JjED1+p94t3o63Cswuc/oMJIQXKwyRs0B7Co0PObkERWYYdeu7ud6AxPr0zMM5Tz4dSClWOYLhKOtX/jGOe1e04hnvkj8NMKTAyMvaslg4wnbpMyUdGkDDAfnqd5tPLB4JaI7dxeHYmZQYqju3NwlmsHrCUcbAcNosZdu9Qkw55Y= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 020369a9-a1f9-4be9-5591-08dbe804ebe7 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Nov 2023 07:06:44.0845 (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: DS0PR20MB5788 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231117_230657_916876_893FC07A X-CRM114-Status: UNSURE ( 7.56 ) 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 As the sg2042 uses different address for timer and mswi of its clint device, it should follow the aclint format. For the previous patchs, it only use only one address for both mtime and mtimer, this is can not be parsed by OpenSBI. To resolve this, separate these two registers in the dtb. Link: https://lists.infradead.org/pipermail/opensbi/2023-October/005693.html Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc This patch can be tested with upstream SBI with the following patch: 1. https://lists.infradead.org/pipermail/opensbi/2023-November/005926.html Changed from v3: 1. add all register in the bindings Changed from v2: 1. Use reg-names to map the registers. Changed from v1: 1. change the commit to address the reason for ABI change. 2. remove unnecessary link in the commit. Inochi Amaoto (2): dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs riscv: dts: sophgo: separate sg2042 mtime and mtimecmp to fit aclint format .../timer/thead,c900-aclint-mtimer.yaml | 42 +++++++++- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 80 +++++++++++-------- 2 files changed, 89 insertions(+), 33 deletions(-) --- 2.42.1