Hardware Debugging
The RK3588 SoC shares the GPIO pins of the SD card reader with the Serial Wire Debug Port (SW-DP), multiplexing the SDMMC pins DATA2 and DATA3 with TCK and TMS.
We use a Micro SD breakout board that exposes the SD card pins, allowing us to connect a hardware debugger to the board.
A successful connection requires four signals: TCK, TMS, VTref, and GND.
We used DSTREAM-ST v0197A and Arm Development Studio and had limited success with ST-LINK v2 and openocd.
The table below lists the IO memory to enable hardware debugging on the SoC. We write to these locations in U-Boot and in Linux. To debug Linux in normal world EL2, we further disable all SDMMC references in the kernel’s device tree.
| Bus | Address | Value |
|---|---|---|
| SYS_GRF SOC_CON6 | 0xFD58C318 | 0x40004000 |
| BUS_IOC_GPIO4D IOMUX_SEL_L | 0xFD5F8098 | 0xFF005500 |
# Run on RK3588 hypervisor after boot
sudo busybox devmem 0xfd58c318 w
sudo busybox devmem 0xfd58c318 w 0x40004000
sudo busybox devmem 0xfd58c318 w
sudo busybox devmem 0xFD5F8098 w
sudo busybox devmem 0xFD5F8098 w 0xFF005500
sudo busybox devmem 0xFD5F8098 wYou find more information on wiring in our forum discussion.
- Datasheets
- SD Card breakout
CONFIG_OPENCCA_HW_DEBUGin opencca-linux