1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/input/iqs269a.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: Azoteq IQS269A Capacitive Touch Controller 8 9maintainers: 10 - Jeff LaBundy <jeff@labundy.com> 11 12description: | 13 The Azoteq IQS269A is an 8-channel capacitive touch controller that features 14 additional Hall-effect and inductive sensing capabilities. 15 16 Link to datasheet: https://www.azoteq.com/ 17 18properties: 19 compatible: 20 const: azoteq,iqs269a 21 22 reg: 23 maxItems: 1 24 25 interrupts: 26 maxItems: 1 27 28 "#address-cells": 29 const: 1 30 31 "#size-cells": 32 const: 0 33 34 azoteq,hall-enable: 35 type: boolean 36 description: 37 Enables Hall-effect sensing on channels 6 and 7. In this case, keycodes 38 assigned to channel 6 are ignored and keycodes assigned to channel 7 are 39 interpreted as switch codes. Refer to the datasheet for requirements im- 40 posed on channels 6 and 7 by Hall-effect sensing. 41 42 azoteq,suspend-mode: 43 $ref: /schemas/types.yaml#/definitions/uint32 44 enum: [0, 1, 2, 3] 45 default: 0 46 description: | 47 Specifies the power mode during suspend as follows: 48 0: Automatic (same as normal runtime, i.e. suspend/resume disabled) 49 1: Low power (all sensing at a reduced reporting rate) 50 2: Ultra-low power (channel 0 proximity sensing) 51 3: Halt (no sensing) 52 53 azoteq,clk-div: 54 type: boolean 55 description: Divides the device's core clock by a factor of 4. 56 57 azoteq,ulp-update: 58 $ref: /schemas/types.yaml#/definitions/uint32 59 minimum: 0 60 maximum: 7 61 default: 3 62 description: Specifies the ultra-low-power mode update rate. 63 64 azoteq,reseed-offset: 65 type: boolean 66 description: 67 Applies an 8-count offset to all long-term averages upon either ATI or 68 reseed events. 69 70 azoteq,filt-str-lp-lta: 71 $ref: /schemas/types.yaml#/definitions/uint32 72 enum: [0, 1, 2, 3] 73 default: 0 74 description: 75 Specifies the long-term average filter strength during low-power mode. 76 77 azoteq,filt-str-lp-cnt: 78 $ref: /schemas/types.yaml#/definitions/uint32 79 enum: [0, 1, 2, 3] 80 default: 0 81 description: 82 Specifies the raw count filter strength during low-power mode. 83 84 azoteq,filt-str-np-lta: 85 $ref: /schemas/types.yaml#/definitions/uint32 86 enum: [0, 1, 2, 3] 87 default: 0 88 description: 89 Specifies the long-term average filter strength during normal-power mode. 90 91 azoteq,filt-str-np-cnt: 92 $ref: /schemas/types.yaml#/definitions/uint32 93 enum: [0, 1, 2, 3] 94 default: 0 95 description: 96 Specifies the raw count filter strength during normal-power mode. 97 98 azoteq,rate-np-ms: 99 minimum: 0 100 maximum: 255 101 default: 16 102 description: Specifies the report rate (in ms) during normal-power mode. 103 104 azoteq,rate-lp-ms: 105 minimum: 0 106 maximum: 255 107 default: 160 108 description: Specifies the report rate (in ms) during low-power mode. 109 110 azoteq,rate-ulp-ms: 111 multipleOf: 16 112 minimum: 0 113 maximum: 4080 114 default: 160 115 description: Specifies the report rate (in ms) during ultra-low-power mode. 116 117 azoteq,timeout-pwr-ms: 118 multipleOf: 512 119 minimum: 0 120 maximum: 130560 121 default: 2560 122 description: 123 Specifies the length of time (in ms) to wait for an event during normal- 124 power mode before transitioning to low-power mode. 125 126 azoteq,timeout-lta-ms: 127 multipleOf: 512 128 minimum: 0 129 maximum: 130560 130 default: 32768 131 description: 132 Specifies the length of time (in ms) to wait before resetting the long- 133 term average of all channels. Specify the maximum timeout to disable it 134 altogether. 135 136 azoteq,ati-band-disable: 137 type: boolean 138 description: Disables the ATI band check. 139 140 azoteq,ati-lp-only: 141 type: boolean 142 description: Limits automatic ATI to low-power mode. 143 144 azoteq,ati-band-tighten: 145 type: boolean 146 description: Tightens the ATI band from 1/8 to 1/16 of the desired target. 147 148 azoteq,filt-disable: 149 type: boolean 150 description: Disables all raw count filtering. 151 152 azoteq,gpio3-select: 153 $ref: /schemas/types.yaml#/definitions/uint32 154 minimum: 0 155 maximum: 7 156 default: 0 157 description: 158 Selects the channel for which the GPIO3 pin represents touch state. 159 160 azoteq,dual-direction: 161 type: boolean 162 description: 163 Specifies that long-term averages are to freeze in the presence of either 164 increasing or decreasing counts, thereby permitting events to be reported 165 in either direction. 166 167 azoteq,tx-freq: 168 $ref: /schemas/types.yaml#/definitions/uint32 169 enum: [0, 1, 2, 3] 170 default: 0 171 description: | 172 Specifies the inductive sensing excitation frequency as follows (paren- 173 thesized numbers represent the frequency if 'azoteq,clk-div' is present): 174 0: 16 MHz (4 MHz) 175 1: 8 MHz (2 MHz) 176 2: 4 MHz (1 MHz) 177 3: 2 MHz (500 kHz) 178 179 azoteq,global-cap-increase: 180 type: boolean 181 description: Increases the global capacitance adder from 0.5 pF to 1.5 pF. 182 183 azoteq,reseed-select: 184 $ref: /schemas/types.yaml#/definitions/uint32 185 enum: [0, 1, 2, 3] 186 default: 0 187 description: | 188 Specifies the event(s) that prompt the device to reseed (i.e. reset the 189 long-term average) of an associated channel as follows: 190 0: None 191 1: Proximity 192 2: Proximity or touch 193 3: Proximity, touch or deep touch 194 195 azoteq,tracking-enable: 196 type: boolean 197 description: 198 Enables all associated channels to track their respective reference 199 channels. 200 201 azoteq,filt-str-slider: 202 $ref: /schemas/types.yaml#/definitions/uint32 203 enum: [0, 1, 2, 3] 204 default: 1 205 description: Specifies the slider coordinate filter strength. 206 207patternProperties: 208 "^channel@[0-7]$": 209 type: object 210 description: 211 Represents a single sensing channel. A channel is active if defined and 212 inactive otherwise. 213 214 properties: 215 reg: 216 minimum: 0 217 maximum: 7 218 description: Index of the channel. 219 220 azoteq,reseed-disable: 221 type: boolean 222 description: 223 Prevents the channel from being reseeded if the long-term average 224 timeout (defined in 'azoteq,timeout-lta') expires. 225 226 azoteq,blocking-enable: 227 type: boolean 228 description: Specifies that the channel is a blocking channel. 229 230 azoteq,slider0-select: 231 type: boolean 232 description: Specifies that the channel participates in slider 0. 233 234 azoteq,slider1-select: 235 type: boolean 236 description: Specifies that the channel participates in slider 1. 237 238 azoteq,rx-enable: 239 $ref: /schemas/types.yaml#/definitions/uint32-array 240 minItems: 1 241 maxItems: 8 242 items: 243 minimum: 0 244 maximum: 7 245 description: 246 Specifies the CRX pin(s) associated with the channel. By default, only 247 the CRX pin corresponding to the channel's index is enabled (e.g. CRX0 248 for channel 0). 249 250 azoteq,tx-enable: 251 $ref: /schemas/types.yaml#/definitions/uint32-array 252 minItems: 1 253 maxItems: 8 254 items: 255 minimum: 0 256 maximum: 7 257 default: [0, 1, 2, 3, 4, 5, 6, 7] 258 description: Specifies the TX pin(s) associated with the channel. 259 260 azoteq,meas-cap-decrease: 261 type: boolean 262 description: 263 Decreases the internal measurement capacitance from 60 pF to 15 pF. 264 265 azoteq,rx-float-inactive: 266 type: boolean 267 description: Floats any inactive CRX pins instead of grounding them. 268 269 azoteq,local-cap-size: 270 $ref: /schemas/types.yaml#/definitions/uint32 271 enum: [0, 1, 2] 272 default: 0 273 description: | 274 Specifies the capacitance to be added to the channel as follows: 275 0: None 276 1: Global adder (based on 'azoteq,global-cap-increase') 277 2: Global adder + 0.5 pF 278 279 azoteq,invert-enable: 280 type: boolean 281 description: 282 Inverts the polarity of the states reported for proximity, touch and 283 deep-touch events relative to their respective thresholds. 284 285 azoteq,proj-bias: 286 $ref: /schemas/types.yaml#/definitions/uint32 287 enum: [0, 1, 2, 3] 288 default: 2 289 description: | 290 Specifies the bias current applied during projected-capacitance 291 sensing as follows: 292 0: 2.5 uA 293 1: 5 uA 294 2: 10 uA 295 3: 20 uA 296 297 azoteq,sense-mode: 298 $ref: /schemas/types.yaml#/definitions/uint32 299 enum: [0, 1, 9, 14, 15] 300 default: 0 301 description: | 302 Specifies the channel's sensing mode as follows: 303 0: Self capacitance 304 1: Projected capacitance 305 9: Self or mutual inductance 306 14: Hall effect 307 15: Temperature 308 309 azoteq,sense-freq: 310 $ref: /schemas/types.yaml#/definitions/uint32 311 enum: [0, 1, 2, 3] 312 default: 1 313 description: | 314 Specifies the channel's sensing frequency as follows (parenthesized 315 numbers represent the frequency if 'azoteq,clk-div' is present): 316 0: 4 MHz (1 MHz) 317 1: 2 MHz (500 kHz) 318 2: 1 MHz (250 kHz) 319 3: 500 kHz (125 kHz) 320 321 azoteq,static-enable: 322 type: boolean 323 description: Enables the static front-end for the channel. 324 325 azoteq,ati-mode: 326 $ref: /schemas/types.yaml#/definitions/uint32 327 enum: [0, 1, 2, 3] 328 default: 3 329 description: | 330 Specifies the channel's ATI mode as follows: 331 0: Disabled 332 1: Semi-partial 333 2: Partial 334 3: Full 335 336 azoteq,ati-base: 337 $ref: /schemas/types.yaml#/definitions/uint32 338 enum: [75, 100, 150, 200] 339 default: 100 340 description: Specifies the channel's ATI base. 341 342 azoteq,ati-target: 343 $ref: /schemas/types.yaml#/definitions/uint32 344 multipleOf: 32 345 minimum: 0 346 maximum: 2016 347 default: 512 348 description: Specifies the channel's ATI target. 349 350 azoteq,assoc-select: 351 $ref: /schemas/types.yaml#/definitions/uint32-array 352 minItems: 1 353 maxItems: 8 354 items: 355 minimum: 0 356 maximum: 7 357 description: 358 Specifies the associated channels for which the channel serves as a 359 reference channel. By default, no channels are selected. 360 361 azoteq,assoc-weight: 362 $ref: /schemas/types.yaml#/definitions/uint32 363 minimum: 0 364 maximum: 255 365 default: 0 366 description: 367 Specifies the channel's impact weight if it acts as an associated 368 channel (0 = 0% impact, 255 = 200% impact). 369 370 patternProperties: 371 "^event-prox(-alt)?$": 372 type: object 373 $ref: input.yaml# 374 description: 375 Represents a proximity event reported by the channel in response to 376 a decrease in counts. Node names suffixed with '-alt' instead corre- 377 spond to an increase in counts. 378 379 By default, the long-term average tracks an increase in counts such 380 that only events corresponding to a decrease in counts are reported 381 (refer to the datasheet for more information). 382 383 Specify 'azoteq,dual-direction' to freeze the long-term average when 384 the counts increase or decrease such that events of either direction 385 can be reported. Alternatively, specify 'azoteq,invert-enable' to in- 386 vert the polarity of the states reported by the channel. 387 388 Complementary events (e.g. event-touch and event-touch-alt) can both 389 be present and specify different key or switch codes, but not differ- 390 ent thresholds or hysteresis (if applicable). 391 392 properties: 393 azoteq,thresh: 394 $ref: /schemas/types.yaml#/definitions/uint32 395 minimum: 0 396 maximum: 255 397 default: 10 398 description: Specifies the threshold for the event. 399 400 linux,code: true 401 402 additionalProperties: false 403 404 "^event-touch(-alt)?$": 405 type: object 406 $ref: input.yaml# 407 description: Represents a touch event reported by the channel. 408 409 properties: 410 azoteq,thresh: 411 $ref: /schemas/types.yaml#/definitions/uint32 412 minimum: 0 413 maximum: 255 414 default: 8 415 description: Specifies the threshold for the event. 416 417 azoteq,hyst: 418 $ref: /schemas/types.yaml#/definitions/uint32 419 minimum: 0 420 maximum: 15 421 default: 4 422 description: Specifies the hysteresis for the event. 423 424 linux,code: true 425 426 additionalProperties: false 427 428 "^event-deep(-alt)?$": 429 type: object 430 $ref: input.yaml# 431 description: Represents a deep-touch event reported by the channel. 432 433 properties: 434 azoteq,thresh: 435 $ref: /schemas/types.yaml#/definitions/uint32 436 minimum: 0 437 maximum: 255 438 default: 26 439 description: Specifies the threshold for the event. 440 441 azoteq,hyst: 442 $ref: /schemas/types.yaml#/definitions/uint32 443 minimum: 0 444 maximum: 15 445 default: 0 446 description: Specifies the hysteresis for the event. 447 448 linux,code: true 449 450 additionalProperties: false 451 452 required: 453 - reg 454 455 additionalProperties: false 456 457required: 458 - compatible 459 - reg 460 - interrupts 461 - "#address-cells" 462 - "#size-cells" 463 464additionalProperties: false 465 466examples: 467 - | 468 #include <dt-bindings/input/input.h> 469 #include <dt-bindings/interrupt-controller/irq.h> 470 471 i2c { 472 #address-cells = <1>; 473 #size-cells = <0>; 474 475 touch@44 { 476 #address-cells = <1>; 477 #size-cells = <0>; 478 479 compatible = "azoteq,iqs269a"; 480 reg = <0x44>; 481 interrupt-parent = <&gpio>; 482 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; 483 484 azoteq,hall-enable; 485 azoteq,suspend-mode = <2>; 486 487 channel@0 { 488 reg = <0x0>; 489 490 event-prox { 491 linux,code = <KEY_POWER>; 492 }; 493 }; 494 495 channel@1 { 496 reg = <0x1>; 497 azoteq,slider0-select; 498 }; 499 500 channel@2 { 501 reg = <0x2>; 502 azoteq,slider0-select; 503 }; 504 505 channel@3 { 506 reg = <0x3>; 507 azoteq,slider0-select; 508 }; 509 510 channel@4 { 511 reg = <0x4>; 512 azoteq,slider0-select; 513 }; 514 515 channel@5 { 516 reg = <0x5>; 517 azoteq,slider0-select; 518 }; 519 520 channel@6 { 521 reg = <0x6>; 522 azoteq,invert-enable; 523 azoteq,static-enable; 524 azoteq,reseed-disable; 525 azoteq,rx-enable = <0>; 526 azoteq,sense-freq = <0x0>; 527 azoteq,sense-mode = <0xE>; 528 azoteq,ati-mode = <0x0>; 529 azoteq,ati-base = <200>; 530 azoteq,ati-target = <320>; 531 }; 532 533 channel@7 { 534 reg = <0x7>; 535 azoteq,invert-enable; 536 azoteq,static-enable; 537 azoteq,reseed-disable; 538 azoteq,rx-enable = <0>, <6>; 539 azoteq,sense-freq = <0x0>; 540 azoteq,sense-mode = <0xE>; 541 azoteq,ati-mode = <0x3>; 542 azoteq,ati-base = <200>; 543 azoteq,ati-target = <320>; 544 545 event-touch { 546 linux,code = <SW_LID>; 547 }; 548 }; 549 }; 550 }; 551 552... 553