From patchwork Wed Jul 31 12:04:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Opaniuk X-Patchwork-Id: 1139709 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Vwr0rFp0"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45zBxw5g2sz9sMr for ; Wed, 31 Jul 2019 22:07:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 82BABC21DA6; Wed, 31 Jul 2019 12:05:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CA76FC21DE8; Wed, 31 Jul 2019 12:05:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 072EDC21DEC; Wed, 31 Jul 2019 12:05:07 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by lists.denx.de (Postfix) with ESMTPS id 229B2C21DA6 for ; Wed, 31 Jul 2019 12:05:06 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id x1so19486524wrr.9 for ; Wed, 31 Jul 2019 05:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5F1vKc1+/eTzJtklL2gLyDxVA3N3/SWpzOOy4Ynqu2s=; b=Vwr0rFp0diNbCgsmrwFAK6SHJIPu6gdA8/UkWapNRrJQ2NvrHvdAfakPSf17un2Bmp H4NwvioBvVU1Ypptm3COkUnTuSTebGlVljd5aXTcFQOMV0EmEidkGSVWL18/J/BlatGj z3DtpHblQvVh+eWICVusTrO6B6eVrtDRM11ebY6ZQp70N9S5yZzBXrVG2lI0wRsubkPd C67Sz6vCti5NSuFdPdoNmPbddemLfczNXj/IJP4uA/LHjxDdXJ2KwPYFr7onI3NrVHn4 QTn5OFP94tHIoM11tPQrBDHuuQbrlfTccm6cxenItrFtq/L9a8F4t3bUn0hl1Vn1sK6P IRUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5F1vKc1+/eTzJtklL2gLyDxVA3N3/SWpzOOy4Ynqu2s=; b=KXIoVCWRT4qX7idVn3B9/11XSq/EeiVe5bdDckpHJRRYLAw8c0t6BAX7KCnCHPVobI DBvwyOrwLX4P1O3GK9/Ar/gaxqU/+ceOWCghoaMbkq28bgYa868kYIdR456NYO1BqcKQ HB5gqFIhsfNcMKsSZsZx9mDdK2ppa9+kioxuKxbwu/pz+lA/4L6eIQTY8BeOfn08aqae jVf1pU5pVJckhEA+aT6v1VgAe5vhmHafutfA+RcObPSIs8cFMXqM7amtL7ljfl1uWW0Y NnJy05jTbrxWGo7H8hhLn6rzxQ+q4GvYH5s9flmHtmRAlqGQlS2u/G+4GZEMupxMAYSF yBgw== X-Gm-Message-State: APjAAAViIzLOCB4QBGN4Vv7S2WIbppVuZU53KOenpeGIFhGra+M2+C/w AbsxbcgaBMCQq435RiP6aLM2gR81 X-Google-Smtp-Source: APXvYqyqAUVbcAO7YEvyoux9Yl6Zwf+V+CBAK4KQ1xEriRFYn4r6iNCydlqZ9HapDFdKxepnMukgcA== X-Received: by 2002:adf:9bcd:: with SMTP id e13mr31706037wrc.338.1564574705514; Wed, 31 Jul 2019 05:05:05 -0700 (PDT) Received: from localhost ([194.105.145.90]) by smtp.gmail.com with ESMTPSA id g131sm49187719wmf.37.2019.07.31.05.05.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jul 2019 05:05:05 -0700 (PDT) From: Igor Opaniuk To: u-boot@lists.denx.de Date: Wed, 31 Jul 2019 15:04:38 +0300 Message-Id: <20190731120445.2459-3-igor.opaniuk@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190731120445.2459-1-igor.opaniuk@gmail.com> References: <20190731120445.2459-1-igor.opaniuk@gmail.com> Cc: Marcel Ziswiler , Igor Opaniuk , Dominik Sliwa Subject: [U-Boot] [PATCH v1 2/9] apalis-tk1: set apalis gpio 8 aka fan_en X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Igor Opaniuk Make sure the Apalis GPIO 8 aka FAN_EN is on when using Apalis TK1 modules. Signed-off-by: Igor Opaniuk Signed-off-by: Dominik Sliwa Reviewed-by: Oleksandr Suvorov --- 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 */