xref: /freebsd/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9360.yaml (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
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
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
64  semtech,input-precharge-resistor-ohms:
65    default: 0
66    multipleOf: 2000
67    minimum: 0
68    maximum: 30000
69    description:
70      Pre-charge input resistance in Ohm.
71
72required:
73  - compatible
74  - reg
75  - "#io-channel-cells"
76
77additionalProperties: false
78
79examples:
80  - |
81    #include <dt-bindings/interrupt-controller/irq.h>
82    i2c {
83      #address-cells = <1>;
84      #size-cells = <0>;
85      proximity@28 {
86        compatible = "semtech,sx9360";
87        reg = <0x28>;
88        interrupt-parent = <&pio>;
89        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
90        vdd-supply = <&pp3300_a>;
91        svdd-supply = <&pp1800_prox>;
92        #io-channel-cells = <1>;
93        semtech,resolution = <256>;
94        semtech,proxraw-strength = <2>;
95        semtech,avg-pos-strength = <64>;
96        semtech,input-precharge-resistor-ohms = <4000>;
97      };
98    };
99