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,sx9310.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Semtech's SX9310 capacitive proximity sensor
0008 
0009 maintainers:
0010   - Daniel Campello <campello@chromium.org>
0011 
0012 description: |
0013   Semtech's SX9310/SX9311 capacitive proximity/button solution.
0014 
0015   Specifications about the devices can be found at:
0016   https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310
0017 
0018 properties:
0019   compatible:
0020     enum:
0021       - semtech,sx9310
0022       - semtech,sx9311
0023 
0024   reg:
0025     maxItems: 1
0026 
0027   interrupts:
0028     description:
0029       The sole interrupt generated by the device used to announce the
0030       preceding reading request has finished and that data is
0031       available or that a close/far proximity event has happened.
0032     maxItems: 1
0033 
0034   vdd-supply:
0035     description: Main power supply
0036 
0037   svdd-supply:
0038     description: Host interface power supply
0039 
0040   "#io-channel-cells":
0041     const: 1
0042 
0043   semtech,cs0-ground:
0044     description: Indicates the CS0 sensor is connected to ground.
0045     type: boolean
0046 
0047   semtech,combined-sensors:
0048     $ref: /schemas/types.yaml#/definitions/uint32-array
0049     description: |
0050       List of which sensors are combined and represented by CS3.
0051       Possible values are -
0052       3        - CS3 (internal)
0053       0 1      - CS0 + CS1
0054       1 2      - CS1 + CS2 (default)
0055       0 1 2 3  - CS0 + CS1 + CS2 + CS3
0056     items:
0057       enum: [ 0, 1, 2, 3 ]
0058     minItems: 1
0059     maxItems: 4
0060 
0061   semtech,resolution:
0062     description:
0063       Capacitance measure resolution. Refer to datasheet for more details.
0064     enum:
0065       - coarsest
0066       - very-coarse
0067       - coarse
0068       - medium-coarse
0069       - medium
0070       - fine
0071       - very-fine
0072       - finest
0073 
0074   semtech,startup-sensor:
0075     $ref: /schemas/types.yaml#/definitions/uint32
0076     enum: [0, 1, 2, 3]
0077     default: 0
0078     description:
0079       Sensor used for start-up proximity detection. The combined
0080       sensor is represented by the value 3. This is used for initial
0081       compensation.
0082 
0083   semtech,proxraw-strength:
0084     $ref: /schemas/types.yaml#/definitions/uint32
0085     enum: [0, 2, 4, 8]
0086     default: 2
0087     description:
0088       PROXRAW filter strength. A value of 0 represents off, and other values
0089       represent 1-1/N.
0090 
0091   semtech,avg-pos-strength:
0092     $ref: /schemas/types.yaml#/definitions/uint32
0093     enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
0094     default: 16
0095     description:
0096       Average positive filter strength. A value of 0 represents off and
0097       UINT_MAX (4294967295) represents infinite. Other values
0098       represent 1-1/N.
0099 
0100 required:
0101   - compatible
0102   - reg
0103   - "#io-channel-cells"
0104 
0105 additionalProperties: false
0106 
0107 examples:
0108   - |
0109     #include <dt-bindings/interrupt-controller/irq.h>
0110     i2c {
0111       #address-cells = <1>;
0112       #size-cells = <0>;
0113       proximity@28 {
0114         compatible = "semtech,sx9310";
0115         reg = <0x28>;
0116         interrupt-parent = <&pio>;
0117         interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
0118         vdd-supply = <&pp3300_a>;
0119         svdd-supply = <&pp1800_prox>;
0120         #io-channel-cells = <1>;
0121         semtech,cs0-ground;
0122         semtech,combined-sensors = <1 2 3>;
0123         semtech,resolution = "fine";
0124         semtech,startup-sensor = <1>;
0125         semtech,proxraw-strength = <2>;
0126         semtech,avg-pos-strength = <64>;
0127       };
0128     };