public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
@ 2025-10-07  8:40 Primoz Fiser
  2025-10-07  8:40 ` [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay Primoz Fiser
  2025-10-24 13:30 ` [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Frank Li
  0 siblings, 2 replies; 8+ messages in thread
From: Primoz Fiser @ 2025-10-07  8:40 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: imx, linux-arm-kernel, devicetree, linux-kernel, upstream

Add overlay to enable JTAG pins on the board's JTAG (X41) connector.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
 arch/arm64/boot/dts/freescale/Makefile        |  2 ++
 .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 525ef180481d..c72a6fdc5412 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
 
+imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
 imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
 imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
 imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
 imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
new file mode 100644
index 000000000000..4744eabf95f3
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2025 PHYTEC Messtechnik GmbH
+ * Author: Primoz Fiser <primoz.fiser@norik.com>
+ */
+
+#include "imx93-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&gpio2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_jtag>;
+};
+
+&iomuxc {
+	pinctrl_jtag: jtaggrp {
+		fsl,pins = <
+			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
+			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
+			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
+			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
+		>;
+	};
+};
-- 
2.34.1



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

* [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay
  2025-10-07  8:40 [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Primoz Fiser
@ 2025-10-07  8:40 ` Primoz Fiser
  2025-10-24 10:25   ` Alberto Merciai
  2025-10-24 13:30 ` [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Frank Li
  1 sibling, 1 reply; 8+ messages in thread
From: Primoz Fiser @ 2025-10-07  8:40 UTC (permalink / raw)
  To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: imx, linux-arm-kernel, devicetree, linux-kernel, upstream

Add overlay to support PWM fan on the phyBOARD-Nash-i.MX93 board. Fan
can be connected to the FAN (X48) connector on the board and will be
controlled according to the following CPU temperature trips table:

 - bellow 50 degrees - fan is off (<1% duty cycle)
 - between 50 and 58 degrees - low fan speed (~35% duty cycle)
 - between 58 and 65 degrees - fan medium speed (~60% duty cycle)
 - above 65 degrees - fan at full speed (>99% duty cycle)

The output frequency of PWM signal is set to 25 kHz.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
 arch/arm64/boot/dts/freescale/Makefile        |  2 +
 .../imx93-phyboard-nash-pwm-fan.dtso          | 75 +++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index c72a6fdc5412..9807eb878916 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -358,11 +358,13 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
 
 imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
 imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
+imx93-phyboard-nash-pwm-fan-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-pwm-fan.dtbo
 imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
 imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
 imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-pwm-fan.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-phycore-rpmsg.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
new file mode 100644
index 000000000000..d1adf04d56d9
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
@@ -0,0 +1,75 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2025 PHYTEC Messtechnik GmbH
+ * Author: Primoz Fiser <primoz.fiser@norik.com>
+ */
+
+#include <dt-bindings/pwm/pwm.h>
+#include "imx93-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	fan0: pwm-fan {
+		compatible = "pwm-fan";
+		#cooling-cells = <2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_fan>;
+		cooling-levels = <1 90 150 200 255>;
+		pwms = <&tpm6 1 40000 PWM_POLARITY_INVERTED>;
+	};
+
+	thermal-zones {
+		cpu-thermal {
+			trips {
+				cpu_low: cpu-low {
+					hysteresis = <3000>;
+					temperature = <50000>;
+					type = "active";
+				};
+
+				cpu_med: cpu-med {
+					hysteresis = <3000>;
+					temperature = <58000>;
+					type = "active";
+				};
+
+				cpu_high: cpu-high {
+					hysteresis = <3000>;
+					temperature = <65000>;
+					type = "active";
+				};
+			};
+
+			cooling-maps {
+				map1 {
+					cooling-device = <&fan0 1 1>;
+					trip = <&cpu_low>;
+				};
+
+				map2 {
+					cooling-device = <&fan0 2 2>;
+					trip = <&cpu_med>;
+				};
+
+				map3 {
+					cooling-device = <&fan0 4 4>;
+					trip = <&cpu_high>;
+				};
+			};
+		};
+	};
+};
+
+&tpm6 {
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl_fan: fangrp {
+		fsl,pins = <
+			MX93_PAD_GPIO_IO23__TPM6_CH1	0x31e
+		>;
+	};
+};
-- 
2.34.1



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

* Re: [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay
  2025-10-07  8:40 ` [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay Primoz Fiser
@ 2025-10-24 10:25   ` Alberto Merciai
  0 siblings, 0 replies; 8+ messages in thread
From: Alberto Merciai @ 2025-10-24 10:25 UTC (permalink / raw)
  To: Primoz Fiser
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, imx,
	linux-arm-kernel, devicetree, linux-kernel, upstream

On Tue, Oct 07, 2025 at 10:40:28AM +0200, Primoz Fiser wrote:
> Add overlay to support PWM fan on the phyBOARD-Nash-i.MX93 board. Fan
> can be connected to the FAN (X48) connector on the board and will be
> controlled according to the following CPU temperature trips table:
> 
>  - bellow 50 degrees - fan is off (<1% duty cycle)
>  - between 50 and 58 degrees - low fan speed (~35% duty cycle)
>  - between 58 and 65 degrees - fan medium speed (~60% duty cycle)
>  - above 65 degrees - fan at full speed (>99% duty cycle)
> 
> The output frequency of PWM signal is set to 25 kHz.
> 
> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> ---
>  arch/arm64/boot/dts/freescale/Makefile        |  2 +
>  .../imx93-phyboard-nash-pwm-fan.dtso          | 75 +++++++++++++++++++
>  2 files changed, 77 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> 
> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> index c72a6fdc5412..9807eb878916 100644
> --- a/arch/arm64/boot/dts/freescale/Makefile
> +++ b/arch/arm64/boot/dts/freescale/Makefile
> @@ -358,11 +358,13 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
>  
>  imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
>  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
> +imx93-phyboard-nash-pwm-fan-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-pwm-fan.dtbo
>  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
>  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
>  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
> +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-pwm-fan.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phycore-rpmsg.dtb
> diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> new file mode 100644
> index 000000000000..d1adf04d56d9
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-pwm-fan.dtso
> @@ -0,0 +1,75 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> + * Author: Primoz Fiser <primoz.fiser@norik.com>
> + */
> +
> +#include <dt-bindings/pwm/pwm.h>
> +#include "imx93-pinfunc.h"
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&{/} {
> +	fan0: pwm-fan {
> +		compatible = "pwm-fan";
> +		#cooling-cells = <2>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_fan>;
> +		cooling-levels = <1 90 150 200 255>;
> +		pwms = <&tpm6 1 40000 PWM_POLARITY_INVERTED>;
> +	};
> +
> +	thermal-zones {
> +		cpu-thermal {
> +			trips {
> +				cpu_low: cpu-low {
> +					hysteresis = <3000>;
> +					temperature = <50000>;
> +					type = "active";
> +				};
> +
> +				cpu_med: cpu-med {
> +					hysteresis = <3000>;
> +					temperature = <58000>;
> +					type = "active";
> +				};
> +
> +				cpu_high: cpu-high {
> +					hysteresis = <3000>;
> +					temperature = <65000>;
> +					type = "active";
> +				};
> +			};
> +
> +			cooling-maps {
> +				map1 {
> +					cooling-device = <&fan0 1 1>;
> +					trip = <&cpu_low>;
> +				};
> +
> +				map2 {
> +					cooling-device = <&fan0 2 2>;
> +					trip = <&cpu_med>;
> +				};
> +
> +				map3 {
> +					cooling-device = <&fan0 4 4>;
> +					trip = <&cpu_high>;
> +				};
> +			};
> +		};
> +	};
> +};
> +
> +&tpm6 {
> +	status = "okay";
> +};
> +
> +&iomuxc {
> +	pinctrl_fan: fangrp {
> +		fsl,pins = <
> +			MX93_PAD_GPIO_IO23__TPM6_CH1	0x31e
> +		>;
> +	};
> +};
> -- 
> 2.34.1
> 
> 
Reviewed-by: Alberto Merciai <alb3rt0.m3rciai@gmail.com>


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

* Re: [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
  2025-10-07  8:40 [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Primoz Fiser
  2025-10-07  8:40 ` [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay Primoz Fiser
@ 2025-10-24 13:30 ` Frank Li
  2025-10-24 14:36   ` Alberto Merciai
  1 sibling, 1 reply; 8+ messages in thread
From: Frank Li @ 2025-10-24 13:30 UTC (permalink / raw)
  To: Primoz Fiser
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, imx,
	linux-arm-kernel, devicetree, linux-kernel, upstream

On Tue, Oct 07, 2025 at 10:40:27AM +0200, Primoz Fiser wrote:
> Add overlay to enable JTAG pins on the board's JTAG (X41) connector.
>
> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> ---
>  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
>  .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
>  2 files changed, 28 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
>
> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> index 525ef180481d..c72a6fdc5412 100644
> --- a/arch/arm64/boot/dts/freescale/Makefile
> +++ b/arch/arm64/boot/dts/freescale/Makefile
> @@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
>
> +imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
>  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
>  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
>  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
>  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
> +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
> diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> new file mode 100644
> index 000000000000..4744eabf95f3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> @@ -0,0 +1,26 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> + * Author: Primoz Fiser <primoz.fiser@norik.com>
> + */
> +
> +#include "imx93-pinfunc.h"
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&gpio2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_jtag>;
> +};

Use gpio to set pinctrl to no-gpio mode is strange. I am not sure if there
are better method, but at need comments here to show why have to do that.

Frank
> +
> +&iomuxc {
> +	pinctrl_jtag: jtaggrp {
> +		fsl,pins = <
> +			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
> +			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
> +			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
> +			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
> +		>;
> +	};
> +};
> --
> 2.34.1
>


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

* Re: [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
  2025-10-24 13:30 ` [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Frank Li
@ 2025-10-24 14:36   ` Alberto Merciai
  2025-10-24 16:54     ` Frank Li
  0 siblings, 1 reply; 8+ messages in thread
From: Alberto Merciai @ 2025-10-24 14:36 UTC (permalink / raw)
  To: Frank Li
  Cc: Primoz Fiser, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	imx, linux-arm-kernel, devicetree, linux-kernel, upstream

On Fri, Oct 24, 2025 at 09:30:31AM -0400, Frank Li wrote:
> On Tue, Oct 07, 2025 at 10:40:27AM +0200, Primoz Fiser wrote:
> > Add overlay to enable JTAG pins on the board's JTAG (X41) connector.
> >
> > Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> > ---
> >  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
> >  .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
> >  2 files changed, 28 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> >
> > diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> > index 525ef180481d..c72a6fdc5412 100644
> > --- a/arch/arm64/boot/dts/freescale/Makefile
> > +++ b/arch/arm64/boot/dts/freescale/Makefile
> > @@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
> >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
> >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
> >
> > +imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
> >  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
> >  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
> >  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
> >  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
> > +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
> >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
> >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
> >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> > new file mode 100644
> > index 000000000000..4744eabf95f3
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> > @@ -0,0 +1,26 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> > + * Author: Primoz Fiser <primoz.fiser@norik.com>
> > + */
> > +
> > +#include "imx93-pinfunc.h"
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +&gpio2 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pinctrl_jtag>;
> > +};
> 
> Use gpio to set pinctrl to no-gpio mode is strange. I am not sure if there
> are better method, but at need comments here to show why have to do that.
> 

In old imx6 platform we use pinctrl_hog for that purpose, is not?

> Frank
> > +
> > +&iomuxc {
> > +	pinctrl_jtag: jtaggrp {
> > +		fsl,pins = <
> > +			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
> > +			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
> > +			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
> > +			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
> > +		>;
> > +	};
> > +};
> > --
> > 2.34.1
> >
> 


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

* Re: [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
  2025-10-24 14:36   ` Alberto Merciai
@ 2025-10-24 16:54     ` Frank Li
  2025-10-28  6:23       ` Primoz Fiser
  0 siblings, 1 reply; 8+ messages in thread
From: Frank Li @ 2025-10-24 16:54 UTC (permalink / raw)
  To: Alberto Merciai
  Cc: Primoz Fiser, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	imx, linux-arm-kernel, devicetree, linux-kernel, upstream

On Fri, Oct 24, 2025 at 04:36:40PM +0200, Alberto Merciai wrote:
> On Fri, Oct 24, 2025 at 09:30:31AM -0400, Frank Li wrote:
> > On Tue, Oct 07, 2025 at 10:40:27AM +0200, Primoz Fiser wrote:
> > > Add overlay to enable JTAG pins on the board's JTAG (X41) connector.
> > >
> > > Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> > > ---
> > >  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
> > >  .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
> > >  2 files changed, 28 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> > >
> > > diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> > > index 525ef180481d..c72a6fdc5412 100644
> > > --- a/arch/arm64/boot/dts/freescale/Makefile
> > > +++ b/arch/arm64/boot/dts/freescale/Makefile
> > > @@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
> > >
> > > +imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
> > >  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
> > >  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
> > >  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
> > >  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
> > > +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
> > > diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> > > new file mode 100644
> > > index 000000000000..4744eabf95f3
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> > > @@ -0,0 +1,26 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> > > + * Author: Primoz Fiser <primoz.fiser@norik.com>
> > > + */
> > > +
> > > +#include "imx93-pinfunc.h"
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +&gpio2 {
> > > +	pinctrl-names = "default";
> > > +	pinctrl-0 = <&pinctrl_jtag>;
> > > +};
> >
> > Use gpio to set pinctrl to no-gpio mode is strange. I am not sure if there
> > are better method, but at need comments here to show why have to do that.
> >
>
> In old imx6 platform we use pinctrl_hog for that purpose, is not?

It'd better than gpio, but I am not sure if pinctrl_hog still be supported
because I have not seen it for the long time.

Frank
>
> > Frank
> > > +
> > > +&iomuxc {
> > > +	pinctrl_jtag: jtaggrp {
> > > +		fsl,pins = <
> > > +			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
> > > +			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
> > > +			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
> > > +			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
> > > +		>;
> > > +	};
> > > +};
> > > --
> > > 2.34.1
> > >
> >


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

* Re: [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
  2025-10-24 16:54     ` Frank Li
@ 2025-10-28  6:23       ` Primoz Fiser
  2025-10-28  8:23         ` Alberto Merciai
  0 siblings, 1 reply; 8+ messages in thread
From: Primoz Fiser @ 2025-10-28  6:23 UTC (permalink / raw)
  To: Frank Li, Alberto Merciai
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, imx,
	linux-arm-kernel, devicetree, linux-kernel, upstream

Hi both,

On 24. 10. 25 18:54, Frank Li wrote:
> On Fri, Oct 24, 2025 at 04:36:40PM +0200, Alberto Merciai wrote:
>> On Fri, Oct 24, 2025 at 09:30:31AM -0400, Frank Li wrote:
>>> On Tue, Oct 07, 2025 at 10:40:27AM +0200, Primoz Fiser wrote:
>>>> Add overlay to enable JTAG pins on the board's JTAG (X41) connector.
>>>>
>>>> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
>>>> ---
>>>>  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
>>>>  .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
>>>>  2 files changed, 28 insertions(+)
>>>>  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
>>>>
>>>> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
>>>> index 525ef180481d..c72a6fdc5412 100644
>>>> --- a/arch/arm64/boot/dts/freescale/Makefile
>>>> +++ b/arch/arm64/boot/dts/freescale/Makefile
>>>> @@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
>>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
>>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
>>>>
>>>> +imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
>>>>  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
>>>>  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
>>>>  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
>>>>  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
>>>> +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
>>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
>>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
>>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
>>>> diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
>>>> new file mode 100644
>>>> index 000000000000..4744eabf95f3
>>>> --- /dev/null
>>>> +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
>>>> @@ -0,0 +1,26 @@
>>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>>>> +/*
>>>> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
>>>> + * Author: Primoz Fiser <primoz.fiser@norik.com>
>>>> + */
>>>> +
>>>> +#include "imx93-pinfunc.h"
>>>> +
>>>> +/dts-v1/;
>>>> +/plugin/;
>>>> +
>>>> +&gpio2 {
>>>> +	pinctrl-names = "default";
>>>> +	pinctrl-0 = <&pinctrl_jtag>;
>>>> +};
>>>
>>> Use gpio to set pinctrl to no-gpio mode is strange. I am not sure if there
>>> are better method, but at need comments here to show why have to do that.
>>>
>>
>> In old imx6 platform we use pinctrl_hog for that purpose, is not?
> 
> It'd better than gpio, but I am not sure if pinctrl_hog still be supported
> because I have not seen it for the long time.
> 

I am OK with both suggestions:

1) adding an explanation comment
2) Using pinctrl_hog method

Personally however, I would prefer method 1) since it would be better in
this case because base customer dts can already contain default
pinctrl_hog which would be overwritten by this overlay.

Not that common, but can still happen.

What do you suggest for v2?

BR,
Primoz

> Frank
>>
>>> Frank
>>>> +
>>>> +&iomuxc {
>>>> +	pinctrl_jtag: jtaggrp {
>>>> +		fsl,pins = <
>>>> +			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
>>>> +			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
>>>> +			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
>>>> +			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
>>>> +		>;
>>>> +	};
>>>> +};
>>>> --
>>>> 2.34.1
>>>>
>>>

-- 
Primoz Fiser
phone: +386-41-390-545
email: primoz.fiser@norik.com
--
Norik systems d.o.o.
Your embedded software partner
Slovenia, EU
phone: +386-41-540-545
email: info@norik.com



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

* Re: [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay
  2025-10-28  6:23       ` Primoz Fiser
@ 2025-10-28  8:23         ` Alberto Merciai
  0 siblings, 0 replies; 8+ messages in thread
From: Alberto Merciai @ 2025-10-28  8:23 UTC (permalink / raw)
  To: Primoz Fiser
  Cc: Frank Li, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	imx, linux-arm-kernel, devicetree, linux-kernel, upstream

On Tue, Oct 28, 2025 at 07:23:57AM +0100, Primoz Fiser wrote:
> Hi both,
> 
> On 24. 10. 25 18:54, Frank Li wrote:
> > On Fri, Oct 24, 2025 at 04:36:40PM +0200, Alberto Merciai wrote:
> >> On Fri, Oct 24, 2025 at 09:30:31AM -0400, Frank Li wrote:
> >>> On Tue, Oct 07, 2025 at 10:40:27AM +0200, Primoz Fiser wrote:
> >>>> Add overlay to enable JTAG pins on the board's JTAG (X41) connector.
> >>>>
> >>>> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> >>>> ---
> >>>>  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
> >>>>  .../freescale/imx93-phyboard-nash-jtag.dtso   | 26 +++++++++++++++++++
> >>>>  2 files changed, 28 insertions(+)
> >>>>  create mode 100644 arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> >>>>
> >>>> diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
> >>>> index 525ef180481d..c72a6fdc5412 100644
> >>>> --- a/arch/arm64/boot/dts/freescale/Makefile
> >>>> +++ b/arch/arm64/boot/dts/freescale/Makefile
> >>>> @@ -356,10 +356,12 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-kontron-bl-osm-s.dtb
> >>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash.dtb
> >>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin.dtb
> >>>>
> >>>> +imx93-phyboard-nash-jtag-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-jtag.dtbo
> >>>>  imx93-phyboard-nash-peb-wlbt-07-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-nash-peb-wlbt-07.dtbo
> >>>>  imx93-phyboard-segin-peb-eval-01-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-eval-01.dtbo
> >>>>  imx93-phyboard-segin-peb-wlbt-05-dtbs += imx93-phyboard-segin.dtb imx93-phyboard-segin-peb-wlbt-05.dtbo
> >>>>  imx93-phycore-rpmsg-dtbs += imx93-phyboard-nash.dtb imx93-phyboard-segin.dtb imx93-phycore-rpmsg.dtbo
> >>>> +dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-jtag.dtb
> >>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-nash-peb-wlbt-07.dtb
> >>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-eval-01.dtb
> >>>>  dtb-$(CONFIG_ARCH_MXC) += imx93-phyboard-segin-peb-wlbt-05.dtb
> >>>> diff --git a/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> >>>> new file mode 100644
> >>>> index 000000000000..4744eabf95f3
> >>>> --- /dev/null
> >>>> +++ b/arch/arm64/boot/dts/freescale/imx93-phyboard-nash-jtag.dtso
> >>>> @@ -0,0 +1,26 @@
> >>>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> >>>> +/*
> >>>> + * Copyright (C) 2025 PHYTEC Messtechnik GmbH
> >>>> + * Author: Primoz Fiser <primoz.fiser@norik.com>
> >>>> + */
> >>>> +
> >>>> +#include "imx93-pinfunc.h"
> >>>> +
> >>>> +/dts-v1/;
> >>>> +/plugin/;
> >>>> +
> >>>> +&gpio2 {
> >>>> +	pinctrl-names = "default";
> >>>> +	pinctrl-0 = <&pinctrl_jtag>;
> >>>> +};
> >>>
> >>> Use gpio to set pinctrl to no-gpio mode is strange. I am not sure if there
> >>> are better method, but at need comments here to show why have to do that.
> >>>
> >>
> >> In old imx6 platform we use pinctrl_hog for that purpose, is not?
> > 
> > It'd better than gpio, but I am not sure if pinctrl_hog still be supported
> > because I have not seen it for the long time.
> > 
> 
> I am OK with both suggestions:
> 
> 1) adding an explanation comment
> 2) Using pinctrl_hog method
> 
> Personally however, I would prefer method 1) since it would be better in
> this case because base customer dts can already contain default
> pinctrl_hog which would be overwritten by this overlay.

Good point, that is true.

> 
> Not that common, but can still happen.
> 
> What do you suggest for v2? 

I would say 1, IMO explaining that with a comments is the most
explicit way to do that.

BR,
Alberto

> 
> BR,
> Primoz
> 
> > Frank
> >>
> >>> Frank
> >>>> +
> >>>> +&iomuxc {
> >>>> +	pinctrl_jtag: jtaggrp {
> >>>> +		fsl,pins = <
> >>>> +			MX93_PAD_GPIO_IO24__JTAG_MUX_TDO	0x31e
> >>>> +			MX93_PAD_GPIO_IO25__JTAG_MUX_TCK	0x31e
> >>>> +			MX93_PAD_GPIO_IO26__JTAG_MUX_TDI	0x31e
> >>>> +			MX93_PAD_GPIO_IO27__JTAG_MUX_TMS	0x31e
> >>>> +		>;
> >>>> +	};
> >>>> +};
> >>>> --
> >>>> 2.34.1
> >>>>
> >>>
> 
> -- 
> Primoz Fiser
> phone: +386-41-390-545
> email: primoz.fiser@norik.com
> --
> Norik systems d.o.o.
> Your embedded software partner
> Slovenia, EU
> phone: +386-41-540-545
> email: info@norik.com
> 


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

end of thread, other threads:[~2025-10-28  8:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-07  8:40 [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Primoz Fiser
2025-10-07  8:40 ` [PATCH 2/2] arm64: dts: freescale: imx93-phyboard-nash: Add pwm-fan overlay Primoz Fiser
2025-10-24 10:25   ` Alberto Merciai
2025-10-24 13:30 ` [PATCH 1/2] arm64: dts: freescale: imx93-phyboard-nash: Add jtag overlay Frank Li
2025-10-24 14:36   ` Alberto Merciai
2025-10-24 16:54     ` Frank Li
2025-10-28  6:23       ` Primoz Fiser
2025-10-28  8:23         ` Alberto Merciai

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