Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- /plugin/;
- / {
- compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
- fragment@0 {
- target-path = "/";
- __overlay__ {
- keypad: gpio-matrix {
- compatible = "gpio-matrix-keypad";
- debounce-delay-ms = <10>;
- col-scan-delay-us = <10>;
- /*
- try to use GPIO only lines
- to keep SPI and I2C usable
- */
- row-gpios = <&gpio 21 0 // 0 &gpio 27 0
- &gpio 20 0 // 1 &gpio 22 0
- &gpio 26 0 // 2 &gpio 23 0
- &gpio 25 0>; // 3 &gpio 24 0
- col-gpios = <&gpio 27 0 // 0 &gpio 21 0
- &gpio 22 0 // 1 &gpio 20 0
- &gpio 23 0 // 2 &gpio 26 0
- &gpio 24 0>; // 3 &gpio 25 0
- /*
- Keycodes from /usr/include/linux/input-event-codes.h
- converted to hex using printf '%02x\n'
- */
- linux,keymap = <
- // Keymap Entry col row input code hex
- 0x00000069 // col0 row0 KEY_A 30 69
- 0x10000070 // col0 row1 KEY_B 48 70
- 0x20000071 // col0 row2 KEY_C 46 71
- 0x30000072 // col0 row3 KEY_D 32 72
- 0x01000074 // col1 row0 KEY_E 18 74
- 0x11000075 // col1 row1 KEY_F 33 75
- 0x21000076 // col1 row2 KEY_G 34 76
- 0x31000077 // col1 row3 KEY_H 35 77
- 0x02000079 // col2 row0 KEY_I 23 79
- 0x12000080 // col2 row1 KEY_J 36 80
- 0x22000081 // col2 row2 KEY_K 37 81
- 0x32000082 // col2 row3 KEY_L 38 82
- 0x03000084 // col3 row0 KEY_LEFTSHIFT 42 84
- 0x13000085 // col3 row1 KEY_N 49 85
- 0x23000086 // col3 row2 KEY_O 24 86
- 0x33000087>; // col3 row3 KEY_ENTER 28 87
- };
- };
- };
- };
Add Comment
Please, Sign In to add comment