RTS always high in RS485 mode imx7d

Hello, I am trying to setup two RS485 links using UART2 and UART5 on a colibri imx7d (pins 32,34,36,38 and 75,96,94,81).
Both are defined in the device tree as shown here:

pinctrl_uart2_dte_mode: uart2-dte-grp {
		fsl,pins = <
			MX7D_PAD_UART2_RX_DATA__UART2_DTE_TX 0x79
			MX7D_PAD_UART2_TX_DATA__UART2_DTE_RX 0x79
			MX7D_PAD_SAI2_TX_DATA__UART2_DTE_CTS 0x79
			MX7D_PAD_SAI2_RX_DATA__UART2_DTE_RTS 0x79
		>;
	};
pinctrl_uart5: uart5-grp {
		fsl,pins = <
			MX7D_PAD_I2C4_SDA__UART5_DCE_TX 0x79
			MX7D_PAD_I2C4_SCL__UART5_DCE_RX 0x79
			MX7D_PAD_I2C3_SDA__UART5_DCE_RTS 0x79
			MX7D_PAD_I2C3_SCL__UART5_DCE_CTS 0x79
		>;
	};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2_dte_mode>;
	assigned-clocks = <&clks IMX7D_UART2_ROOT_SRC>;
	assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
	uart-has-rtscts;
	fsl,dte-mode;
        linux,rs485-enabled-at-boot-time;
	rs485-rts-delay = <100 100>;

};

&uart5 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart5>;
	assigned-clocks = <&clks IMX7D_UART5_ROOT_SRC>;
	assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
	uart-has-rtscts;
        linux,rs485-enabled-at-boot-time;
	rs485-rts-delay = <100 100>;
};

I verified in /sys/kernel/debug and both pin groups are loaded correctly and both devices are accessible through ttymxc1 and ttymxc4.

On my custom board, the RTS line (pin34 an pin 94) are used to enable transmission on high and reception on low. If I configure both pins as gpio and I set the correct value, I am able to send and receive data on both ports. However, with the above configuration, I am only able to transmit as both RTS are always high.

To test the setup I use screen as follow: screen /dev/ttymxc1 115200.
I use the following kernel Linux version 4.9.166-dirty.

What am I missing?

Hi @avl and Welcome to the Toradex Community!

Your issue might be related to this, which is actually a bug for iMX6.

Best regards,
Jaski