diff options
author | Rouven Czerwinski <rouven@czerwinskis.de> | 2023-03-30 18:11:01 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-04-05 08:49:07 +0200 |
commit | 7bf493b1a646e1ee2e88cc7d41b462a6714eafee (patch) | |
tree | cc74fa4afb2b621c66c2036edf49607c6ebd7fc6 /arch/arm/boards/radxa-cm3/lowlevel.c | |
parent | dad8498490d40594d0c8d4566057406bf2d9963a (diff) | |
download | barebox-7bf493b1a646e1ee2e88cc7d41b462a6714eafee.tar.gz |
arm: rockchip: add support for CM3 on IO board
Working:
- RKBIN DDR training (rk3566_ddr_1056MHz_v1.13.bin)
- RKBIN TF-A (v1.34) from RKBIN
- Environment storage
- DHCP, ping and link detection
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Link: https://lore.barebox.org/20230330161101.58529-1-r.czerwinski@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/radxa-cm3/lowlevel.c')
-rw-r--r-- | arch/arm/boards/radxa-cm3/lowlevel.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/boards/radxa-cm3/lowlevel.c b/arch/arm/boards/radxa-cm3/lowlevel.c new file mode 100644 index 0000000000..e1b453f21f --- /dev/null +++ b/arch/arm/boards/radxa-cm3/lowlevel.c @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0-only +#include <common.h> +#include <asm/barebox-arm.h> +#include <mach/rockchip/hardware.h> +#include <mach/rockchip/atf.h> +#include <debug_ll.h> + +extern char __dtb_rk3566_cm3_io_start[]; + +ENTRY_FUNCTION(start_radxa_cm3_io, r0, r1, r2) +{ + /* + * 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); + + putc_ll('>'); + + if (current_el() == 3) + relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS); + else + relocate_to_current_adr(); + + setup_c(); + + rk3568_barebox_entry(__dtb_rk3566_cm3_io_start); +} |