[嵌入式linux] imxq 串口增加硬件流控,设备树怎么配置

[复制链接]
176|3
 楼主 | 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>;这种方式是可以收发的。 
 楼主 | 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";
        };

使用特权

评论回复
扫描二维码,随时随地手机跟帖
您需要登录后才可以回帖 登录 | 注册

本版积分规则

我要发帖 投诉建议 创建版块 申请版主

快速回复

您需要登录后才可以回帖
登录 | 注册
高级模式

论坛热帖