summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/radxa-cm3/lowlevel.c
blob: e1b453f21f11406b72e451394b862c583d9f6882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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);
}