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