Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp163054rdf; Mon, 20 Nov 2023 21:24:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2ksrxLT24h3ugj5RWP1ttH5ruhDYAiN3I/+4QYHxG/A/4rjEJBaSaDBsD1m8crnm3BDEe X-Received: by 2002:a05:6830:6b90:b0:6b9:cba0:93a9 with SMTP id dd16-20020a0568306b9000b006b9cba093a9mr9666914otb.31.1700544246202; Mon, 20 Nov 2023 21:24:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700544246; cv=pass; d=google.com; s=arc-20160816; b=XDM2rttZqrBOG9KFwDRUFLeqPRfYUT4jzE6Hn4iU/cMqXJPxa/DSKkFWKM7gqqfMES w2QDVhuJ6WzhcUr+z7Cgf5+i/LY5bT0rJccsRUDzuALCHJVjsaTYmlOWLTjvg10DF3n7 RCllwpRm4AuLncxpXSqEuBsCpXgCSA3QMHcJ3pZTf5MlIDwRNDk1pbSf4TtT1zRGPyj6 6M+QxFQbXwnbqXMCll23cSn6FHmKWVqDP19jksnGVvQZZoEdYKxJE9lse7OdYUodo302 YY521mLZmq/0leTmqG9rnsQQnZluYegPZ218ko0+RjKjCFn0aO1HczpVODcmQ9//2XFK ERog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:subject:user-agent:date :message-id:dkim-signature; bh=4DCCkKvHvaH6ays5/2qMEgzlp2MMmXrTnh0zfZIwIGU=; fh=8+hKz/O//nAHuRKQ0k89UgDVgj2Xo52ECZwQgHr2X4M=; b=jLARwKbTuVfjllTvVIEI82Ir4gZdYiANVYfSCn3X2Fa/tImDA3fS/Gxlc9SEjSCOXA TV503fEbjl1dZ40l2igHOKcvOmQhY40BqJxYXBjm3NKsxemBEDgTeb18ichJP3xgB8UL ssxfJea730Hi/TK2XauWIi3YuAdw4rtP0X0s1yGFlqTSwmnfGH0V5txUU9OVYNPoRpp0 vSp5ap6pzqnd08wComHzUWRrPRQIVM8n32G/EO4dqfNDB/v16++jb//Kpyv5N0CDx63R wQ+MWo3QQlbQhIXyKhTdELheGLxeDciMNwEwyFRkNc3Zv2Ma9qAHkR3UdcGDKmEhjd0m 5LPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="CUD/F7aA"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id u12-20020a63140c000000b005b42f4443b7si9784516pgl.653.2023.11.20.21.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 21:24:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="CUD/F7aA"; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CB953809C164; Mon, 20 Nov 2023 21:22:55 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233333AbjKUFWl (ORCPT + 99 others); Tue, 21 Nov 2023 00:22:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKUFWj (ORCPT ); Tue, 21 Nov 2023 00:22:39 -0500 Received: from IND01-MAX-obe.outbound.protection.outlook.com (mail-maxind01olkn2069.outbound.protection.outlook.com [40.92.102.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDCCBE7; Mon, 20 Nov 2023 21:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cTEYwPOQbrrmFF8D9TWX7AqS5BuTEk+8dXDgWmj0KwAXbXxTjmXEaz593yjRP+KuPgfOLzvOxJgKDM42ltaBSKOed6FnTHWXKcublt+KIM8FNdYOz+R0iQPToyI5QoXjF8M3N5gR/umRnXo1ZsKKM0TZC0JHH0sZ0fhSJNd6iFyaiGE/tSE1ymStwsNU8jYRUQ18d4dWjb8xHUgWOZ45UyyJ7Q12zXvH6vcwmEVk+EaDO5oWTxtqpZJy7xw1EIosJU63ep7hJZMLORENAjFxorOUn4MpIf9N4fWrwmO2OEb8pZkvoN+hkrBfo2shwS0P+97eem29J1QiC2rvQXjZBQ== 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=4DCCkKvHvaH6ays5/2qMEgzlp2MMmXrTnh0zfZIwIGU=; b=PciXcvpFBCCf3joTvl1hnUK4Bdx14kTUr2m4RxD9dw0SZl44NvD+tAb31CgPEFzFgu8fVBOwQ5Rf6jBusXSQ6fZ000V0zkMuXoLXkBbh+gd0uKOh97sz1b1nzgowv8uiSxowS1RMnOp6GyDjseZ8vHKe1RuVkq9JEY1xFFdn0gcabOXIMsZAKQxLMItc4m9ty+5X42Q5eznautjkCgnbZOoQFcfsJmjbKZ85w8OZ70BPS+PPP6bA6uAcyOHC9V+tI60C91X9CJxsUyQakJM/deOqlNGpmdaTrr9GC2mYocjWokJDmfbgWqkRlzkhv3hKFQ2WIn5oXFArO9qVgZhP0Q== 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=4DCCkKvHvaH6ays5/2qMEgzlp2MMmXrTnh0zfZIwIGU=; b=CUD/F7aATTKUbdQgzg2CHacIi7ZGgrbBsmPqnZkBVpQFyWd48bRyGvDLsq4KVraNIJ2Bt12cc2TYzxasWwehrGLR83Fc/BRzB0+uy/t3IKOz9Tkj8Wsgcxzheq310dJ2Tuo3nFuhPR3wsSw14ox6aBL/p2SbyIMFhrr50IU7nf+J5y4xR/kvNUQMTnjriD2C5VH9cXfniOTRGeLscn1BQCnyyQMzlH6tTTq1dZKToiRHdZ7ZbLTR4hUzaBZxqTFITNjWme5ljsCq/+RXIn6kZI/mfeNNmQmwtkPpEsnGdFmMtMa6fZKK036cWwxiM6Zt9Mg8j/dzB1EQTX8/w+TLog== Received: from PN3P287MB0324.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:d6::7) by MA0P287MB1708.INDP287.PROD.OUTLOOK.COM (2603:1096:a01:fe::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.28; Tue, 21 Nov 2023 05:22:28 +0000 Received: from PN3P287MB0324.INDP287.PROD.OUTLOOK.COM ([fe80::5a24:3fd5:dd38:3ecd]) by PN3P287MB0324.INDP287.PROD.OUTLOOK.COM ([fe80::5a24:3fd5:dd38:3ecd%4]) with mapi id 15.20.7002.026; Tue, 21 Nov 2023 05:22:28 +0000 Message-ID: Date: Tue, 21 Nov 2023 13:22:24 +0800 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/2] dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs To: Inochi Amaoto , Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: Anup Patel , Samuel Holland , Guo Ren , Jisheng Zhang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org References: From: Chen Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TMN: [bmKQOqNJmyeenlMY9E6QKWpNWSoFhZ4P] X-ClientProxiedBy: SG2PR04CA0213.apcprd04.prod.outlook.com (2603:1096:4:187::11) To PN3P287MB0324.INDP287.PROD.OUTLOOK.COM (2603:1096:c01:d6::7) X-Microsoft-Original-Message-ID: <5a817899-3d86-4ff1-ac66-60d13ba095f3@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PN3P287MB0324:EE_|MA0P287MB1708:EE_ X-MS-Office365-Filtering-Correlation-Id: d39f376f-617b-4f2a-1d72-08dbea51da19 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UE4pyIOWDZagaLIeSfq7n1EqvkFwhlx4YvqYZU29B/Ay4edvMWTUsjDIvCusK/elee8S04lkeTPYda65mMV0IlZaV0PkPSDcqt78xT4dQsWt19nBZHmWF85cmd9C2ZPTe5M48IinzyNXAreLJQ8oXwiuqoTRQ/O8pEievr6mG/mPjX7Tp/4bPI2ayLrlyo/xAYXZ/rVq0f6BbAMC3rQp7FSodEqrwTfWtXYvXnDWQboYkrRfcEdbSq/gSB6i0wuTQ9LB4YpiQ/GTHXAUfLX8dtQd258JA7eE0eUFoKgFKQnXzKeWC4GwlSKQI1fzVWgKAwsM1cU07ASdhVfbdrXs5iYDvEFh1dyineMBl8JMNvkon6ofLqNi7Bwe10EWbE0rODriNLW9GPHhj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f-8?B?VUh4THlJcTNTek4vd0hDNXQ3dThDTjRlMkxGYnduVHgrbW43dXFBNW1aSURv?= =?utf-8?B?OFFDMkpWd1AzeU9UWFlneXZDWlR1cnYraHlZaE9HUThDTUlXRXM4cGt3YVNU?= =?utf-8?Q?HuyqGKs7YgbOH6vJx3fXYMX3brgAAVXETeCqGuIaPoEo=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d39f376f-617b-4f2a-1d72-08dbea51da19 X-MS-Exchange-CrossTenant-AuthSource: PN3P287MB0324.INDP287.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 05:22:28.0741 (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: MA0P287MB1708 X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FORGED_MUA_MOZILLA,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 20 Nov 2023 21:22:56 -0800 (PST) On 2023/11/18 15:10, Inochi Amaoto wrote: > 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. > > 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 > --- > .../timer/thead,c900-aclint-mtimer.yaml | 42 ++++++++++++++++++- > 1 file changed, 41 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml > index fbd235650e52..053488fb1286 100644 > --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml > +++ b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml > @@ -17,7 +17,20 @@ properties: > - const: thead,c900-aclint-mtimer > > reg: > - maxItems: 1 > + oneOf: > + - items: > + - description: MTIME Registers > + - description: MTIMECMP Registers > + - items: > + - description: MTIMECMP Registers > + > + reg-names: > + oneOf: > + - items: > + - const: mtime > + - const: mtimecmp > + - items: > + - const: mtimecmp > > interrupts-extended: > minItems: 1 > @@ -28,8 +41,34 @@ additionalProperties: false > required: > - compatible > - reg > + - reg-names > - interrupts-extended > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: thead,c900-aclint-mtimer > + then: > + properties: > + reg: > + items: > + - description: MTIMECMP Registers > + reg-names: > + items: > + - const: mtimecmp > + else: > + properties: > + reg: > + items: > + - description: MTIME Registers > + - description: MTIMECMP Registers > + reg-names: > + items: > + - const: mtime > + - const: mtimecmp > + > examples: > - | > timer@ac000000 { > @@ -39,5 +78,6 @@ examples: > <&cpu3intc 7>, > <&cpu4intc 7>; > reg = <0xac000000 0x00010000>; > + reg-names = "mtimecmp"; > }; > ... Reviewed-by: Chen Wang > -- > 2.42.1 >