Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Marek Vasut" <marex@nabladev.com>
Cc: 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: Thu, 30 Jul 2026 22:58:02 +0000	[thread overview]
Message-ID: <20260730225802.A493F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730224351.95006-2-marex@nabladev.com>

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.

> 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.

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

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-30 22:58 UTC|newest]

Thread overview: 10+ 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 [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=20260730225802.A493F1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --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