xref: /freebsd/sys/contrib/device-tree/Bindings/iio/light/vishay,veml6030.yaml (revision 5f62a964e9f8abc6a05d8338273fadd154f0a206)
1*5f62a964SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0+
2*5f62a964SEmmanuel Vadot%YAML 1.2
3*5f62a964SEmmanuel Vadot---
4*5f62a964SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/light/vishay,veml6030.yaml#
5*5f62a964SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5f62a964SEmmanuel Vadot
7*5f62a964SEmmanuel Vadottitle: VEML3235, VEML6030, VEML6035 and VEML7700 Ambient Light Sensors (ALS)
8*5f62a964SEmmanuel Vadot
9*5f62a964SEmmanuel Vadotmaintainers:
10*5f62a964SEmmanuel Vadot  - Rishi Gupta <gupt21@gmail.com>
11*5f62a964SEmmanuel Vadot
12*5f62a964SEmmanuel Vadotdescription: |
13*5f62a964SEmmanuel Vadot  Bindings for the ambient light sensors veml6030 and veml6035 from
14*5f62a964SEmmanuel Vadot  Vishay Semiconductors over an i2c interface.
15*5f62a964SEmmanuel Vadot
16*5f62a964SEmmanuel Vadot  Irrespective of whether interrupt is used or not, application
17*5f62a964SEmmanuel Vadot  can get the ALS and White channel reading from IIO raw interface.
18*5f62a964SEmmanuel Vadot
19*5f62a964SEmmanuel Vadot  If the interrupts are used, application will receive an IIO event
20*5f62a964SEmmanuel Vadot  whenever configured threshold is crossed.
21*5f62a964SEmmanuel Vadot
22*5f62a964SEmmanuel Vadot  Specifications about the sensors can be found at:
23*5f62a964SEmmanuel Vadot    https://www.vishay.com/docs/80131/veml3235.pdf
24*5f62a964SEmmanuel Vadot    https://www.vishay.com/docs/84366/veml6030.pdf
25*5f62a964SEmmanuel Vadot    https://www.vishay.com/docs/84889/veml6035.pdf
26*5f62a964SEmmanuel Vadot    https://www.vishay.com/docs/84286/veml7700.pdf
27*5f62a964SEmmanuel Vadot
28*5f62a964SEmmanuel Vadotproperties:
29*5f62a964SEmmanuel Vadot  compatible:
30*5f62a964SEmmanuel Vadot    enum:
31*5f62a964SEmmanuel Vadot      - vishay,veml3235
32*5f62a964SEmmanuel Vadot      - vishay,veml6030
33*5f62a964SEmmanuel Vadot      - vishay,veml6035
34*5f62a964SEmmanuel Vadot      - vishay,veml7700
35*5f62a964SEmmanuel Vadot
36*5f62a964SEmmanuel Vadot  reg:
37*5f62a964SEmmanuel Vadot    maxItems: 1
38*5f62a964SEmmanuel Vadot
39*5f62a964SEmmanuel Vadot  interrupts:
40*5f62a964SEmmanuel Vadot    description:
41*5f62a964SEmmanuel Vadot      interrupt mapping for IRQ. Configure with IRQ_TYPE_LEVEL_LOW.
42*5f62a964SEmmanuel Vadot      Refer to interrupt-controller/interrupts.txt for generic
43*5f62a964SEmmanuel Vadot      interrupt client node bindings.
44*5f62a964SEmmanuel Vadot    maxItems: 1
45*5f62a964SEmmanuel Vadot
46*5f62a964SEmmanuel Vadot  vdd-supply: true
47*5f62a964SEmmanuel Vadot
48*5f62a964SEmmanuel Vadotrequired:
49*5f62a964SEmmanuel Vadot  - compatible
50*5f62a964SEmmanuel Vadot  - reg
51*5f62a964SEmmanuel Vadot  - vdd-supply
52*5f62a964SEmmanuel Vadot
53*5f62a964SEmmanuel VadotallOf:
54*5f62a964SEmmanuel Vadot  - if:
55*5f62a964SEmmanuel Vadot      properties:
56*5f62a964SEmmanuel Vadot        compatible:
57*5f62a964SEmmanuel Vadot          enum:
58*5f62a964SEmmanuel Vadot            - vishay,veml6030
59*5f62a964SEmmanuel Vadot    then:
60*5f62a964SEmmanuel Vadot      properties:
61*5f62a964SEmmanuel Vadot        reg:
62*5f62a964SEmmanuel Vadot          enum:
63*5f62a964SEmmanuel Vadot            - 0x10  # ADDR pin pulled down
64*5f62a964SEmmanuel Vadot            - 0x48  # ADDR pin pulled up
65*5f62a964SEmmanuel Vadot
66*5f62a964SEmmanuel Vadot  - if:
67*5f62a964SEmmanuel Vadot      properties:
68*5f62a964SEmmanuel Vadot        compatible:
69*5f62a964SEmmanuel Vadot          enum:
70*5f62a964SEmmanuel Vadot            - vishay,veml6035
71*5f62a964SEmmanuel Vadot    then:
72*5f62a964SEmmanuel Vadot      properties:
73*5f62a964SEmmanuel Vadot        reg:
74*5f62a964SEmmanuel Vadot          enum:
75*5f62a964SEmmanuel Vadot            - 0x29
76*5f62a964SEmmanuel Vadot
77*5f62a964SEmmanuel Vadot  - if:
78*5f62a964SEmmanuel Vadot      properties:
79*5f62a964SEmmanuel Vadot        compatible:
80*5f62a964SEmmanuel Vadot          enum:
81*5f62a964SEmmanuel Vadot            - vishay,veml3235
82*5f62a964SEmmanuel Vadot            - vishay,veml7700
83*5f62a964SEmmanuel Vadot    then:
84*5f62a964SEmmanuel Vadot      properties:
85*5f62a964SEmmanuel Vadot        reg:
86*5f62a964SEmmanuel Vadot          enum:
87*5f62a964SEmmanuel Vadot            - 0x10
88*5f62a964SEmmanuel Vadot        interrupts: false
89*5f62a964SEmmanuel Vadot
90*5f62a964SEmmanuel VadotadditionalProperties: false
91*5f62a964SEmmanuel Vadot
92*5f62a964SEmmanuel Vadotexamples:
93*5f62a964SEmmanuel Vadot  - |
94*5f62a964SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
95*5f62a964SEmmanuel Vadot
96*5f62a964SEmmanuel Vadot    i2c {
97*5f62a964SEmmanuel Vadot        #address-cells = <1>;
98*5f62a964SEmmanuel Vadot        #size-cells = <0>;
99*5f62a964SEmmanuel Vadot
100*5f62a964SEmmanuel Vadot        light-sensor@10 {
101*5f62a964SEmmanuel Vadot                compatible = "vishay,veml6030";
102*5f62a964SEmmanuel Vadot                reg = <0x10>;
103*5f62a964SEmmanuel Vadot                interrupts = <12 IRQ_TYPE_LEVEL_LOW>;
104*5f62a964SEmmanuel Vadot                vdd-supply = <&vdd>;
105*5f62a964SEmmanuel Vadot        };
106*5f62a964SEmmanuel Vadot    };
107*5f62a964SEmmanuel Vadot...
108