]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sunxi: add support for UART2 on A23/A33
authorLaurent Itti <laurentitti@gmail.com>
Wed, 6 May 2015 00:02:00 +0000 (17:02 -0700)
committerHans de Goede <hdegoede@redhat.com>
Tue, 19 May 2015 16:37:30 +0000 (18:37 +0200)
Add support for UART2 (2-pin version but note that RTS/CTS pins are available
pn that port for possible future use), can be selected in config
by using CONFIG_CONS_INDEX=3

Signed-off-by: Laurent Itti <laurentitti@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/include/asm/arch-sunxi/gpio.h
include/configs/sunxi-common.h

index 6718ae2205d8bf7dc4aca90bd50c25b2048a3fc0..e6730c0dfa1acdb0bda88406f32de0e6c42c31ae 100644 (file)
@@ -68,6 +68,10 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
        sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
        sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
+       sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
+       sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
+       sunxi_gpio_set_pull(SUNXI_GPB(1), SUNXI_GPIO_PULL_UP);
 #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)
        sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL_R_UART);
        sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL_R_UART);
index 59d8210e88d5665a27e9c6e0be54151a81f25029..148123a87f3288c07dbf41d0fe7d115d2f47c287 100644 (file)
@@ -155,6 +155,7 @@ enum sunxi_gpio_number {
 #define SUN5I_GPB_TWI2         2
 #define SUN4I_GPB_UART0                2
 #define SUN5I_GPB_UART0                2
+#define SUN8I_GPB_UART2                2
 
 #define SUNXI_GPC_SDC2         3
 #define SUN6I_GPC_SDC3         4
index 0495dc3b8c1ea929a76963edc86242bf0697be20..f80f006e3db6fc13b3a716c39266b9b4df519554 100644 (file)
@@ -241,6 +241,8 @@ extern int soft_i2c_gpio_scl;
 #endif
 #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
 #define OF_STDOUT_PATH         "/soc@01c00000/serial@01c28400:115200"
+#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
+#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"
 #else