Use UART5 instead of SPI2.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use UART5 instead of SPI2.

Jump to solution
780 Views
MWolosewicz
Contributor I

Hi guys

I want to use UART5 instead of SPI2 (the processor is IMX6G2C (IMXUL):

UART5_TX (ALT8) --> CSI_DATA00 (now SPI2_CLK)
UART5_RX (ALT8) --> CSI_DATA01 (now SPI2_CSn)

I've modified the device tree and after connecting with UART->USB adapter I can see the echo on the terminal (remote, because the local one is disabled) but I can't see the device in /dev directory.
 
The ttymxc3 (uart4) is available at /dev/ttymxc3, its debug port and it works like charm.
 
Some important parts of the the device tree (imx6ul-liteboard.dts):
 

 

/ {
chosen {
        stdout-path = &uart4;
        bootargs = "console=ttymxc3,115200";
    };
    // (...)
};

&iomuxc {
    // (...)
    pinctrl_uart5: uart5grp {
        fsl,pins = <
            MX6UL_PAD_CSI_DATA00__UART5_DCE_TX      0x1b0b1
            MX6UL_PAD_CSI_DATA01__UART5_DCE_RX      0x1b0b1
        >;
    };

    pinctrl_uart4: uart4grp {
        fsl,pins = <
            MX6UL_PAD_UART4_TX_DATA__UART4_DCE_TX   0x1b0b1
            MX6UL_PAD_UART4_RX_DATA__UART4_DCE_RX   0x1b0b1
        >;
    };

    // (...)
};

// (...)

&uart4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart4>;
        status = "okay";
};

&uart5 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart5>;
        compatible = "fsl,imx21-uart";
        status = "okay";
};

 

Adding or removing "compatible = "fsl,imx21-uart";" from uart5 changes nothing.

The dts includes (imx6ul-litesom.dtsi), which includes: (imx6ul.dtsi).
 
In the imx6ul.dtsi there is defined alias serial4 = &uart5; there are /dev/ACM0 to /dev/ACM7 but non of them respond.
 
Do you have an idea of what is missing?
Labels (1)
0 Kudos
Reply
1 Solution
758 Views
MWolosewicz
Contributor I

Thanks, Igor,

I've checked everything again and the problem was that: 

MX6UL_PAD_CSI_DATA01__UART5_DCE_RX

was defined elsewhere.

I just want to confirm that the rest of the configuration was ok.

View solution in original post

0 Kudos
Reply
2 Replies
759 Views
MWolosewicz
Contributor I

Thanks, Igor,

I've checked everything again and the problem was that: 

MX6UL_PAD_CSI_DATA01__UART5_DCE_RX

was defined elsewhere.

I just want to confirm that the rest of the configuration was ok.

0 Kudos
Reply
768 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos
Reply