[PATCH 3/3] arm64: dts: freescale: imx95-toradex-smarc: Use gpio-hog for WIFI_UART_EN

Franz Schnyder posted 3 patches 1 week, 1 day ago
There is a newer version of this series
[PATCH 3/3] arm64: dts: freescale: imx95-toradex-smarc: Use gpio-hog for WIFI_UART_EN
Posted by Franz Schnyder 1 week, 1 day ago
From: Franz Schnyder <franz.schnyder@toradex.com>

On the Toradex SMARC iMX95, the WiFi UART signals are shared with the
JTAG. The WIFI_UART_EN signal is used to select between these
two functions.

Configure the signal as gpio-hog and drive it high to select the UART
function by default. Add a label to override the hog in derived
device trees.

Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
---
 arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
index a90edefc5197..29e3f5bf867b 100644
--- a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
@@ -451,6 +451,13 @@ som_gpio_expander_1: gpio@21 {
 			"",
 			"",
 			"SMARC_SDIO_WP";
+
+		wifi_uart_en: wifi-uart-en-hog {
+			gpio-hog;
+			gpios = <12 GPIO_ACTIVE_HIGH>;
+			line-name = "WIFI_UART_EN";
+			output-high;
+		};
 	};
 
 	embedded-controller@28 {
-- 
2.43.0
Re: [PATCH 3/3] arm64: dts: freescale: imx95-toradex-smarc: Use gpio-hog for WIFI_UART_EN
Posted by Frank Li 1 week, 1 day ago
On Wed, Mar 25, 2026 at 12:55:11PM +0100, Franz Schnyder wrote:
> From: Franz Schnyder <franz.schnyder@toradex.com>
>
> On the Toradex SMARC iMX95, the WiFi UART signals are shared with the
> JTAG. The WIFI_UART_EN signal is used to select between these
> two functions.
>
> Configure the signal as gpio-hog and drive it high to select the UART
> function by default. Add a label to override the hog in derived
> device trees.

gpio hog have problem about probe order, are you sure gpio device probe
before pcie?

I have not seen any place refer to wifi_uart_en.

Frank

>
> Signed-off-by: Franz Schnyder <franz.schnyder@toradex.com>
> ---
>  arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
> index a90edefc5197..29e3f5bf867b 100644
> --- a/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx95-toradex-smarc.dtsi
> @@ -451,6 +451,13 @@ som_gpio_expander_1: gpio@21 {
>  			"",
>  			"",
>  			"SMARC_SDIO_WP";
> +
> +		wifi_uart_en: wifi-uart-en-hog {
> +			gpio-hog;
> +			gpios = <12 GPIO_ACTIVE_HIGH>;
> +			line-name = "WIFI_UART_EN";
> +			output-high;
> +		};
>  	};
>
>  	embedded-controller@28 {
> --
> 2.43.0
>
Re: [PATCH 3/3] arm64: dts: freescale: imx95-toradex-smarc: Use gpio-hog for WIFI_UART_EN
Posted by Francesco Dolcini 1 week, 1 day ago
On Wed, Mar 25, 2026 at 10:54:46AM -0400, Frank Li wrote:
> On Wed, Mar 25, 2026 at 12:55:11PM +0100, Franz Schnyder wrote:
> > From: Franz Schnyder <franz.schnyder@toradex.com>
> >
> > On the Toradex SMARC iMX95, the WiFi UART signals are shared with the
> > JTAG. The WIFI_UART_EN signal is used to select between these
> > two functions.
> >
> > Configure the signal as gpio-hog and drive it high to select the UART
> > function by default. Add a label to override the hog in derived
> > device trees.
> 
> gpio hog have problem about probe order, are you sure gpio device probe
> before pcie?

This is not about PCIe, we are talking about UART here. Specifically the
module is a combo Wi-Fi/BT device, with Wi-Fi over SDIO, and BT over
UART from NXP.

In any case, this DT is going to be used also by the boot firmware that will
configure the GPIO hog way before the Linux driver probes.

The DT files from the Linux kernel are used also by other projects.

> I have not seen any place refer to wifi_uart_en.

There is none (as of now). This is there to make it easier for a user
that needs access to debug to adjust this node enabling the JTAG
functionality.

Francesco
Re: [PATCH 3/3] arm64: dts: freescale: imx95-toradex-smarc: Use gpio-hog for WIFI_UART_EN
Posted by Frank Li 1 week, 1 day ago
On Wed, Mar 25, 2026 at 07:10:57PM +0100, Francesco Dolcini wrote:
> On Wed, Mar 25, 2026 at 10:54:46AM -0400, Frank Li wrote:
> > On Wed, Mar 25, 2026 at 12:55:11PM +0100, Franz Schnyder wrote:
> > > From: Franz Schnyder <franz.schnyder@toradex.com>
> > >
> > > On the Toradex SMARC iMX95, the WiFi UART signals are shared with the
> > > JTAG. The WIFI_UART_EN signal is used to select between these
> > > two functions.
> > >
> > > Configure the signal as gpio-hog and drive it high to select the UART
> > > function by default. Add a label to override the hog in derived
> > > device trees.
> >
> > gpio hog have problem about probe order, are you sure gpio device probe
> > before pcie?
>
> This is not about PCIe, we are talking about UART here. Specifically the
> module is a combo Wi-Fi/BT device, with Wi-Fi over SDIO, and BT over
> UART from NXP.
>
> In any case, this DT is going to be used also by the boot firmware that will
> configure the GPIO hog way before the Linux driver probes.

Commit message need show it is safe.

Frank

>
> The DT files from the Linux kernel are used also by other projects.
>
> > I have not seen any place refer to wifi_uart_en.
>
> There is none (as of now). This is there to make it easier for a user
> that needs access to debug to adjust this node enabling the JTAG
> functionality.
>
> Francesco
>