summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Warren <twarren@nvidia.com>2015-02-20 12:22:22 -0700
committerTom Warren <twarren@nvidia.com>2015-08-05 15:22:51 -0700
commit66999892b24d3443b24118a6ea400115360e1eb2 (patch)
treea19df64fe16582674aed1277d89f3d1441c0cb9c
parente7436f609c918b7d6fd8e1d2c7b0b85efe9af26f (diff)
downloadu-boot-imx-66999892b24d3443b24118a6ea400115360e1eb2.zip
u-boot-imx-66999892b24d3443b24118a6ea400115360e1eb2.tar.gz
u-boot-imx-66999892b24d3443b24118a6ea400115360e1eb2.tar.bz2
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>
-rw-r--r--arch/arm/mach-tegra/board2.c3
-rw-r--r--board/nvidia/p2571/p2571.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 36bcfb0..2927b4e 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -60,6 +60,7 @@ __weak void pin_mux_usb(void) {}
__weak void pin_mux_spi(void) {}
__weak void gpio_early_init_uart(void) {}
__weak void pin_mux_display(void) {}
+__weak void start_cpu_fan(void) {}
#if defined(CONFIG_TEGRA_NAND)
__weak void pin_mux_nand(void)
@@ -230,6 +231,8 @@ int board_late_init(void)
setenv("cpu_ns_mode", "");
}
#endif
+ start_cpu_fan();
+
return 0;
}
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 @@ void pinmux_init(void)
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);
+}