summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/leds/ams,as3645a.yaml
blob: 250a4b275d8a8af28c69d14a419587f7a3db6ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/ams,as3645a.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AS3645A LED Controller

maintainers:
  - Sakari Ailus <sakari.ailus@iki.fi>

description:
  The AS3645A flash LED controller can drive two LEDs, one
  high current flash LED and one indicator LED. The high
  current flash LED can be used in torch mode as well.

properties:
  compatible:
    const: ams,as3645a

  "#address-cells":
    const: 1

  "#size-cells":
    const: 0

  reg:
    maxItems: 1

  led@0:
    description: led0 describes the 'flash' feature
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false

    properties:
      reg:
        const: 0

      flash-timeout-us:
        minimum: 100000
        maximum: 850000
        multipleOf: 50000

      flash-max-microamp:
        minimum: 200000
        maximum: 500000
        multipleOf: 20000

      led-max-microamp:
        minimum: 20000
        maximum: 160000
        multipleOf: 20000
        description:
          Maximum current when in torch (assist) mode.

      ams,input-max-microamp:
        minimum: 1250000
        maximum: 2000000
        multipleOf: 50000

    required:
      - reg
      - flash-timeout-us
      - flash-max-microamp
      - led-max-microamp
      - ams,input-max-microamp

  led@1:
    description: led1 describes the 'indicator' feature
    type: object
    $ref: common.yaml#
    unevaluatedProperties: false

    properties:
      reg:
        const: 1

      led-max-microamp:
        enum:
          - 2500
          - 5000
          - 7500
          - 10000
        description:
          Maximum indicator current.

    required:
      - reg
      - led-max-microamp

required:
  - compatible
  - reg
  - "#size-cells"
  - "#address-cells"

additionalProperties: false

examples:
  - |
    #include <dt-bindings/leds/common.h>

    i2c{
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@30 {
            compatible = "ams,as3645a";
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <0x30>;

            led@0 {
                reg = <0>;
                flash-timeout-us = <150000>;
                flash-max-microamp = <320000>;
                led-max-microamp = <60000>;
                ams,input-max-microamp = <1750000>;
                function = LED_FUNCTION_FLASH;
            };

            led@1 {
                reg = <1>;
                led-max-microamp = <10000>;
                function = LED_FUNCTION_INDICATOR;
            };
        };
    };
...