From patchwork Fri Dec 5 17:32:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 5444911 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E2E4BEEA8 for ; Fri, 5 Dec 2014 17:33:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB1CB20218 for ; Fri, 5 Dec 2014 17:33:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DBC8A201F5 for ; Fri, 5 Dec 2014 17:33:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbaLERcq (ORCPT ); Fri, 5 Dec 2014 12:32:46 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:41711 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbaLERcp (ORCPT ); Fri, 5 Dec 2014 12:32:45 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id sB5HWKqI020566; Fri, 5 Dec 2014 11:32:20 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id sB5HWKux003136; Fri, 5 Dec 2014 11:32:20 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Fri, 5 Dec 2014 11:32:20 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id sB5HWKCr018322; Fri, 5 Dec 2014 11:32:20 -0600 From: Nishanth Menon To: Tony Lindgren , =?UTF-8?q?Beno=C3=AEt=20Cousson?= CC: , , , , , "Menon, Nishanth" Subject: [PATCH] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node Date: Fri, 5 Dec 2014 11:32:18 -0600 Message-ID: <1417800739-13146-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Menon, Nishanth" TPS gpio now controls a 5v 500mA TL5209 regulator which may be supply a fan (such as AFB02505HHB) over J1 connector for various purposes. Provide device tree node to enable the same. Signed-off-by: Nishanth Menon --- Depends on the following: https://patchwork.kernel.org/patch/5439201/ https://patchwork.kernel.org/patch/5439191/ enable and disable can be controlled by echo '1' > /sys/class/hwmon/hwmon0/fan1_target and echo '0' > /sys/class/hwmon/hwmon0/fan1_target requires CONFIG_GPIO_PALMAS and CONFIG_SENSORS_GPIO_FAN to be operational Applies on https://git.kernel.org/cgit/linux/kernel/git/tmlind/linux-omap.git/log/?h=omap-for-v3.19/dt-v2 arch/arm/boot/dts/am57xx-beagle-x15.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 49edbda..7fe82ef 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts @@ -80,6 +80,15 @@ default-state = "off"; }; }; + + gpio_fan { + /* Based on 5v 500mA AFB02505HHB */ + compatible = "gpio-fan"; + pinctrl-names = "default"; + gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = <0 0 + 13000 1>; + }; }; &dra7_pmx_core { @@ -314,6 +323,12 @@ wakeup-source; ti,palmas-long-press-seconds = <12>; }; + + tps659038_gpio: tps659038_gpio { + compatible = "ti,palmas-gpio"; + gpio-controller; + #gpio-cells = <2>; + }; }; tmp102: tmp102@48 {