summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-02-16 00:49:30 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-02-16 02:52:29 +0000
commit4778d823be038848e2d412628c897e7a865af9ba (patch)
tree4652d9dc4f01886ef53c7a2588d494eebc858b8c /board
parent05f0eb3005934c1d6593066555e175d96148953f (diff)
downloadchrome-ec-4778d823be038848e2d412628c897e7a865af9ba.tar.gz
stm32l: add a simple power sequencing for Daisy board
This should be enough to switch on the board from either the power button or the EC console. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=None TEST=run Daisy firmware on Discovery board with logic analyzer attached to GPIO pins. With an added task to simulate PMIC startup and AP startup, check the timing chart looks good. Change-Id: I5dfeab05d0481d121ddacb36b69a542cc1bd428c
Diffstat (limited to 'board')
-rw-r--r--board/daisy/board.c9
-rw-r--r--board/daisy/ec.tasklist1
2 files changed, 7 insertions, 3 deletions
diff --git a/board/daisy/board.c b/board/daisy/board.c
index 8c5804b0a3..bbca1bd26c 100644
--- a/board/daisy/board.c
+++ b/board/daisy/board.c
@@ -10,12 +10,15 @@
#include "registers.h"
#include "util.h"
+/* GPIO interrupt handlers prototypes */
+void gaia_power_event(enum gpio_signal signal);
+
/* GPIO signal list. Must match order from enum gpio_signal. */
const struct gpio_info gpio_list[GPIO_COUNT] = {
/* Inputs with interrupt handlers are first for efficiency */
- {"EC_PWRON", GPIO_A, (1<<0), GPIO_INT_BOTH, NULL},
- {"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, NULL},
- {"XPSHOLD", GPIO_A, (1<<11), GPIO_INT_RISING, NULL},
+ {"EC_PWRON", GPIO_A, (1<<0), GPIO_INT_BOTH, gaia_power_event},
+ {"PP1800_LDO2", GPIO_A, (1<<1), GPIO_INT_BOTH, gaia_power_event},
+ {"XPSHOLD", GPIO_A, (1<<11), GPIO_INT_RISING, gaia_power_event},
{"CHARGER_INT", GPIO_B, (1<<0), GPIO_INT_RISING, NULL},
{"LID_OPEN", GPIO_C, (1<<13), GPIO_INT_BOTH, NULL},
/* Other inputs */
diff --git a/board/daisy/ec.tasklist b/board/daisy/ec.tasklist
index 0e5992b96b..6c7049edae 100644
--- a/board/daisy/ec.tasklist
+++ b/board/daisy/ec.tasklist
@@ -15,4 +15,5 @@
*/
#define CONFIG_TASK_LIST \
TASK(WATCHDOG, watchdog_task, NULL) \
+ TASK(GAIAPOWER, gaia_power_task, NULL) \
TASK(CONSOLE, console_task, NULL)