summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------board/glados/Makefile1
-rw-r--r--board/glados/battery.c27
-rw-r--r--board/glados/board.c82
-rw-r--r--board/glados/board.h78
-rw-r--r--board/glados/build.mk14
-rw-r--r--board/glados/ec.tasklist27
-rw-r--r--board/glados/gpio.inc157
-rw-r--r--board/glados/led.c30
-rw-r--r--board/glados/lfw/gpio.inc19
-rw-r--r--power/skylake.c2
10 files changed, 436 insertions, 1 deletions
diff --git a/board/glados/Makefile b/board/glados/Makefile
new file mode 120000
index 0000000000..94aaae2c4d
--- /dev/null
+++ b/board/glados/Makefile
@@ -0,0 +1 @@
+../../Makefile \ No newline at end of file
diff --git a/board/glados/battery.c b/board/glados/battery.c
new file mode 100644
index 0000000000..2311120145
--- /dev/null
+++ b/board/glados/battery.c
@@ -0,0 +1,27 @@
+/* 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.
+ *
+ * Battery pack vendor provided charging profile
+ */
+
+#include "battery.h"
+
+/* Battery info for BQ40Z55 */
+static const struct battery_info info = {
+ .voltage_max = 8700, /* mV */
+ .voltage_normal = 7600,
+ .voltage_min = 6000,
+ .precharge_current = 256, /* mA */
+ .start_charging_min_c = 0,
+ .start_charging_max_c = 46,
+ .charging_min_c = 0,
+ .charging_max_c = 60,
+ .discharging_min_c = 0,
+ .discharging_max_c = 60,
+};
+
+const struct battery_info *battery_get_info(void)
+{
+ return &info;
+}
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 },
+};
diff --git a/board/glados/board.h b/board/glados/board.h
new file mode 100644
index 0000000000..cfa44e425d
--- /dev/null
+++ b/board/glados/board.h
@@ -0,0 +1,78 @@
+/* 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 configuration */
+
+#ifndef __BOARD_H
+#define __BOARD_H
+
+/* Optional features */
+#define CONFIG_BATTERY_SMART
+#define CONFIG_BUTTON_COUNT 2
+
+#define CONFIG_CHARGER
+#define CONFIG_CHARGER_V2
+#define CONFIG_CHARGER_BQ24773
+#define CONFIG_CHARGER_ILIM_PIN_DISABLED
+#define CONFIG_CHARGER_SENSE_RESISTOR 10
+#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
+#define CONFIG_CHARGER_INPUT_CURRENT 2240
+#define CONFIG_CHARGER_DISCHARGE_ON_AC
+
+#define CONFIG_CHIPSET_SKYLAKE
+#define CONFIG_CLOCK_CRYSTAL
+#define CONFIG_EXTPOWER_GPIO
+#define CONFIG_I2C
+#define CONFIG_KEYBOARD_PROTOCOL_8042
+#define CONFIG_LED_COMMON
+#define CONFIG_LID_SWITCH
+#define CONFIG_POWER_BUTTON
+#define CONFIG_POWER_BUTTON_X86
+#define CONFIG_POWER_COMMON
+#define CONFIG_SCI_GPIO GPIO_PCH_SCI_L
+
+#define CONFIG_SPI_PORT 1
+#define CONFIG_SPI_CS_GPIO GPIO_PVT_CS0
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_SIZE 524288
+#define CONFIG_SPI_FLASH_W25Q64
+
+/*
+ * Allow dangerous commands.
+ * TODO(shawnn): Remove this config before production.
+ */
+#define CONFIG_SYSTEM_UNLOCKED
+#define CONFIG_WATCHDOG_HELP
+
+/* I2C ports */
+#define I2C_PORT_BATTERY MEC1322_I2C0_0
+#define I2C_PORT_CHARGER MEC1322_I2C0_0
+#define I2C_PORT_PD_MCU MEC1322_I2C1
+#define I2C_PORT_ALS MEC1322_I2C2
+#define I2C_PORT_ACCEL MEC1322_I2C2
+
+#ifndef __ASSEMBLER__
+
+#include "gpio_signal.h"
+#include "registers.h"
+
+/* power signal definitions */
+enum power_signal {
+ X86_RSMRST_L_PWRGD = 0,
+ X86_SLP_S0_DEASSERTED,
+ X86_SLP_S3_DEASSERTED,
+ X86_SLP_S4_DEASSERTED,
+ X86_SLP_SUS_DEASSERTED,
+ X86_PMIC_DPWROK,
+
+ /* Number of X86 signals */
+ POWER_SIGNAL_COUNT
+};
+
+/* Discharge battery when on AC power for factory test. */
+int board_discharge_on_ac(int enable);
+#endif /* !__ASSEMBLER__ */
+
+#endif /* __BOARD_H */
diff --git a/board/glados/build.mk b/board/glados/build.mk
new file mode 100644
index 0000000000..51dfe75e15
--- /dev/null
+++ b/board/glados/build.mk
@@ -0,0 +1,14 @@
+# -*- makefile -*-
+# 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.
+#
+# Board specific files build
+#
+
+# the IC is SMSC MEC1322 / external SPI is 512KB / external clock is crystal
+CHIP:=mec1322
+CHIP_SPI_SIZE_KB:=512
+
+board-y=board.o led.o
+board-$(CONFIG_BATTERY_SMART)+=battery.o
diff --git a/board/glados/ec.tasklist b/board/glados/ec.tasklist
new file mode 100644
index 0000000000..06f8db5965
--- /dev/null
+++ b/board/glados/ec.tasklist
@@ -0,0 +1,27 @@
+/* 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.
+ */
+
+/*
+ * List of enabled tasks in the priority order
+ *
+ * The first one has the lowest priority.
+ *
+ * For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and
+ * TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries,
+ * where :
+ * 'n' in the name of the task
+ * 'r' in the main routine of the task
+ * 'd' in an opaque parameter passed to the routine at startup
+ * 's' is the stack size in bytes; must be a multiple of 8
+ */
+#define CONFIG_TASK_LIST \
+ TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \
+ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \
+ TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \
+ TASK_NOTEST(KEYPROTO, keyboard_protocol_task, NULL, TASK_STACK_SIZE) \
+ TASK_ALWAYS(HOSTCMD, host_command_task, NULL, TASK_STACK_SIZE) \
+ TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \
+ TASK_ALWAYS(POWERBTN, power_button_task, NULL, TASK_STACK_SIZE) \
+ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE)
diff --git a/board/glados/gpio.inc b/board/glados/gpio.inc
new file mode 100644
index 0000000000..9801b60a27
--- /dev/null
+++ b/board/glados/gpio.inc
@@ -0,0 +1,157 @@
+/* -*- mode:c -*-
+ *
+ * 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.
+ */
+
+GPIO_INT(LID_OPEN, PORT(2), 7, GPIO_INT_BOTH_DSLEEP, lid_interrupt)
+GPIO_INT(AC_PRESENT, PORT(3), 0, GPIO_INT_BOTH_DSLEEP, extpower_interrupt)
+GPIO_INT(WP_L, PORT(3), 3, GPIO_INT_BOTH, switch_interrupt)
+/* Buffered power button input from PMIC / ROP_EC_PWR_BTN_L_R */
+GPIO_INT(POWER_BUTTON_L, PORT(3), 5, GPIO_INT_BOTH_DSLEEP, power_button_interrupt)
+/* RSMRST from PMIC */
+GPIO_INT(RSMRST_L_PGOOD, PORT(6), 3, GPIO_INT_BOTH, power_signal_interrupt)
+GPIO_INT(PCH_SLP_S4_L, PORT(20), 0, GPIO_INT_BOTH_DSLEEP | GPIO_PULL_UP, power_signal_interrupt)
+GPIO_INT(PCH_SLP_S3_L, PORT(20), 6, GPIO_INT_BOTH_DSLEEP | GPIO_PULL_UP, power_signal_interrupt)
+GPIO_INT(PCH_SLP_S0_L, PORT(21), 1, GPIO_INT_BOTH | GPIO_PULL_UP, power_signal_interrupt)
+GPIO_INT(PCH_SLP_SUS_L, PORT(1), 2, GPIO_INT_BOTH | GPIO_PULL_UP, power_signal_interrupt)
+GPIO_INT(VOLUME_UP_L, PORT(3), 1, GPIO_INT_FALLING | GPIO_PULL_UP, button_interrupt)
+GPIO_INT(VOLUME_DOWN_L, PORT(4), 7, GPIO_INT_FALLING | GPIO_PULL_UP, button_interrupt)
+GPIO_INT(PMIC_INT_L, PORT(5), 0, GPIO_INT_FALLING, power_signal_interrupt)
+GPIO_INT(PD_MCU_INT, PORT(12), 2, GPIO_INT_RISING | GPIO_INT_DSLEEP, pd_mcu_interrupt)
+GPIO_INT(USB_C0_VBUS_WAKE, PORT(15), 2, GPIO_INT_BOTH, vbus1_evt)
+GPIO_INT(USB_C1_VBUS_WAKE, PORT(12), 3, GPIO_INT_BOTH, vbus0_evt)
+GPIO_INT(USB_C0_BC12_INT_L, PORT(12), 4, GPIO_INT_FALLING, usb0_evt)
+GPIO_INT(USB_C1_BC12_INT_L, PORT(14), 5, GPIO_INT_FALLING, usb1_evt)
+/* Delayed PWR_OK from PMIC */
+GPIO_INT(PMIC_DPWROK, PORT(5), 5, GPIO_INT_BOTH, power_signal_interrupt)
+
+GPIO(PD_RST_L, PORT(13), 0, GPIO_ODR_HIGH)
+GPIO(USB2_OTG_ID, PORT(1), 3, GPIO_ODR_LOW)
+/* I2C pins - these will be reconfigured for alternate function below */
+GPIO(I2C0_0_SCL, PORT(1), 5, GPIO_INPUT)
+GPIO(I2C0_0_SDA, PORT(1), 6, GPIO_INPUT)
+GPIO(I2C0_1_SCL, PORT(13), 4, GPIO_INPUT)
+GPIO(I2C0_1_SDA, PORT(1), 7, GPIO_INPUT)
+GPIO(I2C1_SCL, PORT(2), 2, GPIO_INPUT)
+GPIO(I2C1_SDA, PORT(2), 3, GPIO_INPUT)
+GPIO(I2C2_SCL, PORT(2), 0, GPIO_INPUT)
+GPIO(I2C2_SDA, PORT(2), 1, GPIO_INPUT)
+GPIO(I2C3_SCL, PORT(2), 4, GPIO_INPUT)
+GPIO(I2C3_SDA, PORT(2), 5, GPIO_INPUT)
+GPIO(PCH_SCI_L, PORT(2), 6, GPIO_ODR_HIGH)
+/* KB BL PWM, only connected to TP */
+GPIO(PWM_KBLIGHT, PORT(3), 4, GPIO_OUT_LOW)
+GPIO(USB1_ENABLE, PORT(3), 6, GPIO_OUT_HIGH)
+GPIO(USB2_ENABLE, PORT(6), 7, GPIO_OUT_HIGH)
+GPIO(ENTERING_RW, PORT(4), 1, GPIO_OUT_LOW)
+GPIO(PCH_SMI_L, PORT(4), 4, GPIO_ODR_HIGH)
+GPIO(PCH_PWRBTN_L, PORT(4), 5, GPIO_OUTPUT)
+GPIO(USB_C0_DP_HPD, PORT(4), 6, GPIO_OUT_LOW)
+GPIO(USB_C1_DP_HPD, PORT(5), 1, GPIO_OUT_LOW)
+GPIO(CPU_PROCHOT, PORT(5), 2, GPIO_OUT_LOW)
+GPIO(ENABLE_TOUCHPAD, PORT(5), 3, GPIO_OUT_LOW)
+GPIO(USB_PD_WAKE, PORT(6), 0, GPIO_OUT_LOW)
+/* When asserted, ME does not lock security descriptor */
+GPIO(PCH_SEC_DISABLE_L, PORT(6), 5, GPIO_OUT_HIGH)
+GPIO(PCH_WAKE_L, PORT(6), 6, GPIO_ODR_HIGH)
+GPIO(EC_FAN1_TTACH, PORT(10), 5, GPIO_INPUT)
+/* Fan PWM output - NC / testing only */
+GPIO(EC_FAN1_PWM, PORT(13), 6, GPIO_OUT_LOW)
+GPIO(PCH_ACOK, PORT(11), 0, GPIO_OUT_LOW)
+/* Interrupts from accelerometer / gyro -- not yet implemented */
+GPIO(ACCEL1_INT, PORT(16), 1, GPIO_INPUT)
+GPIO(ACCEL2_INT, PORT(12), 7, GPIO_INPUT)
+GPIO(ACCEL3_INT, PORT(14), 7, GPIO_INPUT)
+GPIO(ACCEL4_INT, PORT(13), 3, GPIO_INPUT)
+GPIO(WLAN_OFF_L, PORT(13), 2, GPIO_OUT_LOW)
+/* RCIN# line to PCH for 8042 emulation */
+GPIO(PCH_RCIN_L, PORT(13), 5, GPIO_ODR_HIGH)
+GPIO(USB2_OTG_VBUSSENSE, PORT(14), 0, GPIO_OUT_LOW)
+/* Sensor input for KB PROX - UNUSED */
+GPIO(KB_PROX_INT_L, PORT(14), 1, GPIO_INPUT)
+GPIO(PCH_RSMRST_L, PORT(14), 3, GPIO_OUT_LOW)
+/* prochot input from devices */
+GPIO(PLATFORM_EC_PROCHOT, PORT(15), 1, GPIO_INPUT)
+GPIO(USB_C0_5V_EN, PORT(15), 4, GPIO_OUT_LOW)
+GPIO(USB_C1_5V_EN, PORT(20), 4, GPIO_OUT_LOW)
+GPIO(USB_C0_CHARGE_EN_L, PORT(6), 4, GPIO_OUT_LOW)
+GPIO(USB_C1_CHARGE_EN_L, PORT(15), 7, GPIO_OUT_LOW)
+GPIO(PP1800_DX_SENSOR_EN, PORT(1), 1, GPIO_OUT_LOW)
+GPIO(PP1800_DX_AUDIO_EN, PORT(16), 0, GPIO_OUT_LOW)
+GPIO(PCH_RTCRST, PORT(16), 3, GPIO_OUT_LOW)
+/* From lid sensor */
+GPIO(TABLET_MODE, PORT(20), 1, GPIO_INPUT)
+GPIO(ENABLE_BACKLIGHT, PORT(20), 2, GPIO_OUT_HIGH)
+GPIO(PP3300_WLAN_EN, PORT(20), 3, GPIO_OUT_LOW)
+GPIO(EC_WAKE_CLK, PORT(21), 0, GPIO_INPUT)
+GPIO(BOARD_ID0, PORT(0), 6, GPIO_INPUT)
+GPIO(BOARD_ID1, PORT(0), 7, GPIO_INPUT)
+GPIO(BOARD_ID2, PORT(1), 0, GPIO_INPUT)
+GPIO(KBD_KSO2, PORT(10), 1, GPIO_OUT_LOW)
+GPIO(PVT_CS0, PORT(14), 6, GPIO_ODR_HIGH)
+GPIO(SYS_RESET_L, PORT(12), 1, GPIO_ODR_HIGH)
+
+/* Alternate functions GPIO definitions */
+
+/* GPIO162(UART_RX), GPIO165(UART_TX) */
+ALTERNATE(PORT(16), 0x24, 1, MODULE_UART, 0)
+
+/* KB pins */
+/* KB ROW - GPIO000-GPIO005 */
+ALTERNATE(PORT(0), 0x3f, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_OUTPUT)
+/* KB ROW - GPIO100-GPIO104, GPIO106-GPIO107 */
+ALTERNATE(PORT(10), 0xdf, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_OUTPUT)
+/* KB COL - GPIO032 */
+ALTERNATE(PORT(3), 0x04, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_INPUT)
+/* KB COL - GPIO040, GPIO42-GPIO43 */
+ALTERNATE(PORT(4), 0x0d, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_INPUT)
+/* KB COL - GPIO125-GPIO126 */
+ALTERNATE(PORT(12), 0x60, 2, MODULE_KEYBOARD_SCAN, GPIO_KB_INPUT)
+/* KB COL - GPIO142, GPIO144 */
+ALTERNATE(PORT(14), 0x14, 3, MODULE_KEYBOARD_SCAN, GPIO_KB_INPUT)
+
+/* LPC pins */
+/* LPC_CLK_RUN_L - GPIO014 */
+ALTERNATE(PORT(1), 0x10, 1, MODULE_LPC, 0)
+/* LAD[0:3] - GPIO111-GPIO114, SERIRQ - GPIO115, PCI_CLK - GPIO117 */
+ALTERNATE(PORT(11), 0xbe, 1, MODULE_LPC, 0)
+/* LRESET# - GPIO116 */
+ALTERNATE(PORT(11), 0x40, 1, MODULE_LPC, GPIO_INT_BOTH)
+/* LFRAME# - GPIO120 */
+ALTERNATE(PORT(12), 0x01, 1, MODULE_LPC, 0)
+
+/* SPI pins */
+/* MOSI - GPIO054 */
+ALTERNATE(PORT(5), 0x10, 1, MODULE_SPI, 0)
+/* PVT_CS0# - GPIO146 */
+ALTERNATE(PORT(14), 0x40, 1, MODULE_SPI, 0)
+/* MISO - GPIO164 */
+ALTERNATE(PORT(16), 0x10, 1, MODULE_SPI, 0)
+/* PVT_SCLK - GPIO153 */
+ALTERNATE(PORT(15), 0x08, 1, MODULE_SPI, 0)
+/* SHD_CS0# - GPIO150. Shared SPI chip select */
+ALTERNATE(PORT(15), 0x00, 1, MODULE_SPI, 0)
+
+/* I2C pins */
+/* I2C0_0 CLK - GPIO015, I2C0_0 DAT - GPIO016, I2C0_1 DAT - GPIO017 */
+ALTERNATE(PORT(1), 0xe0, 2, MODULE_I2C, GPIO_ODR_HIGH)
+/* I2C{1,2,3} CLK / DAT - GPIO020-GPIO025*/
+ALTERNATE(PORT(2), 0x3f, 2, MODULE_I2C, GPIO_ODR_HIGH)
+/* I2C0_1 CLK - GPIO134 */
+ALTERNATE(PORT(13), 0x10, 2, MODULE_I2C, GPIO_ODR_HIGH)
+
+/* ADC pins */
+/* ADC0 - GPIO056 / EC_BATT_TMP. ADC1 - GPIO057 / PPVAR_BOOSTIN_SENSE */
+ALTERNATE(PORT(5), 0xc0, 1, MODULE_ADC, GPIO_ANALOG)
+/* ADC3 - GPIO061 / IADP_ACMON_BMON. ADC4 - GPIO062 / PMON_PSYS */
+ALTERNATE(PORT(6), 0x06, 1, MODULE_ADC, GPIO_ANALOG)
+
+/* LED1 - GPIO155. LED2 - GPIO156 */
+ALTERNATE(PORT(15), 0x60, 2, MODULE_POWER_LED, 0)
+
+/* VCC1_RST# - GPIO131 */
+ALTERNATE(PORT(13), 0x02, 1, MODULE_PMU, 0)
+/* nRESET_OUT - GPIO121 */
+ALTERNATE(PORT(12), 0x02, 1, MODULE_PMU, 0)
diff --git a/board/glados/led.c b/board/glados/led.c
new file mode 100644
index 0000000000..a34cbb69fe
--- /dev/null
+++ b/board/glados/led.c
@@ -0,0 +1,30 @@
+/* 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.
+ *
+ * Power and battery LED control for Glados.
+ */
+
+#include "battery.h"
+#include "charge_state.h"
+#include "chipset.h"
+#include "ec_commands.h"
+#include "gpio.h"
+#include "hooks.h"
+#include "host_command.h"
+#include "led_common.h"
+#include "util.h"
+
+const enum ec_led_id supported_led_ids[] = {
+ EC_LED_ID_POWER_LED, EC_LED_ID_BATTERY_LED};
+
+const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids);
+
+int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness)
+{
+ return EC_SUCCESS;
+}
+
+void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range)
+{
+}
diff --git a/board/glados/lfw/gpio.inc b/board/glados/lfw/gpio.inc
new file mode 100644
index 0000000000..f7500436eb
--- /dev/null
+++ b/board/glados/lfw/gpio.inc
@@ -0,0 +1,19 @@
+/* -*- mode:c -*-
+ *
+ * Copyright (c) 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.
+ *
+ * Minimal set of GPIOs needed for LFW loader
+ */
+
+/* SPI PVT chip select */
+GPIO(PVT_CS0, PORT(14), 6, GPIO_ODR_HIGH)
+
+/* Alternate functions GPIO definition */
+/* UART */
+ALTERNATE(PORT(16), 0x24, 1, MODULE_UART, 0)
+/* SPI pins */
+ALTERNATE(PORT(5), 0x10, 1, MODULE_SPI, 0)
+ALTERNATE(PORT(16), 0x10, 1, MODULE_SPI, 0)
+ALTERNATE(PORT(15), 0x08, 1, MODULE_SPI, 0)
diff --git a/power/skylake.c b/power/skylake.c
index 1dce1fde4f..202dce628f 100644
--- a/power/skylake.c
+++ b/power/skylake.c
@@ -231,7 +231,7 @@ enum power_state power_handle_state(enum power_state state)
gpio_set_level(GPIO_ENABLE_TOUCHPAD, 0);
- return power_get_pause_in_s5() ? POWER_S5 : POWER_S5G3;
+ return POWER_S5G3;
case POWER_S5G3:
gpio_set_level(GPIO_PCH_RSMRST_L, 0);