T210: P2571: Turn CPU fan on
CPU board (E2530) has a fan - turn it on via GPIO to keep
the SoC cool.
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
diff --git a/board/nvidia/p2571/p2571.c b/board/nvidia/p2571/p2571.c
index 842242c..d80a7d0 100644
--- a/board/nvidia/p2571/p2571.c
+++ b/board/nvidia/p2571/p2571.c
@@ -9,6 +9,7 @@
#include <i2c.h>
#include <asm/arch/gpio.h>
#include <asm/arch/pinmux.h>
+#include <asm/gpio.h>
#include "max77620_init.h"
#include "pinmux-config-p2571.h"
@@ -49,3 +50,14 @@
pinmux_config_drvgrp_table(p2571_drvgrps,
ARRAY_SIZE(p2571_drvgrps));
}
+
+/*
+ * Routine: start_cpu_fan
+ * Description: Enable/start PWM CPU fan on P2571
+ */
+void start_cpu_fan(void)
+{
+ /* GPIO_PE4 is PS_VDD_FAN_ENABLE */
+ gpio_request(GPIO_PE4, "FAN_VDD");
+ gpio_direction_output(GPIO_PE4, 1);
+}