blob: d885a5ecd22dd5efb488e8a6163139e6b69297d2 [file] [log] [blame]
Heinrich Schuchardta34f8932020-09-29 03:56:20 +02001// SPDX-License-Identifier: GPL-2.0-only
Simon Glass73f220c2015-03-26 09:29:39 -06002/*
3 * Keyboard dts fragment for devices that use cros-ec-keyboard
4 *
5 * Copyright (c) 2014 Google, Inc
6 *
Heinrich Schuchardta34f8932020-09-29 03:56:20 +02007 * This file is taken from Linux
8 * arch/arm/boot/dts/cros-ec-keyboard.dtsi.
9 *
10 * A duplicate KEY_BACKSLASH key had to be removed.
11 */
Simon Glass73f220c2015-03-26 09:29:39 -060012
13#include <dt-bindings/input/input.h>
14
15&cros_ec {
16 keyboard-controller {
17 compatible = "google,cros-ec-keyb";
18 keypad,num-rows = <8>;
19 keypad,num-columns = <13>;
20 google,needs-ghost-filter;
21
22 linux,keymap = <
23 MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
24 MATRIX_KEY(0x00, 0x02, KEY_F1)
25 MATRIX_KEY(0x00, 0x03, KEY_B)
26 MATRIX_KEY(0x00, 0x04, KEY_F10)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020027 MATRIX_KEY(0x00, 0x05, KEY_RO)
Simon Glass73f220c2015-03-26 09:29:39 -060028 MATRIX_KEY(0x00, 0x06, KEY_N)
29 MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
30 MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
31
32 MATRIX_KEY(0x01, 0x01, KEY_ESC)
33 MATRIX_KEY(0x01, 0x02, KEY_F4)
34 MATRIX_KEY(0x01, 0x03, KEY_G)
35 MATRIX_KEY(0x01, 0x04, KEY_F7)
36 MATRIX_KEY(0x01, 0x06, KEY_H)
37 MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
38 MATRIX_KEY(0x01, 0x09, KEY_F9)
39 MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020040 MATRIX_KEY(0x01, 0x0c, KEY_HENKAN)
Simon Glass73f220c2015-03-26 09:29:39 -060041
42 MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
43 MATRIX_KEY(0x02, 0x01, KEY_TAB)
44 MATRIX_KEY(0x02, 0x02, KEY_F3)
45 MATRIX_KEY(0x02, 0x03, KEY_T)
46 MATRIX_KEY(0x02, 0x04, KEY_F6)
47 MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
48 MATRIX_KEY(0x02, 0x06, KEY_Y)
49 MATRIX_KEY(0x02, 0x07, KEY_102ND)
50 MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
51 MATRIX_KEY(0x02, 0x09, KEY_F8)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020052 MATRIX_KEY(0x02, 0x0a, KEY_YEN)
Simon Glass73f220c2015-03-26 09:29:39 -060053
54 MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
55 MATRIX_KEY(0x03, 0x02, KEY_F2)
56 MATRIX_KEY(0x03, 0x03, KEY_5)
57 MATRIX_KEY(0x03, 0x04, KEY_F5)
58 MATRIX_KEY(0x03, 0x06, KEY_6)
59 MATRIX_KEY(0x03, 0x08, KEY_MINUS)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020060 MATRIX_KEY(0x03, 0x09, KEY_F13)
Simon Glass73f220c2015-03-26 09:29:39 -060061 MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020062 MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN)
Simon Glass73f220c2015-03-26 09:29:39 -060063
64 MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
65 MATRIX_KEY(0x04, 0x01, KEY_A)
66 MATRIX_KEY(0x04, 0x02, KEY_D)
67 MATRIX_KEY(0x04, 0x03, KEY_F)
68 MATRIX_KEY(0x04, 0x04, KEY_S)
69 MATRIX_KEY(0x04, 0x05, KEY_K)
70 MATRIX_KEY(0x04, 0x06, KEY_J)
71 MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
72 MATRIX_KEY(0x04, 0x09, KEY_L)
Heinrich Schuchardta34f8932020-09-29 03:56:20 +020073 /*
74 * Do not map any key twice
75 * MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
76 */
Simon Glass73f220c2015-03-26 09:29:39 -060077 MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
78
79 MATRIX_KEY(0x05, 0x01, KEY_Z)
80 MATRIX_KEY(0x05, 0x02, KEY_C)
81 MATRIX_KEY(0x05, 0x03, KEY_V)
82 MATRIX_KEY(0x05, 0x04, KEY_X)
83 MATRIX_KEY(0x05, 0x05, KEY_COMMA)
84 MATRIX_KEY(0x05, 0x06, KEY_M)
85 MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
86 MATRIX_KEY(0x05, 0x08, KEY_SLASH)
87 MATRIX_KEY(0x05, 0x09, KEY_DOT)
88 MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
89
90 MATRIX_KEY(0x06, 0x01, KEY_1)
91 MATRIX_KEY(0x06, 0x02, KEY_3)
92 MATRIX_KEY(0x06, 0x03, KEY_4)
93 MATRIX_KEY(0x06, 0x04, KEY_2)
94 MATRIX_KEY(0x06, 0x05, KEY_8)
95 MATRIX_KEY(0x06, 0x06, KEY_7)
96 MATRIX_KEY(0x06, 0x08, KEY_0)
97 MATRIX_KEY(0x06, 0x09, KEY_9)
98 MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
99 MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
100 MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
101
102 MATRIX_KEY(0x07, 0x01, KEY_Q)
103 MATRIX_KEY(0x07, 0x02, KEY_E)
104 MATRIX_KEY(0x07, 0x03, KEY_R)
105 MATRIX_KEY(0x07, 0x04, KEY_W)
106 MATRIX_KEY(0x07, 0x05, KEY_I)
107 MATRIX_KEY(0x07, 0x06, KEY_U)
108 MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
109 MATRIX_KEY(0x07, 0x08, KEY_P)
110 MATRIX_KEY(0x07, 0x09, KEY_O)
111 MATRIX_KEY(0x07, 0x0b, KEY_UP)
112 MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
113 >;
114 };
115};