Devicetree
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: sashiko-reviews@lists.linux.dev
Cc: Marek Vasut <marex@nabladev.com>,
	robh@kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org,
	conor+dt@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v8 2/7] arm64: dts: imx8mm: imx8mp: Add LVDS DTOs for Data Modul i.MX8M Mini and Plus eDM SBC
Date: Fri, 31 Jul 2026 11:36:14 -0500	[thread overview]
Message-ID: <amzO_vv2wjOWgZXg@SMW015318> (raw)
In-Reply-To: <20260730225802.A493F1F000E9@smtp.kernel.org>

On Thu, Jul 30, 2026 at 10:58:02PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
> - [Medium] The G215HVN011 panel overlay hardcodes the adapter-specific backlight enable pin, breaking the backlight on the i.MX8MP native LVDS adapter.
> - [Low] The documented MP2328 voltage divider formulas and resistor values mathematically contradict the claimed output voltages, risking hardware damage if copied.
> --
>
> --- Patch [2]: [PATCH v8 2/7] arm64: dts: imx8mm: imx8mp: Add LVDS DTOs for Data Modul i.MX8M Mini and Plus eDM SBC ---
> commit 7f9fe59083c08b9930a9101dbccb23e4a6fbf244
> Author: Marek Vasut <marex@nabladev.com>
>
> arm64: dts: imx8mm: imx8mp: Add LVDS DTOs for Data Modul i.MX8M Mini and Plus eDM SBC
>
> Add DT overlay for the DSI-to-LVDS adapter eDM-MOD-iMX8Mm-LVDS populated
> with Lontium LT9211 bridge. This adapter can be optionally populated onto
> the eDM SBC. This adapter can be extended with multiple panels.
>
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi
> > new file mode 100644
> > index 0000000000000..3585170bd59dd
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi
> > @@ -0,0 +1,30 @@
> [ ... ]
> > +&backlight {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pinctrl_panel_backlight>;
> > +	enable-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
> > +	/* 6.5 POWER ON/OFF SEQUENCE, T6 >= 10 ms */
> [ ... ]
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso b/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso
> > new file mode 100644
> > index 0000000000000..a6d13c3609796
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso
> > @@ -0,0 +1,36 @@
> [ ... ]
> > +#include "imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi"
> > +#include "imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi"
> > +
> > +&backlight {
> > +	power-supply = <&reg_panel_bl_supply>;
> > +};
>
> [Severity: Medium]
> Will this hardcoded adapter-specific backlight enable pin break the backlight
> on the i.MX8MP native LVDS adapter?
>
> By setting enable-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>; in
> imx8mm-data-modul-edm-sbc-overlay-lvds-g215hvn011.dtsi, the adapter-specific
> gpio3 0 pin configuration leaks into the generic panel configuration.
>
> Because the native adapter overlay
> (imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds-g215hvn011.dtso)
> includes this generic panel file but fails to override enable-gpios
> (to <&gpiowifi 0 GPIO_ACTIVE_HIGH>) and remove pinctrl-0, the native adapter
> inherits the incorrect gpio3 0 pin, which may leave the backlight off.


This finial dtb

backlight {
                power-supply = <0x120>;
                pwm-off-delay-ms = <0x0a>;
                post-pwm-on-delay-ms = <0x0a>;
                enable-gpios = <0x54 0x00 0x00>;
		^^^
                pinctrl-0 = <0xbc>;
                pinctrl-names = "default";
                compatible = "pwm-backlight";
                brightness-levels = <0x00 0x01 0x0a 0x14 0x1e 0x28 0x32 0x3c 0x46 0x4b 0x50 0x5a 0x64>;
                default-brightness-level = <0x07>;
                pwms = <0x9e 0x00 0x1046a 0x00>;
                status = "okay";
                phandle = <0xa1>;
        };

At drivers/video/backlight/pwm_bl.c

get optional gpio "enable-gpios", which toggle this gpio
 <&gpiowifi 0 GPIO_ACTIVE_HIGH>, which may not impact function, but it
is potentially impact other funciton, if there pin conflict, need disable
related module.

>
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi
> > new file mode 100644
> > index 0000000000000..b06af369a9245
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx8mp-data-modul-edm-sbc-overlay-edm-sbc-imx8mp-lvds.dtsi
> > @@ -0,0 +1,79 @@
> [ ... ]
> > +	reg_panel_bl_supply: regulator-panel-bl-supply {
> [ ... ]
> > +		/*
> > +		 * MP2328 voltage divider settings:
> > +		 *   R1=51k1
> > +		 *   R2=5k62 with optional series Rs=2k21 (12V)
> > +		 *
> > +		 * 1 / Rx = (1 / R2) [ + (1 / Rs)][ + (1 / Rt)]
> > +		 * Vout = 0.5 + ((R1 / Rx) * 0.5)
> > +		 */
>
> [Severity: Low]
> Is this mathematical formula for the MP2328 correct?
>
> For the 12V backlight supply, calculating Rx in parallel (1/Rx = 1/R2 + 1/Rs)
> using R1=51.1k, R2=5.62k, and Rs=2.21k yields Rx=1.586k.

I calc it,   1/(1/5.62 + 1/2.21) = 1.586

>
> Applying that to Vout = 0.5 + ((51.1k / 1.586k) * 0.5) gives approximately
> 16.6V, not 12V.

It is correct, it is 16.6v.

According to gpios settings,

GPIO 0 1 to choose coonnect R2 and Rs

only choose Rs, it is 12v
only choose R2, it is 5v.

Not sure how to generate 3.3v and 40v,

Frank

>
> To achieve 12V, Rx needs to be exactly 2.21k, which means Rs would have to
> replace R2 rather than run in parallel with it. Is it possible the formula
> was copied from the AP63300 comment without updating the calculation method?
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260730224351.95006-1-marex@nabladev.com?part=2

  reply	other threads:[~2026-07-31 16:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 22:43 [PATCH v8 1/7] arm64: dts: imx8mp: Add DT label to SPBA5 bus Marek Vasut
2026-07-30 22:43 ` [PATCH v8 2/7] arm64: dts: imx8mm: imx8mp: Add LVDS DTOs for Data Modul i.MX8M Mini and Plus eDM SBC Marek Vasut
2026-07-30 22:58   ` sashiko-bot
2026-07-31 16:36     ` Frank Li [this message]
2026-07-30 22:43 ` [PATCH v8 3/7] arm64: dts: imx8mm: imx8mp: Add legacy board " Marek Vasut
2026-07-30 22:43 ` [PATCH v8 4/7] arm64: dts: imx8mm: imx8mp: Add HDMI " Marek Vasut
2026-07-30 22:43 ` [PATCH v8 5/7] arm64: dts: imx8mm: imx8mp: Add CM " Marek Vasut
2026-07-30 22:43 ` [PATCH v8 6/7] arm64: dts: imx8mm: imx8mp: Add FIO1 " Marek Vasut
2026-07-30 22:56   ` sashiko-bot
2026-07-30 22:43 ` [PATCH v8 7/7] arm64: dts: imx8mm: imx8mp: Add FIO1-Audio " Marek Vasut
2026-07-30 23:00   ` sashiko-bot

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=amzO_vv2wjOWgZXg@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=marex@nabladev.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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