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.

AM5708: Linux pwm-backlight with ecap2

Part Number: AM5708

Hi

We have custom board with am5708 / SDK-05.03.00.07

The DTS file linux-4.14.79\arch\arm\boot\dts\am571x-idk.dts is modified to have

	lcd_bl: backlight {
		compatible = "pwm-backlight";
		pwms = <&ecap2 0 50000 0>;
		brightness-levels = <0 51 53 56 62 75 101 152 255>;
		default-brightness-level = <8>;
		power-supply = <&vsys_3v3>;
	};

&epwmss2 {
	status = "okay";

	ecap2: ecap@48442100 {
		status = "okay";
	};
};

\u-boot-2018.01\board\ti\am57xx\mux_data.h  is modified to have

{MMC3_CMD, (M10 | PIN_OUTPUT_PULLUP)},

after issue the command below nothing change

# cat /sys/kernel/debug/pwm
platform/48442100.ecap, 1 PWM device
pwm-0 (backlight ): requested enabled period: 50000 ns duty: 50000 ns polarity: normal
#
# cat /sys/class/backlight/backlight/brightness
8
# echo 1 > /sys/class/backlight/backlight/brightness
# cat /sys/class/backlight/backlight/brightness
1
#

Can you help to let me know what is missing?

Regards,

Scott

  • Hi Scott,

    Either me or my colleague will provide you a feedback on Monday/Tuesday next week. I do not have access to the board now to try some experiments to answer your question.

    Regards

    Karthik

  • Hi

    the issue is resolved 

    {MMC3_CMD, (M10 | PIN_OUTPUT_PULLUP)},  which is eCAP2_in_PWM2_out

    should change to ecap1 in DTS

        lcd_bl: backlight {
            compatible = "pwm-backlight";
            pwms = <&ecap1 0 50000 0>;
            brightness-levels = <0 51 53 56 62 75 101 152 255>;
            default-brightness-level = <8>;
            power-supply = <&vsys_3v3>;
        };
    
    &epwmss1 {
        status = "okay";
    
        ecap1: ecap@48440100 {
            status = "okay";
        };
    };
    
    {MMC3_CMD, (M10 | PIN_OUTPUT_PULLUP)},