879 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/iqs626a.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Azoteq IQS626A Capacitive Touch Controller8 9maintainers:10 - Jeff LaBundy <jeff@labundy.com>11 12description: |13 The Azoteq IQS626A is a 14-channel capacitive touch controller that features14 additional Hall-effect and inductive sensing capabilities.15 16 Link to datasheet: https://www.azoteq.com/17 18allOf:19 - $ref: touchscreen/touchscreen.yaml#20 21properties:22 compatible:23 const: azoteq,iqs626a24 25 reg:26 maxItems: 127 28 interrupts:29 maxItems: 130 31 "#address-cells":32 const: 133 34 "#size-cells":35 const: 036 37 azoteq,suspend-mode:38 $ref: /schemas/types.yaml#/definitions/uint3239 enum: [0, 1, 2, 3]40 default: 041 description: |42 Specifies the power mode during suspend as follows:43 0: Automatic (same as normal runtime, i.e. suspend/resume disabled)44 1: Low power (all sensing at a reduced reporting rate)45 2: Ultra-low power (ULP channel proximity sensing)46 3: Halt (no sensing)47 48 azoteq,clk-div:49 type: boolean50 description: Divides the device's core clock by a factor of 4.51 52 azoteq,ulp-enable:53 type: boolean54 description:55 Permits the device to automatically enter ultra-low-power mode from low-56 power mode.57 58 azoteq,ulp-update:59 $ref: /schemas/types.yaml#/definitions/uint3260 enum: [0, 1, 2, 3, 4, 5, 6, 7]61 default: 362 description: |63 Specifies the rate at which the trackpad, generic and Hall channels are64 updated during ultra-low-power mode as follows:65 0: 866 1: 1367 2: 2868 3: 5469 4: 8970 5: 13571 6: 19072 7: 25673 74 azoteq,ati-band-disable:75 type: boolean76 description: Disables the ATI band check.77 78 azoteq,ati-lp-only:79 type: boolean80 description: Limits automatic ATI to low-power mode.81 82 azoteq,gpio3-select:83 $ref: /schemas/types.yaml#/definitions/uint3284 enum: [0, 1, 2, 3, 4, 5, 6, 7]85 default: 186 description: |87 Selects the channel or group of channels for which the GPIO3 pin88 represents touch state as follows:89 0: None90 1: ULP channel91 2: Trackpad92 3: Trackpad93 4: Generic channel 094 5: Generic channel 195 6: Generic channel 296 7: Hall channel97 98 azoteq,reseed-select:99 $ref: /schemas/types.yaml#/definitions/uint32100 enum: [0, 1, 2, 3]101 default: 0102 description: |103 Specifies the event(s) that prompt the device to reseed (i.e. reset the104 long-term average) of an associated channel as follows:105 0: None106 1: Proximity107 2: Proximity or touch108 3: Proximity, touch or deep touch109 110 azoteq,thresh-extend:111 type: boolean112 description: Multiplies all touch and deep-touch thresholds by 4.113 114 azoteq,tracking-enable:115 type: boolean116 description:117 Enables all associated channels to track their respective reference118 channels.119 120 azoteq,reseed-offset:121 type: boolean122 description:123 Applies an 8-count offset to all long-term averages upon either ATI or124 reseed events.125 126 azoteq,rate-np-ms:127 minimum: 0128 maximum: 255129 default: 150130 description: Specifies the report rate (in ms) during normal-power mode.131 132 azoteq,rate-lp-ms:133 minimum: 0134 maximum: 255135 default: 150136 description: Specifies the report rate (in ms) during low-power mode.137 138 azoteq,rate-ulp-ms:139 multipleOf: 16140 minimum: 0141 maximum: 4080142 default: 0143 description: Specifies the report rate (in ms) during ultra-low-power mode.144 145 azoteq,timeout-pwr-ms:146 multipleOf: 512147 minimum: 0148 maximum: 130560149 default: 2560150 description:151 Specifies the length of time (in ms) to wait for an event before moving152 from normal-power mode to low-power mode, or (if 'azoteq,ulp-enable' is153 present) from low-power mode to ultra-low-power mode.154 155 azoteq,timeout-lta-ms:156 multipleOf: 512157 minimum: 0158 maximum: 130560159 default: 40960160 description:161 Specifies the length of time (in ms) to wait before resetting the long-162 term average of all channels. Specify the maximum timeout to disable it163 altogether.164 165 touchscreen-inverted-x: true166 touchscreen-inverted-y: true167 touchscreen-swapped-x-y: true168 169patternProperties:170 "^ulp-0|generic-[0-2]|hall$":171 type: object172 description:173 Represents a single sensing channel. A channel is active if defined and174 inactive otherwise.175 176 properties:177 azoteq,ati-exclude:178 type: boolean179 description:180 Prevents the channel from participating in an ATI event that is181 manually triggered during initialization.182 183 azoteq,reseed-disable:184 type: boolean185 description:186 Prevents the channel from being reseeded if the long-term average187 timeout (defined in 'azoteq,timeout-lta') expires.188 189 azoteq,meas-cap-decrease:190 type: boolean191 description:192 Decreases the internal measurement capacitance from 60 pF to 15 pF.193 194 azoteq,rx-inactive:195 $ref: /schemas/types.yaml#/definitions/uint32196 enum: [0, 1, 2]197 default: 0198 description: |199 Specifies how inactive CRX pins are to be terminated as follows:200 0: VSS201 1: Floating202 2: VREG (generic channels only)203 204 azoteq,linearize:205 type: boolean206 description:207 Enables linearization of the channel's counts (generic and Hall208 channels) or inverts the polarity of the channel's proximity or209 touch states (ULP channel).210 211 azoteq,dual-direction:212 type: boolean213 description:214 Specifies that the channel's long-term average is to freeze in the215 presence of either increasing or decreasing counts, thereby permit-216 ting events to be reported in either direction.217 218 azoteq,filt-disable:219 type: boolean220 description: Disables raw count filtering for the channel.221 222 azoteq,ati-mode:223 $ref: /schemas/types.yaml#/definitions/uint32224 enum: [0, 1, 2, 3]225 description: |226 Specifies the channel's ATI mode as follows:227 0: Disabled228 1: Semi-partial229 2: Partial230 3: Full231 232 The default value is a function of the channel and the device's reset233 user interface (RUI); reference the datasheet for further information234 about the available RUI options.235 236 azoteq,ati-base:237 $ref: /schemas/types.yaml#/definitions/uint32238 enum: [75, 100, 150, 200]239 description:240 Specifies the channel's ATI base. The default value is a function241 of the channel and the device's RUI.242 243 azoteq,ati-target:244 $ref: /schemas/types.yaml#/definitions/uint32245 multipleOf: 32246 minimum: 0247 maximum: 2016248 description:249 Specifies the channel's ATI target. The default value is a function250 of the channel and the device's RUI.251 252 azoteq,cct-increase:253 $ref: /schemas/types.yaml#/definitions/uint32254 minimum: 0255 maximum: 16256 default: 0257 description:258 Specifies the degree to which the channel's charge cycle time is to259 be increased, with 0 representing no increase. The maximum value is260 limited to 4 in the case of the ULP channel, and the property is un-261 available entirely in the case of the Hall channel.262 263 azoteq,proj-bias:264 $ref: /schemas/types.yaml#/definitions/uint32265 enum: [0, 1, 2, 3]266 default: 0267 description: |268 Specifies the bias current applied during projected-capacitance269 sensing as follows:270 0: 2.5 uA271 1: 5 uA272 2: 10 uA273 3: 20 uA274 275 This property is unavailable in the case of the Hall channel.276 277 azoteq,sense-freq:278 $ref: /schemas/types.yaml#/definitions/uint32279 enum: [0, 1, 2, 3]280 description: |281 Specifies the channel's sensing frequency as follows (parenthesized282 numbers represent the frequency if 'azoteq,clk-div' is present):283 0: 4 MHz (1 MHz)284 1: 2 MHz (500 kHz)285 2: 1 MHz (250 kHz)286 3: 500 kHz (125 kHz)287 288 This property is unavailable in the case of the Hall channel. The289 default value is a function of the channel and the device's RUI.290 291 azoteq,ati-band-tighten:292 type: boolean293 description:294 Tightens the ATI band from 1/8 to 1/16 of the desired target (ULP and295 generic channels only).296 297 azoteq,proj-enable:298 type: boolean299 description: Enables projected-capacitance sensing (ULP channel only).300 301 azoteq,filt-str-np-cnt:302 $ref: /schemas/types.yaml#/definitions/uint32303 enum: [0, 1, 2, 3]304 default: 0305 description:306 Specifies the raw count filter strength during normal-power mode (ULP307 and generic channels only).308 309 azoteq,filt-str-lp-cnt:310 $ref: /schemas/types.yaml#/definitions/uint32311 enum: [0, 1, 2, 3]312 default: 0313 description:314 Specifies the raw count filter strength during low-power mode (ULP and315 generic channels only).316 317 azoteq,filt-str-np-lta:318 $ref: /schemas/types.yaml#/definitions/uint32319 enum: [0, 1, 2, 3]320 default: 0321 description:322 Specifies the long-term average filter strength during normal-power323 mode (ULP and generic channels only).324 325 azoteq,filt-str-lp-lta:326 $ref: /schemas/types.yaml#/definitions/uint32327 enum: [0, 1, 2, 3]328 default: 0329 description:330 Specifies the long-term average filter strength during low-power mode331 (ULP and generic channels only).332 333 azoteq,rx-enable:334 $ref: /schemas/types.yaml#/definitions/uint32-array335 minItems: 1336 maxItems: 8337 items:338 minimum: 0339 maximum: 7340 description:341 Specifies the CRX pin(s) associated with the channel.342 343 This property is unavailable in the case of the Hall channel. The344 default value is a function of the channel and the device's RUI.345 346 azoteq,tx-enable:347 $ref: /schemas/types.yaml#/definitions/uint32-array348 minItems: 1349 maxItems: 8350 items:351 minimum: 0352 maximum: 7353 description:354 Specifies the TX pin(s) associated with the channel.355 356 This property is unavailable in the case of the Hall channel. The357 default value is a function of the channel and the device's RUI.358 359 azoteq,local-cap-size:360 $ref: /schemas/types.yaml#/definitions/uint32361 enum: [0, 1, 2, 3, 4]362 default: 0363 description: |364 Specifies the capacitance to be added to the channel as follows:365 0: 0 pF366 1: 0.5 pF367 2: 1.0 pF368 3: 1.5 pF369 4: 2.0 pF370 371 This property is unavailable in the case of the ULP or Hall channels.372 373 azoteq,sense-mode:374 $ref: /schemas/types.yaml#/definitions/uint32375 enum: [0, 1, 8, 9, 12, 14, 15]376 description: |377 Specifies the channel's sensing mode as follows:378 0: Self capacitance379 1: Projected capacitance380 8: Self inductance381 9: Mutual inductance382 12: External383 14: Hall effect384 15: Temperature385 386 This property is unavailable in the case of the ULP or Hall channels.387 The default value is a function of the channel and the device's RUI.388 389 azoteq,tx-freq:390 $ref: /schemas/types.yaml#/definitions/uint32391 enum: [0, 1, 2, 3]392 default: 0393 description: |394 Specifies the inductive sensing excitation frequency as follows395 (parenthesized numbers represent the frequency if 'azoteq,clk-div'396 is present):397 0: 16 MHz (4 MHz)398 1: 8 MHz (2 MHz)399 2: 4 MHz (1 MHz)400 3: 2 MHz (500 kHz)401 402 This property is unavailable in the case of the ULP or Hall channels.403 404 azoteq,invert-enable:405 type: boolean406 description:407 Inverts the polarity of the states reported for proximity, touch and408 deep-touch events relative to their respective thresholds (generic409 channels only).410 411 azoteq,comp-disable:412 type: boolean413 description:414 Disables compensation for the channel (generic channels only).415 416 azoteq,static-enable:417 type: boolean418 description:419 Enables the static front-end for the channel (generic channels only).420 421 azoteq,assoc-select:422 $ref: /schemas/types.yaml#/definitions/string-array423 minItems: 1424 maxItems: 6425 items:426 enum:427 - ulp-0428 - trackpad-3x2429 - trackpad-3x3430 - generic-0431 - generic-1432 - generic-2433 - hall434 description:435 Specifies the associated channels for which the channel serves as a436 reference channel. By default, no channels are selected. This prop-437 erty is only available for the generic channels.438 439 azoteq,assoc-weight:440 $ref: /schemas/types.yaml#/definitions/uint32441 minimum: 0442 maximum: 255443 default: 0444 description:445 Specifies the channel's impact weight if it acts as an associated446 channel (0 = 0% impact, 255 = 200% impact). This property is only447 available for the generic channels.448 449 patternProperties:450 "^event-(prox|touch|deep)(-alt)?$":451 type: object452 $ref: input.yaml#453 description:454 Represents a proximity, touch or deep-touch event reported by the455 channel in response to a decrease in counts. Node names suffixed with456 '-alt' instead correspond to an increase in counts.457 458 By default, the long-term average tracks an increase in counts such459 that only events corresponding to a decrease in counts are reported460 (refer to the datasheet for more information).461 462 Specify 'azoteq,dual-direction' to freeze the long-term average when463 the counts increase or decrease such that events of either direction464 can be reported. Alternatively, specify 'azoteq,invert-enable' to in-465 vert the polarity of the states reported by the channel.466 467 Complementary events (e.g. event-touch and event-touch-alt) can both468 be present and specify different key or switch codes, but not differ-469 ent thresholds or hysteresis (if applicable).470 471 Proximity events are unavailable in the case of the Hall channel, and472 deep-touch events are only available for the generic channels. Unless473 otherwise specified, default values are a function of the channel and474 the device's RUI.475 476 properties:477 azoteq,thresh:478 $ref: /schemas/types.yaml#/definitions/uint32479 minimum: 0480 maximum: 255481 description: Specifies the threshold for the event.482 483 azoteq,hyst:484 $ref: /schemas/types.yaml#/definitions/uint32485 minimum: 0486 maximum: 15487 description:488 Specifies the hysteresis for the event (touch and deep-touch489 events only).490 491 linux,code: true492 493 linux,input-type:494 enum: [1, 5]495 description:496 Specifies whether the event is to be interpreted as a key (1) or497 a switch (5). By default, Hall-channel events are interpreted as498 switches and all others are interpreted as keys.499 500 additionalProperties: false501 502 dependencies:503 azoteq,assoc-weight: ["azoteq,assoc-select"]504 505 additionalProperties: false506 507 "^trackpad-3x[2-3]$":508 type: object509 $ref: input.yaml#510 description:511 Represents all channels associated with the trackpad. The channels are512 collectively active if the trackpad is defined and inactive otherwise.513 514 properties:515 azoteq,ati-exclude:516 type: boolean517 description:518 Prevents the trackpad channels from participating in an ATI event519 that is manually triggered during initialization.520 521 azoteq,reseed-disable:522 type: boolean523 description:524 Prevents the trackpad channels from being reseeded if the long-term525 average timeout (defined in 'azoteq,timeout-lta') expires.526 527 azoteq,meas-cap-decrease:528 type: boolean529 description:530 Decreases the internal measurement capacitance from 60 pF to 15 pF.531 532 azoteq,rx-inactive:533 $ref: /schemas/types.yaml#/definitions/uint32534 enum: [0, 1]535 default: 0536 description: |537 Specifies how inactive CRX pins are to be terminated as follows:538 0: VSS539 1: Floating540 541 azoteq,linearize:542 type: boolean543 description: Inverts the polarity of the trackpad's touch state.544 545 azoteq,dual-direction:546 type: boolean547 description:548 Specifies that the trackpad's long-term averages are to freeze in549 the presence of either increasing or decreasing counts, thereby550 permitting events to be reported in either direction.551 552 azoteq,filt-disable:553 type: boolean554 description: Disables raw count filtering for the trackpad channels.555 556 azoteq,ati-mode:557 $ref: /schemas/types.yaml#/definitions/uint32558 enum: [0, 1, 2, 3]559 default: 0560 description: |561 Specifies the trackpad's ATI mode as follows:562 0: Disabled563 1: Semi-partial564 2: Partial565 3: Full566 567 azoteq,ati-target:568 $ref: /schemas/types.yaml#/definitions/uint32569 multipleOf: 32570 minimum: 0571 maximum: 2016572 default: 0573 description: Specifies the trackpad's ATI target.574 575 azoteq,cct-increase:576 $ref: /schemas/types.yaml#/definitions/uint32577 minimum: 0578 maximum: 4579 default: 0580 description:581 Specifies the degree to which the trackpad's charge cycle time is to582 be increased, with 0 representing no increase.583 584 azoteq,proj-bias:585 $ref: /schemas/types.yaml#/definitions/uint32586 enum: [0, 1, 2, 3]587 default: 0588 description: |589 Specifies the bias current applied during projected-capacitance590 sensing as follows:591 0: 2.5 uA592 1: 5 uA593 2: 10 uA594 3: 20 uA595 596 azoteq,sense-freq:597 $ref: /schemas/types.yaml#/definitions/uint32598 enum: [0, 1, 2, 3]599 default: 0600 description: |601 Specifies the trackpad's sensing frequency as follows (parenthesized602 numbers represent the frequency if 'azoteq,clk-div' is present):603 0: 4 MHz (1 MHz)604 1: 2 MHz (500 kHz)605 2: 1 MHz (250 kHz)606 3: 500 kHz (125 kHz)607 608 azoteq,ati-band-tighten:609 type: boolean610 description:611 Tightens the ATI band from 1/8 to 1/16 of the desired target.612 613 azoteq,hyst:614 $ref: /schemas/types.yaml#/definitions/uint32615 minimum: 0616 maximum: 15617 default: 0618 description: Specifies the trackpad's touch hysteresis.619 620 azoteq,lta-update:621 $ref: /schemas/types.yaml#/definitions/uint32622 enum: [0, 1, 2, 3, 4, 5, 6, 7]623 default: 0624 description: |625 Specifies the update rate of the trackpad's long-term average during626 ultra-low-power mode as follows:627 0: 2628 1: 4629 2: 8630 3: 16631 4: 32632 5: 64633 6: 128634 7: 255635 636 azoteq,filt-str-trackpad:637 $ref: /schemas/types.yaml#/definitions/uint32638 enum: [0, 1, 2, 3]639 default: 0640 description: Specifies the trackpad coordinate filter strength.641 642 azoteq,filt-str-np-cnt:643 $ref: /schemas/types.yaml#/definitions/uint32644 enum: [0, 1, 2, 3]645 default: 0646 description:647 Specifies the raw count filter strength during normal-power mode.648 649 azoteq,filt-str-lp-cnt:650 $ref: /schemas/types.yaml#/definitions/uint32651 enum: [0, 1, 2, 3]652 default: 0653 description:654 Specifies the raw count filter strength during low-power mode.655 656 linux,keycodes:657 minItems: 1658 maxItems: 6659 description: |660 Specifies the numeric keycodes associated with each available gesture661 in the following order (enter 0 for unused gestures):662 0: Positive flick or swipe in X direction663 1: Negative flick or swipe in X direction664 2: Positive flick or swipe in Y direction665 3: Negative flick or swipe in Y direction666 4: Tap667 5: Hold668 669 azoteq,gesture-swipe:670 type: boolean671 description:672 Directs the device to interpret axial gestures as a swipe (finger673 remains on trackpad) instead of a flick (finger leaves trackpad).674 675 azoteq,timeout-tap-ms:676 multipleOf: 16677 minimum: 0678 maximum: 4080679 default: 0680 description:681 Specifies the length of time (in ms) within which a trackpad touch682 must be released in order to be interpreted as a tap.683 684 azoteq,timeout-swipe-ms:685 multipleOf: 16686 minimum: 0687 maximum: 4080688 default: 0689 description:690 Specifies the length of time (in ms) within which an axial gesture691 must be completed in order to be interpreted as a flick or swipe.692 693 azoteq,thresh-swipe:694 $ref: /schemas/types.yaml#/definitions/uint32695 minimum: 0696 maximum: 255697 default: 0698 description:699 Specifies the number of points across which an axial gesture must700 travel in order to be interpreted as a flick or swipe.701 702 patternProperties:703 "^channel-[0-8]$":704 type: object705 description: Represents a single trackpad channel.706 707 properties:708 azoteq,thresh:709 $ref: /schemas/types.yaml#/definitions/uint32710 minimum: 0711 maximum: 255712 default: 0713 description: Specifies the threshold for the channel.714 715 azoteq,ati-base:716 $ref: /schemas/types.yaml#/definitions/uint32717 minimum: 45718 maximum: 300719 default: 45720 description: Specifies the channel's ATI base.721 722 additionalProperties: false723 724 dependencies:725 azoteq,gesture-swipe: ["linux,keycodes"]726 azoteq,timeout-tap-ms: ["linux,keycodes"]727 azoteq,timeout-swipe-ms: ["linux,keycodes"]728 azoteq,thresh-swipe: ["linux,keycodes"]729 730 additionalProperties: false731 732required:733 - compatible734 - reg735 - interrupts736 - "#address-cells"737 - "#size-cells"738 739additionalProperties: false740 741examples:742 - |743 #include <dt-bindings/input/input.h>744 #include <dt-bindings/interrupt-controller/irq.h>745 746 i2c {747 #address-cells = <1>;748 #size-cells = <0>;749 750 touch@44 {751 #address-cells = <1>;752 #size-cells = <0>;753 754 compatible = "azoteq,iqs626a";755 reg = <0x44>;756 interrupt-parent = <&gpio>;757 interrupts = <17 IRQ_TYPE_LEVEL_LOW>;758 759 azoteq,rate-np-ms = <16>;760 azoteq,rate-lp-ms = <160>;761 762 azoteq,timeout-pwr-ms = <2560>;763 azoteq,timeout-lta-ms = <32768>;764 765 ulp-0 {766 azoteq,meas-cap-decrease;767 768 azoteq,ati-base = <75>;769 azoteq,ati-target = <1024>;770 771 azoteq,rx-enable = <2>, <3>, <4>,772 <5>, <6>, <7>;773 774 event-prox {775 linux,code = <KEY_POWER>;776 };777 };778 779 trackpad-3x3 {780 azoteq,filt-str-np-cnt = <1>;781 azoteq,filt-str-lp-cnt = <1>;782 783 azoteq,hyst = <4>;784 785 azoteq,ati-mode = <3>;786 azoteq,ati-target = <512>;787 788 azoteq,proj-bias = <1>;789 azoteq,sense-freq = <2>;790 791 linux,keycodes = <KEY_VOLUMEUP>,792 <KEY_VOLUMEDOWN>,793 <KEY_NEXTSONG>,794 <KEY_PREVIOUSSONG>,795 <KEY_PLAYPAUSE>,796 <KEY_STOPCD>;797 798 azoteq,gesture-swipe;799 azoteq,timeout-swipe-ms = <800>;800 azoteq,timeout-tap-ms = <400>;801 azoteq,thresh-swipe = <40>;802 803 channel-0 {804 azoteq,thresh = <35>;805 azoteq,ati-base = <195>;806 };807 808 channel-1 {809 azoteq,thresh = <40>;810 azoteq,ati-base = <195>;811 };812 813 channel-2 {814 azoteq,thresh = <40>;815 azoteq,ati-base = <195>;816 };817 818 channel-3 {819 azoteq,thresh = <38>;820 azoteq,ati-base = <195>;821 };822 823 channel-4 {824 azoteq,thresh = <33>;825 azoteq,ati-base = <195>;826 };827 828 channel-5 {829 azoteq,thresh = <38>;830 azoteq,ati-base = <195>;831 };832 833 channel-6 {834 azoteq,thresh = <35>;835 azoteq,ati-base = <195>;836 };837 838 channel-7 {839 azoteq,thresh = <35>;840 azoteq,ati-base = <195>;841 };842 843 channel-8 {844 azoteq,thresh = <35>;845 azoteq,ati-base = <195>;846 };847 };848 849 /*850 * Preserve the default register settings for851 * the temperature-tracking channel leveraged852 * by reset user interface (RUI) 1.853 *854 * Scalar properties (e.g. ATI mode) are left855 * untouched by simply omitting them; boolean856 * properties must be specified explicitly as857 * needed.858 */859 generic-2 {860 azoteq,reseed-disable;861 azoteq,meas-cap-decrease;862 azoteq,dual-direction;863 azoteq,comp-disable;864 azoteq,static-enable;865 };866 867 hall {868 azoteq,reseed-disable;869 azoteq,meas-cap-decrease;870 871 event-touch {872 linux,code = <SW_LID>;873 };874 };875 };876 };877 878...879