* [PATCH RESEND v8 1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 2/6] dt-bindings: add Canaan K230 boards compatible strings Yangyu Chen
` (7 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen, Conor Dooley
The thead,c908 is a RISC-V CPU core from T-HEAD Semiconductor which used
in Canaan Kendryte K230 SoC.
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Guo Ren <guoren@kernel.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 d87dd50f1a4b..d067f2a468ee 100644
--- a/Documentation/devicetree/bindings/riscv/cpus.yaml
+++ b/Documentation/devicetree/bindings/riscv/cpus.yaml
@@ -47,6 +47,7 @@ properties:
- sifive,u74
- sifive,u74-mc
- thead,c906
+ - thead,c908
- thead,c910
- thead,c920
- const: riscv
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH RESEND v8 2/6] dt-bindings: add Canaan K230 boards compatible strings
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 1/6] dt-bindings: riscv: Add T-HEAD C908 compatible Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 3/6] dt-bindings: timer: Add Canaan K230 CLINT Yangyu Chen
` (6 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen, Krzysztof Kozlowski
Since K230 was released, K210 is no longer the only SoC in the Kendryte
series, so remove the K210 string from the description. Also, add two
boards based on k230 to compatible strings to allow them to be used in the
dt.
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
---
Documentation/devicetree/bindings/riscv/canaan.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/riscv/canaan.yaml b/Documentation/devicetree/bindings/riscv/canaan.yaml
index 41fd11f70a49..f9854ff43ac6 100644
--- a/Documentation/devicetree/bindings/riscv/canaan.yaml
+++ b/Documentation/devicetree/bindings/riscv/canaan.yaml
@@ -10,7 +10,7 @@ maintainers:
- Damien Le Moal <dlemoal@kernel.org>
description:
- Canaan Kendryte K210 SoC-based boards
+ Canaan Kendryte SoC-based boards
properties:
$nodename:
@@ -42,6 +42,12 @@ properties:
- items:
- const: canaan,kendryte-k210
+ - items:
+ - enum:
+ - canaan,canmv-k230
+ - canaan,k230-usip-lp3-evb
+ - const: canaan,kendryte-k230
+
additionalProperties: true
...
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH RESEND v8 3/6] dt-bindings: timer: Add Canaan K230 CLINT
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 1/6] dt-bindings: riscv: Add T-HEAD C908 compatible Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 2/6] dt-bindings: add Canaan K230 boards compatible strings Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC Yangyu Chen
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen, Rob Herring
Add compatible string for Canaan K230 CLINT.
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.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 fced6f2d8ecb..06c67f20ad3c 100644
--- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml
+++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml
@@ -38,6 +38,7 @@ properties:
- items:
- enum:
- allwinner,sun20i-d1-clint
+ - canaan,k230-clint
- sophgo,cv1800b-clint
- sophgo,cv1812h-clint
- thead,th1520-clint
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH RESEND v8 4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (2 preceding siblings ...)
2024-04-07 16:28 ` [PATCH RESEND v8 3/6] dt-bindings: timer: Add Canaan K230 CLINT Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 5/6] riscv: dts: add initial canmv-k230 and k230-evb dts Yangyu Chen
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen, Rob Herring
Add compatible string for Canaan K230 PLIC.
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
---
.../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 +
1 file changed, 1 insertion(+)
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 709b2211276b..122f9b7b3f52 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
@@ -65,6 +65,7 @@ properties:
- items:
- enum:
- allwinner,sun20i-d1-plic
+ - canaan,k230-plic
- sophgo,cv1800b-plic
- sophgo,cv1812h-plic
- sophgo,sg2042-plic
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH RESEND v8 5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (3 preceding siblings ...)
2024-04-07 16:28 ` [PATCH RESEND v8 4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-07 16:28 ` [PATCH RESEND v8 6/6] riscv: config: enable ARCH_CANAAN in defconfig Yangyu Chen
` (3 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen
Add initial dts for CanMV-K230 and K230-EVB powered by Canaan Kendryte
K230 SoC [1].
Some key consideration:
- Only place BigCore which is 1.6GHz RV64GCBV
The existence of cache coherence between the two cores remains unknown
since they have dedicated L2 caches. And the factory SDK uses it for
other OS by default. I don't know whether the two CPUs on K230 SoC
can be used in one system. So only place BigCore here.
Meanwhile, although docs from Canaan said 1.6GHz Core with Vector is
CPU1, the CSR.MHARTID of this core is 0.
- Support for "zba" "zbb" "zbc" "zbs" are tested by hand
The user manual of C908 from T-Head does not document it specifically.
It just said it supports B extension V1.0. [2]
I have tested it by using this [3] which attempts to execute "add.uw",
"andn", "clmulr", "bclr" and they doesn't traps on K230. But on JH7110,
"clmulr" and "bclr" will trap.
- Support for "zicbom" is tested by hand
Have tested with some out-of-tree drivers from [4] that need DMA and they
do not come to the dts currently.
- Support for "zicboz" is tested by hand
Have tested with my own bare mental M-Mode program [5] which tries to use
zicboz to clear a 64B aligned block and got output[6] shows it supports
zicboz.
- Cache parameters are inferred from T-Head docs [2] and Canaan docs [1]
L1i: 32KB, VIPT 4-Way set-associative, 64B Cacheline
L1d: 32KB, VIPT 4-Way set-associative, 64B Cacheline
L2: 256KB, PIPT 16-way set-associative, 64B Cacheline
The numbers of cache sets are calculated from these parameters.
- MMU only supports Sv39
The T-Head docs [2] say the C908 core can be configured to support Sv48 and
Sv39 or only Sv39. On K230, I tried to write "riscv,sv48" on mmu-type in
dts and boot the mainline kernel. However, it failed during the kernel
probe and fell back to Sv39. I also tested it on M-Mode software, writing
Sv48 to satp.mode will not trap but will leave the CSR unchanged. While
writing Sv39, it will take effect. It shows that this CPU does not support
Sv48.
- Svpbmt and T-Head MAEE both supported
T-Head C908 does support both Svpbmt and T-Head MAEE for page-based memory
attributes and is controlled by BIT(21) on CSR.MXSTATUS. The Svpbmt is used
here for mainline kernel support for K230. If the kernel wants to use
Svpbmt, the M-Mode software should unset BIT(21) of CSR.MXSTATUS before
entering the S-Mode kernel. Otherwise, the kernel will not boot, as 0 on
T-Head MAEE is NonCachable Memory. Once the kernel switches from bare metal
to Sv39, It will lose dirty cache line modifications that haven't been
written back to the memory.
[1] https://developer.canaan-creative.com/k230/dev/zh/00_hardware/K230_datasheet.html#chapter-1-introduction
[2] https://occ-intl-prod.oss-ap-southeast-1.aliyuncs.com/resource//1699268369347/XuanTie-C908-UserManual.pdf
[3] https://github.com/cyyself/rvb_test
[4] https://github.com/cyyself/linux/tree/k230-mainline
[5] https://github.com/cyyself/simple-sw-workbench/commit/32657d807d64217323a80cb04ce114671e51ed60
[6] https://gist.github.com/cyyself/aa98b07b8c77bb1d53b5a4c5e67a37cf
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
---
arch/riscv/boot/dts/canaan/Makefile | 2 +
arch/riscv/boot/dts/canaan/k230-canmv.dts | 24 ++++
arch/riscv/boot/dts/canaan/k230-evb.dts | 24 ++++
arch/riscv/boot/dts/canaan/k230.dtsi | 142 ++++++++++++++++++++++
4 files changed, 192 insertions(+)
create mode 100644 arch/riscv/boot/dts/canaan/k230-canmv.dts
create mode 100644 arch/riscv/boot/dts/canaan/k230-evb.dts
create mode 100644 arch/riscv/boot/dts/canaan/k230.dtsi
diff --git a/arch/riscv/boot/dts/canaan/Makefile b/arch/riscv/boot/dts/canaan/Makefile
index 987d1f0c41f0..7d54ea5c6f3d 100644
--- a/arch/riscv/boot/dts/canaan/Makefile
+++ b/arch/riscv/boot/dts/canaan/Makefile
@@ -1,6 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_CANAAN) += canaan_kd233.dtb
dtb-$(CONFIG_ARCH_CANAAN) += k210_generic.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += k230-canmv.dtb
+dtb-$(CONFIG_ARCH_CANAAN) += k230-evb.dtb
dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_bit.dtb
dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_dock.dtb
dtb-$(CONFIG_ARCH_CANAAN) += sipeed_maix_go.dtb
diff --git a/arch/riscv/boot/dts/canaan/k230-canmv.dts b/arch/riscv/boot/dts/canaan/k230-canmv.dts
new file mode 100644
index 000000000000..9565915cead6
--- /dev/null
+++ b/arch/riscv/boot/dts/canaan/k230-canmv.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name>
+ */
+
+#include "k230.dtsi"
+
+/ {
+ model = "Canaan CanMV-K230";
+ compatible = "canaan,canmv-k230", "canaan,kendryte-k230";
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ ddr: memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x0 0x20000000>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/canaan/k230-evb.dts b/arch/riscv/boot/dts/canaan/k230-evb.dts
new file mode 100644
index 000000000000..f898b8e62368
--- /dev/null
+++ b/arch/riscv/boot/dts/canaan/k230-evb.dts
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name>
+ */
+
+#include "k230.dtsi"
+
+/ {
+ model = "Kendryte K230 EVB";
+ compatible = "canaan,k230-usip-lp3-evb", "canaan,kendryte-k230";
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ ddr: memory@0 {
+ device_type = "memory";
+ reg = <0x0 0x0 0x0 0x20000000>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/canaan/k230.dtsi b/arch/riscv/boot/dts/canaan/k230.dtsi
new file mode 100644
index 000000000000..95c1a3d8fb11
--- /dev/null
+++ b/arch/riscv/boot/dts/canaan/k230.dtsi
@@ -0,0 +1,142 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name>
+ */
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/dts-v1/;
+/ {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "canaan,kendryte-k230";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ timebase-frequency = <27000000>;
+
+ cpu@0 {
+ compatible = "thead,c908", "riscv";
+ device_type = "cpu";
+ reg = <0>;
+ riscv,isa = "rv64imafdcv_zba_zbb_zbc_zbs_zicbom_zicbop_zicboz_svpbmt";
+ riscv,isa-base = "rv64i";
+ riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "v", "zba", "zbb",
+ "zbc", "zbs", "zicbom", "zicbop", "zicboz",
+ "zicntr", "zicsr", "zifencei", "zihpm", "svpbmt";
+ riscv,cbom-block-size = <64>;
+ riscv,cbop-block-size = <64>;
+ riscv,cboz-block-size = <64>;
+ d-cache-block-size = <64>;
+ d-cache-sets = <128>;
+ d-cache-size = <32768>;
+ i-cache-block-size = <64>;
+ i-cache-sets = <128>;
+ i-cache-size = <32768>;
+ next-level-cache = <&l2_cache>;
+ mmu-type = "riscv,sv39";
+
+ cpu0_intc: interrupt-controller {
+ compatible = "riscv,cpu-intc";
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ };
+ };
+
+ l2_cache: l2-cache {
+ compatible = "cache";
+ cache-block-size = <64>;
+ cache-level = <2>;
+ cache-size = <262144>;
+ cache-sets = <256>;
+ cache-unified;
+ };
+ };
+
+ apb_clk: apb-clk-clock {
+ compatible = "fixed-clock";
+ clock-frequency = <50000000>;
+ clock-output-names = "apb_clk";
+ #clock-cells = <0>;
+ };
+
+ soc {
+ compatible = "simple-bus";
+ interrupt-parent = <&plic>;
+ #address-cells = <2>;
+ #size-cells = <2>;
+ dma-noncoherent;
+ ranges;
+
+ plic: interrupt-controller@f00000000 {
+ compatible = "canaan,k230-plic" ,"thead,c900-plic";
+ reg = <0xf 0x00000000 0x0 0x04000000>;
+ interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <2>;
+ riscv,ndev = <208>;
+ };
+
+ clint: timer@f04000000 {
+ compatible = "canaan,k230-clint", "thead,c900-clint";
+ reg = <0xf 0x04000000 0x0 0x00010000>;
+ interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
+ };
+
+ uart0: serial@91400000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x91400000 0x0 0x1000>;
+ clocks = <&apb_clk>;
+ interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
+ reg-io-width = <4>;
+ reg-shift = <2>;
+ status = "disabled";
+ };
+
+ uart1: serial@91401000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x91401000 0x0 0x1000>;
+ clocks = <&apb_clk>;
+ interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
+ reg-io-width = <4>;
+ reg-shift = <2>;
+ status = "disabled";
+ };
+
+ uart2: serial@91402000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x91402000 0x0 0x1000>;
+ clocks = <&apb_clk>;
+ interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
+ reg-io-width = <4>;
+ reg-shift = <2>;
+ status = "disabled";
+ };
+
+ uart3: serial@91403000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x91403000 0x0 0x1000>;
+ clocks = <&apb_clk>;
+ interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
+ reg-io-width = <4>;
+ reg-shift = <2>;
+ status = "disabled";
+ };
+
+ uart4: serial@91404000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x0 0x91404000 0x0 0x1000>;
+ clocks = <&apb_clk>;
+ interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
+ reg-io-width = <4>;
+ reg-shift = <2>;
+ status = "disabled";
+ };
+ };
+};
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH RESEND v8 6/6] riscv: config: enable ARCH_CANAAN in defconfig
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (4 preceding siblings ...)
2024-04-07 16:28 ` [PATCH RESEND v8 5/6] riscv: dts: add initial canmv-k230 and k230-evb dts Yangyu Chen
@ 2024-04-07 16:28 ` Yangyu Chen
2024-04-08 8:22 ` [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Conor Dooley
` (2 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Yangyu Chen @ 2024-04-07 16:28 UTC (permalink / raw)
To: linux-riscv
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel, Yangyu Chen, Conor Dooley
Since K230 has been supported, allow ARCH_CANAAN to be selected to build dt
and drivers for it in defconfig.
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
---
arch/riscv/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index fc0ec2ee13bc..27bea8296b9d 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -33,6 +33,7 @@ CONFIG_SOC_STARFIVE=y
CONFIG_ARCH_SUNXI=y
CONFIG_ARCH_THEAD=y
CONFIG_SOC_VIRT=y
+CONFIG_ARCH_CANAAN=y
CONFIG_SMP=y
CONFIG_HOTPLUG_CPU=y
CONFIG_PM=y
--
2.43.0
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (5 preceding siblings ...)
2024-04-07 16:28 ` [PATCH RESEND v8 6/6] riscv: config: enable ARCH_CANAAN in defconfig Yangyu Chen
@ 2024-04-08 8:22 ` Conor Dooley
2024-04-10 10:30 ` (subset) " Conor Dooley
2024-04-10 10:44 ` Conor Dooley
8 siblings, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2024-04-08 8:22 UTC (permalink / raw)
To: Yangyu Chen
Cc: linux-riscv, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 852 bytes --]
On Mon, Apr 08, 2024 at 12:26:58AM +0800, Yangyu Chen wrote:
> K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> locked pmp and successfully booted to busybox on initrd with this log [3].
>
> Changes in resend v8:
> - Add missing cc to lkml and linux-dt list and correct Krzysztof's address
> - No change in content
From v6:
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
https://lore.kernel.org/linux-riscv/mhng-08e43080-8679-43f8-80c5-b73304e4e680@palmer-ri-x1c9/#t
No need to resend for this alone, but if you do resend, please add that
ack to all patches.
Cheers,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (6 preceding siblings ...)
2024-04-08 8:22 ` [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Conor Dooley
@ 2024-04-10 10:30 ` Conor Dooley
2024-06-19 10:45 ` Conor Dooley
2024-04-10 10:44 ` Conor Dooley
8 siblings, 1 reply; 17+ messages in thread
From: Conor Dooley @ 2024-04-10 10:30 UTC (permalink / raw)
To: linux-riscv, Yangyu Chen
Cc: conor, Conor Dooley, Damien Le Moal, Rob Herring,
Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Guo Ren, devicetree, linux-kernel
From: Conor Dooley <conor.dooley@microchip.com>
On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> locked pmp and successfully booted to busybox on initrd with this log [3].
>
> [...]
Applied to riscv-dt-for-next, thanks!
[1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
https://git.kernel.org/conor/c/64cbc46bb854
[2/6] dt-bindings: add Canaan K230 boards compatible strings
https://git.kernel.org/conor/c/b065da13ea9c
[3/6] dt-bindings: timer: Add Canaan K230 CLINT
https://git.kernel.org/conor/c/b3ae796d0a4f
[4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
https://git.kernel.org/conor/c/db54fda11b13
[5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
https://git.kernel.org/conor/c/5db2c4dc413e
6/6 intentionally missing, it goes on another branch.
Thanks,
Conor.
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-04-10 10:30 ` (subset) " Conor Dooley
@ 2024-06-19 10:45 ` Conor Dooley
2024-06-23 17:07 ` Guo Ren
2024-06-25 16:04 ` Yangyu Chen
0 siblings, 2 replies; 17+ messages in thread
From: Conor Dooley @ 2024-06-19 10:45 UTC (permalink / raw)
To: linux-riscv, Yangyu Chen
Cc: Conor Dooley, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Paul Walmsley, Palmer Dabbelt, Albert Ou, Guo Ren,
devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2136 bytes --]
On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
>
> On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> > K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> > k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> > locked pmp and successfully booted to busybox on initrd with this log [3].
> >
> > [...]
>
> Applied to riscv-dt-for-next, thanks!
>
> [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> https://git.kernel.org/conor/c/64cbc46bb854
> [2/6] dt-bindings: add Canaan K230 boards compatible strings
> https://git.kernel.org/conor/c/b065da13ea9c
> [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> https://git.kernel.org/conor/c/b3ae796d0a4f
> [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> https://git.kernel.org/conor/c/db54fda11b13
> [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> https://git.kernel.org/conor/c/5db2c4dc413e
After some discussion on the k1 thread
(https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
I am going to drop this series. It's not very useful in the current
state and there's not really been any interest from people in getting
the platform to a more complete state. Jisheng made some good points in
the k1 thread about the missing clock controller stuff, and I think I'm
going to make having basic things like clocks and where applicable
resets and pinctrl the minimum requirement for the platforms I'm looking
after.
I've thrown these patches into my tree:
https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=k230-basic
I do have one of these boards, but I'm fairly limited at the moment between
the various linux-related and work demands on my time, so it's pretty
unlikely that I'll do anything with it myself.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-19 10:45 ` Conor Dooley
@ 2024-06-23 17:07 ` Guo Ren
2024-06-23 17:32 ` Conor Dooley
2024-06-25 16:04 ` Yangyu Chen
1 sibling, 1 reply; 17+ messages in thread
From: Guo Ren @ 2024-06-23 17:07 UTC (permalink / raw)
To: Conor Dooley
Cc: linux-riscv, Yangyu Chen, Conor Dooley, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley,
Palmer Dabbelt, Albert Ou, devicetree, linux-kernel
On Wed, Jun 19, 2024 at 6:45 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@microchip.com>
> >
> > On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> > > K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> > > k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> > > locked pmp and successfully booted to busybox on initrd with this log [3].
> > >
> > > [...]
> >
> > Applied to riscv-dt-for-next, thanks!
> >
> > [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> > https://git.kernel.org/conor/c/64cbc46bb854
> > [2/6] dt-bindings: add Canaan K230 boards compatible strings
> > https://git.kernel.org/conor/c/b065da13ea9c
> > [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> > https://git.kernel.org/conor/c/b3ae796d0a4f
> > [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> > https://git.kernel.org/conor/c/db54fda11b13
> > [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> > https://git.kernel.org/conor/c/5db2c4dc413e
>
> After some discussion on the k1 thread
> (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> I am going to drop this series. It's not very useful in the current
> state and there's not really been any interest from people in getting
> the platform to a more complete state. Jisheng made some good points in
> the k1 thread about the missing clock controller stuff, and I think I'm
> going to make having basic things like clocks and where applicable
> resets and pinctrl the minimum requirement for the platforms I'm looking
> after.
Here is the k230 clock driver based on Linux-6.6:
https://github.com/ruyisdk/linux-xuantie-kernel/commit/196242fd9b9b4a191dab0c7c3c5bf851ed857d8d
pinctrl:
https://github.com/ruyisdk/linux-xuantie-kernel/commit/baf26b6622c9de2ff64a6ed58eeeb98c8b2c828b
No reset driver.
Most of the k230 drivers are under Linux-5.10, and we are porting them
into the newest version of Linux, which takes time.
So, if the clock & punctual drivers mentioned above could satisfy the
minimum requirements for the platforms, we will update the version of
this series as a supplement.
Is that okay?
>
> I've thrown these patches into my tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=k230-basic
>
> I do have one of these boards, but I'm fairly limited at the moment between
> the various linux-related and work demands on my time, so it's pretty
> unlikely that I'll do anything with it myself.
>
> Thanks,
> Conor.
--
Best Regards
Guo Ren
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-23 17:07 ` Guo Ren
@ 2024-06-23 17:32 ` Conor Dooley
2024-06-25 3:55 ` Guo Ren
0 siblings, 1 reply; 17+ messages in thread
From: Conor Dooley @ 2024-06-23 17:32 UTC (permalink / raw)
To: Guo Ren
Cc: linux-riscv, Yangyu Chen, Conor Dooley, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley,
Palmer Dabbelt, Albert Ou, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3090 bytes --]
On Mon, Jun 24, 2024 at 01:07:55AM +0800, Guo Ren wrote:
> On Wed, Jun 19, 2024 at 6:45 PM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> > > From: Conor Dooley <conor.dooley@microchip.com>
> > >
> > > On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> > > > K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> > > > k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> > > > locked pmp and successfully booted to busybox on initrd with this log [3].
> > > >
> > > > [...]
> > >
> > > Applied to riscv-dt-for-next, thanks!
> > >
> > > [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> > > https://git.kernel.org/conor/c/64cbc46bb854
> > > [2/6] dt-bindings: add Canaan K230 boards compatible strings
> > > https://git.kernel.org/conor/c/b065da13ea9c
> > > [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> > > https://git.kernel.org/conor/c/b3ae796d0a4f
> > > [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> > > https://git.kernel.org/conor/c/db54fda11b13
> > > [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> > > https://git.kernel.org/conor/c/5db2c4dc413e
> >
> > After some discussion on the k1 thread
> > (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> > I am going to drop this series. It's not very useful in the current
> > state and there's not really been any interest from people in getting
> > the platform to a more complete state. Jisheng made some good points in
> > the k1 thread about the missing clock controller stuff, and I think I'm
> > going to make having basic things like clocks and where applicable
> > resets and pinctrl the minimum requirement for the platforms I'm looking
> > after.
> Here is the k230 clock driver based on Linux-6.6:
> https://github.com/ruyisdk/linux-xuantie-kernel/commit/196242fd9b9b4a191dab0c7c3c5bf851ed857d8d
>
> pinctrl:
> https://github.com/ruyisdk/linux-xuantie-kernel/commit/baf26b6622c9de2ff64a6ed58eeeb98c8b2c828b
>
> No reset driver.
>
> Most of the k230 drivers are under Linux-5.10, and we are porting them
> into the newest version of Linux, which takes time.
>
> So, if the clock & punctual drivers mentioned above could satisfy the
> minimum requirements for the platforms, we will update the version of
> this series as a supplement.
>
> Is that okay?
I don't understand how that changes anything, these are all out of tree
drivers based on an old kernel. I know that there are drivers for a lot
of the peripherals that are in-use in the vendor tree etc. What I am
looking to happen, before I apply patches for the k230, is that the clock
dt-bindings will have landed in linux-next - and ideally the pinctrl ones
too.
Thanks,
Conor.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-23 17:32 ` Conor Dooley
@ 2024-06-25 3:55 ` Guo Ren
2024-06-25 15:42 ` Conor Dooley
0 siblings, 1 reply; 17+ messages in thread
From: Guo Ren @ 2024-06-25 3:55 UTC (permalink / raw)
To: Conor Dooley
Cc: linux-riscv, Yangyu Chen, Conor Dooley, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley,
Palmer Dabbelt, Albert Ou, devicetree, linux-kernel
On Mon, Jun 24, 2024 at 1:32 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Mon, Jun 24, 2024 at 01:07:55AM +0800, Guo Ren wrote:
> > On Wed, Jun 19, 2024 at 6:45 PM Conor Dooley <conor@kernel.org> wrote:
> > >
> > > On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> > > > From: Conor Dooley <conor.dooley@microchip.com>
> > > >
> > > > On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> > > > > K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> > > > > k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> > > > > locked pmp and successfully booted to busybox on initrd with this log [3].
> > > > >
> > > > > [...]
> > > >
> > > > Applied to riscv-dt-for-next, thanks!
> > > >
> > > > [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> > > > https://git.kernel.org/conor/c/64cbc46bb854
> > > > [2/6] dt-bindings: add Canaan K230 boards compatible strings
> > > > https://git.kernel.org/conor/c/b065da13ea9c
> > > > [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> > > > https://git.kernel.org/conor/c/b3ae796d0a4f
> > > > [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> > > > https://git.kernel.org/conor/c/db54fda11b13
> > > > [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> > > > https://git.kernel.org/conor/c/5db2c4dc413e
> > >
> > > After some discussion on the k1 thread
> > > (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> > > I am going to drop this series. It's not very useful in the current
> > > state and there's not really been any interest from people in getting
> > > the platform to a more complete state. Jisheng made some good points in
> > > the k1 thread about the missing clock controller stuff, and I think I'm
> > > going to make having basic things like clocks and where applicable
> > > resets and pinctrl the minimum requirement for the platforms I'm looking
> > > after.
> > Here is the k230 clock driver based on Linux-6.6:
> > https://github.com/ruyisdk/linux-xuantie-kernel/commit/196242fd9b9b4a191dab0c7c3c5bf851ed857d8d
> >
> > pinctrl:
> > https://github.com/ruyisdk/linux-xuantie-kernel/commit/baf26b6622c9de2ff64a6ed58eeeb98c8b2c828b
> >
> > No reset driver.
> >
> > Most of the k230 drivers are under Linux-5.10, and we are porting them
> > into the newest version of Linux, which takes time.
> >
> > So, if the clock & punctual drivers mentioned above could satisfy the
> > minimum requirements for the platforms, we will update the version of
> > this series as a supplement.
> >
> > Is that okay?
>
> I don't understand how that changes anything, these are all out of tree
> drivers based on an old kernel. I know that there are drivers for a lot
> of the peripherals that are in-use in the vendor tree etc. What I am
> looking to happen, before I apply patches for the k230, is that the clock
> dt-bindings will have landed in linux-next - and ideally the pinctrl ones
> too.
Okay, clock & pinctrl, the reply is clear to me. Thx.
>
> Thanks,
> Conor.
--
Best Regards
Guo Ren
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-25 3:55 ` Guo Ren
@ 2024-06-25 15:42 ` Conor Dooley
0 siblings, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2024-06-25 15:42 UTC (permalink / raw)
To: Guo Ren
Cc: linux-riscv, Yangyu Chen, Conor Dooley, Damien Le Moal,
Rob Herring, Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley,
Palmer Dabbelt, Albert Ou, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3606 bytes --]
On Tue, Jun 25, 2024 at 11:55:32AM +0800, Guo Ren wrote:
> On Mon, Jun 24, 2024 at 1:32 AM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Mon, Jun 24, 2024 at 01:07:55AM +0800, Guo Ren wrote:
> > > On Wed, Jun 19, 2024 at 6:45 PM Conor Dooley <conor@kernel.org> wrote:
> > > >
> > > > On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> > > > > From: Conor Dooley <conor.dooley@microchip.com>
> > > > >
> > > > > On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> > > > > > K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> > > > > > k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> > > > > > locked pmp and successfully booted to busybox on initrd with this log [3].
> > > > > >
> > > > > > [...]
> > > > >
> > > > > Applied to riscv-dt-for-next, thanks!
> > > > >
> > > > > [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> > > > > https://git.kernel.org/conor/c/64cbc46bb854
> > > > > [2/6] dt-bindings: add Canaan K230 boards compatible strings
> > > > > https://git.kernel.org/conor/c/b065da13ea9c
> > > > > [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> > > > > https://git.kernel.org/conor/c/b3ae796d0a4f
> > > > > [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> > > > > https://git.kernel.org/conor/c/db54fda11b13
> > > > > [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> > > > > https://git.kernel.org/conor/c/5db2c4dc413e
> > > >
> > > > After some discussion on the k1 thread
> > > > (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> > > > I am going to drop this series. It's not very useful in the current
> > > > state and there's not really been any interest from people in getting
> > > > the platform to a more complete state. Jisheng made some good points in
> > > > the k1 thread about the missing clock controller stuff, and I think I'm
> > > > going to make having basic things like clocks and where applicable
> > > > resets and pinctrl the minimum requirement for the platforms I'm looking
> > > > after.
> > > Here is the k230 clock driver based on Linux-6.6:
> > > https://github.com/ruyisdk/linux-xuantie-kernel/commit/196242fd9b9b4a191dab0c7c3c5bf851ed857d8d
> > >
> > > pinctrl:
> > > https://github.com/ruyisdk/linux-xuantie-kernel/commit/baf26b6622c9de2ff64a6ed58eeeb98c8b2c828b
> > >
> > > No reset driver.
> > >
> > > Most of the k230 drivers are under Linux-5.10, and we are porting them
> > > into the newest version of Linux, which takes time.
> > >
> > > So, if the clock & punctual drivers mentioned above could satisfy the
> > > minimum requirements for the platforms, we will update the version of
> > > this series as a supplement.
> > >
> > > Is that okay?
> >
> > I don't understand how that changes anything, these are all out of tree
> > drivers based on an old kernel. I know that there are drivers for a lot
> > of the peripherals that are in-use in the vendor tree etc. What I am
> > looking to happen, before I apply patches for the k230, is that the clock
> > dt-bindings will have landed in linux-next - and ideally the pinctrl ones
> > too.
> Okay, clock & pinctrl, the reply is clear to me. Thx.
If you could get someone to work on them, or convince Canaan to do it
etc, that'd be neat :)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-19 10:45 ` Conor Dooley
2024-06-23 17:07 ` Guo Ren
@ 2024-06-25 16:04 ` Yangyu Chen
2024-06-25 16:44 ` Conor Dooley
1 sibling, 1 reply; 17+ messages in thread
From: Yangyu Chen @ 2024-06-25 16:04 UTC (permalink / raw)
To: Conor Dooley
Cc: linux-riscv, Conor Dooley, Damien Le Moal, Rob Herring,
Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Guo Ren, devicetree, Linux Kernel Mailing List
> On Jun 19, 2024, at 18:45, Conor Dooley <conor@kernel.org> wrote:
>
> On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
>> From: Conor Dooley <conor.dooley@microchip.com>
>>
>> On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
>>> K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
>>> k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
>>> locked pmp and successfully booted to busybox on initrd with this log [3].
>>>
>>> [...]
>>
>> Applied to riscv-dt-for-next, thanks!
>>
>> [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
>> https://git.kernel.org/conor/c/64cbc46bb854
>> [2/6] dt-bindings: add Canaan K230 boards compatible strings
>> https://git.kernel.org/conor/c/b065da13ea9c
>> [3/6] dt-bindings: timer: Add Canaan K230 CLINT
>> https://git.kernel.org/conor/c/b3ae796d0a4f
>> [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
>> https://git.kernel.org/conor/c/db54fda11b13
>> [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
>> https://git.kernel.org/conor/c/5db2c4dc413e
>
> After some discussion on the k1 thread
> (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> I am going to drop this series. It's not very useful in the current
> state and there's not really been any interest from people in getting
> the platform to a more complete state. Jisheng made some good points in
> the k1 thread about the missing clock controller stuff, and I think I'm
> going to make having basic things like clocks and where applicable
> resets and pinctrl the minimum requirement for the platforms I'm looking
> after.
>
> I've thrown these patches into my tree:
> https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=k230-basic
>
> I do have one of these boards, but I'm fairly limited at the moment between
> the various linux-related and work demands on my time, so it's pretty
> unlikely that I'll do anything with it myself.
>
OK. I understand about this. I do some initial support for K230
only for my evaluation purpose and propose this tree to provide
information for others to boot up a minimal kernel and also have
another patch [1] to have a USB node so we will able to run a distro
like Debian over NFS rootfs by USB ethernet which is on canmv k230
board.
But I want to say I may have no time to do further driver development.
I have done this for my evaluation purpose to get some performance
metrics on real RVV chips for research usage since I’m a Ph.D.
student focused on computer architecture. I have to devote my time
to my research work.
If anyone wants to do some further driver development, please don’t
hesitate to do so. Don’t imagine I may be doing this, so you may
do duplicate work. I’m too busy to do that.
[1] https://lore.kernel.org/linux-riscv/tencent_E9B853316D217B8D1E7CDF8288DA5E8ED908@qq.com/
Thanks,
Yangyu Chen
> Thanks,
> Conor.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-06-25 16:04 ` Yangyu Chen
@ 2024-06-25 16:44 ` Conor Dooley
0 siblings, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2024-06-25 16:44 UTC (permalink / raw)
To: Yangyu Chen
Cc: linux-riscv, Conor Dooley, Damien Le Moal, Rob Herring,
Krzysztof Kozlowski, Dan Carpenter, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Guo Ren, devicetree, Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 3529 bytes --]
On Wed, Jun 26, 2024 at 12:04:22AM +0800, Yangyu Chen wrote:
>
>
> > On Jun 19, 2024, at 18:45, Conor Dooley <conor@kernel.org> wrote:
> >
> > On Wed, Apr 10, 2024 at 11:30:25AM +0100, Conor Dooley wrote:
> >> From: Conor Dooley <conor.dooley@microchip.com>
> >>
> >> On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> >>> K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> >>> k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> >>> locked pmp and successfully booted to busybox on initrd with this log [3].
> >>>
> >>> [...]
> >>
> >> Applied to riscv-dt-for-next, thanks!
> >>
> >> [1/6] dt-bindings: riscv: Add T-HEAD C908 compatible
> >> https://git.kernel.org/conor/c/64cbc46bb854
> >> [2/6] dt-bindings: add Canaan K230 boards compatible strings
> >> https://git.kernel.org/conor/c/b065da13ea9c
> >> [3/6] dt-bindings: timer: Add Canaan K230 CLINT
> >> https://git.kernel.org/conor/c/b3ae796d0a4f
> >> [4/6] dt-bindings: interrupt-controller: Add Canaan K230 PLIC
> >> https://git.kernel.org/conor/c/db54fda11b13
> >> [5/6] riscv: dts: add initial canmv-k230 and k230-evb dts
> >> https://git.kernel.org/conor/c/5db2c4dc413e
> >
> > After some discussion on the k1 thread
> > (https://lore.kernel.org/all/ZnEOU7D00J8Jzy-1@xhacker/, https://lore.kernel.org/all/ZnA6pZLkI2StP8Hh@xhacker/)
> > I am going to drop this series. It's not very useful in the current
> > state and there's not really been any interest from people in getting
> > the platform to a more complete state. Jisheng made some good points in
> > the k1 thread about the missing clock controller stuff, and I think I'm
> > going to make having basic things like clocks and where applicable
> > resets and pinctrl the minimum requirement for the platforms I'm looking
> > after.
> >
> > I've thrown these patches into my tree:
> > https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=k230-basic
> >
> > I do have one of these boards, but I'm fairly limited at the moment between
> > the various linux-related and work demands on my time, so it's pretty
> > unlikely that I'll do anything with it myself.
> >
>
> OK. I understand about this. I do some initial support for K230
> only for my evaluation purpose and propose this tree to provide
> information for others to boot up a minimal kernel and also have
> another patch [1] to have a USB node so we will able to run a distro
> like Debian over NFS rootfs by USB ethernet which is on canmv k230
> board.
>
> But I want to say I may have no time to do further driver development.
> I have done this for my evaluation purpose to get some performance
> metrics on real RVV chips for research usage since I’m a Ph.D.
> student focused on computer architecture. I have to devote my time
> to my research work.
And thanks, in particular, for doing the initial k230 work. We've got
something that boots without having to use the vendor extensions which
is great :)
>
> If anyone wants to do some further driver development, please don’t
> hesitate to do so. Don’t imagine I may be doing this, so you may
> do duplicate work. I’m too busy to do that.
>
> [1] https://lore.kernel.org/linux-riscv/tencent_E9B853316D217B8D1E7CDF8288DA5E8ED908@qq.com/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230
2024-04-07 16:26 [PATCH RESEND v8 0/6] riscv: add initial support for Canaan Kendryte K230 Yangyu Chen
` (7 preceding siblings ...)
2024-04-10 10:30 ` (subset) " Conor Dooley
@ 2024-04-10 10:44 ` Conor Dooley
8 siblings, 0 replies; 17+ messages in thread
From: Conor Dooley @ 2024-04-10 10:44 UTC (permalink / raw)
To: linux-riscv, Conor Dooley, Yangyu Chen
Cc: Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
linux-kernel, Damien Le Moal, Rob Herring, Krzysztof Kozlowski,
Dan Carpenter, Guo Ren, devicetree
From: Conor Dooley <conor.dooley@microchip.com>
On Mon, 08 Apr 2024 00:26:58 +0800, Yangyu Chen wrote:
> K230 is an ideal chip for RISC-V Vector 1.0 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 factory SDK [1] with
> k230_evb_only_linux_defconfig and patched mainline opensbi [2] to skip
> locked pmp and successfully booted to busybox on initrd with this log [3].
>
> [...]
Applied to riscv-soc-for-next, thanks!
[6/6] riscv: config: enable ARCH_CANAAN in defconfig
https://git.kernel.org/conor/c/cd899f85b1e4
Thanks,
Conor.
^ permalink raw reply [flat|nested] 17+ messages in thread