0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/leds/skyworks,aat1290.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs
0008
0009 maintainers:
0010 - Jacek Anaszewski <jacek.anaszewski@gmail.com>
0011 - Krzysztof Kozlowski <krzk@kernel.org>
0012
0013 description: |
0014 The device is controlled through two pins:: FL_EN and EN_SET. The pins when,
0015 asserted high, enable flash strobe and movie mode (max 1/2 of flash current)
0016 respectively. In order to add a capability of selecting the strobe signal
0017 source (e.g. CPU or camera sensor) there is an additional switch required,
0018 independent of the flash chip. The switch is controlled with pin control.
0019
0020 properties:
0021 compatible:
0022 const: skyworks,aat1290
0023
0024 enset-gpios:
0025 maxItems: 1
0026 description: EN_SET pin
0027
0028 flen-gpios:
0029 maxItems: 1
0030 description: FL_EN pin
0031
0032 led:
0033 $ref: common.yaml#
0034 unevaluatedProperties: false
0035
0036 properties:
0037 led-max-microamp: true
0038
0039 flash-max-microamp:
0040 description: |
0041 Maximum flash LED supply current can be calculated using following
0042 formula:: I = 1A * 162 kOhm / Rset.
0043
0044 flash-max-timeout-us:
0045 description: |
0046 Maximum flash timeout can be calculated using following formula::
0047 T = 8.82 * 10^9 * Ct.
0048
0049 required:
0050 - flash-max-microamp
0051 - flash-max-timeout-us
0052 - led-max-microamp
0053
0054 pinctrl-names:
0055 items:
0056 - const: default
0057 - const: host
0058 - const: isp
0059
0060 pinctrl-0: true
0061 pinctrl-1: true
0062 pinctrl-2: true
0063
0064 required:
0065 - compatible
0066 - enset-gpios
0067 - flen-gpios
0068 - led
0069
0070 additionalProperties: false
0071
0072 examples:
0073 - |
0074 #include <dt-bindings/gpio/gpio.h>
0075 #include <dt-bindings/leds/common.h>
0076
0077 // Ct = 220 nF, Rset = 160 kOhm
0078 led-controller {
0079 compatible = "skyworks,aat1290";
0080 flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>;
0081 enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>;
0082
0083 pinctrl-names = "default", "host", "isp";
0084 pinctrl-0 = <&camera_flash_host>;
0085 pinctrl-1 = <&camera_flash_host>;
0086 pinctrl-2 = <&camera_flash_isp>;
0087
0088 led {
0089 function = LED_FUNCTION_FLASH;
0090 color = <LED_COLOR_ID_WHITE>;
0091 led-max-microamp = <520833>;
0092 flash-max-microamp = <1012500>;
0093 flash-max-timeout-us = <1940000>;
0094 };
0095 };