AnsweredAssumed Answered

pwm wandboard dual lite

Question asked by abhay patil on Jun 22, 2020
Latest reply on Jun 22, 2020 by jamesbone

hi team,

I am using wandboard dual lite and i want to use the pwm2 for backlight in it so I changed in dtsi files as below

 

-----------------imx6qdl-wandboard-revb1.dtsi-------------

            backlight_lcd: backlight-lcd {
            compatible = "pwm-backlight";
            brightness-levels = <0 4 8 16 32 64 128 255>;
            pwms = <&pwm2 0 5000000>;
            power-supply = <&reg_3p3v>;
            default-brightness-level = <7>;
            status = "okay";
};

 

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

};

------------------imx6qdl-wandboard.dtsi--------------------------------

pinctrl_pwm2: pwm2grp {
fsl,pins = <
MX6QDL_PAD_SD1_DAT2__PWM2_OUT 0x1b0b1
>;
};

 

also I enabled the driver in 4.19 kernel

CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GENERIC=y
CONFIG_BACKLIGHT_PWM=y

CONFIG_PWM=y
CONFIG_PWM_SYSFS=y

and also removed  the lines used for usdhc1 and the &usdhc1 node

but still, I am not able to get the sysfs entry for backlight and PWM.

 

suggest me the changes to get the sysfs for backlight and PWM to control.

i also checked with making the pin as gpio MX6QDL_PAD_SD1_DAT2__GPIO1_IO19

& it works fine for me.

Outcomes