Tool/software: Linux
Hi,
We have a custom board, where we are using AM3352 from Sitara family. In custom board we have our LCD PWM, that has been connected to MCASP0_FSX (B13). Which is EHRPWM0B in muxmode 1. I understand Sitara supports two different types of PWM (i.e) eCAP and eHRPWM. I have already enabled eCAP and eHRPWM driver in my kernel configuration.
By refering to am335x_evm.dts, it has been found that the brightness control is connected to "eCAP0_in_PWM0_out" pin in evm kit. But in our case as it is a EHRPWM0B. So I introduced the below modification in my .dts file to support eHRPWM0 for the pin we have connected for brightness PWM control in our custom board. But no success yet. Below are the my changes in .dts file.
.dts file modifications for brightness PWM control
backlight {
compatible = "pwm-backlight";
/*pwms = <&ecap0 0 50000 0>;*/
pwms = <&ehrpwm0 0 50000 0>;
brightness-levels = <0 51 53 56 62 75 101 152 255>;
default-brightness-level = <8>;
};
ecap0_pins_default: backlight_pins {
pinctrl-single,pins = <
0x164 0x0
>;
};
ecap0_pins_sleep: ecap0_pins_sleep {
pinctrl-single,pins = <
0x164 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
/* Modification to support ehrpwm for our Custom PIN Starts*/
ehrpwm0_pins_default: backlight_pins {
pinctrl-single,pins = <
0x194 0x1
>;
};
/* Modification to support ehrpwm for our Custom PIN Ends*/
&epwmss0 {
status = "okay";
ecap0: ecap@48300100 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ecap0_pins_default>;
pinctrl-1 = <&ecap0_pins_sleep>;
};
ehrpwm0: ehrpwm@48300200 {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&ehrpwm0_pins_default>;
};
};
But I am not able to control my LCD PWM. What I am doing wrong. So if I have to configure MCASP0_FSX (B13) for our custom board what modification needs to be introduced to the .dts file.
Can any body please assist me.
Regards
Sudipta.