summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-12-28 15:53:17 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2019-01-30 18:05:13 +0100
commit528b445a0b7ce82072fd28dd11c940fbc091972f (patch)
tree1330b07e0972eaa4c8a843a5a68ca47042efef6c
parenta96621eed297872a8b6d9676a74e4cf9cfa1f998 (diff)
apalis-imx8: use UART1 as console UART
NXP LPUART1 is used as Apalis UART1, which is the main console on our Linux BSP. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 360629c1fd6187de19d0f50feb85c725995e49cc) (cherry picked from commit 63030dac6afc51d17b04d23ce41af4788f03717e) (cherry picked from commit 7bbe1708e0cebf3432c234ea74f8d6fb632a023b) (cherry picked from commit d58fa8f3247edc18bdbf716fa9a45bcf5fce9cb8)
-rw-r--r--arch/arm/dts/fsl-imx8qm-apalis.dts13
-rw-r--r--board/toradex/apalis-imx8/apalis-imx8.c22
-rw-r--r--include/configs/apalis-imx8.h2
3 files changed, 23 insertions, 14 deletions
diff --git a/arch/arm/dts/fsl-imx8qm-apalis.dts b/arch/arm/dts/fsl-imx8qm-apalis.dts
index e0adb4172f9..bc9526b1128 100644
--- a/arch/arm/dts/fsl-imx8qm-apalis.dts
+++ b/arch/arm/dts/fsl-imx8qm-apalis.dts
@@ -25,8 +25,8 @@
compatible = "toradex,imx8qm-apalis", "fsl,imx8qm";
chosen {
- bootargs = "console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200";
- stdout-path = &lpuart0;
+ bootargs = "console=ttyLP1,115200 earlycon=lpuart32,0x5a070000,115200";
+ stdout-path = &lpuart1;
};
regulators {
@@ -125,6 +125,13 @@
>;
};
+ pinctrl_lpuart1: lpuart1grp {
+ fsl,pins = <
+ SC_P_UART1_RX_DMA_UART1_RX 0x06000020
+ SC_P_UART1_TX_DMA_UART1_TX 0x06000020
+ >;
+ };
+
pinctrl_usdhc1: usdhc1grp {
fsl,pins = <
SC_P_EMMC0_CLK_CONN_EMMC0_CLK 0x06000041
@@ -409,6 +416,8 @@
};
&lpuart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_lpuart1>;
status = "okay";
};
diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index c6dc0d9a03f..5cf7b09f695 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -55,14 +55,14 @@ DECLARE_GLOBAL_DATA_PTR;
#define UART_PAD_CTRL ((SC_PAD_CONFIG_OUT_IN << PADRING_CONFIG_SHIFT) | (SC_PAD_ISO_OFF << PADRING_LPCONFIG_SHIFT) \
| (SC_PAD_28FDSOI_DSE_DV_HIGH << PADRING_DSE_SHIFT) | (SC_PAD_28FDSOI_PS_PU << PADRING_PULL_SHIFT))
-static iomux_cfg_t uart0_pads[] = {
- SC_P_UART0_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
- SC_P_UART0_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
+static iomux_cfg_t uart1_pads[] = {
+ SC_P_UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
+ SC_P_UART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
};
static void setup_iomux_uart(void)
{
- imx8_iomux_setup_multiple_pads(uart0_pads, ARRAY_SIZE(uart0_pads));
+ imx8_iomux_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
}
int board_early_init_f(void)
@@ -72,19 +72,19 @@ int board_early_init_f(void)
ipcHndl = gd->arch.ipc_channel_handle;
- /* Power up UART0, this is very early while power domain is not working */
- sciErr = sc_pm_set_resource_power_mode(ipcHndl, SC_R_UART_0, SC_PM_PW_MODE_ON);
+ /* Power up UART1, this is very early while power domain is not working */
+ sciErr = sc_pm_set_resource_power_mode(ipcHndl, SC_R_UART_1, SC_PM_PW_MODE_ON);
if (sciErr != SC_ERR_NONE)
return 0;
- /* Set UART0 clock root to 80 MHz */
+ /* Set UART1 clock root to 80 MHz */
sc_pm_clock_rate_t rate = 80000000;
- sciErr = sc_pm_set_clock_rate(ipcHndl, SC_R_UART_0, 2, &rate);
+ sciErr = sc_pm_set_clock_rate(ipcHndl, SC_R_UART_1, 2, &rate);
if (sciErr != SC_ERR_NONE)
return 0;
- /* Enable UART0 clock root */
- sciErr = sc_pm_clock_enable(ipcHndl, SC_R_UART_0, 2, true, false);
+ /* Enable UART1 clock root */
+ sciErr = sc_pm_clock_enable(ipcHndl, SC_R_UART_1, 2, true, false);
if (sciErr != SC_ERR_NONE)
return 0;
@@ -420,7 +420,7 @@ int board_init(void)
void board_quiesce_devices()
{
const char *power_on_devices[] = {
- "dma_lpuart0",
+ "dma_lpuart1",
};
power_off_pd_devices(power_on_devices, ARRAY_SIZE(power_on_devices));
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 15e0d13f269..b13480befef 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -114,7 +114,7 @@
"script=boot.scr\0" \
"image=Image\0" \
"panel=NULL\0" \
- "console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200\0" \
+ "console=ttyLP1,115200 earlycon=lpuart32,0x5a070000,115200\0" \
"fdt_addr=0x83000000\0" \
"fdt_high=0xffffffffffffffff\0" \
"boot_fdt=try\0" \