summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Harkin <ryan.harkin@linaro.org>2018-01-05 16:25:03 +0000
committerRyan Harkin <ryan.harkin@linaro.org>2018-01-18 19:10:16 +0000
commit2a304609255663d6ef2534de7be4d526460ffa59 (patch)
tree08b41f0d18b3f765684346b5ce53c6300c1fe24b
parentab1f83e1c5edbe3a1c39f119a01896f3cde173a9 (diff)
warp7: add support for console on UART6 and mikroBuslinaro-20180118-001
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>
-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 61c33fb53e..5fb4824477 100644
--- a/board/warp7/Kconfig
+++ b/board/warp7/Kconfig
@@ -6,4 +6,13 @@ config SYS_BOARD
config SYS_CONFIG_NAME
default "warp7"
+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 9ec2ed1877..c680a93d27 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -72,6 +72,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),
@@ -89,6 +94,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 52dd283a4e..8d97028852 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -13,7 +13,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)
@@ -34,7 +40,7 @@
CONFIG_DFU_ENV_SETTINGS \
"script=boot.scr\0" \
"image=zImage\0" \
- "console=ttymxc0\0" \
+ "console=" CONSOLE "\0" \
"ethact=usb_ether\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \