From 65873ca934937b414c65876f83bfb3b269594b80 Mon Sep 17 00:00:00 2001 From: Yidi Lin Date: Fri, 31 Jul 2015 17:10:57 +0800 Subject: google/oak: Implement the code which reads GPIOs for ChromeOS. BUG=none BRANCH=none TEST=emerge-oak corebootk Change-Id: Ic1a0d640cac7fd98acd06d619736303fa449c0a1 Signed-off-by: Patrick Georgi Original-Commit-Id: ce465e8cbdf6465c072e476a91a400d78c959218 Original-Change-Id: Iade51db02f45264fdffe387e0563b60e637c0710 Original-Signed-off-by: Yidi Lin Original-Reviewed-on: https://chromium-review.googlesource.com/292674 Original-Reviewed-by: Julius Werner Reviewed-on: https://review.coreboot.org/12606 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/mainboard/google/oak/gpio.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/mainboard/google/oak/gpio.h (limited to 'src/mainboard/google/oak/gpio.h') diff --git a/src/mainboard/google/oak/gpio.h b/src/mainboard/google/oak/gpio.h new file mode 100644 index 0000000000..d319749b8f --- /dev/null +++ b/src/mainboard/google/oak/gpio.h @@ -0,0 +1,40 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2015 MediaTek Inc. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __MAINBOARD_GOOGLE_OAK_GPIO_H__ +#define __MAINBOARD_GOOGLE_OAK_GPIO_H__ +#include + +enum { + LID = PAD_EINT12, + /* Write Protect */ + WRITE_PROTECT = PAD_EINT4, + /* Power button */ + POWER_BUTTON = PAD_EINT14, + /* EC Interrupt */ + EC_IRQ = PAD_EINT0, + /* EC in RW signal */ + EC_IN_RW = PAD_DAIPCMIN, + /* EC AP suspend */ + EC_SUSPEND_L = PAD_KPROW1, +}; + +void setup_chromeos_gpios(void); + +#endif /* __MAINBOARD_GOOGLE_OAK_GPIO_H__ */ -- cgit v1.2.3