summaryrefslogtreecommitdiff
path: root/src/mainboard/google/parrot/ec.h
blob: 2763977b5624fd35246dbaa9a7605d64726500f2 (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
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#ifndef PARROT_EC_H
#define PARROT_EC_H

#define EC_SCI_GPI      7   /* GPIO7 is EC_SCI# */
#define EC_SMI_GPI      8   /* GPIO8 is EC_SMI# */
#define EC_LID_GPI     15   /* GPIO15 is EC_LID_OUT# */

/* EC SMI sources TODO - make defines
 * No event  80h
*/
#define EC_NO_EVENT 0x80
/*
 * DTS temperature update  A0h
 * Decrease brightness event  A1h
 * Increase brightness event  A2h
 * Lid open  A5h
 * Lid closed  A6h
 */
#define EC_LID_CLOSE 0xA6
 /* Bluetooth wake up event  A9h
 * Display change (LCD , CRT)  ACh
 * Cpu fast event  ADh
 * Cpu slow event  ADh
 * Battery life in critical low state (LLB) B2h
 */
#define EC_BATTERY_CRITICAL 0xB2
/*
 * Battery life in low power state (LB) B3h
 * Battery Plug-In  B5h
 * Docked in request  BAh
 * Undock request  BBh
 * Power button pressed  C2h
 * AC power plug-in  C7h
 * AC power plug-out  C8h
 * Modem Ring In  CAh
 * PME signal active  CEh
 * Acer Hotkey Function - Make event D5h
 * Acer Hotkey Function - Break event D6h
 */

#ifndef __ACPI__
extern void parrot_ec_init(void);
u8 parrot_rev(void);
int parrot_ec_running_ro(void);
#endif

#endif // PARROT_EC_H