18c2ecf20Sopenharmony_ciCapella Microsystems CM3605 28c2ecf20Sopenharmony_ciAmbient Light and Short Distance Proximity Sensor 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThe CM3605 is an entirely analog part which however require quite a bit of 58c2ecf20Sopenharmony_cisoftware logic to interface a host operating system. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciThis ALS and proximity sensor was one of the very first deployed in mobile 88c2ecf20Sopenharmony_cihandsets, notably it is used in the very first Nexus One Android phone from 98c2ecf20Sopenharmony_ci2010. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciRequired properties: 128c2ecf20Sopenharmony_ci- compatible: must be: "capella,cm3605" 138c2ecf20Sopenharmony_ci- aset-gpios: GPIO line controlling the ASET line (drive low 148c2ecf20Sopenharmony_ci to activate the ALS, should be flagged GPIO_ACTIVE_LOW) 158c2ecf20Sopenharmony_ci- interrupts: the IRQ line (such as a GPIO) that is connected to 168c2ecf20Sopenharmony_ci the POUT (proximity sensor out) line. The edge detection must 178c2ecf20Sopenharmony_ci be set to IRQ_TYPE_EDGE_BOTH so as to detect movements toward 188c2ecf20Sopenharmony_ci and away from the proximity sensor. 198c2ecf20Sopenharmony_ci- io-channels: the ADC channel used for converting the voltage from 208c2ecf20Sopenharmony_ci AOUT to a digital representation. 218c2ecf20Sopenharmony_ci- io-channel-names: must be "aout" 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciOptional properties: 248c2ecf20Sopenharmony_ci- vdd-supply: regulator supplying VDD power to the component. 258c2ecf20Sopenharmony_ci- capella,aset-resistance-ohms: the sensitivity calibration resistance, 268c2ecf20Sopenharmony_ci in Ohms. Valid values are: 50000, 100000, 300000 and 600000, 278c2ecf20Sopenharmony_ci as these are the resistance values that we are supplied with 288c2ecf20Sopenharmony_ci calibration curves for. If not supplied, 100 kOhm will be assumed 298c2ecf20Sopenharmony_ci but it is strongly recommended to supply this. 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ciExample: 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_cicm3605 { 348c2ecf20Sopenharmony_ci compatible = "capella,cm3605"; 358c2ecf20Sopenharmony_ci vdd-supply = <&foo_reg>; 368c2ecf20Sopenharmony_ci aset-gpios = <&foo_gpio 1 GPIO_ACTIVE_LOW>; 378c2ecf20Sopenharmony_ci capella,aset-resistance-ohms = <100000>; 388c2ecf20Sopenharmony_ci interrupts = <1 IRQ_TYPE_EDGE_BOTH>; 398c2ecf20Sopenharmony_ci io-channels = <&adc 0x01>; 408c2ecf20Sopenharmony_ci io-channel-names = "aout"; 418c2ecf20Sopenharmony_ci}; 42