mbox series

[RESEND,v8,0/6] riscv: add initial support for Canaan Kendryte K230

Message ID tencent_22BA0425B4DF1CA1713B62E4423C1BFBF809@qq.com (mailing list archive)
Headers show
Series riscv: add initial support for Canaan Kendryte K230 | expand

Message

Yangyu Chen April 7, 2024, 4:26 p.m. UTC
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

v8: https://lore.kernel.org/linux-riscv/tencent_9F423E3DC13F6D5FC7415C89988490F04607@qq.com/

Changes since v7:
- Add missing riscv,cbop-block-size and riscv,cboz-block-size in dts

v7: https://lore.kernel.org/linux-riscv/tencent_F6392EE11AC6A485C43406F1BD09C268DB0A@qq.com/

Changes since v6:
- Split SOC_CANAAN clean up to a separate patch [4]
- Add zicbop and zicboz in dts
- Rebase to riscv-dt-for-next branch

v6: https://lore.kernel.org/linux-riscv/tencent_F76EB8D731C521C18D5D7C4F8229DAA58E08@qq.com/

Changes since v5:
- Deprecate SOC_CANAAN and use SOC_CANAAN_K210 for K210 SoCs
- Modify existing K210 drivers depends on SOC_CANAAN_K210 symbol
- Reword dts commit message
- Modify dts to use Full 512MB memory
- Rebase to linux mainline master

v5: https://lore.kernel.org/linux-riscv/tencent_FC10B3C630BE27412FED2547245CBE18D807@qq.com/

Changes since v4:
- Reword commit message on dts that the B-ext version of c908 is 1.0 rather
  than 1.0-rc1

v4: https://lore.kernel.org/linux-riscv/tencent_587730262984A011834F42D0563BC6B10405@qq.com/

Changes since v3:
- Refactor Kconfig.soc which uses ARCH_CANAAN for regular Canaan SoCs and
  rename SOC_CANAAN to SOC_CANAAN_K210 for K210 in patch [5/7]
- Sort dt-binding stings on Cannan SoCs in alphanumerical order

v3: https://lore.kernel.org/linux-riscv/tencent_BB2364BBF1812F4E304F7BDDD11E57356605@qq.com/

Changes since v2:
- Add MIT License to dts file
- Sort dt-binding stings in alphanumerical order
- Sort filename in dts Makefile in alphanumerical order
- Rename canmv-k230.dts to k230-canmv.dts

v2: https://lore.kernel.org/linux-riscv/tencent_64A9B4B31C2D70D5633042461AC9F80C0509@qq.com/

Changes since v1:
- Patch dt-bindings in clint and plic
- Use enum in K230 compatible dt bindings
- Fix dts to pass `make dtbs_check`
- Add more details in commit message

v1: https://lore.kernel.org/linux-riscv/tencent_E15F8FE0B6769E6338AE690C7F4844A31706@qq.com/

[1] https://github.com/kendryte/k230_sdk
[2] https://github.com/cyyself/opensbi/tree/k230
[3] https://gist.github.com/cyyself/b9445f38cc3ba1094924bd41c9086176
[4] https://lore.kernel.org/linux-riscv/tencent_2E60E33C1F88A090B6B3A332AE528C6B8806@qq.com/

Yangyu Chen (6):
  dt-bindings: riscv: Add T-HEAD C908 compatible
  dt-bindings: add Canaan K230 boards compatible strings
  dt-bindings: timer: Add Canaan K230 CLINT
  dt-bindings: interrupt-controller: Add Canaan K230 PLIC
  riscv: dts: add initial canmv-k230 and k230-evb dts
  riscv: config: enable ARCH_CANAAN in defconfig

 .../sifive,plic-1.0.0.yaml                    |   1 +
 .../devicetree/bindings/riscv/canaan.yaml     |   8 +-
 .../devicetree/bindings/riscv/cpus.yaml       |   1 +
 .../bindings/timer/sifive,clint.yaml          |   1 +
 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 ++++++++++++++++++
 arch/riscv/configs/defconfig                  |   1 +
 9 files changed, 203 insertions(+), 1 deletion(-)
 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

base-commit: 0eea987088a22d73d81e968de7347cdc7e594f72

Comments

Conor Dooley April 8, 2024, 8:22 a.m. UTC | #1
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.
Conor Dooley April 10, 2024, 10:30 a.m. UTC | #2
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.
Conor Dooley April 10, 2024, 10:44 a.m. UTC | #3
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.
Conor Dooley June 19, 2024, 10:45 a.m. UTC | #4
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.
Guo Ren June 23, 2024, 5:07 p.m. UTC | #5
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.
Conor Dooley June 23, 2024, 5:32 p.m. UTC | #6
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.
Guo Ren June 25, 2024, 3:55 a.m. UTC | #7
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.
Conor Dooley June 25, 2024, 3:42 p.m. UTC | #8
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 :)
Yangyu Chen June 25, 2024, 4:04 p.m. UTC | #9
> 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.
Conor Dooley June 25, 2024, 4:44 p.m. UTC | #10
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/