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,sx9324.yaml# 5*c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*c9ccf3a3SEmmanuel Vadot 7*c9ccf3a3SEmmanuel Vadottitle: Semtech's SX9324 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 SX9324 proximity sensor. 15*c9ccf3a3SEmmanuel Vadot 16*c9ccf3a3SEmmanuel Vadotproperties: 17*c9ccf3a3SEmmanuel Vadot compatible: 18*c9ccf3a3SEmmanuel Vadot const: semtech,sx9324 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,ph0-pin: 39*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 40*c9ccf3a3SEmmanuel Vadot description: | 41*c9ccf3a3SEmmanuel Vadot Array of 3 entries. Index represent the id of the CS pin. 42*c9ccf3a3SEmmanuel Vadot Value indicates how each CS pin is used during phase 0. 43*c9ccf3a3SEmmanuel Vadot Each of the 3 pins have the following value - 44*c9ccf3a3SEmmanuel Vadot 0 : unused (high impedance) 45*c9ccf3a3SEmmanuel Vadot 1 : measured input 46*c9ccf3a3SEmmanuel Vadot 2 : dynamic shield 47*c9ccf3a3SEmmanuel Vadot 3 : grounded. 48*c9ccf3a3SEmmanuel Vadot For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3] 49*c9ccf3a3SEmmanuel Vadot items: 50*c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 51*c9ccf3a3SEmmanuel Vadot minItems: 3 52*c9ccf3a3SEmmanuel Vadot maxItems: 3 53*c9ccf3a3SEmmanuel Vadot 54*c9ccf3a3SEmmanuel Vadot semtech,ph1-pin: 55*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 56*c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 1. 57*c9ccf3a3SEmmanuel Vadot items: 58*c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 59*c9ccf3a3SEmmanuel Vadot minItems: 3 60*c9ccf3a3SEmmanuel Vadot maxItems: 3 61*c9ccf3a3SEmmanuel Vadot 62*c9ccf3a3SEmmanuel Vadot semtech,ph2-pin: 63*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 64*c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 2. 65*c9ccf3a3SEmmanuel Vadot items: 66*c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 67*c9ccf3a3SEmmanuel Vadot minItems: 3 68*c9ccf3a3SEmmanuel Vadot maxItems: 3 69*c9ccf3a3SEmmanuel Vadot 70*c9ccf3a3SEmmanuel Vadot semtech,ph3-pin: 71*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 72*c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 3. 73*c9ccf3a3SEmmanuel Vadot items: 74*c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 75*c9ccf3a3SEmmanuel Vadot minItems: 3 76*c9ccf3a3SEmmanuel Vadot maxItems: 3 77*c9ccf3a3SEmmanuel Vadot 78*c9ccf3a3SEmmanuel Vadot 79*c9ccf3a3SEmmanuel Vadot semtech,ph01-resolution: 80*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 81*c9ccf3a3SEmmanuel Vadot enum: [8, 16, 32, 64, 128, 256, 512, 1024] 82*c9ccf3a3SEmmanuel Vadot description: 83*c9ccf3a3SEmmanuel Vadot Capacitance measurement resolution. For phase 0 and 1. 84*c9ccf3a3SEmmanuel Vadot Higher the number, higher the resolution. 85*c9ccf3a3SEmmanuel Vadot default: 128 86*c9ccf3a3SEmmanuel Vadot 87*c9ccf3a3SEmmanuel Vadot semtech,ph23-resolution: 88*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 89*c9ccf3a3SEmmanuel Vadot enum: [8, 16, 32, 64, 128, 256, 512, 1024] 90*c9ccf3a3SEmmanuel Vadot description: 91*c9ccf3a3SEmmanuel Vadot Capacitance measurement resolution. For phase 2 and 3 92*c9ccf3a3SEmmanuel Vadot default: 128 93*c9ccf3a3SEmmanuel Vadot 94*c9ccf3a3SEmmanuel Vadot semtech,startup-sensor: 95*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 96*c9ccf3a3SEmmanuel Vadot enum: [0, 1, 2, 3] 97*c9ccf3a3SEmmanuel Vadot default: 0 98*c9ccf3a3SEmmanuel Vadot description: | 99*c9ccf3a3SEmmanuel Vadot Phase used for start-up proximity detection. 100*c9ccf3a3SEmmanuel Vadot It is used when we enable a phase to remove static offset and measure 101*c9ccf3a3SEmmanuel Vadot only capacitance changes introduced by the user. 102*c9ccf3a3SEmmanuel Vadot 103*c9ccf3a3SEmmanuel Vadot semtech,ph01-proxraw-strength: 104*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 105*c9ccf3a3SEmmanuel Vadot minimum: 0 106*c9ccf3a3SEmmanuel Vadot maximum: 7 107*c9ccf3a3SEmmanuel Vadot default: 1 108*c9ccf3a3SEmmanuel Vadot description: 109*c9ccf3a3SEmmanuel Vadot PROXRAW filter strength for phase 0 and 1. A value of 0 represents off, 110*c9ccf3a3SEmmanuel Vadot and other values represent 1-1/2^N. 111*c9ccf3a3SEmmanuel Vadot 112*c9ccf3a3SEmmanuel Vadot semtech,ph23-proxraw-strength: 113*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 114*c9ccf3a3SEmmanuel Vadot minimum: 0 115*c9ccf3a3SEmmanuel Vadot maximum: 7 116*c9ccf3a3SEmmanuel Vadot default: 1 117*c9ccf3a3SEmmanuel Vadot description: 118*c9ccf3a3SEmmanuel Vadot Same as proxraw-strength01, for phase 2 and 3. 119*c9ccf3a3SEmmanuel Vadot 120*c9ccf3a3SEmmanuel Vadot semtech,avg-pos-strength: 121*c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 122*c9ccf3a3SEmmanuel Vadot enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295] 123*c9ccf3a3SEmmanuel Vadot default: 16 124*c9ccf3a3SEmmanuel Vadot description: | 125*c9ccf3a3SEmmanuel Vadot Average positive filter strength. A value of 0 represents off and 126*c9ccf3a3SEmmanuel Vadot UINT_MAX (4294967295) represents infinite. Other values 127*c9ccf3a3SEmmanuel Vadot represent 1-1/N. 128*c9ccf3a3SEmmanuel Vadot 129*c9ccf3a3SEmmanuel Vadotrequired: 130*c9ccf3a3SEmmanuel Vadot - compatible 131*c9ccf3a3SEmmanuel Vadot - reg 132*c9ccf3a3SEmmanuel Vadot - "#io-channel-cells" 133*c9ccf3a3SEmmanuel Vadot 134*c9ccf3a3SEmmanuel VadotadditionalProperties: false 135*c9ccf3a3SEmmanuel Vadot 136*c9ccf3a3SEmmanuel Vadotexamples: 137*c9ccf3a3SEmmanuel Vadot - | 138*c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 139*c9ccf3a3SEmmanuel Vadot i2c { 140*c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 141*c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 142*c9ccf3a3SEmmanuel Vadot proximity@28 { 143*c9ccf3a3SEmmanuel Vadot compatible = "semtech,sx9324"; 144*c9ccf3a3SEmmanuel Vadot reg = <0x28>; 145*c9ccf3a3SEmmanuel Vadot interrupt-parent = <&pio>; 146*c9ccf3a3SEmmanuel Vadot interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>; 147*c9ccf3a3SEmmanuel Vadot vdd-supply = <&pp3300_a>; 148*c9ccf3a3SEmmanuel Vadot svdd-supply = <&pp1800_prox>; 149*c9ccf3a3SEmmanuel Vadot #io-channel-cells = <1>; 150*c9ccf3a3SEmmanuel Vadot semtech,ph0-pin = <1 2 3>; 151*c9ccf3a3SEmmanuel Vadot semtech,ph1-pin = <3 2 1>; 152*c9ccf3a3SEmmanuel Vadot semtech,ph2-pin = <1 2 3>; 153*c9ccf3a3SEmmanuel Vadot semtech,ph3-pin = <3 2 1>; 154*c9ccf3a3SEmmanuel Vadot semtech,ph01-resolution = <256>; 155*c9ccf3a3SEmmanuel Vadot semtech,ph23-resolution = <256>; 156*c9ccf3a3SEmmanuel Vadot semtech,startup-sensor = <1>; 157*c9ccf3a3SEmmanuel Vadot semtech,ph01-proxraw-strength = <2>; 158*c9ccf3a3SEmmanuel Vadot semtech,ph23-proxraw-strength = <2>; 159*c9ccf3a3SEmmanuel Vadot semtech,avg-pos-strength = <64>; 160*c9ccf3a3SEmmanuel Vadot }; 161*c9ccf3a3SEmmanuel Vadot }; 162