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