18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 28cc087a1SEmmanuel Vadot%YAML 1.2 38cc087a1SEmmanuel Vadot--- 4fac71e4eSEmmanuel Vadot$id: http://devicetree.org/schemas/input/microchip,cap11xx.yaml# 5fac71e4eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68cc087a1SEmmanuel Vadot 78bab661aSEmmanuel Vadottitle: Microchip CAP11xx based capacitive touch sensors 88cc087a1SEmmanuel Vadot 98cc087a1SEmmanuel Vadotdescription: | 108cc087a1SEmmanuel Vadot The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive 118cc087a1SEmmanuel Vadot touch controllers and LED drivers. The device communication via I2C only. 128cc087a1SEmmanuel Vadot 138cc087a1SEmmanuel Vadotmaintainers: 148cc087a1SEmmanuel Vadot - Rob Herring <robh@kernel.org> 158cc087a1SEmmanuel Vadot 168cc087a1SEmmanuel Vadotproperties: 178cc087a1SEmmanuel Vadot compatible: 188cc087a1SEmmanuel Vadot enum: 198cc087a1SEmmanuel Vadot - microchip,cap1106 208cc087a1SEmmanuel Vadot - microchip,cap1126 218cc087a1SEmmanuel Vadot - microchip,cap1188 22cb7aa33aSEmmanuel Vadot - microchip,cap1203 238cc087a1SEmmanuel Vadot - microchip,cap1206 24cb7aa33aSEmmanuel Vadot - microchip,cap1293 25cb7aa33aSEmmanuel Vadot - microchip,cap1298 268cc087a1SEmmanuel Vadot 278cc087a1SEmmanuel Vadot reg: 288cc087a1SEmmanuel Vadot maxItems: 1 298cc087a1SEmmanuel Vadot 308cc087a1SEmmanuel Vadot '#address-cells': 318cc087a1SEmmanuel Vadot const: 1 328cc087a1SEmmanuel Vadot 338cc087a1SEmmanuel Vadot '#size-cells': 348cc087a1SEmmanuel Vadot const: 0 358cc087a1SEmmanuel Vadot 368cc087a1SEmmanuel Vadot interrupts: 378cc087a1SEmmanuel Vadot maxItems: 1 388cc087a1SEmmanuel Vadot description: | 398cc087a1SEmmanuel Vadot Property describing the interrupt line the 408cc087a1SEmmanuel Vadot device's ALERT#/CM_IRQ# pin is connected to. 418cc087a1SEmmanuel Vadot The device only has one interrupt source. 428cc087a1SEmmanuel Vadot 438cc087a1SEmmanuel Vadot autorepeat: 448cc087a1SEmmanuel Vadot description: | 458cc087a1SEmmanuel Vadot Enables the Linux input system's autorepeat feature on the input device. 468cc087a1SEmmanuel Vadot 478cc087a1SEmmanuel Vadot linux,keycodes: 48*8d13bc63SEmmanuel Vadot minItems: 3 49*8d13bc63SEmmanuel Vadot maxItems: 8 508cc087a1SEmmanuel Vadot description: | 518cc087a1SEmmanuel Vadot Specifies an array of numeric keycode values to 528cc087a1SEmmanuel Vadot be used for the channels. If this property is 538cc087a1SEmmanuel Vadot omitted, KEY_A, KEY_B, etc are used as defaults. 54*8d13bc63SEmmanuel Vadot The number of entries must correspond to the number of channels. 558cc087a1SEmmanuel Vadot 568cc087a1SEmmanuel Vadot microchip,sensor-gain: 578cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 588cc087a1SEmmanuel Vadot default: 1 598cc087a1SEmmanuel Vadot enum: [1, 2, 4, 8] 608cc087a1SEmmanuel Vadot description: | 618cc087a1SEmmanuel Vadot Defines the gain of the sensor circuitry. This 628cc087a1SEmmanuel Vadot effectively controls the sensitivity, as a 638cc087a1SEmmanuel Vadot smaller delta capacitance is required to 648cc087a1SEmmanuel Vadot generate the same delta count values. 658cc087a1SEmmanuel Vadot 668cc087a1SEmmanuel Vadot microchip,irq-active-high: 678cc087a1SEmmanuel Vadot type: boolean 688cc087a1SEmmanuel Vadot description: | 698cc087a1SEmmanuel Vadot By default the interrupt pin is active low 708cc087a1SEmmanuel Vadot open drain. This property allows using the active 718cc087a1SEmmanuel Vadot high push-pull output. 728cc087a1SEmmanuel Vadot 73*8d13bc63SEmmanuel Vadot microchip,sensitivity-delta-sense: 74*8d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 75*8d13bc63SEmmanuel Vadot default: 32 76*8d13bc63SEmmanuel Vadot enum: [1, 2, 4, 8, 16, 32, 64, 128] 77*8d13bc63SEmmanuel Vadot description: 78*8d13bc63SEmmanuel Vadot Controls the sensitivity multiplier of a touch detection. 79*8d13bc63SEmmanuel Vadot Higher value means more sensitive settings. 80*8d13bc63SEmmanuel Vadot At the more sensitive settings, touches are detected for a smaller delta 81*8d13bc63SEmmanuel Vadot capacitance corresponding to a "lighter" touch. 82*8d13bc63SEmmanuel Vadot 83*8d13bc63SEmmanuel Vadot microchip,signal-guard: 84*8d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 85*8d13bc63SEmmanuel Vadot minItems: 3 86*8d13bc63SEmmanuel Vadot maxItems: 8 87*8d13bc63SEmmanuel Vadot items: 88*8d13bc63SEmmanuel Vadot enum: [0, 1] 89*8d13bc63SEmmanuel Vadot description: | 90*8d13bc63SEmmanuel Vadot 0 - off 91*8d13bc63SEmmanuel Vadot 1 - on 92*8d13bc63SEmmanuel Vadot The signal guard isolates the signal from virtual grounds. 93*8d13bc63SEmmanuel Vadot If enabled then the behavior of the channel is changed to signal guard. 94*8d13bc63SEmmanuel Vadot The number of entries must correspond to the number of channels. 95*8d13bc63SEmmanuel Vadot 96*8d13bc63SEmmanuel Vadot microchip,input-threshold: 97*8d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 98*8d13bc63SEmmanuel Vadot minItems: 3 99*8d13bc63SEmmanuel Vadot maxItems: 8 100*8d13bc63SEmmanuel Vadot items: 101*8d13bc63SEmmanuel Vadot minimum: 0 102*8d13bc63SEmmanuel Vadot maximum: 127 103*8d13bc63SEmmanuel Vadot description: 104*8d13bc63SEmmanuel Vadot Specifies the delta threshold that is used to determine if a touch has 105*8d13bc63SEmmanuel Vadot been detected. A higher value means a larger difference in capacitance 106*8d13bc63SEmmanuel Vadot is required for a touch to be registered, making the touch sensor less 107*8d13bc63SEmmanuel Vadot sensitive. 108*8d13bc63SEmmanuel Vadot The number of entries must correspond to the number of channels. 109*8d13bc63SEmmanuel Vadot 110*8d13bc63SEmmanuel Vadot microchip,calib-sensitivity: 111*8d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 112*8d13bc63SEmmanuel Vadot minItems: 3 113*8d13bc63SEmmanuel Vadot maxItems: 8 114*8d13bc63SEmmanuel Vadot items: 115*8d13bc63SEmmanuel Vadot enum: [1, 2, 4] 116*8d13bc63SEmmanuel Vadot description: | 117*8d13bc63SEmmanuel Vadot Specifies an array of numeric values that controls the gain 118*8d13bc63SEmmanuel Vadot used by the calibration routine to enable sensor inputs 119*8d13bc63SEmmanuel Vadot to be more sensitive for proximity detection. 120*8d13bc63SEmmanuel Vadot Gain is based on touch pad capacitance range 121*8d13bc63SEmmanuel Vadot 1 - 5-50pF 122*8d13bc63SEmmanuel Vadot 2 - 0-25pF 123*8d13bc63SEmmanuel Vadot 4 - 0-12.5pF 124*8d13bc63SEmmanuel Vadot The number of entries must correspond to the number of channels. 125*8d13bc63SEmmanuel Vadot 1268cc087a1SEmmanuel VadotpatternProperties: 1278cc087a1SEmmanuel Vadot "^led@[0-7]$": 1288cc087a1SEmmanuel Vadot type: object 1298cc087a1SEmmanuel Vadot description: CAP11xx LEDs 1308cc087a1SEmmanuel Vadot $ref: /schemas/leds/common.yaml# 1318cc087a1SEmmanuel Vadot 1328cc087a1SEmmanuel Vadot properties: 1338cc087a1SEmmanuel Vadot reg: 1348cc087a1SEmmanuel Vadot enum: [0, 1, 2, 3, 4, 5, 6, 7] 1358cc087a1SEmmanuel Vadot 1368cc087a1SEmmanuel Vadot label: true 1378cc087a1SEmmanuel Vadot 1388cc087a1SEmmanuel Vadot linux,default-trigger: true 1398cc087a1SEmmanuel Vadot 1408cc087a1SEmmanuel Vadot default-state: true 1418cc087a1SEmmanuel Vadot 1428cc087a1SEmmanuel Vadot required: 1438cc087a1SEmmanuel Vadot - reg 1448cc087a1SEmmanuel Vadot 1458cc087a1SEmmanuel Vadot additionalProperties: false 1468cc087a1SEmmanuel Vadot 1478cc087a1SEmmanuel VadotallOf: 1488cc087a1SEmmanuel Vadot - $ref: input.yaml 1498cc087a1SEmmanuel Vadot - if: 1508cc087a1SEmmanuel Vadot properties: 1518cc087a1SEmmanuel Vadot compatible: 1528cc087a1SEmmanuel Vadot contains: 1538cc087a1SEmmanuel Vadot enum: 1548cc087a1SEmmanuel Vadot - microchip,cap1106 155*8d13bc63SEmmanuel Vadot - microchip,cap1203 156*8d13bc63SEmmanuel Vadot - microchip,cap1206 157*8d13bc63SEmmanuel Vadot - microchip,cap1293 158*8d13bc63SEmmanuel Vadot - microchip,cap1298 1598cc087a1SEmmanuel Vadot then: 1608cc087a1SEmmanuel Vadot patternProperties: 1618cc087a1SEmmanuel Vadot "^led@[0-7]$": false 1628cc087a1SEmmanuel Vadot 163*8d13bc63SEmmanuel Vadot - if: 164*8d13bc63SEmmanuel Vadot properties: 165*8d13bc63SEmmanuel Vadot compatible: 166*8d13bc63SEmmanuel Vadot contains: 167*8d13bc63SEmmanuel Vadot enum: 168*8d13bc63SEmmanuel Vadot - microchip,cap1106 169*8d13bc63SEmmanuel Vadot - microchip,cap1126 170*8d13bc63SEmmanuel Vadot - microchip,cap1188 171*8d13bc63SEmmanuel Vadot - microchip,cap1203 172*8d13bc63SEmmanuel Vadot - microchip,cap1206 173*8d13bc63SEmmanuel Vadot then: 174*8d13bc63SEmmanuel Vadot properties: 175*8d13bc63SEmmanuel Vadot microchip,signal-guard: false 176*8d13bc63SEmmanuel Vadot microchip,calib-sensitivity: false 177*8d13bc63SEmmanuel Vadot 1788cc087a1SEmmanuel Vadotrequired: 1798cc087a1SEmmanuel Vadot - compatible 1808cc087a1SEmmanuel Vadot - interrupts 1818cc087a1SEmmanuel Vadot 1828cc087a1SEmmanuel VadotadditionalProperties: false 1838cc087a1SEmmanuel Vadot 1848cc087a1SEmmanuel Vadotexamples: 1858cc087a1SEmmanuel Vadot - | 1868cc087a1SEmmanuel Vadot i2c { 1878cc087a1SEmmanuel Vadot #address-cells = <1>; 1888cc087a1SEmmanuel Vadot #size-cells = <0>; 1898cc087a1SEmmanuel Vadot 190b97ee269SEmmanuel Vadot touch@28 { 1918cc087a1SEmmanuel Vadot compatible = "microchip,cap1188"; 1928cc087a1SEmmanuel Vadot interrupt-parent = <&gpio1>; 1938cc087a1SEmmanuel Vadot interrupts = <0 0>; 1948cc087a1SEmmanuel Vadot reg = <0x28>; 1958cc087a1SEmmanuel Vadot autorepeat; 1968cc087a1SEmmanuel Vadot microchip,sensor-gain = <2>; 197*8d13bc63SEmmanuel Vadot microchip,sensitivity-delta-sense = <16>; 198*8d13bc63SEmmanuel Vadot microchip,input-threshold = <21>, <18>, <46>, <46>, <46>, <21>; 1998cc087a1SEmmanuel Vadot 2008cc087a1SEmmanuel Vadot linux,keycodes = <103>, /* KEY_UP */ 2018cc087a1SEmmanuel Vadot <106>, /* KEY_RIGHT */ 2028cc087a1SEmmanuel Vadot <108>, /* KEY_DOWN */ 2038cc087a1SEmmanuel Vadot <105>, /* KEY_LEFT */ 2048cc087a1SEmmanuel Vadot <109>, /* KEY_PAGEDOWN */ 2058cc087a1SEmmanuel Vadot <104>; /* KEY_PAGEUP */ 2068cc087a1SEmmanuel Vadot 2078cc087a1SEmmanuel Vadot #address-cells = <1>; 2088cc087a1SEmmanuel Vadot #size-cells = <0>; 2098cc087a1SEmmanuel Vadot 2108cc087a1SEmmanuel Vadot led@0 { 2118cc087a1SEmmanuel Vadot label = "cap11xx:green:usr0"; 2128cc087a1SEmmanuel Vadot reg = <0>; 2138cc087a1SEmmanuel Vadot }; 2148cc087a1SEmmanuel Vadot 2158cc087a1SEmmanuel Vadot led@1 { 2168cc087a1SEmmanuel Vadot label = "cap11xx:green:usr1"; 2178cc087a1SEmmanuel Vadot reg = <1>; 2188cc087a1SEmmanuel Vadot }; 2198cc087a1SEmmanuel Vadot 2208cc087a1SEmmanuel Vadot led@2 { 2218cc087a1SEmmanuel Vadot label = "cap11xx:green:alive"; 2228cc087a1SEmmanuel Vadot reg = <2>; 2238cc087a1SEmmanuel Vadot linux,default-trigger = "heartbeat"; 2248cc087a1SEmmanuel Vadot }; 2258cc087a1SEmmanuel Vadot }; 2268cc087a1SEmmanuel Vadot }; 227