1656f8070SGwendal Grignou# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2656f8070SGwendal Grignou%YAML 1.2 3656f8070SGwendal Grignou--- 4656f8070SGwendal Grignou$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9324.yaml# 5656f8070SGwendal Grignou$schema: http://devicetree.org/meta-schemas/core.yaml# 6656f8070SGwendal Grignou 7656f8070SGwendal Grignoutitle: Semtech's SX9324 capacitive proximity sensor 8656f8070SGwendal Grignou 9656f8070SGwendal Grignoumaintainers: 10656f8070SGwendal Grignou - Gwendal Grignou <gwendal@chromium.org> 11656f8070SGwendal Grignou - Daniel Campello <campello@chromium.org> 12656f8070SGwendal Grignou 13656f8070SGwendal Grignoudescription: | 14656f8070SGwendal Grignou Semtech's SX9324 proximity sensor. 15656f8070SGwendal Grignou 16*5a910007SKrzysztof KozlowskiallOf: 17*5a910007SKrzysztof Kozlowski - $ref: /schemas/iio/iio.yaml# 18*5a910007SKrzysztof Kozlowski 19656f8070SGwendal Grignouproperties: 20656f8070SGwendal Grignou compatible: 21656f8070SGwendal Grignou const: semtech,sx9324 22656f8070SGwendal Grignou 23656f8070SGwendal Grignou reg: 24656f8070SGwendal Grignou maxItems: 1 25656f8070SGwendal Grignou 26656f8070SGwendal Grignou interrupts: 27656f8070SGwendal Grignou description: 28656f8070SGwendal Grignou Generated by device to announce preceding read request has finished 29656f8070SGwendal Grignou and data is available or that a close/far proximity event has happened. 30656f8070SGwendal Grignou maxItems: 1 31656f8070SGwendal Grignou 32656f8070SGwendal Grignou vdd-supply: 33656f8070SGwendal Grignou description: Main power supply 34656f8070SGwendal Grignou 35656f8070SGwendal Grignou svdd-supply: 36656f8070SGwendal Grignou description: Host interface power supply 37656f8070SGwendal Grignou 38656f8070SGwendal Grignou "#io-channel-cells": 39656f8070SGwendal Grignou const: 1 40656f8070SGwendal Grignou 41656f8070SGwendal Grignou semtech,ph0-pin: 42656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32-array 43656f8070SGwendal Grignou description: | 44656f8070SGwendal Grignou Array of 3 entries. Index represent the id of the CS pin. 45656f8070SGwendal Grignou Value indicates how each CS pin is used during phase 0. 46656f8070SGwendal Grignou Each of the 3 pins have the following value - 47656f8070SGwendal Grignou 0 : unused (high impedance) 48656f8070SGwendal Grignou 1 : measured input 49656f8070SGwendal Grignou 2 : dynamic shield 50656f8070SGwendal Grignou 3 : grounded. 51656f8070SGwendal Grignou For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3] 52656f8070SGwendal Grignou items: 53656f8070SGwendal Grignou enum: [ 0, 1, 2, 3 ] 54656f8070SGwendal Grignou minItems: 3 55656f8070SGwendal Grignou maxItems: 3 56656f8070SGwendal Grignou 57656f8070SGwendal Grignou semtech,ph1-pin: 58656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32-array 59656f8070SGwendal Grignou description: Same as ph0-pin for phase 1. 60656f8070SGwendal Grignou items: 61656f8070SGwendal Grignou enum: [ 0, 1, 2, 3 ] 62656f8070SGwendal Grignou minItems: 3 63656f8070SGwendal Grignou maxItems: 3 64656f8070SGwendal Grignou 65656f8070SGwendal Grignou semtech,ph2-pin: 66656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32-array 67656f8070SGwendal Grignou description: Same as ph0-pin for phase 2. 68656f8070SGwendal Grignou items: 69656f8070SGwendal Grignou enum: [ 0, 1, 2, 3 ] 70656f8070SGwendal Grignou minItems: 3 71656f8070SGwendal Grignou maxItems: 3 72656f8070SGwendal Grignou 73656f8070SGwendal Grignou semtech,ph3-pin: 74656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32-array 75656f8070SGwendal Grignou description: Same as ph0-pin for phase 3. 76656f8070SGwendal Grignou items: 77656f8070SGwendal Grignou enum: [ 0, 1, 2, 3 ] 78656f8070SGwendal Grignou minItems: 3 79656f8070SGwendal Grignou maxItems: 3 80656f8070SGwendal Grignou 81656f8070SGwendal Grignou 82656f8070SGwendal Grignou semtech,ph01-resolution: 83656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 84656f8070SGwendal Grignou enum: [8, 16, 32, 64, 128, 256, 512, 1024] 85656f8070SGwendal Grignou description: 86656f8070SGwendal Grignou Capacitance measurement resolution. For phase 0 and 1. 87656f8070SGwendal Grignou Higher the number, higher the resolution. 88656f8070SGwendal Grignou default: 128 89656f8070SGwendal Grignou 90656f8070SGwendal Grignou semtech,ph23-resolution: 91656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 92656f8070SGwendal Grignou enum: [8, 16, 32, 64, 128, 256, 512, 1024] 93656f8070SGwendal Grignou description: 94656f8070SGwendal Grignou Capacitance measurement resolution. For phase 2 and 3 95656f8070SGwendal Grignou default: 128 96656f8070SGwendal Grignou 97656f8070SGwendal Grignou semtech,startup-sensor: 98656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 99656f8070SGwendal Grignou enum: [0, 1, 2, 3] 100656f8070SGwendal Grignou default: 0 101656f8070SGwendal Grignou description: | 102656f8070SGwendal Grignou Phase used for start-up proximity detection. 103656f8070SGwendal Grignou It is used when we enable a phase to remove static offset and measure 104656f8070SGwendal Grignou only capacitance changes introduced by the user. 105656f8070SGwendal Grignou 106656f8070SGwendal Grignou semtech,ph01-proxraw-strength: 107656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 108656f8070SGwendal Grignou minimum: 0 109656f8070SGwendal Grignou maximum: 7 110656f8070SGwendal Grignou default: 1 111656f8070SGwendal Grignou description: 112656f8070SGwendal Grignou PROXRAW filter strength for phase 0 and 1. A value of 0 represents off, 113656f8070SGwendal Grignou and other values represent 1-1/2^N. 114656f8070SGwendal Grignou 115656f8070SGwendal Grignou semtech,ph23-proxraw-strength: 116656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 117656f8070SGwendal Grignou minimum: 0 118656f8070SGwendal Grignou maximum: 7 119656f8070SGwendal Grignou default: 1 120656f8070SGwendal Grignou description: 121656f8070SGwendal Grignou Same as proxraw-strength01, for phase 2 and 3. 122656f8070SGwendal Grignou 123656f8070SGwendal Grignou semtech,avg-pos-strength: 124656f8070SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 125656f8070SGwendal Grignou enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295] 126656f8070SGwendal Grignou default: 16 127656f8070SGwendal Grignou description: | 128656f8070SGwendal Grignou Average positive filter strength. A value of 0 represents off and 129656f8070SGwendal Grignou UINT_MAX (4294967295) represents infinite. Other values 130656f8070SGwendal Grignou represent 1-1/N. 131656f8070SGwendal Grignou 132f2433310SStephen Boyd semtech,cs-idle-sleep: 133f2433310SStephen Boyd description: 134f2433310SStephen Boyd State of CS pins during sleep mode and idle time. 135f2433310SStephen Boyd enum: 136f2433310SStephen Boyd - hi-z 137f2433310SStephen Boyd - gnd 138f2433310SStephen Boyd - vdd 139f2433310SStephen Boyd 140f337f41fSGwendal Grignou semtech,int-comp-resistor: 141f337f41fSGwendal Grignou description: 142f337f41fSGwendal Grignou Internal resistor setting for compensation. 143f337f41fSGwendal Grignou enum: 144f337f41fSGwendal Grignou - lowest 145f337f41fSGwendal Grignou - low 146f337f41fSGwendal Grignou - high 147f337f41fSGwendal Grignou - highest 148f337f41fSGwendal Grignou 149057e45dbSGwendal Grignou semtech,input-precharge-resistor-ohms: 150057e45dbSGwendal Grignou default: 4000 151057e45dbSGwendal Grignou multipleOf: 2000 152057e45dbSGwendal Grignou minimum: 0 153057e45dbSGwendal Grignou maximum: 30000 154057e45dbSGwendal Grignou description: 155057e45dbSGwendal Grignou Pre-charge input resistance in Ohm. 156057e45dbSGwendal Grignou 15767ac8433SGwendal Grignou semtech,input-analog-gain: 15867ac8433SGwendal Grignou $ref: /schemas/types.yaml#/definitions/uint32 15967ac8433SGwendal Grignou minimum: 0 16067ac8433SGwendal Grignou maximum: 3 16167ac8433SGwendal Grignou description: | 16267ac8433SGwendal Grignou Defines the input antenna analog gain 16367ac8433SGwendal Grignou 0: x1.247 16467ac8433SGwendal Grignou 1: x1 (default) 16567ac8433SGwendal Grignou 2: x0.768 16667ac8433SGwendal Grignou 3: x0.552 16767ac8433SGwendal Grignou 168656f8070SGwendal Grignourequired: 169656f8070SGwendal Grignou - compatible 170656f8070SGwendal Grignou - reg 171656f8070SGwendal Grignou - "#io-channel-cells" 172656f8070SGwendal Grignou 173*5a910007SKrzysztof KozlowskiunevaluatedProperties: false 174656f8070SGwendal Grignou 175656f8070SGwendal Grignouexamples: 176656f8070SGwendal Grignou - | 177656f8070SGwendal Grignou #include <dt-bindings/interrupt-controller/irq.h> 178656f8070SGwendal Grignou i2c { 179656f8070SGwendal Grignou #address-cells = <1>; 180656f8070SGwendal Grignou #size-cells = <0>; 181656f8070SGwendal Grignou proximity@28 { 182656f8070SGwendal Grignou compatible = "semtech,sx9324"; 183656f8070SGwendal Grignou reg = <0x28>; 184656f8070SGwendal Grignou interrupt-parent = <&pio>; 185656f8070SGwendal Grignou interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>; 186656f8070SGwendal Grignou vdd-supply = <&pp3300_a>; 187656f8070SGwendal Grignou svdd-supply = <&pp1800_prox>; 188656f8070SGwendal Grignou #io-channel-cells = <1>; 189656f8070SGwendal Grignou semtech,ph0-pin = <1 2 3>; 190656f8070SGwendal Grignou semtech,ph1-pin = <3 2 1>; 191656f8070SGwendal Grignou semtech,ph2-pin = <1 2 3>; 192656f8070SGwendal Grignou semtech,ph3-pin = <3 2 1>; 193656f8070SGwendal Grignou semtech,ph01-resolution = <256>; 194656f8070SGwendal Grignou semtech,ph23-resolution = <256>; 195656f8070SGwendal Grignou semtech,startup-sensor = <1>; 196656f8070SGwendal Grignou semtech,ph01-proxraw-strength = <2>; 197656f8070SGwendal Grignou semtech,ph23-proxraw-strength = <2>; 198656f8070SGwendal Grignou semtech,avg-pos-strength = <64>; 199f337f41fSGwendal Grignou semtech,int-comp-resistor = "lowest"; 200057e45dbSGwendal Grignou semtech,input-precharge-resistor-ohms = <2000>; 201f2433310SStephen Boyd semtech,cs-idle-sleep = "gnd"; 202656f8070SGwendal Grignou }; 203656f8070SGwendal Grignou }; 204