Path: blob/master/Documentation/devicetree/bindings/input/brcm,bcm-keypad.txt
26308 views
* Broadcom Keypad Controller device tree bindings12Broadcom Keypad controller is used to interface a SoC with a matrix-type3keypad device. The keypad controller supports multiple row and column lines.4A key can be placed at each intersection of a unique row and a unique column.5The keypad controller can sense a key-press and key-release and report the6event using a interrupt to the cpu.78This binding is based on the matrix-keymap binding with the following9changes:1011keypad,num-rows and keypad,num-columns are required.1213Required SoC Specific Properties:14- compatible: should be "brcm,bcm-keypad"1516- reg: physical base address of the controller and length of memory mapped17region.1819- interrupts: The interrupt number to the cpu.2021Board Specific Properties:22- keypad,num-rows: Number of row lines connected to the keypad23controller.2425- keypad,num-columns: Number of column lines connected to the26keypad controller.2728- col-debounce-filter-period: The debounce period for the Column filter.2930KEYPAD_DEBOUNCE_1_ms = 031KEYPAD_DEBOUNCE_2_ms = 132KEYPAD_DEBOUNCE_4_ms = 233KEYPAD_DEBOUNCE_8_ms = 334KEYPAD_DEBOUNCE_16_ms = 435KEYPAD_DEBOUNCE_32_ms = 536KEYPAD_DEBOUNCE_64_ms = 637KEYPAD_DEBOUNCE_128_ms = 73839- status-debounce-filter-period: The debounce period for the Status filter.4041KEYPAD_DEBOUNCE_1_ms = 042KEYPAD_DEBOUNCE_2_ms = 143KEYPAD_DEBOUNCE_4_ms = 244KEYPAD_DEBOUNCE_8_ms = 345KEYPAD_DEBOUNCE_16_ms = 446KEYPAD_DEBOUNCE_32_ms = 547KEYPAD_DEBOUNCE_64_ms = 648KEYPAD_DEBOUNCE_128_ms = 74950- row-output-enabled: An optional property indicating whether the row or51column is being used as output. If specified the row is being used52as the output. Else defaults to column.5354- pull-up-enabled: An optional property indicating the Keypad scan mode.55If specified implies the keypad scan pull-up has been enabled.5657- autorepeat: Boolean, Enable auto repeat feature of Linux input58subsystem (optional).5960- linux,keymap: The keymap for keys as described in the binding document61devicetree/bindings/input/matrix-keymap.txt.6263Example:64#include "dt-bindings/input/input.h"6566/ {67keypad: keypad@180ac000 {68/* Required SoC specific properties */69compatible = "brcm,bcm-keypad";7071/* Required Board specific properties */72keypad,num-rows = <5>;73keypad,num-columns = <5>;7475linux,keymap = <MATRIX_KEY(0x00, 0x02, KEY_F) /* key_forward */76MATRIX_KEY(0x00, 0x03, KEY_HOME) /* key_home */77MATRIX_KEY(0x00, 0x04, KEY_M) /* key_message */78MATRIX_KEY(0x01, 0x00, KEY_A) /* key_contacts */79MATRIX_KEY(0x01, 0x01, KEY_1) /* key_1 */80MATRIX_KEY(0x01, 0x02, KEY_2) /* key_2 */81MATRIX_KEY(0x01, 0x03, KEY_3) /* key_3 */82MATRIX_KEY(0x01, 0x04, KEY_S) /* key_speaker */83MATRIX_KEY(0x02, 0x00, KEY_P) /* key_phone */84MATRIX_KEY(0x02, 0x01, KEY_4) /* key_4 */85MATRIX_KEY(0x02, 0x02, KEY_5) /* key_5 */86MATRIX_KEY(0x02, 0x03, KEY_6) /* key_6 */87MATRIX_KEY(0x02, 0x04, KEY_VOLUMEUP) /* key_vol_up */88MATRIX_KEY(0x03, 0x00, KEY_C) /* key_call_log */89MATRIX_KEY(0x03, 0x01, KEY_7) /* key_7 */90MATRIX_KEY(0x03, 0x02, KEY_8) /* key_8 */91MATRIX_KEY(0x03, 0x03, KEY_9) /* key_9 */92MATRIX_KEY(0x03, 0x04, KEY_VOLUMEDOWN) /* key_vol_down */93MATRIX_KEY(0x04, 0x00, KEY_H) /* key_headset */94MATRIX_KEY(0x04, 0x01, KEY_KPASTERISK) /* key_* */95MATRIX_KEY(0x04, 0x02, KEY_0) /* key_0 */96MATRIX_KEY(0x04, 0x03, KEY_GRAVE) /* key_# */97MATRIX_KEY(0x04, 0x04, KEY_MUTE) /* key_mute */98>;99100/* Optional board specific properties */101col-debounce-filter-period = <5>;102row-output-enabled;103pull-up-enabled;104105};106};107108109