diff mbox series

[1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings

Message ID 20240725141952.81213-1-d.haller@phytec.de
State Superseded
Headers show
Series [1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings | expand

Commit Message

Dominik Haller July 25, 2024, 2:19 p.m. UTC
From: Steffen Hemer <s.hemer@phytec.de>

RTS pin seems to have inverted behavior on am335x, other than expected
with default "rs485-rts-active-high" (instead of low on idle, high on send,
it is the opposite). Transceiver datasheet also suggests a pulldown.
Add includes to pin definitions that are used.

Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
---
 arch/arm/boot/dts/ti/omap/am335x-regor.dtsi | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Kevin Hilman July 29, 2024, 8:14 p.m. UTC | #1
Dominik Haller <d.haller@phytec.de> writes:

> From: Steffen Hemer <s.hemer@phytec.de>
>
> RTS pin seems to have inverted behavior on am335x, other than expected
> with default "rs485-rts-active-high" (instead of low on idle, high on send,
> it is the opposite). Transceiver datasheet also suggests a pulldown.
> Add includes to pin definitions that are used.
>
> Signed-off-by: Steffen Hemer <s.hemer@phytec.de>

Series LGTM, but as the sender, we need your Signed-off-by here too.
See the docs on submitting patches for all the details[1].

Kevin

[1]  https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
Dominik Haller July 30, 2024, 9:07 a.m. UTC | #2
On Mon, 2024-07-29 at 13:14 -0700, Kevin Hilman wrote:
> Dominik Haller <d.haller@phytec.de> writes:
> 
> > From: Steffen Hemer <s.hemer@phytec.de>
> > 
> > RTS pin seems to have inverted behavior on am335x, other than
> > expected
> > with default "rs485-rts-active-high" (instead of low on idle, high
> > on send,
> > it is the opposite). Transceiver datasheet also suggests a
> > pulldown.
> > Add includes to pin definitions that are used.
> > 
> > Signed-off-by: Steffen Hemer <s.hemer@phytec.de>
> 
> Series LGTM, but as the sender, we need your Signed-off-by here too.
> See the docs on submitting patches for all the details[1].
> 
> Kevin

Sure, I'll add it in a v2.

Thanks

Dominik
> 
> [1]  
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/ti/omap/am335x-regor.dtsi b/arch/arm/boot/dts/ti/omap/am335x-regor.dtsi
index 625db3bcd365..287d209a0ea9 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-regor.dtsi
+++ b/arch/arm/boot/dts/ti/omap/am335x-regor.dtsi
@@ -5,6 +5,9 @@ 
  *
  */
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/am33xx.h>
+
 / {
 	model = "Phytec AM335x phyBOARD-REGOR";
 	compatible = "phytec,am335x-regor", "phytec,am335x-phycore-som", "ti,am33xx";
@@ -188,7 +191,7 @@  uart1_rs485_pins: pinmux-uart1-rs485-pins {
 		pinctrl-single,pins = <
 			AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
 			AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
-			AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLUP, MUX_MODE0)
+			AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
 		>;
 	};
 };
@@ -198,4 +201,9 @@  &uart1 {
 	pinctrl-0 = <&uart1_rs485_pins>;
 	status = "okay";
 	linux,rs485-enabled-at-boot-time;
+	/*
+	 * un-intuitively, yet with the default (active-high),
+	 * am335x RTS is high on idle and gets low on active !
+	 */
+	rs485-rts-active-low;
 };