From nobody Mon Dec 29 01:10:01 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04F93C4167B for ; Mon, 4 Dec 2023 09:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232675AbjLDJvI (ORCPT ); Mon, 4 Dec 2023 04:51:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234719AbjLDJvE (ORCPT ); Mon, 4 Dec 2023 04:51:04 -0500 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10olkn2098.outbound.protection.outlook.com [40.92.42.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0EF9D7; Mon, 4 Dec 2023 01:51:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CruJKY1iQhpeqGQ781MlC83aB11V2sNiYZeTlhK1xmBD0IDiyTUnZqi8L3n+GwmOlEMOOjFk2SZ8JtivqD3RiiCafQStrxeJWjeNZ56REzXYHpzxX8eWh1W26+V3d/GB/fxvOowPsq2iH5i7Is0VmNT85urmT3i5JVT3MFOMoXI+L4X74GhT2OOkJ3NUB7g765O2phoYaoB2/WGKQoX70kU85MJdVNBdrPa7LF1c7k/JQ9gnai3GIkPumj20u/qweAk7dyQ6gI1rNOoC+VAh6KqtcOll71UArMylZJywk1C2xrRV3iAYaZaXuNoc2xXkfGmN4Lay8bWp0P6WGEulOQ== 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=c7ZSTj6PSfr42FsNwLcQRtsKwCK3MOD80NKq6DnLGfg=; b=CaHyUrFwgCHqqs1dUdFaiX5moZG+ypaqB2hj/kSDtKQErcya7OEGnrWa0162YD6wWGgJfrQnherwU1L+cvtLzxTTdwqjU0EUDOMHOjEJMGl4z7Uj9YtV4CUELP5oUXe+eHpnAQ+svGoY0ORfacZDnfaDlLHstcpb56ATBc/ASHARawQEKCRomFhe1r70owdn1Ieun62DnICfjPVK7OkXZf1Ji+MzwApaXXy88lTzvpRhdxkQQ0iV6YeMd6drFb4/7Ia/AD08CF09/o/Qex7QErOBIR1/jsVsRZlWA8qqfZ7TfU/YshXWLP5zpQj3Rq4CqM+2iFQdXnk2Pt/SnbMlVw== 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=c7ZSTj6PSfr42FsNwLcQRtsKwCK3MOD80NKq6DnLGfg=; b=k6/chE+s3QDxrUoVI+S1Qr6OjUj/S0IDy/DFsgtYJGG2X7IeOpwpyNPWtBAfiI5D4bobqeYCm/fYuMcrkp9CxZAwWypWL+SSwhkQcgiDaYyetYPPIT1eiXxwqGkf8KIN3mM4WUi7PqM93qKQwx7QsqXZUY/GGvXYfLc+nuViXZeMZeHMewrtXSnFLauRaZ+Wm21bqsOnA7COl84bM69SnzIGwzzbh5pQFpjaEKe/wLcy808RnWsZ4+/JJcQedDz7JLiRdTv7iU1+ksEnaqIjQPJgEqtI+tkMdkj9Jrs5LZgg5GfAyZcnlr6n9aYK13PxYWrZH0Mf0NtfihKCp2MOBA== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by PH0PR20MB3718.namprd20.prod.outlook.com (2603:10b6:510::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.33; Mon, 4 Dec 2023 09:51:06 +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.7046.024; Mon, 4 Dec 2023 09:51:06 +0000 From: Inochi Amaoto To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Inochi Amaoto , Chen Wang Cc: Anup Patel , Samuel Holland , Guo Ren , Jisheng Zhang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v5 1/2] dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs Date: Mon, 4 Dec 2023 17:51:08 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Content-Transfer-Encoding: quoted-printable X-TMN: [dWtdlKf4exY+P/c9dtvZfCnD7zv3LvMG8VMsWUiv+fo=] X-ClientProxiedBy: SJ0PR13CA0127.namprd13.prod.outlook.com (2603:10b6:a03:2c6::12) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231204095110.667480-1-inochiama@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|PH0PR20MB3718:EE_ X-MS-Office365-Filtering-Correlation-Id: be9437fe-e0a3-4746-c64e-08dbf4ae88fd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VbK34+jc73Vxuk7NS8pqn9Gh6s7dpbjtyjOtVtss1s2sUQVvGBTQS8H72mwHwFBz4CT+F2xbDEeRsYZ9ufekQqvvGWwLytqxOioc9Wsresl4Y6qO/7JkcP/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WMjW74bL518AoJVGEobKpI9E?= =?us-ascii?Q?=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: be9437fe-e0a3-4746-c64e-08dbf4ae88fd X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2023 09:51:06.6800 (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: PH0PR20MB3718 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The timer registers of aclint don't follow the clint layout and can be mapped on any different offset. As sg2042 uses separated timer and mswi for its clint, it should follow the aclint spec and have separated registers. The previous patch introduced a new type of T-HEAD aclint timer which has clint timer layout. Although it has the clint timer layout, it should follow the aclint spec and uses the separated mtime and mtimecmp regs. So a ABI change is needed to make the timer fit the aclint spec. To make T-HEAD aclint timer more closer to the aclint spec, use regs-names to represent the mtimecmp register, which can avoid hack for unsupport mtime register of T-HEAD aclint timer. Also, as T-HEAD aclint only supports mtimecmp, it is unnecessary to implement the whole aclint spec. To make this binding T-HEAD specific, only add reg-name for existed register. For details, see the discussion in the last link. Signed-off-by: Inochi Amaoto Fixes: 4734449f7311 ("dt-bindings: timer: Add Sophgo sg2042 CLINT timer") Link: https://lists.infradead.org/pipermail/opensbi/2023-October/005693.html Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc Link: https://lore.kernel.org/all/IA1PR20MB4953F9D77FFC76A9D236922DBBB6A@IA= 1PR20MB4953.namprd20.prod.outlook.com/ Acked-by: Conor Dooley Acked-by: Guo Ren --- .../bindings/timer/thead,c900-aclint-mtimer.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtim= er.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.= yaml index fbd235650e52..2e92bcdeb423 100644 --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml +++ b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml @@ -17,7 +17,12 @@ properties: - const: thead,c900-aclint-mtimer reg: - maxItems: 1 + items: + - description: MTIMECMP Registers + + reg-names: + items: + - const: mtimecmp interrupts-extended: minItems: 1 @@ -28,6 +33,7 @@ additionalProperties: false required: - compatible - reg + - reg-names - interrupts-extended examples: @@ -39,5 +45,6 @@ examples: <&cpu3intc 7>, <&cpu4intc 7>; reg =3D <0xac000000 0x00010000>; + reg-names =3D "mtimecmp"; }; ... -- 2.43.0