xref: /freebsd/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9310.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
26be33864SEmmanuel Vadot%YAML 1.2
36be33864SEmmanuel Vadot---
46be33864SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9310.yaml#
56be33864SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
66be33864SEmmanuel Vadot
76be33864SEmmanuel Vadottitle: Semtech's SX9310 capacitive proximity sensor
86be33864SEmmanuel Vadot
96be33864SEmmanuel Vadotmaintainers:
106be33864SEmmanuel Vadot  - Daniel Campello <campello@chromium.org>
116be33864SEmmanuel Vadot
126be33864SEmmanuel Vadotdescription: |
136be33864SEmmanuel Vadot  Semtech's SX9310/SX9311 capacitive proximity/button solution.
146be33864SEmmanuel Vadot
156be33864SEmmanuel Vadot  Specifications about the devices can be found at:
166be33864SEmmanuel Vadot  https://www.semtech.com/products/smart-sensing/sar-sensors/sx9310
176be33864SEmmanuel Vadot
18*aa1a8ff2SEmmanuel VadotallOf:
19*aa1a8ff2SEmmanuel Vadot  - $ref: /schemas/iio/iio.yaml#
20*aa1a8ff2SEmmanuel Vadot
216be33864SEmmanuel Vadotproperties:
226be33864SEmmanuel Vadot  compatible:
236be33864SEmmanuel Vadot    enum:
246be33864SEmmanuel Vadot      - semtech,sx9310
256be33864SEmmanuel Vadot      - semtech,sx9311
266be33864SEmmanuel Vadot
276be33864SEmmanuel Vadot  reg:
286be33864SEmmanuel Vadot    maxItems: 1
296be33864SEmmanuel Vadot
306be33864SEmmanuel Vadot  interrupts:
316be33864SEmmanuel Vadot    description:
326be33864SEmmanuel Vadot      The sole interrupt generated by the device used to announce the
336be33864SEmmanuel Vadot      preceding reading request has finished and that data is
346be33864SEmmanuel Vadot      available or that a close/far proximity event has happened.
356be33864SEmmanuel Vadot    maxItems: 1
366be33864SEmmanuel Vadot
376be33864SEmmanuel Vadot  vdd-supply:
386be33864SEmmanuel Vadot    description: Main power supply
396be33864SEmmanuel Vadot
406be33864SEmmanuel Vadot  svdd-supply:
416be33864SEmmanuel Vadot    description: Host interface power supply
426be33864SEmmanuel Vadot
436be33864SEmmanuel Vadot  "#io-channel-cells":
446be33864SEmmanuel Vadot    const: 1
456be33864SEmmanuel Vadot
465def4c47SEmmanuel Vadot  semtech,cs0-ground:
475def4c47SEmmanuel Vadot    description: Indicates the CS0 sensor is connected to ground.
485def4c47SEmmanuel Vadot    type: boolean
495def4c47SEmmanuel Vadot
505def4c47SEmmanuel Vadot  semtech,combined-sensors:
515def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
525def4c47SEmmanuel Vadot    description: |
535def4c47SEmmanuel Vadot      List of which sensors are combined and represented by CS3.
545def4c47SEmmanuel Vadot      Possible values are -
555def4c47SEmmanuel Vadot      3        - CS3 (internal)
565def4c47SEmmanuel Vadot      0 1      - CS0 + CS1
575def4c47SEmmanuel Vadot      1 2      - CS1 + CS2 (default)
585def4c47SEmmanuel Vadot      0 1 2 3  - CS0 + CS1 + CS2 + CS3
595def4c47SEmmanuel Vadot    items:
605def4c47SEmmanuel Vadot      enum: [ 0, 1, 2, 3 ]
615def4c47SEmmanuel Vadot    minItems: 1
625def4c47SEmmanuel Vadot    maxItems: 4
635def4c47SEmmanuel Vadot
645def4c47SEmmanuel Vadot  semtech,resolution:
655def4c47SEmmanuel Vadot    description:
665def4c47SEmmanuel Vadot      Capacitance measure resolution. Refer to datasheet for more details.
675def4c47SEmmanuel Vadot    enum:
685def4c47SEmmanuel Vadot      - coarsest
695def4c47SEmmanuel Vadot      - very-coarse
705def4c47SEmmanuel Vadot      - coarse
715def4c47SEmmanuel Vadot      - medium-coarse
725def4c47SEmmanuel Vadot      - medium
735def4c47SEmmanuel Vadot      - fine
745def4c47SEmmanuel Vadot      - very-fine
755def4c47SEmmanuel Vadot      - finest
765def4c47SEmmanuel Vadot
775def4c47SEmmanuel Vadot  semtech,startup-sensor:
785def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
795def4c47SEmmanuel Vadot    enum: [0, 1, 2, 3]
805def4c47SEmmanuel Vadot    default: 0
815def4c47SEmmanuel Vadot    description:
825def4c47SEmmanuel Vadot      Sensor used for start-up proximity detection. The combined
835def4c47SEmmanuel Vadot      sensor is represented by the value 3. This is used for initial
845def4c47SEmmanuel Vadot      compensation.
855def4c47SEmmanuel Vadot
865def4c47SEmmanuel Vadot  semtech,proxraw-strength:
875def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
885def4c47SEmmanuel Vadot    enum: [0, 2, 4, 8]
895def4c47SEmmanuel Vadot    default: 2
905def4c47SEmmanuel Vadot    description:
915def4c47SEmmanuel Vadot      PROXRAW filter strength. A value of 0 represents off, and other values
925def4c47SEmmanuel Vadot      represent 1-1/N.
935def4c47SEmmanuel Vadot
945def4c47SEmmanuel Vadot  semtech,avg-pos-strength:
955def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
965def4c47SEmmanuel Vadot    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
975def4c47SEmmanuel Vadot    default: 16
985def4c47SEmmanuel Vadot    description:
995def4c47SEmmanuel Vadot      Average positive filter strength. A value of 0 represents off and
1005def4c47SEmmanuel Vadot      UINT_MAX (4294967295) represents infinite. Other values
1015def4c47SEmmanuel Vadot      represent 1-1/N.
1025def4c47SEmmanuel Vadot
1036be33864SEmmanuel Vadotrequired:
1046be33864SEmmanuel Vadot  - compatible
1056be33864SEmmanuel Vadot  - reg
1066be33864SEmmanuel Vadot  - "#io-channel-cells"
1076be33864SEmmanuel Vadot
108*aa1a8ff2SEmmanuel VadotunevaluatedProperties: false
1096be33864SEmmanuel Vadot
1106be33864SEmmanuel Vadotexamples:
1116be33864SEmmanuel Vadot  - |
1126be33864SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
1136be33864SEmmanuel Vadot    i2c {
1146be33864SEmmanuel Vadot      #address-cells = <1>;
1156be33864SEmmanuel Vadot      #size-cells = <0>;
1166be33864SEmmanuel Vadot      proximity@28 {
1176be33864SEmmanuel Vadot        compatible = "semtech,sx9310";
1186be33864SEmmanuel Vadot        reg = <0x28>;
1196be33864SEmmanuel Vadot        interrupt-parent = <&pio>;
1206be33864SEmmanuel Vadot        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
1216be33864SEmmanuel Vadot        vdd-supply = <&pp3300_a>;
1226be33864SEmmanuel Vadot        svdd-supply = <&pp1800_prox>;
1236be33864SEmmanuel Vadot        #io-channel-cells = <1>;
1245def4c47SEmmanuel Vadot        semtech,cs0-ground;
1255def4c47SEmmanuel Vadot        semtech,combined-sensors = <1 2 3>;
1265def4c47SEmmanuel Vadot        semtech,resolution = "fine";
1275def4c47SEmmanuel Vadot        semtech,startup-sensor = <1>;
1285def4c47SEmmanuel Vadot        semtech,proxraw-strength = <2>;
1295def4c47SEmmanuel Vadot        semtech,avg-pos-strength = <64>;
1306be33864SEmmanuel Vadot      };
1316be33864SEmmanuel Vadot    };
132