iqs269a.yaml (16811B)
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 description: 374 Represents a proximity event reported by the channel in response to 375 a decrease in counts. Node names suffixed with '-alt' instead corre- 376 spond to an increase in counts. 377 378 By default, the long-term average tracks an increase in counts such 379 that only events corresponding to a decrease in counts are reported 380 (refer to the datasheet for more information). 381 382 Specify 'azoteq,dual-direction' to freeze the long-term average when 383 the counts increase or decrease such that events of either direction 384 can be reported. Alternatively, specify 'azoteq,invert-enable' to in- 385 vert the polarity of the states reported by the channel. 386 387 Complementary events (e.g. event-touch and event-touch-alt) can both 388 be present and specify different key or switch codes, but not differ- 389 ent thresholds or hysteresis (if applicable). 390 391 properties: 392 azoteq,thresh: 393 $ref: /schemas/types.yaml#/definitions/uint32 394 minimum: 0 395 maximum: 255 396 default: 10 397 description: Specifies the threshold for the event. 398 399 linux,code: 400 $ref: /schemas/types.yaml#/definitions/uint32 401 description: Numeric key or switch code associated with the event. 402 403 additionalProperties: false 404 405 "^event-touch(-alt)?$": 406 type: object 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: 425 $ref: /schemas/types.yaml#/definitions/uint32 426 description: Numeric key or switch code associated with the event. 427 428 additionalProperties: false 429 430 "^event-deep(-alt)?$": 431 type: object 432 description: Represents a deep-touch event reported by the channel. 433 434 properties: 435 azoteq,thresh: 436 $ref: /schemas/types.yaml#/definitions/uint32 437 minimum: 0 438 maximum: 255 439 default: 26 440 description: Specifies the threshold for the event. 441 442 azoteq,hyst: 443 $ref: /schemas/types.yaml#/definitions/uint32 444 minimum: 0 445 maximum: 15 446 default: 0 447 description: Specifies the hysteresis for the event. 448 449 linux,code: 450 $ref: /schemas/types.yaml#/definitions/uint32 451 description: Numeric key or switch code associated with the event. 452 453 additionalProperties: false 454 455 required: 456 - reg 457 458 additionalProperties: false 459 460required: 461 - compatible 462 - reg 463 - interrupts 464 - "#address-cells" 465 - "#size-cells" 466 467additionalProperties: false 468 469examples: 470 - | 471 #include <dt-bindings/input/input.h> 472 #include <dt-bindings/interrupt-controller/irq.h> 473 474 i2c { 475 #address-cells = <1>; 476 #size-cells = <0>; 477 478 iqs269a@44 { 479 #address-cells = <1>; 480 #size-cells = <0>; 481 482 compatible = "azoteq,iqs269a"; 483 reg = <0x44>; 484 interrupt-parent = <&gpio>; 485 interrupts = <17 IRQ_TYPE_LEVEL_LOW>; 486 487 azoteq,hall-enable; 488 azoteq,suspend-mode = <2>; 489 490 channel@0 { 491 reg = <0x0>; 492 493 event-prox { 494 linux,code = <KEY_POWER>; 495 }; 496 }; 497 498 channel@1 { 499 reg = <0x1>; 500 azoteq,slider0-select; 501 }; 502 503 channel@2 { 504 reg = <0x2>; 505 azoteq,slider0-select; 506 }; 507 508 channel@3 { 509 reg = <0x3>; 510 azoteq,slider0-select; 511 }; 512 513 channel@4 { 514 reg = <0x4>; 515 azoteq,slider0-select; 516 }; 517 518 channel@5 { 519 reg = <0x5>; 520 azoteq,slider0-select; 521 }; 522 523 channel@6 { 524 reg = <0x6>; 525 azoteq,invert-enable; 526 azoteq,static-enable; 527 azoteq,reseed-disable; 528 azoteq,rx-enable = <0>; 529 azoteq,sense-freq = <0x0>; 530 azoteq,sense-mode = <0xE>; 531 azoteq,ati-mode = <0x0>; 532 azoteq,ati-base = <200>; 533 azoteq,ati-target = <320>; 534 }; 535 536 channel@7 { 537 reg = <0x7>; 538 azoteq,invert-enable; 539 azoteq,static-enable; 540 azoteq,reseed-disable; 541 azoteq,rx-enable = <0>, <6>; 542 azoteq,sense-freq = <0x0>; 543 azoteq,sense-mode = <0xE>; 544 azoteq,ati-mode = <0x3>; 545 azoteq,ati-base = <200>; 546 azoteq,ati-target = <320>; 547 548 event-touch { 549 linux,code = <SW_LID>; 550 }; 551 }; 552 }; 553 }; 554 555...