Sipeed Lichee RV

From linux-sunxi.org
Jump to navigation Jump to search
Sipeed Lichee RV
Lichee-rv.jpeg
Manufacturer Sipeed
Dimensions 46.2mm x 25.0mm
Release Date November 2021
Website official documantation Product Page
Specifications
SoC D1 @ 1.0Ghz
DRAM 512MiB DDR3 @ 792MHz, 1×H5TQ4G63EFR
Power DC 5V @ 2A (via OTG Type-C connector)
Features
Video SPI LCD (optional); via expansion board: HDMI (Type A - full), LVDS
Audio via expansion board: audio, HDMI, I2S
Network via expansion board: Realtek RTL8723DS
Storage µSD
USB 1 USB Type-C OTG
Other Power LED, system LED, OK & FEL buttons
Headers 4-pin UART DEBUG

This page needs to be properly filled according to the New Device Howto and the New Device Page guide.

The test pin near the power LED is RST (reset).

Software Support

Linux and U-Boot upstreaming are in progress. See Allwinner_Nezha#Manual_build for build instructions. For U-Boot, use the lichee_rv_dock_defconfig configuration.

The board mainline support is added in Linux-next in february, 2023 (ready for Linux-6.3). It can be installed using last linux-6.2-rc + linux-next patch.

FEL mode

The FEL button triggers FEL mode.

The xfel tool has support for the D1 chip. Currently sunxi-fel (from Sunxi-tools) lists the SoC as unknown.

UART

UART connectors holes at the left of the USB-C connector

The board has 4 pins holes at left of USB-C port for UART and is sold with the 4 pins to be soldered (not needed if you have the Dock). The pins name are wrote at the back of the board. from Top to bottom:

  • 5V
  • Ground
  • Rx
  • Tx

This board can be powered by UART, by plugin a 5V pin. See the UART Howto for general usage of UART.

The pins should be soldered with pins at top top still be accessible when using the LicheeRV Dock.

Board can be powered by UART alone or by USB-C port.

Pins

Pinout of the M.2 B-Key 67×2 pins connectors of the SoM is described in schematic file

User LED

The user LED on the board can be controlled via GPIO65. The SoC include an RGB LED controller (led-controller@2008000).

Optional screen

There is an optional 1.14" 135×240 SPI LCD screen coming with the board. It uses Sitronix ST7789V controller (Datasheets). There is the panel_Sitronix_ST7789V driver included in mainline.

Pinout of the LED socket, after schematic file are :

  • SCK = PC2/LCD_SCK
  • MOSI = PC4
  • RS = PC5
  • CS = PC3
  • RESET = PC6
  • LEDA (screen backlight) = PD18

Another driver is included in Linux mainline in FBTFT for using RGB port with framebuffer. But this staging driver depend on FBTFT external source that has not been updated since August, 2021, and isn't compatible with kernel >=6.x. Looks like DRM replace progressively fb, a drmfb compatibility layer can be used if needed.

There is also a TinyDRM version of the driver, it was included in FBTFT, and is now include by default (at least on Linux 6.x)

For information, the connector and driver are compatibles between Sipeed LicheeRV and Sipeed Longan Nano, just need to adapt the resolution. It can be helpful for tests in case of problem with screen.

After official documentation about screen, the board support the following screens:

  • SPI screen 1.14 inch(TODO)
  • RGB screen 4.3 inch 480x272;5.0 inch 800x480;
  • RGB+SPI screen 4.0 inch 480x480(st7701s); 4.0 inch 720x720(nv3052c)
  • MIPI screen 8.0 inch 1280x720(ILI9881C)
cat /sys/class/disp/disp/attr/sys

screen 0:
de_rate 300000000 hz, ref_fps:60
mgr0: 480x480 fmt[rgb] cs[0x204] range[full] eotf[0x4] bits[8bits] err[0] force_sync[0] unblank direct_show[false] iommu[1]
dmabuf: cache[0] cache max[0] umap skip[0] overflow[0]
    lcd output	backlight( 50)	fps:59.5	esd level(0)	freq(60)	pos(0)	reset(0)	 480x 480
    err:0	skip:184	irq:230715	vsync:0	vsync_skip:0
   BUF    enable ch[1] lyr[0] z[16] prem[N] a[globl 255] fmt[  0] fb[ 480, 480; 480, 480; 480, 480] crop[   0,   0, 480, 480] frame[   0,   0, 480, 480] addr[ffe00000,       0,       0] flags[0x       0] trd[0,0]

Carrier Boards

Lichee RV Dock

oreboot + RustSBI + LinuxBoot

This small board has a built-in mic, speaker port, reset button, one extra button, HDMI and USB ports, an FPC connector for a mic array, a 40 pin HAT style GPIO header, and an option for a Wi-Fi add-on SoM plus the corresponding antenna port.

The two pins at left are 5V. the most left pin of the lower row is 3.3V

The Dock has UART pins connected to the CPU (mirror) allowing to debug without soldering. For the upper row: 5V, 5V, GND, TX, RX, TP_RST, GND

There are solder pads for an optional SPI flash (NAND or NOR) below the module.

Lichee RV Dock Pro

The Pro variant of the Dock is a bit larger in height, with a 16MB SPI NOR flash included, display connectors instead of the mic array connector, and an extra USB-C port for debugging via UART and/or JTAG.

