Mainline U-Boot 2022.04 on RockPro64 - works from SD card

Had to downgrade gcc to version 11 on Arch ARM (otherwise ATF won't build), then (using git repos):

arm-trusted-firmware $ git checkout v2.7.0
arm-trusted-firmware $ find . -name '*.bin' -exec rm -vf '{}' \;
arm-trusted-firmware $ make PLAT=rk3399 bl31
arm-trusted-firmware $ cd ../u-boot
u-boot $ git checkout v2022.04
u-boot $ make mrproper && make rockpro64-rk3399_defconfig
u-boot $ make BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf

Create a GPT partition on SD card to hold boot files:

├── boot_arch
│   ├── dtbs/
│   ├── Image
│   └── initramfs-linux.img
└─── extlinux
    └── extlinux.conf

Write U-boot image to the same SD card (it will not break GPT) - directions in doc/README.rockchip in U-boot source tree, "Booting from an SD card on RK3399", Option 3. Works fine.

SPI flash doesn't work though, sf probe complains:

unrecognized JEDEC id bytes: ff, ff, ff