1* ST Keyscan controller Device Tree bindings
2
3The ST keyscan controller Device Tree binding is based on the
4matrix-keymap.
5
6Required properties:
7- compatible: "st,sti-keyscan"
8
9- reg: Register base address and size of st-keyscan controller.
10
11- interrupts: Interrupt number for the st-keyscan controller.
12
13- clocks: Must contain one entry, for the module clock.
14  See ../clocks/clock-bindings.txt for details.
15
16- pinctrl: Should specify pin control groups used for this controller.
17  See ../pinctrl/pinctrl-bindings.txt for details.
18
19- linux,keymap: The keymap for keys as described in the binding document
20  devicetree/bindings/input/matrix-keymap.txt.
21
22- keypad,num-rows: Number of row lines connected to the keypad controller.
23
24- keypad,num-columns: Number of column lines connected to the keypad
25  controller.
26
27Optional property:
28- st,debounce_us: Debouncing interval time in microseconds
29
30Example:
31
32keyscan: keyscan@fe4b0000 {
33	compatible = "st,sti-keyscan";
34	reg = <0xfe4b0000 0x2000>;
35	interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
36	clocks	= <&CLK_SYSIN>;
37	pinctrl-names = "default";
38	pinctrl-0 = <&pinctrl_keyscan>;
39
40	keypad,num-rows = <4>;
41	keypad,num-columns = <4>;
42	st,debounce_us = <5000>;
43
44	linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
45			 MATRIX_KEY(0x00, 0x01, KEY_F9)
46			 MATRIX_KEY(0x00, 0x02, KEY_F5)
47			 MATRIX_KEY(0x00, 0x03, KEY_F1)
48			 MATRIX_KEY(0x01, 0x00, KEY_F14)
49			 MATRIX_KEY(0x01, 0x01, KEY_F10)
50			 MATRIX_KEY(0x01, 0x02, KEY_F6)
51			 MATRIX_KEY(0x01, 0x03, KEY_F2)
52			 MATRIX_KEY(0x02, 0x00, KEY_F15)
53			 MATRIX_KEY(0x02, 0x01, KEY_F11)
54			 MATRIX_KEY(0x02, 0x02, KEY_F7)
55			 MATRIX_KEY(0x02, 0x03, KEY_F3)
56			 MATRIX_KEY(0x03, 0x00, KEY_F16)
57			 MATRIX_KEY(0x03, 0x01, KEY_F12)
58			 MATRIX_KEY(0x03, 0x02, KEY_F8)
59			 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
60	};
61