1# Copyright (c) 2024 Juliane Schulze, deveritec GmbH 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 VCNL36825T proximity and ambient light sensor. See datasheet at 6 https://www.vishay.com/docs/84274/vcnl36825t.pdf 7 8compatible: "vishay,vcnl36825t" 9 10include: [sensor-device.yaml, i2c-device.yaml] 11 12properties: 13 operation-mode: 14 type: string 15 default: "auto" 16 enum: ["auto", "force"] 17 description: | 18 Mode of operation. 19 - "auto": the sensor performs sampling continuously, 20 - "force": the sampling is performed on every fetch command. 21 22 Defaults to sensor reset value. 23 24 Note: "force"-mode only available if low-power mode inactive. 25 26 measurement-period: 27 type: int 28 default: 40 29 enum: [10, 20, 40, 80, 160, 320] 30 description: | 31 Measurement period of the sensors in ms. 32 Higher values yield lower power consumption. 33 Note: 34 - [10, 80] ms only if low power mode is inactive 35 - [80, 320] ms only in low power mode 36 37 Defaults to 40 ms which is supported in both normal and low-power mode. 38 39 proximity-it: 40 type: string 41 default: "1" 42 enum: ["1", "2", "4", "8"] 43 description: | 44 Proximity integration time in T. 45 Defaults to sensor reset value. 46 47 proximity-itb: 48 type: int 49 default: 25 50 enum: [25, 50] 51 description: | 52 Duration of the proximity integration time T in us. 53 Defaults to sensor reset value. 54 55 multi-pulse: 56 type: int 57 default: 1 58 enum: [1, 2, 4, 8] 59 description: | 60 Number of pulses per single measurement. 61 Higher values increase accuracy and power consumption. 62 Defaults to sensor reset value. 63 64 laser-current: 65 type: int 66 default: 10 67 enum: [10, 12, 14, 16, 18, 20] 68 description: | 69 Current used by the laser during measurement periods. 70 Defaults to minimum allowed value. 71 72 low-power: 73 type: boolean 74 description: | 75 Activate low power mode. 76 This allows to increase the measurement period up to 320 ms. 77 78 high-gain: 79 type: boolean 80 description: | 81 Activate the high gain mode. 82 83 sunlight-cancellation: 84 type: boolean 85 description: | 86 Activate sunlight cancellation. 87 88 high-dynamic-output: 89 type: boolean 90 description: | 91 Activate 16bit high dynamic output mode. 92 Cannot be used with threshold interrupt. 93 94 int-gpios: 95 type: phandle-array 96 description: | 97 The INT signal connection. 98 The signal is active-low as produced by the sensor. 99 100 int-mode: 101 type: string 102 default: "normal" 103 enum: ["normal", "first high", "logic high / low"] 104 description: | 105 Specifies the interrupt behavior. 106 - "normal": signal if exceeds high or falls below lower threshold 107 and proximity count is reached. 108 - "first high": signal if exceeds high threshold first time and signal again 109 if falls below lower threshold, and proximity count is reached. 110 Do not trigger if high threshold was never exceeded. 111 - "logic high / low": signal if high threshold is exceeded and proximity counts is reached, 112 deactivate if falls below lower threshold. 113 Defaults to "normal" as this is the easiest configurable mode. 114 115 int-proximity-count: 116 type: int 117 default: 1 118 enum: [1, 2, 3, 4] 119 description: | 120 Number of consecutive measurements above/below threshold to signal an interrupt. 121 Defaults to sensor reset value 122 123 int-smart-persistence: 124 type: boolean 125 description: | 126 Activates "smart persistence" feature, aimed to reduce total reaction time 127 until an interrupt is issued. 128