summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-05-09 17:42:50 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-05-12 20:02:34 +0000
commit3f94eba930ceea47b845acf632660140fa8948d9 (patch)
treeb74e35e96b2174ce8f07685aa1629aa4d8518d33
parent9e0cd7b1628d9185be8020203dbe6ced5d6c6f78 (diff)
downloadchrome-ec-3f94eba930ceea47b845acf632660140fa8948d9.tar.gz
Samus: Update configuration for proto1.9
Start of changes to Samus' board.h and board.c to support proto1.9 BUG=chrome-os-partner:28721 BRANCH=ToT TEST=make buildall Change-Id: I70590c1f9845430801a6c2939ac92be289750ca3 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/199242 Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--board/samus/board.c16
-rw-r--r--board/samus/board.h27
-rw-r--r--driver/battery/samus.c1
3 files changed, 26 insertions, 18 deletions
diff --git a/board/samus/board.c b/board/samus/board.c
index ba1f42e8ad..607db79044 100644
--- a/board/samus/board.c
+++ b/board/samus/board.c
@@ -69,21 +69,26 @@ const struct gpio_info gpio_list[] = {
switch_interrupt},
{"PCH_BL_EN", LM4_GPIO_M, (1<<3), GPIO_INT_RISING,
backlight_interrupt},
- {"CAPSENSE_INT_L", LM4_GPIO_N, (1<<0), GPIO_INT_FALLING,
- capsense_interrupt},
{"JTAG_TCK", LM4_GPIO_C, (1<<0), GPIO_DEFAULT,
jtag_interrupt},
{"UART0_RX", LM4_GPIO_A, (1<<0), GPIO_PULL_UP|
GPIO_INT_BOTH_DSLEEP,
uart_deepsleep_interrupt},
+ /* This will become an interrupt, once we have support for it. */
+ {"ACCEL_INT", LM4_GPIO_F, (1<<7), GPIO_INPUT, NULL},
+ /* This connection exists but may not be configured */
+#ifdef CONFIG_CAPSENSE
+ {"CAPSENSE_INT_L", LM4_GPIO_N, (1<<0), GPIO_INT_FALLING,
+ capsense_interrupt},
+#else
+ {"CAPSENSE_INT_L", LM4_GPIO_N, (1<<0), GPIO_INPUT, NULL},
+#endif
/* Other inputs */
{"BOARD_VERSION1", LM4_GPIO_Q, (1<<5), GPIO_INPUT, NULL},
{"BOARD_VERSION2", LM4_GPIO_Q, (1<<6), GPIO_INPUT, NULL},
{"BOARD_VERSION3", LM4_GPIO_Q, (1<<7), GPIO_INPUT, NULL},
{"CPU_PGOOD", LM4_GPIO_C, (1<<4), GPIO_INPUT, NULL},
- {"ONEWIRE", LM4_GPIO_F, (1<<7), GPIO_INPUT, NULL},
- {"THERMAL_DATA_READY_L", LM4_GPIO_B, (1<<0), GPIO_INPUT, NULL},
{"USB1_OC_L", LM4_GPIO_E, (1<<7), GPIO_INPUT, NULL},
{"USB1_STATUS_L", LM4_GPIO_E, (1<<6), GPIO_INPUT, NULL},
{"USB2_OC_L", LM4_GPIO_E, (1<<0), GPIO_INPUT, NULL},
@@ -96,13 +101,14 @@ const struct gpio_info gpio_list[] = {
{"PP3300_DSW_GATED_EN", LM4_GPIO_J, (1<<3), GPIO_OUT_LOW, NULL},
{"PP3300_LTE_EN", LM4_GPIO_D, (1<<2), GPIO_OUT_LOW, NULL},
{"PP3300_WLAN_EN", LM4_GPIO_J, (1<<0), GPIO_OUT_LOW, NULL},
+ {"PP3300_ACCEL_EN", LM4_GPIO_J, (1<<1), GPIO_OUT_LOW, NULL},
{"PP1050_EN", LM4_GPIO_C, (1<<7), GPIO_OUT_LOW, NULL},
{"PP5000_USB_EN", LM4_GPIO_C, (1<<5), GPIO_OUT_LOW, NULL},
{"PP5000_EN", LM4_GPIO_H, (1<<7), GPIO_OUT_LOW, NULL},
{"PP1800_EN", LM4_GPIO_L, (1<<6), GPIO_OUT_LOW, NULL},
{"SYS_PWROK", LM4_GPIO_H, (1<<2), GPIO_OUT_LOW, NULL},
{"WLAN_OFF_L", LM4_GPIO_J, (1<<4), GPIO_OUT_LOW, NULL},
-
+ {"USB_MCU_RST_L", LM4_GPIO_B, (1<<0), GPIO_ODR_HIGH, NULL},
{"ENABLE_BACKLIGHT", LM4_GPIO_M, (1<<7), GPIO_OUT_LOW, NULL},
{"ENABLE_TOUCHPAD", LM4_GPIO_N, (1<<1), GPIO_OUT_LOW, NULL},
{"ENTERING_RW", LM4_GPIO_D, (1<<3), GPIO_OUT_LOW, NULL},
diff --git a/board/samus/board.h b/board/samus/board.h
index d549d58c67..d780ca7150 100644
--- a/board/samus/board.h
+++ b/board/samus/board.h
@@ -18,17 +18,14 @@
#define CONFIG_ALS
#define CONFIG_ALS_ISL29035
#define CONFIG_BOARD_VERSION
-#define CONFIG_CAPSENSE
#define CONFIG_POWER_COMMON
#define CONFIG_CHIPSET_CAN_THROTTLE
#define CONFIG_KEYBOARD_BOARD_CONFIG
#define CONFIG_KEYBOARD_PROTOCOL_8042
-#define CONFIG_LED_DRIVER_DS2413
#define CONFIG_LOW_POWER_IDLE
-#define CONFIG_ONEWIRE
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_X86
-
+/* Note: not CONFIG_BACKLIGHT_LID. It's handled specially for Samus. */
#define CONFIG_BACKLIGHT_REQ_GPIO GPIO_PCH_BL_EN
#define CONFIG_BATTERY_SAMUS
#define CONFIG_CHARGER_PROFILE_OVERRIDE
@@ -36,12 +33,13 @@
#define CONFIG_BATTERY_SMART
#define CONFIG_CHARGER
#define CONFIG_CHARGER_V2
-#define CONFIG_CHARGER_BQ24715
-#define CONFIG_CHARGER_DISCHARGE_ON_AC
-/* 10mOhm sense resitors. */
+#define CONFIG_CHARGER_BQ24773
+/* FIXME(crosbug.com/p/28721): determine correct values for these */
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 10
+/* FIXME(crosbug.com/p/24461): determine correct values for this */
#define CONFIG_CHARGER_INPUT_CURRENT 2000
+#define CONFIG_CHARGER_DISCHARGE_ON_AC
#define CONFIG_FANS 2
#define CONFIG_PECI_TJMAX 100
#define CONFIG_PWM
@@ -56,6 +54,7 @@
#define CONFIG_WIRELESS
#define CONFIG_WIRELESS_SUSPEND \
(EC_WIRELESS_SWITCH_WLAN | EC_WIRELESS_SWITCH_WLAN_POWER)
+/* Do we want EC_WIRELESS_SWITCH_WWAN as well? */
#ifndef __ASSEMBLER__
@@ -64,7 +63,7 @@
#define I2C_PORT_BATTERY 0
#define I2C_PORT_CHARGER 0
#define I2C_PORT_ALS 1
-#define I2C_PORT_CAPSENSE 1
+#define I2C_PORT_ACCEL 1
#define I2C_PORT_LIGHTBAR 1
#define I2C_PORT_THERMAL 5
@@ -75,7 +74,7 @@
/* Host connects to keyboard controller module via LPC */
#define HOST_KB_BUS_LPC
-/* USB ports */
+/* USB ports managed by the EC */
#define USB_PORT_COUNT 2
/* GPIO signal definitions. */
@@ -96,17 +95,16 @@ enum gpio_signal {
GPIO_RECOVERY_L, /* Recovery signal from servo */
GPIO_WP_L, /* Write protect input */
GPIO_PCH_BL_EN, /* PCH backlight input */
- GPIO_CAPSENSE_INT_L, /* Capsense interrupt */
GPIO_JTAG_TCK, /* JTAG clock input */
GPIO_UART0_RX, /* UART0 RX input */
+ GPIO_ACCEL_INT, /* Combined accelerometer input */
+ GPIO_CAPSENSE_INT_L, /* Capsense interrupt input */
/* Other inputs */
GPIO_BOARD_VERSION1, /* Board version stuffing resistor 1 */
GPIO_BOARD_VERSION2, /* Board version stuffing resistor 2 */
GPIO_BOARD_VERSION3, /* Board version stuffing resistor 3 */
GPIO_CPU_PGOOD, /* Power good to the CPU */
- GPIO_ONEWIRE, /* One-wire bus to adapter LED */
- GPIO_THERMAL_DATA_READY_L, /* From thermal sensor */
GPIO_USB1_OC_L, /* USB port overcurrent warning */
GPIO_USB1_STATUS_L, /* USB charger port 1 status output */
GPIO_USB2_OC_L, /* USB port overcurrent warning */
@@ -119,6 +117,7 @@ enum gpio_signal {
GPIO_PP3300_DSW_GATED_EN, /* Enable 3.3V Gated DSW and core VDD */
GPIO_PP3300_LTE_EN, /* Enable LTE radio */
GPIO_PP3300_WLAN_EN, /* Enable WiFi power */
+ GPIO_PP3300_ACCEL_EN, /* Enable Accelerometer power */
GPIO_PP1050_EN, /* Enable 1.05V regulator */
GPIO_PP5000_USB_EN, /* Enable USB power */
GPIO_PP5000_EN, /* Enable 5V supply */
@@ -126,6 +125,7 @@ enum gpio_signal {
GPIO_SYS_PWROK, /* EC thinks everything is up and ready */
GPIO_WLAN_OFF_L, /* Disable WiFi radio */
+ GPIO_USB_MCU_RST_L, /* USB PD MCU reset */
GPIO_ENABLE_BACKLIGHT, /* Enable backlight power */
GPIO_ENABLE_TOUCHPAD, /* Enable touchpad power */
GPIO_ENTERING_RW, /* Indicate when EC is entering RW code */
@@ -236,7 +236,8 @@ enum als_id {
/* Known board versions for system_get_board_version(). */
enum board_version {
BOARD_VERSION_PROTO1 = 0,
- BOARD_VERSION_EVT = 1,
+ BOARD_VERSION_PROTO1B = 1,
+ BOARD_VERSION_PROTO1_9 = 2,
};
/* Wireless signals */
diff --git a/driver/battery/samus.c b/driver/battery/samus.c
index 41519261d8..d0c67146a2 100644
--- a/driver/battery/samus.c
+++ b/driver/battery/samus.c
@@ -51,6 +51,7 @@ const struct battery_info *battery_get_info(void)
* bump it up a little bit every time through the loop until it's where we
* wanted it in the first place.
*/
+/* FIXME(crosbug.com/p/24461): determine correct values for this */
#define MAX_INPUT_CURRENT 3200
#define INPUT_CURRENT_INCR 64