summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/gru/bootblock.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/bootblock.c b/src/mainboard/google/gru/bootblock.c
index bdc75dd589..1a99e8451c 100644
--- a/src/mainboard/google/gru/bootblock.c
+++ b/src/mainboard/google/gru/bootblock.c
@@ -14,10 +14,23 @@
*
*/
+#include <arch/io.h>
#include <bootblock_common.h>
+#include <soc/grf.h>
+#include <console/console.h>
void bootblock_mainboard_early_init(void)
{
+ if (IS_ENABLED(CONFIG_DRIVERS_UART)) {
+ _Static_assert(CONFIG_CONSOLE_SERIAL_UART_ADDRESS == UART2_BASE,
+ "CONSOLE_SERIAL_UART should be UART2");
+
+ /* iomux: select gpio4c[4:3] as uart2 dbg port */
+ write32(&rk3399_grf->iomux_uart2c, IOMUX_UART2C);
+
+ /* grf soc_con7[11:10] use for uart2 select */
+ write32(&rk3399_grf->soc_con7, UART2C_SEL);
+ }
}
void bootblock_mainboard_init(void)