I am working on i.MX8QM BSP 5.4.70.
The default BSP uses lpuart0 as u-boot and kernel debug port. In our custom board, we would like to change it to lpuart3 or lpuart4 as the u-boot and kernel debug port. We can't make it work. It outputs nothing. The ways we did are as follows.
At u-boot dts file,
-----
chosen {
bootargs = "console=ttyLP4,115200 earlycon";
stdout-path = &lpuart4;
};
pinctrl_lpuart4: lpuart4grp {
fsl,pins = <
SC_P_M40_GPIO0_00_DMA_UART4_RX 0x06000020
SC_P_M40_GPIO0_01_DMA_UART4_TX 0x06000020
>;
};
&lpuart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpuart4>;
status = "okay";
};
----
At u-boot board file,
----
static iomux_cfg_t uart4_pads[] = {
SC_P_M40_GPIO0_00 | MUX_MODE_ALT(2) | MUX_PAD_CTRL(UART_PAD_CTRL), /* M40.GPIO0.IO00, M40.TPM0.CH0, DMA.UART4.RX, LSIO.GPIO0.IO08 */
SC_P_M40_GPIO0_01 | MUX_MODE_ALT(2) | MUX_PAD_CTRL(UART_PAD_CTRL), /* M40.GPIO0.IO01, M40.TPM0.CH1, DMA.UART4.TX, LSIO.GPIO0.IO09 */
};
static void setup_iomux_uart4(void)
{
imx8_iomux_setup_multiple_pads(uart4_pads, ARRAY_SIZE(uart4_pads));
}
/* Set UART4 clock root to 80 MHz */
ret = sc_pm_setup_uart(SC_R_UART_4, rate);
if (ret)
return ret;
setup_iomux_uart4();
----
If I switch back to lpuart0, it can boot into Yocto OS and the lpuart4 works well. The hardware is fine.
Is there anything that I should do in scfw? How?
-Eric