xref: /freebsd/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9360.yaml (revision 3a3af6b2a160bea72509a9d5ef84e25906b0478a)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9360.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Semtech's SX9360 capacitive proximity sensor
8
9maintainers:
10  - Gwendal Grignou <gwendal@chromium.org>
11  - Daniel Campello <campello@chromium.org>
12
13description: |
14  Semtech's SX9360 proximity sensor.
15
16properties:
17  compatible:
18    const: semtech,sx9360
19
20  reg:
21    maxItems: 1
22
23  interrupts:
24    description:
25      Generated by device to announce preceding read request has finished
26      and data is available or that a close/far proximity event has happened.
27    maxItems: 1
28
29  vdd-supply:
30    description: Main power supply
31
32  svdd-supply:
33    description: Host interface power supply
34
35  "#io-channel-cells":
36    const: 1
37
38  semtech,resolution:
39    $ref: /schemas/types.yaml#/definitions/uint32-array
40    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
41    description:
42      Capacitance measurement resolution. For both phases, "reference" and
43      "measurement". Higher the number, higher the resolution.
44    default: 128
45
46  semtech,proxraw-strength:
47    $ref: /schemas/types.yaml#/definitions/uint32
48    minimum: 0
49    maximum: 7
50    default: 1
51    description:
52      PROXRAW filter strength for both phases. A value of 0 represents off,
53      and other values represent 1-1/2^N.
54
55  semtech,avg-pos-strength:
56    $ref: /schemas/types.yaml#/definitions/uint32
57    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
58    default: 16
59    description: |
60      Average positive filter strength. A value of 0 represents off and
61      UINT_MAX (4294967295) represents infinite. Other values
62      represent 1-1/N.
63
64required:
65  - compatible
66  - reg
67  - "#io-channel-cells"
68
69additionalProperties: false
70
71examples:
72  - |
73    #include <dt-bindings/interrupt-controller/irq.h>
74    i2c {
75      #address-cells = <1>;
76      #size-cells = <0>;
77      proximity@28 {
78        compatible = "semtech,sx9360";
79        reg = <0x28>;
80        interrupt-parent = <&pio>;
81        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
82        vdd-supply = <&pp3300_a>;
83        svdd-supply = <&pp1800_prox>;
84        #io-channel-cells = <1>;
85        semtech,resolution = <256>;
86        semtech,proxraw-strength = <2>;
87        semtech,avg-pos-strength = <64>;
88      };
89    };
90