cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

cros-ec-keyboard.h (3316B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 * This header provides the constants of the standard Chrome OS key matrix
      4 * for cros-ec keyboard-controller bindings.
      5 *
      6 * Copyright (c) 2021 Google, Inc
      7 */
      8
      9#ifndef _CROS_EC_KEYBOARD_H
     10#define _CROS_EC_KEYBOARD_H
     11
     12#define CROS_STD_TOP_ROW_KEYMAP	\
     13	MATRIX_KEY(0x00, 0x02, KEY_F1)	\
     14	MATRIX_KEY(0x03, 0x02, KEY_F2)	\
     15	MATRIX_KEY(0x02, 0x02, KEY_F3)	\
     16	MATRIX_KEY(0x01, 0x02, KEY_F4)	\
     17	MATRIX_KEY(0x03, 0x04, KEY_F5)	\
     18	MATRIX_KEY(0x02, 0x04, KEY_F6)	\
     19	MATRIX_KEY(0x01, 0x04, KEY_F7)	\
     20	MATRIX_KEY(0x02, 0x09, KEY_F8)	\
     21	MATRIX_KEY(0x01, 0x09, KEY_F9)	\
     22	MATRIX_KEY(0x00, 0x04, KEY_F10)
     23
     24#define CROS_STD_MAIN_KEYMAP	\
     25	MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)	\
     26	MATRIX_KEY(0x00, 0x03, KEY_B)		\
     27	MATRIX_KEY(0x00, 0x05, KEY_RO)		\
     28	MATRIX_KEY(0x00, 0x06, KEY_N)		\
     29	MATRIX_KEY(0x00, 0x08, KEY_EQUAL)	\
     30	MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)	\
     31	MATRIX_KEY(0x01, 0x01, KEY_ESC)		\
     32	MATRIX_KEY(0x01, 0x03, KEY_G)		\
     33	MATRIX_KEY(0x01, 0x06, KEY_H)		\
     34	MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)	\
     35	MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)	\
     36	MATRIX_KEY(0x01, 0x0c, KEY_HENKAN)	\
     37						\
     38	MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)	\
     39	MATRIX_KEY(0x02, 0x01, KEY_TAB)		\
     40	MATRIX_KEY(0x02, 0x03, KEY_T)		\
     41	MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)	\
     42	MATRIX_KEY(0x02, 0x06, KEY_Y)		\
     43	MATRIX_KEY(0x02, 0x07, KEY_102ND)	\
     44	MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)	\
     45	MATRIX_KEY(0x02, 0x0a, KEY_YEN)		\
     46						\
     47	MATRIX_KEY(0x03, 0x00, KEY_LEFTMETA)	\
     48	MATRIX_KEY(0x03, 0x01, KEY_GRAVE)	\
     49	MATRIX_KEY(0x03, 0x03, KEY_5)		\
     50	MATRIX_KEY(0x03, 0x06, KEY_6)		\
     51	MATRIX_KEY(0x03, 0x08, KEY_MINUS)	\
     52	MATRIX_KEY(0x03, 0x09, KEY_SLEEP)	\
     53	MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)	\
     54	MATRIX_KEY(0x03, 0x0c, KEY_MUHENKAN)	\
     55						\
     56	MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)	\
     57	MATRIX_KEY(0x04, 0x01, KEY_A)		\
     58	MATRIX_KEY(0x04, 0x02, KEY_D)		\
     59	MATRIX_KEY(0x04, 0x03, KEY_F)		\
     60	MATRIX_KEY(0x04, 0x04, KEY_S)		\
     61	MATRIX_KEY(0x04, 0x05, KEY_K)		\
     62	MATRIX_KEY(0x04, 0x06, KEY_J)		\
     63	MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)	\
     64	MATRIX_KEY(0x04, 0x09, KEY_L)		\
     65	MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)	\
     66	MATRIX_KEY(0x04, 0x0b, KEY_ENTER)	\
     67						\
     68	MATRIX_KEY(0x05, 0x01, KEY_Z)		\
     69	MATRIX_KEY(0x05, 0x02, KEY_C)		\
     70	MATRIX_KEY(0x05, 0x03, KEY_V)		\
     71	MATRIX_KEY(0x05, 0x04, KEY_X)		\
     72	MATRIX_KEY(0x05, 0x05, KEY_COMMA)	\
     73	MATRIX_KEY(0x05, 0x06, KEY_M)		\
     74	MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)	\
     75	MATRIX_KEY(0x05, 0x08, KEY_SLASH)	\
     76	MATRIX_KEY(0x05, 0x09, KEY_DOT)		\
     77	MATRIX_KEY(0x05, 0x0b, KEY_SPACE)	\
     78						\
     79	MATRIX_KEY(0x06, 0x01, KEY_1)		\
     80	MATRIX_KEY(0x06, 0x02, KEY_3)		\
     81	MATRIX_KEY(0x06, 0x03, KEY_4)		\
     82	MATRIX_KEY(0x06, 0x04, KEY_2)		\
     83	MATRIX_KEY(0x06, 0x05, KEY_8)		\
     84	MATRIX_KEY(0x06, 0x06, KEY_7)		\
     85	MATRIX_KEY(0x06, 0x08, KEY_0)		\
     86	MATRIX_KEY(0x06, 0x09, KEY_9)		\
     87	MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)	\
     88	MATRIX_KEY(0x06, 0x0b, KEY_DOWN)	\
     89	MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)	\
     90						\
     91	MATRIX_KEY(0x07, 0x01, KEY_Q)		\
     92	MATRIX_KEY(0x07, 0x02, KEY_E)		\
     93	MATRIX_KEY(0x07, 0x03, KEY_R)		\
     94	MATRIX_KEY(0x07, 0x04, KEY_W)		\
     95	MATRIX_KEY(0x07, 0x05, KEY_I)		\
     96	MATRIX_KEY(0x07, 0x06, KEY_U)		\
     97	MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)	\
     98	MATRIX_KEY(0x07, 0x08, KEY_P)		\
     99	MATRIX_KEY(0x07, 0x09, KEY_O)		\
    100	MATRIX_KEY(0x07, 0x0b, KEY_UP)		\
    101	MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
    102
    103#endif /* _CROS_EC_KEYBOARD_H */