summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-08-22 08:25:11 -0700
committerChromeBot <chrome-bot@google.com>2013-08-22 09:09:19 -0700
commit239681b0e263ed709d02a0b969d34894f6ac9013 (patch)
tree95e48368db21362598ac0aca2b4e92fd645f1e3b
parent019254c7eb831636ccaefe306b4448b785614847 (diff)
downloadchrome-ec-239681b0e263ed709d02a0b969d34894f6ac9013.tar.gz
Add fan power enable GPIO for Peppy
BUG=chrome-os-partner:21847 BRANCH=peppy TEST=Manual. Check state of GPIO_P5000_FAN_EN with lid open and lid closed. Can also check with meter via TP109. Original-Change-Id: I8a64c14d53dd84a5d586c0abb04ccb71de0e78b3 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/65674 (cherry picked from commit 39421848c6bfe0881fc8e6eca3a5656a91662638) Change-Id: I6137650ccd33edd85ad213d7b57aa032e9c0ab2c Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/66648
-rw-r--r--board/peppy/board.c2
-rw-r--r--board/peppy/board.h3
-rw-r--r--chip/lm4/pwm_fan.c4
-rw-r--r--include/config.h3
4 files changed, 10 insertions, 2 deletions
diff --git a/board/peppy/board.c b/board/peppy/board.c
index 22f921a254..82c4585c88 100644
--- a/board/peppy/board.c
+++ b/board/peppy/board.c
@@ -75,13 +75,13 @@ const struct gpio_info gpio_list[] = {
/* Outputs; all unasserted by default except for reset signals */
{"CPU_PROCHOT", LM4_GPIO_B, (1<<1), GPIO_OUT_LOW, NULL},
{"PP1350_EN", LM4_GPIO_H, (1<<5), GPIO_OUT_LOW, NULL},
- {"PP3300_DSW_GATED_EN", LM4_GPIO_J, (1<<3), GPIO_OUT_LOW, NULL},
{"PP3300_DX_EN", LM4_GPIO_J, (1<<2), 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},
{"SUSP_VR_EN", LM4_GPIO_C, (1<<7), GPIO_OUT_LOW, NULL},
{"VCORE_EN", LM4_GPIO_C, (1<<5), GPIO_OUT_LOW, NULL},
{"PP5000_EN", LM4_GPIO_H, (1<<7), GPIO_OUT_LOW, NULL},
+ {"PP5000_FAN_EN", LM4_GPIO_J, (1<<3), 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},
{"CHARGE_L", LM4_GPIO_E, (1<<6), GPIO_OUT_LOW, NULL},
diff --git a/board/peppy/board.h b/board/peppy/board.h
index 120404f11d..ecf22fba7c 100644
--- a/board/peppy/board.h
+++ b/board/peppy/board.h
@@ -28,6 +28,7 @@
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_X86
#define CONFIG_PWM_FAN
+#define CONFIG_PWM_FAN_EN_GPIO GPIO_PP5000_FAN_EN
#define CONFIG_TEMP_SENSOR
#define CONFIG_TEMP_SENSOR_G781
#define CONFIG_USB_PORT_POWER_DUMB
@@ -93,13 +94,13 @@ enum gpio_signal {
/* Outputs */
GPIO_CPU_PROCHOT, /* Force CPU to think it's overheated */
GPIO_PP1350_EN, /* Enable 1.35V supply */
- GPIO_PP3300_DSW_GATED_EN, /* Enable DSW rails */
GPIO_PP3300_DX_EN, /* Enable power to lots of peripherals */
GPIO_PP3300_LTE_EN, /* Enable LTE radio */
GPIO_PP3300_WLAN_EN, /* Enable WiFi power */
GPIO_SUSP_VR_EN, /* Enable 1.05V regulator */
GPIO_VCORE_EN, /* Stuffing option - not connected */
GPIO_PP5000_EN, /* Enable 5V supply */
+ GPIO_PP5000_FAN_EN, /* Enable fan power rail */
GPIO_SYS_PWROK, /* EC thinks everything is up and ready */
GPIO_WLAN_OFF_L, /* Disable WiFi radio */
GPIO_CHARGE_L, /* Allow battery to charge when on AC */
diff --git a/chip/lm4/pwm_fan.c b/chip/lm4/pwm_fan.c
index 525b9daca2..604b7735ec 100644
--- a/chip/lm4/pwm_fan.c
+++ b/chip/lm4/pwm_fan.c
@@ -48,6 +48,10 @@ void pwm_enable_fan(int enable)
LM4_FAN_FANCTL |= (1 << FAN_CH_CPU);
else
LM4_FAN_FANCTL &= ~(1 << FAN_CH_CPU);
+
+#ifdef CONFIG_PWM_FAN_EN_GPIO
+ gpio_set_level(CONFIG_PWM_FAN_EN_GPIO, enable);
+#endif /* CONFIG_PWM_FAN_EN_GPIO */
}
int pwm_get_fan_enabled(void)
diff --git a/include/config.h b/include/config.h
index ae16f52924..32b70f1576 100644
--- a/include/config.h
+++ b/include/config.h
@@ -469,6 +469,9 @@
/* Compile support for PWM control of cooling fans */
#undef CONFIG_PWM_FAN
+/* Name of active high GPIO to control power to the cooling fan */
+#undef CONFIG_PWM_FAN_EN_GPIO
+
/* Compile support for PWM output to keyboard backlight */
#undef CONFIG_PWM_KBLIGHT