770 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/touchscreen/azoteq,iqs7211.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Azoteq IQS7210A/7211A/E Trackpad/Touchscreen Controller8 9maintainers:10 - Jeff LaBundy <jeff@labundy.com>11 12description: |13 The Azoteq IQS7210A, IQS7211A and IQS7211E trackpad and touchscreen control-14 lers employ projected-capacitance sensing and can track two contacts.15 16 Link to datasheets: https://www.azoteq.com/17 18properties:19 compatible:20 enum:21 - azoteq,iqs7210a22 - azoteq,iqs7211a23 - azoteq,iqs7211e24 25 reg:26 maxItems: 127 28 irq-gpios:29 maxItems: 130 description:31 Specifies the GPIO connected to the device's active-low RDY output. The32 pin doubles as the IQS7211E's active-low MCLR input, in which case this33 GPIO must be configured as open-drain.34 35 reset-gpios:36 maxItems: 137 description:38 Specifies the GPIO connected to the device's active-low MCLR input. The39 device is temporarily held in hardware reset prior to initialization if40 this property is present.41 42 azoteq,forced-comms:43 type: boolean44 description:45 Enables forced communication; to be used with host adapters that cannot46 tolerate clock stretching.47 48 azoteq,forced-comms-default:49 $ref: /schemas/types.yaml#/definitions/uint3250 enum: [0, 1]51 description:52 Indicates if the device's OTP memory enables (1) or disables (0) forced53 communication by default. Specifying this property can expedite startup54 time if the default value is known.55 56 If this property is not specified, communication is not initiated until57 the device asserts its RDY pin shortly after exiting hardware reset. At58 that point, forced communication is either enabled or disabled based on59 the presence or absence of the 'azoteq,forced-comms' property.60 61 azoteq,rate-active-ms:62 minimum: 063 maximum: 6553564 description: Specifies the report rate (in ms) during active mode.65 66 azoteq,rate-touch-ms:67 minimum: 068 maximum: 6553569 description: Specifies the report rate (in ms) during idle-touch mode.70 71 azoteq,rate-idle-ms:72 minimum: 073 maximum: 6553574 description: Specifies the report rate (in ms) during idle mode.75 76 azoteq,rate-lp1-ms:77 minimum: 078 maximum: 6553579 description: Specifies the report rate (in ms) during low-power mode 1.80 81 azoteq,rate-lp2-ms:82 minimum: 083 maximum: 6553584 description: Specifies the report rate (in ms) during low-power mode 2.85 86 azoteq,timeout-active-ms:87 multipleOf: 100088 minimum: 089 maximum: 6553500090 description:91 Specifies the length of time (in ms) to wait for an event before moving92 from active mode to idle or idle-touch modes.93 94 azoteq,timeout-touch-ms:95 multipleOf: 100096 minimum: 097 maximum: 6553500098 description:99 Specifies the length of time (in ms) to wait for an event before moving100 from idle-touch mode to idle mode.101 102 azoteq,timeout-idle-ms:103 multipleOf: 1000104 minimum: 0105 maximum: 65535000106 description:107 Specifies the length of time (in ms) to wait for an event before moving108 from idle mode to low-power mode 1.109 110 azoteq,timeout-lp1-ms:111 multipleOf: 1000112 minimum: 0113 maximum: 65535000114 description:115 Specifies the length of time (in ms) to wait for an event before moving116 from low-power mode 1 to low-power mode 2.117 118 azoteq,timeout-lp2-ms:119 multipleOf: 1000120 minimum: 0121 maximum: 60000122 description:123 Specifies the rate (in ms) at which the trackpad reference values124 are updated during low-power modes 1 and 2.125 126 azoteq,timeout-ati-ms:127 multipleOf: 1000128 minimum: 0129 maximum: 60000130 description:131 Specifies the delay (in ms) before the automatic tuning implementation132 (ATI) is retried in the event it fails to complete.133 134 azoteq,timeout-comms-ms:135 minimum: 0136 maximum: 65535137 description:138 Specifies the delay (in ms) before a communication window is closed.139 140 azoteq,timeout-press-ms:141 multipleOf: 1000142 minimum: 0143 maximum: 60000144 description:145 Specifies the length of time (in ms) to wait before automatically146 releasing a press event. Specify zero to allow the press state to147 persist indefinitely.148 149 azoteq,fosc-freq:150 $ref: /schemas/types.yaml#/definitions/uint32151 enum: [0, 1]152 description: |153 Specifies the device's core clock frequency as follows:154 0: 14 MHz155 1: 18 MHz156 157 azoteq,fosc-trim:158 $ref: /schemas/types.yaml#/definitions/uint32159 minimum: 0160 maximum: 15161 description: Specifies the device's core clock frequency trim.162 163 azoteq,num-contacts:164 $ref: /schemas/types.yaml#/definitions/uint32165 minimum: 0166 maximum: 2167 default: 0168 description: Specifies the number of contacts reported by the device.169 170 azoteq,contact-split:171 $ref: /schemas/types.yaml#/definitions/uint32172 minimum: 0173 maximum: 255174 description: Specifies the contact (finger) split factor.175 176 azoteq,trim-x:177 $ref: /schemas/types.yaml#/definitions/uint32178 minimum: 0179 maximum: 255180 description: Specifies the horizontal trim width.181 182 azoteq,trim-y:183 $ref: /schemas/types.yaml#/definitions/uint32184 minimum: 0185 maximum: 255186 description: Specifies the vertical trim height.187 188 trackpad:189 type: object190 description: Represents all channels associated with the trackpad.191 192 properties:193 azoteq,rx-enable:194 $ref: /schemas/types.yaml#/definitions/uint32-array195 minItems: 1196 maxItems: 8197 items:198 minimum: 0199 maximum: 7200 description:201 Specifies the order of the CRx pin(s) associated with the trackpad.202 203 azoteq,tx-enable:204 $ref: /schemas/types.yaml#/definitions/uint32-array205 minItems: 1206 maxItems: 12207 items:208 minimum: 0209 maximum: 11210 description:211 Specifies the order of the CTx pin(s) associated with the trackpad.212 213 azoteq,channel-select:214 $ref: /schemas/types.yaml#/definitions/uint32-array215 minItems: 1216 maxItems: 36217 items:218 minimum: 0219 maximum: 255220 description: |221 Specifies the channels mapped to each cycle in the following order:222 Cycle 0, slot 0223 Cycle 0, slot 1224 Cycle 1, slot 0225 Cycle 1, slot 1226 ...and so on. Specify 255 to disable a given slot.227 228 azoteq,ati-frac-div-fine:229 $ref: /schemas/types.yaml#/definitions/uint32230 minimum: 0231 maximum: 31232 description: Specifies the trackpad's ATI fine fractional divider.233 234 azoteq,ati-frac-mult-coarse:235 $ref: /schemas/types.yaml#/definitions/uint32236 minimum: 0237 maximum: 15238 description: Specifies the trackpad's ATI coarse fractional multiplier.239 240 azoteq,ati-frac-div-coarse:241 $ref: /schemas/types.yaml#/definitions/uint32242 minimum: 0243 maximum: 31244 description: Specifies the trackpad's ATI coarse fractional divider.245 246 azoteq,ati-comp-div:247 $ref: /schemas/types.yaml#/definitions/uint32248 minimum: 0249 maximum: 31250 description: Specifies the trackpad's ATI compensation divider.251 252 azoteq,ati-target:253 $ref: /schemas/types.yaml#/definitions/uint32254 minimum: 0255 maximum: 65535256 description: Specifies the trackpad's ATI target.257 258 azoteq,touch-enter:259 $ref: /schemas/types.yaml#/definitions/uint32260 minimum: 0261 maximum: 255262 description: Specifies the trackpad's touch entrance factor.263 264 azoteq,touch-exit:265 $ref: /schemas/types.yaml#/definitions/uint32266 minimum: 0267 maximum: 255268 description: Specifies the trackpad's touch exit factor.269 270 azoteq,thresh:271 $ref: /schemas/types.yaml#/definitions/uint32272 minimum: 0273 maximum: 255274 description: Specifies the trackpad's stationary touch threshold.275 276 azoteq,conv-period:277 $ref: /schemas/types.yaml#/definitions/uint32278 minimum: 0279 maximum: 255280 description: Specifies the trackpad's conversion period.281 282 azoteq,conv-frac:283 $ref: /schemas/types.yaml#/definitions/uint32284 minimum: 0285 maximum: 255286 description: Specifies the trackpad's conversion frequency fraction.287 288 patternProperties:289 "^event-(tap(-double|-triple)?|hold|palm|swipe-(x|y)-(pos|neg)(-hold)?)$":290 type: object291 $ref: ../input.yaml#292 description:293 Represents a gesture event reported by the trackpad. In the case of294 axial gestures, the duration or distance specified in one direction295 applies to both directions along the same axis.296 297 properties:298 linux,code: true299 300 azoteq,gesture-max-ms:301 minimum: 0302 maximum: 65535303 description: Specifies the maximum duration of tap/swipe gestures.304 305 azoteq,gesture-mid-ms:306 minimum: 0307 maximum: 65535308 description:309 Specifies the maximum duration between subsequent tap gestures310 (IQS7211E only).311 312 azoteq,gesture-min-ms:313 minimum: 0314 maximum: 65535315 description: Specifies the minimum duration of hold gestures.316 317 azoteq,gesture-dist:318 $ref: /schemas/types.yaml#/definitions/uint32319 minimum: 0320 maximum: 65535321 description:322 Specifies the minimum (swipe) or maximum (tap and hold) distance323 a finger may travel to be considered a gesture.324 325 azoteq,gesture-dist-rep:326 $ref: /schemas/types.yaml#/definitions/uint32327 minimum: 0328 maximum: 65535329 description:330 Specifies the minimum distance a finger must travel to elicit a331 repeated swipe gesture (IQS7211E only).332 333 azoteq,gesture-angle:334 $ref: /schemas/types.yaml#/definitions/uint32335 minimum: 0336 maximum: 75337 description:338 Specifies the maximum angle (in degrees) a finger may travel to339 be considered a swipe gesture.340 341 azoteq,thresh:342 $ref: /schemas/types.yaml#/definitions/uint32343 minimum: 0344 maximum: 42345 description: Specifies the palm gesture threshold (IQS7211E only).346 347 additionalProperties: false348 349 dependencies:350 azoteq,rx-enable: ["azoteq,tx-enable"]351 azoteq,tx-enable: ["azoteq,rx-enable"]352 azoteq,channel-select: ["azoteq,rx-enable"]353 354 additionalProperties: false355 356 alp:357 type: object358 $ref: ../input.yaml#359 description: Represents the alternate low-power channel (ALP).360 361 properties:362 azoteq,rx-enable:363 $ref: /schemas/types.yaml#/definitions/uint32-array364 minItems: 1365 maxItems: 8366 items:367 minimum: 0368 maximum: 7369 description:370 Specifies the CRx pin(s) associated with the ALP in no particular371 order.372 373 azoteq,tx-enable:374 $ref: /schemas/types.yaml#/definitions/uint32-array375 minItems: 1376 maxItems: 12377 items:378 minimum: 0379 maximum: 11380 description:381 Specifies the CTx pin(s) associated with the ALP in no particular382 order.383 384 azoteq,ati-frac-div-fine:385 $ref: /schemas/types.yaml#/definitions/uint32386 minimum: 0387 maximum: 31388 description: Specifies the ALP's ATI fine fractional divider.389 390 azoteq,ati-frac-mult-coarse:391 $ref: /schemas/types.yaml#/definitions/uint32392 minimum: 0393 maximum: 15394 description: Specifies the ALP's ATI coarse fractional multiplier.395 396 azoteq,ati-frac-div-coarse:397 $ref: /schemas/types.yaml#/definitions/uint32398 minimum: 0399 maximum: 31400 description: Specifies the ALP's ATI coarse fractional divider.401 402 azoteq,ati-comp-div:403 $ref: /schemas/types.yaml#/definitions/uint32404 minimum: 0405 maximum: 31406 description: Specifies the ALP's ATI compensation divider.407 408 azoteq,ati-target:409 $ref: /schemas/types.yaml#/definitions/uint32410 minimum: 0411 maximum: 65535412 description: Specifies the ALP's ATI target.413 414 azoteq,ati-base:415 $ref: /schemas/types.yaml#/definitions/uint32416 multipleOf: 8417 minimum: 0418 maximum: 255419 description: Specifies the ALP's ATI base.420 421 azoteq,ati-mode:422 $ref: /schemas/types.yaml#/definitions/uint32423 enum: [0, 1]424 description: |425 Specifies the ALP's ATI mode as follows:426 0: Partial427 1: Full428 429 azoteq,sense-mode:430 $ref: /schemas/types.yaml#/definitions/uint32431 enum: [0, 1]432 description: |433 Specifies the ALP's sensing mode as follows:434 0: Self capacitive435 1: Mutual capacitive436 437 azoteq,debounce-enter:438 $ref: /schemas/types.yaml#/definitions/uint32439 minimum: 0440 maximum: 255441 description: Specifies the ALP's debounce entrance factor.442 443 azoteq,debounce-exit:444 $ref: /schemas/types.yaml#/definitions/uint32445 minimum: 0446 maximum: 255447 description: Specifies the ALP's debounce exit factor.448 449 azoteq,thresh:450 $ref: /schemas/types.yaml#/definitions/uint32451 minimum: 0452 maximum: 65535453 description: Specifies the ALP's proximity or touch threshold.454 455 azoteq,conv-period:456 $ref: /schemas/types.yaml#/definitions/uint32457 minimum: 0458 maximum: 255459 description: Specifies the ALP's conversion period.460 461 azoteq,conv-frac:462 $ref: /schemas/types.yaml#/definitions/uint32463 minimum: 0464 maximum: 255465 description: Specifies the ALP's conversion frequency fraction.466 467 linux,code: true468 469 additionalProperties: false470 471 button:472 type: object473 description: Represents the inductive or capacitive button.474 475 properties:476 azoteq,ati-frac-div-fine:477 $ref: /schemas/types.yaml#/definitions/uint32478 minimum: 0479 maximum: 31480 description: Specifies the button's ATI fine fractional divider.481 482 azoteq,ati-frac-mult-coarse:483 $ref: /schemas/types.yaml#/definitions/uint32484 minimum: 0485 maximum: 15486 description: Specifies the button's ATI coarse fractional multiplier.487 488 azoteq,ati-frac-div-coarse:489 $ref: /schemas/types.yaml#/definitions/uint32490 minimum: 0491 maximum: 31492 description: Specifies the button's ATI coarse fractional divider.493 494 azoteq,ati-comp-div:495 $ref: /schemas/types.yaml#/definitions/uint32496 minimum: 0497 maximum: 31498 description: Specifies the button's ATI compensation divider.499 500 azoteq,ati-target:501 $ref: /schemas/types.yaml#/definitions/uint32502 minimum: 0503 maximum: 65535504 description: Specifies the button's ATI target.505 506 azoteq,ati-base:507 $ref: /schemas/types.yaml#/definitions/uint32508 multipleOf: 8509 minimum: 0510 maximum: 255511 description: Specifies the button's ATI base.512 513 azoteq,ati-mode:514 $ref: /schemas/types.yaml#/definitions/uint32515 enum: [0, 1]516 description: |517 Specifies the button's ATI mode as follows:518 0: Partial519 1: Full520 521 azoteq,sense-mode:522 $ref: /schemas/types.yaml#/definitions/uint32523 enum: [0, 1, 2]524 description: |525 Specifies the button's sensing mode as follows:526 0: Self capacitive527 1: Mutual capacitive528 2: Inductive529 530 azoteq,touch-enter:531 $ref: /schemas/types.yaml#/definitions/uint32532 minimum: 0533 maximum: 255534 description: Specifies the button's touch entrance factor.535 536 azoteq,touch-exit:537 $ref: /schemas/types.yaml#/definitions/uint32538 minimum: 0539 maximum: 255540 description: Specifies the button's touch exit factor.541 542 azoteq,debounce-enter:543 $ref: /schemas/types.yaml#/definitions/uint32544 minimum: 0545 maximum: 255546 description: Specifies the button's debounce entrance factor.547 548 azoteq,debounce-exit:549 $ref: /schemas/types.yaml#/definitions/uint32550 minimum: 0551 maximum: 255552 description: Specifies the button's debounce exit factor.553 554 azoteq,thresh:555 $ref: /schemas/types.yaml#/definitions/uint32556 minimum: 0557 maximum: 65535558 description: Specifies the button's proximity threshold.559 560 azoteq,conv-period:561 $ref: /schemas/types.yaml#/definitions/uint32562 minimum: 0563 maximum: 255564 description: Specifies the button's conversion period.565 566 azoteq,conv-frac:567 $ref: /schemas/types.yaml#/definitions/uint32568 minimum: 0569 maximum: 255570 description: Specifies the button's conversion frequency fraction.571 572 patternProperties:573 "^event-(prox|touch)$":574 type: object575 $ref: ../input.yaml#576 description:577 Represents a proximity or touch event reported by the button.578 579 properties:580 linux,code: true581 582 additionalProperties: false583 584 additionalProperties: false585 586 wakeup-source: true587 588 touchscreen-size-x: true589 touchscreen-size-y: true590 touchscreen-inverted-x: true591 touchscreen-inverted-y: true592 touchscreen-swapped-x-y: true593 594dependencies:595 touchscreen-size-x: ["azoteq,num-contacts"]596 touchscreen-size-y: ["azoteq,num-contacts"]597 touchscreen-inverted-x: ["azoteq,num-contacts"]598 touchscreen-inverted-y: ["azoteq,num-contacts"]599 touchscreen-swapped-x-y: ["azoteq,num-contacts"]600 601required:602 - compatible603 - reg604 - irq-gpios605 606additionalProperties: false607 608allOf:609 - $ref: touchscreen.yaml#610 611 - if:612 properties:613 compatible:614 contains:615 const: azoteq,iqs7210a616 617 then:618 properties:619 alp:620 properties:621 azoteq,rx-enable:622 maxItems: 4623 items:624 minimum: 4625 626 else:627 properties:628 azoteq,timeout-press-ms: false629 630 alp:631 properties:632 azoteq,ati-mode: false633 634 button: false635 636 - if:637 properties:638 compatible:639 contains:640 const: azoteq,iqs7211e641 642 then:643 properties:644 reset-gpios: false645 646 trackpad:647 properties:648 azoteq,tx-enable:649 maxItems: 13650 items:651 maximum: 12652 653 alp:654 properties:655 azoteq,tx-enable:656 maxItems: 13657 items:658 maximum: 12659 660examples:661 - |662 #include <dt-bindings/gpio/gpio.h>663 #include <dt-bindings/input/input.h>664 665 i2c {666 #address-cells = <1>;667 #size-cells = <0>;668 669 touchscreen@56 {670 compatible = "azoteq,iqs7210a";671 reg = <0x56>;672 irq-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;673 reset-gpios = <&gpio 17 (GPIO_ACTIVE_LOW |674 GPIO_PUSH_PULL)>;675 azoteq,num-contacts = <2>;676 677 trackpad {678 azoteq,rx-enable = <6>, <5>, <4>, <3>, <2>;679 azoteq,tx-enable = <1>, <7>, <8>, <9>, <10>;680 };681 682 button {683 azoteq,sense-mode = <2>;684 azoteq,touch-enter = <40>;685 azoteq,touch-exit = <36>;686 687 event-touch {688 linux,code = <KEY_HOME>;689 };690 };691 692 alp {693 azoteq,sense-mode = <1>;694 linux,code = <KEY_POWER>;695 };696 };697 };698 699 - |700 #include <dt-bindings/gpio/gpio.h>701 #include <dt-bindings/input/input.h>702 703 i2c {704 #address-cells = <1>;705 #size-cells = <0>;706 707 touchscreen@56 {708 compatible = "azoteq,iqs7211e";709 reg = <0x56>;710 irq-gpios = <&gpio 4 (GPIO_ACTIVE_LOW |711 GPIO_OPEN_DRAIN)>;712 713 trackpad {714 event-tap {715 linux,code = <KEY_PLAYPAUSE>;716 };717 718 event-tap-double {719 linux,code = <KEY_SHUFFLE>;720 };721 722 event-tap-triple {723 linux,code = <KEY_AGAIN>;724 };725 726 event-hold {727 linux,code = <KEY_STOP>;728 };729 730 event-palm {731 linux,code = <KEY_EXIT>;732 };733 734 event-swipe-x-pos {735 linux,code = <KEY_REWIND>;736 };737 738 event-swipe-x-pos-hold {739 linux,code = <KEY_PREVIOUS>;740 };741 742 event-swipe-x-neg {743 linux,code = <KEY_FASTFORWARD>;744 };745 746 event-swipe-x-neg-hold {747 linux,code = <KEY_NEXT>;748 };749 750 event-swipe-y-pos {751 linux,code = <KEY_VOLUMEUP>;752 };753 754 event-swipe-y-pos-hold {755 linux,code = <KEY_MUTE>;756 };757 758 event-swipe-y-neg {759 linux,code = <KEY_VOLUMEDOWN>;760 };761 762 event-swipe-y-neg-hold {763 linux,code = <KEY_MUTE>;764 };765 };766 };767 };768 769...770