mbox series

[v2,0/7] arm64 support for Milk-V Duo Module 01 EVB

Message ID 20250210220951.1248533-1-alexander.sverdlin@gmail.com (mailing list archive)
Headers show
Series arm64 support for Milk-V Duo Module 01 EVB | expand

Message

Alexander Sverdlin Feb. 10, 2025, 10:09 p.m. UTC
This series adds very basic support for Milk-V Duo Module 01 EVB [1] in
arm64 mode. The SoC (SG2000) is dual-arch, RiscV and ARM64, the latter has
been chosen because the upstream toolchain can be utilized.

Sophgo SG2000 seems to be a continuation of the Cvitek CV18xx series, same
peripherals with an addition of ARM64 core. Therefore it would be
beneficial not to copy-paste the peripherals' device-tree, but rather split
the most suitable riscv DT into ARCH-specific and peripherals parts and
just include the latter on the arm64 side.

This series adds the device-tree for Milk-V Duo Module 01 EVB, which
in turn contains Milk-V Duo Module 01 (separate .dtsi) on it, which has
SG2000 SoC inside (separate .dtsi).

This series has been tested with Sophgo-provided U-Boot binary [2]: it
boots from SD card; pinctrl, serial, GPIO drivers are functional (same
as for RiscV-based CV18xx SoCs).

Partial SoC documentation is available [3].

This series lacks the support of:
- USB
- Audio
- Ethernet
- WiFi
- Bluetooth
- eMMC
- Video
- "reboot" functionality

It would probably make sense that the series will go into ARM SOC tree.

Changelog:
v2:
- dropped all patches related to the new reboot driver and corresponding DT
and bindings;
- grouped DT-related and config-related patches together;
- added patch moving sophgo.yaml from riscv into soc (to share it with
ARM); added SG2000 SoC and Milk-V Duo Module 01 EVB into it;
- other changes are documented in the corresponding patches;

[1] https://milkv.io/docs/duo/getting-started/duo-module-01
[2] https://github.com/milkv-duo/duo-buildroot-sdk-v2/releases/
[3] https://github.com/sophgo/sophgo-doc/releases/download/sg2000-trm-v1.01/sg2000_trm_en.pdf

Alexander Sverdlin (7):
  riscv: dts: sophgo: cv18xx: Move RiscV-specific part into SoCs' .dtsi
    files
  dt-bindings: soc: sophgo: Move SoCs/boards from riscv into soc, add
    SG2000
  arm64: dts: sophgo: Add initial SG2000 SoC device tree
  arm64: dts: sophgo: Add Duo Module 01
  arm64: dts: sophgo: Add Duo Module 01 Evaluation Board
  arm64: Add SOPHGO SOC family Kconfig support
  arm64: defconfig: Enable rudimentary Sophgo SG2000 support

 .../{riscv => soc/sophgo}/sophgo.yaml         |  7 +-
 arch/arm64/Kconfig.platforms                  |  6 ++
 arch/arm64/boot/dts/Makefile                  |  1 +
 arch/arm64/boot/dts/sophgo/Makefile           |  2 +
 .../sophgo/sg2000-milkv-duo-module-01-evb.dts | 31 +++++++
 .../sophgo/sg2000-milkv-duo-module-01.dtsi    | 85 +++++++++++++++++
 arch/arm64/boot/dts/sophgo/sg2000.dtsi        | 75 +++++++++++++++
 arch/arm64/configs/defconfig                  |  5 +
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 64 ++++++++++---
 arch/riscv/boot/dts/sophgo/cv1812h.dtsi       | 64 ++++++++++---
 arch/riscv/boot/dts/sophgo/cv181x.dtsi        |  2 +-
 arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi    | 57 ++++++++++++
 arch/riscv/boot/dts/sophgo/cv18xx.dtsi        | 91 +++++--------------
 arch/riscv/boot/dts/sophgo/sg2002.dtsi        | 64 ++++++++++---
 14 files changed, 451 insertions(+), 103 deletions(-)
 rename Documentation/devicetree/bindings/{riscv => soc/sophgo}/sophgo.yaml (80%)
 create mode 100644 arch/arm64/boot/dts/sophgo/Makefile
 create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01-evb.dts
 create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01.dtsi
 create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi
 create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi

