mario Sangalli

iMX8m EVK UART4 unavailable

Discussion created by mario Sangalli on Oct 7, 2019
Latest reply on Oct 21, 2019 by Diego Adrian Cuevas

Hi, I'm working on a iMX8M Mini EVK (official NXP Android bsp) and I want to use the UART4 , formally used as debug

port for M4 microcontroller .


Changed the DTS file to include the UART:


/*pin muxing */

        pinctrl_uart4: uart4grp {
            fsl,pins = <
                MX8MM_IOMUXC_UART4_RXD_UART4_DCE_RX            0x140    /* GPIO5.28 */
                MX8MM_IOMUXC_UART4_TXD_UART4_DCE_TX            0x140    /* GPIO5.29 */


&uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_uart4>;
    assigned-clocks = <&clk IMX8MM_CLK_UART4_SRC>;
    assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
    /* status = "disabled"; */
    status = "okay";


But  system will go in crash when accesing the first UART4 register.


Problem is that the RDC register @ 303d0518  is set to 0xFC, so UART is assigned to M4 core:

A workaround is to set a macro in UBOOT to set register to 0xFF:

setenv ena_uart4 mw.l 0x303D0518 0xFF

setenv bootcmd  'run ena_uart4; boota mmc0'

Problem is that in UBOOT code I was not able to detect  where the register is initially set to 0xfc:

a patch placed into board_early_init_f() do not works as expected, and it was impossible to

assign the UART4 to UBOOT console ...

Any idea where to find this setting?


M. Sangalli