打印
[嵌入式linux]

imxq 串口增加硬件流控,设备树怎么配置

[复制链接]
719|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zhengfengqq|  楼主 | 2019-11-25 17:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
配置哪里有问题???
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
uart-has-rtscts;
/*cts-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;*/
/*rts-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;*/
status = "okay";
};


pinctrl_uart3: uart3grp {
   fsl,pins = <
    MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
    MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1
    MX6QDL_PAD_EIM_D30__UART3_CTS_B     0x1b0b1
    MX6QDL_PAD_EIM_D31__UART3_RTS_B     0x1b0b1
   >;
  };

使用特权

评论回复
评论
zhengfengqq 2019-11-25 17:50 回复TA
用法如下: Optional properties: - cts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's CTS line. - dcd-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DCD line. - dsr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DSR line. - dtr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be used as the UART's DTR line. - rng-gpios: Must con  
zhengfengqq 2019-11-25 17:47 回复TA
cts-gpios = <&gpio3 30 GPIO_ACTIVE_LOW>;rts-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;这种方式是可以收发的。 

相关帖子

沙发
zhengfengqq|  楼主 | 2019-11-25 17:58 | 只看该作者
使用方法:
Optional properties:
  - cts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's CTS line.
  - dcd-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's DCD line.
  - dsr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's DSR line.
  - dtr-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's DTR line.
  - rng-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's RNG line.
  - rts-gpios: Must contain a GPIO specifier, referring to the GPIO pin to be
    used as the UART's RTS line.

  - uart-has-rtscts: The presence of this property indicates that the
    UART has dedicated lines for RTS/CTS hardware flow control, and that
    they are available for use (wired and enabled by pinmux configuration).
    This depends on both the UART hardware and the board wiring.
    Note that this property is mutually-exclusive with "cts-gpios" and
    "rts-gpios" above.


Examples:

        uart1: serial@48022000 {
                compatible = "ti,am3352-uart", "ti,omap3-uart";
                ti,hwmods = "uart2";
                clock-frequency = <48000000>;
                reg = <0x48022000 0x2000>;
                interrupts = <73>;
                dmas = <&edma 28 0>, <&edma 29 0>;
                dma-names = "tx", "rx";
                dtr-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>;
                dsr-gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
                dcd-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
                rng-gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
                cts-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
                rts-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
                status = "okay";
        };

        scifa4: serial@e6c80000 {
                compatible = "renesas,scifa-sh73a0", "renesas,scifa";
                reg = <0xe6c80000 0x100>;
                interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
                clocks = <&mstp2_clks SH73A0_CLK_SCIFA4>;
                clock-names = "fck";
                power-domains = <&pd_a3sp>;
                uart-has-rtscts;
                status = "okay";
        };

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

4

帖子

0

粉丝