Message ID | 20230211031821.976408-2-cristian.ciocaltea@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1308678wrn; Fri, 10 Feb 2023 19:19:32 -0800 (PST) X-Google-Smtp-Source: AK7set8Tx398w2dZPr66UFKU5f4h/Cy2WRaeEhqr9/myg/wW1lIoeiVYMC8Iv5Q6ARVvYyn9Whln X-Received: by 2002:a50:d0c4:0:b0:4ab:1f18:7839 with SMTP id g4-20020a50d0c4000000b004ab1f187839mr8797041edf.22.1676085571823; Fri, 10 Feb 2023 19:19:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676085571; cv=none; d=google.com; s=arc-20160816; b=RUmrGbJR0+xFcKaYg+w65mp+P5TIiJpgLrKE+YHgjllQF/uz7Fy9z6z0P3pReP4Jx4 rq1Dc1DdWulMfPbYUujHoVoslKm1tsXzNg0WhrObmWzn88M/ZM2IXGr+0PD/JQvx7ZEg TyF6KZZ/iIouDQxjdnP44E1OZefEb/0hmlSfp/ClF7l/aomJJxqlx/1gcr6o8DeiJAeS 16PtHV2VF8tPwYlMr9F+QZutI4uM9NZjgFqVTfiBjJQbZcrhcfm8G/3CG7a9dxkOQne/ Q2FP7yPmRGMJvZz2wBJETB1SAE4opYgQM9qcdGidI6geu/I0t4u+GhMR1oMLaeyU6CAm xMOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6XSpMu/NSQZ/th/rnBtcLXi4vO1PTyxHbDp+OQqyOXo=; b=SM7oGLNDlIVbrDJxpvayG5CZgntnCNW2+DxeLjgNgyNeuh5VZaeP19tmzjss4irWVB PqsJJwBHOHfxHWkE/UW1YfPRNc7xPASk1zHoYLIf3anQayvh5BM5OpgNPGKkYKAeOoph YZ2V04TlGwLcJIg5srbItRW5bhRbwlA/pWA5Z9LYin9LLTZGU/oYHXcW1aNHcWx+TeMf mp0SPhQQoPg1PiNX/1mSM9OEauCBZ+D6vrro8yRiRBujgGidp8IBQUenhnB4dulEm9Du khW2yBjtuPyoP76pQgWuUpck55a8BYnn6HDkbfk5ERzh7L0GKUltU9pjeHj7TDY12vKc GakA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=oG7+Izcd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v21-20020aa7d655000000b00487529d2a0dsi7146972edr.335.2023.02.10.19.19.08; Fri, 10 Feb 2023 19:19:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=oG7+Izcd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229695AbjBKDSj (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Fri, 10 Feb 2023 22:18:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbjBKDSh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Feb 2023 22:18:37 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F9F35BC; Fri, 10 Feb 2023 19:18:36 -0800 (PST) Received: from localhost (unknown [86.120.32.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 68A966602111; Sat, 11 Feb 2023 03:18:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676085515; bh=wsikCNMiZKFgLF8VxbMNAMN5xcuiLSDwJPFjv5RhtwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oG7+IzcdTybxpjx0fCajzTllBsTQirmb2YxPbpyMYNXWSRrIAHC7OipNowaNEiehe nsmTXnfkdBTJ0J3ms/SBwjXwha0y8QURPT20tk9pBIRJPSJ6oiJZDjGJdLYtm3/zVq 6pEbMm+dj3Wk8AAPu8hHutHV9oOZKf47dT+dR7nt0LuuUEhl32SdHwYkKyxuzM+JKs cmYUI0CSBL+sVPigjhXrQ4JdiAcv9OZLhfUo0cRs5Eswf1nC7JJfkZlXrBWF9BbBH7 rZDQ+oxqseId/nIhnNOfqp+COqhx/NzKmuaV5r5smcVl/ukDw2uxlaCtLTvsqvE6eP fhlibOa4agYlQ== From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> To: Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Emil Renner Berthing <kernel@esmil.dk>, Conor Dooley <conor@kernel.org>, Palmer Dabbelt <palmer@dabbelt.com>, Paul Walmsley <paul.walmsley@sifive.com>, Albert Ou <aou@eecs.berkeley.edu>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Richard Cochran <richardcochran@gmail.com>, Sagar Kadam <sagar.kadam@sifive.com>, Yanhong Wang <yanhong.wang@starfivetech.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-riscv@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, kernel@collabora.com Subject: [PATCH 01/12] dt-bindings: riscv: sifive-ccache: Add compatible for StarFive JH7100 SoC Date: Sat, 11 Feb 2023 05:18:10 +0200 Message-Id: <20230211031821.976408-2-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230211031821.976408-1-cristian.ciocaltea@collabora.com> References: <20230211031821.976408-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757503104320599361?= X-GMAIL-MSGID: =?utf-8?q?1757503104320599361?= |
Series |
Enable networking support for StarFive JH7100 SoC
|
|
Commit Message
Cristian Ciocaltea
Feb. 11, 2023, 3:18 a.m. UTC
Document the compatible for the SiFive Composable Cache Controller found
on the StarFive JH7100 SoC.
This also requires extending the 'reg' property to handle distinct
ranges, as specified via 'reg-names'.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
.../bindings/riscv/sifive,ccache0.yaml | 28 ++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
Comments
On 11/02/2023 04:18, Cristian Ciocaltea wrote: > Document the compatible for the SiFive Composable Cache Controller found > on the StarFive JH7100 SoC. > > This also requires extending the 'reg' property to handle distinct > ranges, as specified via 'reg-names'. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
Hey all, On Sat, Feb 11, 2023 at 05:18:10AM +0200, Cristian Ciocaltea wrote: > Document the compatible for the SiFive Composable Cache Controller found > on the StarFive JH7100 SoC. > > This also requires extending the 'reg' property to handle distinct > ranges, as specified via 'reg-names'. > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > --- > .../bindings/riscv/sifive,ccache0.yaml | 28 ++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > index 31d20efaa6d3..2b864b2f12c9 100644 > --- a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > +++ b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > @@ -25,6 +25,7 @@ select: > - sifive,ccache0 > - sifive,fu540-c000-ccache > - sifive,fu740-c000-ccache > + - starfive,jh7100-ccache > > required: > - compatible > @@ -37,6 +38,7 @@ properties: > - sifive,ccache0 > - sifive,fu540-c000-ccache > - sifive,fu740-c000-ccache > + - starfive,jh7100-ccache > - const: cache > - items: > - const: starfive,jh7110-ccache > @@ -70,7 +72,13 @@ properties: > - description: DirFail interrupt > > reg: > - maxItems: 1 > + minItems: 1 > + maxItems: 2 > + > + reg-names: > + items: > + - const: control > + - const: sideband So why is this called "sideband"? In the docs for the JH7100 it is called LIM & it's called LIM in our docs for the PolarFire SoC (at the same address btw) and we run the HSS out of it! LIM being "loosely integrated memory", which by the limit hits on Google may be a SiFive-ism? I'm not really sure if adding it as a "reg" section is the right thing to do as it's not "just" a register bank. Perhaps Rob/Krzysztof have a take on that one? > > next-level-cache: true > > @@ -89,6 +97,7 @@ allOf: > contains: > enum: > - sifive,fu740-c000-ccache > + - starfive,jh7100-ccache > - starfive,jh7110-ccache > - microchip,mpfs-ccache > > @@ -106,12 +115,29 @@ allOf: > Must contain entries for DirError, DataError and DataFail signals. > maxItems: 3 > > + - if: > + properties: > + compatible: > + contains: > + const: starfive,jh7100-ccache > + > + then: > + properties: > + reg: > + maxItems: 2 > + > + else: > + properties: > + reg: > + maxItems: 1 > + > - if: > properties: > compatible: > contains: > enum: > - sifive,fu740-c000-ccache > + - starfive,jh7100-ccache > - starfive,jh7110-ccache > > then: > -- > 2.39.1 >
On Tue, 14 Feb 2023 at 21:42, Conor Dooley <conor@kernel.org> wrote: > > Hey all, > > On Sat, Feb 11, 2023 at 05:18:10AM +0200, Cristian Ciocaltea wrote: > > Document the compatible for the SiFive Composable Cache Controller found > > on the StarFive JH7100 SoC. > > > > This also requires extending the 'reg' property to handle distinct > > ranges, as specified via 'reg-names'. > > > > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> > > --- > > .../bindings/riscv/sifive,ccache0.yaml | 28 ++++++++++++++++++- > > 1 file changed, 27 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > > index 31d20efaa6d3..2b864b2f12c9 100644 > > --- a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > > +++ b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml > > @@ -25,6 +25,7 @@ select: > > - sifive,ccache0 > > - sifive,fu540-c000-ccache > > - sifive,fu740-c000-ccache > > + - starfive,jh7100-ccache > > > > required: > > - compatible > > @@ -37,6 +38,7 @@ properties: > > - sifive,ccache0 > > - sifive,fu540-c000-ccache > > - sifive,fu740-c000-ccache > > + - starfive,jh7100-ccache > > - const: cache > > - items: > > - const: starfive,jh7110-ccache > > @@ -70,7 +72,13 @@ properties: > > - description: DirFail interrupt > > > > reg: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 2 > > + > > + reg-names: > > + items: > > + - const: control > > + - const: sideband > > So why is this called "sideband"? > In the docs for the JH7100 it is called LIM & it's called LIM in our > docs for the PolarFire SoC (at the same address btw) and we run the HSS > out of it! LIM being "loosely integrated memory", which by the limit > hits on Google may be a SiFive-ism? > > I'm not really sure if adding it as a "reg" section is the right thing > to do as it's not "just" a register bank. > Perhaps Rob/Krzysztof have a take on that one? Yes, this seems to be a leftover I didn't manage to clean up yet. The "sideband" range is called L2 LIM in the datasheet and seems to be a way to use the cache directly. The Sifive docs read "When cache ways are disabled, they are addressable in the L2 Loosely-Integrated Memory (L2 LIM) address space [..]". This feature is not used by Linux on the JH7100, so can just be removed here. /Emil > > > > next-level-cache: true > > > > @@ -89,6 +97,7 @@ allOf: > > contains: > > enum: > > - sifive,fu740-c000-ccache > > + - starfive,jh7100-ccache > > - starfive,jh7110-ccache > > - microchip,mpfs-ccache > > > > @@ -106,12 +115,29 @@ allOf: > > Must contain entries for DirError, DataError and DataFail signals. > > maxItems: 3 > > > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: starfive,jh7100-ccache > > + > > + then: > > + properties: > > + reg: > > + maxItems: 2 > > + > > + else: > > + properties: > > + reg: > > + maxItems: 1 > > + > > - if: > > properties: > > compatible: > > contains: > > enum: > > - sifive,fu740-c000-ccache > > + - starfive,jh7100-ccache > > - starfive,jh7110-ccache > > > > then: > > -- > > 2.39.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On Tue, 14 Feb 2023 12:40:35 PST (-0800), Conor Dooley wrote: > Hey all, > > On Sat, Feb 11, 2023 at 05:18:10AM +0200, Cristian Ciocaltea wrote: >> Document the compatible for the SiFive Composable Cache Controller found >> on the StarFive JH7100 SoC. >> >> This also requires extending the 'reg' property to handle distinct >> ranges, as specified via 'reg-names'. >> >> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> >> --- >> .../bindings/riscv/sifive,ccache0.yaml | 28 ++++++++++++++++++- >> 1 file changed, 27 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml >> index 31d20efaa6d3..2b864b2f12c9 100644 >> --- a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml >> +++ b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml >> @@ -25,6 +25,7 @@ select: >> - sifive,ccache0 >> - sifive,fu540-c000-ccache >> - sifive,fu740-c000-ccache >> + - starfive,jh7100-ccache >> >> required: >> - compatible >> @@ -37,6 +38,7 @@ properties: >> - sifive,ccache0 >> - sifive,fu540-c000-ccache >> - sifive,fu740-c000-ccache >> + - starfive,jh7100-ccache >> - const: cache >> - items: >> - const: starfive,jh7110-ccache >> @@ -70,7 +72,13 @@ properties: >> - description: DirFail interrupt >> >> reg: >> - maxItems: 1 >> + minItems: 1 >> + maxItems: 2 >> + >> + reg-names: >> + items: >> + - const: control >> + - const: sideband > > So why is this called "sideband"? > In the docs for the JH7100 it is called LIM & it's called LIM in our > docs for the PolarFire SoC (at the same address btw) and we run the HSS IIRC it's both: "LIM" is the memory, "sideband" is the port. I can't find any proper documentation of "sideband" outside of DT and errata, but there's a hanful of references to it in the bootloader for the fu540: <https://github.com/sifive/freedom-u540-c000-bootloader/search?q=sideband>. It's not really clear which is more correct here: sideband accesses are only useful when the cache is configured as an LIM, at least for general software. IIRC the accesses to the LIM only go through the sideband port for the E core, but I might be wrong about that. > out of it! LIM being "loosely integrated memory", which by the limit > hits on Google may be a SiFive-ism? Yep: TIM is the SiFive version of Arm's TCM (tightly coupled memory), and LIM is the flavor that's farther away (L2 instead of L1). > I'm not really sure if adding it as a "reg" section is the right thing > to do as it's not "just" a register bank. > Perhaps Rob/Krzysztof have a take on that one? > >> >> next-level-cache: true >> >> @@ -89,6 +97,7 @@ allOf: >> contains: >> enum: >> - sifive,fu740-c000-ccache >> + - starfive,jh7100-ccache >> - starfive,jh7110-ccache >> - microchip,mpfs-ccache >> >> @@ -106,12 +115,29 @@ allOf: >> Must contain entries for DirError, DataError and DataFail signals. >> maxItems: 3 >> >> + - if: >> + properties: >> + compatible: >> + contains: >> + const: starfive,jh7100-ccache >> + >> + then: >> + properties: >> + reg: >> + maxItems: 2 >> + >> + else: >> + properties: >> + reg: >> + maxItems: 1 >> + >> - if: >> properties: >> compatible: >> contains: >> enum: >> - sifive,fu740-c000-ccache >> + - starfive,jh7100-ccache >> - starfive,jh7110-ccache >> >> then: >> -- >> 2.39.1 >>
diff --git a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml index 31d20efaa6d3..2b864b2f12c9 100644 --- a/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml +++ b/Documentation/devicetree/bindings/riscv/sifive,ccache0.yaml @@ -25,6 +25,7 @@ select: - sifive,ccache0 - sifive,fu540-c000-ccache - sifive,fu740-c000-ccache + - starfive,jh7100-ccache required: - compatible @@ -37,6 +38,7 @@ properties: - sifive,ccache0 - sifive,fu540-c000-ccache - sifive,fu740-c000-ccache + - starfive,jh7100-ccache - const: cache - items: - const: starfive,jh7110-ccache @@ -70,7 +72,13 @@ properties: - description: DirFail interrupt reg: - maxItems: 1 + minItems: 1 + maxItems: 2 + + reg-names: + items: + - const: control + - const: sideband next-level-cache: true @@ -89,6 +97,7 @@ allOf: contains: enum: - sifive,fu740-c000-ccache + - starfive,jh7100-ccache - starfive,jh7110-ccache - microchip,mpfs-ccache @@ -106,12 +115,29 @@ allOf: Must contain entries for DirError, DataError and DataFail signals. maxItems: 3 + - if: + properties: + compatible: + contains: + const: starfive,jh7100-ccache + + then: + properties: + reg: + maxItems: 2 + + else: + properties: + reg: + maxItems: 1 + - if: properties: compatible: contains: enum: - sifive,fu740-c000-ccache + - starfive,jh7100-ccache - starfive,jh7110-ccache then: