xref: /OK3568_Linux_fs/u-boot/arch/arm/mach-rockchip/rk3036/rk3036.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2017 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 #include <asm/io.h>
7 #include <asm/arch/bootrom.h>
8 #include <asm/arch/hardware.h>
9 #include <asm/arch/grf_rk3036.h>
10 #define GRF_BASE	0x20008000
11 
12 #ifdef CONFIG_SPL_BUILD
arch_cpu_init(void)13 int arch_cpu_init(void)
14 {
15 	return 0;
16 }
17 #endif
board_debug_uart_init(void)18 void board_debug_uart_init(void)
19 {
20 	struct rk3036_grf * const grf = (void *)GRF_BASE;
21 	/*
22 	 * NOTE: sd card and debug uart use same iomux in rk3036,
23 	 * so if you enable uart,
24 	 * you can not boot from sdcard
25 	 */
26 	rk_clrsetreg(&grf->gpio1c_iomux,
27 		     GPIO1C3_MASK << GPIO1C3_SHIFT |
28 		     GPIO1C2_MASK << GPIO1C2_SHIFT,
29 		     GPIO1C3_UART2_SOUT << GPIO1C3_SHIFT |
30 		     GPIO1C2_UART2_SIN << GPIO1C2_SHIFT);
31 
32 }
33