Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 The Chromium OS Authors. All rights reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Stefan Reinauer | a7198b3 | 2012-12-11 16:00:47 -0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #ifndef PARROT_EC_H |
| 17 | #define PARROT_EC_H |
| 18 | |
| 19 | #define EC_SCI_GPI 7 /* GPIO7 is EC_SCI# */ |
| 20 | #define EC_SMI_GPI 8 /* GPIO8 is EC_SMI# */ |
| 21 | #define EC_LID_GPI 15 /* GPIO15 is EC_LID_OUT# */ |
| 22 | |
| 23 | /* EC SMI sources TODO - make defines |
| 24 | * No event 80h |
| 25 | */ |
| 26 | #define EC_NO_EVENT 0x80 |
| 27 | /* |
| 28 | * DTS temperature update A0h |
| 29 | * Decrease brightness event A1h |
| 30 | * Increase brightness event A2h |
| 31 | * Lid open A5h |
| 32 | * Lid closed A6h |
| 33 | */ |
| 34 | #define EC_LID_CLOSE 0xA6 |
| 35 | /* Bluetooth wake up event A9h |
| 36 | * Display change (LCD , CRT) ACh |
| 37 | * Cpu fast event ADh |
| 38 | * Cpu slow event ADh |
| 39 | * Battery life in critical low state (LLB) B2h |
| 40 | */ |
| 41 | #define EC_BATTERY_CRITICAL 0xB2 |
| 42 | /* |
| 43 | * Battery life in low power state (LB) B3h |
| 44 | * Battery Plug-In B5h |
| 45 | * Docked in request BAh |
| 46 | * Undock request BBh |
| 47 | * Power button pressed C2h |
| 48 | * AC power plug-in C7h |
| 49 | * AC power plug-out C8h |
| 50 | * Modem Ring In CAh |
| 51 | * PME signal active CEh |
| 52 | * Acer Hotkey Function – Make event D5h |
| 53 | * Acer Hotkey Function – Break event D6h |
| 54 | */ |
| 55 | |
| 56 | #ifndef __ACPI__ |
| 57 | extern void parrot_ec_init(void); |
| 58 | u8 parrot_rev(void); |
| 59 | int parrot_ec_running_ro(void); |
| 60 | #endif |
| 61 | |
| 62 | #endif // PARROT_EC_H |