Draft: rockchip: SPL DFU and ramboot support
This PR is containing work from FUKAUMI Naoki naoki@radxa.com and Jonas Karlman jonas@kwiboo.se to get SPL DFU and ramboot support to u-boot for Rockchip devices. It is also containing some backports to make it apply / build / work.
- The Ramboot patches have been sent at https://patchwork.ozlabs.org/project/uboot/cover/20250220231358.432367-1-jonas@kwiboo.se/ but due to dependencies, this PR is using https://source.denx.de/u-boot/contributors/kwiboo/u-boot/-/commits/ramboot-v1.
- The SPL DFU patches (which have some common dependencies with the ram boot ones) are from https://patchwork.ozlabs.org/project/uboot/list/?series=443761
I've tested them on rk3399 (roc-rk3399-pc) and rk3588 (rock5c). Due to the way the ramboot patches are working, it's not possible to boot a linux kernel, without an extra patch (https://github.com/u-boot/u-boot/commit/a6e85a35b50ade7df5f32092c1cc05ade303a22a). Basically, in ramboot, the uboot SPL concatenated with the u-boot proper into one binary, uploaded with maskrom at ram address 0. Due to the size, it's overwriting the ATAGS provided by the rockchip TPL, leading to boot issues on rk3588.
To test on rock5c, I had to backport rock5c patches from u-boot upstream and https://patchwork.ozlabs.org/project/uboot/patch/01020195cdc6e188-48dacf9c-cfa6-421c-aab3-61d989bc7c78-000000@eu-west-1.amazonses.com/. I've not merged them in this PR as it's not directly related to SPL DFU and ramboot (and my patch to enable the gadget on rock5c is not expected to be merged as-is).