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