1 /* 2 * Copyright (c) 2016 Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #include <common.h> 8 #include <asm/io.h> 9 #include <asm/arch/hardware.h> 10 #include <asm/arch/periph.h> 11 #include <asm/arch/grf_rk3066.h> 12 13 #define GRF_BASE 0x20008000 14 board_debug_uart_init(void)15void board_debug_uart_init(void) 16 { 17 struct rk3066_grf * const grf = (void *)GRF_BASE; 18 19 /* Enable early UART on the RK3066 */ 20 rk_clrsetreg(&grf->gpio1b_iomux, 21 GPIO1B1_MASK | GPIO1B0_MASK, 22 GPIO1B1_UART2_SOUT << GPIO1B1_SHIFT | 23 GPIO1B0_UART2_SIN << GPIO1B0_SHIFT); 24 } 25 26