Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings
@ 2024-07-25 14:19 Dominik Haller
  2024-07-25 14:19 ` [PATCH 2/2] ARM: dts: ti: omap: am335x-wega: Fix audio clock provider Dominik Haller
  2024-07-29 20:14 ` [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Kevin Hilman
  0 siblings, 2 replies; 4+ messages in thread
From: Dominik Haller @ 2024-07-25 14:19 UTC (permalink / raw)
  To: khilman, tony, s.hemer, linux-omap; +Cc: upstream, d.haller

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(-)

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;
 };
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ARM: dts: ti: omap: am335x-wega: Fix audio clock provider
  2024-07-25 14:19 [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Dominik Haller
@ 2024-07-25 14:19 ` Dominik Haller
  2024-07-29 20:14 ` [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Kevin Hilman
  1 sibling, 0 replies; 4+ messages in thread
From: Dominik Haller @ 2024-07-25 14:19 UTC (permalink / raw)
  To: khilman, tony, s.hemer, linux-omap; +Cc: upstream, d.haller

Bit clock and frame clock are provided by the mcasp. Change the
simple card settings regarding the clock provider and the mclk-fs for
usage with typical 44.1 kHz and 48 kHz sample rates.

Signed-off-by: Dominik Haller <d.haller@phytec.de>
---
 arch/arm/boot/dts/ti/omap/am335x-wega.dtsi | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/ti/omap/am335x-wega.dtsi b/arch/arm/boot/dts/ti/omap/am335x-wega.dtsi
index cb27ff464dbe..d0c290d7d062 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-wega.dtsi
+++ b/arch/arm/boot/dts/ti/omap/am335x-wega.dtsi
@@ -14,7 +14,7 @@ sound: sound {
 		simple-audio-card,format = "i2s";
 		simple-audio-card,bitclock-master = <&sound_iface_main>;
 		simple-audio-card,frame-master = <&sound_iface_main>;
-		simple-audio-card,mclk-fs = <32>;
+		simple-audio-card,mclk-fs = <512>;
 		simple-audio-card,widgets =
 					"Line", "Line In",
 					"Line", "Line Out",
@@ -27,13 +27,12 @@ sound: sound {
 					"LINE1L", "Line In",
 					"LINE1R", "Line In";
 
-		simple-audio-card,cpu {
+		sound_iface_main: simple-audio-card,cpu {
 			sound-dai = <&mcasp0>;
 		};
 
-		sound_iface_main: simple-audio-card,codec {
+		simple-audio-card,codec {
 			sound-dai = <&tlv320aic3007>;
-			clocks = <&mcasp0_fck>;
 		};
 
 	};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings
  2024-07-25 14:19 [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Dominik Haller
  2024-07-25 14:19 ` [PATCH 2/2] ARM: dts: ti: omap: am335x-wega: Fix audio clock provider Dominik Haller
@ 2024-07-29 20:14 ` Kevin Hilman
  2024-07-30  9:07   ` Dominik Haller
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2024-07-29 20:14 UTC (permalink / raw)
  To: Dominik Haller, tony, s.hemer, linux-omap; +Cc: upstream, d.haller

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings
  2024-07-29 20:14 ` [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Kevin Hilman
@ 2024-07-30  9:07   ` Dominik Haller
  0 siblings, 0 replies; 4+ messages in thread
From: Dominik Haller @ 2024-07-30  9:07 UTC (permalink / raw)
  To: tony@atomide.com, Steffen Hemer, khilman@baylibre.com,
	linux-omap@vger.kernel.org
  Cc: PHYTEC Upstream

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-30  9:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 14:19 [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Dominik Haller
2024-07-25 14:19 ` [PATCH 2/2] ARM: dts: ti: omap: am335x-wega: Fix audio clock provider Dominik Haller
2024-07-29 20:14 ` [PATCH 1/2] ARM: dts: ti: omap: am335x-regor: Fix RS485 settings Kevin Hilman
2024-07-30  9:07   ` Dominik Haller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox