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