hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
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
STMicro VL6180 -  ALS, range and proximity sensor
 
Link to datasheet: https://www.st.com/resource/en/datasheet/vl6180x.pdf
 
Required properties:
 
   -compatible: should be "st,vl6180"
   -reg: the I2C address of the sensor
 
Optional properties:
   -avdd-gpio: gpio to enable or disable the digital/analog power supply
   -chip-enable-gpio: gpio to enable or disable chip select (CE)
 
Example:
 
vl6180@29 {
   compatible = "st,vl6180";
   reg = <0x29>;
};
 
Here an example with power controlled by gpio:
 
vl6180@29 {
   compatible = "st,vl6180";
   reg = <0x29>;
   avdd-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
   chip-enable-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
};