diff mbox series

[U-Boot,v1,2/9] apalis-tk1: set apalis gpio 8 aka fan_en

Message ID 20190731120445.2459-3-igor.opaniuk@gmail.com
State Superseded
Delegated to: Tom Warren
Headers show
Series apalis-tk1: fixes/updates for v2019.10 | expand

Commit Message

Igor Opaniuk July 31, 2019, 12:04 p.m. UTC
From: Igor Opaniuk <igor.opaniuk@toradex.com>

Make sure the Apalis GPIO 8 aka FAN_EN is on when using Apalis TK1
modules.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
---

 board/toradex/apalis-tk1/apalis-tk1.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Oleksandr Suvorov July 31, 2019, 1:02 p.m. UTC | #1
On Wed, Jul 31, 2019 at 3:07 PM Igor Opaniuk <igor.opaniuk@gmail.com> wrote:
>
> From: Igor Opaniuk <igor.opaniuk@toradex.com>
>
> Make sure the Apalis GPIO 8 aka FAN_EN is on when using Apalis TK1
> modules.
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
> Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

> ---
>
>  board/toradex/apalis-tk1/apalis-tk1.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
> index b87e9e7a3e..d57c5042dd 100644
> --- a/board/toradex/apalis-tk1/apalis-tk1.c
> +++ b/board/toradex/apalis-tk1/apalis-tk1.c
> @@ -19,6 +19,7 @@
>
>  #define LAN_DEV_OFF_N  TEGRA_GPIO(O, 6)
>  #define LAN_RESET_N    TEGRA_GPIO(S, 2)
> +#define FAN_EN         TEGRA_GPIO(DD, 2)
>  #define LAN_WAKE_N     TEGRA_GPIO(O, 5)
>  #ifdef CONFIG_APALIS_TK1_PCIE_EVALBOARD_INIT
>  #define PEX_PERST_N    TEGRA_GPIO(DD, 1) /* Apalis GPIO7 */
> @@ -241,6 +242,15 @@ void tegra_pcie_board_port_reset(struct tegra_pcie_port *port)
>  }
>  #endif /* CONFIG_PCI_TEGRA */
>
> +/*
> + * Enable/start PWM CPU fan
> + */
> +void start_cpu_fan(void)
> +{
> +       gpio_request(FAN_EN, "FAN_EN");
> +       gpio_direction_output(FAN_EN, 1);
> +}
> +
>  /*
>   * Backlight off before OS handover
>   */
> --
> 2.17.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
diff mbox series

Patch

diff --git a/board/toradex/apalis-tk1/apalis-tk1.c b/board/toradex/apalis-tk1/apalis-tk1.c
index b87e9e7a3e..d57c5042dd 100644
--- a/board/toradex/apalis-tk1/apalis-tk1.c
+++ b/board/toradex/apalis-tk1/apalis-tk1.c
@@ -19,6 +19,7 @@ 
 
 #define LAN_DEV_OFF_N	TEGRA_GPIO(O, 6)
 #define LAN_RESET_N	TEGRA_GPIO(S, 2)
+#define FAN_EN		TEGRA_GPIO(DD, 2)
 #define LAN_WAKE_N	TEGRA_GPIO(O, 5)
 #ifdef CONFIG_APALIS_TK1_PCIE_EVALBOARD_INIT
 #define PEX_PERST_N	TEGRA_GPIO(DD, 1) /* Apalis GPIO7 */
@@ -241,6 +242,15 @@  void tegra_pcie_board_port_reset(struct tegra_pcie_port *port)
 }
 #endif /* CONFIG_PCI_TEGRA */
 
+/*
+ * Enable/start PWM CPU fan
+ */
+void start_cpu_fan(void)
+{
+	gpio_request(FAN_EN, "FAN_EN");
+	gpio_direction_output(FAN_EN, 1);
+}
+
 /*
  * Backlight off before OS handover
  */