From patchwork Sat Jan 3 18:30:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 5562121 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 03DCE9F2ED for ; Sat, 3 Jan 2015 18:31:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 188E7201FE for ; Sat, 3 Jan 2015 18:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5797201FA for ; Sat, 3 Jan 2015 18:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751326AbbACSa4 (ORCPT ); Sat, 3 Jan 2015 13:30:56 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:47027 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbbACSaz (ORCPT ); Sat, 3 Jan 2015 13:30:55 -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 t03IUTC1005328; Sat, 3 Jan 2015 12:30:29 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t03IUT9B011531; Sat, 3 Jan 2015 12:30:29 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Sat, 3 Jan 2015 12:30:28 -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 t03IUSlB003783; Sat, 3 Jan 2015 12:30:28 -0600 From: Nishanth Menon To: Tony Lindgren , =?UTF-8?q?Beno=C3=AEt=20Cousson?= CC: , , , , Nishanth Menon Subject: [PATCH V3] ARM: dts: am57xx-beagle-x15: Add GPIO controlled fan node Date: Sat, 3 Jan 2015 12:30:26 -0600 Message-ID: <1420309826-7904-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 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 --- V3: Rebased to v3.19-rc1, added label for GPIO fan (for future cooling device reference) V2: https://patchwork.kernel.org/patch/5445111/ V1: https://patchwork.kernel.org/patch/5444911/ Enable and disable can be controlled by (post the RPM, it finds closest match - even a 1 will do) echo '13000' > /sys/class/hwmon/hwmon0/fan1_target and echo '0' > /sys/class/hwmon/hwmon0/fan1_target Test log: http://slexy.org/view/s2T0ajh46z requires CONFIG_GPIO_PALMAS and CONFIG_SENSORS_GPIO_FAN to be operational Applies on v3.19-rc1 arch/arm/boot/dts/am57xx-beagle-x15.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 6c2e8e4..c171720 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts @@ -80,6 +80,14 @@ default-state = "off"; }; }; + + gpio_fan: gpio_fan { + /* Based on 5v 500mA AFB02505HHB */ + compatible = "gpio-fan"; + gpios = <&tps659038_gpio 1 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = <0 0 + 13000 1>; + }; }; &dra7_pmx_core { @@ -394,6 +402,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 {