69 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/light/ti,opt4001.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Texas Instruments OPT4001 Ambient Light Sensor8 9maintainers:10 - Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>11 12description:13 Ambient light sensor with an i2c interface.14 Last part of compatible is for the packaging used.15 Picostar is a 4 pinned SMT and sot-5x3 is a 8 pinned SOT.16 https://www.ti.com/lit/gpn/opt400117 18properties:19 compatible:20 enum:21 - ti,opt4001-picostar22 - ti,opt4001-sot-5x323 24 reg:25 maxItems: 126 27 interrupts:28 maxItems: 129 30 vdd-supply:31 description: Regulator that provides power to the sensor32 33required:34 - compatible35 - reg36 37allOf:38 - if:39 properties:40 compatible:41 contains:42 const: ti,opt4001-sot-5x343 then:44 properties:45 interrupts:46 maxItems: 147 else:48 properties:49 interrupts: false50 51additionalProperties: false52 53examples:54 - |55 #include <dt-bindings/interrupt-controller/irq.h>56 i2c {57 #address-cells = <1>;58 #size-cells = <0>;59 60 light-sensor@44 {61 compatible = "ti,opt4001-sot-5x3";62 reg = <0x44>;63 vdd-supply = <&vdd_reg>;64 interrupt-parent = <&gpio1>;65 interrupts = <28 IRQ_TYPE_EDGE_FALLING>;66 };67 };68...69