Re: [PATCH v8 2/7] arm64: dts: imx8mm: imx8mp: Add LVDS DTOs for Data Modul i.MX8M Mini and Plus eDM SBC
Marek Vasut <[email protected]> Sat, 1 Aug 2026 00:46:25 +0200
| Newsgroups | dev.linux.lists.imx,dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
On 7/31/26 6:36 PM, Frank Li wrote:
Hello Frank,
>> [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.
This is OK, this panel backlight supply comes from the base board in
either case.
>>> 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,
It's the comment that is wrong, the resistors in schematic are these:
- * R2=9k09 with optional series Rs=5k62 (5V) or Rt=2k21 (12V)
+ * R2=9k09 with optional series Rs=14k7 (5V) or Rt=2k94 (12V)
The regulator configuration in DT is correct. I'll fix that in V9.
Is there anything else that I should address before sending V9 ?
Thank you.