Difference between revisions of "Quartz64 Development"
(→Upstreaming Status: update device tree status) |
(→Upstreaming Status: VOP2 VOP2 VOP2 VOP2 VOP2 YOOOOOO) |
||
Line 12: | Line 12: | ||
|- | |- | ||
! scope="row" | Video Output | ! scope="row" | Video Output | ||
| colspan="2" style="background: | | colspan="2" style="background:LightYellow; text-align:center;"|In review<sup>[https://patchwork.kernel.org/project/linux-rockchip/list/?series=581709]</sup> | ||
| <code>rockchipdrm/VOP-v2</code> | | <code>rockchipdrm/VOP-v2</code> | ||
| | | |
Revision as of 14:56, 17 November 2021
This page documents the current status of software support for the Quartz64 single-board computer, and provides links to resources to help prospective contributors get started. Information is kept current on a best-effort basis as various patches get accepted into the kernel.
Overview
Upstreaming Status
Function | Status | Component | Notes | |
---|---|---|---|---|
Video Output | In review[1] | rockchipdrm/VOP-v2
|
||
3D Acceleration | Linux Mainline | Upstream Mesa | panfrost
|
|
Video Decode | Linux Staging | Not in ffmpeg[2] | hantro-vpu , using v4l2-requests
|
Necessary device tree changes in review |
Audio | Linux Mainline | rockchip-i2s-tdm
|
As of 5.16[3] | |
Linux Mainline | rockchip-spdif
|
As of 5.15[4] | ||
Linux Mainline | rk817-codec
|
As of 5.14 | ||
u-boot | Waiting on ATF sources | |||
Device Tree | Linux Mainline | Quartz64 Model A | As of 5.16[5] | |
Needs submitting | Quartz64 Model B | |||
Needs submitting | SOQuartz | |||
Needs writing | PineNote | |||
Gigabit Ethernet | Linux Mainline | rk3566-gmac
|
As of 5.14[6] | |
Linux Mainline | yt8511-phy
|
As of 5.14[7] | ||
IOMMU | Linux Mainline | rockchip-iommu
|
As of 5.14[8] | |
GPIO | Linux Mainline | gpio-rockchip
|
As of 5.15[9] | |
pinctrl | Linux Mainline | |||
Thermal Regulation | Linux Mainline | rockchip-thermal
|
As of 5.14[10] | |
PCIe | Linux Mainline | pcie-dw-rockchip
|
As of 5.15[11] | |
Power Management | Linux Mainline | rockchip-pm-domain
|
As of 5.14[12] | |
Voltage Control | Linux Mainline | rk3568-pmu-io-voltage-domain
|
As of 5.15[13] | |
SPI | Linux Mainline | spi-rockchip
|
As of 5.14[14] | |
Battery | In review[15] | rk817-charger
|
In the BSP tree this is handled by rk817_battery.c and rk817_charger.c | |
Microphone | Linux Mainline | rockchip-saradc
|
As of 5.15[16]. Headphone jack mic seems to connect to SARADC_VIN2_HP_HOOK , so I'm pretty sure that the dtsi and driver changes are needed for that mic to work
| |
USB 2.0 | In review[17] | rockchip-usb2phy
|
||
e-Ink | Needs reversing | ebc-dev ?
|
See RK3566 EBC Reverse-Engineering | |
Combo PHY | In review[18] | naneng-combphy
|
Current Status
The following sections give an overview over the current status of different parts of the board. Some parts are waiting on a driver to be written or ported, others only need various adjustments.
According to pgwipeout, I/O device performance is within expected ranges now.
Working
- eMMC
- SDMMC0 (SD cards)
- GMAC (Gigabit Ethernet)
- USB 2.0
- SATA 2
- SATA 3
- UART
- UART 0 (Pi-bus)
- UART 1 (Bluetooth)
- UART 2 (Pi-bus, debug)
- Video Decode
- VP8
- Battery
Partially Working
- PCI-Express Controller — everything but devices that need cache coherency (e.g. dGPUs) should work
- User:CounterPillow noticed some weirdness with NVMe devices disconnecting during heavy write operations, needs investigating
- SDMMC1 (Wi-Fi) — AP6256 working, BL602 needs some work to make it flash firmware
- I2C — works but is not yet exposed to the Pi-bus
- GIC — needs errata published by Rockchip to get upstream to add device-specific workarounds[19]
- Audio
- Analog audio works
- SPDIF works
- no HDMI yet
Confirmed Broken
- USB 3.0 — only works with very short cables and depends on the device. This is due to a hardware design issue relating to the coupling capacitors needed for SATA, which shares the same lines as USB 3.0.
- Hardware design changes have been suggested to engineers, it's in their hands now.
Needs Testing
- GPU — need a VOP-v2 DRM driver to get display output
- E-Paper — needs EBC driver
- SPI
TODO
ebc-dev Reverse Engineering and Development
The driver for the eInk panel needs to both be reverse engineered and then rewritten as C. In its current form, it is mostly an assembly dump produced by gcc with debug symbols. See RK3566 EBC Reverse-Engineering for details.
VOP2 Porting
The VOP2 portion of the rockchip-drm
driver needs to be ported from the downstream kernel. This driver enables video output. Preliminary research has determined that this is a fairly big task.
Collabora has an unpolished forward port that has some issues with HDMI, it can be found here: https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/tree/5.10_for_rockchip
pgwipeout has a branch for initial vop2 work/testing, very rough around the edges and does not successfully probe yet.
Investigate MCU
The RK3566 comes with an integrated RISC-V microcontroller (MCU). It communicates with the A55 host through the Mailbox system driven by the rockchip-mailbox driver. Since this MCU would be quite useful for things such as low power standby mode, investigating how it can be turned on and have firmware flashed to it should greatly enhance the power saving features of the PineNote.
Mainline U-Boot Work
Currently, mainline U-Boot does not have support for the RK3566 SoC used on the Quartz64. That's why we currently use the "downstream" Rockchip U-Boot, which is based on an old version of U-Boot and contains vendor specific patches that have not undergone the same level of code review as they'd have done had they been submitted upstream.
While the lack of ATF sources mean that using mainline U-Boot would still require the use of Rockchip provided binaries for the firmware, the mainline U-Boot works needs to be done eventually anyway, and even with Rockchip blobs, a more modern version of U-Boot will be much nicer to use.
Someone needs to get on the task of investigating what minimally needs to be ported to get the board booting with mainline U-Boot, port those changes, and submit them for review.
List of Useful Resources for this Task
- Downstream Rockchip U-Boot repository with Quartz64 specific patches: https://gitlab.com/pgwipeout/u-boot-rockchip/-/tree/quartz64
- Mainline Rockchip custodian U-Boot repository: https://source.denx.de/u-boot/custodians/u-boot-rockchip
- U-Boot Mailing List: https://lists.denx.de/listinfo/u-boot
Resources
Repositories
- pgwipeout's kernel tree
- BSP based development effort for SPL/U-Boot and Linux
- Image CI pipeline aimed at developers
- Rockchip U-Boot
- Downstream rockchip-linux kernel tree
Other
- Rockchip-SoC Patchwork Page
- Rockchip Kernel Mailing List Archive
Board/SoC Documentation
Booting
Boot Order
The RK3566 boot ROM will search for a valid ID BLOCK in the following order on the support boot media:
- SPI NOR flash
- SPI NAND flash
- SD-Card
- eMMC
... if this fails, the boot ROM will initialize the USB0 port and wait for a connection from the Rockchip flash/boot tools.
Bootloader Flashing
As per pgwipeout's commit message:
- Make a partition named
uboot
as partition number 1 at 8 MiB to 16 MiB dd if=idblock.bin of=/dev/<mmc/sd> seek=64
dd if=uboot.img of=/dev/<mmc/sd>1