Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/proximity/semtech,sx9324.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Semtech's SX9324 capacitive proximity sensor
0008 
0009 maintainers:
0010   - Gwendal Grignou <gwendal@chromium.org>
0011   - Daniel Campello <campello@chromium.org>
0012 
0013 description: |
0014   Semtech's SX9324 proximity sensor.
0015 
0016 properties:
0017   compatible:
0018     const: semtech,sx9324
0019 
0020   reg:
0021     maxItems: 1
0022 
0023   interrupts:
0024     description:
0025       Generated by device to announce preceding read request has finished
0026       and data is available or that a close/far proximity event has happened.
0027     maxItems: 1
0028 
0029   vdd-supply:
0030     description: Main power supply
0031 
0032   svdd-supply:
0033     description: Host interface power supply
0034 
0035   "#io-channel-cells":
0036     const: 1
0037 
0038   semtech,ph0-pin:
0039     $ref: /schemas/types.yaml#/definitions/uint32-array
0040     description: |
0041       Array of 3 entries. Index represent the id of the CS pin.
0042       Value indicates how each CS pin is used during phase 0.
0043       Each of the 3 pins have the following value -
0044       0 : unused (high impedance)
0045       1 : measured input
0046       2 : dynamic shield
0047       3 : grounded.
0048       For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3]
0049     items:
0050       enum: [ 0, 1, 2, 3 ]
0051     minItems: 3
0052     maxItems: 3
0053 
0054   semtech,ph1-pin:
0055     $ref: /schemas/types.yaml#/definitions/uint32-array
0056     description: Same as ph0-pin for phase 1.
0057     items:
0058       enum: [ 0, 1, 2, 3 ]
0059     minItems: 3
0060     maxItems: 3
0061 
0062   semtech,ph2-pin:
0063     $ref: /schemas/types.yaml#/definitions/uint32-array
0064     description: Same as ph0-pin for phase 2.
0065     items:
0066       enum: [ 0, 1, 2, 3 ]
0067     minItems: 3
0068     maxItems: 3
0069 
0070   semtech,ph3-pin:
0071     $ref: /schemas/types.yaml#/definitions/uint32-array
0072     description: Same as ph0-pin for phase 3.
0073     items:
0074       enum: [ 0, 1, 2, 3 ]
0075     minItems: 3
0076     maxItems: 3
0077 
0078 
0079   semtech,ph01-resolution:
0080     $ref: /schemas/types.yaml#/definitions/uint32
0081     enum: [8, 16, 32, 64, 128, 256, 512, 1024]
0082     description:
0083       Capacitance measurement resolution. For phase 0 and 1.
0084       Higher the number, higher the resolution.
0085     default: 128
0086 
0087   semtech,ph23-resolution:
0088     $ref: /schemas/types.yaml#/definitions/uint32
0089     enum: [8, 16, 32, 64, 128, 256, 512, 1024]
0090     description:
0091       Capacitance measurement resolution. For phase 2 and 3
0092     default: 128
0093 
0094   semtech,startup-sensor:
0095     $ref: /schemas/types.yaml#/definitions/uint32
0096     enum: [0, 1, 2, 3]
0097     default: 0
0098     description: |
0099       Phase used for start-up proximity detection.
0100       It is used when we enable a phase to remove static offset and measure
0101       only capacitance changes introduced by the user.
0102 
0103   semtech,ph01-proxraw-strength:
0104     $ref: /schemas/types.yaml#/definitions/uint32
0105     minimum: 0
0106     maximum: 7
0107     default: 1
0108     description:
0109       PROXRAW filter strength for phase 0 and 1. A value of 0 represents off,
0110       and other values represent 1-1/2^N.
0111 
0112   semtech,ph23-proxraw-strength:
0113     $ref: /schemas/types.yaml#/definitions/uint32
0114     minimum: 0
0115     maximum: 7
0116     default: 1
0117     description:
0118       Same as proxraw-strength01, for phase 2 and 3.
0119 
0120   semtech,avg-pos-strength:
0121     $ref: /schemas/types.yaml#/definitions/uint32
0122     enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
0123     default: 16
0124     description: |
0125       Average positive filter strength. A value of 0 represents off and
0126       UINT_MAX (4294967295) represents infinite. Other values
0127       represent 1-1/N.
0128 
0129   semtech,cs-idle-sleep:
0130     description:
0131       State of CS pins during sleep mode and idle time.
0132     enum:
0133       - hi-z
0134       - gnd
0135       - vdd
0136 
0137   semtech,int-comp-resistor:
0138     description:
0139       Internal resistor setting for compensation.
0140     enum:
0141       - lowest
0142       - low
0143       - high
0144       - highest
0145 
0146   semtech,input-precharge-resistor-ohms:
0147     default: 4000
0148     multipleOf: 2000
0149     minimum: 0
0150     maximum: 30000
0151     description:
0152       Pre-charge input resistance in Ohm.
0153 
0154   semtech,input-analog-gain:
0155     $ref: /schemas/types.yaml#/definitions/uint32
0156     minimum: 0
0157     maximum: 3
0158     description: |
0159       Defines the input antenna analog gain
0160       0: x1.247
0161       1: x1 (default)
0162       2: x0.768
0163       3: x0.552
0164 
0165 required:
0166   - compatible
0167   - reg
0168   - "#io-channel-cells"
0169 
0170 additionalProperties: false
0171 
0172 examples:
0173   - |
0174     #include <dt-bindings/interrupt-controller/irq.h>
0175     i2c {
0176       #address-cells = <1>;
0177       #size-cells = <0>;
0178       proximity@28 {
0179         compatible = "semtech,sx9324";
0180         reg = <0x28>;
0181         interrupt-parent = <&pio>;
0182         interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
0183         vdd-supply = <&pp3300_a>;
0184         svdd-supply = <&pp1800_prox>;
0185         #io-channel-cells = <1>;
0186         semtech,ph0-pin = <1 2 3>;
0187         semtech,ph1-pin = <3 2 1>;
0188         semtech,ph2-pin = <1 2 3>;
0189         semtech,ph3-pin = <3 2 1>;
0190         semtech,ph01-resolution = <256>;
0191         semtech,ph23-resolution = <256>;
0192         semtech,startup-sensor = <1>;
0193         semtech,ph01-proxraw-strength = <2>;
0194         semtech,ph23-proxraw-strength = <2>;
0195         semtech,avg-pos-strength = <64>;
0196         semtech,int-comp-resistor = "lowest";
0197         semtech,input-precharge-resistor-ohms = <2000>;
0198         semtech,cs-idle-sleep = "gnd";
0199       };
0200     };