leds-aat1290.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. * Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs
  2. The device is controlled through two pins: FL_EN and EN_SET. The pins when,
  3. asserted high, enable flash strobe and movie mode (max 1/2 of flash current)
  4. respectively. In order to add a capability of selecting the strobe signal source
  5. (e.g. CPU or camera sensor) there is an additional switch required, independent
  6. of the flash chip. The switch is controlled with pin control.
  7. Required properties:
  8. - compatible : Must be "skyworks,aat1290".
  9. - flen-gpios : Must be device tree identifier of the flash device FL_EN pin.
  10. - enset-gpios : Must be device tree identifier of the flash device EN_SET pin.
  11. Optional properties:
  12. - pinctrl-names : Must contain entries: "default", "host", "isp". Entries
  13. "default" and "host" must refer to the same pin configuration
  14. node, which sets the host as a strobe signal provider. Entry
  15. "isp" must refer to the pin configuration node, which sets the
  16. ISP as a strobe signal provider.
  17. A discrete LED element connected to the device must be represented by a child
  18. node - see Documentation/devicetree/bindings/leds/common.txt.
  19. Required properties of the LED child node:
  20. - led-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
  21. - flash-max-microamp : see Documentation/devicetree/bindings/leds/common.txt
  22. Maximum flash LED supply current can be calculated using
  23. following formula: I = 1A * 162kohm / Rset.
  24. - flash-max-timeout-us : see Documentation/devicetree/bindings/leds/common.txt
  25. Maximum flash timeout can be calculated using following
  26. formula: T = 8.82 * 10^9 * Ct.
  27. Optional properties of the LED child node:
  28. - label : see Documentation/devicetree/bindings/leds/common.txt
  29. Example (by Ct = 220nF, Rset = 160kohm and exynos4412-trats2 board with
  30. a switch that allows for routing strobe signal either from the host or from
  31. the camera sensor):
  32. #include "exynos4412.dtsi"
  33. aat1290 {
  34. compatible = "skyworks,aat1290";
  35. flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>;
  36. enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
  37. pinctrl-names = "default", "host", "isp";
  38. pinctrl-0 = <&camera_flash_host>;
  39. pinctrl-1 = <&camera_flash_host>;
  40. pinctrl-2 = <&camera_flash_isp>;
  41. camera_flash: flash-led {
  42. label = "aat1290-flash";
  43. led-max-microamp = <520833>;
  44. flash-max-microamp = <1012500>;
  45. flash-max-timeout-us = <1940000>;
  46. };
  47. };
  48. &pinctrl_0 {
  49. camera_flash_host: camera-flash-host {
  50. samsung,pins = "gpj1-0";
  51. samsung,pin-function = <1>;
  52. samsung,pin-val = <0>;
  53. };
  54. camera_flash_isp: camera-flash-isp {
  55. samsung,pins = "gpj1-0";
  56. samsung,pin-function = <1>;
  57. samsung,pin-val = <1>;
  58. };
  59. };