1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*8ccc0d23SEmmanuel Vadot%YAML 1.2 3*8ccc0d23SEmmanuel Vadot--- 4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/light/brcm,apds9160.yaml# 5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*8ccc0d23SEmmanuel Vadot 7*8ccc0d23SEmmanuel Vadottitle: Broadcom Combined Proximity & Ambient light sensor 8*8ccc0d23SEmmanuel Vadot 9*8ccc0d23SEmmanuel Vadotmaintainers: 10*8ccc0d23SEmmanuel Vadot - Mikael Gonella-Bolduc <m.gonella.bolduc@gmail.com> 11*8ccc0d23SEmmanuel Vadot 12*8ccc0d23SEmmanuel Vadotdescription: | 13*8ccc0d23SEmmanuel Vadot Datasheet: https://docs.broadcom.com/docs/APDS-9160-003-DS 14*8ccc0d23SEmmanuel Vadot 15*8ccc0d23SEmmanuel Vadotproperties: 16*8ccc0d23SEmmanuel Vadot compatible: 17*8ccc0d23SEmmanuel Vadot enum: 18*8ccc0d23SEmmanuel Vadot - brcm,apds9160 19*8ccc0d23SEmmanuel Vadot 20*8ccc0d23SEmmanuel Vadot reg: 21*8ccc0d23SEmmanuel Vadot maxItems: 1 22*8ccc0d23SEmmanuel Vadot 23*8ccc0d23SEmmanuel Vadot interrupts: 24*8ccc0d23SEmmanuel Vadot maxItems: 1 25*8ccc0d23SEmmanuel Vadot 26*8ccc0d23SEmmanuel Vadot vdd-supply: true 27*8ccc0d23SEmmanuel Vadot 28*8ccc0d23SEmmanuel Vadot ps-cancellation-duration: 29*8ccc0d23SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 30*8ccc0d23SEmmanuel Vadot description: 31*8ccc0d23SEmmanuel Vadot Proximity sensor cancellation pulse duration in half clock cycles. 32*8ccc0d23SEmmanuel Vadot This parameter determines a cancellation pulse duration. 33*8ccc0d23SEmmanuel Vadot The cancellation is applied in the integration phase to cancel out 34*8ccc0d23SEmmanuel Vadot unwanted reflected light from very near objects such as tempered glass 35*8ccc0d23SEmmanuel Vadot in front of the sensor. 36*8ccc0d23SEmmanuel Vadot default: 0 37*8ccc0d23SEmmanuel Vadot maximum: 63 38*8ccc0d23SEmmanuel Vadot 39*8ccc0d23SEmmanuel Vadot ps-cancellation-current-picoamp: 40*8ccc0d23SEmmanuel Vadot description: 41*8ccc0d23SEmmanuel Vadot Proximity sensor crosstalk cancellation current in picoampere. 42*8ccc0d23SEmmanuel Vadot This parameter adjusts the current in steps of 2400 pA up to 276000 pA. 43*8ccc0d23SEmmanuel Vadot The provided value must be a multiple of 2400 and in one of these ranges 44*8ccc0d23SEmmanuel Vadot [60000 - 96000] 45*8ccc0d23SEmmanuel Vadot [120000 - 156000] 46*8ccc0d23SEmmanuel Vadot [180000 - 216000] 47*8ccc0d23SEmmanuel Vadot [240000 - 276000] 48*8ccc0d23SEmmanuel Vadot This parameter is used in conjunction with the cancellation duration. 49*8ccc0d23SEmmanuel Vadot minimum: 60000 50*8ccc0d23SEmmanuel Vadot maximum: 276000 51*8ccc0d23SEmmanuel Vadot multipleOf: 2400 52*8ccc0d23SEmmanuel Vadot 53*8ccc0d23SEmmanuel Vadotrequired: 54*8ccc0d23SEmmanuel Vadot - compatible 55*8ccc0d23SEmmanuel Vadot - reg 56*8ccc0d23SEmmanuel Vadot - vdd-supply 57*8ccc0d23SEmmanuel Vadot 58*8ccc0d23SEmmanuel VadotadditionalProperties: false 59*8ccc0d23SEmmanuel Vadot 60*8ccc0d23SEmmanuel Vadotexamples: 61*8ccc0d23SEmmanuel Vadot - | 62*8ccc0d23SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 63*8ccc0d23SEmmanuel Vadot 64*8ccc0d23SEmmanuel Vadot i2c { 65*8ccc0d23SEmmanuel Vadot #address-cells = <1>; 66*8ccc0d23SEmmanuel Vadot #size-cells = <0>; 67*8ccc0d23SEmmanuel Vadot 68*8ccc0d23SEmmanuel Vadot light-sensor@53 { 69*8ccc0d23SEmmanuel Vadot compatible = "brcm,apds9160"; 70*8ccc0d23SEmmanuel Vadot reg = <0x53>; 71*8ccc0d23SEmmanuel Vadot vdd-supply = <&vdd_reg>; 72*8ccc0d23SEmmanuel Vadot interrupts = <29 IRQ_TYPE_EDGE_FALLING>; 73*8ccc0d23SEmmanuel Vadot interrupt-parent = <&pinctrl>; 74*8ccc0d23SEmmanuel Vadot ps-cancellation-duration = <10>; 75*8ccc0d23SEmmanuel Vadot ps-cancellation-current-picoamp = <62400>; 76*8ccc0d23SEmmanuel Vadot }; 77*8ccc0d23SEmmanuel Vadot }; 78*8ccc0d23SEmmanuel Vadot... 79