summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c4
-rw-r--r--arch/arm/include/asm/arch-sunxi/gpio.h1
-rw-r--r--include/configs/sunxi-common.h7
3 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 84cdc3ec78..1bc71af863 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -96,6 +96,10 @@ static int gpio_init(void)
sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL_R_UART);
sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL_R_UART);
sunxi_gpio_set_pull(SUNXI_GPL(3), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN9I)
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(12), SUN9I_GPG_UART4);
+ sunxi_gpio_set_cfgpin(SUNXI_GPG(13), SUN9I_GPG_UART4);
+ sunxi_gpio_set_pull(SUNXI_GPG(13), SUNXI_GPIO_PULL_UP);
#else
#error Unsupported console port number. Please fix pin mux settings in board.c
#endif
diff --git a/arch/arm/include/asm/arch-sunxi/gpio.h b/arch/arm/include/asm/arch-sunxi/gpio.h
index 649f6cd840..98c00d84aa 100644
--- a/arch/arm/include/asm/arch-sunxi/gpio.h
+++ b/arch/arm/include/asm/arch-sunxi/gpio.h
@@ -181,6 +181,7 @@ enum sunxi_gpio_number {
#define SUN8I_GPG_SDC1 2
#define SUN6I_GPG_TWI3 2
#define SUN5I_GPG_UART1 4
+#define SUN9I_GPG_UART4 2
#define SUN4I_GPH_SDC1 5
#define SUN6I_GPH_TWI0 2
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index a3994e1a6a..5498ac6dcf 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -50,8 +50,13 @@
# define CONFIG_SYS_NS16550_COM2 SUNXI_UART1_BASE
# define CONFIG_SYS_NS16550_COM3 SUNXI_UART2_BASE
# define CONFIG_SYS_NS16550_COM4 SUNXI_UART3_BASE
+#if defined(CONFIG_MACH_SUN9I)
+# define CONFIG_SYS_NS16550_COM5 SUNXI_UART4_BASE
+# define CONFIG_SYS_NS16550_COM6 SUNXI_UART5_BASE
+#else
# define CONFIG_SYS_NS16550_COM5 SUNXI_R_UART_BASE
#endif
+#endif
/* CPU */
#define CONFIG_DISPLAY_CPUINFO
@@ -264,6 +269,8 @@ extern int soft_i2c_gpio_scl;
#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
#define OF_STDOUT_PATH "/soc@01c00000/serial@01f02800:115200"
+#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN9I)
+#define OF_STDOUT_PATH "/soc/serial@07001000:115200"
#else
#error Unsupported console port nr. Please fix stdout-path in sunxi-common.h.
#endif