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.

BusAddressValue
SYS_GRF SOC_CON60xFD58C3180x40004000
BUS_IOC_GPIO4D IOMUX_SEL_L0xFD5F80980xFF005500
# 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 w

You find more information on wiring in our forum discussion.