Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2757987rdb; Mon, 4 Dec 2023 06:53:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIkN20CrCn4VoABrjk9z3X4jjJ9QUZ+az4ow7C3tMLJ6pHsUyx3erOON+R6KCbBQmX+BhB X-Received: by 2002:a17:902:8696:b0:1d0:6ffd:9e2e with SMTP id g22-20020a170902869600b001d06ffd9e2emr3667270plo.128.1701701595121; Mon, 04 Dec 2023 06:53:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701701595; cv=none; d=google.com; s=arc-20160816; b=ij06zbqdLfq1rp6J46cyD2Vn5R2yh2jcBTp5mvvj2SwWDDEOO6Y0vPUhR7fjR28SD6 DhpZScQZaZXYUyoqZmtMINqLQilhhNV2rUEN/Te0jnc0tq1HBReAv/FsJ/p/OHZGchmw wnyXN/c6JKMuCxrL3Yz2ECQpd7IrD4YgZjRcnzlkk3K29n2EZirTA0MgD05oiExxiI6d XPbrneiN0wi7hhcfg4/oJSnAZqGtZTX4leI5FQzf/tknpO5gA7yrUufAgAZdyn7l48v9 VuI/zxIxpUZPWu6LKm0zQrtc3wnWT4fPwdhyO6BaawWqij9TbC1JVDE8yTsiimvceK1g /buw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NEHjb/ZjsHLDb1NgmlwXdD3gR5z03zb3gfvE278c+Us=; fh=kQgBFPjr7C6OIElLAr8Obdx3qL62lMoq0+fjeMQsqHE=; b=SogZDHwVMaA980I8G5GY5lYjFey+cV8W4/bg9ah3Wujv6Gqz0dCKa5Qpa15s0Jd3pL nHvpJscNo7/EGwBdPcFj6xK7e9mOKrvor9oCxsxYtnrURjNZNzbzK1WbLTlHg6qp3hYl OAn+Bb/tbWVizas0mfJugwIuUkrgnv0V6dhl3ShyEhgHKIRYvMLqRaQki7dXbZJpihmc jN/9EpHAd5nH2HEXiC+XNitgHLNfAKa4prGT/4UyWjFC9LCYlbwLVTaZ7Ojpo4dJfGLR J0c3ypn2mKORSJvHmmh77MxreQzGs4nIkKtB9NrI8RRdkWiSahvLnbHjHnwFMILKH+A/ 0Y3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IAFHXXqf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x18-20020a170902ec9200b001cfb7645406si8247007plg.436.2023.12.04.06.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 06:53:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IAFHXXqf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D0985804F605; Mon, 4 Dec 2023 06:53:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346133AbjLDOxC (ORCPT + 99 others); Mon, 4 Dec 2023 09:53:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346066AbjLDOw5 (ORCPT ); Mon, 4 Dec 2023 09:52:57 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E84B3 for ; Mon, 4 Dec 2023 06:53:02 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F40D4C433CA; Mon, 4 Dec 2023 14:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701701582; bh=NuRXrq7N3kGS8uwkFtg1Srlgms/l7Ivsv0arLwupqHw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IAFHXXqfghi9TPmq3hZ9HtoyYfptiVays5G/rHL0Oh/qzMfnG/09yVgyew/Pjh5Yx iQtNBjLovBwZvXAdxLY04z/TLrhKfjE/jbvuDDdL1lc9AuYilZNBdRsPGVARnnRFjH oFgoLhsPJu6kRVMaUY2YxWNU7qDL4A9hHxojVRgJrQ5KRWmS+H0tIJSEVD5p1rj0Ya XIlUvIU4A55BbHhPmceVxjTfpK98QPtzOhMuBFOKw+bSOs3I620udckcQiYAOssx9f 9kzzWOM71Gc7PaEySoWVsT0ZZZhQHzWfck+jlATBFKSB2h5Ng67jrlPA1j7z+E7wCp nKz44afyVm5vA== Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2c9f42ccb55so23095971fa.1; Mon, 04 Dec 2023 06:53:01 -0800 (PST) X-Gm-Message-State: AOJu0YxDPrdm4w/qkam64Rk+D6ddd4sRfP0C0hR6nqNJh4it6s1ZRjX8 YOTpyvSdWTaw6vSnxd7/N7WsvPmhttHEfWCx5wk= X-Received: by 2002:a2e:8015:0:b0:2c9:f181:7347 with SMTP id j21-20020a2e8015000000b002c9f1817347mr1874219ljg.4.1701701580168; Mon, 04 Dec 2023 06:53:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Guo Ren Date: Mon, 4 Dec 2023 22:52:48 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 1/2] dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs To: Inochi Amaoto Cc: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Chen Wang , Anup Patel , Samuel Holland , Jisheng Zhang , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 06:53:14 -0800 (PST) On Mon, Dec 4, 2023 at 5:51=E2=80=AFPM 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. > > 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.h= tml > Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc > Link: https://lore.kernel.org/all/IA1PR20MB4953F9D77FFC76A9D236922DBBB6A@= IA1PR20MB4953.namprd20.prod.outlook.com/ > --- > .../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-mt= imer.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtime= r.yaml > index fbd235650e52..2e92bcdeb423 100644 > --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.ya= ml > +++ b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.ya= ml > @@ -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 > Acked-by: Guo Ren --=20 Best Regards Guo Ren