xref: /linux/Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
11412b8cfSGwendal Grignou# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21412b8cfSGwendal Grignou%YAML 1.2
31412b8cfSGwendal Grignou---
41412b8cfSGwendal Grignou$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9360.yaml#
51412b8cfSGwendal Grignou$schema: http://devicetree.org/meta-schemas/core.yaml#
61412b8cfSGwendal Grignou
71412b8cfSGwendal Grignoutitle: Semtech's SX9360 capacitive proximity sensor
81412b8cfSGwendal Grignou
91412b8cfSGwendal Grignoumaintainers:
101412b8cfSGwendal Grignou  - Gwendal Grignou <gwendal@chromium.org>
111412b8cfSGwendal Grignou  - Daniel Campello <campello@chromium.org>
121412b8cfSGwendal Grignou
131412b8cfSGwendal Grignoudescription: |
141412b8cfSGwendal Grignou  Semtech's SX9360 proximity sensor.
151412b8cfSGwendal Grignou
161412b8cfSGwendal Grignouproperties:
171412b8cfSGwendal Grignou  compatible:
181412b8cfSGwendal Grignou    const: semtech,sx9360
191412b8cfSGwendal Grignou
201412b8cfSGwendal Grignou  reg:
211412b8cfSGwendal Grignou    maxItems: 1
221412b8cfSGwendal Grignou
231412b8cfSGwendal Grignou  interrupts:
241412b8cfSGwendal Grignou    description:
251412b8cfSGwendal Grignou      Generated by device to announce preceding read request has finished
261412b8cfSGwendal Grignou      and data is available or that a close/far proximity event has happened.
271412b8cfSGwendal Grignou    maxItems: 1
281412b8cfSGwendal Grignou
291412b8cfSGwendal Grignou  vdd-supply:
301412b8cfSGwendal Grignou    description: Main power supply
311412b8cfSGwendal Grignou
321412b8cfSGwendal Grignou  svdd-supply:
331412b8cfSGwendal Grignou    description: Host interface power supply
341412b8cfSGwendal Grignou
351412b8cfSGwendal Grignou  "#io-channel-cells":
361412b8cfSGwendal Grignou    const: 1
371412b8cfSGwendal Grignou
381412b8cfSGwendal Grignou  semtech,resolution:
39*b186b18eSRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
401412b8cfSGwendal Grignou    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
411412b8cfSGwendal Grignou    description:
421412b8cfSGwendal Grignou      Capacitance measurement resolution. For both phases, "reference" and
431412b8cfSGwendal Grignou      "measurement". Higher the number, higher the resolution.
441412b8cfSGwendal Grignou    default: 128
451412b8cfSGwendal Grignou
461412b8cfSGwendal Grignou  semtech,proxraw-strength:
471412b8cfSGwendal Grignou    $ref: /schemas/types.yaml#/definitions/uint32
481412b8cfSGwendal Grignou    minimum: 0
491412b8cfSGwendal Grignou    maximum: 7
501412b8cfSGwendal Grignou    default: 1
511412b8cfSGwendal Grignou    description:
521412b8cfSGwendal Grignou      PROXRAW filter strength for both phases. A value of 0 represents off,
531412b8cfSGwendal Grignou      and other values represent 1-1/2^N.
541412b8cfSGwendal Grignou
551412b8cfSGwendal Grignou  semtech,avg-pos-strength:
561412b8cfSGwendal Grignou    $ref: /schemas/types.yaml#/definitions/uint32
571412b8cfSGwendal Grignou    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
581412b8cfSGwendal Grignou    default: 16
591412b8cfSGwendal Grignou    description: |
601412b8cfSGwendal Grignou      Average positive filter strength. A value of 0 represents off and
611412b8cfSGwendal Grignou      UINT_MAX (4294967295) represents infinite. Other values
621412b8cfSGwendal Grignou      represent 1-1/N.
631412b8cfSGwendal Grignou
644f3b42b8SGwendal Grignou  semtech,input-precharge-resistor-ohms:
654f3b42b8SGwendal Grignou    default: 0
664f3b42b8SGwendal Grignou    multipleOf: 2000
674f3b42b8SGwendal Grignou    minimum: 0
684f3b42b8SGwendal Grignou    maximum: 30000
694f3b42b8SGwendal Grignou    description:
704f3b42b8SGwendal Grignou      Pre-charge input resistance in Ohm.
714f3b42b8SGwendal Grignou
721412b8cfSGwendal Grignourequired:
731412b8cfSGwendal Grignou  - compatible
741412b8cfSGwendal Grignou  - reg
751412b8cfSGwendal Grignou  - "#io-channel-cells"
761412b8cfSGwendal Grignou
771412b8cfSGwendal GrignouadditionalProperties: false
781412b8cfSGwendal Grignou
791412b8cfSGwendal Grignouexamples:
801412b8cfSGwendal Grignou  - |
811412b8cfSGwendal Grignou    #include <dt-bindings/interrupt-controller/irq.h>
821412b8cfSGwendal Grignou    i2c {
831412b8cfSGwendal Grignou      #address-cells = <1>;
841412b8cfSGwendal Grignou      #size-cells = <0>;
851412b8cfSGwendal Grignou      proximity@28 {
861412b8cfSGwendal Grignou        compatible = "semtech,sx9360";
871412b8cfSGwendal Grignou        reg = <0x28>;
881412b8cfSGwendal Grignou        interrupt-parent = <&pio>;
891412b8cfSGwendal Grignou        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
901412b8cfSGwendal Grignou        vdd-supply = <&pp3300_a>;
911412b8cfSGwendal Grignou        svdd-supply = <&pp1800_prox>;
921412b8cfSGwendal Grignou        #io-channel-cells = <1>;
931412b8cfSGwendal Grignou        semtech,resolution = <256>;
941412b8cfSGwendal Grignou        semtech,proxraw-strength = <2>;
951412b8cfSGwendal Grignou        semtech,avg-pos-strength = <64>;
964f3b42b8SGwendal Grignou        semtech,input-precharge-resistor-ohms = <4000>;
971412b8cfSGwendal Grignou      };
981412b8cfSGwendal Grignou    };
99