Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SOPHGO SoCs and Milk-V boards #69594

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

xingrz
Copy link
Member

@xingrz xingrz commented Feb 29, 2024

This PR ports Zephyr to SOPHGO platforms, including 3 new SoCs and 3 boards:

Board Identifier SoC Link
Milk-V Duo milkv_duo CV1800B https://milkv.io/chips/cv1800b
Milk-V Duo S milkv_duos SG2000 https://milkv.io/chips/sg2000
Milk-V Duo 256M milkv_duo256m SG2002 https://milkv.io/chips/sg2002

The CV1800B is a member of the SOPHGO CV180X series. It's a multi-core RV64 SoC, consists with a 1GHz T-Head C906 RV64 big core running Linux, and a 700MHz C906 RV64 little core running RTOS.

The SG2000/SG2002 is a successor of CV1800B, belonging to the CV181x series. It features a 1GHz ARM Cortex-A53 big core, a 1GHz T-Head C906 RV64 big core (only one big core will be booted base on the selection of a BOOT GPIO), and a 700MHz C906 RV64 little core.

TODOs

@xingrz xingrz force-pushed the milkv-duo/hwmv2/dev branch 4 times, most recently from 1850acb to 3528150 Compare February 29, 2024 07:57
@nordicjm nordicjm added DNM This PR should not be merged (Do Not Merge) hwmv2-likely-conflict DNM until collab-hwmv2 has been merged labels Feb 29, 2024
@xingrz xingrz force-pushed the milkv-duo/hwmv2/dev branch 6 times, most recently from 3a60a91 to 2a7c3f9 Compare March 1, 2024 08:16
@xingrz xingrz force-pushed the milkv-duo/hwmv2/dev branch 2 times, most recently from 7e31aea to eb20e38 Compare March 1, 2024 14:32
@zephyrbot

This comment was marked as outdated.

fkokosinski
fkokosinski previously approved these changes Jun 5, 2024
@kartben
Copy link
Collaborator

kartben commented Aug 9, 2024

@xingrz will you be coming back to this PR, it needs to be rebased

@xingrz
Copy link
Member Author

xingrz commented Aug 9, 2024

@xingrz will you be coming back to this PR, it needs to be rebased

@kartben Rebased. Thanks for reminding.

gmarull
gmarull previously approved these changes Aug 9, 2024
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK


The default configuration can be found in the defconfig file:

``boards/milkv/duo/milkv_duo_defconfig``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use :zephyr_file:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Fixed.


The default configuration can be found in the defconfig file:

``boards/milkv/duo256m/milkv_duo256m_defconfig``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above


The default configuration can be found in the defconfig file:

``boards/milkv/duos/milkv_duos_defconfig``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

xingrz and others added 16 commits September 17, 2024 00:24
T-Head is a semiconductor chip business entity of Alibaba Group.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
SOPHGO is a company focus on development of TPU and RISC-V processors.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
MilkV is a RISC-V MCU company located in Shenzhen, China.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
C906 is a RISC-V CPU designed by T-Head. This commit introduces its DTS
binding for later use.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
CV180x is a series of RV64 SoCs developed by SOPHGO (formerly CVITEK),
based on T-Head C906 CPU.

Co-authored-by: honglin leng <a909204013@gmail.com>
Signed-off-by: Chen Xingyu <hi@xingrz.me>
SG2000, also named "CV1813H". SG2002, also named "CV1812CP". Both of them
are multi-core SoCs developed by SOPHGO, belonging to the CV181x series.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
…ation

This commit adapts the existing RISC-V Machine Timer driver for the T-Head
C906 CPU:

* Although it's a RV64I CPU, the MTIMECMP register must be accessed as
  32-bit values.
* The value of the timer should be read using the `TIME` CSR, instead of
  the standard memory-mapped `MTIME` register.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
This commit introduces a pin-controller driver for the CVI series SoCs by
SOPHGO.

Predefined pinmux values are also added. Please refer to the official
datasheet for the naming conventions of pins and signals.

Signed-off-by: Chen Xingyu <hi@xingrz.me>

# Conflicts:
#	drivers/pinctrl/CMakeLists.txt
This commit adds PWM driver for CVI series SoCs.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
This implements a mailbox driver for CV18xx, a series of multi-core SoCs by
SOPHGO.

This driver enables the little core of CV18xx running RTOS to communicate
with its big core running Linux.

Signed-off-by: honglin leng <a909204013@gmail.com>
Signed-off-by: Chen Xingyu <hi@xingrz.me>
The SOPHGO CVI series SoCs load the RTOS kernel for the 2nd core from a
`fip.bin` located in the main storage.

This commit introduced a convenient script for updating the `fip.bin` on
the external storage mounted to the host, with the newly built
`zephyr.bin`.

Path to the `fiptool.py` from the official SDK should be provided.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
Milk-V Duo is a tiny development board shipped with SOPHGO CV1800B.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
Duo S is another development board by Milk-V, shipped with SOPHGO SG2000.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
Milk-V Duo 256M is the successor of Milk-V Duo, featuring a SOPHGO SG2002
SoC.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
This commit adds an overlay to the PWM driver tests for Milk-V boards.

Signed-off-by: Chen Xingyu <hi@xingrz.me>
Also added @lenghonglin as collaborator

Signed-off-by: Chen Xingyu <hi@xingrz.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: GPIO area: mbox area: Pinctrl area: Process area: PWM Pulse Width Modulation area: RISCV RISCV Architecture (32-bit & 64-bit) area: Samples Samples area: Timer Timer area: West West utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants