1*e43232c0SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2*e43232c0SKrzysztof Kozlowski%YAML 1.2 3*e43232c0SKrzysztof Kozlowski--- 4*e43232c0SKrzysztof Kozlowski$id: http://devicetree.org/schemas/leds/skyworks,aat1290.yaml# 5*e43232c0SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml# 6*e43232c0SKrzysztof Kozlowski 7*e43232c0SKrzysztof Kozlowskititle: Skyworks Solutions, Inc. AAT1290 Current Regulator for Flash LEDs 8*e43232c0SKrzysztof Kozlowski 9*e43232c0SKrzysztof Kozlowskimaintainers: 10*e43232c0SKrzysztof Kozlowski - Jacek Anaszewski <jacek.anaszewski@gmail.com> 11*e43232c0SKrzysztof Kozlowski - Krzysztof Kozlowski <krzk@kernel.org> 12*e43232c0SKrzysztof Kozlowski 13*e43232c0SKrzysztof Kozlowskidescription: | 14*e43232c0SKrzysztof Kozlowski The device is controlled through two pins:: FL_EN and EN_SET. The pins when, 15*e43232c0SKrzysztof Kozlowski asserted high, enable flash strobe and movie mode (max 1/2 of flash current) 16*e43232c0SKrzysztof Kozlowski respectively. In order to add a capability of selecting the strobe signal 17*e43232c0SKrzysztof Kozlowski source (e.g. CPU or camera sensor) there is an additional switch required, 18*e43232c0SKrzysztof Kozlowski independent of the flash chip. The switch is controlled with pin control. 19*e43232c0SKrzysztof Kozlowski 20*e43232c0SKrzysztof Kozlowskiproperties: 21*e43232c0SKrzysztof Kozlowski compatible: 22*e43232c0SKrzysztof Kozlowski const: skyworks,aat1290 23*e43232c0SKrzysztof Kozlowski 24*e43232c0SKrzysztof Kozlowski enset-gpios: 25*e43232c0SKrzysztof Kozlowski maxItems: 1 26*e43232c0SKrzysztof Kozlowski description: EN_SET pin 27*e43232c0SKrzysztof Kozlowski 28*e43232c0SKrzysztof Kozlowski flen-gpios: 29*e43232c0SKrzysztof Kozlowski maxItems: 1 30*e43232c0SKrzysztof Kozlowski description: FL_EN pin 31*e43232c0SKrzysztof Kozlowski 32*e43232c0SKrzysztof Kozlowski led: 33*e43232c0SKrzysztof Kozlowski $ref: common.yaml# 34*e43232c0SKrzysztof Kozlowski unevaluatedProperties: false 35*e43232c0SKrzysztof Kozlowski 36*e43232c0SKrzysztof Kozlowski properties: 37*e43232c0SKrzysztof Kozlowski led-max-microamp: true 38*e43232c0SKrzysztof Kozlowski 39*e43232c0SKrzysztof Kozlowski flash-max-microamp: 40*e43232c0SKrzysztof Kozlowski description: | 41*e43232c0SKrzysztof Kozlowski Maximum flash LED supply current can be calculated using following 42*e43232c0SKrzysztof Kozlowski formula:: I = 1A * 162 kOhm / Rset. 43*e43232c0SKrzysztof Kozlowski 44*e43232c0SKrzysztof Kozlowski flash-max-timeout-us: 45*e43232c0SKrzysztof Kozlowski description: | 46*e43232c0SKrzysztof Kozlowski Maximum flash timeout can be calculated using following formula:: 47*e43232c0SKrzysztof Kozlowski T = 8.82 * 10^9 * Ct. 48*e43232c0SKrzysztof Kozlowski 49*e43232c0SKrzysztof Kozlowski required: 50*e43232c0SKrzysztof Kozlowski - flash-max-microamp 51*e43232c0SKrzysztof Kozlowski - flash-max-timeout-us 52*e43232c0SKrzysztof Kozlowski - led-max-microamp 53*e43232c0SKrzysztof Kozlowski 54*e43232c0SKrzysztof Kozlowski pinctrl-names: 55*e43232c0SKrzysztof Kozlowski items: 56*e43232c0SKrzysztof Kozlowski - const: default 57*e43232c0SKrzysztof Kozlowski - const: host 58*e43232c0SKrzysztof Kozlowski - const: isp 59*e43232c0SKrzysztof Kozlowski 60*e43232c0SKrzysztof Kozlowski pinctrl-0: true 61*e43232c0SKrzysztof Kozlowski pinctrl-1: true 62*e43232c0SKrzysztof Kozlowski pinctrl-2: true 63*e43232c0SKrzysztof Kozlowski 64*e43232c0SKrzysztof Kozlowskirequired: 65*e43232c0SKrzysztof Kozlowski - compatible 66*e43232c0SKrzysztof Kozlowski - enset-gpios 67*e43232c0SKrzysztof Kozlowski - flen-gpios 68*e43232c0SKrzysztof Kozlowski - led 69*e43232c0SKrzysztof Kozlowski 70*e43232c0SKrzysztof KozlowskiadditionalProperties: false 71*e43232c0SKrzysztof Kozlowski 72*e43232c0SKrzysztof Kozlowskiexamples: 73*e43232c0SKrzysztof Kozlowski - | 74*e43232c0SKrzysztof Kozlowski #include <dt-bindings/gpio/gpio.h> 75*e43232c0SKrzysztof Kozlowski #include <dt-bindings/leds/common.h> 76*e43232c0SKrzysztof Kozlowski 77*e43232c0SKrzysztof Kozlowski // Ct = 220 nF, Rset = 160 kOhm 78*e43232c0SKrzysztof Kozlowski led-controller { 79*e43232c0SKrzysztof Kozlowski compatible = "skyworks,aat1290"; 80*e43232c0SKrzysztof Kozlowski flen-gpios = <&gpj1 1 GPIO_ACTIVE_HIGH>; 81*e43232c0SKrzysztof Kozlowski enset-gpios = <&gpj1 2 GPIO_ACTIVE_HIGH>; 82*e43232c0SKrzysztof Kozlowski 83*e43232c0SKrzysztof Kozlowski pinctrl-names = "default", "host", "isp"; 84*e43232c0SKrzysztof Kozlowski pinctrl-0 = <&camera_flash_host>; 85*e43232c0SKrzysztof Kozlowski pinctrl-1 = <&camera_flash_host>; 86*e43232c0SKrzysztof Kozlowski pinctrl-2 = <&camera_flash_isp>; 87*e43232c0SKrzysztof Kozlowski 88*e43232c0SKrzysztof Kozlowski led { 89*e43232c0SKrzysztof Kozlowski function = LED_FUNCTION_FLASH; 90*e43232c0SKrzysztof Kozlowski color = <LED_COLOR_ID_WHITE>; 91*e43232c0SKrzysztof Kozlowski led-max-microamp = <520833>; 92*e43232c0SKrzysztof Kozlowski flash-max-microamp = <1012500>; 93*e43232c0SKrzysztof Kozlowski flash-max-timeout-us = <1940000>; 94*e43232c0SKrzysztof Kozlowski }; 95*e43232c0SKrzysztof Kozlowski }; 96