brintos

brintos / linux-shallow public Read only

0
0
Text · 18.9 KiB · 2c3f693 Raw
649 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/iqs269a.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Azoteq IQS269A Capacitive Touch Controller8 9maintainers:10  - Jeff LaBundy <jeff@labundy.com>11 12allOf:13  - $ref: input.yaml#14 15description: |16  The Azoteq IQS269A is an 8-channel capacitive touch controller that features17  additional Hall-effect and inductive sensing capabilities.18 19  Link to datasheet: https://www.azoteq.com/20 21properties:22  compatible:23    enum:24      - azoteq,iqs269a25      - azoteq,iqs269a-0026      - azoteq,iqs269a-d027 28  reg:29    maxItems: 130 31  interrupts:32    maxItems: 133 34  "#address-cells":35    const: 136 37  "#size-cells":38    const: 039 40  azoteq,hall-enable:41    type: boolean42    description:43      Enables Hall-effect sensing on channels 6 and 7. In this case, keycodes44      assigned to channel 6 are ignored and keycodes assigned to channel 7 are45      interpreted as switch codes. Refer to the datasheet for requirements im-46      posed on channels 6 and 7 by Hall-effect sensing.47 48  azoteq,suspend-mode:49    $ref: /schemas/types.yaml#/definitions/uint3250    enum: [0, 1, 2, 3]51    default: 052    description: |53      Specifies the power mode during suspend as follows:54      0: Automatic (same as normal runtime, i.e. suspend/resume disabled)55      1: Low power (all sensing at a reduced reporting rate)56      2: Ultra-low power (channel 0 proximity sensing)57      3: Halt (no sensing)58 59  azoteq,clk-div:60    type: boolean61    description: Divides the device's core clock by a factor of 4.62 63  azoteq,ulp-update:64    $ref: /schemas/types.yaml#/definitions/uint3265    minimum: 066    maximum: 767    default: 368    description: Specifies the ultra-low-power mode update rate.69 70  azoteq,reseed-offset:71    type: boolean72    description:73      Applies an 8-count offset to all long-term averages upon either ATI or74      reseed events.75 76  azoteq,filt-str-lp-lta:77    $ref: /schemas/types.yaml#/definitions/uint3278    enum: [0, 1, 2, 3]79    default: 080    description:81      Specifies the long-term average filter strength during low-power mode.82 83  azoteq,filt-str-lp-cnt:84    $ref: /schemas/types.yaml#/definitions/uint3285    enum: [0, 1, 2, 3]86    default: 087    description:88      Specifies the raw count filter strength during low-power mode.89 90  azoteq,filt-str-np-lta:91    $ref: /schemas/types.yaml#/definitions/uint3292    enum: [0, 1, 2, 3]93    default: 094    description:95      Specifies the long-term average filter strength during normal-power mode.96 97  azoteq,filt-str-np-cnt:98    $ref: /schemas/types.yaml#/definitions/uint3299    enum: [0, 1, 2, 3]100    default: 0101    description:102      Specifies the raw count filter strength during normal-power mode.103 104  azoteq,rate-np-ms:105    minimum: 0106    maximum: 255107    default: 16108    description: Specifies the report rate (in ms) during normal-power mode.109 110  azoteq,rate-lp-ms:111    minimum: 0112    maximum: 255113    default: 160114    description: Specifies the report rate (in ms) during low-power mode.115 116  azoteq,rate-ulp-ms:117    multipleOf: 16118    minimum: 0119    maximum: 4080120    default: 160121    description: Specifies the report rate (in ms) during ultra-low-power mode.122 123  azoteq,timeout-pwr-ms:124    multipleOf: 512125    minimum: 0126    maximum: 130560127    default: 2560128    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: 512134    minimum: 0135    maximum: 130560136    default: 32768137    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 it140      altogether.141 142  azoteq,ati-band-disable:143    type: boolean144    description: Disables the ATI band check.145 146  azoteq,ati-lp-only:147    type: boolean148    description: Limits automatic ATI to low-power mode.149 150  azoteq,ati-band-tighten:151    type: boolean152    description: Tightens the ATI band from 1/8 to 1/16 of the desired target.153 154  azoteq,filt-disable:155    type: boolean156    description: Disables all raw count filtering.157 158  azoteq,gpio3-select:159    $ref: /schemas/types.yaml#/definitions/uint32160    minimum: 0161    maximum: 7162    default: 0163    description:164      Selects the channel for which the GPIO3 pin represents touch state.165 166  azoteq,dual-direction:167    type: boolean168    description:169      Specifies that long-term averages are to freeze in the presence of either170      increasing or decreasing counts, thereby permitting events to be reported171      in either direction.172 173  azoteq,tx-freq:174    $ref: /schemas/types.yaml#/definitions/uint32175    enum: [0, 1, 2, 3]176    default: 0177    description: |178      Specifies the inductive sensing excitation frequency as follows (paren-179      thesized numbers represent the frequency if 'azoteq,clk-div' is present):180      0: 16 MHz (4 MHz)181      1: 8 MHz (2 MHz)182      2: 4 MHz (1 MHz)183      3: 2 MHz (500 kHz)184 185  azoteq,global-cap-increase:186    type: boolean187    description: Increases the global capacitance adder from 0.5 pF to 1.5 pF.188 189  azoteq,reseed-select:190    $ref: /schemas/types.yaml#/definitions/uint32191    enum: [0, 1, 2, 3]192    default: 0193    description: |194      Specifies the event(s) that prompt the device to reseed (i.e. reset the195      long-term average) of an associated channel as follows:196      0: None197      1: Proximity198      2: Proximity or touch199      3: Proximity, touch or deep touch200 201  azoteq,tracking-enable:202    type: boolean203    description:204      Enables all associated channels to track their respective reference205      channels.206 207  azoteq,filt-str-slider:208    $ref: /schemas/types.yaml#/definitions/uint32209    enum: [0, 1, 2, 3]210    default: 1211    description: Specifies the slider coordinate filter strength.212 213  azoteq,touch-hold-ms:214    multipleOf: 256215    minimum: 256216    maximum: 65280217    default: 5120218    description:219      Specifies the length of time (in ms) for which the channel selected by220      'azoteq,gpio3-select' must be held in a state of touch in order for an221      approximately 60-ms pulse to be asserted on the GPIO4 pin.222 223  linux,keycodes:224    minItems: 1225    maxItems: 8226    description: |227      Specifies the numeric keycodes associated with each available gesture in228      the following order (enter 0 for unused gestures):229      0: Slider 0 tap230      1: Slider 0 hold231      2: Slider 0 positive flick or swipe232      3: Slider 0 negative flick or swipe233      4: Slider 1 tap234      5: Slider 1 hold235      6: Slider 1 positive flick or swipe236      7: Slider 1 negative flick or swipe237 238  azoteq,gesture-swipe:239    type: boolean240    description:241      Directs the device to interpret axial gestures as a swipe (finger remains242      on slider) instead of a flick (finger leaves slider).243 244  azoteq,timeout-tap-ms:245    multipleOf: 16246    minimum: 0247    maximum: 4080248    default: 400249    description:250      Specifies the length of time (in ms) within which a slider touch must be251      released in order to be interpreted as a tap. Default and maximum values252      as well as step size are reduced by a factor of 4 with device version 2.253 254  azoteq,timeout-swipe-ms:255    multipleOf: 16256    minimum: 0257    maximum: 4080258    default: 2000259    description:260      Specifies the length of time (in ms) within which an axial gesture must be261      completed in order to be interpreted as a flick or swipe. Default and max-262      imum values as well as step size are reduced by a factor of 4 with device263      version 2.264 265  azoteq,thresh-swipe:266    $ref: /schemas/types.yaml#/definitions/uint32267    minimum: 0268    maximum: 255269    default: 128270    description:271      Specifies the number of points across which an axial gesture must travel272      in order to be interpreted as a flick or swipe.273 274dependencies:275  azoteq,gesture-swipe: ["linux,keycodes"]276  azoteq,timeout-tap-ms: ["linux,keycodes"]277  azoteq,timeout-swipe-ms: ["linux,keycodes"]278  azoteq,thresh-swipe: ["linux,keycodes"]279 280patternProperties:281  "^channel@[0-7]$":282    type: object283    description:284      Represents a single sensing channel. A channel is active if defined and285      inactive otherwise.286 287    properties:288      reg:289        minimum: 0290        maximum: 7291        description: Index of the channel.292 293      azoteq,reseed-disable:294        type: boolean295        description:296          Prevents the channel from being reseeded if the long-term average297          timeout (defined in 'azoteq,timeout-lta') expires.298 299      azoteq,blocking-enable:300        type: boolean301        description: Specifies that the channel is a blocking channel.302 303      azoteq,slider0-select:304        type: boolean305        description: Specifies that the channel participates in slider 0.306 307      azoteq,slider1-select:308        type: boolean309        description: Specifies that the channel participates in slider 1.310 311      azoteq,rx-enable:312        $ref: /schemas/types.yaml#/definitions/uint32-array313        minItems: 1314        maxItems: 8315        items:316          minimum: 0317          maximum: 7318        description:319          Specifies the CRX pin(s) associated with the channel. By default, only320          the CRX pin corresponding to the channel's index is enabled (e.g. CRX0321          for channel 0).322 323      azoteq,tx-enable:324        $ref: /schemas/types.yaml#/definitions/uint32-array325        minItems: 1326        maxItems: 8327        items:328          minimum: 0329          maximum: 7330        default: [0, 1, 2, 3, 4, 5, 6, 7]331        description: Specifies the TX pin(s) associated with the channel.332 333      azoteq,meas-cap-decrease:334        type: boolean335        description:336          Decreases the internal measurement capacitance from 60 pF to 15 pF.337 338      azoteq,rx-float-inactive:339        type: boolean340        description: Floats any inactive CRX pins instead of grounding them.341 342      azoteq,local-cap-size:343        $ref: /schemas/types.yaml#/definitions/uint32344        enum: [0, 1, 2]345        default: 0346        description: |347          Specifies the capacitance to be added to the channel as follows:348          0: None349          1: Global adder (based on 'azoteq,global-cap-increase')350          2: Global adder + 0.5 pF351 352      azoteq,invert-enable:353        type: boolean354        description:355          Inverts the polarity of the states reported for proximity, touch and356          deep-touch events relative to their respective thresholds.357 358      azoteq,proj-bias:359        $ref: /schemas/types.yaml#/definitions/uint32360        enum: [0, 1, 2, 3]361        default: 2362        description: |363          Specifies the bias current applied during projected-capacitance364          sensing as follows:365          0: 2.5 uA366          1: 5 uA367          2: 10 uA368          3: 20 uA369 370      azoteq,sense-mode:371        $ref: /schemas/types.yaml#/definitions/uint32372        enum: [0, 1, 9, 14, 15]373        default: 0374        description: |375          Specifies the channel's sensing mode as follows:376          0:  Self capacitance377          1:  Projected capacitance378          9:  Self or mutual inductance379          14: Hall effect380          15: Temperature381 382      azoteq,sense-freq:383        $ref: /schemas/types.yaml#/definitions/uint32384        enum: [0, 1, 2, 3]385        default: 1386        description: |387          Specifies the channel's sensing frequency as follows (parenthesized388          numbers represent the frequency if 'azoteq,clk-div' is present):389          0: 4 MHz (1 MHz)390          1: 2 MHz (500 kHz)391          2: 1 MHz (250 kHz)392          3: 500 kHz (125 kHz)393 394      azoteq,static-enable:395        type: boolean396        description: Enables the static front-end for the channel.397 398      azoteq,ati-mode:399        $ref: /schemas/types.yaml#/definitions/uint32400        enum: [0, 1, 2, 3]401        default: 3402        description: |403          Specifies the channel's ATI mode as follows:404          0: Disabled405          1: Semi-partial406          2: Partial407          3: Full408 409      azoteq,ati-base:410        $ref: /schemas/types.yaml#/definitions/uint32411        enum: [75, 100, 150, 200]412        default: 100413        description: Specifies the channel's ATI base.414 415      azoteq,ati-target:416        $ref: /schemas/types.yaml#/definitions/uint32417        multipleOf: 32418        minimum: 0419        maximum: 2016420        default: 512421        description: Specifies the channel's ATI target.422 423      azoteq,assoc-select:424        $ref: /schemas/types.yaml#/definitions/uint32-array425        minItems: 1426        maxItems: 8427        items:428          minimum: 0429          maximum: 7430        description:431          Specifies the associated channels for which the channel serves as a432          reference channel. By default, no channels are selected.433 434      azoteq,assoc-weight:435        $ref: /schemas/types.yaml#/definitions/uint32436        minimum: 0437        maximum: 255438        default: 0439        description:440          Specifies the channel's impact weight if it acts as an associated441          channel (0 = 0% impact, 255 = 200% impact).442 443    patternProperties:444      "^event-prox(-alt)?$":445        type: object446        $ref: input.yaml#447        description:448          Represents a proximity event reported by the channel in response to449          a decrease in counts. Node names suffixed with '-alt' instead corre-450          spond to an increase in counts.451 452          By default, the long-term average tracks an increase in counts such453          that only events corresponding to a decrease in counts are reported454          (refer to the datasheet for more information).455 456          Specify 'azoteq,dual-direction' to freeze the long-term average when457          the counts increase or decrease such that events of either direction458          can be reported. Alternatively, specify 'azoteq,invert-enable' to in-459          vert the polarity of the states reported by the channel.460 461          Complementary events (e.g. event-touch and event-touch-alt) can both462          be present and specify different key or switch codes, but not differ-463          ent thresholds or hysteresis (if applicable).464 465        properties:466          azoteq,thresh:467            $ref: /schemas/types.yaml#/definitions/uint32468            minimum: 0469            maximum: 255470            default: 10471            description: Specifies the threshold for the event.472 473          linux,code: true474 475        additionalProperties: false476 477      "^event-touch(-alt)?$":478        type: object479        $ref: input.yaml#480        description: Represents a touch event reported by the channel.481 482        properties:483          azoteq,thresh:484            $ref: /schemas/types.yaml#/definitions/uint32485            minimum: 0486            maximum: 255487            default: 8488            description: Specifies the threshold for the event.489 490          azoteq,hyst:491            $ref: /schemas/types.yaml#/definitions/uint32492            minimum: 0493            maximum: 15494            default: 4495            description: Specifies the hysteresis for the event.496 497          linux,code: true498 499        additionalProperties: false500 501      "^event-deep(-alt)?$":502        type: object503        $ref: input.yaml#504        description: Represents a deep-touch event reported by the channel.505 506        properties:507          azoteq,thresh:508            $ref: /schemas/types.yaml#/definitions/uint32509            minimum: 0510            maximum: 255511            default: 26512            description: Specifies the threshold for the event.513 514          azoteq,hyst:515            $ref: /schemas/types.yaml#/definitions/uint32516            minimum: 0517            maximum: 15518            default: 0519            description: Specifies the hysteresis for the event.520 521          linux,code: true522 523        additionalProperties: false524 525    required:526      - reg527 528    additionalProperties: false529 530if:531  properties:532    compatible:533      contains:534        enum:535          - azoteq,iqs269a-d0536then:537  patternProperties:538    "^channel@[0-7]$":539      properties:540        azoteq,slider1-select: false541else:542  properties:543    azoteq,touch-hold-ms: false544 545required:546  - compatible547  - reg548  - interrupts549  - "#address-cells"550  - "#size-cells"551 552additionalProperties: false553 554examples:555  - |556    #include <dt-bindings/input/input.h>557    #include <dt-bindings/interrupt-controller/irq.h>558 559    i2c {560            #address-cells = <1>;561            #size-cells = <0>;562 563            touch@44 {564                    #address-cells = <1>;565                    #size-cells = <0>;566 567                    compatible = "azoteq,iqs269a";568                    reg = <0x44>;569                    interrupt-parent = <&gpio>;570                    interrupts = <17 IRQ_TYPE_LEVEL_LOW>;571 572                    azoteq,hall-enable;573                    azoteq,suspend-mode = <2>;574 575                    linux,keycodes = <KEY_PLAYPAUSE>,576                                     <KEY_STOPCD>,577                                     <KEY_NEXTSONG>,578                                     <KEY_PREVIOUSSONG>;579 580                    azoteq,timeout-tap-ms = <400>;581                    azoteq,timeout-swipe-ms = <800>;582 583                    channel@0 {584                            reg = <0x0>;585 586                            event-prox {587                                    linux,code = <KEY_POWER>;588                            };589                    };590 591                    channel@1 {592                            reg = <0x1>;593                            azoteq,slider0-select;594                    };595 596                    channel@2 {597                            reg = <0x2>;598                            azoteq,slider0-select;599                    };600 601                    channel@3 {602                            reg = <0x3>;603                            azoteq,slider0-select;604                    };605 606                    channel@4 {607                            reg = <0x4>;608                            azoteq,slider0-select;609                    };610 611                    channel@5 {612                            reg = <0x5>;613                            azoteq,slider0-select;614                    };615 616                    channel@6 {617                            reg = <0x6>;618                            azoteq,invert-enable;619                            azoteq,static-enable;620                            azoteq,reseed-disable;621                            azoteq,rx-enable = <0>;622                            azoteq,sense-freq = <0x0>;623                            azoteq,sense-mode = <0xE>;624                            azoteq,ati-mode = <0x0>;625                            azoteq,ati-base = <200>;626                            azoteq,ati-target = <320>;627                    };628 629                    channel@7 {630                            reg = <0x7>;631                            azoteq,invert-enable;632                            azoteq,static-enable;633                            azoteq,reseed-disable;634                            azoteq,rx-enable = <0>, <6>;635                            azoteq,sense-freq = <0x0>;636                            azoteq,sense-mode = <0xE>;637                            azoteq,ati-mode = <0x3>;638                            azoteq,ati-base = <200>;639                            azoteq,ati-target = <320>;640 641                            event-touch {642                                    linux,code = <SW_LID>;643                            };644                    };645            };646    };647 648...649