Microchip CAP11xx based capacitive touch sensors
Schema identifier ($id): "http://devicetree.org/schemas/input/microchip,cap11xx.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
The Microchip CAP1xxx Family of RightTouchTM multiple-channel capacitive touch controllers and LED drivers. The device communication via I2C only.
Maintainers (maintainers): "Rob Herring <robh@kernel.org>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "microchip,cap1106", "microchip,cap1126", "microchip,cap1188", "microchip,cap1203", "microchip,cap1206", "microchip,cap1293", "microchip,cap1298"
reg — not listed as required here #
Maximum number of items (maxItems): 1
#address-cells — not listed as required here #
Exact value (const): 1
#size-cells — not listed as required here #
Exact value (const): 0
interrupts — required here #
Maximum number of items (maxItems): 1
Property describing the interrupt line the device's ALERT#/CM_IRQ# pin is connected to. The device only has one interrupt source.
autorepeat — not listed as required here #
Enables the Linux input system's autorepeat feature on the input device.
linux,keycodes — not listed as required here #
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 8
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 — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 1
Allowed values (enum): 1, 2, 4, 8
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 — not listed as required here #
Value type (type): "boolean"
By default the interrupt pin is active low open drain. This property allows using the active high push-pull output.
microchip,sensitivity-delta-sense — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Default value (default): 32
Allowed values (enum): 1, 2, 4, 8, 16, 32, 64, 128
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 — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 8
Array item rules (items) #
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 — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 8
Array item rules (items) #
Minimum value (
minimum):0Maximum value (
maximum):127
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.
microchip,calib-sensitivity — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 8
Array item rules (items) #
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.
Properties matching a name pattern (patternProperties) #
^led@[0-7]$ — name matches this regular expression #
Value type (type): "object"
CAP11xx LEDs
Shared schema rule ($ref): /schemas/leds/common.yaml#
Properties and child nodes (properties) #
reg — required here
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
label — not listed as required here
true — No constraints added by this property rule.
linux,default-trigger — not listed as required here
true — No constraints added by this property rule.
default-state — not listed as required here
true — No constraints added by this property rule.
Required in this object (required): "reg"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):input.yaml
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"microchip,cap1106","microchip,cap1203","microchip,cap1206","microchip,cap1293","microchip,cap1298"When the condition matches (
then) #Properties matching a name pattern (
patternProperties)
^led@[0-7]$— name matches this regular expression
false— Not permitted by this property rule.
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"microchip,cap1106","microchip,cap1126","microchip,cap1188","microchip,cap1203","microchip,cap1206"When the condition matches (
then) #Properties and child nodes (
properties)
microchip,signal-guard— not listed as required here
false— Not permitted by this property rule.
microchip,calib-sensitivity— not listed as required here
false— Not permitted by this property rule.
Required in this object (required): "compatible", "interrupts"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
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 */
#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";
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)