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