1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/proximity/semtech,sx9324.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: Semtech's SX9324 capacitive proximity sensor 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Gwendal Grignou <gwendal@chromium.org> 11c9ccf3a3SEmmanuel Vadot - Daniel Campello <campello@chromium.org> 12c9ccf3a3SEmmanuel Vadot 13c9ccf3a3SEmmanuel Vadotdescription: | 14c9ccf3a3SEmmanuel Vadot Semtech's SX9324 proximity sensor. 15c9ccf3a3SEmmanuel Vadot 16*aa1a8ff2SEmmanuel VadotallOf: 17*aa1a8ff2SEmmanuel Vadot - $ref: /schemas/iio/iio.yaml# 18*aa1a8ff2SEmmanuel Vadot 19c9ccf3a3SEmmanuel Vadotproperties: 20c9ccf3a3SEmmanuel Vadot compatible: 21c9ccf3a3SEmmanuel Vadot const: semtech,sx9324 22c9ccf3a3SEmmanuel Vadot 23c9ccf3a3SEmmanuel Vadot reg: 24c9ccf3a3SEmmanuel Vadot maxItems: 1 25c9ccf3a3SEmmanuel Vadot 26c9ccf3a3SEmmanuel Vadot interrupts: 27c9ccf3a3SEmmanuel Vadot description: 28c9ccf3a3SEmmanuel Vadot Generated by device to announce preceding read request has finished 29c9ccf3a3SEmmanuel Vadot and data is available or that a close/far proximity event has happened. 30c9ccf3a3SEmmanuel Vadot maxItems: 1 31c9ccf3a3SEmmanuel Vadot 32c9ccf3a3SEmmanuel Vadot vdd-supply: 33c9ccf3a3SEmmanuel Vadot description: Main power supply 34c9ccf3a3SEmmanuel Vadot 35c9ccf3a3SEmmanuel Vadot svdd-supply: 36c9ccf3a3SEmmanuel Vadot description: Host interface power supply 37c9ccf3a3SEmmanuel Vadot 38c9ccf3a3SEmmanuel Vadot "#io-channel-cells": 39c9ccf3a3SEmmanuel Vadot const: 1 40c9ccf3a3SEmmanuel Vadot 41c9ccf3a3SEmmanuel Vadot semtech,ph0-pin: 42c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 43c9ccf3a3SEmmanuel Vadot description: | 44c9ccf3a3SEmmanuel Vadot Array of 3 entries. Index represent the id of the CS pin. 45c9ccf3a3SEmmanuel Vadot Value indicates how each CS pin is used during phase 0. 46c9ccf3a3SEmmanuel Vadot Each of the 3 pins have the following value - 47c9ccf3a3SEmmanuel Vadot 0 : unused (high impedance) 48c9ccf3a3SEmmanuel Vadot 1 : measured input 49c9ccf3a3SEmmanuel Vadot 2 : dynamic shield 50c9ccf3a3SEmmanuel Vadot 3 : grounded. 51c9ccf3a3SEmmanuel Vadot For instance, CS0 measured, CS1 shield and CS2 ground is [1, 2, 3] 52c9ccf3a3SEmmanuel Vadot items: 53c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 54c9ccf3a3SEmmanuel Vadot minItems: 3 55c9ccf3a3SEmmanuel Vadot maxItems: 3 56c9ccf3a3SEmmanuel Vadot 57c9ccf3a3SEmmanuel Vadot semtech,ph1-pin: 58c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 59c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 1. 60c9ccf3a3SEmmanuel Vadot items: 61c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 62c9ccf3a3SEmmanuel Vadot minItems: 3 63c9ccf3a3SEmmanuel Vadot maxItems: 3 64c9ccf3a3SEmmanuel Vadot 65c9ccf3a3SEmmanuel Vadot semtech,ph2-pin: 66c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 67c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 2. 68c9ccf3a3SEmmanuel Vadot items: 69c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 70c9ccf3a3SEmmanuel Vadot minItems: 3 71c9ccf3a3SEmmanuel Vadot maxItems: 3 72c9ccf3a3SEmmanuel Vadot 73c9ccf3a3SEmmanuel Vadot semtech,ph3-pin: 74c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 75c9ccf3a3SEmmanuel Vadot description: Same as ph0-pin for phase 3. 76c9ccf3a3SEmmanuel Vadot items: 77c9ccf3a3SEmmanuel Vadot enum: [ 0, 1, 2, 3 ] 78c9ccf3a3SEmmanuel Vadot minItems: 3 79c9ccf3a3SEmmanuel Vadot maxItems: 3 80c9ccf3a3SEmmanuel Vadot 81c9ccf3a3SEmmanuel Vadot 82c9ccf3a3SEmmanuel Vadot semtech,ph01-resolution: 83c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 84c9ccf3a3SEmmanuel Vadot enum: [8, 16, 32, 64, 128, 256, 512, 1024] 85c9ccf3a3SEmmanuel Vadot description: 86c9ccf3a3SEmmanuel Vadot Capacitance measurement resolution. For phase 0 and 1. 87c9ccf3a3SEmmanuel Vadot Higher the number, higher the resolution. 88c9ccf3a3SEmmanuel Vadot default: 128 89c9ccf3a3SEmmanuel Vadot 90c9ccf3a3SEmmanuel Vadot semtech,ph23-resolution: 91c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 92c9ccf3a3SEmmanuel Vadot enum: [8, 16, 32, 64, 128, 256, 512, 1024] 93c9ccf3a3SEmmanuel Vadot description: 94c9ccf3a3SEmmanuel Vadot Capacitance measurement resolution. For phase 2 and 3 95c9ccf3a3SEmmanuel Vadot default: 128 96c9ccf3a3SEmmanuel Vadot 97c9ccf3a3SEmmanuel Vadot semtech,startup-sensor: 98c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 99c9ccf3a3SEmmanuel Vadot enum: [0, 1, 2, 3] 100c9ccf3a3SEmmanuel Vadot default: 0 101c9ccf3a3SEmmanuel Vadot description: | 102c9ccf3a3SEmmanuel Vadot Phase used for start-up proximity detection. 103c9ccf3a3SEmmanuel Vadot It is used when we enable a phase to remove static offset and measure 104c9ccf3a3SEmmanuel Vadot only capacitance changes introduced by the user. 105c9ccf3a3SEmmanuel Vadot 106c9ccf3a3SEmmanuel Vadot semtech,ph01-proxraw-strength: 107c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 108c9ccf3a3SEmmanuel Vadot minimum: 0 109c9ccf3a3SEmmanuel Vadot maximum: 7 110c9ccf3a3SEmmanuel Vadot default: 1 111c9ccf3a3SEmmanuel Vadot description: 112c9ccf3a3SEmmanuel Vadot PROXRAW filter strength for phase 0 and 1. A value of 0 represents off, 113c9ccf3a3SEmmanuel Vadot and other values represent 1-1/2^N. 114c9ccf3a3SEmmanuel Vadot 115c9ccf3a3SEmmanuel Vadot semtech,ph23-proxraw-strength: 116c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 117c9ccf3a3SEmmanuel Vadot minimum: 0 118c9ccf3a3SEmmanuel Vadot maximum: 7 119c9ccf3a3SEmmanuel Vadot default: 1 120c9ccf3a3SEmmanuel Vadot description: 121c9ccf3a3SEmmanuel Vadot Same as proxraw-strength01, for phase 2 and 3. 122c9ccf3a3SEmmanuel Vadot 123c9ccf3a3SEmmanuel Vadot semtech,avg-pos-strength: 124c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 125c9ccf3a3SEmmanuel Vadot enum: [0, 16, 64, 128, 256, 512, 1024, 4294967295] 126c9ccf3a3SEmmanuel Vadot default: 16 127c9ccf3a3SEmmanuel Vadot description: | 128c9ccf3a3SEmmanuel Vadot Average positive filter strength. A value of 0 represents off and 129c9ccf3a3SEmmanuel Vadot UINT_MAX (4294967295) represents infinite. Other values 130c9ccf3a3SEmmanuel Vadot represent 1-1/N. 131c9ccf3a3SEmmanuel Vadot 132b97ee269SEmmanuel Vadot semtech,cs-idle-sleep: 133b97ee269SEmmanuel Vadot description: 134b97ee269SEmmanuel Vadot State of CS pins during sleep mode and idle time. 135b97ee269SEmmanuel Vadot enum: 136b97ee269SEmmanuel Vadot - hi-z 137b97ee269SEmmanuel Vadot - gnd 138b97ee269SEmmanuel Vadot - vdd 139b97ee269SEmmanuel Vadot 140b97ee269SEmmanuel Vadot semtech,int-comp-resistor: 141b97ee269SEmmanuel Vadot description: 142b97ee269SEmmanuel Vadot Internal resistor setting for compensation. 143b97ee269SEmmanuel Vadot enum: 144b97ee269SEmmanuel Vadot - lowest 145b97ee269SEmmanuel Vadot - low 146b97ee269SEmmanuel Vadot - high 147b97ee269SEmmanuel Vadot - highest 148b97ee269SEmmanuel Vadot 149b97ee269SEmmanuel Vadot semtech,input-precharge-resistor-ohms: 150b97ee269SEmmanuel Vadot default: 4000 151b97ee269SEmmanuel Vadot multipleOf: 2000 152b97ee269SEmmanuel Vadot minimum: 0 153b97ee269SEmmanuel Vadot maximum: 30000 154b97ee269SEmmanuel Vadot description: 155b97ee269SEmmanuel Vadot Pre-charge input resistance in Ohm. 156b97ee269SEmmanuel Vadot 157b97ee269SEmmanuel Vadot semtech,input-analog-gain: 158b97ee269SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 159b97ee269SEmmanuel Vadot minimum: 0 160b97ee269SEmmanuel Vadot maximum: 3 161b97ee269SEmmanuel Vadot description: | 162b97ee269SEmmanuel Vadot Defines the input antenna analog gain 163b97ee269SEmmanuel Vadot 0: x1.247 164b97ee269SEmmanuel Vadot 1: x1 (default) 165b97ee269SEmmanuel Vadot 2: x0.768 166b97ee269SEmmanuel Vadot 3: x0.552 167b97ee269SEmmanuel Vadot 168c9ccf3a3SEmmanuel Vadotrequired: 169c9ccf3a3SEmmanuel Vadot - compatible 170c9ccf3a3SEmmanuel Vadot - reg 171c9ccf3a3SEmmanuel Vadot - "#io-channel-cells" 172c9ccf3a3SEmmanuel Vadot 173*aa1a8ff2SEmmanuel VadotunevaluatedProperties: false 174c9ccf3a3SEmmanuel Vadot 175c9ccf3a3SEmmanuel Vadotexamples: 176c9ccf3a3SEmmanuel Vadot - | 177c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 178c9ccf3a3SEmmanuel Vadot i2c { 179c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 180c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 181c9ccf3a3SEmmanuel Vadot proximity@28 { 182c9ccf3a3SEmmanuel Vadot compatible = "semtech,sx9324"; 183c9ccf3a3SEmmanuel Vadot reg = <0x28>; 184c9ccf3a3SEmmanuel Vadot interrupt-parent = <&pio>; 185c9ccf3a3SEmmanuel Vadot interrupts = <5 IRQ_TYPE_LEVEL_LOW 5>; 186c9ccf3a3SEmmanuel Vadot vdd-supply = <&pp3300_a>; 187c9ccf3a3SEmmanuel Vadot svdd-supply = <&pp1800_prox>; 188c9ccf3a3SEmmanuel Vadot #io-channel-cells = <1>; 189c9ccf3a3SEmmanuel Vadot semtech,ph0-pin = <1 2 3>; 190c9ccf3a3SEmmanuel Vadot semtech,ph1-pin = <3 2 1>; 191c9ccf3a3SEmmanuel Vadot semtech,ph2-pin = <1 2 3>; 192c9ccf3a3SEmmanuel Vadot semtech,ph3-pin = <3 2 1>; 193c9ccf3a3SEmmanuel Vadot semtech,ph01-resolution = <256>; 194c9ccf3a3SEmmanuel Vadot semtech,ph23-resolution = <256>; 195c9ccf3a3SEmmanuel Vadot semtech,startup-sensor = <1>; 196c9ccf3a3SEmmanuel Vadot semtech,ph01-proxraw-strength = <2>; 197c9ccf3a3SEmmanuel Vadot semtech,ph23-proxraw-strength = <2>; 198c9ccf3a3SEmmanuel Vadot semtech,avg-pos-strength = <64>; 199b97ee269SEmmanuel Vadot semtech,int-comp-resistor = "lowest"; 200b97ee269SEmmanuel Vadot semtech,input-precharge-resistor-ohms = <2000>; 201b97ee269SEmmanuel Vadot semtech,cs-idle-sleep = "gnd"; 202c9ccf3a3SEmmanuel Vadot }; 203c9ccf3a3SEmmanuel Vadot }; 204