Index: bsps/arm/raspberrypi/console/console-config.c
===================================================================
--- bsps/arm/raspberrypi/console/console-config.c	(revision c344e5828c3e8447a6164402f5786c8b0fbfb6a2)
+++ bsps/arm/raspberrypi/console/console-config.c	(revision f53473fa67b453813e43340fb654385b621c07c8)
@@ -25,4 +25,5 @@
 #include <libchip/serial.h>
 #include <libfdt.h>
+#include <libchip/ns16550.h>
 
 #include <bspopts.h>
@@ -35,21 +36,45 @@
 #include <bsp/fdt.h>
 #include <bsp/fatal.h>
-
-
-#define UART0     "/dev/ttyS0"
+#include <bsp/gpio.h>
+#include <bsp/rpi-gpio.h>
+
+/**
+ * UART0 - PL011
+ * UART1 - Mini UART
+ */
+#define PL011     "/dev/ttyAMA0"
+#define MINIUART  "/dev/ttyS0"
 #define FBCONS    "/dev/fbcons"
 
 arm_pl011_context pl011_context;
+ns16550_context mini_uart_context;
 
 rpi_fb_context fb_context;
 
-static void output_char_serial(char c)
+static void output_char_pl011(char c)
 {
   arm_pl011_write_polled(&pl011_context.base, c);
 }
 
+static void output_char_mini_uart(char c)
+{
+  ns16550_polled_putchar(&mini_uart_context.base, c);
+}
+
 void output_char_fb(char c)
 {
   fbcons_write_polled(&fb_context.base, c);
+}
+
+static uint8_t mini_uart_get_reg(uintptr_t port, uint8_t index)
+{
+  volatile uint32_t *val = (volatile uint32_t *)port + index;
+  return (uint8_t) *val;
+}
+
+static void mini_uart_set_reg(uintptr_t port, uint8_t index, uint8_t val)
+{
+  volatile uint32_t *reg = (volatile uint32_t *)port + index;
+  *reg = val;
 }
 
@@ -60,6 +85,50 @@
 {
   arm_pl011_context *ctx = &pl011_context;
-  rtems_termios_device_context_initialize(&ctx->base, "UART");
+  rtems_termios_device_context_initialize(&ctx->base, "PL011UART");
   ctx->regs = raspberrypi_get_reg_of_node(fdt, node);
+}
+
+static uint32_t calculate_baud_divisor(
+  ns16550_context *ctx,
+  uint32_t baud
+)
+{
+  uint32_t baudDivisor = (ctx->clock / (8 * baud)) - 1;
+  return baudDivisor;
+}
+
+static void init_ctx_mini_uart(
+  const void *fdt,
+  int node
+)
+{
+  const char *status;
+  int len;
+  ns16550_context *ctx;
+
+  memset(&mini_uart_context, 0, sizeof(mini_uart_context));
+  ctx = &mini_uart_context;
+
+  rtems_termios_device_context_initialize(&ctx->base, "MiniUART");
+
+  status = fdt_getprop(fdt, node, "status", &len);
+  if ( status == NULL || strcmp(status, "disabled" ) == 0){
+    return ;
+  }
+
+  ctx->port = (uintptr_t) raspberrypi_get_reg_of_node(fdt, node);
+  ctx->initial_baud = MINI_UART_DEFAULT_BAUD;
+  ctx->clock = BCM2835_CLOCK_FREQ;
+  ctx->calculate_baud_divisor = calculate_baud_divisor;
+  ctx->get_reg = mini_uart_get_reg;
+  ctx->set_reg = mini_uart_set_reg;
+
+  rtems_gpio_bsp_select_specific_io(0, 14, RPI_ALT_FUNC_5, NULL);
+  rtems_gpio_bsp_select_specific_io(0, 15, RPI_ALT_FUNC_5, NULL);
+  rtems_gpio_bsp_set_resistor_mode(0, 14, NO_PULL_RESISTOR);
+  rtems_gpio_bsp_set_resistor_mode(0, 15, NO_PULL_RESISTOR);
+
+  BCM2835_REG(AUX_ENABLES) |= 0x1;
+  ns16550_probe(&ctx->base);
 }
 
@@ -88,8 +157,18 @@
         return ;
       }
+    } else if ( strncmp( opt, MINIUART, sizeof(MINIUART) - 1 ) == 0) {
+      BSP_output_char = output_char_mini_uart;
+      link(MINIUART, CONSOLE_DEVICE_NAME);
+    } else if ( strncmp( opt, PL011, sizeof(PL011) - 1 ) == 0) {
+      BSP_output_char = output_char_pl011;
+      link(PL011, CONSOLE_DEVICE_NAME);
     }
-  }
-  BSP_output_char = output_char_serial;
-  link(UART0, CONSOLE_DEVICE_NAME);
+  }else {
+    /**
+     * If no command line option was given, default to PL011.
+     */
+    BSP_output_char = output_char_pl011;
+    link(PL011, CONSOLE_DEVICE_NAME);
+  }
 }
 
@@ -98,4 +177,6 @@
   static bool initialized = false;
   const void *fdt;
+  const char *console;
+  int len;
   int node;
 
@@ -105,8 +186,20 @@
 
   fdt = bsp_fdt_get();
+
   node = fdt_node_offset_by_compatible(fdt, -1, "brcm,bcm2835-pl011");
-
   init_ctx_arm_pl011(fdt, node);
 
+  node = fdt_node_offset_by_compatible(fdt, -1, "brcm,bcm2835-aux-uart");
+  init_ctx_mini_uart(fdt, node);
+
+  node = fdt_path_offset(fdt, "/aliases");
+  console = fdt_getprop(fdt, node, "serial0", &len);
+
+  if ( strcmp(console, "/soc/serial@7e215040" ) == 0) {
+    BSP_output_char = output_char_mini_uart;
+  }else {
+    BSP_output_char = output_char_pl011;
+  }
+
   initialized = true;
 }
@@ -115,5 +208,5 @@
 {
   uart_probe();
-  output_char_serial(c);
+  (*BSP_output_char)(c);
 }
 
@@ -128,8 +221,15 @@
   uart_probe();
   rtems_termios_device_install(
-    UART0,
+    PL011,
     &arm_pl011_fns,
     NULL,
     &pl011_context.base
+  );
+
+  rtems_termios_device_install(
+    MINIUART,
+    &ns16550_handler_polled,
+    NULL,
+    &mini_uart_context.base
   );
 
