xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/leds/leds-sgm3140.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: SGMICRO SGM3140 500mA Buck/Boost Charge Pump LED Driver
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Luca Weiss <luca@z3ntu.xyz>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |
13*4882a593Smuzhiyun  The SGM3140 is a current-regulated charge pump which can regulate two current
14*4882a593Smuzhiyun  levels for Flash and Torch modes.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun  The data sheet can be found at:
17*4882a593Smuzhiyun    http://www.sg-micro.com/uploads/soft/20190626/1561535688.pdf
18*4882a593Smuzhiyun
19*4882a593Smuzhiyunproperties:
20*4882a593Smuzhiyun  compatible:
21*4882a593Smuzhiyun    const: sgmicro,sgm3140
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  enable-gpios:
24*4882a593Smuzhiyun    maxItems: 1
25*4882a593Smuzhiyun    description: A connection to the 'EN' pin.
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  flash-gpios:
28*4882a593Smuzhiyun    maxItems: 1
29*4882a593Smuzhiyun    description: A connection to the 'FLASH' pin.
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun  vin-supply:
32*4882a593Smuzhiyun    description: Regulator providing power to the 'VIN' pin.
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun  led:
35*4882a593Smuzhiyun    type: object
36*4882a593Smuzhiyun    $ref: common.yaml#
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunrequired:
39*4882a593Smuzhiyun  - compatible
40*4882a593Smuzhiyun  - flash-gpios
41*4882a593Smuzhiyun  - enable-gpios
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunadditionalProperties: false
44*4882a593Smuzhiyun
45*4882a593Smuzhiyunexamples:
46*4882a593Smuzhiyun  - |
47*4882a593Smuzhiyun    #include <dt-bindings/gpio/gpio.h>
48*4882a593Smuzhiyun    #include <dt-bindings/leds/common.h>
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun    led-controller {
51*4882a593Smuzhiyun        compatible = "sgmicro,sgm3140";
52*4882a593Smuzhiyun        flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */
53*4882a593Smuzhiyun        enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */
54*4882a593Smuzhiyun        vin-supply = <&reg_dcdc1>;
55*4882a593Smuzhiyun
56*4882a593Smuzhiyun        sgm3140_flash: led {
57*4882a593Smuzhiyun            function = LED_FUNCTION_FLASH;
58*4882a593Smuzhiyun            color = <LED_COLOR_ID_WHITE>;
59*4882a593Smuzhiyun            flash-max-timeout-us = <250000>;
60*4882a593Smuzhiyun        };
61*4882a593Smuzhiyun    };
62