Change Default U-Boot Console (Naon)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Naon am387x-dm814x.png Applies to Naon
Tux.png Applies to U-Boot


In this article we'll show you how to change the UART used as U-Boot console.

Info-icon.png Please note that this will only change U-Boot user console. However we suggest to use always UART0 as U-Boot console, because this is used for serial boot option (useful in case of U-Boot recovery). See the boot sequence article for an more detailed description of serial boot Info-icon.png

Pin Mux Option

See Additional UART on Linux (Naon) article for a in-depth description of UART pin mux options.

Change U-Boot console

U-Boot console for Naon board is configured inside include/configs/naon.h file, inside the U-Boot source tree.

User should change the UART base address to the proper value to change the UART used by the bootloader. E.g. to use UART2 instead of the default UART0 apply this patch:

diff --git a/include/configs/naon.h b/include/configs/naon.h
index 00ae913..293ce12 100644
--- a/include/configs/naon.h
+++ b/include/configs/naon.h
@@ -231,7 +231,7 @@
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE    (-4)
 #define CONFIG_SYS_NS16550_CLK         (48000000)
-#define CONFIG_SYS_NS16550_COM1                0x48020000      /* Naon uses UART0 */
+#define CONFIG_SYS_NS16550_COM1                0x48024000      /* Naon uses UART0 as default, but we changed to UART2 */
 #define CONFIG_BAUDRATE                115200
 #define CONFIG_SYS_BAUDRATE_TABLE      { 110, 300, 600, 1200, 2400, \

Info-icon.png UART base address can be found inside DM814x or AM387x datasheet or by looking at kernel boot messages
[    0.940000] omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
[    0.950000] console [ttyO0] enabled, bootconsole disabled
[    0.950000] console [ttyO0] enabled, bootconsole disabled
[    0.960000] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[    0.970000] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[    0.980000] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[    0.980000] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[    0.990000] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5