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,sx9310.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Semtech's SX9310 capacitive proximity sensor
8
9maintainers:
10  - Daniel Campello <campello@chromium.org>
11
12description: |
13  Semtech's SX9310/SX9311 capacitive proximity/button solution.
14
15  Specifications about the devices can be found at:
16  https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310
17
18properties:
19  compatible:
20    enum:
21      - semtech,sx9310
22      - semtech,sx9311
23
24  reg:
25    maxItems: 1
26
27  interrupts:
28    description:
29      The sole interrupt generated by the device used to announce the
30      preceding reading request has finished and that data is
31      available or that a close/far proximity event has happened.
32    maxItems: 1
33
34  vdd-supply:
35    description: Main power supply
36
37  svdd-supply:
38    description: Host interface power supply
39
40  "#io-channel-cells":
41    const: 1
42
43  semtech,cs0-ground:
44    description: Indicates the CS0 sensor is connected to ground.
45    type: boolean
46
47  semtech,combined-sensors:
48    $ref: /schemas/types.yaml#/definitions/uint32-array
49    description: |
50      List of which sensors are combined and represented by CS3.
51      Possible values are -
52      3        - CS3 (internal)
53      0 1      - CS0 + CS1
54      1 2      - CS1 + CS2 (default)
55      0 1 2 3  - CS0 + CS1 + CS2 + CS3
56    items:
57      enum: [ 0, 1, 2, 3 ]
58    minItems: 1
59    maxItems: 4
60
61  semtech,resolution:
62    description:
63      Capacitance measure resolution. Refer to datasheet for more details.
64    enum:
65      - coarsest
66      - very-coarse
67      - coarse
68      - medium-coarse
69      - medium
70      - fine
71      - very-fine
72      - finest
73
74  semtech,startup-sensor:
75    $ref: /schemas/types.yaml#/definitions/uint32
76    enum: [0, 1, 2, 3]
77    default: 0
78    description:
79      Sensor used for start-up proximity detection. The combined
80      sensor is represented by the value 3. This is used for initial
81      compensation.
82
83  semtech,proxraw-strength:
84    $ref: /schemas/types.yaml#/definitions/uint32
85    enum: [0, 2, 4, 8]
86    default: 2
87    description:
88      PROXRAW filter strength. A value of 0 represents off, and other values
89      represent 1-1/N.
90
91  semtech,avg-pos-strength:
92    $ref: /schemas/types.yaml#/definitions/uint32
93    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
94    default: 16
95    description:
96      Average positive filter strength. A value of 0 represents off and
97      UINT_MAX (4294967295) represents infinite. Other values
98      represent 1-1/N.
99
100required:
101  - compatible
102  - reg
103  - "#io-channel-cells"
104
105additionalProperties: false
106
107examples:
108  - |
109    #include <dt-bindings/interrupt-controller/irq.h>
110    i2c {
111      #address-cells = <1>;
112      #size-cells = <0>;
113      proximity@28 {
114        compatible = "semtech,sx9310";
115        reg = <0x28>;
116        interrupt-parent = <&pio>;
117        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
118        vdd-supply = <&pp3300_a>;
119        svdd-supply = <&pp1800_prox>;
120        #io-channel-cells = <1>;
121        semtech,cs0-ground;
122        semtech,combined-sensors = <1 2 3>;
123        semtech,resolution = "fine";
124        semtech,startup-sensor = <1>;
125        semtech,proxraw-strength = <2>;
126        semtech,avg-pos-strength = <64>;
127      };
128    };
129