mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Leonardo Costa <leoreis.costa@gmail.com>
Cc: Frank.Li@nxp.com, s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, ernest.vanhoecke@toradex.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Leonardo Costa <leonardo.costa@toradex.com>
Subject: Re: [PATCH 6/6] arm64: dts: freescale: imx8mp-verdin: Add Mezzanine with Toradex Display 10.1" LVDS V2
Date: Wed, 21 Oct 2026 09:56:06 -0500	[thread overview]
Message-ID: <atjShkhCdLzf921d@SMW015318> (raw)
In-Reply-To: <t77enz5e4sywcigwdjwpes66jywhtsruzrtf7opde2umfuaock@3aouga4ng3gc>

On Wed, Oct 21, 2026 at 07:39:36AM -0300, Leonardo Costa wrote:
> Hi Frank,
>
> On Thu, Aug 13, 2026 at 11:15:04AM -0500, Frank Li wrote:
> > On Thu, Aug 13, 2026 at 12:43:29PM -0300, Leonardo Costa wrote:
> > > On Thu, Aug 13, 2026 at 09:58:52AM -0500, Frank Li wrote:
> > > > On Thu, Aug 13, 2026 at 10:33:35AM -0300, Leonardo Costa wrote:
> > > > > From: Leonardo Costa <leonardo.costa@toradex.com>
> > > > >
> > > > > Add a device tree overlay enabling the Toradex Capacitive Touch Display
> > > > > 10.1" LVDS V2 on the Verdin Development Board with Verdin iMX8M Plus
> > > > > Mezzanine expansion board. The panel connects via the i.MX8M Plus LCDIF
> > > > > on the Mezzanine LVDS interface (J10). The panel is an Opto Logic
> > > > > SCX1001511GGC49 10.1" WXGA TFT LCD LVDS and the touch input is provided
> > > > > by an ILITEK ILI251x capacitive touch controller.
> > > > >
> > > > > Link: https://developer.toradex.com/hardware/accessories/displays/capacitive-touch-display-101inch-lvds
> > > > > Link: https://developer.toradex.com/hardware/verdin-som-family/add-ons/verdin-imx8m-plus-mezzanine
> > > > > Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
> > > > > ---
> > > >
> > > > what's difference with Add Toradex Capacitive Touch Display 10.1" LVDS V2
> > > >
> > > > why not share one dtso?
> > > >
> > > > Frank
> > >
> > > Hi Frank,
> > >
> > > There are two main differences:
> > >
> > > 1. The mezzanine one uses different backlight controll pins, so here we
> > > use the 'backlight-mezzanine' node, instead of the 'backlight' one, used
> > > in the one without the mezzanine.
> > >
> > > 2. The touchscreen GPIO and interrupt pins are also different with the
> > > mezzanine board.
> >
> >
> > And there are for imx8mm
> > https://lore.kernel.org/imx/20260724-v1-verdin-imx8mm-dtbos-v2-3-9d7988bd76f6@toradex.com/
> >
> > https://lore.kernel.org/imx/sr26lfvwasgcosfzcf4ydtwxwjjutlio2yqpgxldatpzjo7e4y@77k7gefnjzvl/
> >
> > Any ways, it is too late for 7.3, we have enough time for 7.4 to discuss
> > work on optimization solution.
> >
> > If use nexus connectors, we can share one dtso now if there are not
> > clock settings.
> >
> > clock patches is close to pick up
> > https://lore.kernel.org/all/20260807-schneider-v7-2-rc1-eip201-upstream-v5-1-8785f9531cf0@bootlin.com/
> >
> > Frank
>
> We tried to make the change to have a single overlay for the boards with and
> without the Mezzanine. However, in the current state of nexus connectors, this
> can't be done cleanly yet. When trying to describe the hardware at the level it
> exists in, following DT guidelines, and using nexus connectors, we still need
> two separate overlays to enable the native LVDS with and without the Mezzanine,
> so we don't really reduce the maintenance effort.
>
> See the changes at the end of the email, this is the closest we got to a
> correct and clean implementation that would allow the usage of a single
> overlay.
>
> The root cause of the issue is that we need to claim pinctrl_i2s_2_d_in_gpio
> and pinctrl_i2s_2_sync_gpio for the touchscreen on the Mallow Carrier Board.
> Ideally, they would be defined in the nexus connector, as shown in the diff.
> However, after enabling the connectors in the overlay, the pinctrl groups
> remain unclaimed. The reason is that nexus connectors have no driver to claim
> the groups.
>
>     root@verdin-imx8mp-14777535:~# cat /sys/kernel/debug/pinctrl/30330000.pinctrl/pinmux-pins
>     ...
>     pin 112 (MX8MP_IOMUXC_SAI3_RXD): (MUX UNCLAIMED) (GPIO UNCLAIMED)
>     pin 113 (MX8MP_IOMUXC_SAI3_TXFS): (MUX UNCLAIMED) (GPIO UNCLAIMED)
>     ...
>
> There is nowhere else in the carrier dtsi's where the pinctrls belong.
>
> The pinctrl groups thus need to be added to the touchscreen node defined in the
> overlay. However, the pins on the Development Board (which uses the Mezzanine)
> are muxed by pinctrl_gpio2 and pinctrl_gpio3. These groups are in the SoM dtsi,
> and we cannot claim them in the overlay. Because of this, the Mezzanine needs
> a different overlay, which doesn't claim any pinctrl.

