18c693432SJonathan Cameron# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28c693432SJonathan Cameron%YAML 1.2 38c693432SJonathan Cameron--- 48c693432SJonathan Cameron$id: http://devicetree.org/schemas/iio/light/capella,cm3605.yaml# 58c693432SJonathan Cameron$schema: http://devicetree.org/meta-schemas/core.yaml# 68c693432SJonathan Cameron 78c693432SJonathan Camerontitle: 88c693432SJonathan Cameron Capella Microsystems CM3605 Ambient Light and Short Distance Proximity Sensor 98c693432SJonathan Cameron 108c693432SJonathan Cameronmaintainers: 118c693432SJonathan Cameron - Linus Walleij <linus.walleij@linaro.org> 128c693432SJonathan Cameron - Kevin Tsai <ktsai@capellamicro.com> 138c693432SJonathan Cameron 148c693432SJonathan Camerondescription: | 158c693432SJonathan Cameron The CM3605 is an entirely analog part. However, it requires quite a bit of 168c693432SJonathan Cameron software logic to interface a host operating system. 178c693432SJonathan Cameron 188c693432SJonathan Cameron This ALS and proximity sensor was one of the very first deployed in mobile 198c693432SJonathan Cameron handsets, notably it is used in the very first Nexus One Android phone from 208c693432SJonathan Cameron 2010. 218c693432SJonathan Cameron 228c693432SJonathan Cameronproperties: 238c693432SJonathan Cameron compatible: 248c693432SJonathan Cameron const: capella,cm3605 258c693432SJonathan Cameron 268c693432SJonathan Cameron aset-gpios: 278c693432SJonathan Cameron maxItems: 1 288c693432SJonathan Cameron description: 298c693432SJonathan Cameron ASET line (drive low to activate the ALS, should be flagged 308c693432SJonathan Cameron GPIO_ACTIVE_LOW) 318c693432SJonathan Cameron 328c693432SJonathan Cameron interrupts: 338c693432SJonathan Cameron maxItems: 1 348c693432SJonathan Cameron description: 358c693432SJonathan Cameron Connected to the POUT (proximity sensor out) line. The edge 368c693432SJonathan Cameron detection must be set to IRQ_TYPE_EDGE_BOTH so as to detect 378c693432SJonathan Cameron movements toward and away from the proximity sensor. 388c693432SJonathan Cameron 398c693432SJonathan Cameron io-channels: 408c693432SJonathan Cameron maxItems: 1 418c693432SJonathan Cameron description: 428c693432SJonathan Cameron ADC channel used for converting the voltage from AOUT to a digital 438c693432SJonathan Cameron representation. 448c693432SJonathan Cameron 458c693432SJonathan Cameron io-channel-names: 468c693432SJonathan Cameron const: aout 478c693432SJonathan Cameron 488c693432SJonathan Cameron vdd-supply: true 498c693432SJonathan Cameron 508c693432SJonathan Cameron capella,aset-resistance-ohms: 518c693432SJonathan Cameron enum: [50000, 100000, 300000, 600000] 528c693432SJonathan Cameron description: > 538c693432SJonathan Cameron Sensitivity calibration resistance. Note that calibration curves 548c693432SJonathan Cameron are only provided for specific allowed values. Default: 100 kOhms. 558c693432SJonathan Cameron 568c693432SJonathan Cameronrequired: 578c693432SJonathan Cameron - compatible 588c693432SJonathan Cameron - aset-gpios 598c693432SJonathan Cameron - interrupts 608c693432SJonathan Cameron - io-channels 618c693432SJonathan Cameron - io-channel-names 628c693432SJonathan Cameron 638c693432SJonathan CameronadditionalProperties: false 648c693432SJonathan Cameron 658c693432SJonathan Cameronexamples: 668c693432SJonathan Cameron - | 678c693432SJonathan Cameron #include <dt-bindings/gpio/gpio.h> 688c693432SJonathan Cameron #include <dt-bindings/interrupt-controller/irq.h> 698c693432SJonathan Cameron light-sensor { 708c693432SJonathan Cameron compatible = "capella,cm3605"; 718c693432SJonathan Cameron vdd-supply = <&foo_reg>; 728c693432SJonathan Cameron aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>; 738c693432SJonathan Cameron capella,aset-resistance-ohms = <100000>; 748c693432SJonathan Cameron interrupts = <1 IRQ_TYPE_EDGE_BOTH>; 758c693432SJonathan Cameron io-channels = <&adc 0x01>; 768c693432SJonathan Cameron io-channel-names = "aout"; 778c693432SJonathan Cameron }; 788c693432SJonathan Cameron... 79