// SPDX-License-Identifier: GPL-2.0-only #include #include #include #include #include #include #include #include extern char __dtb_rk3568_rock_3a_start[]; static noinline void rk3568_start(void) { void *fdt = __dtb_rk3568_rock_3a_start; /* * Enable vccio4 1.8V and vccio6 1.8V * Needed for GMAC to work. * FIXME: This is done by the io-domain driver as well, but there * currently is no mechanism to make sure the driver gets probed * before its consumers. Remove this setup once this issue is * resolved. */ writel(RK_SETBITS(0x50), 0xfdc20140); if (current_el() == 3) { rk3568_lowlevel_init(); rk3568_atf_load_bl31(fdt); /* not reached */ } barebox_arm_entry(RK3568_DRAM_BOTTOM, 0x80000000 - RK3568_DRAM_BOTTOM, fdt); } ENTRY_FUNCTION(start_rock3a, r0, r1, r2) { /* * Image execution starts at 0x0, but this is used for ATF and * OP-TEE later, so move away from here. */ if (current_el() == 3) relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS); else relocate_to_current_adr(); setup_c(); rk3568_start(); }