Hi
I want to use uart2 as an RS485 serial link. I was trying to add RTS pin control (set RTS to high or low) right after sending or receving message but I couldn't find the right source file to rewrite.
Does anyone know how can I control RTS pin either to high or low in order to send and receice message?
Thanks
here I found a method by adding rts-gpios on devicetree.
rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
There is an example for setting rts for 8250 serial.
Example for OMAP UART using GPIO-based modem control signals:
uart4: serial@49042000 {
compatible = "ti,omap3-uart";
reg = <0x49042000 0x400>;
interrupts = <80>;
ti,hwmods = "uart4";
clock-frequency = <48000000>;
cts-gpios = <&gpio3 5 GPIO_ACTIVE_LOW>;
rts-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
dtr-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
dsr-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
dcd-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
rng-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
};
But it is an example for the OMAP UART, i wonder if it also works for ls1028a board?
Does anyone ever tried before?
Hi,
Due to we are lack of Layerscape support resource so far, the thread could be delay answered.
I would like recommend to contact with your local NXP distributor for priority support.
Thank you for the understanding.
Mike