1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: STMicroelectonics Port Expander (STMPE)
9 description: STMicroelectronics Port Expander (STMPE) is a series of slow
10 bus controllers for various expanded peripherals such as GPIO, keypad,
11 touchscreen, ADC, PWM or rotator. It can contain one or several different
12 peripherals connected to SPI or I2C.
15 - Linus Walleij <linus.walleij@linaro.org>
18 - $ref: /schemas/spi/spi-peripheral-props.yaml#
47 $ref: /schemas/types.yaml#/definitions/uint32
48 enum: [ 4, 16, 32, 64, 128, 256, 512, 1024 ]
49 description: Time idle before going to automatic sleep to save power
52 $ref: /schemas/types.yaml#/definitions/uint32
53 enum: [ 0, 1, 2, 3, 4, 5, 6 ]
55 Sample time per iteration
60 4 = 80 clock ticks - recommended
65 $ref: /schemas/types.yaml#/definitions/uint32
67 description: ADC bit mode 0 = 10bit ADC, 1 = 12bit ADC
70 $ref: /schemas/types.yaml#/definitions/uint32
72 description: ADC reference source 0 = internal, 1 = external
75 $ref: /schemas/types.yaml#/definitions/uint32
85 $ref: /schemas/iio/adc/st,stmpe-adc.yaml#
89 $ref: /schemas/gpio/st,stmpe-gpio.yaml#
93 $ref: /schemas/input/matrix-keymap.yaml#
95 unevaluatedProperties: false
99 const: st,stmpe-keypad
102 description: Debouncing interval in milliseconds
103 $ref: /schemas/types.yaml#/definitions/uint32
106 description: If present, the keys will not autorepeat when pressed
107 $ref: /schemas/types.yaml#/definitions/flag
110 description: Scanning cycles elapsed before key data is updated
111 $ref: /schemas/types.yaml#/definitions/uint32
119 $ref: /schemas/pwm/pwm.yaml#
121 unevaluatedProperties: false
132 $ref: /schemas/input/touchscreen/touchscreen.yaml#
134 unevaluatedProperties: false
141 $ref: /schemas/types.yaml#/definitions/uint32
144 Sample average control
151 $ref: /schemas/types.yaml#/definitions/uint32
152 enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
154 Touch detection delay
158 3 = 500 us - recommended
165 $ref: /schemas/types.yaml#/definitions/uint32
166 enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
168 Panel driver settling time
171 2 = 500 us - recommended
179 $ref: /schemas/types.yaml#/definitions/uint32
180 enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ]
181 description: Length of the fractional part in z, recommended is 7
182 (fraction-z ([0..7]) = Count of the fractional part)
185 $ref: /schemas/types.yaml#/definitions/uint32
188 current limit value of the touchscreen drivers
189 0 = 20 mA (typical 35 mA max)
190 1 = 50 mA (typical 80 mA max)
195 additionalProperties: false
204 #include <dt-bindings/gpio/gpio.h>
205 #include <dt-bindings/interrupt-controller/irq.h>
206 #include <dt-bindings/input/input.h>
208 #address-cells = <1>;
212 compatible = "st,stmpe2401";
214 reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
215 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
216 interrupt-parent = <&gpio>;
217 vcc-supply = <&db8500_vsmps2_reg>;
218 vio-supply = <&db8500_vsmps2_reg>;
220 st,autosleep-timeout = <1024>;
223 compatible = "st,stmpe-gpio";
226 interrupt-controller;
227 #interrupt-cells = <2>;
228 st,norequest-mask = <0xf0f002>;
231 keyboard-controller {
232 compatible = "st,stmpe-keypad";
233 debounce-interval = <64>;
236 keypad,num-rows = <8>;
237 keypad,num-columns = <8>;
239 MATRIX_KEY(0x00, 0x00, KEY_1)
240 MATRIX_KEY(0x00, 0x01, KEY_2)
241 MATRIX_KEY(0x00, 0x02, KEY_3)
242 MATRIX_KEY(0x00, 0x03, KEY_4)
243 MATRIX_KEY(0x00, 0x04, KEY_5)
244 MATRIX_KEY(0x00, 0x05, KEY_6)
245 MATRIX_KEY(0x00, 0x06, KEY_7)
246 MATRIX_KEY(0x00, 0x07, KEY_8)
247 MATRIX_KEY(0x00, 0x08, KEY_9)
248 MATRIX_KEY(0x00, 0x09, KEY_0)
253 compatible = "st,stmpe-pwm";
259 compatible = "st,stmpe811";
261 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
262 interrupt-parent = <&gpio>;
266 st,sample-time = <4>;
269 compatible = "st,stmpe-adc";
270 st,norequest-mask = <0x0f>;
271 #io-channel-cells = <1>;
275 compatible = "st,stmpe-gpio";
278 interrupt-controller;
279 #interrupt-cells = <2>;
283 compatible = "st,stmpe-pwm";
288 compatible = "st,stmpe-ts";
290 st,touch-det-delay = <5>;