UART RTS CTS Hardware flow control

Hi, how should I configure UART 1 to use hardware flow control? How do I assign that task to pins UART1_RTSN (GPIO number 55) and UART1_CTSN (GPIO number 54). I can’t find an overlay for that.

Current configuration of uEnv.txt:

verbosity=7
fdtfile=rockchip/rk3308-rock-pi-s.dtb
console=ttyS0,1500000n8
overlays=rk3308-uart0 rk3308-uart1
rootuuid=8b49abbc-0948-4b3d-bc16-96047a030761
initrdsize=0x87ccd6
kernelversion=4.4.143-65-rockchip-g58431d38f8f3
initrdimg=initrd.img-4.4.143-65-rockchip-g58431d38f8f3
kernelimg=vmlinuz-4.4.143-65-rockchip-g58431d38f8f3

Regards, Marcelo.

I’ve finally figured it out. It was necessary to decompile, modify and compile the overlay for UART1.

I created rk3308-uart1-hfc.dts:

/dts-v1/;

/ {
	compatible = "rockchip,rk3308";

	fragment@0 {
		target = <0xffffffff>;

		__overlay__ {
			status = "disabled";
		};
	};

	fragment@1 {
		target = <0xffffffff>;

		__overlay__ {
			status = "disabled";
		};
	};
	
	fragment@2 {
		target = <0xffffffff>;

		__overlay__ {
			status = "disabled";
		};
	};

	fragment@3 {
		target = <0xffffffff>;

		__overlay__ {
			status = "okay";
		};
	};

	__fixups__ {
		i2c0 = "/fragment@0:target:0";
		spi2 = "/fragment@1:target:0";
		uart2 = "/fragment@2:target:0";
		uart1 = "/fragment@3:target:0";
	};
};

And compiled with:

dtc -I dts -O dtb -f rk3308-uart1-hfc.dts -o rk3308-uart1-hfc.dtbo

The usage of UART1 with hardware flow control prohibits i2c0, spi2 and uart2 because of pin sharing.

Then uEnv.txt:

verbosity=7
fdtfile=rockchip/rk3308-rock-pi-s.dtb
console=ttyS0,1500000n8
overlays=rk3308-uart0 rk3308-uart1-hfc
rootuuid=8b49abbc-0948-4b3d-bc16-96047a030761
initrdsize=0x87ccd6
kernelversion=4.4.143-65-rockchip-g58431d38f8f3
initrdimg=initrd.img-4.4.143-65-rockchip-g58431d38f8f3
kernelimg=vmlinuz-4.4.143-65-rockchip-g58431d38f8f3
1 Like

Hi, I know this post is old so I do apologize, I hope someone can help me.

Ive made the changes as you showed above to activate the RTS on UART 1 but now I see that the RTS is always LOW, it never goes high even if I set the CTS HIGH which makes me think the CTS pin isnt enabled. Is that the case? If so how do I enable the CTS pin as well?

Hi Sven,

You can @radxa on the forum to ping us. This is easier than email and we can keep the solution public.

This thread is about an older system release, which we no longer support. The latest system image can be found here.

However, we currently do not have an UART1 overlay with flow control enabled. I suggest you create a new thread for your issue, and list your hardware version (there are several different GPIO pinouts), and we can help you there.