]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
T210: P2571: Turn CPU fan on
authorTom Warren <twarren@nvidia.com>
Fri, 20 Feb 2015 19:22:22 +0000 (12:22 -0700)
committerLothar Waßmann <LW@KARO-electronics.de>
Thu, 10 Sep 2015 06:00:59 +0000 (08:00 +0200)
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>
arch/arm/mach-tegra/board2.c
board/nvidia/p2571/p2571.c

index 36bcfb04c02149ae7b21cf9972c013ed1521e92b..2927b4ed1269058765cd6daa0bd28e00dd6289cd 100644 (file)
@@ -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;
 }
 
index 842242cf5cddbeed9b16da1514e674a8d27779f3..d80a7d0d3e319277b86610b0503a2b1ce03a9d4a 100644 (file)
@@ -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);
+}