204 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---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 sensor8 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,sx932422 23 reg:24 maxItems: 125 26 interrupts:27 description:28 Generated by device to announce preceding read request has finished29 and data is available or that a close/far proximity event has happened.30 maxItems: 131 32 vdd-supply:33 description: Main power supply34 35 svdd-supply:36 description: Host interface power supply37 38 "#io-channel-cells":39 const: 140 41 semtech,ph0-pin:42 $ref: /schemas/types.yaml#/definitions/uint32-array43 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 input49 2 : dynamic shield50 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: 355 maxItems: 356 57 semtech,ph1-pin:58 $ref: /schemas/types.yaml#/definitions/uint32-array59 description: Same as ph0-pin for phase 1.60 items:61 enum: [ 0, 1, 2, 3 ]62 minItems: 363 maxItems: 364 65 semtech,ph2-pin:66 $ref: /schemas/types.yaml#/definitions/uint32-array67 description: Same as ph0-pin for phase 2.68 items:69 enum: [ 0, 1, 2, 3 ]70 minItems: 371 maxItems: 372 73 semtech,ph3-pin:74 $ref: /schemas/types.yaml#/definitions/uint32-array75 description: Same as ph0-pin for phase 3.76 items:77 enum: [ 0, 1, 2, 3 ]78 minItems: 379 maxItems: 380 81 82 semtech,ph01-resolution:83 $ref: /schemas/types.yaml#/definitions/uint3284 enum: [8, 16, 32, 64, 128, 256, 512, 1024]85 description:86 Capacitance measurement resolution. For phase 0 and 1.87 Higher the number, higher the resolution.88 default: 12889 90 semtech,ph23-resolution:91 $ref: /schemas/types.yaml#/definitions/uint3292 enum: [8, 16, 32, 64, 128, 256, 512, 1024]93 description:94 Capacitance measurement resolution. For phase 2 and 395 default: 12896 97 semtech,startup-sensor:98 $ref: /schemas/types.yaml#/definitions/uint3299 enum: [0, 1, 2, 3]100 default: 0101 description: |102 Phase used for start-up proximity detection.103 It is used when we enable a phase to remove static offset and measure104 only capacitance changes introduced by the user.105 106 semtech,ph01-proxraw-strength:107 $ref: /schemas/types.yaml#/definitions/uint32108 minimum: 0109 maximum: 7110 default: 1111 description:112 PROXRAW filter strength for phase 0 and 1. A value of 0 represents off,113 and other values represent 1-1/2^N.114 115 semtech,ph23-proxraw-strength:116 $ref: /schemas/types.yaml#/definitions/uint32117 minimum: 0118 maximum: 7119 default: 1120 description:121 Same as proxraw-strength01, for phase 2 and 3.122 123 semtech,avg-pos-strength:124 $ref: /schemas/types.yaml#/definitions/uint32125 enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]126 default: 16127 description: |128 Average positive filter strength. A value of 0 represents off and129 UINT_MAX (4294967295) represents infinite. Other values130 represent 1-1/N.131 132 semtech,cs-idle-sleep:133 description:134 State of CS pins during sleep mode and idle time.135 enum:136 - hi-z137 - gnd138 - vdd139 140 semtech,int-comp-resistor:141 description:142 Internal resistor setting for compensation.143 enum:144 - lowest145 - low146 - high147 - highest148 149 semtech,input-precharge-resistor-ohms:150 default: 4000151 multipleOf: 2000152 minimum: 0153 maximum: 30000154 description:155 Pre-charge input resistance in Ohm.156 157 semtech,input-analog-gain:158 $ref: /schemas/types.yaml#/definitions/uint32159 minimum: 0160 maximum: 3161 description: |162 Defines the input antenna analog gain163 0: x1.247164 1: x1 (default)165 2: x0.768166 3: x0.552167 168required:169 - compatible170 - reg171 - "#io-channel-cells"172 173unevaluatedProperties: false174 175examples:176 - |177 #include <dt-bindings/interrupt-controller/irq.h>178 i2c {179 #address-cells = <1>;180 #size-cells = <0>;181 proximity@28 {182 compatible = "semtech,sx9324";183 reg = <0x28>;184 interrupt-parent = <&pio>;185 interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;186 vdd-supply = <&pp3300_a>;187 svdd-supply = <&pp1800_prox>;188 #io-channel-cells = <1>;189 semtech,ph0-pin = <1 2 3>;190 semtech,ph1-pin = <3 2 1>;191 semtech,ph2-pin = <1 2 3>;192 semtech,ph3-pin = <3 2 1>;193 semtech,ph01-resolution = <256>;194 semtech,ph23-resolution = <256>;195 semtech,startup-sensor = <1>;196 semtech,ph01-proxraw-strength = <2>;197 semtech,ph23-proxraw-strength = <2>;198 semtech,avg-pos-strength = <64>;199 semtech,int-comp-resistor = "lowest";200 semtech,input-precharge-resistor-ohms = <2000>;201 semtech,cs-idle-sleep = "gnd";202 };203 };204