Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1132694pxb; Sat, 16 Oct 2021 02:33:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPIaL8FpbVA4TECeJMZc8q0ERRNj1aFIk/KAwByXijyRdn89mb0F8FS9fhEP4WksM79Vr0 X-Received: by 2002:a17:902:a385:b0:13e:99e9:17f3 with SMTP id x5-20020a170902a38500b0013e99e917f3mr15704484pla.65.1634376813194; Sat, 16 Oct 2021 02:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634376813; cv=none; d=google.com; s=arc-20160816; b=il/tKsov3lK0JC5Q1hSivyqIWIbOelUu/gjdRPJjGJPN24pFiEh7y3IbyAAzIPT5gi O8ugwNH8lPgAsxO/sjRvN7tG0nX6tc3WaYudjjHNHb2WujL7zDR5c/JOOyT52J7fPTHq Ax3+PicQTtD/Ymma6HJZU8CZzvJXt/Vu0//2hybpCNhO4mZ+DupjRVhjnevvEp/pvhr0 3SP6cbGBtlUN342LNP38lEfu4GeYg4qMisaw2nxyT5xISSP9e1EeI0jG390NeM4hyYot YXHxk55+qMMiXoiyJcgln1ZaBV3Uiu7J73Bn1+xHH3nwAeQzV8BfCK8IUQ3HfGaaomiR DJxA== 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=UMmMwoh0d9xOMBuf6Cb27qJgX9NIbwQbOxUehDVoXW4=; b=VEXvQ/D3f3ibU0kwJnBhtTMuB74bXNId4Wl6dT2jUjIVI29uk+7h0qSyJghwwpvWew udzO8zraB+U+D75Bf0NGdP1udEU2BVexmJipV5UCoyTQc9kEO3ItwU1dWfavImIbLUfX L/+C3GQiOUD1f7cvk+sZWyhjQup0XRHC4jy36pwQuiAzhB2My1SmEarDcGgMVQ2HNrQD QjvgmwxYhwVbJ+iYNlHmlHc6PDgJEJScV62LXbfT3WWj0O90DFwIpdp1dtshwjQENQFN 0JSZfInDC9GnP7aPSBD/aCY34cgWeYNjkpyAT65hhMyS+7w+4h78BG08YiToziU+FEa9 i5pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mSDy6QRx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si12872341pfc.260.2021.10.16.02.33.19; Sat, 16 Oct 2021 02:33:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mSDy6QRx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239998AbhJONsV (ORCPT + 99 others); Fri, 15 Oct 2021 09:48:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240061AbhJONsS (ORCPT ); Fri, 15 Oct 2021 09:48:18 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73C54C061570; Fri, 15 Oct 2021 06:46:12 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id d131so22962428ybd.5; Fri, 15 Oct 2021 06:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=UMmMwoh0d9xOMBuf6Cb27qJgX9NIbwQbOxUehDVoXW4=; b=mSDy6QRxK1GWCZFRze2z/WPjTfj8t295fUbQbf1kfgfC1DUUqn1r6OUB82lPqEziqO aPvbyCh7Fdmn7+U2T9aXBbvBtchCJWUvjWlTV+h4GFPiyaj9eOjPDeaevyfDx+XswY9O qlsP/N0k3ISA1BsIf11JnASBHQ+NVZOu6UIordsImPMmoVJ2eY/Mu64O44OsXQNgP3Uu GAwVOrPFCVDcaz9D9GLZ36hsUqoxlc4cNtH0hVd6r/OJGWnboEInE6zKcQGGMklOLgBs 5qXHsjF3iMMJ/cwwo/tgbfTSCYNdGAYh4RpqZn+X97Ho5avE4EmgJ0pgCpZvhtcZcV2d nePg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=UMmMwoh0d9xOMBuf6Cb27qJgX9NIbwQbOxUehDVoXW4=; b=eBJPyCGVWkZGfifc5wHHIToj7DoSL/rL9ioa3cQhaMR4BAfgcwI7gdgDGjV/HIE3Av Q54F18oddvVi0Hvf7e4tyIx17cv8u6gzFwD8ZRqp9+jLTmN3s4/46omDGXDnpTuy3+8g SWi+5LKHRNoA/yvoBl8YWGlNpVRC5WBKsnsn3oJvVO72nEQ/DApqCgQD1SXonkeFWeVI uXx91/fdpdREhgnpxzhUCQc3qCTSSdfYrPIm5109N+0J1xXCKIRTyznb4D5wP1Q+3PBo DwGHF59woVZHfajBEX9TElJJpVrnArE6ay1B0qMJttJfMtAhvTiwGCtO2YE3rxNY1WBs 8Y2w== X-Gm-Message-State: AOAM531WF2WNJwUV0gNIu+66EiA8ZcRNamvLAyjyp/12nZZf+N00BZf/ HJaOyN+nG91e50RCFBeHGzYN8viPIlPjISxkE7o= X-Received: by 2002:a25:3843:: with SMTP id f64mr12590756yba.313.1634305571737; Fri, 15 Oct 2021 06:46:11 -0700 (PDT) MIME-Version: 1.0 References: <20211015100941.17621-1-heinrich.schuchardt@canonical.com> <49af3dc8-0d1e-e82f-6df2-2bf8338acd3a@canonical.com> In-Reply-To: From: Bin Meng Date: Fri, 15 Oct 2021 21:46:01 +0800 Message-ID: Subject: Re: [PATCH 1/1] dt-bindings: reg-io-width for SiFive CLINT To: Jessica Clarke Cc: Heinrich Schuchardt , Daniel Lezcano , Thomas Gleixner , Guo Ren , Xiang W , Samuel Holland , Atish Patra , Rob Herring , Palmer Dabbelt , Paul Walmsley , Anup Patel , linux-kernel , devicetree , linux-riscv , OpenSBI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 8:15 PM Jessica Clarke wrote: > > On 15 Oct 2021, at 12:54, Heinrich Schuchardt wrote: > > > > On 10/15/21 12:14, Bin Meng wrote: > >> On Fri, Oct 15, 2021 at 6:09 PM Heinrich Schuchardt > >> wrote: > >>> > >>> The CLINT in the T-HEAD 9xx processors do not support 64bit mmio acce= ss to > >>> the MTIMER device. The current schema does not allow to specify this. > >>> > >>> OpenSBI currently uses a property 'clint,has-no-64bit-mmio' to indica= te the > >>> restriction. Samuael Holland suggested in > >>> lib: utils/timer: Use standard property to specify 32-bit I/O > >>> https://github.com/smaeul/opensbi/commit/b95e9cf7cf93b0af16fc89204378= bc59ff30008e > >>> to use "reg-io-width =3D <4>;" as the reg-io-width property is genera= lly used > >>> in the devicetree schema for such a condition. > >>> > >>> A release candidate of the ACLINT specification is available at > >>> https://github.com/riscv/riscv-aclint/releases > >>> > >>> Add reg-io-width as optional property to the SiFive Core Local Interr= uptor. > >>> > >>> Signed-off-by: Heinrich Schuchardt > >>> --- > >>> Documentation/devicetree/bindings/timer/sifive,clint.yaml | 7 ++++++= + > >>> 1 file changed, 7 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yam= l b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > >>> index a35952f48742..266012d887b5 100644 > >>> --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml > >>> +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > >>> @@ -41,6 +41,13 @@ properties: > >>> reg: > >>> maxItems: 1 > >>> > >>> + reg-io-width: > >>> + description: | > >>> + Some CLINT implementations, e.g. on the T-HEAD 9xx, only suppo= rt > >>> + 32bit access for MTIMER. > >>> + $ref: /schemas/types.yaml#/definitions/uint32 > >>> + const: 4 > >> But this is not a "sifive,clint" anyway. Should there be a new > >> dt-bindings for T-Head clint variant? > > > > I assume by new dt-bindings variant you mean: Add a new compatible stri= ng in Documentation/devicetree/bindings/timer/sifive,clint.yaml. > > > > The vendor Debian image uses: > > compatible =3D "{allwinner,sun20i-d1-clint", "sifive,clint0=E2=80=9D}; > > I assume Bin means to stop calling it a sifive,clint0 and instead have > something like > > "allwinner,sun20i-d1-clint", "thead,clint0" Yep, that's what I wanted to see. Sorry for not being clear. The T-Head CLINT is definitely not compatible with "sifive,clint0". > as is being done for their non-conforming PLIC. It=E2=80=99s worth pointi= ng out > that the same is true here; the SiFive CLINT supports 64-bit accesses > on RV64, so this is not compatible with a SiFive CLINT. Moreover, the > RISC-V spec was clearly written in a way that intended 64-bit accesses > to be supported for RV64, though was not completely explicit about > that, which has now been resolved (see > https://github.com/riscv/riscv-isa-manual/issues/639), so this CLINT > violates the obvious intent of the pre-1.12 privileged specs (see > Andrew=E2=80=99s message in the issue, which agrees with my reading). Regards, Bin