Skip to content

Commit fc32a03

Browse files
committed
Add DuoS support (not EMMC version yet)
1 parent 88d97d3 commit fc32a03

File tree

21 files changed

+1069
-13
lines changed

21 files changed

+1069
-13
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Debian Images for Sophgo cv1800/sg200x based boards
1+
# Debian Images for Sophgo cv181x/sg200x based boards
22

3-
This repository builds debian sid images for Sophgo cv1800/sg200x based boards such as MilkV Duo/Duo256 and Sipeed LicheeRvNano.
3+
This repository builds debian sid images for Sophgo cv181x/sg200x based boards such as MilkV Duo256/DuoS (SD Version only) and Sipeed LicheeRvNano.
4+
5+
(Note, we don't support the MilkV Duo, as it does not have enough ram to run Debian)
46

57
The images aim to be as close to possible to debian best practices as possible
68

@@ -53,7 +55,7 @@ https://sophgo.my-ho.st:8443/ which pulls down the compiled debian packages from
5355

5456
To build a stock image with no modifications:
5557
```
56-
podman run --privileged -it --rm -v ./configs/:/configs -v ./image:/output -v ghcr.io/fishwaldo/sophgo-sg200x-debian:master make BOARD=licheervnano image
58+
podman run --privileged -it --rm -v ./configs/:/configs -v ./image:/output ghcr.io/fishwaldo/sophgo-sg200x-debian:master make BOARD=licheervnano image
5759
```
5860

5961
Replace the licheervnano with the board you want to build for:
@@ -85,9 +87,9 @@ The configs directory contains patches, configuration and device tree files that
8587

8688
The configs/common directory contains the common configuration for all boards, and the configs/licheervnano and configs/duo256 directories contain the board specific configuration.
8789

88-
To add packages to the image, either add the package name in PACKAGES variable of configs/settings.mk or if the packae is specific to a board, add it to the configs/<board>/settings.mk file
90+
To add packages to the image, either add the package name in PACKAGES variable of configs/settings.mk or if the packae is specific to a board, add it to the configs/\<board\>/settings.mk file
8991

90-
Patches for the kernel, opensbi, u-boot or fsbl can be placed in configs/common/patches/ or configs/<board>/patches/ depending what they are for.
92+
Patches for the kernel, opensbi, u-boot or fsbl can be placed in configs/common/patches/ or configs/\<board\>/patches/ depending what they are for.
9193

9294
To assist with developing the image, you can get a shell in the docker container by running:
9395
```
@@ -98,7 +100,7 @@ inside the container, packages are build in the /builder/ directory, and the roo
98100

99101

100102
# TODO
101-
- Add support for the DuoS board
103+
- Add support for the DuoS EMMC Board
102104
- DeviceTree Overlay Support
103105
- Add support for the MIPI-CSI/DSI drivers (Sample applications would be in the sophgo-sg200x-packages repository if they do not depend upon a musl libc version)
104106
- Add support for the TPU drivers
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/dts-v1/;
2+
#include "cv181x_base_riscv.dtsi"
3+
#include "cv181x_asic_bga.dtsi"
4+
#include "cv181x_asic_sd.dtsi"
5+
#include "cv181x_default_memmap.dtsi"
6+
7+
#include "dt-bindings/leds/common.h"
8+
#ifndef __UBOOT__
9+
#include <dt-bindings/mailbox/cvitek-mailbox.h>
10+
#endif
11+
12+
13+
&mipi_rx{
14+
snsr-reset = <&portc 17 GPIO_ACTIVE_LOW>, <&portc 17 GPIO_ACTIVE_LOW>, <&portc 17 GPIO_ACTIVE_LOW>;
15+
};
16+
17+
&dac{
18+
/delete-property/ mute-gpio-l;
19+
/delete-property/ mute-gpio-r;
20+
};
21+
22+
&i2c0 {
23+
status = "disabled";
24+
};
25+
26+
&spi3 {
27+
status = "okay";
28+
29+
spidev@0 {
30+
status = "okay";
31+
};
32+
};
33+
34+
&usb {
35+
vbus-gpio = <&portb 6 0>;
36+
};
37+
38+
&wifisd {
39+
status = "okay";
40+
cap-sd-highspeed;
41+
sd-uhs-sdr25;
42+
sd-uhs-ddr50;
43+
sd-uhs-sdr104;
44+
min-frequency = <400000>;
45+
max-frequency = <187500000>;
46+
};
47+
48+
&wifi_pin {
49+
compatible = "cvitek,wifi-pin";
50+
poweron-gpio = <&porta 15 GPIO_ACTIVE_HIGH>;
51+
wakeup-gpio = <&porte 7 GPIO_ACTIVE_HIGH>;
52+
};
53+
54+
&uart4 {
55+
status = "okay";
56+
};
57+
58+
&soc_thermal_0 {
59+
cooling-maps {
60+
map0 {
61+
trip = <&soc_thermal_trip_0>;
62+
cooling-device = <&cv181x_cooling THERMAL_NO_LIMIT 1>;
63+
};
64+
map1 {
65+
trip = <&soc_thermal_trip_1>;
66+
cooling-device = <&cv181x_cooling THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
67+
};
68+
};
69+
};
70+
71+
&porta {
72+
wifi_pwr {
73+
gpio-hog;
74+
gpios = <15 GPIO_ACTIVE_HIGH>;
75+
output-high;
76+
};
77+
};
78+
79+
/ {
80+
model = "Milk-V DuoS";
81+
82+
/delete-node/ wifi_pin;
83+
/delete-node/ bt_pin;
84+
85+
leds {
86+
compatible = "gpio-leds";
87+
led0 {
88+
gpios = <&porta 29 GPIO_ACTIVE_LOW>;
89+
linux,default-trigger = "heartbeat";
90+
function = LED_FUNCTION_HEARTBEAT;
91+
label = "blue";
92+
};
93+
led1 {
94+
gpios = <&porte 6 GPIO_ACTIVE_HIGH>;
95+
linux,default-trigger = "netdev";
96+
function = LED_FUNCTION_HEARTBEAT;
97+
label = "orange";
98+
};
99+
led2 {
100+
gpios = <&porte 8 GPIO_ACTIVE_HIGH>;
101+
linux,default-trigger = "stmmac-0:00:link";
102+
function = LED_FUNCTION_HEARTBEAT;
103+
label = "green";
104+
};
105+
};
106+
107+
108+
#ifndef __UBOOT__
109+
mbox: mbox@0x01900000 {
110+
compatible = "cvitek,sg200x-mailbox";
111+
reg = <0x0 0x01900000 0x0 0x1000>;
112+
reg-names = "mailbox";
113+
interrupts = <101 IRQ_TYPE_LEVEL_HIGH>;
114+
interrupt-parent = <&plic0>;
115+
status = "okay";
116+
#mbox-cells = <4>;
117+
};
118+
119+
cv181x-c906_1 {
120+
compatible = "cvitek,cv181x-c906_1";
121+
memory-region = <&fast_image &vdev0vring0 &vdev0vring1 &vdev0buffer>;
122+
firmware = "c906-mcu.elf";
123+
resets = <&rst RST_C906_1>;
124+
reset-names = "sw_reset";
125+
clocks = <&clk CV181X_CLK_C906_1>;
126+
clock-names = "clk_c906_1";
127+
mboxes = <&mbox 0 CVITEK_MBOX_DIRECTION_TX CVITEK_MBOX_C906_1 1>, <&mbox 1 CVITEK_MBOX_DIRECTION_RX CVITEK_MBOX_C906_1 1>;
128+
mbox-names = "vq_tx", "vq_rx";
129+
status = "okay";
130+
};
131+
#endif
132+
133+
};
134+

0 commit comments

Comments
 (0)