questions about uart node in different imx8mp device trees

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

questions about uart node in different imx8mp device trees

跳至解决方案
97 次查看
machangbao
Contributor III


In https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
&uart1 { /* BT */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
assigned-clocks = <&clk IMX8MP_CLK_UART1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
uart-has-rtscts;
status = "okay";

bluetooth {
compatible = "nxp,88w8997-bt";
};
};

&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MP_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
uart-has-rtscts;
status = "okay";
};

In https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/arch/arm64/boot/dts/freescale/imx8mp-venice-gw74...

/* GPS / off-board header */
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
status = "okay";
};

/* bluetooth HCI */
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>, <&pinctrl_uart3_gpio>;
cts-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;
rts-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
status = "okay";

bluetooth {
compatible = "brcm,bcm4330-bt";
shutdown-gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
};
};

 

Two questions:

1. are propertys assigned-clocks assigned-clock-parents  necessary?  What would happen if it's lacking?

2. What are the differences between the two hardware flow control methods uart-has-rtscts and uart-has-rtscts &cts-gpios&rts-gpios?  

标签 (1)
0 项奖励
回复
1 解答
33 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

Q1:

1. are propertys assigned-clocks assigned-clock-parents  necessary?  What would happen if it's lacking?

A:Yes, necessary. These properties are part of the Common Clock Framework in Linux device trees. They are used to configure the clock source and parent for a peripheral at boot time.

If lacking, Incorrect baud rate if the default clock frequency doesn’t match what the driver expects.Potential instability if the clock source is not optimal for low-power or performance modes.

2. What are the differences between the two hardware flow control methods uart-has-rtscts and uart-has-rtscts &cts-gpios&rts-gpios?  

A:uart-has-rtscts 是一个 Device Tree 属性,用于告诉 Linux UART 驱动该串口支持 硬件流控 (RTS/CTS),并且应该启用它。RTS (Request To Send) 和 CTS (Clear To Send) 信号由 UART 控制器硬件自动处理,不需要软件干预

The driver will enable hardware flow control( (RTS/CTS)) function when initializing UART.

cts-gpios 和 rts-gpios 是 Device Tree 属性,用于在硬件没有原生 RTS/CTS 引脚,或者需要通过 GPIO 来模拟流控时使用。驱动会通过 GPIO 来实现流控,而不是使用 UART 控制器的硬件 RTS/CTS.

Rita_Wang_0-1763017665901.png

 

 

 

 

在原帖中查看解决方案

0 项奖励
回复
1 回复
34 次查看
Rita_Wang
NXP TechSupport
NXP TechSupport

Q1:

1. are propertys assigned-clocks assigned-clock-parents  necessary?  What would happen if it's lacking?

A:Yes, necessary. These properties are part of the Common Clock Framework in Linux device trees. They are used to configure the clock source and parent for a peripheral at boot time.

If lacking, Incorrect baud rate if the default clock frequency doesn’t match what the driver expects.Potential instability if the clock source is not optimal for low-power or performance modes.

2. What are the differences between the two hardware flow control methods uart-has-rtscts and uart-has-rtscts &cts-gpios&rts-gpios?  

A:uart-has-rtscts 是一个 Device Tree 属性,用于告诉 Linux UART 驱动该串口支持 硬件流控 (RTS/CTS),并且应该启用它。RTS (Request To Send) 和 CTS (Clear To Send) 信号由 UART 控制器硬件自动处理,不需要软件干预

The driver will enable hardware flow control( (RTS/CTS)) function when initializing UART.

cts-gpios 和 rts-gpios 是 Device Tree 属性,用于在硬件没有原生 RTS/CTS 引脚,或者需要通过 GPIO 来模拟流控时使用。驱动会通过 GPIO 来实现流控,而不是使用 UART 控制器的硬件 RTS/CTS.

Rita_Wang_0-1763017665901.png

 

 

 

 

0 项奖励
回复