Hi,
I'm trying to connect a modem chip on the board, which design is based on imx8mm.
The modem is connected to pins X1_4 (UART4_TXD) and X2_67 (UART4_RXD)
I made the following changes in the device tree:
&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
assigned-clocks = <&clk IMX8MM_CLK_UART4>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
/delete-property/ dmas;
/delete-property/ dma-names;
fsl,dte_mode;
status = "okay";
};
pinctrl_uart4: uart4grp {
fsl,pins = <
// reverted TX /RX in DTE mode
MX8MM_IOMUXC_UART4_RXD_UART4_DTE_TX 0x140
MX8MM_IOMUXC_UART4_TXD_UART4_DTE_RX 0x140
>;
};
Even if ttymxc3 created, the bit UARTEN of UART4_UCR1 shows that the UART4 is disabled. Why?
[ 1.037192] 30a60000.serial: ttymxc3 at MMIO 0x30a60000 (irq = 39, base_baud = 5000000) is a IMX
~# devmem2 0x30a60080
/dev/mem opened.
Memory mapped at address 0xffffb460a000.
Read at address 0x30A60080 (0xffffb460a080): 0x00000000
The bit DCEDTE in UARTx_UFCR also is not set - meaning that DTE is not configured:
# devmem2 0x30a60090
/dev/mem opened.
Memory mapped at address 0xffff90e96000.
Read at address 0x30A60090 (0xffff90e96090): 0x00000801
How do I enable UART4 correctly?
Best regards,
Vitali
Solved! Go to Solution.
BiyongSUN, thank you for the reply.
You're absolutely right - I checked the UARTEN bit on the wrong point of time. After using the UART it is set: "Read at address 0x30A60080 (0xffffb460a080): 0x00000201"
I've found the error related to DTE mode too: it must be "fsl,dte-mode", not "fsl,dte_mode" (shame on me!)
Vitali
BiyongSUN, thank you for the reply.
You're absolutely right - I checked the UARTEN bit on the wrong point of time. After using the UART it is set: "Read at address 0x30A60080 (0xffffb460a080): 0x00000201"
I've found the error related to DTE mode too: it must be "fsl,dte-mode", not "fsl,dte_mode" (shame on me!)
Vitali
because you haven't used the uart4.
here is the test, use the uart4 as second login/debug console.
Hi Vitali
for uart4 one can look at below example
In nxp releases uart4 can be used by M4 SDK https://mcuxpresso.nxp.com/en/welcome
Best regards
igor
Hi Igor,
Thank you for good example about UART.
I think I made the same changes as in the example, but it does not work and I don't understand why.
Vitali