ARM: dts: imx: ventana: add RS485 txen gpio support
Subsystems (2)
PATCH 1/1 ARM: dts: imx: ventana: add RS485 txen gpio support
The GW54xx, GW53xx, and GW52xx all have an RS485 transceiver that uses an IMX GPIO for the TX enable of the transceiver. Declare this properly.
--- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++ 3 files changed, 9 insertions(+)
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +3 -0
@@ -315,6 +315,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + fsl,uart-has-rtscts; + rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -493,6 +495,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +3 -0
@@ -311,6 +311,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + fsl,uart-has-rtscts; + rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -481,6 +483,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +3 -0
@@ -414,6 +414,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + fsl,uart-has-rtscts; + rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -603,6 +605,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
Signature · 1 line
1.9.1
PATCH 1/1 ARM: dts: imx: ventana: add RS485 txen gpio support
Quoted 15 lines · Tim Harvey
The GW54xx, GW53xx, and GW52xx all have an RS485 transceiver that uses an IMX GPIO for the TX enable of the transceiver. Declare this properly.
Signed-off-by Tim Harvey <[email protected]>--- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++ 3 files changed, 9 insertions(+)arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +0
-0
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi line 318
Quoted 4 lines
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1
-0@@ -315,6 +315,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + fsl,uart-has-rtscts;
This vendor specific property is deprecated. Please use generic uart-has-rtscts instead.
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi line 319
Quoted 1 line
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1
-0+ rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>;
I cannot find this property in any bindings doc. What I found is rts-gpios in bindings/serial/serial.txt. Also, I'm not sure how this property is supported by IMX driver.
Shawn
Quoted 11 lines
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1
-0status = "okay"; };@@ -493,6 +495,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
PATCH 1/1 ARM: dts: imx: ventana: add RS485 txen gpio support
Quoted 11 lines · Shawn Guo
Quoted 10 lines · Tim Harvey
The GW54xx, GW53xx, and GW52xx all have an RS485 transceiver that uses an IMX GPIO for the TX enable of the transceiver. Declare this properly.
Signed-off-by Tim Harvey <[email protected]>--- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++ 3 files changed, 9 insertions(+)
Quoted 13 lines
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi line 318
Quoted 9 lines
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1
-0@@ -315,6 +315,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + fsl,uart-has-rtscts;This vendor specific property is deprecated. Please use generic uart-has-rtscts instead.
ok - will do for v2
Quoted 6 lines
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi line 319
Quoted 1 line
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +1
-0+ rts-gpio = <&gpio7 1 GPIO_ACTIVE_HIGH>;I cannot find this property in any bindings doc. What I found is rts-gpios in
bindings/serial/serial.txt. Also, I'm not sure how this property is supported by IMX driver.
This is supported by serial_mctrl_gpio (drivers/tty/serial/serial_mctrl_gpio.c) and the IMX serial driver does support mctrl-gpio. The serial_mctrl_gpio driver calls devm_gpiod_get_index_optional for pin names of cts,dsr,dcd,rng,rts, and dtr. This ends up calling 'of_find_gpio' for these names which looks for them based on 'gpio_suffixes' which is defined as { "gpios", "gpio" } so that plural or singular is supported.
Its not documented that gpio specifies can be singular in Documentation/devicetree/bindings/serial/serial.txt but I always hate seeing gpio properties named '*-gpios' that only specify a single gpio so I figured I would use the singular representation. Because this is not clear in the documentation and there is only one other board using 'rts-gpio' (am335x-nano.dts) vs 'rts-gpios' I will go ahead and change it for v2 to be more consistent.
Regards,
Tim
PATCH v2 1/1 ARM: dts: imx: ventana: add RS485 txen gpio support
In reply to Tim Harvey---
v2:
- replace remove vendor specific property with generic property
- replace rts-gpio with rts-gpios to match devicetree binding documentation (although both suffixes are supported)
--- arch/arm/boot/dts/imx6qdl-gw52xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi | 3 +++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi | 3 +++ 3 files changed, 9 insertions(+)
arch/arm/boot/dts/imx6qdl-gw52xx.dtsi +3 -0
@@ -315,6 +315,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + uart-has-rtscts; + rts-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -493,6 +495,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +3 -0
@@ -312,6 +312,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + uart-has-rtscts; + rts-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -482,6 +484,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +3 -0
@@ -414,6 +414,8 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; + uart-has-rtscts; + rts-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
@@ -603,6 +605,7 @@ fsl,pins = < MX6QDL_PAD_SD3_DAT7__UART1_TX_DATA 0x1b0b1 MX6QDL_PAD_SD3_DAT6__UART1_RX_DATA 0x1b0b1 + MX6QDL_PAD_SD3_DAT4__GPIO7_IO01 0x4001b0b1 /* TEN */ >; };
Signature · 1 line
1.9.1
Shawn Guo
AppliedPATCH v2 1/1 ARM: dts: imx: ventana: add RS485 txen gpio support
Quoted 8 lines · Tim Harvey
Signed-off-by Tim Harvey <[email protected]>---
v2:
- replace remove vendor specific property with generic property
- replace rts-gpio with rts-gpios to match devicetree binding documentation (although both suffixes are supported)Signed-off-by Tim Harvey <[email protected]>
Applied, thanks.