0001 * ST Keyscan controller Device Tree bindings
0002
0003 The ST keyscan controller Device Tree binding is based on the
0004 matrix-keymap.
0005
0006 Required properties:
0007 - compatible: "st,sti-keyscan"
0008
0009 - reg: Register base address and size of st-keyscan controller.
0010
0011 - interrupts: Interrupt number for the st-keyscan controller.
0012
0013 - clocks: Must contain one entry, for the module clock.
0014 See ../clocks/clock-bindings.txt for details.
0015
0016 - pinctrl: Should specify pin control groups used for this controller.
0017 See ../pinctrl/pinctrl-bindings.txt for details.
0018
0019 - linux,keymap: The keymap for keys as described in the binding document
0020 devicetree/bindings/input/matrix-keymap.txt.
0021
0022 - keypad,num-rows: Number of row lines connected to the keypad controller.
0023
0024 - keypad,num-columns: Number of column lines connected to the keypad
0025 controller.
0026
0027 Optional property:
0028 - st,debounce_us: Debouncing interval time in microseconds
0029
0030 Example:
0031
0032 keyscan: keyscan@fe4b0000 {
0033 compatible = "st,sti-keyscan";
0034 reg = <0xfe4b0000 0x2000>;
0035 interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>;
0036 clocks = <&CLK_SYSIN>;
0037 pinctrl-names = "default";
0038 pinctrl-0 = <&pinctrl_keyscan>;
0039
0040 keypad,num-rows = <4>;
0041 keypad,num-columns = <4>;
0042 st,debounce_us = <5000>;
0043
0044 linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13)
0045 MATRIX_KEY(0x00, 0x01, KEY_F9)
0046 MATRIX_KEY(0x00, 0x02, KEY_F5)
0047 MATRIX_KEY(0x00, 0x03, KEY_F1)
0048 MATRIX_KEY(0x01, 0x00, KEY_F14)
0049 MATRIX_KEY(0x01, 0x01, KEY_F10)
0050 MATRIX_KEY(0x01, 0x02, KEY_F6)
0051 MATRIX_KEY(0x01, 0x03, KEY_F2)
0052 MATRIX_KEY(0x02, 0x00, KEY_F15)
0053 MATRIX_KEY(0x02, 0x01, KEY_F11)
0054 MATRIX_KEY(0x02, 0x02, KEY_F7)
0055 MATRIX_KEY(0x02, 0x03, KEY_F3)
0056 MATRIX_KEY(0x03, 0x00, KEY_F16)
0057 MATRIX_KEY(0x03, 0x01, KEY_F12)
0058 MATRIX_KEY(0x03, 0x02, KEY_F8)
0059 MATRIX_KEY(0x03, 0x03, KEY_F4) >;
0060 };