1# Copyright (c) 2020 Richard Osterloh
2# SPDX-License-Identifier: Apache-2.0
3
4description: |
5    VCNL4040 proximity and ambient light sensor.  See datasheet at
6    https://www.vishay.com/docs/84274/vcnl4040.pdf
7
8compatible: "vishay,vcnl4040"
9
10include: i2c-device.yaml
11
12properties:
13    int-gpios:
14      type: phandle-array
15      required: false
16      description: |
17        The INT pin signals that a programmable interrupt function
18        for ALS and PS with upper and lower thresholds has been
19        triggered. The sensor generates an active-low level signal
20        which remains asserted until the data is read.
21
22    led-current:
23      type: int
24      required: false
25      default: 50
26      # default of 50 mA is POR (0b000) for PS_MS[LED_I] register
27      description: LED current in mA
28      enum:
29        - 50
30        - 75
31        - 100
32        - 120
33        - 140
34        - 160
35        - 180
36        - 200
37
38    led-duty-cycle:
39      type: int
40      required: false
41      default: 40
42      # default of 40 Hz is POR (0b00) for PS_CONF1[PS_Duty] register
43      description: LED duty cycle in Hz
44      enum:
45        - 40
46        - 80
47        - 160
48        - 320
49
50    proximity-it:
51      type: string
52      required: false
53      default: "1"
54      # default of 1 is POR (0b000) for PS_CONF2[PS_IT] register
55      description: Proximity integration time in T
56      enum:
57        - "1"
58        - "1.5"
59        - "2"
60        - "2.5"
61        - "3"
62        - "3.5"
63        - "4"
64        - "8"
65
66    proximity-trigger:
67      type: string
68      required: false
69      default: "disabled"
70      # default of "disabled" is POR (0b00) for PS_CONF2[PS_INT] register
71      description: Proximity trigger type
72      enum:
73        - "disabled"
74        - "close"
75        - "away"
76        - "close-away"
77
78    als-it:
79      type: int
80      required: false
81      default: 80
82      # default of 80 is POR (0b00) for ALS_CONF[ALS_IT] register
83      description: ALS integration time in ms
84      enum:
85        - 80
86        - 160
87        - 320
88        - 640
89