RK3588 bare metal bringup
Everything needed to bring up common hardware.
You will need the official rockchip-developed ddr image: https://github.com/rockchip-linux/rkbin/blob/master/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin
See bootrom.md
Secure GRF init
A small sequence (100LoC) is needed to mark needed memory regions as secure. This is done primarily through the main SGRF (Secure General Register File). There are actually a few SGRFs, and they are all undocumented. This is necessary to use the VOP and setup a framebuffer.
I tried to drop down into EL2 at this point, but had issues. When I set SCR_EL3.NS to 1, it gave me a bunch serror exceptions (ESR: 0xBE000011).
This only happened when I was booting over OTG, and not emmc... I think there's some memory security attribute stuff going on and causing issues.
PMU
A few power domains need to be brought up in order to make some hardware accessible. These onboard devices are completely powered off on reset. If you try to read/write to their MMIO addresses, you will get a translation error.
- PD_PHP
- PD_PCIE
- PD_GMAC
- PD_SECURE
- PD_VOP
- PD_VO0
- PD_VO1
Powering on a power domain is fairly well documented in the TRM.
Other hardware such as GIC, UART, and other essentials belong to the ALIVE power domain. It is powered up on reset, and cannot be powered off.