diff options
-rw-r--r-- | board/peppy/board.c | 2 | ||||
-rw-r--r-- | board/peppy/board.h | 3 | ||||
-rw-r--r-- | chip/lm4/pwm_fan.c | 4 | ||||
-rw-r--r-- | include/config.h | 3 |
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 |