xref: /freebsd/sys/contrib/device-tree/Bindings/iio/proximity/semtech,sx9360.yaml (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1*c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*c9ccf3a3SEmmanuel Vadot%YAML 1.2
3*c9ccf3a3SEmmanuel Vadot---
4*c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9360.yaml#
5*c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*c9ccf3a3SEmmanuel Vadot
7*c9ccf3a3SEmmanuel Vadottitle: Semtech's SX9360 capacitive proximity sensor
8*c9ccf3a3SEmmanuel Vadot
9*c9ccf3a3SEmmanuel Vadotmaintainers:
10*c9ccf3a3SEmmanuel Vadot  - Gwendal Grignou <gwendal@chromium.org>
11*c9ccf3a3SEmmanuel Vadot  - Daniel Campello <campello@chromium.org>
12*c9ccf3a3SEmmanuel Vadot
13*c9ccf3a3SEmmanuel Vadotdescription: |
14*c9ccf3a3SEmmanuel Vadot  Semtech's SX9360 proximity sensor.
15*c9ccf3a3SEmmanuel Vadot
16*c9ccf3a3SEmmanuel Vadotproperties:
17*c9ccf3a3SEmmanuel Vadot  compatible:
18*c9ccf3a3SEmmanuel Vadot    const: semtech,sx9360
19*c9ccf3a3SEmmanuel Vadot
20*c9ccf3a3SEmmanuel Vadot  reg:
21*c9ccf3a3SEmmanuel Vadot    maxItems: 1
22*c9ccf3a3SEmmanuel Vadot
23*c9ccf3a3SEmmanuel Vadot  interrupts:
24*c9ccf3a3SEmmanuel Vadot    description:
25*c9ccf3a3SEmmanuel Vadot      Generated by device to announce preceding read request has finished
26*c9ccf3a3SEmmanuel Vadot      and data is available or that a close/far proximity event has happened.
27*c9ccf3a3SEmmanuel Vadot    maxItems: 1
28*c9ccf3a3SEmmanuel Vadot
29*c9ccf3a3SEmmanuel Vadot  vdd-supply:
30*c9ccf3a3SEmmanuel Vadot    description: Main power supply
31*c9ccf3a3SEmmanuel Vadot
32*c9ccf3a3SEmmanuel Vadot  svdd-supply:
33*c9ccf3a3SEmmanuel Vadot    description: Host interface power supply
34*c9ccf3a3SEmmanuel Vadot
35*c9ccf3a3SEmmanuel Vadot  "#io-channel-cells":
36*c9ccf3a3SEmmanuel Vadot    const: 1
37*c9ccf3a3SEmmanuel Vadot
38*c9ccf3a3SEmmanuel Vadot  semtech,resolution:
39*c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32-array
40*c9ccf3a3SEmmanuel Vadot    enum: [8, 16, 32, 64, 128, 256, 512, 1024]
41*c9ccf3a3SEmmanuel Vadot    description:
42*c9ccf3a3SEmmanuel Vadot      Capacitance measurement resolution. For both phases, "reference" and
43*c9ccf3a3SEmmanuel Vadot      "measurement". Higher the number, higher the resolution.
44*c9ccf3a3SEmmanuel Vadot    default: 128
45*c9ccf3a3SEmmanuel Vadot
46*c9ccf3a3SEmmanuel Vadot  semtech,proxraw-strength:
47*c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
48*c9ccf3a3SEmmanuel Vadot    minimum: 0
49*c9ccf3a3SEmmanuel Vadot    maximum: 7
50*c9ccf3a3SEmmanuel Vadot    default: 1
51*c9ccf3a3SEmmanuel Vadot    description:
52*c9ccf3a3SEmmanuel Vadot      PROXRAW filter strength for both phases. A value of 0 represents off,
53*c9ccf3a3SEmmanuel Vadot      and other values represent 1-1/2^N.
54*c9ccf3a3SEmmanuel Vadot
55*c9ccf3a3SEmmanuel Vadot  semtech,avg-pos-strength:
56*c9ccf3a3SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
57*c9ccf3a3SEmmanuel Vadot    enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295]
58*c9ccf3a3SEmmanuel Vadot    default: 16
59*c9ccf3a3SEmmanuel Vadot    description: |
60*c9ccf3a3SEmmanuel Vadot      Average positive filter strength. A value of 0 represents off and
61*c9ccf3a3SEmmanuel Vadot      UINT_MAX (4294967295) represents infinite. Other values
62*c9ccf3a3SEmmanuel Vadot      represent 1-1/N.
63*c9ccf3a3SEmmanuel Vadot
64*c9ccf3a3SEmmanuel Vadotrequired:
65*c9ccf3a3SEmmanuel Vadot  - compatible
66*c9ccf3a3SEmmanuel Vadot  - reg
67*c9ccf3a3SEmmanuel Vadot  - "#io-channel-cells"
68*c9ccf3a3SEmmanuel Vadot
69*c9ccf3a3SEmmanuel VadotadditionalProperties: false
70*c9ccf3a3SEmmanuel Vadot
71*c9ccf3a3SEmmanuel Vadotexamples:
72*c9ccf3a3SEmmanuel Vadot  - |
73*c9ccf3a3SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
74*c9ccf3a3SEmmanuel Vadot    i2c {
75*c9ccf3a3SEmmanuel Vadot      #address-cells = <1>;
76*c9ccf3a3SEmmanuel Vadot      #size-cells = <0>;
77*c9ccf3a3SEmmanuel Vadot      proximity@28 {
78*c9ccf3a3SEmmanuel Vadot        compatible = "semtech,sx9360";
79*c9ccf3a3SEmmanuel Vadot        reg = <0x28>;
80*c9ccf3a3SEmmanuel Vadot        interrupt-parent = <&pio>;
81*c9ccf3a3SEmmanuel Vadot        interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>;
82*c9ccf3a3SEmmanuel Vadot        vdd-supply = <&pp3300_a>;
83*c9ccf3a3SEmmanuel Vadot        svdd-supply = <&pp1800_prox>;
84*c9ccf3a3SEmmanuel Vadot        #io-channel-cells = <1>;
85*c9ccf3a3SEmmanuel Vadot        semtech,resolution = <256>;
86*c9ccf3a3SEmmanuel Vadot        semtech,proxraw-strength = <2>;
87*c9ccf3a3SEmmanuel Vadot        semtech,avg-pos-strength = <64>;
88*c9ccf3a3SEmmanuel Vadot      };
89*c9ccf3a3SEmmanuel Vadot    };
90