AnsweredAssumed Answered

iMX8MQ ECSPI2 pins not working as UART4

Question asked by NIRMAL LUHANA on Jul 9, 2019
Latest reply on Jul 17, 2019 by NIRMAL LUHANA

Hi,

 

Release: Yocto-Morty (4.9.51_GA)

Board: i.MX8MQ based custom board

 

I want to use iMX8MQ ECSPI2 pins as full UART4 and I have used configured pinmux as below in dts file.

pinctrl_uart4: uart4grp {                                               
            fsl,pins = <                                                        
                MX8MQ_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x49                   
                MX8MQ_IOMUXC_ECSPI2_MOSI_UART4_DTE_RX    0x49                   
                MX8MQ_IOMUXC_ECSPI2_SCLK_UART4_DTE_TX    0x49                   
                MX8MQ_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B  0x49                   
            >;                                                                  
        };   

 

&uart4 {                                                
    pinctrl-names = "default";                                                  
    pinctrl-0 = <&pinctrl_uart4>;                      
    assigned-clocks = <&clk IMX8MQ_CLK_UART4_SRC>;                              
    assigned-clock-parents = <&clk IMX8MQ_CLK_25M>;                             
    fsl,uart-has-rtscts;                                                        
    status = "okay";                                                            
};

 

But I am unable to use it as UART4. When I read registers using devmem2 utility, there are UART4 TX & RX pins configure as a GPIOs instead of TX/RX. RTS/CTS pins configured correctly.

 

root@imx8mqpicoitx:~# devmem2 0x30330204
/dev/mem opened.
Memory mapped at address 0xffffa4999000.
Read at address  0x30330204 (0xffffa4999200): 0x0000000100000005      //Tx configured as a GPIO
root@imx8mqpicoitx:~# devmem2 0x30330208
/dev/mem opened.
Memory mapped at address 0xffffa1ff9000.
Read at address  0x30330208 (0xffffa1ff9208): 0x0000000100000005      //Rx configured as a GPIO
root@imx8mqpicoitx:~# devmem2 0x3033020C
/dev/mem opened.
Memory mapped at address 0xffff9c17e000.
Read at address  0x3033020C (0xffff9c17e208): 0x0000000100000001
root@imx8mqpicoitx:~# devmem2 0x30330210
/dev/mem opened.
Memory mapped at address 0xffffa5f35000.
Read at address  0x30330210 (0xffffa5f35210): 0x0000001000000001

root@imx8mqpicoitx:~#

 

Is there any other configuration required to use it as a UART?

 

Best regards,

Nirmal

Outcomes