UART Set RTSCTS DTE_mode Fail

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

UART Set RTSCTS DTE_mode Fail

1,615 Views
frankweng
Contributor III

OS:Android6.0.1_2.0.0-ga

kernel : 4.1.15

dtsi 有關 ttymxc0/ttymxc3 設定

pinctrl_uart1: uart1grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT10__UART1_TX_DATA 0x1b0b1
MX6QDL_PAD_CSI0_DAT11__UART1_RX_DATA 0x1b0b1
MX6QDL_PAD_EIM_D19__UART1_CTS_B 0x1b0b1
MX6QDL_PAD_EIM_D20__UART1_RTS_B 0x1b0b1
MX6QDL_PAD_EIM_D23__UART1_DCD_B 0x1b0b1
MX6QDL_PAD_EIM_D24__UART1_DTR_B 0x1b0b1
MX6QDL_PAD_EIM_D25__UART1_DSR_B 0x1b0b1
MX6QDL_PAD_EIM_EB3__UART1_RI_B 0x1b0b1
>;
};

pinctrl_uart4: uart4grp {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
>;
};

&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
fsl,dte-mode;
fsl,uart-has-rtscts;
status = "okay";
};

&uart4 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart4>;
fsl,uart-has-rtscts;
fsl,dte-mode;
status = "okay";
};

1、Uart 設定為 RTSCTS & DTE_mode 下

   a:對ttymxc0

    cmd: stty -F /dev/ttymxc0 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo 

    設定ttymxc0() 時,整個系統會出現,但ttymxc3就不會

   mmc3: Timeout waiting for hardware interrupt.
   INFO: rcu_preempt self-detected stall on CPU
   0: (1 GPs behind) idle=8d3/2/0 softirq=7999/7999 fqs=2100
   (t=2100 jiffies g=3058 c=3057 q=46)
   Task dump for CPU 0:
   swapper/0 R running 0 0 0 0x00000002
   [<c01100e4>] (unwind_backtrace) from [<c010b554>] (show_stack+0x10/0x14)
   [<c010b554>] (show_stack) from [<c01859dc>] (rcu_dump_cpu_stacks+0x8c/0xc8)
   [<c01859dc>] (rcu_dump_cpu_stacks) from [<c0189894>] (rcu_check_callbacks+0x64c/0xa64)
   [<c0189894>] (rcu_check_callbacks) from [<c018eb34>] (update_process_times+0x38/0x64)
   [<c018eb34>] (update_process_times) from [<c019f1f4>] (tick_sched_handle+0x48/0x54)
   [<c019f1f4>] (tick_sched_handle) from [<c019f36c>] (tick_sched_timer+0x6c/0xc0)
   [<c019f36c>] (tick_sched_timer) from [<c018fb80>] (__run_hrtimer+0x88/0x2c0)
   [<c018fb80>] (__run_hrtimer) from [<c019004c>] (hrtimer_interrupt+0x124/0x294)
   [<c019004c>] (hrtimer_interrupt) from [<c010f8b8>] (twd_handler+0x30/0x38)
   [<c010f8b8>] (twd_handler) from [<c0180de4>] (handle_percpu_devid_irq+0x9c/0x1c8)
   [<c0180de4>] (handle_percpu_devid_irq) from [<c017ce24>] (generic_handle_irq+0x2c/0x3c)
   [<c017ce24>] (generic_handle_irq) from [<c017d0e0>] (__handle_domain_irq+0x7c/0xec)
   [<c017d0e0>] (__handle_domain_irq) from [<c0101450>] (gic_handle_irq+0x24/0x5c)
   unwind: Unknown symbol address c0101450
   unwind: Index not found c0101450

   

   b:對ttymxc0 ()

     i: cmd: stty -F /dev/ttymxc0 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo <--無法作loopback

      II:busybox stty -F /dev/ttymxc3 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo  -crtscts  <--無法作loopback

  

 

2、Uart 設定為 RTSCTS 下

    a:對ttymxc0

         stty -F /dev/ttymxc0 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo 

         不會出現任何kernel panic,但是無法作loopback

     b:對ttymxc3

            stty -F /dev/ttymxc3 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo  -->   可以loopback

            stty -F /dev/ttymxc3 raw ispeed 9600  ospeed 9600 cs8 -ignpar -cstopb -echo crtscts -->   可以loopback ,RTS/CTS 無作用

請問是否有patch檔可以解決,謝謝

Labels (2)
0 Kudos
Reply
2 Replies

1,173 Views
igorpadykov
NXP Employee
NXP Employee

Hi Frank

kernel panic may be due to ddr errors, please run board ddr test and update

image with new calibration coefficients

i.MX6/7 DDR Stress Test Tool V2.70 

Also one can try to rebuild image anew from scratch.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,173 Views
BiyongSUN
NXP Employee
NXP Employee

Please check the binding guide

Documentation/devicetree/bindings/serial/fsl-imx-uart.txt

  1 * Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART)
  2
  3 Required properties:
  4 - compatible : Should be "fsl,<soc>-uart"
  5 - reg : Address and length of the register set for the device
  6 - interrupts : Should contain uart interrupt
  7
  8 Optional properties:
  9 - fsl,uart-has-rtscts : Indicate the uart has rts and cts
 10 - fsl,irda-mode : Indicate the uart supports irda mode
 11 - fsl,dte-mode : Indicate the uart works in DTE mode. The uart works
 12                   is DCE mode by default.
 13
 14 Note: Each uart controller should have an alias correctly numbered
 15 in "aliases" node.
 16
 17 Example:
 18
 19 aliases {
 20         serial0 = &uart1;
 21 };
 22
 23 uart1: serial@73fbc000 {
 24         compatible = "fsl,imx51-uart", "fsl,imx21-uart";
 25         reg = <0x73fbc000 0x4000>;
 26         interrupts = <31>;
 27         fsl,uart-has-rtscts;
 28         fsl,dte-mode;
 29 };

example imx6ull-14x14-evk.dts

690 &uart2 {
691         pinctrl-names = "default";
692         pinctrl-0 = <&pinctrl_uart2>;
693         fsl,uart-has-rtscts;
694         /* for DTE mode, add below change */
695         /* fsl,dte-mode; */
696         /* pinctrl-0 = <&pinctrl_uart2dte>; */
697         status = "okay";
698 };

0 Kudos
Reply