Behind the debug USB port sits a Bouffalo Lab BL702, listed as 42bf:b210 Bouffalo C-Sky CKLink-Lite. It offers a ttyACM device on Linux to connect to via Minicom etc.

References: stock firmware boot log

Lichee RV 86 Panel

The Lichee RV 86 Panel is a box with a 480×480 or 720x720 LCD touchscreen panel, ethernet with power supply, optional Wi-Fi, a speaker, and GPIOs exposed at the back for adding a header.

Lichee RV 86 Panel

jeadock

This is a custom board, not officially for sale, but open hardware. For the board design and schematic, see repository, and read the blog post on the design process.

Boot and system support

Pre-made images

Login/pass: root / archriscv;
 git clone https://github.com/miloserdev/sunxi_licheerv.git
 cd ./sunxi_licheerv
 ./create_sd.sh /dev/mmcblk0
Login/pass: sipeed / licheepi; WiFi can be set up by Connman (there are reports of transient lock-ups on associating to encrypted WiFi)
16GB Image, if you use a larger microSD don't repair the GPT or you will not boot anymore!!!
The partition number 8 can be deleted with fdisk or parted, and then partition 7 grown with parted to the whole microSD card, and filesystem itself with resize2fs. System still boot and work after this modification.
sha256sum of the xz: cf73baf3ed67d480e7606c666ccb81fce21295ba8fbba10e0ad86939065be6ffw
Asciinema record of the boot sequence (on Asciinema) with LicheeRV Dock
  • Ubuntu image displays the TTY on the Lichee RV LCD screen, keyboard can be used on Dock USB port. Archive include a readme about how to make the microSD card. In some cases, 80MB (163840) should be used instead of 40MB (81920, as wrote on the README) as start of the primary partition.
Login/Pass: root / 2183abc
sha256sum of the tgz: 4a414a36ba5ae8000bd2f8ee088ea399b502527e1868662427bc00676d65ca79
asciinema record of the boot sequence (on Asciinema)
  • There is a working Debian image "RVBoards_D1_Debian_lxde_img_linux_v0.4.1.img.zip" that can be dd on a 32GB microSD card and boot on LicheeRV with several drivers working including the optional LCD screen (wait 2 or 3 minutes if you don't have serial), detect HDMI, WiFi, UVC Video of the Dock and wait for ethernet (to be investigated). It is mirrored here from here original source The 6.1 version need the PhoenixCard tool.
id/pass: root / rvboards
SHA256sum: bf3da52b179f03fd46c16d44d4f7ae71b53745ce4f260e13e03e48e1c626c461
kernel: Linux RVBoards 5.4.61 #12 PREEMPT Thu Jun 3 08:39:01 UTC 2021 riscv64 GNU/Linux config.gz
Asciinema record of the boot sequence (on Asciinema) with LicheeRV Dock
  • Minimal console-only (no hdmi due to closed-source kernel module) Debian ddimage with updated kernel/u-boot, wifi support, and a sane partition layout. Available here
Users: root / sunxi or user / sunxi
SHA256sum: e5254b7815516c10b59d54e5a9247241502e676014c506eb2cbf01b9f9b508cd
4GB image, compressed to 340MB, resizable with resize2fs
kernel 5.14.0-rc4-nezha from https://github.com/Cezarus27/linux/tree/riscv/d1-wip with the following patch and .config available in /lib/modules patch
  • Clean (i.e. no Android partition nonsense) Debian image with functioning HDMI (LXDE desktop) and 5.18 smaeul kernel (cc63db754b21) here; Warning: if you upgrade this image to the latest Debian Sid as of 2024-05, some programs will start failing with an "Illegal instruction" error, e.g. shared-mime-info 2.4, and importantly the apt-get HTTP backend, so it becomes problematic to upgrade/downgrade after that.
kernel config here
id/pass: root / sunxi
SHA256sum: 503d91fbc73ae067b9685a327797d92f85369f6a408f71b8cc00eae49ca62f9c
8GB image, compressed to 1.7GB, flash with zstdcat licheerv-debian-clean-hdmi.zst > /dev/mmcblk0
image contains gparted for resizing to the full size of your card

Images builder

  • Arch linux: Sehraf Arch Image Builder - Last mainline kernel with Sameul patch (5.18.0-rc4-gf4bce410a6b4 has HDMI output, not more recent ones, probably due to some missing parameters in config file)
  • Debian: Debian D1 build - Last mainline kernel with Sameul patch
  • NixOS: NixOS Image Builder
  • LicheeRVBSPRebuild builds just the bootloader and kernel with patches from the Sipeed SDK. This can be combined with a Linux rootfs like Arch to create a full Linux system
  • SkiffOS: SkiffOS Image Builder builds a fully-featured system including the bootloader, kernel, userspace, and with optional Docker support.

Building mainline kernel

The first script of Archlinux Image Builder create automatically the last patched Sameul kernel, with working WiFi, HDMI, usb ethernet dongles, and fully open source boot parts.

  • Bottier build mainline kernel next, and allow to tune it by pass, and to install it on a card already built with Archlinux Image Builder (currently most things work but HDMI)

Sipeed Mirrors

Other Resources

Pictures