Implementation of common code as taken from RK, refers to
https://git.seco.com/edgehog/bsp/rockchip/u-boot-seco-rk/-/commit/9efe1b540985b0553c5465be41821a32d3fbf490
and its previous commits