From: Frieder Schrempf <frieder@fris.de>
To: linux-arm-kernel@lists.infradead.org,
Conor Dooley <conor+dt@kernel.org>,
devicetree@vger.kernel.org, imx@lists.linux.dev,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
linux-kernel@vger.kernel.org, Rob Herring <robh@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>
Cc: Eberhard Stoll <eberhard.stoll@kontron.de>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Fabio Estevam <festevam@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: [PATCH 03/12] arm64: dts: imx8mm-kontron: Use GPIO for RS485 transceiver control
Date: Mon, 14 Jul 2025 16:17:29 +0200 [thread overview]
Message-ID: <20250714141852.116455-4-frieder@fris.de> (raw)
In-Reply-To: <20250714141852.116455-1-frieder@fris.de>
From: Eberhard Stoll <eberhard.stoll@kontron.de>
For this IP the correct control of the CTS signal for transceiver direction
switching is difficult and - maybe also buggy - in the driver. Especially
the bootup requires special handling for most hardware implementations.
Therefore we simply use a GPIO now, which is fully under software control
and which is not problematic on bootup.
Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts b/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts
index d16490d876874..d96c07757e1d2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-kontron-bl.dts
@@ -268,8 +268,16 @@ &uart1 {
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
+ /*
+ * During bootup the CTS needs to stay LOW, which is only possible if this
+ * pin is controlled by a GPIO. The UART IP always sets CTS to HIGH if not
+ * running. So using 'uart-has-rtscts' is not a good choice here! There are
+ * workarounds for this, but they introduce unneccessary complexity and are
+ * therefore avoided here. For more information about this see:
+ * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=79d0224f6bf296d04cd843cfc49921b19c97bb09
+ */
+ rts-gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
linux,rs485-enabled-at-boot-time;
- uart-has-rtscts;
status = "okay";
};
@@ -439,7 +447,7 @@ pinctrl_uart2: uart2grp {
MX8MM_IOMUXC_SAI3_TXFS_UART2_DCE_RX 0x0
MX8MM_IOMUXC_SAI3_TXC_UART2_DCE_TX 0x0
MX8MM_IOMUXC_SAI3_RXD_UART2_DCE_RTS_B 0x0
- MX8MM_IOMUXC_SAI3_RXC_UART2_DCE_CTS_B 0x0
+ MX8MM_IOMUXC_SAI3_RXC_GPIO4_IO29 0x19
>;
};
--
2.50.1
next prev parent reply other threads:[~2025-07-14 14:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 14:17 [PATCH 00/12] Misc fixups and changes for Kontron i.MX8M and i.MX93 DTs Frieder Schrempf
2025-07-14 14:17 ` [PATCH 01/12] arm64: dts: imx8mm-kontron: Add overlay for LTE extension board Frieder Schrempf
2025-07-14 14:17 ` [PATCH 02/12] arm64: dts: imx8mm-kontron: Remove unused regulator Frieder Schrempf
2025-07-14 14:17 ` Frieder Schrempf [this message]
2025-07-14 14:17 ` [PATCH 04/12] arm64: dts: imx8mm-kontron: Add Sitronix touch controller in DL devicetree Frieder Schrempf
2025-07-14 16:21 ` Fabio Estevam
2025-07-15 6:39 ` Frieder Schrempf
2025-07-14 14:17 ` [PATCH 05/12] arm64: dts: imx8mm-kontron: Sort reg nodes alphabetically Frieder Schrempf
2025-07-14 14:17 ` [PATCH 06/12] arm64: dts: imx8mm-kontron: Name USB regulators according to OSM scheme Frieder Schrempf
2025-07-14 14:17 ` [PATCH 07/12] arm64: dts: imx8mp-kontron: Fix CAN_ADDR0 and CAN_ADDR1 GPIOs Frieder Schrempf
2025-07-14 14:17 ` [PATCH 08/12] arm64: dts: imx8mp-kontron: Fix GPIO labels for latest BL board Frieder Schrempf
2025-07-14 14:17 ` [PATCH 09/12] arm64: dts: imx8mp-kontron: Fix USB hub reset Frieder Schrempf
2025-07-14 14:17 ` [PATCH 10/12] arm64: dts: imx93-kontron: Add RTC interrupt signal Frieder Schrempf
2025-07-16 6:21 ` Primoz Fiser
2025-07-16 6:28 ` Frieder Schrempf
2025-07-14 14:17 ` [PATCH 11/12] arm64: dts: imx93-kontron: Fix GPIO for panel regulator Frieder Schrempf
2025-07-14 14:17 ` [PATCH 12/12] arm64: dts: imx93-kontron: Fix USB port assignment Frieder Schrempf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250714141852.116455-4-frieder@fris.de \
--to=frieder@fris.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=eberhard.stoll@kontron.de \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).