STMicroelectonics Port Expander (STMPE)
Schema identifier ($id): "http://devicetree.org/schemas/mfd/st,stmpe.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
STMicroelectronics Port Expander (STMPE) is a series of slow bus controllers for various expanded peripherals such as GPIO, keypad, touchscreen, ADC, PWM or rotator. It can contain one or several different peripherals connected to SPI or I2C.
Maintainers (maintainers): "Linus Walleij <linusw@kernel.org>"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/spi/spi-peripheral-props.yaml#
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "st,stmpe601", "st,stmpe801", "st,stmpe811", "st,stmpe1600", "st,stmpe1601", "st,stmpe2401", "st,stmpe2403"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — required here #
Maximum number of items (maxItems): 1
vcc-supply — not listed as required here #
true — No constraints added by this property rule.
vio-supply — not listed as required here #
true — No constraints added by this property rule.
reset-gpios — not listed as required here #
Maximum number of items (maxItems): 1
wakeup-source — not listed as required here #
true — No constraints added by this property rule.
st,autosleep-timeout — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 4, 16, 32, 64, 128, 256, 512, 1024
Time idle before going to automatic sleep to save power
st,sample-time — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6
Sample time per iteration 0 = 36 clock ticks 1 = 44 clock ticks 2 = 56 clock ticks 3 = 64 clock ticks 4 = 80 clock ticks - recommended 5 = 96 clock ticks 6 = 124 clock ticks
st,mod-12b — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
ADC bit mode 0 = 10bit ADC, 1 = 12bit ADC
st,ref-sel — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
ADC reference source 0 = internal, 1 = external
st,adc-freq — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3
ADC clock speed 0 = 1.625 MHz 1 = 3.25 MHz 2, 3 = 6.5 MHz
adc — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/iio/adc/st,stmpe-adc.yaml#
gpio — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/gpio/st,stmpe-gpio.yaml#
keyboard-controller — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/input/matrix-keymap.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
compatible — required here
Exact value (const): "st,stmpe-keypad"
debounce-interval — not listed as required here
Debouncing interval in milliseconds
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
st,no-autorepeat — not listed as required here
If present, the keys will not autorepeat when pressed
Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag
st,scan-count — not listed as required here
Scanning cycles elapsed before key data is updated
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Required in this object (required): "compatible", "linux,keymap"
pwm — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/pwm/pwm.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
compatible — not listed as required here
Exact value (const): "st,stmpe-pwm"
#pwm-cells — not listed as required here
Exact value (const): 2
touchscreen — not listed as required here #
Value type (type): "object"
Shared schema rule ($ref): /schemas/input/touchscreen/touchscreen.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
compatible — required here
Exact value (const): "st,stmpe-ts"
st,ave-ctrl — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3
Sample average control 0 = 1 sample 1 = 2 samples 2 = 4 samples 3 = 8 samples
st,touch-det-delay — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
Touch detection delay 0 = 10 us 1 = 50 us 2 = 100 us 3 = 500 us - recommended 4 = 1 ms 5 = 5 ms 6 = 10 ms 7 = 50 ms
st,settling — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
Panel driver settling time 0 = 10 us 1 = 100 us 2 = 500 us - recommended 3 = 1 ms 4 = 5 ms 5 = 10 ms 6 = 50 ms 7 = 100 ms
st,fraction-z — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Allowed values (enum): 0, 1, 2, 3, 4, 5, 6, 7
Length of the fractional part in z, recommended is 7 (fraction-z ([0..7]) = Count of the fractional part)
st,i-drive — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
current limit value of the touchscreen drivers 0 = 20 mA (typical 35 mA max) 1 = 50 mA (typical 80 mA max)
Required in this object (required): "compatible"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Required in this object (required): "compatible", "reg", "interrupts"
Examples (examples) #
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/input.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
port-expander@43 {
compatible = "st,stmpe2401";
reg = <0x43>;
reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
interrupt-parent = <&gpio>;
vcc-supply = <&db8500_vsmps2_reg>;
vio-supply = <&db8500_vsmps2_reg>;
wakeup-source;
st,autosleep-timeout = <1024>;
gpio {
compatible = "st,stmpe-gpio";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
st,norequest-mask = <0xf0f002>;
};
keyboard-controller {
compatible = "st,stmpe-keypad";
debounce-interval = <64>;
st,scan-count = <8>;
st,no-autorepeat;
keypad,num-rows = <8>;
keypad,num-columns = <8>;
linux,keymap = <
MATRIX_KEY(0x00, 0x00, KEY_1)
MATRIX_KEY(0x00, 0x01, KEY_2)
MATRIX_KEY(0x00, 0x02, KEY_3)
MATRIX_KEY(0x00, 0x03, KEY_4)
MATRIX_KEY(0x00, 0x04, KEY_5)
MATRIX_KEY(0x00, 0x05, KEY_6)
MATRIX_KEY(0x00, 0x06, KEY_7)
MATRIX_KEY(0x00, 0x07, KEY_8)
MATRIX_KEY(0x00, 0x08, KEY_9)
MATRIX_KEY(0x00, 0x09, KEY_0)
>;
};
pwm {
compatible = "st,stmpe-pwm";
#pwm-cells = <2>;
};
};
port-expander@41 {
compatible = "st,stmpe811";
reg = <0x41>;
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
interrupt-parent = <&gpio>;
st,adc-freq = <1>;
st,mod-12b = <1>;
st,ref-sel = <0>;
st,sample-time = <4>;
adc {
compatible = "st,stmpe-adc";
st,norequest-mask = <0x0f>;
#io-channel-cells = <1>;
};
gpio {
compatible = "st,stmpe-gpio";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
};
pwm {
compatible = "st,stmpe-pwm";
#pwm-cells = <2>;
};
touchscreen {
compatible = "st,stmpe-ts";
st,ave-ctrl = <3>;
st,touch-det-delay = <5>;
st,settling = <3>;
st,fraction-z = <7>;
st,i-drive = <1>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)