blob: ac50e5265b05701508c2f969905c7248d3d429ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/* Copyright 2019 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
* Hammer variants configuration, there should be no/little BOARD_ checks
* in the rest of the files. If this grows out of control, we can create
* variant_*.h files.
*/
#ifndef __CROS_EC_VARIANTS_H
#define __CROS_EC_VARIANTS_H
/* USB ID */
#ifdef BOARD_HAMMER
#define CONFIG_USB_PID 0x5022
#elif defined(BOARD_MAGNEMITE)
#define CONFIG_USB_PID 0x503d
#elif defined(BOARD_MASTERBALL)
#define CONFIG_USB_PID 0x503c
#elif defined(BOARD_STAFF)
#define CONFIG_USB_PID 0x502b
#elif defined(BOARD_WAND)
#define CONFIG_USB_PID 0x502d
#elif defined(BOARD_WHISKERS)
#define CONFIG_USB_PID 0x5030
#else
#error "Invalid board"
#endif
#ifdef SECTION_IS_RW
/* Touchpad interface, firmware size and physical dimension. */
#if defined(BOARD_HAMMER) || defined(BOARD_WAND)
#define HAS_I2C_TOUCHPAD
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3207
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1783
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1018 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 566 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (48*1024)
#elif defined(BOARD_MAGNEMITE)
#define HAS_NO_TOUCHPAD
#elif defined(BOARD_MASTERBALL)
#define HAS_I2C_TOUCHPAD
/* TODO(b:138422450): Insert correct dimensions. */
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3206
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1832
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1017 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 581 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024)
#elif defined(BOARD_STAFF)
#define HAS_I2C_TOUCHPAD
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 3206
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1832
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 511
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1017 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 581 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (56*1024)
#elif defined(BOARD_WHISKERS)
#define HAS_SPI_TOUCHPAD
#define HAS_EN_PP3300_TP_ACTIVE_HIGH
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_X 2160
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_Y 1573
#define CONFIG_USB_HID_TOUCHPAD_LOGICAL_MAX_PRESSURE 255
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_X 1030 /* tenth of mm */
#define CONFIG_USB_HID_TOUCHPAD_PHYSICAL_MAX_Y 750 /* tenth of mm */
#define CONFIG_TOUCHPAD_VIRTUAL_SIZE (CONFIG_UPDATE_PDU_SIZE + 128*1024)
/* Enable to send heatmap to AP */
#define CONFIG_USB_ISOCHRONOUS
#else
#error "No touchpad information for board."
#endif
/* Assistant key */
#if defined(BOARD_HAMMER) || defined(BOARD_WAND) || defined(BOARD_WHISKERS)
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_ASSISTANT_KEY
#endif
/* Backlight */
#if defined(BOARD_HAMMER) || defined(BOARD_STAFF) || \
defined(BOARD_WAND) || defined(BOARD_WHISKERS)
/*
* Even with this option, we detect the backlight presence using a PU/PD on the
* PWM pin. Not defining this totally disables support.
*/
#define HAS_BACKLIGHT
#ifdef BOARD_WHISKERS
#define CONFIG_LED_DRIVER_LM3630A
#endif
#ifdef BOARD_STAFF
#define KBLIGHT_PWM_FREQ 100 /* Hz */
#else
#define KBLIGHT_PWM_FREQ 50000 /* Hz */
#endif
#endif /* BOARD_HAMMER/WAND/WHISKERS */
/* GMR sensor for tablet mode detection */
#if defined(BOARD_MASTERBALL) || defined(BOARD_WHISKERS)
#define CONFIG_GMR_TABLET_MODE
#endif
#endif /* SECTION_IS_RW */
#endif /* __CROS_EC_VARIANTS_H */
|