Skip to content

Commit e431e55

Browse files
authored
overlays: Add rs485 support to uart[1-4]-pi5
1 parent eed2978 commit e431e55

6 files changed

Lines changed: 100 additions & 0 deletions

File tree

arch/arm/boot/dts/overlays/README

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5367,6 +5367,20 @@ Name: uart0-pi5
53675367
Info: Enable uart 0 on GPIOs 14-15. Pi 5 only.
53685368
Load: dtoverlay=uart0-pi5,<param>
53695369
Params: ctsrts Enable CTS/RTS on GPIOs 16-17 (default off)
5370+
rs485 Enable RS485 mode for using the RTS line to
5371+
drive the OE pin of an RS485 transceiver (i.e.
5372+
MAX3078E); also enables the UARTx ctsrts
5373+
parameter, as RTS is required (default off).
5374+
rs485_full_duplex When RS485 mode is enabled, enables receiving of
5375+
data while sending data (default off)
5376+
rs485_invert_rts When RS485 mode is enabled, inverts the RTS
5377+
line from active-high (default) to active-low.
5378+
rs485_rts_on_delay When RS485 mode is enabled, sets the delay (in
5379+
milliseconds) between data transmission starting
5380+
and the RTS line being asserted (default 0).
5381+
rs485_rts_off_delay When RS485 mode is enabled, sets the delay (in
5382+
milliseconds) between data transmission ending
5383+
and the RTS line being deasserted (default 0).
53705384

53715385

53725386
Name: uart1
@@ -5381,6 +5395,20 @@ Name: uart1-pi5
53815395
Info: Enable uart 1 on GPIOs 0-1. Pi 5 only.
53825396
Load: dtoverlay=uart1-pi5,<param>
53835397
Params: ctsrts Enable CTS/RTS on GPIOs 2-3 (default off)
5398+
rs485 Enable RS485 mode for using the RTS line to
5399+
drive the OE pin of an RS485 transceiver (i.e.
5400+
MAX3078E); also enables the UARTx ctsrts
5401+
parameter, as RTS is required (default off).
5402+
rs485_full_duplex When RS485 mode is enabled, enables receiving of
5403+
data while sending data (default off)
5404+
rs485_invert_rts When RS485 mode is enabled, inverts the RTS
5405+
line from active-high (default) to active-low.
5406+
rs485_rts_on_delay When RS485 mode is enabled, sets the delay (in
5407+
milliseconds) between data transmission starting
5408+
and the RTS line being asserted (default 0).
5409+
rs485_rts_off_delay When RS485 mode is enabled, sets the delay (in
5410+
milliseconds) between data transmission ending
5411+
and the RTS line being deasserted (default 0).
53845412

53855413

53865414
Name: uart2
@@ -5407,6 +5435,20 @@ Name: uart2-pi5
54075435
Info: Enable uart 2 on GPIOs 4-5. Pi 5 only.
54085436
Load: dtoverlay=uart2-pi5,<param>
54095437
Params: ctsrts Enable CTS/RTS on GPIOs 6-7 (default off)
5438+
rs485 Enable RS485 mode for using the RTS line to
5439+
drive the OE pin of an RS485 transceiver (i.e.
5440+
MAX3078E); also enables the UARTx ctsrts
5441+
parameter, as RTS is required (default off).
5442+
rs485_full_duplex When RS485 mode is enabled, enables receiving of
5443+
data while sending data (default off)
5444+
rs485_invert_rts When RS485 mode is enabled, inverts the RTS
5445+
line from active-high (default) to active-low.
5446+
rs485_rts_on_delay When RS485 mode is enabled, sets the delay (in
5447+
milliseconds) between data transmission starting
5448+
and the RTS line being asserted (default 0).
5449+
rs485_rts_off_delay When RS485 mode is enabled, sets the delay (in
5450+
milliseconds) between data transmission ending
5451+
and the RTS line being deasserted (default 0).
54105452

54115453

54125454
Name: uart3
@@ -5433,6 +5475,20 @@ Name: uart3-pi5
54335475
Info: Enable uart 3 on GPIOs 8-9. Pi 5 only.
54345476
Load: dtoverlay=uart3-pi5,<param>
54355477
Params: ctsrts Enable CTS/RTS on GPIOs 10-11 (default off)
5478+
rs485 Enable RS485 mode for using the RTS line to
5479+
drive the OE pin of an RS485 transceiver (i.e.
5480+
MAX3078E); also enables the UARTx ctsrts
5481+
parameter, as RTS is required (default off).
5482+
rs485_full_duplex When RS485 mode is enabled, enables receiving of
5483+
data while sending data (default off)
5484+
rs485_invert_rts When RS485 mode is enabled, inverts the RTS
5485+
line from active-high (default) to active-low.
5486+
rs485_rts_on_delay When RS485 mode is enabled, sets the delay (in
5487+
milliseconds) between data transmission starting
5488+
and the RTS line being asserted (default 0).
5489+
rs485_rts_off_delay When RS485 mode is enabled, sets the delay (in
5490+
milliseconds) between data transmission ending
5491+
and the RTS line being deasserted (default 0).
54365492

54375493

