summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2018-01-05 16:25:03 +0000
committerBryan O'Donoghue <bryan.odonoghue@linaro.org>2018-05-03 11:36:00 +0100
commita943fe85d707449c8308222e7231fb8d4bbb6bc7 (patch)
treed8a14ea5f81d6bb7f1984a986a233b53a65bce1b
parent8b4a610af96f1ecf9f713cdb50b63eecf4f13884 (diff)
warp7: add support for console on UART6 and mikroBus
Add support to route the serial console on the NXP WaRP7 board to UART6 and the mikroBus. Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
-rw-r--r--board/warp7/Kconfig9
-rw-r--r--board/warp7/warp7.c6
-rw-r--r--include/configs/warp7.h8
3 files changed, 22 insertions, 1 deletions
diff --git a/board/warp7/Kconfig b/board/warp7/Kconfig
index c089bca2ba..6ec5a71178 100644
--- a/board/warp7/Kconfig
+++ b/board/warp7/Kconfig
@@ -20,4 +20,13 @@ config SYS_FDT_ADDR
help
The address the FDT file should be loaded to.
+config MXC_CONSOLE_NUM
+ int "UART used for the console"
+ default 1
+ help
+ The UART used for the console, expressed as a 1-based integer.
+ This is also used to set the console variable passed to the kernel.
+ Currently, only UART1 and UART6 are supported. Specifying a value
+ other than 6 will result in using UART1.
+
endif
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index da52b183bd..6aa166ab7b 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -75,6 +75,11 @@ static iomux_v3_cfg_t const uart1_pads[] = {
MX7D_PAD_UART1_RX_DATA__UART1_DCE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
};
+static iomux_v3_cfg_t const uart6_pads[] = {
+ MX7D_PAD_ECSPI1_MOSI__UART6_DTE_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
+ MX7D_PAD_ECSPI1_SCLK__UART6_DTE_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
+};
+
static iomux_v3_cfg_t const usdhc3_pads[] = {
MX7D_PAD_SD3_CLK__SD3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
MX7D_PAD_SD3_CMD__SD3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
@@ -92,6 +97,7 @@ static iomux_v3_cfg_t const usdhc3_pads[] = {
static void setup_iomux_uart(void)
{
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
+ imx_iomux_v3_setup_multiple_pads(uart6_pads, ARRAY_SIZE(uart6_pads));
};
static struct fsl_esdhc_cfg usdhc_cfg[1] = {
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index f340bff3e7..5ebd583f6c 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -14,7 +14,13 @@
#define PHYS_SDRAM_SIZE SZ_512M
+#if (CONFIG_MXC_CONSOLE_NUM == 6)
+#define CONFIG_MXC_UART_BASE UART6_IPS_BASE_ADDR
+#define CONSOLE "ttymxc5"
+#else
#define CONFIG_MXC_UART_BASE UART1_IPS_BASE_ADDR
+#define CONSOLE "ttymxc0"
+#endif
/* Size of malloc() pool */
#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M)
@@ -36,7 +42,7 @@
"script=boot.scr\0" \
"script_signed=boot.scr.imx-signed\0" \
"image=zImage\0" \
- "console=ttymxc0\0" \
+ "console=" CONSOLE "\0" \
"ethact=usb_ether\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \