summaryrefslogtreecommitdiff
path: root/src/mainboard/google/parrot/ec.h
blob: e389a77602215c7c06782766d038134f0a9415de (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
/*
 * This file is part of the coreboot project.
 *
 * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#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