54385494
Name: uart4
@@ -5459,6 +5515,20 @@ Name: uart4-pi5
54595515
Info: Enable uart 4 on GPIOs 12-13. Pi 5 only.
54605516
Load: dtoverlay=uart4-pi5,<param>
54615517
Params: ctsrts Enable CTS/RTS on GPIOs 14-15 (default off)
5518+
rs485 Enable RS485 mode for using the RTS line to
5519+
drive the OE pin of an RS485 transceiver (i.e.
5520+
MAX3078E); also enables the UARTx ctsrts
5521+
parameter, as RTS is required (default off).
5522+
rs485_full_duplex When RS485 mode is enabled, enables receiving of
5523+
data while sending data (default off)
5524+
rs485_invert_rts When RS485 mode is enabled, inverts the RTS
5525+
line from active-high (default) to active-low.
5526+
rs485_rts_on_delay When RS485 mode is enabled, sets the delay (in
5527+
milliseconds) between data transmission starting
5528+
and the RTS line being asserted (default 0).
5529+
rs485_rts_off_delay When RS485 mode is enabled, sets the delay (in
5530+
milliseconds) between data transmission ending
5531+
and the RTS line being deasserted (default 0).
54625532

54635533

54645534
Name: uart5

arch/arm/boot/dts/overlays/uart0-pi5-overlay.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-0 = <&uart0_pins>;
12+
rs485-rts-delay = <0 0>;
1213
};
1314
};
1415

1516
__overrides__ {
1617
ctsrts = <&frag0>,"pinctrl-0:4=",<&uart0_ctsrts_pins>;
18+
rs485 = <&frag0>,"pinctrl-0:4=",<&uart0_ctsrts_pins>, <&frag0>,"linux,rs485-enabled-at-boot-time?";
19+
rs485_full_duplex = <&frag0>,"rs485-rx-during-tx?";
20+
rs485_invert_rts = <&frag0>,"rs485-rts-active-low?";
21+
rs485_rts_on_delay = <&frag0>,"rs485-rts-delay:0";
22+
rs485_rts_off_delay = <&frag0>,"rs485-rts-delay:4";
1723
};
1824
};

arch/arm/boot/dts/overlays/uart1-pi5-overlay.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-0 = <&uart1_pins>;
12+
rs485-rts-delay = <0 0>;
1213
};
1314
};
1415

1516
__overrides__ {
1617
ctsrts = <&frag0>,"pinctrl-0:4=",<&uart1_ctsrts_pins>;
18+
rs485 = <&frag0>,"pinctrl-0:4=",<&uart1_ctsrts_pins>, <&frag0>,"linux,rs485-enabled-at-boot-time?";
19+
rs485_full_duplex = <&frag0>,"rs485-rx-during-tx?";
20+
rs485_invert_rts = <&frag0>,"rs485-rts-active-low?";
21+
rs485_rts_on_delay = <&frag0>,"rs485-rts-delay:0";
22+
rs485_rts_off_delay = <&frag0>,"rs485-rts-delay:4";
1723
};
1824
};

arch/arm/boot/dts/overlays/uart2-pi5-overlay.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-0 = <&uart2_pins>;
12+
rs485-rts-delay = <0 0>;
1213
};
1314
};
1415

1516
__overrides__ {
1617
ctsrts = <&frag0>,"pinctrl-0:4=",<&uart2_ctsrts_pins>;
18+
rs485 = <&frag0>,"pinctrl-0:4=",<&uart2_ctsrts_pins>, <&frag0>,"linux,rs485-enabled-at-boot-time?";
19+
rs485_full_duplex = <&frag0>,"rs485-rx-during-tx?";
20+
rs485_invert_rts = <&frag0>,"rs485-rts-active-low?";
21+
rs485_rts_on_delay = <&frag0>,"rs485-rts-delay:0";
22+
rs485_rts_off_delay = <&frag0>,"rs485-rts-delay:4";
1723
};
1824
};

arch/arm/boot/dts/overlays/uart3-pi5-overlay.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-0 = <&uart3_pins>;
12+
rs485-rts-delay = <0 0>;
1213
};
1314
};
1415

1516
__overrides__ {
1617
ctsrts = <&frag0>,"pinctrl-0:4=",<&uart3_ctsrts_pins>;
18+
rs485 = <&frag0>,"pinctrl-0:4=",<&uart3_ctsrts_pins>, <&frag0>,"linux,rs485-enabled-at-boot-time?";
19+
rs485_full_duplex = <&frag0>,"rs485-rx-during-tx?";
20+
rs485_invert_rts = <&frag0>,"rs485-rts-active-low?";
21+
rs485_rts_on_delay = <&frag0>,"rs485-rts-delay:0";
22+
rs485_rts_off_delay = <&frag0>,"rs485-rts-delay:4";
1723
};
1824
};

arch/arm/boot/dts/overlays/uart4-pi5-overlay.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
frag0: __overlay__ {
1010
status = "okay";
1111
pinctrl-0 = <&uart4_pins>;
12+
rs485-rts-delay = <0 0>;
1213
};
1314
};
1415

1516
__overrides__ {
1617
ctsrts = <&frag0>,"pinctrl-0:4=",<&uart4_ctsrts_pins>;
18+
rs485 = <&frag0>,"pinctrl-0:4=",<&uart4_ctsrts_pins>, <&frag0>,"linux,rs485-enabled-at-boot-time?";
19+
rs485_full_duplex = <&frag0>,"rs485-rx-during-tx?";
20+
rs485_invert_rts = <&frag0>,"rs485-rts-active-low?";
21+
rs485_rts_on_delay = <&frag0>,"rs485-rts-delay:0";
22+
rs485_rts_off_delay = <&frag0>,"rs485-rts-delay:4";
1723
};
1824
};

0 commit comments

Comments
 (0)