AnsweredAssumed Answered

How to use UART2/3 of IMX6Q-Sabresd on Android6.1

Question asked by Denny ZHOU on Mar 7, 2017
Latest reply on Aug 2, 2017 by Denny ZHOU

Hi NXP engineers and all,

 

  Here is a question, we wanna use UART2/3 of this board. We have an APP of Android which will use UART2/3 to send and receive some data. Currently, we have done these,

1. Set pin defination of UART2/3 in dts/dtsi,

 

   pinctrl_uart2: uart2grp {
   fsl,pins = <
    MX6QDL_PAD_EIM_D26__UART2_TX_DATA 0x1b0b1
    MX6QDL_PAD_EIM_D27__UART2_RX_DATA 0x1b0b1
   >;
  };

   pinctrl_uart3_1: uart3grp-1 {
   fsl,pins = <
    MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
    MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
    MX6QDL_PAD_EIM_D31__UART3_RTS_B  0x1b0b1
    MX6QDL_PAD_EIM_D23__UART3_CTS_B  0x1b0b1
   >;
  };

   ...

   &uart2 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_uart2>;
 status = "okay";
};

&uart3 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_uart3_1>;
 fsl,uart-has-rtscts;
 status = "okay";
};

 

 

  Meanwhile, we are sure that we do not reconfigure them for other functions. They are only for UART function.

 

  2. We have added the permisson in ueventd.rc in ~/myandroid/system/core/rootdir/.

   

# uart,ttymxc device node is world writable/readable. GP
/dev/ttymxc*              0666   root       root  
/dev/ttymxc1              0666   root       root
/dev/ttymxc2              0666   root       root

 

  But it doesn't work. So we also did the third step,

3. we add something in init.rc. But we think maybe it is not needed if we have done the second step.

   

    #test for ttymxc1,2.  GP
    chown root system /dev/ttymxc1
    chown root system /dev/ttymxc2
    chmod 0775 /dev/ttymxc1
    chmod 0775 /dev/ttymxc2
    #test end.

 

  Unfortunately, the UART2 could not be used yet. It seems that APP could not open UART2.

 

Would you please give some comments and feedback? Thanks!

 

 

BR//

Outcomes