打印

[嵌入式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";
        };

使用特权

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

本版积分规则

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

快速回复

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

论坛热帖

快3注册邀请码tt 阿荣旗| 建阳市| 元江| 盐山县| 泸定县| 新沂市| 石棉县| 新建县| 佛山市| 新源县| 沙田区| 宁强县| 汨罗市| 乐清市| 吉木萨尔县| 广南县| 信阳市| 浮山县| 定西市| 安福县| 荃湾区| 镇沅| 溧水县| 平度市| 林周县| 介休市| 大田县| 西畴县| 五指山市| 武乡县| 舞钢市| 龙南县| 渑池县| 灵宝市| 灵石县| 上思县| 雷州市| 怀来县| 道孚县| 布拖县| 泾川县|