Documentation / devicetree / bindings / input / microchip,cap11xx.yaml


Based on kernel version 7.3. Page generated on 2026-10-19 13:17 EDT.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/microchip,cap11xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Microchip CAP11xx based capacitive touch sensors

description: |
  The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive
  touch controllers and LED drivers. The device communication via I2C only.
 
  For more product information please see the links below:
    CAP1106: https://ww1.microchip.com/downloads/en/DeviceDoc/00001624B.pdf
    CAP1114: https://ww1.microchip.com/downloads/en/DeviceDoc/00002444A.pdf
    CAP1126: https://ww1.microchip.com/downloads/en/DeviceDoc/00001623B.pdf
    CAP1188: https://ww1.microchip.com/downloads/en/DeviceDoc/00001620C.pdf
    CAP1203: https://ww1.microchip.com/downloads/en/DeviceDoc/00001572B.pdf
    CAP1206: https://ww1.microchip.com/downloads/en/DeviceDoc/00001567B.pdf
    CAP1293: https://ww1.microchip.com/downloads/en/DeviceDoc/00001566B.pdf
    CAP1298: https://ww1.microchip.com/downloads/en/DeviceDoc/00001571B.pdf

maintainers:
  - Rob Herring <robh@kernel.org>

properties:
  compatible:
    enum:
      - microchip,cap1106
      - microchip,cap1114
      - microchip,cap1126
      - microchip,cap1188
      - microchip,cap1203
      - microchip,cap1206
      - microchip,cap1293
      - microchip,cap1298

  reg:
    maxItems: 1
 
  '#address-cells':
    const: 1
 
  '#size-cells':
    const: 0

  interrupts:
    maxItems: 1
    description: |
      Property describing the interrupt line the
      device's ALERT#/CM_IRQ# pin is connected to.
      The device only has one interrupt source.

  reset-gpios:
    description: |
      GPIO connected to the active-high RESET pin of the chip;
      driving it high asserts reset and deep sleep, while driving
      it low releases reset for normal operation.
    maxItems: 1

  autorepeat:
    description: |
      Enables the Linux input system's autorepeat feature on the input device.

  linux,keycodes:
    minItems: 3
    maxItems: 14
    description: |
      Specifies an array of numeric keycode values to
      be used for the channels. If this property is
      omitted, KEY_A, KEY_B, etc are used as defaults.
      The number of entries must correspond to the number of channels.

  microchip,sensor-gain:
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 1
    enum: [1, 2, 4, 8]
    description: |
      Defines the gain of the sensor circuitry. This
      effectively controls the sensitivity, as a
      smaller delta capacitance is required to
      generate the same delta count values.

  microchip,irq-active-high:
    type: boolean
    description: |
      By default the interrupt pin is active low
      open drain. This property allows using the active
      high push-pull output.

  microchip,sensitivity-delta-sense:
    $ref: /schemas/types.yaml#/definitions/uint32
    default: 32
    enum: [1, 2, 4, 8, 16, 32, 64, 128]
    description:
      Controls the sensitivity multiplier of a touch detection.
      Higher value means more sensitive settings.
      At the more sensitive settings, touches are detected for a smaller delta
      capacitance corresponding to a "lighter" touch.

  microchip,signal-guard:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 3
    maxItems: 8
    items:
      enum: [0, 1]
    description: |
      0 - off
      1 - on
      The signal guard isolates the signal from virtual grounds.
      If enabled then the behavior of the channel is changed to signal guard.
      The number of entries must correspond to the number of channels.

  microchip,input-threshold:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 3
    maxItems: 8
    items:
      minimum: 0
      maximum: 127
    description:
      Specifies the delta threshold that is used to determine if a touch has
      been detected. A higher value means a larger difference in capacitance
      is required for a touch to be registered, making the touch sensor less
      sensitive.
      The number of entries must correspond to the number of channels.
      CAP1114 is an exception where channels 8~14 reuse the eighth entry's
      threshold, so counts differ.

  microchip,calib-sensitivity:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 3
    maxItems: 8
    items:
      enum: [1, 2, 4]
    description: |
      Specifies an array of numeric values that controls the gain
      used by the calibration routine to enable sensor inputs
      to be more sensitive for proximity detection.
      Gain is based on touch pad capacitance range
      1 - 5-50pF
      2 - 0-25pF
      4 - 0-12.5pF
      The number of entries must correspond to the number of channels.

patternProperties:
  "^led@[0-9a]$":
    type: object
    description: CAP11xx LEDs
    $ref: /schemas/leds/common.yaml#

    properties:
      reg:
        description: LED channel number
        minimum: 0
        maximum: 10

      label: true

      linux,default-trigger: true

      default-state: true

    required:
      - reg

    additionalProperties: false

allOf:
  - $ref: input.yaml
  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1106
              - microchip,cap1203
              - microchip,cap1206
              - microchip,cap1293
              - microchip,cap1298
    then:
      properties:
        reset-gpios: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1114
    then:
      properties:
        linux,keycodes:
          minItems: 14
    else:
      properties:
        linux,keycodes:
          maxItems: 8

  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1106
              - microchip,cap1203
              - microchip,cap1206
              - microchip,cap1293
              - microchip,cap1298
    then:
      patternProperties:
        "^led@": false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1126
    then:
      patternProperties:
        "^led@":
          properties:
            reg:
              maximum: 1

  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1188
    then:
      patternProperties:
        "^led@":
          properties:
            reg:
              maximum: 7

  - if:
      properties:
        compatible:
          contains:
            enum:
              - microchip,cap1106
              - microchip,cap1114
              - microchip,cap1126
              - microchip,cap1188
              - microchip,cap1203
              - microchip,cap1206
    then:
      properties:
        microchip,signal-guard: false
        microchip,calib-sensitivity: false

required:
  - compatible
  - interrupts

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
 
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
 
      touch@28 {
        compatible = "microchip,cap1188";
        interrupt-parent = <&gpio1>;
        interrupts = <0 0>;
        reg = <0x28>;
        autorepeat;
        microchip,sensor-gain = <2>;
        microchip,sensitivity-delta-sense = <16>;
        microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>;
 
        linux,keycodes = <103>, /* KEY_UP */
                         <106>, /* KEY_RIGHT */
                         <108>, /* KEY_DOWN */
                         <105>, /* KEY_LEFT */
                         <109>, /* KEY_PAGEDOWN */
                         <104>; /* KEY_PAGEUP */
 
        reset-gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
 
        #address-cells = <1>;
        #size-cells = <0>;
 
        led@0 {
                label = "cap11xx:green:usr0";
                reg = <0>;
        };
 
        led@1 {
                label = "cap11xx:green:usr1";
                reg = <1>;
        };
 
        led@2 {
                label = "cap11xx:green:alive";
                reg = <2>;
                linux,default-trigger = "heartbeat";
        };
      };
    };