1*8c693432SJonathan Cameron# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*8c693432SJonathan Cameron%YAML 1.2 3*8c693432SJonathan Cameron--- 4*8c693432SJonathan Cameron$id: http://devicetree.org/schemas/iio/light/capella,cm3605.yaml# 5*8c693432SJonathan Cameron$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8c693432SJonathan Cameron 7*8c693432SJonathan Camerontitle: 8*8c693432SJonathan Cameron Capella Microsystems CM3605 Ambient Light and Short Distance Proximity Sensor 9*8c693432SJonathan Cameron 10*8c693432SJonathan Cameronmaintainers: 11*8c693432SJonathan Cameron - Linus Walleij <linus.walleij@linaro.org> 12*8c693432SJonathan Cameron - Kevin Tsai <ktsai@capellamicro.com> 13*8c693432SJonathan Cameron 14*8c693432SJonathan Camerondescription: | 15*8c693432SJonathan Cameron The CM3605 is an entirely analog part. However, it requires quite a bit of 16*8c693432SJonathan Cameron software logic to interface a host operating system. 17*8c693432SJonathan Cameron 18*8c693432SJonathan Cameron This ALS and proximity sensor was one of the very first deployed in mobile 19*8c693432SJonathan Cameron handsets, notably it is used in the very first Nexus One Android phone from 20*8c693432SJonathan Cameron 2010. 21*8c693432SJonathan Cameron 22*8c693432SJonathan Cameronproperties: 23*8c693432SJonathan Cameron compatible: 24*8c693432SJonathan Cameron const: capella,cm3605 25*8c693432SJonathan Cameron 26*8c693432SJonathan Cameron aset-gpios: 27*8c693432SJonathan Cameron maxItems: 1 28*8c693432SJonathan Cameron description: 29*8c693432SJonathan Cameron ASET line (drive low to activate the ALS, should be flagged 30*8c693432SJonathan Cameron GPIO_ACTIVE_LOW) 31*8c693432SJonathan Cameron 32*8c693432SJonathan Cameron interrupts: 33*8c693432SJonathan Cameron maxItems: 1 34*8c693432SJonathan Cameron description: 35*8c693432SJonathan Cameron Connected to the POUT (proximity sensor out) line. The edge 36*8c693432SJonathan Cameron detection must be set to IRQ_TYPE_EDGE_BOTH so as to detect 37*8c693432SJonathan Cameron movements toward and away from the proximity sensor. 38*8c693432SJonathan Cameron 39*8c693432SJonathan Cameron io-channels: 40*8c693432SJonathan Cameron maxItems: 1 41*8c693432SJonathan Cameron description: 42*8c693432SJonathan Cameron ADC channel used for converting the voltage from AOUT to a digital 43*8c693432SJonathan Cameron representation. 44*8c693432SJonathan Cameron 45*8c693432SJonathan Cameron io-channel-names: 46*8c693432SJonathan Cameron const: aout 47*8c693432SJonathan Cameron 48*8c693432SJonathan Cameron vdd-supply: true 49*8c693432SJonathan Cameron 50*8c693432SJonathan Cameron capella,aset-resistance-ohms: 51*8c693432SJonathan Cameron enum: [50000, 100000, 300000, 600000] 52*8c693432SJonathan Cameron description: > 53*8c693432SJonathan Cameron Sensitivity calibration resistance. Note that calibration curves 54*8c693432SJonathan Cameron are only provided for specific allowed values. Default: 100 kOhms. 55*8c693432SJonathan Cameron 56*8c693432SJonathan Cameronrequired: 57*8c693432SJonathan Cameron - compatible 58*8c693432SJonathan Cameron - aset-gpios 59*8c693432SJonathan Cameron - interrupts 60*8c693432SJonathan Cameron - io-channels 61*8c693432SJonathan Cameron - io-channel-names 62*8c693432SJonathan Cameron 63*8c693432SJonathan CameronadditionalProperties: false 64*8c693432SJonathan Cameron 65*8c693432SJonathan Cameronexamples: 66*8c693432SJonathan Cameron - | 67*8c693432SJonathan Cameron #include <dt-bindings/gpio/gpio.h> 68*8c693432SJonathan Cameron #include <dt-bindings/interrupt-controller/irq.h> 69*8c693432SJonathan Cameron light-sensor { 70*8c693432SJonathan Cameron compatible = "capella,cm3605"; 71*8c693432SJonathan Cameron vdd-supply = <&foo_reg>; 72*8c693432SJonathan Cameron aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>; 73*8c693432SJonathan Cameron capella,aset-resistance-ohms = <100000>; 74*8c693432SJonathan Cameron interrupts = <1 IRQ_TYPE_EDGE_BOTH>; 75*8c693432SJonathan Cameron io-channels = <&adc 0x01>; 76*8c693432SJonathan Cameron io-channel-names = "aout"; 77*8c693432SJonathan Cameron }; 78*8c693432SJonathan Cameron... 79