I met similar problem, see below.

>
> We like the idea of a single overlay for both carriers, but sadly the nexus
> connectors, as they currently are, are not ready to enable this. We therefore
> have to move forward normally and once connector support matures, we're happy
> to refactor this and try to reduce the amount of overlays for the Verdin iMX8MP
> and for other modules.
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi
> index 72a4f846d694..d73a7e9042ea 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dev.dtsi
> @@ -4,6 +4,41 @@
>   */
>
>  / {
> +	lvds_connector: lvds-mezzanine-connector {
> +		compatible = "toradex,lvds-connector";
> +		#gpio-cells = <2>;
> +		/* LVDS_BKL_EN_CON - Verdin GPIO 4 (SODIMM 212) */
> +		gpio-map = <0 0 &gpio1 6 0>;
> +		gpio-map-mask = <0xffffffff 0x0>;
> +		gpio-map-pass-thru = <0x0 0xffffffff>;
> +
> +		#pwm-cells = <3>;
> +		/* LVDS_PWM_CON - Verdin PWM_2 (SODIMM 16) */
> +		pwm-map = <0 0 0 &pwm2 0 0 0>;
> +		pwm-map-mask = <0x0 0x0 0x0>;
> +		pwm-map-pass-thru = <0x0 0xffffffff 0xffffffff>;
> +
> +		status = "disabled";
> +	};
> +
> +	touch_connector: touch-mezzanine-connector {
> +		compatible = "toradex,touch-connector";
> +		#gpio-cells = <2>;
> +		/* LVDS_TOUCH_RESET_CON# - Verdin GPIO_2 (SODIMM 208) */
> +		gpio-map = <0 0 &gpio1 1 0>;
> +		gpio-map-mask = <0xffffffff 0x0>;
> +		gpio-map-pass-thru = <0x0 0xffffffff>;
> +
> +		#address-cells = <0>;
> +		#interrupt-cells = <2>;
> +		/* LVDS_TOUCH_INT_CON# - Verdin GPIO_3 (SODIMM 210) */
> +		interrupt-map = <0 IRQ_TYPE_EDGE_FALLING &gpio1 5 IRQ_TYPE_EDGE_FALLING>,
> +				<0 IRQ_TYPE_EDGE_RISING &gpio1 5 IRQ_TYPE_EDGE_RISING>;
> +		interrupt-map-mask = <0xffffffff 0xffffffff>;
> +
> +		status = "disabled";
> +	};
> +
>  	native-hdmi-connector {
>  		compatible = "hdmi-connector";
>  		label = "X37";
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-mallow.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-mallow.dtsi
> index 846b36706821..736f034c7550 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-mallow.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-mallow.dtsi
> @@ -11,6 +11,46 @@
>  #include <dt-bindings/leds/common.h>
>
>  / {
> +	lvds_connector: lvds-connector {
> +		compatible = "toradex,lvds-connector";
> +
> +		#gpio-cells = <2>;
> +		/* LVDS_BKL_EN_CON - Verdin I2S_2_D_OUT as GPIO (SODIMM 46) */
> +		gpio-map = <0 0 &gpio5 1 0>;
> +		gpio-map-mask = <0xffffffff 0x0>;
> +		gpio-map-pass-thru = <0x0 0xffffffff>;
> +
> +		#pwm-cells = <3>;
> +		/* LVDS_PWM_CON - Verdin PWM_2 (SODIMM 16) */
> +		pwm-map = <0 0 0 &pwm2 0 0 0>;
> +		pwm-map-mask = <0x0 0x0 0x0>;
> +		pwm-map-pass-thru = <0x0 0xffffffff 0xffffffff>;
> +
> +		status = "disabled";
> +	};
> +
> +	touch_connector: touch-connector {
> +		compatible = "toradex,touch-connector";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_i2s_2_d_in_gpio>,
> +			    <&pinctrl_i2s_2_sync_gpio>;

Thank you try this method.  Can make a pre-defined label for it, such
such as touch_conn0_pinctrl_gpio0, touch_conn0_pinctrl_gpio1, ....

So touch overlay use this label directly, like other port, i2c ...

After nexus improve by support mapping pinctrl, only few line needs be
changes.

The bad things is that it need define NULL pintctrl for i2c gpio expander.

It is worth to try.

Frank

> +
> +		#gpio-cells = <2>;
> +		/* LVDS_TOUCH_RESET_CON# - Verdin I2S_2_D_IN as GPIO (SODIMM 48) */
> +		gpio-map = <0 0 &gpio4 30 0>;
> +		gpio-map-mask = <0xffffffff 0x0>;
> +		gpio-map-pass-thru = <0x0 0xffffffff>;
> +
> +		#address-cells = <0>;
> +		#interrupt-cells = <2>;
> +		/* LVDS_TOUCH_INT_CON# - Verdin I2S_2_SYNC as GPIO (SODIMM 44) */
> +		interrupt-map = <0 IRQ_TYPE_EDGE_FALLING &gpio4 31 IRQ_TYPE_EDGE_FALLING>,
> +				<0 IRQ_TYPE_EDGE_RISING &gpio4 31 IRQ_TYPE_EDGE_RISING>;
> +		interrupt-map-mask = <0xffffffff 0xffffffff>;
> +
> +		status = "disabled";
> +	};
> +
>  	native-hdmi-connector {
>  		compatible = "hdmi-connector";
>  		label = "X14";
> @@ -159,6 +199,16 @@ &i2c5 {
>  	status = "okay";
>  };
>
> +&iomuxc {
> +	pinctrl_i2s_2_d_in_gpio: gpio4io30grp {
> +		fsl,pins = <MX8MP_IOMUXC_SAI3_RXD__GPIO4_IO30 0x1c4>;   /* SODIMM 48 */
> +	};
> +
> +	pinctrl_i2s_2_sync_gpio: gpio4io31grp {
> +		fsl,pins = <MX8MP_IOMUXC_SAI3_TXFS__GPIO4_IO31 0x184>;  /* SODIMM 44 */
> +	};
> +};
> +
>  &lcdif3 {
>  	status = "okay";
>  };
>
> ---
>
> Best regards,
> Leonardo

      reply	other threads:[~2026-10-21 14:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 13:33 [PATCH 0/6] arm64: dts: freescale: imx8mp-verdin: Add Toradex Capacitive Touch Display 10.1" LVDS V1 and V2 Leonardo Costa
2026-08-13 13:33 ` [PATCH 1/6] arm64: dts: freescale: imx8mp-verdin: Add Toradex Capacitive Touch Display 10.1" LVDS Leonardo Costa
2026-08-13 13:33 ` [PATCH 2/6] arm64: dts: freescale: imx8mp-verdin: Add Toradex DSI to LVDS adapter with 10.1" display Leonardo Costa
2026-08-13 13:33 ` [PATCH 3/6] arm64: dts: freescale: imx8mp-verdin: Add Mezzanine with Toradex Display 10.1" LVDS Leonardo Costa
2026-08-13 13:33 ` [PATCH 4/6] arm64: dts: freescale: imx8mp-verdin: Add Toradex Capacitive Touch Display 10.1" LVDS V2 Leonardo Costa
2026-08-13 13:33 ` [PATCH 5/6] arm64: dts: freescale: imx8mp-verdin: Add Toradex DSI to LVDS adapter with the 10.1" V2 display Leonardo Costa
2026-08-13 13:33 ` [PATCH 6/6] arm64: dts: freescale: imx8mp-verdin: Add Mezzanine with Toradex Display 10.1" LVDS V2 Leonardo Costa
2026-08-13 14:58   ` Frank Li
2026-08-13 15:43     ` Leonardo Costa
2026-08-13 16:15       ` Frank Li
2026-08-18 18:08         ` Leonardo Costa
2026-08-18 18:53           ` Frank Li
2026-08-19 11:56             ` Leonardo Costa
2026-08-19 14:18               ` Frank Li
2026-09-03 16:36                 ` Leonardo Costa
2026-10-21 10:39         ` Leonardo Costa
2026-10-21 14:56           ` Frank Li [this message]

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=atjShkhCdLzf921d@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ernest.vanhoecke@toradex.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=leonardo.costa@toradex.com \
    --cc=leoreis.costa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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

all inboxes | Powered by JetHome®