blob: 4a0c1037fbc06336513a99f73ca0e3f4827553e7 [file] [log] [blame]
Jagan Teki5cc21182020-04-28 15:30:17 +05301// SPDX-License-Identifier: GPL-2.0-only
Simon Glassb1397a32014-12-04 06:36:28 -07002/*
3 * Keyboard dts fragment for devices that use cros-ec-keyboard
4 *
5 * Copyright (c) 2014 Google, Inc
Simon Glassb1397a32014-12-04 06:36:28 -07006*/
7
8#include <dt-bindings/input/input.h>
9
10&cros_ec {
11 keyboard-controller {
12 compatible = "google,cros-ec-keyb";
13 keypad,num-rows = <8>;
14 keypad,num-columns = <13>;
15 google,needs-ghost-filter;
16
17 linux,keymap = <
18 MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
19 MATRIX_KEY(0x00, 0x02, KEY_F1)
20 MATRIX_KEY(0x00, 0x03, KEY_B)
21 MATRIX_KEY(0x00, 0x04, KEY_F10)
Jagan Teki5cc21182020-04-28 15:30:17 +053022 MATRIX_KEY(0x00, 0x05, KEY_RO)
Simon Glassb1397a32014-12-04 06:36:28 -070023 MATRIX_KEY(0x00, 0x06, KEY_N)
24 MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
25 MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
26
27 MATRIX_KEY(0x01, 0x01, KEY_ESC)
28 MATRIX_KEY(0x01, 0x02, KEY_F4)
29 MATRIX_KEY(0x01, 0x03, KEY_G)
30 MATRIX_KEY(0x01, 0x04, KEY_F7)
31 MATRIX_KEY(0x01, 0x06, KEY_H)
32 MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
33 MATRIX_KEY(0x01, 0x09, KEY_F9)
34 MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
Jagan Teki5cc21182020-04-28 15:30:17 +053035 MATRIX_KEY(0x01, 0x0c, KEY_HENKAN)
Simon Glassb1397a32014-12-04 06:36:28 -070036
37 MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
38 MATRIX_KEY(0x02, 0x01, KEY_TAB)
39 MATRIX_KEY(0x02, 0x02, KEY_F3)
40 MATRIX_KEY(0x02, 0x03, KEY_T)
41 MATRIX_KEY(0x02, 0x04, KEY_F6)
42 MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
43 MATRIX_KEY(0x02, 0x06, KEY_Y)
44 MATRIX_KEY(0x02, 0x07, KEY_102ND)
45 MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
46 MATRIX_KEY(0x02, 0x09, KEY_F8)
Jagan Teki5cc21182020-04-28 15:30:17 +053047 MATRIX_KEY(0x02, 0x0a, KEY_YEN)
Simon Glassb1397a32014-12-04 06:36:28 -070048
49 MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
50 MATRIX_KEY(0x03, 0x02, KEY_F2)
51 MATRIX_KEY(0x03, 0x03, KEY_5)
52 MATRIX_KEY(0x03, 0x04, KEY_F5)
53 MATRIX_KEY(0x03, 0x06, KEY_6)
54 MATRIX_KEY(0x03, 0x08, KEY_MINUS)
Jagan Teki5cc21182020-04-28 15:30:17 +053055 MATRIX_KEY(0x03, 0x09, KEY_F13)
Simon Glassb1397a32014-12-04 06:36:28 -070056 MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
Jagan Teki5cc21182020-04-28 15:30:17 +053057 MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN)
Simon Glassb1397a32014-12-04 06:36:28 -070058
59 MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
60 MATRIX_KEY(0x04, 0x01, KEY_A)
61 MATRIX_KEY(0x04, 0x02, KEY_D)
62 MATRIX_KEY(0x04, 0x03, KEY_F)
63 MATRIX_KEY(0x04, 0x04, KEY_S)
64 MATRIX_KEY(0x04, 0x05, KEY_K)
65 MATRIX_KEY(0x04, 0x06, KEY_J)
66 MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
67 MATRIX_KEY(0x04, 0x09, KEY_L)
68 MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
69 MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
70
71 MATRIX_KEY(0x05, 0x01, KEY_Z)
72 MATRIX_KEY(0x05, 0x02, KEY_C)
73 MATRIX_KEY(0x05, 0x03, KEY_V)
74 MATRIX_KEY(0x05, 0x04, KEY_X)
75 MATRIX_KEY(0x05, 0x05, KEY_COMMA)
76 MATRIX_KEY(0x05, 0x06, KEY_M)
77 MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
78 MATRIX_KEY(0x05, 0x08, KEY_SLASH)
79 MATRIX_KEY(0x05, 0x09, KEY_DOT)
80 MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
81
82 MATRIX_KEY(0x06, 0x01, KEY_1)
83 MATRIX_KEY(0x06, 0x02, KEY_3)
84 MATRIX_KEY(0x06, 0x03, KEY_4)
85 MATRIX_KEY(0x06, 0x04, KEY_2)
86 MATRIX_KEY(0x06, 0x05, KEY_8)
87 MATRIX_KEY(0x06, 0x06, KEY_7)
88 MATRIX_KEY(0x06, 0x08, KEY_0)
89 MATRIX_KEY(0x06, 0x09, KEY_9)
90 MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
91 MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
92 MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
93
94 MATRIX_KEY(0x07, 0x01, KEY_Q)
95 MATRIX_KEY(0x07, 0x02, KEY_E)
96 MATRIX_KEY(0x07, 0x03, KEY_R)
97 MATRIX_KEY(0x07, 0x04, KEY_W)
98 MATRIX_KEY(0x07, 0x05, KEY_I)
99 MATRIX_KEY(0x07, 0x06, KEY_U)
100 MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
101 MATRIX_KEY(0x07, 0x08, KEY_P)
102 MATRIX_KEY(0x07, 0x09, KEY_O)
103 MATRIX_KEY(0x07, 0x0b, KEY_UP)
104 MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
105 >;
106 };
107};