Comments

Conor Dooley Feb. 11, 2025, 10:50 a.m. UTC | #1
On Mon, Feb 10, 2025 at 11:09:40PM +0100, Alexander Sverdlin wrote:
> This series adds very basic support for Milk-V Duo Module 01 EVB [1] in
> arm64 mode. The SoC (SG2000) is dual-arch, RiscV and ARM64, the latter has
> been chosen because the upstream toolchain can be utilized.

>  .../{riscv => soc/sophgo}/sophgo.yaml         |  7 +-
>  arch/arm64/Kconfig.platforms                  |  6 ++
>  arch/arm64/boot/dts/Makefile                  |  1 +
>  arch/arm64/boot/dts/sophgo/Makefile           |  2 +

I'd expect this to be maintained alongside the riscv support, how come
there's no maintainers entry change here?

>  .../sophgo/sg2000-milkv-duo-module-01-evb.dts | 31 +++++++
>  .../sophgo/sg2000-milkv-duo-module-01.dtsi    | 85 +++++++++++++++++
>  arch/arm64/boot/dts/sophgo/sg2000.dtsi        | 75 +++++++++++++++
>  arch/arm64/configs/defconfig                  |  5 +
>  arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 64 ++++++++++---
>  arch/riscv/boot/dts/sophgo/cv1812h.dtsi       | 64 ++++++++++---
>  arch/riscv/boot/dts/sophgo/cv181x.dtsi        |  2 +-
>  arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi    | 57 ++++++++++++
>  arch/riscv/boot/dts/sophgo/cv18xx.dtsi        | 91 +++++--------------
>  arch/riscv/boot/dts/sophgo/sg2002.dtsi        | 64 ++++++++++---
>  14 files changed, 451 insertions(+), 103 deletions(-)
>  rename Documentation/devicetree/bindings/{riscv => soc/sophgo}/sophgo.yaml (80%)
>  create mode 100644 arch/arm64/boot/dts/sophgo/Makefile
>  create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01-evb.dts
>  create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01.dtsi
>  create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi
>  create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi
Alexander Sverdlin Feb. 11, 2025, 12:43 p.m. UTC | #2
Hi Conor!

On Tue, 2025-02-11 at 10:50 +0000, Conor Dooley wrote:
> On Mon, Feb 10, 2025 at 11:09:40PM +0100, Alexander Sverdlin wrote:
> > This series adds very basic support for Milk-V Duo Module 01 EVB [1] in
> > arm64 mode. The SoC (SG2000) is dual-arch, RiscV and ARM64, the latter has
> > been chosen because the upstream toolchain can be utilized.
> 
> >   .../{riscv => soc/sophgo}/sophgo.yaml         |  7 +-
> >   arch/arm64/Kconfig.platforms                  |  6 ++
> >   arch/arm64/boot/dts/Makefile                  |  1 +
> >   arch/arm64/boot/dts/sophgo/Makefile           |  2 +
> 
> I'd expect this to be maintained alongside the riscv support, how come
> there's no maintainers entry change here?

MAINTAINERS file has "K: sophgo" entry already, I suppose new files will
fall into this category? That's why I've ignored this specific checkpatch warning
in all patches. Am I wrong?

