1 * Broadcom Keypad Controller device tree bindings
3 Broadcom Keypad controller is used to interface a SoC with a matrix-type
4 keypad device. The keypad controller supports multiple row and column lines.
5 A key can be placed at each intersection of a unique row and a unique column.
6 The keypad controller can sense a key-press and key-release and report the
7 event using a interrupt to the cpu.
9 This binding is based on the matrix-keymap binding with the following
12 keypad,num-rows and keypad,num-columns are required.
14 Required SoC Specific Properties:
15 - compatible: should be "brcm,bcm-keypad"
17 - reg: physical base address of the controller and length of memory mapped
20 - interrupts: The interrupt number to the cpu.
22 Board Specific Properties:
23 - keypad,num-rows: Number of row lines connected to the keypad
26 - keypad,num-columns: Number of column lines connected to the
29 - col-debounce-filter-period: The debounce period for the Column filter.
31 KEYPAD_DEBOUNCE_1_ms = 0
32 KEYPAD_DEBOUNCE_2_ms = 1
33 KEYPAD_DEBOUNCE_4_ms = 2
34 KEYPAD_DEBOUNCE_8_ms = 3
35 KEYPAD_DEBOUNCE_16_ms = 4
36 KEYPAD_DEBOUNCE_32_ms = 5
37 KEYPAD_DEBOUNCE_64_ms = 6
38 KEYPAD_DEBOUNCE_128_ms = 7
40 - status-debounce-filter-period: The debounce period for the Status filter.
42 KEYPAD_DEBOUNCE_1_ms = 0
43 KEYPAD_DEBOUNCE_2_ms = 1
44 KEYPAD_DEBOUNCE_4_ms = 2
45 KEYPAD_DEBOUNCE_8_ms = 3
46 KEYPAD_DEBOUNCE_16_ms = 4
47 KEYPAD_DEBOUNCE_32_ms = 5
48 KEYPAD_DEBOUNCE_64_ms = 6
49 KEYPAD_DEBOUNCE_128_ms = 7
51 - row-output-enabled: An optional property indicating whether the row or
52 column is being used as output. If specified the row is being used
53 as the output. Else defaults to column.
55 - pull-up-enabled: An optional property indicating the Keypad scan mode.
56 If specified implies the keypad scan pull-up has been enabled.
58 - autorepeat: Boolean, Enable auto repeat feature of Linux input
61 - linux,keymap: The keymap for keys as described in the binding document
62 devicetree/bindings/input/matrix-keymap.txt.
65 #include "dt-bindings/input/input.h"
68 keypad: keypad@180ac000 {
69 /* Required SoC specific properties */
70 compatible = "brcm,bcm-keypad";
72 /* Required Board specific properties */
73 keypad,num-rows = <5>;
74 keypad,num-columns = <5>;
77 linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */
78 MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */
79 MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */
80 MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */
81 MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */
82 MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */
83 MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */
84 MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */
85 MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */
86 MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */
87 MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */
88 MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */
89 MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */
90 MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */
91 MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */
92 MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */
93 MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */
94 MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */
95 MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */
96 MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */
97 MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */
98 MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */
99 MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */
102 /* Optional board specific properties */
103 col-debounce-filter-period = <5>;