Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8597

Device Tree • Re: How to run RS485 for uart0, and uart3?

$
0
0
Hi,

Following the link you suggested I modified overlay dts i.e. uart3-pi5-overlay.dts

Code:

/dts-v1/;/plugin/;/{compatible = "brcm,bcm2712";fragment@0 {target = <&uart3>;frag0: __overlay__ {status = "okay";pinctrl-0 = <&uart3_pins>;};};rs485: fragment@1 {target = <&uart3>;__dormant__ {linux,rs485-enabled-at-boot-time;rs485-rts-delay = <0 0>;rs485-rts-active-low;};};__overrides__ {ctsrts = <&frag0>,"pinctrl-0:4=",<&uart3_ctsrts_pins>;rs485 = <0>,"=1=2";rs485_invert_rts = <&rs485>,"rs485-rts-active-low";rs485_rts_on_delay = <&rs485>, "rs485-rts-delay:0";rs485_rts_off_delay = <&rs485>, "rs485-rts-delay:4";};};
This has brough my DTS node to to show "RS485 is enabled at boot time" at initial level,
In config.txt, I used this settings->

Code:

dtoverlay=uart3-pi5,ctsrts=on,rs485=on,rs485_invert_rts=ondtparam=uart3-pi5=on
you may see following node definition-

Code:

 serial@3c000 {                                        arm,primecell-periphid = <0x341011>;                                        pinctrl-names = "default";                                        rs485-rts-active-low;                                        pinctrl-0 = <0xc6 0xc7>;                                        clock-names = "uartclk", "apb_pclk";                                        cts-event-workaround;                                        interrupts = <0x2c 0x04>;                                        clocks = <0x02 0x0f 0x02 0x06>;                                        skip-init;                                        linux,rs485-enabled-at-boot-time;                                        uart-has-rtscts;                                        rs485-rts-delay = <0x00 0x00>;                                        compatible = "arm,pl011-axi";                                        status = "okay";                                        reg = <0xc0 0x4003c000 0x00 0x100>;                                        phandle = <0xa9>;                                };
Should I consider this as RS485 is enabled initially?

Statistics: Posted by shailesh170 — Thu Dec 18, 2025 5:49 am



Viewing all articles
Browse latest Browse all 8597

Trending Articles