1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: "http://devicetree.org/schemas/input/microchip,cap11xx.yaml#" 5$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 7title: Device tree bindings for Microchip CAP11xx based capacitive touch sensors 8 9description: | 10 The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive 11 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,cap1106 20 - microchip,cap1126 21 - microchip,cap1188 22 23 reg: 24 maxItems: 1 25 26 '#address-cells': 27 const: 1 28 29 '#size-cells': 30 const: 0 31 32 interrupts: 33 maxItems: 1 34 description: | 35 Property describing the interrupt line the 36 device's ALERT#/CM_IRQ# pin is connected to. 37 The device only has one interrupt source. 38 39 autorepeat: 40 description: | 41 Enables the Linux input system's autorepeat feature on the input device. 42 43 linux,keycodes: 44 minItems: 6 45 maxItems: 6 46 description: | 47 Specifies an array of numeric keycode values to 48 be used for the channels. If this property is 49 omitted, KEY_A, KEY_B, etc are used as defaults. 50 The array must have exactly six entries. 51 52 microchip,sensor-gain: 53 $ref: /schemas/types.yaml#/definitions/uint32 54 default: 1 55 enum: [1, 2, 4, 8] 56 description: | 57 Defines the gain of the sensor circuitry. This 58 effectively controls the sensitivity, as a 59 smaller delta capacitance is required to 60 generate the same delta count values. 61 62 microchip,irq-active-high: 63 type: boolean 64 description: | 65 By default the interrupt pin is active low 66 open drain. This property allows using the active 67 high push-pull output. 68 69patternProperties: 70 "^led@[0-7]$": 71 type: object 72 description: CAP11xx LEDs 73 $ref: /schemas/leds/common.yaml# 74 75 properties: 76 reg: 77 enum: [0, 1, 2, 3, 4, 5, 6, 7] 78 79 label: true 80 81 linux,default-trigger: true 82 83 default-state: true 84 85 required: 86 - reg 87 88 additionalProperties: false 89 90allOf: 91 - $ref: input.yaml 92 - if: 93 properties: 94 compatible: 95 contains: 96 enum: 97 - microchip,cap1106 98 then: 99 patternProperties: 100 "^led@[0-7]$": false 101 102required: 103 - compatible 104 - interrupts 105 106additionalProperties: false 107 108examples: 109 - | 110 i2c { 111 #address-cells = <1>; 112 #size-cells = <0>; 113 114 cap1188@28 { 115 compatible = "microchip,cap1188"; 116 interrupt-parent = <&gpio1>; 117 interrupts = <0 0>; 118 reg = <0x28>; 119 autorepeat; 120 microchip,sensor-gain = <2>; 121 122 linux,keycodes = <103>, /* KEY_UP */ 123 <106>, /* KEY_RIGHT */ 124 <108>, /* KEY_DOWN */ 125 <105>, /* KEY_LEFT */ 126 <109>, /* KEY_PAGEDOWN */ 127 <104>; /* KEY_PAGEUP */ 128 129 #address-cells = <1>; 130 #size-cells = <0>; 131 132 led@0 { 133 label = "cap11xx:green:usr0"; 134 reg = <0>; 135 }; 136 137 led@1 { 138 label = "cap11xx:green:usr1"; 139 reg = <1>; 140 }; 141 142 led@2 { 143 label = "cap11xx:green:alive"; 144 reg = <2>; 145 linux,default-trigger = "heartbeat"; 146 }; 147 }; 148 }; 149