I.MX6Q Custom Device Tree - Backlight not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.MX6Q Custom Device Tree - Backlight not working

1,265 Views
PaulDeMetrotion
Senior Contributor I

I have developed a custom device tree that has two LVDS outputs with independent backlights. Neither of the backlights get enabled or configured. Below is the device tree entries. Any idea what I am missing? Thanks in advance.

backlight {
backlight-0 {
compatible = "pwm-backlight";
pwms = <&pwm1 0 5000000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
enable-gpios = <&gpio1 5 0>;
};

backlight-1 {
compatible = "pwm-backlight";
pwms = <&pwm2 0 5000000>;
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <7>;
enable-gpios = <&gpio7 13 0>;
};
};

&pwm1 {

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm1>;
status = "okay";

};

&pwm2 {

pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm2>;
status = "okay";

};

pinctrl_pwm1: pwm1grp {
fsl,pins = <
MX6QDL_PAD_GPIO_9__PWM1_OUT            0x1b0b1  // backlight lvds1
>;
};

pinctrl_pwm2: pwm2grp {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT9__PWM2_OUT        0x1b0b1  // backlight lvds2
>;
};
Labels (2)
0 Kudos
2 Replies

692 Views
PaulDeMetrotion
Senior Contributor I

I have almost solved this issue. I am new to the device tree world, but I thought that the device tree configurations would set up the device according to my custom settings. I had to add code to my custom u-boot file to actually configure the PWM registers. After doing this the LVDS backlight was functional.

This leads to a larger question: How is the device tree data used by the kernel to configure the specific functions in the device? Where in the kernel boot process is the DTB file used?

0 Kudos

692 Views
igorpadykov
NXP Employee
NXP Employee

Hi Paul

for pwm dts configuration one can look at

linux-2.6-imx.git - Freescale i.MX Linux Tree

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos