summaryrefslogtreecommitdiff
path: root/board/glados/board.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-05-01 10:45:48 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-12 02:50:16 +0000
commit3a36c29e6756231f2fb1fdd26447d519cbd5b26a (patch)
tree755259729196337d469bfef0d0a4ff16fc809276 /board/glados/board.c
parenta394302e4aef0349c30cbccf6b4623bcb3dda5bf (diff)
downloadchrome-ec-stabilize-7060.B.tar.gz
glados: Initial mainboard commitstabilize-7060.B
BUG=chrome-os-partner:39510 TEST=Compile Only BRANCH=None Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: If470b00fec56db0884dbd4c9974140951fc214fd Reviewed-on: https://chromium-review.googlesource.com/268780 Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board/glados/board.c')
-rw-r--r--board/glados/board.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/board/glados/board.c b/board/glados/board.c
new file mode 100644
index 0000000000..f16da8ed05
--- /dev/null
+++ b/board/glados/board.c
@@ -0,0 +1,82 @@
+/* Copyright 2015 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Glados board-specific configuration */
+
+#include "button.h"
+#include "charger.h"
+#include "extpower.h"
+#include "gpio.h"
+#include "i2c.h"
+#include "lid_switch.h"
+#include "motion_sense.h"
+#include "power.h"
+#include "power_button.h"
+#include "switch.h"
+#include "util.h"
+
+#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP)
+#define GPIO_KB_OUTPUT (GPIO_ODR_HIGH)
+
+/* Exchange status with PD MCU. */
+static void pd_mcu_interrupt(enum gpio_signal signal)
+{
+}
+
+void vbus0_evt(enum gpio_signal signal)
+{
+}
+
+void vbus1_evt(enum gpio_signal signal)
+{
+}
+
+void usb0_evt(enum gpio_signal signal)
+{
+}
+
+void usb1_evt(enum gpio_signal signal)
+{
+}
+
+#include "gpio_list.h"
+
+/* power signal list. Must match order of enum power_signal. */
+const struct power_signal_info power_signal_list[] = {
+ {GPIO_RSMRST_L_PGOOD, 1, "RSMRST_N_PWRGD"},
+ {GPIO_PCH_SLP_S0_L, 1, "SLP_S0_DEASSERTED"},
+ {GPIO_PCH_SLP_S3_L, 1, "SLP_S3_DEASSERTED"},
+ {GPIO_PCH_SLP_S4_L, 1, "SLP_S4_DEASSERTED"},
+ {GPIO_PCH_SLP_SUS_L, 1, "SLP_SUS_DEASSERTED"},
+ {GPIO_PMIC_DPWROK, 1, "PMIC_DPWROK"},
+};
+BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
+
+const struct i2c_port_t i2c_ports[] = {
+ {"batt", MEC1322_I2C0_0, 100, GPIO_I2C0_0_SCL, GPIO_I2C0_0_SDA},
+ {"muxes", MEC1322_I2C0_0, 100, GPIO_I2C0_1_SCL, GPIO_I2C0_1_SDA},
+ {"pd_mcu", MEC1322_I2C1, 1000, GPIO_I2C1_SCL, GPIO_I2C1_SDA},
+ {"sensors", MEC1322_I2C2, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA },
+ {"pmic", MEC1322_I2C3, 400, GPIO_I2C3_SCL, GPIO_I2C3_SDA },
+};
+const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
+
+/**
+ * Discharge battery when on AC power for factory test.
+ */
+int board_discharge_on_ac(int enable)
+{
+ return charger_discharge_on_ac(enable);
+}
+
+struct motion_sensor_t motion_sensors[] = {
+
+};
+const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);
+
+const struct button_config buttons[CONFIG_BUTTON_COUNT] = {
+ { 0 },
+ { 0 },
+};