11d863d13SDaniel Campello# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
21d863d13SDaniel Campello%YAML 1.2
31d863d13SDaniel Campello---
41d863d13SDaniel Campello$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9310.yaml#
51d863d13SDaniel Campello$schema: http://devicetree.org/meta-schemas/core.yaml#
61d863d13SDaniel Campello
71d863d13SDaniel Campellotitle: Semtech's SX9310 capacitive proximity sensor
81d863d13SDaniel Campello
91d863d13SDaniel Campellomaintainers:
101d863d13SDaniel Campello  - Daniel Campello <campello@chromium.org>
111d863d13SDaniel Campello
121d863d13SDaniel Campellodescription: |
131d863d13SDaniel Campello  Semtech's SX9310/SX9311 capacitive proximity/button solution.
141d863d13SDaniel Campello
151d863d13SDaniel Campello  Specifications about the devices can be found at:
161d863d13SDaniel Campello  https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310
171d863d13SDaniel Campello
181d863d13SDaniel Campelloproperties:
191d863d13SDaniel Campello  compatible:
201d863d13SDaniel Campello    enum:
211d863d13SDaniel Campello      - semtech,sx9310
221d863d13SDaniel Campello      - semtech,sx9311
231d863d13SDaniel Campello
241d863d13SDaniel Campello  reg:
251d863d13SDaniel Campello    maxItems: 1
261d863d13SDaniel Campello
271d863d13SDaniel Campello  interrupts:
281d863d13SDaniel Campello    description:
291d863d13SDaniel Campello      The sole interrupt generated by the device used to announce the
301d863d13SDaniel Campello      preceding reading request has finished and that data is
311d863d13SDaniel Campello      available or that a close/far proximity event has happened.
321d863d13SDaniel Campello    maxItems: 1
331d863d13SDaniel Campello
341d863d13SDaniel Campello  vdd-supply:
351d863d13SDaniel Campello    description: Main power supply
361d863d13SDaniel Campello
371d863d13SDaniel Campello  svdd-supply:
381d863d13SDaniel Campello    description: Host interface power supply
391d863d13SDaniel Campello
401d863d13SDaniel Campello  "#io-channel-cells":
411d863d13SDaniel Campello    const: 1
421d863d13SDaniel Campello
43e94b3c60SStephen Boyd  semtech,cs0-ground:
44e94b3c60SStephen Boyd    description: Indicates the CS0 sensor is connected to ground.
45e94b3c60SStephen Boyd    type: boolean
46e94b3c60SStephen Boyd
47e94b3c60SStephen Boyd  semtech,combined-sensors:
48e94b3c60SStephen Boyd    $ref: /schemas/types.yaml#/definitions/uint32-array
49e94b3c60SStephen Boyd    description: |
50e94b3c60SStephen Boyd      List of which sensors are combined and represented by CS3.
51e94b3c60SStephen Boyd      Possible values are -
52e94b3c60SStephen Boyd      3        - CS3 (internal)
53e94b3c60SStephen Boyd      0 1      - CS0 + CS1
54e94b3c60SStephen Boyd      1 2      - CS1 + CS2 (default)
55e94b3c60SStephen Boyd      0 1 2 3  - CS0 + CS1 + CS2 + CS3
56e94b3c60SStephen Boyd    items:
57e94b3c60SStephen Boyd      enum: [ 0, 1, 2, 3 ]
58e94b3c60SStephen Boyd    minItems: 1
59e94b3c60SStephen Boyd    maxItems: 4
60e94b3c60SStephen Boyd
61e94b3c60SStephen Boyd  semtech,resolution:
62e94b3c60SStephen Boyd    description:
63e94b3c60SStephen Boyd      Capacitance measure resolution. Refer to datasheet for more details.
64e94b3c60SStephen Boyd    enum:
65e94b3c60SStephen Boyd      - coarsest
66e94b3c60SStephen Boyd      - very-coarse
67e94b3c60SStephen Boyd      - coarse
68e94b3c60SStephen Boyd      - medium-coarse
69e94b3c60SStephen Boyd      - medium
70e94b3c60SStephen Boyd      - fine
71e94b3c60SStephen Boyd      - very-fine
72e94b3c60SStephen Boyd      - finest
73e94b3c60SStephen Boyd
74e94b3c60SStephen Boyd  semtech,startup-sensor:
75*d69c6dddSRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
76e94b3c60SStephen Boyd    enum: [0, 1, 2, 3]
77e94b3c60SStephen Boyd    default: 0
78e94b3c60SStephen Boyd    description:
79e94b3c60SStephen Boyd      Sensor used for start-up proximity detection. The combined
80e94b3c60SStephen Boyd      sensor is represented by the value 3. This is used for initial
81e94b3c60SStephen Boyd      compensation.
82e94b3c60SStephen Boyd
83e94b3c60SStephen Boyd  semtech,proxraw-strength:
84*d69c6dddSRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
85e94b3c60SStephen Boyd    enum: [0, 2, 4, 8]
86e94b3c60SStephen Boyd    default: 2
87e94b3c60SStephen Boyd    description:
88e94b3c60SStephen Boyd      PROXRAW filter strength. A value of 0 represents off, and other values
89e94b3c60SStephen Boyd      represent 1-1/N.
90e94b3c60SStephen Boyd
91e94b3c60SStephen Boyd  semtech,avg-pos-strength:
92*d69c6dddSRob Herring    $ref: /schemas/types.yaml#/definitions/uint32
93e94b3c60SStephen Boyd    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
94e94b3c60SStephen Boyd    default: 16
95e94b3c60SStephen Boyd    description:
96e94b3c60SStephen Boyd      Average positive filter strength. A value of 0 represents off and
97e94b3c60SStephen Boyd      UINT_MAX (4294967295) represents infinite. Other values
98e94b3c60SStephen Boyd      represent 1-1/N.
99e94b3c60SStephen Boyd
1001d863d13SDaniel Campellorequired:
1011d863d13SDaniel Campello  - compatible
1021d863d13SDaniel Campello  - reg
1031d863d13SDaniel Campello  - "#io-channel-cells"
1041d863d13SDaniel Campello
1051d863d13SDaniel CampelloadditionalProperties: false
1061d863d13SDaniel Campello
1071d863d13SDaniel Campelloexamples:
1081d863d13SDaniel Campello  - |
1091d863d13SDaniel Campello    #include <dt-bindings/interrupt-controller/irq.h>
1101d863d13SDaniel Campello    i2c {
1111d863d13SDaniel Campello      #address-cells = <1>;
1121d863d13SDaniel Campello      #size-cells = <0>;
1131d863d13SDaniel Campello      proximity@28 {
1141d863d13SDaniel Campello        compatible = "semtech,sx9310";
1151d863d13SDaniel Campello        reg = <0x28>;
1161d863d13SDaniel Campello        interrupt-parent = <&pio>;
1171d863d13SDaniel Campello        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
1181d863d13SDaniel Campello        vdd-supply = <&pp3300_a>;
1191d863d13SDaniel Campello        svdd-supply = <&pp1800_prox>;
1201d863d13SDaniel Campello        #io-channel-cells = <1>;
121e94b3c60SStephen Boyd        semtech,cs0-ground;
122e94b3c60SStephen Boyd        semtech,combined-sensors = <1 2 3>;
123e94b3c60SStephen Boyd        semtech,resolution = "fine";
124e94b3c60SStephen Boyd        semtech,startup-sensor = <1>;
125e94b3c60SStephen Boyd        semtech,proxraw-strength = <2>;
126e94b3c60SStephen Boyd        semtech,avg-pos-strength = <64>;
1271d863d13SDaniel Campello      };
1281d863d13SDaniel Campello    };
129