File Index
Files and directories
Sign in
FILE

semtech,sx9324.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/iio/proximity/semtech,sx9324.yaml YAML
  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,sx9324.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Semtech's SX9324 capacitive proximity sensor
  8
  9maintainers:
 10  - Gwendal Grignou <gwendal@chromium.org>
 11  - Daniel Campello <campello@chromium.org>
 12
 13description: |
 14  Semtech's SX9324 proximity sensor.
 15
 16allOf:
 17  - $ref: /schemas/iio/iio.yaml#
 18
 19properties:
 20  compatible:
 21    const: semtech,sx9324
 22
 23  reg:
 24    maxItems: 1
 25
 26  interrupts:
 27    description:
 28      Generated by device to announce preceding read request has finished
 29      and data is available or that a close/far proximity event has happened.
 30    maxItems: 1
 31
 32  vdd-supply:
 33    description: Main power supply
 34
 35  svdd-supply:
 36    description: Host interface power supply
 37
 38  "#io-channel-cells":
 39    const: 1
 40
 41  semtech,ph0-pin:
 42    $ref: /schemas/types.yaml#/definitions/uint32-array
 43    description: |
 44      Array of 3 entries. Index represent the id of the CS pin.
 45      Value indicates how each CS pin is used during phase 0.
 46      Each of the 3 pins have the following value -
 47      0 : unused (high impedance)
 48      1 : measured input
 49      2 : dynamic shield
 50      3 : grounded.
 51      For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3]
 52    items:
 53      enum: [ 0, 1, 2, 3 ]
 54    minItems: 3
 55    maxItems: 3
 56
 57  semtech,ph1-pin:
 58    $ref: /schemas/types.yaml#/definitions/uint32-array
 59    description: Same as ph0-pin for phase 1.
 60    items:
 61      enum: [ 0, 1, 2, 3 ]
 62    minItems: 3
 63    maxItems: 3
 64
 65  semtech,ph2-pin:
 66    $ref: /schemas/types.yaml#/definitions/uint32-array
 67    description: Same as ph0-pin for phase 2.
 68    items:
 69      enum: [ 0, 1, 2, 3 ]
 70    minItems: 3
 71    maxItems: 3
 72
 73  semtech,ph3-pin:
 74    $ref: /schemas/types.yaml#/definitions/uint32-array
 75    description: Same as ph0-pin for phase 3.
 76    items:
 77      enum: [ 0, 1, 2, 3 ]
 78    minItems: 3
 79    maxItems: 3
 80
 81  semtech,ph01-resolution:
 82    $ref: /schemas/types.yaml#/definitions/uint32
 83    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
 84    description:
 85      Capacitance measurement resolution. For phase 0 and 1.
 86      Higher the number, higher the resolution.
 87    default: 128
 88
 89  semtech,ph23-resolution:
 90    $ref: /schemas/types.yaml#/definitions/uint32
 91    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
 92    description:
 93      Capacitance measurement resolution. For phase 2 and 3
 94    default: 128
 95
 96  semtech,startup-sensor:
 97    $ref: /schemas/types.yaml#/definitions/uint32
 98    enum: [0, 1, 2, 3]
 99    default: 0
100    description: |
101      Phase used for start-up proximity detection.
102      It is used when we enable a phase to remove static offset and measure
103      only capacitance changes introduced by the user.
104
105  semtech,ph01-proxraw-strength:
106    $ref: /schemas/types.yaml#/definitions/uint32
107    minimum: 0
108    maximum: 7
109    default: 1
110    description:
111      PROXRAW filter strength for phase 0 and 1. A value of 0 represents off,
112      and other values represent 1-1/2^N.
113
114  semtech,ph23-proxraw-strength:
115    $ref: /schemas/types.yaml#/definitions/uint32
116    minimum: 0
117    maximum: 7
118    default: 1
119    description:
120      Same as proxraw-strength01, for phase 2 and 3.
121
122  semtech,avg-pos-strength:
123    $ref: /schemas/types.yaml#/definitions/uint32
124    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
125    default: 16
126    description: |
127      Average positive filter strength. A value of 0 represents off and
128      UINT_MAX (4294967295) represents infinite. Other values
129      represent 1-1/N.
130
131  semtech,cs-idle-sleep:
132    description:
133      State of CS pins during sleep mode and idle time.
134    enum:
135      - hi-z
136      - gnd
137      - vdd
138
139  semtech,int-comp-resistor:
140    description:
141      Internal resistor setting for compensation.
142    enum:
143      - lowest
144      - low
145      - high
146      - highest
147
148  semtech,input-precharge-resistor-ohms:
149    default: 4000
150    multipleOf: 2000
151    minimum: 0
152    maximum: 30000
153    description:
154      Pre-charge input resistance in Ohm.
155
156  semtech,input-analog-gain:
157    $ref: /schemas/types.yaml#/definitions/uint32
158    minimum: 0
159    maximum: 3
160    description: |
161      Defines the input antenna analog gain
162      0: x1.247
163      1: x1 (default)
164      2: x0.768
165      3: x0.552
166
167required:
168  - compatible
169  - reg
170  - "#io-channel-cells"
171
172unevaluatedProperties: false
173
174examples:
175  - |
176    #include <dt-bindings/interrupt-controller/irq.h>
177    i2c {
178      #address-cells = <1>;
179      #size-cells = <0>;
180      proximity@28 {
181        compatible = "semtech,sx9324";
182        reg = <0x28>;
183        interrupt-parent = <&pio>;
184        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
185        vdd-supply = <&pp3300_a>;
186        svdd-supply = <&pp1800_prox>;
187        #io-channel-cells = <1>;
188        semtech,ph0-pin = <1 2 3>;
189        semtech,ph1-pin = <3 2 1>;
190        semtech,ph2-pin = <1 2 3>;
191        semtech,ph3-pin = <3 2 1>;
192        semtech,ph01-resolution = <256>;
193        semtech,ph23-resolution = <256>;
194        semtech,startup-sensor = <1>;
195        semtech,ph01-proxraw-strength = <2>;
196        semtech,ph23-proxraw-strength = <2>;
197        semtech,avg-pos-strength = <64>;
198        semtech,int-comp-resistor = "lowest";
199        semtech,input-precharge-resistor-ohms = <2000>;
200        semtech,cs-idle-sleep = "gnd";
201      };
202    };
~/ Read-only file preview.