LCD Backlight device tree overlay problem

Hey there!

I’m trying to do a device tree overlay for my custom board (Colibri IMX6ULL 256MB) , but I can’t change backlight pwm and gpio pins. My device tree overlay is:

/dts-v1/;
/plugin/;

#include “imx6ull.dtsi”
#include “dt-bindings/pwm/pwm.h”

/ {
compatible = “toradex,colibri-imx6ull”,
“toradex,colibri-imx6ull-emmc”;

};

&backlight {
brightness-levels = <0 45 63 88 119 158 203 255>;
default-brightness-level = <4>;
pwms = <&pwm7 0 6666667 PWM_POLARITY_INVERTED>;
status = “okay”;
};

&pinctrl_gpio1 {
fsl,pins = <
MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10b0 /* SODIMM 77 /
MX6UL_PAD_JTAG_TCK__GPIO1_IO14 0x70a0 /
SODIMM 99 /
MX6UL_PAD_NAND_CE1_B__GPIO4_IO14 0x10b0 /
SODIMM 133 /
MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x10b0 /
SODIMM 135 /
MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x10b0 /
SODIMM 100 /
MX6UL_PAD_JTAG_TRST_B__GPIO1_IO15 0x70a0 /
SODIMM 102 /
MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x10b0 /
SODIMM 186 */
>;
};

&pinctrl_gpio_bl_on {
fsl,pins = <
MX6UL_PAD_ENET1_RX_ER__GPIO2_IO07 0x30a0 /* SODIMM 104 */
>;
};

&pwm7{
status = “okay”;

};

&lcdif {
status = “okay”;
};

&panel_dpi {
data-mapping = “bgr666”;
status = “okay”;
};

The overlay is applied, but i get:

root@colibri-imx6ull-07316921:~# dmesg | grep backlight
[ 0.113063] OF: /backlight: could not find phandle 187
[ 0.679572] OF: /backlight: could not find phandle 187
[ 0.679743] pwm-backlight backlight: unable to request PWM
[ 0.679794] pwm-backlight: probe of backlight failed with error -22

root@colibri-imx6ull-07316921:~# dmesg | grep pwm
[ 0.679688] of_pwm_get(): can’t parse “pwms” property
[ 0.679743] pwm-backlight backlight: unable to request PWM
[ 0.679794] pwm-backlight: probe of backlight failed with error -22

and the backlight folder in sysfs is empy.

I’m using: TDX Wayland with XWayland Upstream 6.3.0-devel-20230615124640+build.0 (kirkstone) colibri-imx6ull-07316921 ttymxc0
Colibri-iMX6ULL_Reference-Multimedia-Image-upstream

Have you ever faced something like that?

Best regards.

First of all I made a mistake with the gpio numeric assingnment, but the pwm problem could not be resolved by applying a device tree overlay. I recompiled the kernel, and everything works fine now.