* [PATCH v2 00/10] riscv: add initial support for SpacemiT K1
@ 2024-06-27 15:31 Yixun Lan
2024-06-27 15:31 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit Yixun Lan
` (11 more replies)
0 siblings, 12 replies; 32+ messages in thread
From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano,
Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman,
Jiri Slaby, Lubomir Rintel
Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv,
linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan
SpacemiT K1 is an ideal chip for some new extension such as RISC-V Vector
1.0 and Zicond evaluation now. Add initial support for it to allow more
people to participate in building drivers to mainline for it.
This kernel has been tested upon Banana Pi BPI-F3 board on vendor U-Boot
bootflow generated by Armbian SDK[1] and patched OpenSBI[2] to enable
Zicboz, which does not in the vendor dts on its U-Boot. Then successfully
booted to busybox on initrd with this log[3].
As previous discussion in patch v1[4], maintainer expect more basic drivers
ready before really merging it, which would be fine. For other follow-up patches,
that are clk, pinctrl/gpio, reset.. My current goal would target at a headless
system including SD card, emmc, and ethernet.
P.S: talked to Yangyu, I will help and take care of this patch series, thanks
---
Changes in v2:
- fix timebase-frequency according to current setting
- add other uart dt nodes, fix input frequency
- introduce new uart compatible for K1 SoC
- add 'k1' prefix to bananapi-f3.dts
- fix k1-clint compatible
- fix some typos
- Link to v1: https://lore.kernel.org/r/tencent_BC64B7B1876F5D10479BD19112F73F262505@qq.com
Link: https://github.com/BPI-SINOVOIP/armbian-build/tree/v24.04.30 [1]
Link: https://gist.github.com/cyyself/a07096e6e99c949ed13f8fa16d884402 [2]
Link: https://gist.github.com/cyyself/a2201c01f5c8955a119641f97b7d0280 [3]
Link: https://lore.kernel.org/r/20240618-hardwood-footrest-ab5ec5bce3cf@wendy [4]
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Conor Dooley <conor@kernel.org>
To: Paul Walmsley <paul.walmsley@sifive.com>
To: Palmer Dabbelt <palmer@dabbelt.com>
To: Albert Ou <aou@eecs.berkeley.edu>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Thomas Gleixner <tglx@linutronix.de>
To: Samuel Holland <samuel.holland@sifive.com>
To: Anup Patel <anup@brainfault.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: linux-riscv@lists.infradead.org
Cc: linux-serial@vger.kernel.org
Cc: Inochi Amaoto <inochiama@outlook.com>
Cc: Meng Zhang <zhangmeng.kevin@spacemit.com>
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Yangyu Chen (9):
dt-bindings: vendor-prefixes: add spacemit
dt-bindings: riscv: Add SpacemiT X60 compatibles
dt-bindings: riscv: add SpacemiT K1 bindings
dt-bindings: timer: Add SpacemiT K1 CLINT
dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC
riscv: add SpacemiT SOC family Kconfig support
riscv: dts: add initial SpacemiT K1 SoC device tree
riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree
riscv: defconfig: enable SpacemiT SoC
Yixun Lan (1):
dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible
.../interrupt-controller/sifive,plic-1.0.0.yaml | 5 +-
Documentation/devicetree/bindings/riscv/cpus.yaml | 1 +
.../devicetree/bindings/riscv/spacemit.yaml | 24 ++
Documentation/devicetree/bindings/serial/8250.yaml | 4 +-
.../devicetree/bindings/timer/sifive,clint.yaml | 1 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/riscv/Kconfig.socs | 5 +
arch/riscv/boot/dts/Makefile | 1 +
arch/riscv/boot/dts/spacemit/Makefile | 2 +
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 19 ++
arch/riscv/boot/dts/spacemit/k1.dtsi | 378 +++++++++++++++++++++
arch/riscv/configs/defconfig | 1 +
12 files changed, 441 insertions(+), 2 deletions(-)
---
base-commit: f2661062f16b2de5d7b6a5c42a9a5c96326b8454
change-id: 20240626-k1-01-basic-dt-1aa31eeebcd2
Best regards,
--
Yixun Lan <dlan@gentoo.org>
^ permalink raw reply [flat|nested] 32+ messages in thread* [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-06-28 7:32 ` Krzysztof Kozlowski 2024-06-27 15:31 ` [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles Yixun Lan ` (10 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Add new vendor strings to dt bindings for SpacemiT K1 SoC. Link: https://www.spacemit.com/en/spacemit-key-stone-2/ Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index fbf47f0bacf1a..7ee6e4a89376e 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1362,6 +1362,8 @@ patternProperties: description: Sophgo Technology Inc. "^sourceparts,.*": description: Source Parts Inc. + "^spacemit,.*": + description: SpacemiT (Hangzhou) Technology Co. Ltd "^spansion,.*": description: Spansion Inc. "^sparkfun,.*": -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit 2024-06-27 15:31 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit Yixun Lan @ 2024-06-28 7:32 ` Krzysztof Kozlowski 0 siblings, 0 replies; 32+ messages in thread From: Krzysztof Kozlowski @ 2024-06-28 7:32 UTC (permalink / raw) To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen On 27/06/2024 17:31, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Add new vendor strings to dt bindings for SpacemiT K1 SoC. > > Link: https://www.spacemit.com/en/spacemit-key-stone-2/ > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> So you just ignored all feedback and tags? <form letter> This is a friendly reminder during the review process. It looks like you received a tag and forgot to add it. If you do not know the process, here is a short explanation: Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply. https://elixir.bootlin.com/linux/v6.5-rc3/source/Documentation/process/submitting-patches.rst#L577 If a tag was not added on purpose, please state why and what changed. </form letter> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan 2024-06-27 15:31 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:25 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan ` (9 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> The X60 is RISC-V CPU cores from SpacemiT and currently used in their K1 SoC. Link: https://www.spacemit.com/en/spacemit-x60-core/ Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml index d87dd50f1a4b5..5ad9cb4103356 100644 --- a/Documentation/devicetree/bindings/riscv/cpus.yaml +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml @@ -46,6 +46,7 @@ properties: - sifive,u7 - sifive,u74 - sifive,u74-mc + - spacemit,x60 - thead,c906 - thead,c910 - thead,c920 -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles 2024-06-27 15:31 ` [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles Yixun Lan @ 2024-07-01 12:25 ` Conor Dooley 0 siblings, 0 replies; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:25 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1138 bytes --] On Thu, Jun 27, 2024 at 03:31:16PM +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > The X60 is RISC-V CPU cores from SpacemiT and currently used in their K1 > SoC. > > Link: https://www.spacemit.com/en/spacemit-x60-core/ > Same comment as v1 here :) With that addressed, Acked-by: Conor Dooley <conor.dooley@microchip.com> Thanks, Conor. > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > --- > Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/riscv/cpus.yaml b/Documentation/devicetree/bindings/riscv/cpus.yaml > index d87dd50f1a4b5..5ad9cb4103356 100644 > --- a/Documentation/devicetree/bindings/riscv/cpus.yaml > +++ b/Documentation/devicetree/bindings/riscv/cpus.yaml > @@ -46,6 +46,7 @@ properties: > - sifive,u7 > - sifive,u74 > - sifive,u74-mc > + - spacemit,x60 > - thead,c906 > - thead,c910 > - thead,c920 > > -- > 2.45.2 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan 2024-06-27 15:31 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit Yixun Lan 2024-06-27 15:31 ` [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-06-27 18:00 ` Rob Herring (Arm) ` (2 more replies) 2024-06-27 15:31 ` [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT Yixun Lan ` (8 subsequent siblings) 11 siblings, 3 replies; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana Pi BPi-F3 board[2] which used it. [1] https://www.spacemit.com/en/spacemit-key-stone-2/ [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- .../devicetree/bindings/riscv/spacemit.yaml | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/riscv/spacemit.yaml b/Documentation/devicetree/bindings/riscv/spacemit.yaml new file mode 100644 index 0000000000000..3b151fd02473e --- /dev/null +++ b/Documentation/devicetree/bindings/riscv/spacemit.yaml @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/riscv/spacemit.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SpacemiT SoC-based boards + +description: + SpacemiT SoC-based boards + +properties: + $nodename: + const: '/' + compatible: + oneOf: + - items: + - enum: + - bananapi,bpi-f3 + - const: spacemit,k1 + +additionalProperties: true + +... -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan @ 2024-06-27 18:00 ` Rob Herring (Arm) 2024-06-28 7:34 ` Krzysztof Kozlowski 2024-07-01 12:24 ` Conor Dooley 2 siblings, 0 replies; 32+ messages in thread From: Rob Herring (Arm) @ 2024-06-27 18:00 UTC (permalink / raw) To: Yixun Lan Cc: devicetree, Anup Patel, Paul Walmsley, Yangyu Chen, Palmer Dabbelt, Jiri Slaby, Conor Dooley, linux-kernel, Daniel Lezcano, Palmer Dabbelt, Conor Dooley, Inochi Amaoto, Greg Kroah-Hartman, linux-serial, linux-riscv, Samuel Holland, Lubomir Rintel, Albert Ou, Thomas Gleixner, Meng Zhang, Krzysztof Kozlowski On Thu, 27 Jun 2024 15:31:17 +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana > Pi BPi-F3 board[2] which used it. > > [1] https://www.spacemit.com/en/spacemit-key-stone-2/ > [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > --- > .../devicetree/bindings/riscv/spacemit.yaml | 24 ++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/riscv/spacemit.yaml: 'maintainers' is a required property hint: Metaschema for devicetree binding documentation from schema $id: http://devicetree.org/meta-schemas/base.yaml# doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240627-k1-01-basic-dt-v2-3-cc06c7555f07@gentoo.org The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema. ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan 2024-06-27 18:00 ` Rob Herring (Arm) @ 2024-06-28 7:34 ` Krzysztof Kozlowski 2024-06-28 8:44 ` Yixun Lan 2024-07-01 12:24 ` Conor Dooley 2 siblings, 1 reply; 32+ messages in thread From: Krzysztof Kozlowski @ 2024-06-28 7:34 UTC (permalink / raw) To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen On 27/06/2024 17:31, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana > Pi BPi-F3 board[2] which used it. > > [1] https://www.spacemit.com/en/spacemit-key-stone-2/ > [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 You got a bug reported by tool and you send the same version again, producing the same bug. In case it is not clear: *You cannot ignore* bug reports, comments, reviewer requests or any other reply to your patchset. Each one must be addressed one way or another. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-06-28 7:34 ` Krzysztof Kozlowski @ 2024-06-28 8:44 ` Yixun Lan 0 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-06-28 8:44 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen On 09:34 Fri 28 Jun , Krzysztof Kozlowski wrote: > On 27/06/2024 17:31, Yixun Lan wrote: > > From: Yangyu Chen <cyy@cyyself.name> > > > > Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana > > Pi BPi-F3 board[2] which used it. > > > > [1] https://www.spacemit.com/en/spacemit-key-stone-2/ > > [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 > > You got a bug reported by tool and you send the same version again, > producing the same bug. > > In case it is not clear: > > *You cannot ignore* bug reports, comments, reviewer requests or any > other reply to your patchset. Each one must be addressed one way or another. > sorry, it's my fault, I rushed to send out this series. and yes, I should really go back and check all the thread.. I will fix all the issues in next version (tags, dt error..) -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan 2024-06-27 18:00 ` Rob Herring (Arm) 2024-06-28 7:34 ` Krzysztof Kozlowski @ 2024-07-01 12:24 ` Conor Dooley 2024-07-02 9:42 ` Yixun Lan 2 siblings, 1 reply; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:24 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1691 bytes --] On Thu, Jun 27, 2024 at 03:31:17PM +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana > Pi BPi-F3 board[2] which used it. > > [1] https://www.spacemit.com/en/spacemit-key-stone-2/ > [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 > Please make these link tags when you resend, like Link: https://foo [1] and don't leave blank lines between them and the signoff. > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > --- > .../devicetree/bindings/riscv/spacemit.yaml | 24 ++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/Documentation/devicetree/bindings/riscv/spacemit.yaml b/Documentation/devicetree/bindings/riscv/spacemit.yaml > new file mode 100644 > index 0000000000000..3b151fd02473e > --- /dev/null > +++ b/Documentation/devicetree/bindings/riscv/spacemit.yaml > @@ -0,0 +1,24 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/riscv/spacemit.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SpacemiT SoC-based boards > + > +description: > + SpacemiT SoC-based boards Please work out who is gonna maintain these SoCs and add that here to resolve the bot's report. Thanls, Conor. > + > +properties: > + $nodename: > + const: '/' > + compatible: > + oneOf: > + - items: > + - enum: > + - bananapi,bpi-f3 > + - const: spacemit,k1 > + > +additionalProperties: true > + > +... > > -- > 2.45.2 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings 2024-07-01 12:24 ` Conor Dooley @ 2024-07-02 9:42 ` Yixun Lan 0 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-07-02 9:42 UTC (permalink / raw) To: Conor Dooley Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen Hi On 13:24 Mon 01 Jul , Conor Dooley wrote: > On Thu, Jun 27, 2024 at 03:31:17PM +0000, Yixun Lan wrote: > > From: Yangyu Chen <cyy@cyyself.name> > > > > Add DT binding documentation for the SpacemiT K1 Soc[1] and the Banana > > Pi BPi-F3 board[2] which used it. > > > > [1] https://www.spacemit.com/en/spacemit-key-stone-2/ > > [2] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 > > > > Please make these link tags when you resend, like > > Link: https://foo [1] > > and don't leave blank lines between them and the signoff. > sure, will fix in v3 > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > > Signed-off-by: Yixun Lan <dlan@gentoo.org> > > --- > > .../devicetree/bindings/riscv/spacemit.yaml | 24 ++++++++++++++++++++++ > > 1 file changed, 24 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/riscv/spacemit.yaml b/Documentation/devicetree/bindings/riscv/spacemit.yaml > > new file mode 100644 > > index 0000000000000..3b151fd02473e > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/riscv/spacemit.yaml > > @@ -0,0 +1,24 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/riscv/spacemit.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: SpacemiT SoC-based boards > > + > > +description: > > + SpacemiT SoC-based boards > > Please work out who is gonna maintain these SoCs and add that here to > resolve the bot's report. > sure, talked to Yangyu, will also add him as maintainer this should fix bot's complaint.. btw, thanks for all your other comments in the whole thread, will fix them all > Thanls, > Conor. > > > + > > +properties: > > + $nodename: > > + const: '/' > > + compatible: > > + oneOf: > > + - items: > > + - enum: > > + - bananapi,bpi-f3 > > + - const: spacemit,k1 > > + > > +additionalProperties: true > > + > > +... > > > > -- > > 2.45.2 > > -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (2 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:22 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 05/10] dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC Yixun Lan ` (7 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Add compatible string for SpacemiT K1 CLINT. Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index fced6f2d8ecbb..c2e68587a806a 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -31,6 +31,7 @@ properties: - enum: - canaan,k210-clint # Canaan Kendryte K210 - sifive,fu540-c000-clint # SiFive FU540 + - spacemit,k1-clint # SpacemiT K1 - starfive,jh7100-clint # StarFive JH7100 - starfive,jh7110-clint # StarFive JH7110 - starfive,jh8100-clint # StarFive JH8100 -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT 2024-06-27 15:31 ` [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT Yixun Lan @ 2024-07-01 12:22 ` Conor Dooley 0 siblings, 0 replies; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:22 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1185 bytes --] On Thu, Jun 27, 2024 at 03:31:18PM +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Add compatible string for SpacemiT K1 CLINT. > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> > --- > Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > index fced6f2d8ecbb..c2e68587a806a 100644 > --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml > +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml > @@ -31,6 +31,7 @@ properties: > - enum: > - canaan,k210-clint # Canaan Kendryte K210 > - sifive,fu540-c000-clint # SiFive FU540 > + - spacemit,k1-clint # SpacemiT K1 > - starfive,jh7100-clint # StarFive JH7100 > - starfive,jh7110-clint # StarFive JH7110 > - starfive,jh8100-clint # StarFive JH8100 > > -- > 2.45.2 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 05/10] dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (3 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-06-27 15:31 ` [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible Yixun Lan ` (6 subsequent siblings) 11 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Add compatible string for SpacemiT K1 PLIC. Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- .../devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 709b2211276bd..3d0426b569042 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -59,6 +59,7 @@ properties: - enum: - canaan,k210-plic - sifive,fu540-c000-plic + - spacemit,k1-plic - starfive,jh7100-plic - starfive,jh7110-plic - const: sifive,plic-1.0.0 @@ -71,7 +72,9 @@ properties: - thead,th1520-plic - const: thead,c900-plic - items: - - const: sifive,plic-1.0.0 + - enum: + - sifive,plic-1.0.0 + - spacemit,k1-plic - const: riscv,plic0 deprecated: true description: For the QEMU virt machine only -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (4 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 05/10] dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:22 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support Yixun Lan ` (5 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan Found SpacemiT's K1 uart controller is compatible with Intel's Xscale uart, but it's still worth to introduce a new compatible. Signed-off-by: Yixun Lan <dlan@gentoo.org> --- Documentation/devicetree/bindings/serial/8250.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml index 692aa05500fd5..0bde2379e8647 100644 --- a/Documentation/devicetree/bindings/serial/8250.yaml +++ b/Documentation/devicetree/bindings/serial/8250.yaml @@ -111,7 +111,9 @@ properties: - mediatek,mt7623-btif - const: mediatek,mtk-btif - items: - - const: mrvl,mmp-uart + - enum: + - mrvl,mmp-uart + - spacemit,k1-uart - const: intel,xscale-uart - items: - enum: -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible 2024-06-27 15:31 ` [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible Yixun Lan @ 2024-07-01 12:22 ` Conor Dooley 0 siblings, 0 replies; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:22 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1085 bytes --] On Thu, Jun 27, 2024 at 03:31:20PM +0000, Yixun Lan wrote: > Found SpacemiT's K1 uart controller is compatible with > Intel's Xscale uart, but it's still worth to introduce a new compatible. > > Signed-off-by: Yixun Lan <dlan@gentoo.org> Acked-by: Conor Dooley <conor.dooley@microchip.com> > --- > Documentation/devicetree/bindings/serial/8250.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml > index 692aa05500fd5..0bde2379e8647 100644 > --- a/Documentation/devicetree/bindings/serial/8250.yaml > +++ b/Documentation/devicetree/bindings/serial/8250.yaml > @@ -111,7 +111,9 @@ properties: > - mediatek,mt7623-btif > - const: mediatek,mtk-btif > - items: > - - const: mrvl,mmp-uart > + - enum: > + - mrvl,mmp-uart > + - spacemit,k1-uart > - const: intel,xscale-uart > - items: > - enum: > > -- > 2.45.2 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (5 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:25 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree Yixun Lan ` (4 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> The first SoC in the SpacemiT series is K1, which contains 8 RISC-V cores with RISC-V Vector v1.0 support. Link: https://www.spacemit.com/en/spacemit-key-stone-2/ Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- arch/riscv/Kconfig.socs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs index f51bb24bc84c6..1916cf7ba450e 100644 --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -24,6 +24,11 @@ config ARCH_SOPHGO help This enables support for Sophgo SoC platform hardware. +config ARCH_SPACEMIT + bool "SpacemiT SoCs" + help + This enables support for SpacemiT SoC platform hardware. + config ARCH_STARFIVE def_bool SOC_STARFIVE -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support 2024-06-27 15:31 ` [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support Yixun Lan @ 2024-07-01 12:25 ` Conor Dooley 0 siblings, 0 replies; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:25 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1081 bytes --] On Thu, Jun 27, 2024 at 03:31:21PM +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > The first SoC in the SpacemiT series is K1, which contains 8 RISC-V > cores with RISC-V Vector v1.0 support. > > Link: https://www.spacemit.com/en/spacemit-key-stone-2/ > Remove the blank line please. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Thanks, Conor. > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > --- > arch/riscv/Kconfig.socs | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs > index f51bb24bc84c6..1916cf7ba450e 100644 > --- a/arch/riscv/Kconfig.socs > +++ b/arch/riscv/Kconfig.socs > @@ -24,6 +24,11 @@ config ARCH_SOPHGO > help > This enables support for Sophgo SoC platform hardware. > > +config ARCH_SPACEMIT > + bool "SpacemiT SoCs" > + help > + This enables support for SpacemiT SoC platform hardware. > + > config ARCH_STARFIVE > def_bool SOC_STARFIVE > > > -- > 2.45.2 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (6 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:49 ` Emil Renner Berthing 2024-06-27 15:31 ` [PATCH v2 09/10] riscv: dts: spacemit: add Banana Pi BPI-F3 board " Yixun Lan ` (3 subsequent siblings) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. Key features: - 4 cores per cluster, 2 clusters on chip - UART IP is Intel XScale UART Some key considerations: - ISA string is inferred from vendor documentation[2] - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] - No coherent DMA on this board Inferred by taking vendor ethernet and MMC drivers to the mainline kernel. Without dma-noncoherent in soc node, the driver fails. - No cache nodes now The parameters from vendor dts are likely to be wrong. It has 512 sets for a 32KiB L1 Cache. In this case, each set is 64B in size. When the size of the cache line is 64B, it is a directly mapped cache rather than a set-associative cache, the latter is commonly used. Thus, I didn't use the parameters from vendor dts. Currently only support booting into console with only uart, other features will be added soon later. [1] https://docs.banana-pi.org/en/BPI-F3/SpacemiT_K1_datasheet [2] https://developer.spacemit.com/#/documentation?token=BWbGwbx7liGW21kq9lucSA6Vnpb [3] https://gitee.com/bianbu-linux/linux-6.1/blob/bl-v1.0.y/arch/riscv/boot/dts/spacemit/k1-x.dtsi Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- arch/riscv/boot/dts/spacemit/k1.dtsi | 378 +++++++++++++++++++++++++++++++++++ 1 file changed, 378 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi new file mode 100644 index 0000000000000..a46149b0b9ff8 --- /dev/null +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -0,0 +1,378 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name> + */ + +/dts-v1/; +/ { + #address-cells = <2>; + #size-cells = <2>; + model = "SpacemiT K1"; + compatible = "spacemit,k1"; + + aliases { + serial0 = &uart0; + serial1 = &uart2; + serial2 = &uart3; + serial3 = &uart4; + serial4 = &uart5; + serial5 = &uart6; + serial6 = &uart7; + serial7 = &uart8; + serial8 = &uart9; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = <24000000>; + + cpu-map { + cluster0 { + core0 { + cpu = <&cpu_0>; + }; + core1 { + cpu = <&cpu_1>; + }; + core2 { + cpu = <&cpu_2>; + }; + core3 { + cpu = <&cpu_3>; + }; + }; + + cluster1 { + core0 { + cpu = <&cpu_4>; + }; + core1 { + cpu = <&cpu_5>; + }; + core2 { + cpu = <&cpu_6>; + }; + core3 { + cpu = <&cpu_7>; + }; + }; + }; + + cpu_0: cpu@0 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <0>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu0_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_1: cpu@1 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <1>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu1_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_2: cpu@2 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <2>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu2_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_3: cpu@3 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <3>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu3_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_4: cpu@4 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <4>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu4_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_5: cpu@5 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <5>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu5_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_6: cpu@6 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <6>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu6_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + cpu_7: cpu@7 { + compatible = "spacemit,x60", "riscv"; + device_type = "cpu"; + reg = <7>; + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; + riscv,isa-base = "rv64i"; + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", + "zifencei", "zihintpause", "zihpm", "zfh", "zba", + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; + riscv,cbom-block-size = <64>; + riscv,cbop-block-size = <64>; + riscv,cboz-block-size = <64>; + mmu-type = "riscv,sv39"; + + cpu7_intc: interrupt-controller { + compatible = "riscv,cpu-intc"; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; + + }; + + soc { + compatible = "simple-bus"; + interrupt-parent = <&plic>; + #address-cells = <2>; + #size-cells = <2>; + dma-noncoherent; + ranges; + + plic: interrupt-controller@e0000000 { + compatible = "spacemit,k1-plic", "riscv,plic0"; + reg = <0x0 0xe0000000 0x0 0x4000000>; + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>, + <&cpu1_intc 11>, <&cpu1_intc 9>, + <&cpu2_intc 11>, <&cpu2_intc 9>, + <&cpu3_intc 11>, <&cpu3_intc 9>, + <&cpu4_intc 11>, <&cpu4_intc 9>, + <&cpu5_intc 11>, <&cpu5_intc 9>, + <&cpu6_intc 11>, <&cpu6_intc 9>, + <&cpu7_intc 11>, <&cpu7_intc 9>; + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + riscv,ndev = <159>; + }; + + clint: timer@e4000000 { + compatible = "spacemit,k1-clint", "sifive,clint0"; + reg = <0x0 0xe4000000 0x0 0x10000>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, + <&cpu1_intc 3>, <&cpu1_intc 7>, + <&cpu2_intc 3>, <&cpu2_intc 7>, + <&cpu3_intc 3>, <&cpu3_intc 7>, + <&cpu4_intc 3>, <&cpu4_intc 7>, + <&cpu5_intc 3>, <&cpu5_intc 7>, + <&cpu6_intc 3>, <&cpu6_intc 7>, + <&cpu7_intc 3>, <&cpu7_intc 7>; + }; + + uart0: serial@d4017000 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017000 0x0 0x100>; + interrupts = <42>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + /* note: uart1 skipped */ + + uart2: uart@d4017100 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017100 0x0 0x100>; + interrupts = <44>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart3: uart@d4017200 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017200 0x0 0x100>; + interrupts = <45>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart4: uart@d4017300 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017300 0x0 0x100>; + interrupts = <46>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart5: uart@d4017400 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017400 0x0 0x100>; + interrupts = <47>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart6: uart@d4017500 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017500 0x0 0x100>; + interrupts = <48>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart7: uart@d4017600 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017600 0x0 0x100>; + interrupts = <49>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart8: uart@d4017700 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017700 0x0 0x100>; + interrupts = <50>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + + uart9: uart@d4017800 { + compatible = "spacemit,k1-uart", "intel,xscale-uart"; + reg = <0x0 0xd4017800 0x0 0x100>; + interrupts = <51>; + clock-frequency = <14857000>; + reg-shift = <2>; + reg-io-width = <4>; + status = "disabled"; + }; + }; +}; -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-06-27 15:31 ` [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree Yixun Lan @ 2024-07-01 12:49 ` Emil Renner Berthing 2024-07-02 1:28 ` Yixun Lan 0 siblings, 1 reply; 32+ messages in thread From: Emil Renner Berthing @ 2024-07-01 12:49 UTC (permalink / raw) To: Yixun Lan, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > Key features: > - 4 cores per cluster, 2 clusters on chip > - UART IP is Intel XScale UART > > Some key considerations: > - ISA string is inferred from vendor documentation[2] > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > - No coherent DMA on this board > Inferred by taking vendor ethernet and MMC drivers to the mainline > kernel. Without dma-noncoherent in soc node, the driver fails. > - No cache nodes now > The parameters from vendor dts are likely to be wrong. It has 512 > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > When the size of the cache line is 64B, it is a directly mapped > cache rather than a set-associative cache, the latter is commonly > used. Thus, I didn't use the parameters from vendor dts. > > Currently only support booting into console with only uart, other > features will be added soon later. > > [1] https://docs.banana-pi.org/en/BPI-F3/SpacemiT_K1_datasheet > [2] https://developer.spacemit.com/#/documentation?token=BWbGwbx7liGW21kq9lucSA6Vnpb > [3] https://gitee.com/bianbu-linux/linux-6.1/blob/bl-v1.0.y/arch/riscv/boot/dts/spacemit/k1-x.dtsi > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > --- > arch/riscv/boot/dts/spacemit/k1.dtsi | 378 +++++++++++++++++++++++++++++++++++ > 1 file changed, 378 insertions(+) > > diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi > new file mode 100644 > index 0000000000000..a46149b0b9ff8 > --- /dev/null > +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi > @@ -0,0 +1,378 @@ > +// SPDX-License-Identifier: GPL-2.0 OR MIT > +/* > + * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name> > + */ > + > +/dts-v1/; > +/ { > + #address-cells = <2>; > + #size-cells = <2>; > + model = "SpacemiT K1"; > + compatible = "spacemit,k1"; > + > + aliases { > + serial0 = &uart0; > + serial1 = &uart2; > + serial2 = &uart3; > + serial3 = &uart4; > + serial4 = &uart5; > + serial5 = &uart6; > + serial6 = &uart7; > + serial7 = &uart8; > + serial8 = &uart9; > + }; > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + timebase-frequency = <24000000>; > + > + cpu-map { > + cluster0 { > + core0 { > + cpu = <&cpu_0>; > + }; > + core1 { > + cpu = <&cpu_1>; > + }; > + core2 { > + cpu = <&cpu_2>; > + }; > + core3 { > + cpu = <&cpu_3>; > + }; > + }; > + > + cluster1 { > + core0 { > + cpu = <&cpu_4>; > + }; > + core1 { > + cpu = <&cpu_5>; > + }; > + core2 { > + cpu = <&cpu_6>; > + }; > + core3 { > + cpu = <&cpu_7>; > + }; > + }; > + }; > + > + cpu_0: cpu@0 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <0>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu0_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_1: cpu@1 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <1>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu1_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_2: cpu@2 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <2>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu2_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_3: cpu@3 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <3>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu3_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_4: cpu@4 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <4>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu4_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_5: cpu@5 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <5>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu5_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_6: cpu@6 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <6>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu6_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + cpu_7: cpu@7 { > + compatible = "spacemit,x60", "riscv"; > + device_type = "cpu"; > + reg = <7>; > + riscv,isa = "rv64imafdcv_zicbom_zicbop_zicboz_zicntr_zicond_zicsr_zifencei_zihintpause_zihpm_zfh_zba_zbb_zbc_zbs_zkt_zvfh_zvkt_sscofpmf_sstc_svinval_svnapot_svpbmt"; > + riscv,isa-base = "rv64i"; > + riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zicbom", > + "zicbop", "zicboz", "zicntr", "zicond", "zicsr", > + "zifencei", "zihintpause", "zihpm", "zfh", "zba", > + "zbb", "zbc", "zbs", "zkt", "zvfh", "zvkt", > + "sscofpmf", "sstc", "svinval", "svnapot", "svpbmt"; > + riscv,cbom-block-size = <64>; > + riscv,cbop-block-size = <64>; > + riscv,cboz-block-size = <64>; > + mmu-type = "riscv,sv39"; > + > + cpu7_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > + > + }; > + > + soc { > + compatible = "simple-bus"; > + interrupt-parent = <&plic>; > + #address-cells = <2>; > + #size-cells = <2>; > + dma-noncoherent; > + ranges; > + > + plic: interrupt-controller@e0000000 { > + compatible = "spacemit,k1-plic", "riscv,plic0"; > + reg = <0x0 0xe0000000 0x0 0x4000000>; > + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>, > + <&cpu1_intc 11>, <&cpu1_intc 9>, > + <&cpu2_intc 11>, <&cpu2_intc 9>, > + <&cpu3_intc 11>, <&cpu3_intc 9>, > + <&cpu4_intc 11>, <&cpu4_intc 9>, > + <&cpu5_intc 11>, <&cpu5_intc 9>, > + <&cpu6_intc 11>, <&cpu6_intc 9>, > + <&cpu7_intc 11>, <&cpu7_intc 9>; > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + riscv,ndev = <159>; > + }; > + > + clint: timer@e4000000 { > + compatible = "spacemit,k1-clint", "sifive,clint0"; > + reg = <0x0 0xe4000000 0x0 0x10000>; > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > + <&cpu1_intc 3>, <&cpu1_intc 7>, > + <&cpu2_intc 3>, <&cpu2_intc 7>, > + <&cpu3_intc 3>, <&cpu3_intc 7>, > + <&cpu4_intc 3>, <&cpu4_intc 7>, > + <&cpu5_intc 3>, <&cpu5_intc 7>, > + <&cpu6_intc 3>, <&cpu6_intc 7>, > + <&cpu7_intc 3>, <&cpu7_intc 7>; > + }; > + > + uart0: serial@d4017000 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017000 0x0 0x100>; > + interrupts = <42>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + /* note: uart1 skipped */ The datasheet page you link to above says "-UART (×10)", but here you're skipping one of them. Why? I can see the vendor tree does the same, but it would be nice with an explanation of what's going on. > + > + uart2: uart@d4017100 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017100 0x0 0x100>; > + interrupts = <44>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart3: uart@d4017200 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017200 0x0 0x100>; > + interrupts = <45>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart4: uart@d4017300 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017300 0x0 0x100>; > + interrupts = <46>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart5: uart@d4017400 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017400 0x0 0x100>; > + interrupts = <47>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart6: uart@d4017500 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017500 0x0 0x100>; > + interrupts = <48>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart7: uart@d4017600 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017600 0x0 0x100>; > + interrupts = <49>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart8: uart@d4017700 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017700 0x0 0x100>; > + interrupts = <50>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + > + uart9: uart@d4017800 { > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > + reg = <0x0 0xd4017800 0x0 0x100>; > + interrupts = <51>; > + clock-frequency = <14857000>; > + reg-shift = <2>; > + reg-io-width = <4>; > + status = "disabled"; > + }; > + }; > +}; > > -- > 2.45.2 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-01 12:49 ` Emil Renner Berthing @ 2024-07-02 1:28 ` Yixun Lan 2024-07-02 1:35 ` Inochi Amaoto 0 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-07-02 1:28 UTC (permalink / raw) To: Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > Yixun Lan wrote: > > From: Yangyu Chen <cyy@cyyself.name> > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > Key features: > > - 4 cores per cluster, 2 clusters on chip > > - UART IP is Intel XScale UART > > > > Some key considerations: > > - ISA string is inferred from vendor documentation[2] > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > - No coherent DMA on this board > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > kernel. Without dma-noncoherent in soc node, the driver fails. > > - No cache nodes now > > The parameters from vendor dts are likely to be wrong. It has 512 > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > When the size of the cache line is 64B, it is a directly mapped > > cache rather than a set-associative cache, the latter is commonly > > used. Thus, I didn't use the parameters from vendor dts. > > > > Currently only support booting into console with only uart, other > > features will be added soon later. > > ... > > + clint: timer@e4000000 { > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > + }; > > + > > + uart0: serial@d4017000 { > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > + reg = <0x0 0xd4017000 0x0 0x100>; > > + interrupts = <42>; > > + clock-frequency = <14857000>; > > + reg-shift = <2>; > > + reg-io-width = <4>; > > + status = "disabled"; > > + }; > > + > > + /* note: uart1 skipped */ > > The datasheet page you link to above says "-UART (×10)", but here you're > skipping one of them. Why? I can see the vendor tree does the same, but it > would be nice with an explanation of what's going on. > /* note: uart1 in 0xf0612000, reserved for TEE usage */ I would put something like this, does this sound ok to you? more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, It won't be exposed to Linux once TEE feature is enabled.. skipping uart1 may make people confused but we are trying to follow datasheet.. -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-02 1:28 ` Yixun Lan @ 2024-07-02 1:35 ` Inochi Amaoto 2024-07-02 15:25 ` Conor Dooley 0 siblings, 1 reply; 32+ messages in thread From: Inochi Amaoto @ 2024-07-02 1:35 UTC (permalink / raw) To: Yixun Lan, Emil Renner Berthing Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen On Tue, Jul 02, 2024 at 01:28:47AM GMT, Yixun Lan wrote: > On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > > Yixun Lan wrote: > > > From: Yangyu Chen <cyy@cyyself.name> > > > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > > > Key features: > > > - 4 cores per cluster, 2 clusters on chip > > > - UART IP is Intel XScale UART > > > > > > Some key considerations: > > > - ISA string is inferred from vendor documentation[2] > > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > > - No coherent DMA on this board > > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > > kernel. Without dma-noncoherent in soc node, the driver fails. > > > - No cache nodes now > > > The parameters from vendor dts are likely to be wrong. It has 512 > > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > > When the size of the cache line is 64B, it is a directly mapped > > > cache rather than a set-associative cache, the latter is commonly > > > used. Thus, I didn't use the parameters from vendor dts. > > > > > > Currently only support booting into console with only uart, other > > > features will be added soon later. > > > > ... > > > > + clint: timer@e4000000 { > > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > > + }; > > > + > > > + uart0: serial@d4017000 { > > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > > + reg = <0x0 0xd4017000 0x0 0x100>; > > > + interrupts = <42>; > > > + clock-frequency = <14857000>; > > > + reg-shift = <2>; > > > + reg-io-width = <4>; > > > + status = "disabled"; > > > + }; > > > + > > > + /* note: uart1 skipped */ > > > > The datasheet page you link to above says "-UART (×10)", but here you're > > skipping one of them. Why? I can see the vendor tree does the same, but it > > would be nice with an explanation of what's going on. > > > /* note: uart1 in 0xf0612000, reserved for TEE usage */ > I would put something like this, does this sound ok to you? > > more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, > It won't be exposed to Linux once TEE feature is enabled.. > > skipping uart1 may make people confused but we are trying to follow datasheet.. Instead of skipping it, I suggest adding this to reserved-memory area, which make all node visible and avoid uart1 being touched by mistake. > > > -- > Yixun Lan (dlan) > Gentoo Linux Developer > GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-02 1:35 ` Inochi Amaoto @ 2024-07-02 15:25 ` Conor Dooley 2024-07-03 9:40 ` Yixun Lan 0 siblings, 1 reply; 32+ messages in thread From: Conor Dooley @ 2024-07-02 15:25 UTC (permalink / raw) To: Inochi Amaoto Cc: Yixun Lan, Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 3375 bytes --] On Tue, Jul 02, 2024 at 09:35:45AM +0800, Inochi Amaoto wrote: > On Tue, Jul 02, 2024 at 01:28:47AM GMT, Yixun Lan wrote: > > On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > > > Yixun Lan wrote: > > > > From: Yangyu Chen <cyy@cyyself.name> > > > > > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > > > > > Key features: > > > > - 4 cores per cluster, 2 clusters on chip > > > > - UART IP is Intel XScale UART > > > > > > > > Some key considerations: > > > > - ISA string is inferred from vendor documentation[2] > > > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > > > - No coherent DMA on this board > > > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > > > kernel. Without dma-noncoherent in soc node, the driver fails. > > > > - No cache nodes now > > > > The parameters from vendor dts are likely to be wrong. It has 512 > > > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > > > When the size of the cache line is 64B, it is a directly mapped > > > > cache rather than a set-associative cache, the latter is commonly > > > > used. Thus, I didn't use the parameters from vendor dts. > > > > > > > > Currently only support booting into console with only uart, other > > > > features will be added soon later. > > > > > > ... > > > > > > + clint: timer@e4000000 { > > > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > > > + }; > > > > + > > > > + uart0: serial@d4017000 { > > > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > > > + reg = <0x0 0xd4017000 0x0 0x100>; > > > > + interrupts = <42>; > > > > + clock-frequency = <14857000>; > > > > + reg-shift = <2>; > > > > + reg-io-width = <4>; > > > > + status = "disabled"; > > > > + }; > > > > + > > > > + /* note: uart1 skipped */ > > > > > > The datasheet page you link to above says "-UART (×10)", but here you're > > > skipping one of them. Why? I can see the vendor tree does the same, but it > > > would be nice with an explanation of what's going on. > > > > > /* note: uart1 in 0xf0612000, reserved for TEE usage */ > > I would put something like this, does this sound ok to you? > > > > more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, > > It won't be exposed to Linux once TEE feature is enabled.. > > > > skipping uart1 may make people confused but we are trying to follow datasheet.. > > Instead of skipping it, I suggest adding this to reserved-memory area, > which make all node visible and avoid uart1 being touched by mistake. No, don't make it reserved-memory - instead add it as status = "reserved"; /* explanation for why */ Also, I'd appreciate if the nodes were sorted by unit address in the dtsi. Thanks, Conor. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-02 15:25 ` Conor Dooley @ 2024-07-03 9:40 ` Yixun Lan 2024-07-03 11:22 ` Emil Renner Berthing 0 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-07-03 9:40 UTC (permalink / raw) To: Conor Dooley Cc: Inochi Amaoto, Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, linux-riscv, linux-serial, Meng Zhang, Yangyu Chen Hi Conor: On 16:25 Tue 02 Jul , Conor Dooley wrote: > On Tue, Jul 02, 2024 at 09:35:45AM +0800, Inochi Amaoto wrote: > > On Tue, Jul 02, 2024 at 01:28:47AM GMT, Yixun Lan wrote: > > > On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > > > > Yixun Lan wrote: > > > > > From: Yangyu Chen <cyy@cyyself.name> > > > > > > > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > > > > > > > Key features: > > > > > - 4 cores per cluster, 2 clusters on chip > > > > > - UART IP is Intel XScale UART > > > > > > > > > > Some key considerations: > > > > > - ISA string is inferred from vendor documentation[2] > > > > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > > > > - No coherent DMA on this board > > > > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > > > > kernel. Without dma-noncoherent in soc node, the driver fails. > > > > > - No cache nodes now > > > > > The parameters from vendor dts are likely to be wrong. It has 512 > > > > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > > > > When the size of the cache line is 64B, it is a directly mapped > > > > > cache rather than a set-associative cache, the latter is commonly > > > > > used. Thus, I didn't use the parameters from vendor dts. > > > > > > > > > > Currently only support booting into console with only uart, other > > > > > features will be added soon later. > > > > > > > > ... > > > > > > > > + clint: timer@e4000000 { > > > > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > > > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > > > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > > > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > > > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > > > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > > > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > > > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > > > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > > > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > > > > + }; > > > > > + > > > > > + uart0: serial@d4017000 { > > > > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > > > > + reg = <0x0 0xd4017000 0x0 0x100>; > > > > > + interrupts = <42>; > > > > > + clock-frequency = <14857000>; > > > > > + reg-shift = <2>; > > > > > + reg-io-width = <4>; > > > > > + status = "disabled"; > > > > > + }; > > > > > + > > > > > + /* note: uart1 skipped */ > > > > > > > > The datasheet page you link to above says "-UART (×10)", but here you're > > > > skipping one of them. Why? I can see the vendor tree does the same, but it > > > > would be nice with an explanation of what's going on. > > > > > > > /* note: uart1 in 0xf0612000, reserved for TEE usage */ > > > I would put something like this, does this sound ok to you? > > > > > > more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, > > > It won't be exposed to Linux once TEE feature is enabled.. > > > > > > skipping uart1 may make people confused but we are trying to follow datasheet.. > > > > Instead of skipping it, I suggest adding this to reserved-memory area, > > which make all node visible and avoid uart1 being touched by mistake. > > No, don't make it reserved-memory - instead add it as > status = "reserved"; /* explanation for why */ Ok, got > Also, I'd appreciate if the nodes were sorted by unit address in the > dtsi. so I would move "plic, clint" after node of uart9 as this suggestion for uart1, its unit-address is 0xf0610000, it should be moved to after clint (once unit-address sorted), if we follow this rule strictly. but it occur to me this is not very intuitive, if no objection, I would put it between uart0 and uart2 (thus slightly break the rule..) P.S: I can cook a separated patch for adding uart1 node, should better for review -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-03 9:40 ` Yixun Lan @ 2024-07-03 11:22 ` Emil Renner Berthing 2024-07-03 14:22 ` Yixun Lan 0 siblings, 1 reply; 32+ messages in thread From: Emil Renner Berthing @ 2024-07-03 11:22 UTC (permalink / raw) To: Yixun Lan, Conor Dooley Cc: Inochi Amaoto, Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, linux-riscv, linux-serial, Meng Zhang, Yangyu Chen Yixun Lan wrote: > Hi Conor: > > On 16:25 Tue 02 Jul , Conor Dooley wrote: > > On Tue, Jul 02, 2024 at 09:35:45AM +0800, Inochi Amaoto wrote: > > > On Tue, Jul 02, 2024 at 01:28:47AM GMT, Yixun Lan wrote: > > > > On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > > > > > Yixun Lan wrote: > > > > > > From: Yangyu Chen <cyy@cyyself.name> > > > > > > > > > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > > > > > > > > > Key features: > > > > > > - 4 cores per cluster, 2 clusters on chip > > > > > > - UART IP is Intel XScale UART > > > > > > > > > > > > Some key considerations: > > > > > > - ISA string is inferred from vendor documentation[2] > > > > > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > > > > > - No coherent DMA on this board > > > > > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > > > > > kernel. Without dma-noncoherent in soc node, the driver fails. > > > > > > - No cache nodes now > > > > > > The parameters from vendor dts are likely to be wrong. It has 512 > > > > > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > > > > > When the size of the cache line is 64B, it is a directly mapped > > > > > > cache rather than a set-associative cache, the latter is commonly > > > > > > used. Thus, I didn't use the parameters from vendor dts. > > > > > > > > > > > > Currently only support booting into console with only uart, other > > > > > > features will be added soon later. > > > > > > > > > > ... > > > > > > > > > > + clint: timer@e4000000 { > > > > > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > > > > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > > > > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > > > > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > > > > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > > > > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > > > > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > > > > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > > > > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > > > > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > > > > > + }; > > > > > > + > > > > > > + uart0: serial@d4017000 { > > > > > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > > > > > + reg = <0x0 0xd4017000 0x0 0x100>; > > > > > > + interrupts = <42>; > > > > > > + clock-frequency = <14857000>; > > > > > > + reg-shift = <2>; > > > > > > + reg-io-width = <4>; > > > > > > + status = "disabled"; > > > > > > + }; > > > > > > + > > > > > > + /* note: uart1 skipped */ > > > > > > > > > > The datasheet page you link to above says "-UART (×10)", but here you're > > > > > skipping one of them. Why? I can see the vendor tree does the same, but it > > > > > would be nice with an explanation of what's going on. > > > > > > > > > /* note: uart1 in 0xf0612000, reserved for TEE usage */ > > > > I would put something like this, does this sound ok to you? > > > > > > > > more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, > > > > It won't be exposed to Linux once TEE feature is enabled.. > > > > > > > > skipping uart1 may make people confused but we are trying to follow datasheet.. > > > > > > Instead of skipping it, I suggest adding this to reserved-memory area, > > > which make all node visible and avoid uart1 being touched by mistake. > > > > No, don't make it reserved-memory - instead add it as > > status = "reserved"; /* explanation for why */ > Ok, got > > > Also, I'd appreciate if the nodes were sorted by unit address in the > > dtsi. > so I would move "plic, clint" after node of uart9 as this suggestion > > for uart1, its unit-address is 0xf0610000, it should be moved to after clint > (once unit-address sorted), if we follow this rule strictly. > but it occur to me this is not very intuitive, if no objection, I would put > it between uart0 and uart2 (thus slightly break the rule..) No, please order nodes by their address as Conor said. It actually says so in the DTS coding style: https://docs.kernel.org/devicetree/bindings/dts-coding-style.html /Emil ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree 2024-07-03 11:22 ` Emil Renner Berthing @ 2024-07-03 14:22 ` Yixun Lan 0 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-07-03 14:22 UTC (permalink / raw) To: Emil Renner Berthing Cc: Conor Dooley, Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, linux-riscv, linux-serial, Meng Zhang, Yangyu Chen On 04:22 Wed 03 Jul , Emil Renner Berthing wrote: > Yixun Lan wrote: > > Hi Conor: > > > > On 16:25 Tue 02 Jul , Conor Dooley wrote: > > > On Tue, Jul 02, 2024 at 09:35:45AM +0800, Inochi Amaoto wrote: > > > > On Tue, Jul 02, 2024 at 01:28:47AM GMT, Yixun Lan wrote: > > > > > On 12:49 Mon 01 Jul , Emil Renner Berthing wrote: > > > > > > Yixun Lan wrote: > > > > > > > From: Yangyu Chen <cyy@cyyself.name> > > > > > > > > > > > > > > Banana Pi BPI-F3 motherboard is powered by SpacemiT K1[1]. > > > > > > > > > > > > > > Key features: > > > > > > > - 4 cores per cluster, 2 clusters on chip > > > > > > > - UART IP is Intel XScale UART > > > > > > > > > > > > > > Some key considerations: > > > > > > > - ISA string is inferred from vendor documentation[2] > > > > > > > - Cluster topology is inferred from datasheet[1] and L2 in vendor dts[3] > > > > > > > - No coherent DMA on this board > > > > > > > Inferred by taking vendor ethernet and MMC drivers to the mainline > > > > > > > kernel. Without dma-noncoherent in soc node, the driver fails. > > > > > > > - No cache nodes now > > > > > > > The parameters from vendor dts are likely to be wrong. It has 512 > > > > > > > sets for a 32KiB L1 Cache. In this case, each set is 64B in size. > > > > > > > When the size of the cache line is 64B, it is a directly mapped > > > > > > > cache rather than a set-associative cache, the latter is commonly > > > > > > > used. Thus, I didn't use the parameters from vendor dts. > > > > > > > > > > > > > > Currently only support booting into console with only uart, other > > > > > > > features will be added soon later. > > > > > > > > > > > > ... > > > > > > > > > > > > + clint: timer@e4000000 { > > > > > > > + compatible = "spacemit,k1-clint", "sifive,clint0"; > > > > > > > + reg = <0x0 0xe4000000 0x0 0x10000>; > > > > > > > + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, > > > > > > > + <&cpu1_intc 3>, <&cpu1_intc 7>, > > > > > > > + <&cpu2_intc 3>, <&cpu2_intc 7>, > > > > > > > + <&cpu3_intc 3>, <&cpu3_intc 7>, > > > > > > > + <&cpu4_intc 3>, <&cpu4_intc 7>, > > > > > > > + <&cpu5_intc 3>, <&cpu5_intc 7>, > > > > > > > + <&cpu6_intc 3>, <&cpu6_intc 7>, > > > > > > > + <&cpu7_intc 3>, <&cpu7_intc 7>; > > > > > > > + }; > > > > > > > + > > > > > > > + uart0: serial@d4017000 { > > > > > > > + compatible = "spacemit,k1-uart", "intel,xscale-uart"; > > > > > > > + reg = <0x0 0xd4017000 0x0 0x100>; > > > > > > > + interrupts = <42>; > > > > > > > + clock-frequency = <14857000>; > > > > > > > + reg-shift = <2>; > > > > > > > + reg-io-width = <4>; > > > > > > > + status = "disabled"; > > > > > > > + }; > > > > > > > + > > > > > > > + /* note: uart1 skipped */ > > > > > > > > > > > > The datasheet page you link to above says "-UART (×10)", but here you're > > > > > > skipping one of them. Why? I can see the vendor tree does the same, but it > > > > > > would be nice with an explanation of what's going on. > > > > > > > > > > > /* note: uart1 in 0xf0612000, reserved for TEE usage */ > > > > > I would put something like this, does this sound ok to you? > > > > > > > > > > more detail, iomem range from 0xf000,0000 - 0xf080,0000 are dedicated for TEE purpose, > > > > > It won't be exposed to Linux once TEE feature is enabled.. > > > > > > > > > > skipping uart1 may make people confused but we are trying to follow datasheet.. > > > > > > > > Instead of skipping it, I suggest adding this to reserved-memory area, > > > > which make all node visible and avoid uart1 being touched by mistake. > > > > > > No, don't make it reserved-memory - instead add it as > > > status = "reserved"; /* explanation for why */ > > Ok, got > > > > > Also, I'd appreciate if the nodes were sorted by unit address in the > > > dtsi. > > so I would move "plic, clint" after node of uart9 as this suggestion > > > > for uart1, its unit-address is 0xf0610000, it should be moved to after clint > > (once unit-address sorted), if we follow this rule strictly. > > but it occur to me this is not very intuitive, if no objection, I would put > > it between uart0 and uart2 (thus slightly break the rule..) > > No, please order nodes by their address as Conor said. It actually says so in > the DTS coding style: > > https://docs.kernel.org/devicetree/bindings/dts-coding-style.html > I was thinking about grouping all same type devices (uart here) together according to "1. Order of Nodes", but after reconsideration, I'd just follow yours and Conor's suggestion, thus it will be more straightforward, also match more well with datasheet[1] if we have to add more "reserved" nodes in the future. Link: https://developer.spacemit.com/#/documentation?token=LzJyw97BCipK1dkUygrcbT0NnMg [1] -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH v2 09/10] riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (7 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-06-27 15:31 ` [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC Yixun Lan ` (2 subsequent siblings) 11 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Banana Pi BPI-F3 [1] is a industrial grade RISC-V development board, it design with SpacemiT K1 8 core RISC-V chip [2]. Currently only support booting into console with only uart enabled, other features will be added soon later. [1] https://docs.banana-pi.org/en/BPI-F3/BananaPi_BPI-F3 [2] https://www.spacemit.com/en/spacemit-key-stone-2/ Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- arch/riscv/boot/dts/Makefile | 1 + arch/riscv/boot/dts/spacemit/Makefile | 2 ++ arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile index fdae05bbf5563..bff887d38abe4 100644 --- a/arch/riscv/boot/dts/Makefile +++ b/arch/riscv/boot/dts/Makefile @@ -5,6 +5,7 @@ subdir-y += microchip subdir-y += renesas subdir-y += sifive subdir-y += sophgo +subdir-y += spacemit subdir-y += starfive subdir-y += thead diff --git a/arch/riscv/boot/dts/spacemit/Makefile b/arch/riscv/boot/dts/spacemit/Makefile new file mode 100644 index 0000000000000..ac617319a5742 --- /dev/null +++ b/arch/riscv/boot/dts/spacemit/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +dtb-$(CONFIG_ARCH_SPACEMIT) += k1-bananapi-f3.dtb diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts new file mode 100644 index 0000000000000..023274189b492 --- /dev/null +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name> + */ + +#include "k1.dtsi" + +/ { + model = "Banana Pi BPI-F3"; + compatible = "bananapi,bpi-f3", "spacemit,k1"; + + chosen { + stdout-path = "serial0"; + }; +}; + +&uart0 { + status = "okay"; +}; -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (8 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 09/10] riscv: dts: spacemit: add Banana Pi BPI-F3 board " Yixun Lan @ 2024-06-27 15:31 ` Yixun Lan 2024-07-01 12:21 ` Conor Dooley 2024-06-27 15:39 ` [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Conor Dooley 2024-06-28 15:41 ` Rob Herring (Arm) 11 siblings, 1 reply; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:31 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel Cc: devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen, Yixun Lan From: Yangyu Chen <cyy@cyyself.name> Enable SpacemiT SoC config in defconfig to allow the default upstream kernel to boot on Banana Pi BPI-F3 board. Signed-off-by: Yangyu Chen <cyy@cyyself.name> Signed-off-by: Yixun Lan <dlan@gentoo.org> --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 12dc8c73a8acf..5287ae81bbb78 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -29,6 +29,7 @@ CONFIG_ARCH_MICROCHIP=y CONFIG_ARCH_RENESAS=y CONFIG_ARCH_SIFIVE=y CONFIG_ARCH_SOPHGO=y +CONFIG_ARCH_SPACEMIT=y CONFIG_SOC_STARFIVE=y CONFIG_ARCH_SUNXI=y CONFIG_ARCH_THEAD=y -- 2.45.2 ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC 2024-06-27 15:31 ` [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC Yixun Lan @ 2024-07-01 12:21 ` Conor Dooley 0 siblings, 0 replies; 32+ messages in thread From: Conor Dooley @ 2024-07-01 12:21 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 379 bytes --] On Thu, Jun 27, 2024 at 03:31:24PM +0000, Yixun Lan wrote: > From: Yangyu Chen <cyy@cyyself.name> > > Enable SpacemiT SoC config in defconfig to allow the default upstream > kernel to boot on Banana Pi BPI-F3 board. > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (9 preceding siblings ...) 2024-06-27 15:31 ` [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC Yixun Lan @ 2024-06-27 15:39 ` Conor Dooley 2024-06-27 15:56 ` Yixun Lan 2024-06-28 15:41 ` Rob Herring (Arm) 11 siblings, 1 reply; 32+ messages in thread From: Conor Dooley @ 2024-06-27 15:39 UTC (permalink / raw) To: Yixun Lan Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen [-- Attachment #1: Type: text/plain, Size: 1574 bytes --] On Thu, Jun 27, 2024 at 03:31:14PM +0000, Yixun Lan wrote: > SpacemiT K1 is an ideal chip for some new extension such as RISC-V Vector > 1.0 and Zicond evaluation now. Add initial support for it to allow more > people to participate in building drivers to mainline for it. > > This kernel has been tested upon Banana Pi BPI-F3 board on vendor U-Boot > bootflow generated by Armbian SDK[1] and patched OpenSBI[2] to enable > Zicboz, which does not in the vendor dts on its U-Boot. Then successfully > booted to busybox on initrd with this log[3]. > > As previous discussion in patch v1[4], maintainer expect more basic drivers > ready before really merging it, which would be fine. For other follow-up patches, > that are clk, pinctrl/gpio, reset.. My current goal would target at a headless > system including SD card, emmc, and ethernet. > > P.S: talked to Yangyu, I will help and take care of this patch series, thanks > --- > Changes in v2: > - fix timebase-frequency according to current setting > - add other uart dt nodes, fix input frequency > - introduce new uart compatible for K1 SoC > - add 'k1' prefix to bananapi-f3.dts > - fix k1-clint compatible > - fix some typos > - Link to v1: https://lore.kernel.org/r/tencent_BC64B7B1876F5D10479BD19112F73F262505@qq.com I will take a closer look at this series later, but there's a few patches here missing Acks that I gave alongside some nitpick remarks. Could you look at v1 again and add those to whatever other comments I leave when I take a closer look? Thanks, Conor. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 2024-06-27 15:39 ` [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Conor Dooley @ 2024-06-27 15:56 ` Yixun Lan 0 siblings, 0 replies; 32+ messages in thread From: Yixun Lan @ 2024-06-27 15:56 UTC (permalink / raw) To: Conor Dooley Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou, Daniel Lezcano, Thomas Gleixner, Samuel Holland, Anup Patel, Greg Kroah-Hartman, Jiri Slaby, Lubomir Rintel, devicetree, linux-kernel, Palmer Dabbelt, linux-riscv, linux-serial, Inochi Amaoto, Meng Zhang, Yangyu Chen Hi Conor: On 16:39 Thu 27 Jun , Conor Dooley wrote: > On Thu, Jun 27, 2024 at 03:31:14PM +0000, Yixun Lan wrote: > > SpacemiT K1 is an ideal chip for some new extension such as RISC-V Vector > > 1.0 and Zicond evaluation now. Add initial support for it to allow more > > people to participate in building drivers to mainline for it. > > > > This kernel has been tested upon Banana Pi BPI-F3 board on vendor U-Boot > > bootflow generated by Armbian SDK[1] and patched OpenSBI[2] to enable > > Zicboz, which does not in the vendor dts on its U-Boot. Then successfully > > booted to busybox on initrd with this log[3]. > > > > As previous discussion in patch v1[4], maintainer expect more basic drivers > > ready before really merging it, which would be fine. For other follow-up patches, > > that are clk, pinctrl/gpio, reset.. My current goal would target at a headless > > system including SD card, emmc, and ethernet. > > > > P.S: talked to Yangyu, I will help and take care of this patch series, thanks > > --- > > Changes in v2: > > - fix timebase-frequency according to current setting > > - add other uart dt nodes, fix input frequency > > - introduce new uart compatible for K1 SoC > > - add 'k1' prefix to bananapi-f3.dts > > - fix k1-clint compatible > > - fix some typos > > - Link to v1: https://lore.kernel.org/r/tencent_BC64B7B1876F5D10479BD19112F73F262505@qq.com > > I will take a closer look at this series later, but there's a few > patches here missing Acks that I gave alongside some nitpick remarks. > Could you look at v1 again and add those to whatever other comments I > leave when I take a closer look? > sure, thanks for your quick reply, I will do this tomorrow, and potentially wait all reviews, combine all tags I receive in v2, and address them in v3.. -- Yixun Lan (dlan) Gentoo Linux Developer GPG Key ID AABEFD55 ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan ` (10 preceding siblings ...) 2024-06-27 15:39 ` [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Conor Dooley @ 2024-06-28 15:41 ` Rob Herring (Arm) 11 siblings, 0 replies; 32+ messages in thread From: Rob Herring (Arm) @ 2024-06-28 15:41 UTC (permalink / raw) To: Yixun Lan Cc: Krzysztof Kozlowski, Inochi Amaoto, linux-riscv, Samuel Holland, Meng Zhang, linux-kernel, Yangyu Chen, Daniel Lezcano, Palmer Dabbelt, Conor Dooley, Palmer Dabbelt, devicetree, Thomas Gleixner, Conor Dooley, linux-serial, Lubomir Rintel, Paul Walmsley, Jiri Slaby, Anup Patel, Albert Ou, Greg Kroah-Hartman On Thu, 27 Jun 2024 15:31:14 +0000, Yixun Lan wrote: > SpacemiT K1 is an ideal chip for some new extension such as RISC-V Vector > 1.0 and Zicond evaluation now. Add initial support for it to allow more > people to participate in building drivers to mainline for it. > > This kernel has been tested upon Banana Pi BPI-F3 board on vendor U-Boot > bootflow generated by Armbian SDK[1] and patched OpenSBI[2] to enable > Zicboz, which does not in the vendor dts on its U-Boot. Then successfully > booted to busybox on initrd with this log[3]. > > As previous discussion in patch v1[4], maintainer expect more basic drivers > ready before really merging it, which would be fine. For other follow-up patches, > that are clk, pinctrl/gpio, reset.. My current goal would target at a headless > system including SD card, emmc, and ethernet. > > P.S: talked to Yangyu, I will help and take care of this patch series, thanks > --- > Changes in v2: > - fix timebase-frequency according to current setting > - add other uart dt nodes, fix input frequency > - introduce new uart compatible for K1 SoC > - add 'k1' prefix to bananapi-f3.dts > - fix k1-clint compatible > - fix some typos > - Link to v1: https://lore.kernel.org/r/tencent_BC64B7B1876F5D10479BD19112F73F262505@qq.com > > Link: https://github.com/BPI-SINOVOIP/armbian-build/tree/v24.04.30 [1] > Link: https://gist.github.com/cyyself/a07096e6e99c949ed13f8fa16d884402 [2] > Link: https://gist.github.com/cyyself/a2201c01f5c8955a119641f97b7d0280 [3] > Link: https://lore.kernel.org/r/20240618-hardwood-footrest-ab5ec5bce3cf@wendy [4] > > To: Rob Herring <robh@kernel.org> > To: Krzysztof Kozlowski <krzk+dt@kernel.org> > To: Conor Dooley <conor+dt@kernel.org> > To: Conor Dooley <conor@kernel.org> > To: Paul Walmsley <paul.walmsley@sifive.com> > To: Palmer Dabbelt <palmer@dabbelt.com> > To: Albert Ou <aou@eecs.berkeley.edu> > To: Daniel Lezcano <daniel.lezcano@linaro.org> > To: Thomas Gleixner <tglx@linutronix.de> > To: Samuel Holland <samuel.holland@sifive.com> > To: Anup Patel <anup@brainfault.org> > To: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > To: Jiri Slaby <jirislaby@kernel.org> > To: Lubomir Rintel <lkundrak@v3.sk> > Cc: devicetree@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: Palmer Dabbelt <palmer@sifive.com> > Cc: linux-riscv@lists.infradead.org > Cc: linux-serial@vger.kernel.org > Cc: Inochi Amaoto <inochiama@outlook.com> > Cc: Meng Zhang <zhangmeng.kevin@spacemit.com> > > Signed-off-by: Yangyu Chen <cyy@cyyself.name> > Signed-off-by: Yixun Lan <dlan@gentoo.org> > > --- > Yangyu Chen (9): > dt-bindings: vendor-prefixes: add spacemit > dt-bindings: riscv: Add SpacemiT X60 compatibles > dt-bindings: riscv: add SpacemiT K1 bindings > dt-bindings: timer: Add SpacemiT K1 CLINT > dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC > riscv: add SpacemiT SOC family Kconfig support > riscv: dts: add initial SpacemiT K1 SoC device tree > riscv: dts: spacemit: add Banana Pi BPI-F3 board device tree > riscv: defconfig: enable SpacemiT SoC > > Yixun Lan (1): > dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible > > .../interrupt-controller/sifive,plic-1.0.0.yaml | 5 +- > Documentation/devicetree/bindings/riscv/cpus.yaml | 1 + > .../devicetree/bindings/riscv/spacemit.yaml | 24 ++ > Documentation/devicetree/bindings/serial/8250.yaml | 4 +- > .../devicetree/bindings/timer/sifive,clint.yaml | 1 + > .../devicetree/bindings/vendor-prefixes.yaml | 2 + > arch/riscv/Kconfig.socs | 5 + > arch/riscv/boot/dts/Makefile | 1 + > arch/riscv/boot/dts/spacemit/Makefile | 2 + > arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 19 ++ > arch/riscv/boot/dts/spacemit/k1.dtsi | 378 +++++++++++++++++++++ > arch/riscv/configs/defconfig | 1 + > 12 files changed, 441 insertions(+), 2 deletions(-) > --- > base-commit: f2661062f16b2de5d7b6a5c42a9a5c96326b8454 > change-id: 20240626-k1-01-basic-dt-1aa31eeebcd2 > > Best regards, > -- > Yixun Lan <dlan@gentoo.org> > > > My bot found new DTB warnings on the .dts files added or changed in this series. Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments. If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date: pip3 install dtschema --upgrade New warnings running 'make CHECK_DTBS=y spacemit/k1-bananapi-f3.dtb' for 20240627-k1-01-basic-dt-v2-0-cc06c7555f07@gentoo.org: arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017100: $nodename:0: 'uart@d4017100' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017200: $nodename:0: 'uart@d4017200' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017300: $nodename:0: 'uart@d4017300' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017400: $nodename:0: 'uart@d4017400' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017500: $nodename:0: 'uart@d4017500' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017600: $nodename:0: 'uart@d4017600' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017700: $nodename:0: 'uart@d4017700' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dtb: uart@d4017800: $nodename:0: 'uart@d4017800' does not match '^serial(@.*)?$' from schema $id: http://devicetree.org/schemas/serial/8250.yaml# ^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2024-07-03 14:22 UTC | newest] Thread overview: 32+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-27 15:31 [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Yixun Lan 2024-06-27 15:31 ` [PATCH v2 01/10] dt-bindings: vendor-prefixes: add spacemit Yixun Lan 2024-06-28 7:32 ` Krzysztof Kozlowski 2024-06-27 15:31 ` [PATCH v2 02/10] dt-bindings: riscv: Add SpacemiT X60 compatibles Yixun Lan 2024-07-01 12:25 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 03/10] dt-bindings: riscv: add SpacemiT K1 bindings Yixun Lan 2024-06-27 18:00 ` Rob Herring (Arm) 2024-06-28 7:34 ` Krzysztof Kozlowski 2024-06-28 8:44 ` Yixun Lan 2024-07-01 12:24 ` Conor Dooley 2024-07-02 9:42 ` Yixun Lan 2024-06-27 15:31 ` [PATCH v2 04/10] dt-bindings: timer: Add SpacemiT K1 CLINT Yixun Lan 2024-07-01 12:22 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 05/10] dt-bindings: interrupt-controller: Add SpacemiT K1 PLIC Yixun Lan 2024-06-27 15:31 ` [PATCH v2 06/10] dt-bindings: serial: 8250: Add SpacemiT K1 uart compatible Yixun Lan 2024-07-01 12:22 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 07/10] riscv: add SpacemiT SOC family Kconfig support Yixun Lan 2024-07-01 12:25 ` Conor Dooley 2024-06-27 15:31 ` [PATCH v2 08/10] riscv: dts: add initial SpacemiT K1 SoC device tree Yixun Lan 2024-07-01 12:49 ` Emil Renner Berthing 2024-07-02 1:28 ` Yixun Lan 2024-07-02 1:35 ` Inochi Amaoto 2024-07-02 15:25 ` Conor Dooley 2024-07-03 9:40 ` Yixun Lan 2024-07-03 11:22 ` Emil Renner Berthing 2024-07-03 14:22 ` Yixun Lan 2024-06-27 15:31 ` [PATCH v2 09/10] riscv: dts: spacemit: add Banana Pi BPI-F3 board " Yixun Lan 2024-06-27 15:31 ` [PATCH v2 10/10] riscv: defconfig: enable SpacemiT SoC Yixun Lan 2024-07-01 12:21 ` Conor Dooley 2024-06-27 15:39 ` [PATCH v2 00/10] riscv: add initial support for SpacemiT K1 Conor Dooley 2024-06-27 15:56 ` Yixun Lan 2024-06-28 15:41 ` Rob Herring (Arm)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).