Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 148998

Forum Post: AM335x Using the second PWM node in the SS to control the backlight

$
0
0

I have a design based on the AM335x EVM but it has more nodes in each PWM subsystem. The backlight in the EVM's device tree shows it's using the ecap0 pwm as seen here:

 backlight {   compatible = "pwm-backlight";   pwms = <&ecap0 0 50000 0>;

And that ecap0 phandle is set up in the epwmss0 node here: 

  epwmss0: epwmss@48300000 {    status = "okay";     ecap0: ecap@48300100 {     status = "okay";

So that's fine, and pretty straight forward, the ecap0 has 1 PWM output so we can use that for display brightness.

Now our design instead uses the eHRPWM from PWMSS1. The eHRPWM is capable of outputting 2 different PWMs (A and B). So I set up the pin muxing for each PWM here:

  ehrpwm1_pins: ehrpwm1_pins {    pinctrl-single,pins = <     0x04C (PIN_OUTPUT | MUX_MODE6) /* gpmc_a3.ehrpwm1b */     0x048 (PIN_OUTPUT | MUX_MODE6) /* gpmc_a2.ehrpwm1a */    >;   };

And then I tied those pin muxes to the subsystem here:

  epwmss1: epwmss@48302000 {    status = "okay";     ehrpwm1: ehrpwm@48302200 {     status = "okay";     pinctrl-names = "default";     pinctrl-0 = <&ehrpwm1_pins>;    };   };

 Now I want to use ehrpwm1A not 1B for my display (ehrpwm1B will be used for a LED). However when I set up my backlight node I have this:

 backlight {   compatible = "pwm-backlight";   pwms = <&ehrpwm1 0 50000 0>;

However I couldn't figure out if this would select ehrpwm1A or 1B. The documentation wasn't quite clear to me on this pwms parameter. Could I please get some clarification on how this works?

 


Viewing all articles
Browse latest Browse all 148998

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>