Doug Anderson | eba9295 | 2014-06-04 15:20:18 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Keyboard dts fragment for devices that use cros-ec-keyboard |
| 3 | * |
| 4 | * Copyright (c) 2014 Google, Inc |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #include <dt-bindings/input/input.h> |
| 12 | |
| 13 | &cros_ec { |
| 14 | keyboard-controller { |
| 15 | compatible = "google,cros-ec-keyb"; |
| 16 | keypad,num-rows = <8>; |
| 17 | keypad,num-columns = <13>; |
| 18 | google,needs-ghost-filter; |
| 19 | |
| 20 | linux,keymap = < |
| 21 | MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA) |
| 22 | MATRIX_KEY(0x00, 0x02, KEY_F1) |
| 23 | MATRIX_KEY(0x00, 0x03, KEY_B) |
| 24 | MATRIX_KEY(0x00, 0x04, KEY_F10) |
Chris Zhong | b2b9dc6 | 2015-05-05 10:07:37 +0800 | [diff] [blame] | 25 | MATRIX_KEY(0x00, 0x05, KEY_RO) |
Doug Anderson | eba9295 | 2014-06-04 15:20:18 -0700 | [diff] [blame] | 26 | MATRIX_KEY(0x00, 0x06, KEY_N) |
| 27 | MATRIX_KEY(0x00, 0x08, KEY_EQUAL) |
| 28 | MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT) |
| 29 | |
| 30 | MATRIX_KEY(0x01, 0x01, KEY_ESC) |
| 31 | MATRIX_KEY(0x01, 0x02, KEY_F4) |
| 32 | MATRIX_KEY(0x01, 0x03, KEY_G) |
| 33 | MATRIX_KEY(0x01, 0x04, KEY_F7) |
| 34 | MATRIX_KEY(0x01, 0x06, KEY_H) |
| 35 | MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE) |
| 36 | MATRIX_KEY(0x01, 0x09, KEY_F9) |
| 37 | MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE) |
Chris Zhong | b2b9dc6 | 2015-05-05 10:07:37 +0800 | [diff] [blame] | 38 | MATRIX_KEY(0x01, 0x0c, KEY_HENKAN) |
Doug Anderson | eba9295 | 2014-06-04 15:20:18 -0700 | [diff] [blame] | 39 | |
| 40 | MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL) |
| 41 | MATRIX_KEY(0x02, 0x01, KEY_TAB) |
| 42 | MATRIX_KEY(0x02, 0x02, KEY_F3) |
| 43 | MATRIX_KEY(0x02, 0x03, KEY_T) |
| 44 | MATRIX_KEY(0x02, 0x04, KEY_F6) |
| 45 | MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE) |
| 46 | MATRIX_KEY(0x02, 0x06, KEY_Y) |
| 47 | MATRIX_KEY(0x02, 0x07, KEY_102ND) |
| 48 | MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE) |
| 49 | MATRIX_KEY(0x02, 0x09, KEY_F8) |
Chris Zhong | b2b9dc6 | 2015-05-05 10:07:37 +0800 | [diff] [blame] | 50 | MATRIX_KEY(0x02, 0x0a, KEY_YEN) |
Doug Anderson | eba9295 | 2014-06-04 15:20:18 -0700 | [diff] [blame] | 51 | |
| 52 | MATRIX_KEY(0x03, 0x01, KEY_GRAVE) |
| 53 | MATRIX_KEY(0x03, 0x02, KEY_F2) |
| 54 | MATRIX_KEY(0x03, 0x03, KEY_5) |
| 55 | MATRIX_KEY(0x03, 0x04, KEY_F5) |
| 56 | MATRIX_KEY(0x03, 0x06, KEY_6) |
| 57 | MATRIX_KEY(0x03, 0x08, KEY_MINUS) |
| 58 | MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH) |
Chris Zhong | b2b9dc6 | 2015-05-05 10:07:37 +0800 | [diff] [blame] | 59 | MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN) |
Doug Anderson | eba9295 | 2014-06-04 15:20:18 -0700 | [diff] [blame] | 60 | |
| 61 | MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL) |
| 62 | MATRIX_KEY(0x04, 0x01, KEY_A) |
| 63 | MATRIX_KEY(0x04, 0x02, KEY_D) |
| 64 | MATRIX_KEY(0x04, 0x03, KEY_F) |
| 65 | MATRIX_KEY(0x04, 0x04, KEY_S) |
| 66 | MATRIX_KEY(0x04, 0x05, KEY_K) |
| 67 | MATRIX_KEY(0x04, 0x06, KEY_J) |
| 68 | MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON) |
| 69 | MATRIX_KEY(0x04, 0x09, KEY_L) |
| 70 | MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH) |
| 71 | MATRIX_KEY(0x04, 0x0b, KEY_ENTER) |
| 72 | |
| 73 | MATRIX_KEY(0x05, 0x01, KEY_Z) |
| 74 | MATRIX_KEY(0x05, 0x02, KEY_C) |
| 75 | MATRIX_KEY(0x05, 0x03, KEY_V) |
| 76 | MATRIX_KEY(0x05, 0x04, KEY_X) |
| 77 | MATRIX_KEY(0x05, 0x05, KEY_COMMA) |
| 78 | MATRIX_KEY(0x05, 0x06, KEY_M) |
| 79 | MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT) |
| 80 | MATRIX_KEY(0x05, 0x08, KEY_SLASH) |
| 81 | MATRIX_KEY(0x05, 0x09, KEY_DOT) |
| 82 | MATRIX_KEY(0x05, 0x0b, KEY_SPACE) |
| 83 | |
| 84 | MATRIX_KEY(0x06, 0x01, KEY_1) |
| 85 | MATRIX_KEY(0x06, 0x02, KEY_3) |
| 86 | MATRIX_KEY(0x06, 0x03, KEY_4) |
| 87 | MATRIX_KEY(0x06, 0x04, KEY_2) |
| 88 | MATRIX_KEY(0x06, 0x05, KEY_8) |
| 89 | MATRIX_KEY(0x06, 0x06, KEY_7) |
| 90 | MATRIX_KEY(0x06, 0x08, KEY_0) |
| 91 | MATRIX_KEY(0x06, 0x09, KEY_9) |
| 92 | MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT) |
| 93 | MATRIX_KEY(0x06, 0x0b, KEY_DOWN) |
| 94 | MATRIX_KEY(0x06, 0x0c, KEY_RIGHT) |
| 95 | |
| 96 | MATRIX_KEY(0x07, 0x01, KEY_Q) |
| 97 | MATRIX_KEY(0x07, 0x02, KEY_E) |
| 98 | MATRIX_KEY(0x07, 0x03, KEY_R) |
| 99 | MATRIX_KEY(0x07, 0x04, KEY_W) |
| 100 | MATRIX_KEY(0x07, 0x05, KEY_I) |
| 101 | MATRIX_KEY(0x07, 0x06, KEY_U) |
| 102 | MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT) |
| 103 | MATRIX_KEY(0x07, 0x08, KEY_P) |
| 104 | MATRIX_KEY(0x07, 0x09, KEY_O) |
| 105 | MATRIX_KEY(0x07, 0x0b, KEY_UP) |
| 106 | MATRIX_KEY(0x07, 0x0c, KEY_LEFT) |
| 107 | >; |
| 108 | }; |
| 109 | }; |