brintos

brintos / linux-shallow public Read only

0
0
Text · 5.8 KiB · 7ade03f Raw
227 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/input/microchip,cap11xx.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Microchip CAP11xx based capacitive touch sensors8 9description: |10  The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive11  touch controllers and LED drivers. The device communication via I2C only.12 13maintainers:14  - Rob Herring <robh@kernel.org>15 16properties:17  compatible:18    enum:19      - microchip,cap110620      - microchip,cap112621      - microchip,cap118822      - microchip,cap120323      - microchip,cap120624      - microchip,cap129325      - microchip,cap129826 27  reg:28    maxItems: 129 30  '#address-cells':31    const: 132 33  '#size-cells':34    const: 035 36  interrupts:37    maxItems: 138    description: |39      Property describing the interrupt line the40      device's ALERT#/CM_IRQ# pin is connected to.41      The device only has one interrupt source.42 43  autorepeat:44    description: |45      Enables the Linux input system's autorepeat feature on the input device.46 47  linux,keycodes:48    minItems: 349    maxItems: 850    description: |51      Specifies an array of numeric keycode values to52      be used for the channels. If this property is53      omitted, KEY_A, KEY_B, etc are used as defaults.54      The number of entries must correspond to the number of channels.55 56  microchip,sensor-gain:57    $ref: /schemas/types.yaml#/definitions/uint3258    default: 159    enum: [1, 2, 4, 8]60    description: |61      Defines the gain of the sensor circuitry. This62      effectively controls the sensitivity, as a63      smaller delta capacitance is required to64      generate the same delta count values.65 66  microchip,irq-active-high:67    type: boolean68    description: |69      By default the interrupt pin is active low70      open drain. This property allows using the active71      high push-pull output.72 73  microchip,sensitivity-delta-sense:74    $ref: /schemas/types.yaml#/definitions/uint3275    default: 3276    enum: [1, 2, 4, 8, 16, 32, 64, 128]77    description:78      Controls the sensitivity multiplier of a touch detection.79      Higher value means more sensitive settings.80      At the more sensitive settings, touches are detected for a smaller delta81      capacitance corresponding to a "lighter" touch.82 83  microchip,signal-guard:84    $ref: /schemas/types.yaml#/definitions/uint32-array85    minItems: 386    maxItems: 887    items:88      enum: [0, 1]89    description: |90      0 - off91      1 - on92      The signal guard isolates the signal from virtual grounds.93      If enabled then the behavior of the channel is changed to signal guard.94      The number of entries must correspond to the number of channels.95 96  microchip,input-threshold:97    $ref: /schemas/types.yaml#/definitions/uint32-array98    minItems: 399    maxItems: 8100    items:101      minimum: 0102      maximum: 127103    description:104      Specifies the delta threshold that is used to determine if a touch has105      been detected. A higher value means a larger difference in capacitance106      is required for a touch to be registered, making the touch sensor less107      sensitive.108      The number of entries must correspond to the number of channels.109 110  microchip,calib-sensitivity:111    $ref: /schemas/types.yaml#/definitions/uint32-array112    minItems: 3113    maxItems: 8114    items:115      enum: [1, 2, 4]116    description: |117      Specifies an array of numeric values that controls the gain118      used by the calibration routine to enable sensor inputs119      to be more sensitive for proximity detection.120      Gain is based on touch pad capacitance range121      1 - 5-50pF122      2 - 0-25pF123      4 - 0-12.5pF124      The number of entries must correspond to the number of channels.125 126patternProperties:127  "^led@[0-7]$":128    type: object129    description: CAP11xx LEDs130    $ref: /schemas/leds/common.yaml#131 132    properties:133      reg:134        enum: [0, 1, 2, 3, 4, 5, 6, 7]135 136      label: true137 138      linux,default-trigger: true139 140      default-state: true141 142    required:143      - reg144 145    additionalProperties: false146 147allOf:148  - $ref: input.yaml149  - if:150      properties:151        compatible:152          contains:153            enum:154              - microchip,cap1106155              - microchip,cap1203156              - microchip,cap1206157              - microchip,cap1293158              - microchip,cap1298159    then:160      patternProperties:161        "^led@[0-7]$": false162 163  - if:164      properties:165        compatible:166          contains:167            enum:168              - microchip,cap1106169              - microchip,cap1126170              - microchip,cap1188171              - microchip,cap1203172              - microchip,cap1206173    then:174      properties:175        microchip,signal-guard: false176        microchip,calib-sensitivity: false177 178required:179  - compatible180  - interrupts181 182additionalProperties: false183 184examples:185  - |186    i2c {187      #address-cells = <1>;188      #size-cells = <0>;189 190      touch@28 {191        compatible = "microchip,cap1188";192        interrupt-parent = <&gpio1>;193        interrupts = <0 0>;194        reg = <0x28>;195        autorepeat;196        microchip,sensor-gain = <2>;197        microchip,sensitivity-delta-sense = <16>;198        microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;199 200        linux,keycodes = <103>,	/* KEY_UP */201                         <106>,	/* KEY_RIGHT */202                         <108>,	/* KEY_DOWN */203                         <105>,	/* KEY_LEFT */204                         <109>,	/* KEY_PAGEDOWN */205                         <104>;	/* KEY_PAGEUP */206 207        #address-cells = <1>;208        #size-cells = <0>;209 210        led@0 {211                label = "cap11xx:green:usr0";212                reg = <0>;213        };214 215        led@1 {216                label = "cap11xx:green:usr1";217                reg = <1>;218        };219 220        led@2 {221                label = "cap11xx:green:alive";222                reg = <2>;223                linux,default-trigger = "heartbeat";224        };225      };226    };227