xref: /linux/Documentation/devicetree/bindings/iio/light/tsl2772.yaml (revision 26b8eb8a98c18b2ee4ea76d99fa2b2a5ccbc1b6c)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/light/tsl2772.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: AMS/TAOS Ambient Light Sensor (ALS) and Proximity Detector
8
9maintainers:
10  - Brian Masney <masneyb@onstation.org>
11
12description: |
13  Ambient light sensing and proximity detection with an i2c interface.
14  https://ams.com/documents/20143/36005/TSL2772_DS000181_2-00.pdf
15
16properties:
17  compatible:
18    enum:
19      - amstaos,tsl2571
20      - amstaos,tsl2671
21      - amstaos,tmd2671
22      - amstaos,tsl2771
23      - amstaos,tmd2771
24      - amstaos,tsl2572
25      - amstaos,tsl2672
26      - amstaos,tmd2672
27      - amstaos,tsl2772
28      - amstaos,tmd2772
29      - avago,apds9900
30      - avago,apds9901
31      - avago,apds9930
32
33  reg:
34    maxItems: 1
35
36  amstaos,proximity-diodes:
37    description: Proximity diodes to enable
38    $ref: /schemas/types.yaml#/definitions/uint32-array
39    minItems: 1
40    maxItems: 2
41    items:
42      minimum: 0
43      maximum: 1
44
45  interrupts:
46    maxItems: 1
47
48  led-max-microamp:
49    description: Current for the proximity LED
50    enum:
51      - 13000
52      - 25000
53      - 50000
54      - 100000
55
56  vdd-supply:
57    description: Regulator that provides power to the sensor
58
59  vddio-supply:
60    description: Regulator that provides power to the bus
61
62required:
63  - compatible
64  - reg
65
66additionalProperties: false
67
68examples:
69  - |
70    #include <dt-bindings/interrupt-controller/irq.h>
71
72    i2c {
73        #address-cells = <1>;
74        #size-cells = <0>;
75
76        sensor@39 {
77                compatible = "amstaos,tsl2772";
78                reg = <0x39>;
79                interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>;
80                vdd-supply = <&pm8941_l17>;
81                vddio-supply = <&pm8941_lvs1>;
82                amstaos,proximity-diodes = <0>;
83                led-max-microamp = <100000>;
84        };
85    };
86...
87