diff options
author | Philipp Tomsich <philipp.tomsich@theobroma-systems.com> | 2016-04-06 14:36:56 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2016-09-18 13:45:14 +0200 |
commit | 6ed4d8a8686a0e8da9806a42dc90f1f0b7a0c160 (patch) | |
tree | e20624244712e2302a2eae6d83e31a8cd1267bb6 /arch | |
parent | 4f105e8cf0dd6a2469701d3d66f664ad30a8f010 (diff) |
sunxi: Support UART4 on A80 (sun9i) as system console
* arch/arm/cpu/armv7/sunxi/board.c (gpio_init): Configure UART4
pins and function for CONFIG_CONS_INDEX == 5 (UART4) on
CONFIG_MACH_SUN9I
* include/configs/sunxi-common.h: Define CONFIG_SYS_NS16550_COM5
and CONFIG_SYS_NS16550_COM6 for CONFIG_MACH_SUN9I to refer to
UART4 and UART5, respectively. Define OF_STDOUT_PATH for
CONFIG_CONS_INDEX == 5 (UART4) on CONFIG_MACH_SUN9I
* arch/arm/include/asm/arch-sunxi/gpio.h (SUN9I_GPG_UART4): Define.
Validated against A80-Q7 module.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/board.c | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-sunxi/gpio.h | 1 |
2 files changed, 5 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 |