> >   .../sophgo/sg2000-milkv-duo-module-01-evb.dts | 31 +++++++
> >   .../sophgo/sg2000-milkv-duo-module-01.dtsi    | 85 +++++++++++++++++
> >   arch/arm64/boot/dts/sophgo/sg2000.dtsi        | 75 +++++++++++++++
> >   arch/arm64/configs/defconfig                  |  5 +
> >   arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 64 ++++++++++---
> >   arch/riscv/boot/dts/sophgo/cv1812h.dtsi       | 64 ++++++++++---
> >   arch/riscv/boot/dts/sophgo/cv181x.dtsi        |  2 +-
> >   arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi    | 57 ++++++++++++
> >   arch/riscv/boot/dts/sophgo/cv18xx.dtsi        | 91 +++++--------------
> >   arch/riscv/boot/dts/sophgo/sg2002.dtsi        | 64 ++++++++++---
> >   14 files changed, 451 insertions(+), 103 deletions(-)
> >   rename Documentation/devicetree/bindings/{riscv => soc/sophgo}/sophgo.yaml (80%)
> >   create mode 100644 arch/arm64/boot/dts/sophgo/Makefile
> >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01-evb.dts
> >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01.dtsi
> >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi
> >   create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi
Conor Dooley Feb. 11, 2025, 1:48 p.m. UTC | #3
On Tue, Feb 11, 2025 at 01:43:31PM +0100, Alexander Sverdlin wrote:
> Hi Conor!
> 
> On Tue, 2025-02-11 at 10:50 +0000, Conor Dooley wrote:
> > On Mon, Feb 10, 2025 at 11:09:40PM +0100, Alexander Sverdlin wrote:
> > > This series adds very basic support for Milk-V Duo Module 01 EVB [1] in
> > > arm64 mode. The SoC (SG2000) is dual-arch, RiscV and ARM64, the latter has
> > > been chosen because the upstream toolchain can be utilized.
> > 
> > >   .../{riscv => soc/sophgo}/sophgo.yaml         |  7 +-
> > >   arch/arm64/Kconfig.platforms                  |  6 ++
> > >   arch/arm64/boot/dts/Makefile                  |  1 +
> > >   arch/arm64/boot/dts/sophgo/Makefile           |  2 +
> > 
> > I'd expect this to be maintained alongside the riscv support, how come
> > there's no maintainers entry change here?
> 
> MAINTAINERS file has "K: sophgo" entry already, I suppose new files will
> fall into this category? That's why I've ignored this specific checkpatch warning
> in all patches. Am I wrong?

Ah, I didn't realise.

> 
> > >   .../sophgo/sg2000-milkv-duo-module-01-evb.dts | 31 +++++++
> > >   .../sophgo/sg2000-milkv-duo-module-01.dtsi    | 85 +++++++++++++++++
> > >   arch/arm64/boot/dts/sophgo/sg2000.dtsi        | 75 +++++++++++++++
> > >   arch/arm64/configs/defconfig                  |  5 +
> > >   arch/riscv/boot/dts/sophgo/cv1800b.dtsi       | 64 ++++++++++---
> > >   arch/riscv/boot/dts/sophgo/cv1812h.dtsi       | 64 ++++++++++---
> > >   arch/riscv/boot/dts/sophgo/cv181x.dtsi        |  2 +-
> > >   arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi    | 57 ++++++++++++
> > >   arch/riscv/boot/dts/sophgo/cv18xx.dtsi        | 91 +++++--------------
> > >   arch/riscv/boot/dts/sophgo/sg2002.dtsi        | 64 ++++++++++---
> > >   14 files changed, 451 insertions(+), 103 deletions(-)
> > >   rename Documentation/devicetree/bindings/{riscv => soc/sophgo}/sophgo.yaml (80%)
> > >   create mode 100644 arch/arm64/boot/dts/sophgo/Makefile
> > >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01-evb.dts
> > >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000-milkv-duo-module-01.dtsi
> > >   create mode 100644 arch/arm64/boot/dts/sophgo/sg2000.dtsi
> > >   create mode 100644 arch/riscv/boot/dts/sophgo/cv18xx-cpu.dtsi
> 
> -- 
> Alexander Sverdlin.
>