pwm-backlight.txt 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. pwm-backlight bindings
  2. Required properties:
  3. - compatible: "pwm-backlight"
  4. - pwms: OF device-tree PWM specification (see PWM binding[0])
  5. - power-supply: regulator for supply voltage
  6. Optional properties:
  7. - pwm-names: a list of names for the PWM devices specified in the
  8. "pwms" property (see PWM binding[0])
  9. - enable-gpios: contains a single GPIO specifier for the GPIO which enables
  10. and disables the backlight (see GPIO binding[1])
  11. - post-pwm-on-delay-ms: Delay in ms between setting an initial (non-zero) PWM
  12. and enabling the backlight using GPIO.
  13. - pwm-off-delay-ms: Delay in ms between disabling the backlight using GPIO
  14. and setting PWM value to 0.
  15. - brightness-levels: Array of distinct brightness levels. Typically these
  16. are in the range from 0 to 255, but any range starting at
  17. 0 will do. The actual brightness level (PWM duty cycle)
  18. will be interpolated from these values. 0 means a 0% duty
  19. cycle (darkest/off), while the last value in the array
  20. represents a 100% duty cycle (brightest).
  21. - default-brightness-level: The default brightness level (index into the
  22. array defined by the "brightness-levels" property).
  23. - num-interpolated-steps: Number of interpolated steps between each value
  24. of brightness-levels table. This way a high
  25. resolution pwm duty cycle can be used without
  26. having to list out every possible value in the
  27. brightness-level array.
  28. [0]: Documentation/devicetree/bindings/pwm/pwm.txt
  29. [1]: Documentation/devicetree/bindings/gpio/gpio.txt
  30. Example:
  31. backlight {
  32. compatible = "pwm-backlight";
  33. pwms = <&pwm 0 5000000>;
  34. brightness-levels = <0 4 8 16 32 64 128 255>;
  35. default-brightness-level = <6>;
  36. power-supply = <&vdd_bl_reg>;
  37. enable-gpios = <&gpio 58 0>;
  38. post-pwm-on-delay-ms = <10>;
  39. pwm-off-delay-ms = <10>;
  40. };
  41. Example using num-interpolation-steps:
  42. backlight {
  43. compatible = "pwm-backlight";
  44. pwms = <&pwm 0 5000000>;
  45. brightness-levels = <0 2048 4096 8192 16384 65535>;
  46. num-interpolated-steps = <2048>;
  47. default-brightness-level = <4096>;
  48. power-supply = <&vdd_bl_reg>;
  49. enable-gpios = <&gpio 58 0>;
  50. };