This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LCD back-light control using PWM



Hi, 

I am using am335x customized board designed with "eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0" for back-light control of my LCD.

I am using linux 3.12 (SDK7) and defined my pinmux and dts file as below.

-----------------------------------------------------------------
ecap0_pins_default: backlight_pins {
pinctrl-single,pins = <
0x164 0x0 /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
>;
};

epwmss0: epwmss@48300000 {
status = "okay";

ecap0: ecap@48300100 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ecap0_pins_default>;
};
};
backlight {
compatible = "pwm-backlight";
pwms = <&ecap0 0 50000 0>;
brightness-levels = <0 51 53 56 62 75 101 152 255>;
default-brightness-level = <8>;
};
--------------------------------------------------------------

While booting at the start it is showing very low backlight and if i want to increase my backlight using with the below 

echo 51 > /sys/class/backlight/backlight.9/brightness
echo: write error: Invalid argument

It is not working,

when i make my backlight echo 0 > /sys/class/backlight/backlight.9/brightness is showing full backlight
if i use echo 1 > /sys/class/backlight/backlight.9/brightness it is completely off mode. There is no other fields are taking instead of 1 or 0.

my PWM is not working as PWM way, it act as a GPIO principle high or Low.

Please someone look at my issue and do the needful.

Regards,

Anil