From patchwork Tue Mar 28 13:09:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 9649383 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 019E460113 for ; Tue, 28 Mar 2017 13:09:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E618027F9F for ; Tue, 28 Mar 2017 13:09:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAC9C28334; Tue, 28 Mar 2017 13:09:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2457127F9F for ; Tue, 28 Mar 2017 13:09:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753100AbdC1NJv (ORCPT ); Tue, 28 Mar 2017 09:09:51 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36304 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752650AbdC1NJm (ORCPT ); Tue, 28 Mar 2017 09:09:42 -0400 Received: by mail-wr0-f196.google.com with SMTP id u1so22674535wra.3; Tue, 28 Mar 2017 06:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=aC7HOBaM5BHJ/KQwMRi05OYhvx+c9LAPsRqgDmuEQbc=; b=SsDJhy+wMUaWccv7PDTGqG11jzB+XHtl+qCEmywxGjboXKD3L2drDRxomYTYcRH5/C Dx3/N3LQLE9OEo9H7XRqlSe/lEYMxy8yCdiVnrZ2+wLhK0O9LibiC9VT+BQC2jrDmA92 Zn6s9HB5JGOVlHM7w8zxThMgzNspYXdg2Gs5rUkqc+AZsrC0eBWo5jmg8TkDPqIH8ObU HZDH82olUt7kONTOWrzVA5e6J4Gjlc7fNRJ9C7gXhpamBz0/Y8143RClR5vE1gCBMk9E H2yAeXAgifhm23v9ICUd3tbrvRj2gHaErRsndTZ3n4tvp+ayEolmhGwYQnI9iiw4Qkyv gbhA== 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; bh=aC7HOBaM5BHJ/KQwMRi05OYhvx+c9LAPsRqgDmuEQbc=; b=c64NRQ9AK9YnEQsvKnq473Pb/os2ePqUsTngwXLrSY5Wjx6/jkcygevUaWXD5evqHb 6Mm1Sbs4uNk+smPkzcN8uUSoQd+CTY/Sl6tuR1IXbVI20F22ZY8tBYCD1bQC/DDTVC0M fWIYJ1Yo76LDkYpJN8XJaMmOE3w4+pHtI619aujSRlFM8SnkI2/TdlY1f3/aiH7hyCo0 bOMtWpd8kHbwPncEtt8B7S56c9fcrVA/UWR4h2dDpc1FyR2t8bwd1NpuXf/ZcVnR7ROs edoxx2XzKXaTN31x0bfZmX4DvSk4TyDrUQn34j/h8mkf7ZImNRu6HCo2M5ySY719qD24 uo5g== X-Gm-Message-State: AFeK/H1UjFrGwMRp94YpV/q043DVM7mBFSoV148W45mgrdHfM0hk2ay3Dx//BUqfpWsAHg== X-Received: by 10.28.157.140 with SMTP id g134mr14976658wme.81.1490706564378; Tue, 28 Mar 2017 06:09:24 -0700 (PDT) Received: from development1.visionsystems.de (mail.visionsystems.de. [213.209.99.202]) by smtp.gmail.com with ESMTPSA id y190sm3563265wmy.15.2017.03.28.06.09.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Mar 2017 06:09:23 -0700 (PDT) From: yegorslists@googlemail.com To: linux-omap@vger.kernel.org Cc: devicetree@vger.kernel.org, tony@atomide.com, robh+dt@kernel.org, Yegor Yefremov Subject: [PATCH v2] ARM: dts: am335x-baltos: add LED support Date: Tue, 28 Mar 2017 15:09:16 +0200 Message-Id: <1490706556-30046-1-git-send-email-yegorslists@googlemail.com> X-Mailer: git-send-email 2.1.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yegor Yefremov All three devices provide GPIO based LEDs named power, wlan and app. Place LEDs definition into a separate dtsi file as not all devices including am335x-baltos.dtsi have the same LED layout. Signed-off-by: Yegor Yefremov --- Changes v1 -> v2: - move LEDs definition to a separate dtsi file (Tony Lindgren) arch/arm/boot/dts/am335x-baltos-ir2110.dts | 1 + arch/arm/boot/dts/am335x-baltos-ir3220.dts | 1 + arch/arm/boot/dts/am335x-baltos-ir5221.dts | 1 + arch/arm/boot/dts/am335x-baltos-leds.dtsi | 50 ++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 arch/arm/boot/dts/am335x-baltos-leds.dtsi diff --git a/arch/arm/boot/dts/am335x-baltos-ir2110.dts b/arch/arm/boot/dts/am335x-baltos-ir2110.dts index 501c752..75de1e7 100644 --- a/arch/arm/boot/dts/am335x-baltos-ir2110.dts +++ b/arch/arm/boot/dts/am335x-baltos-ir2110.dts @@ -14,6 +14,7 @@ /dts-v1/; #include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" / { model = "OnRISC Baltos iR 2110"; diff --git a/arch/arm/boot/dts/am335x-baltos-ir3220.dts b/arch/arm/boot/dts/am335x-baltos-ir3220.dts index 19f53b8..46df1b2 100644 --- a/arch/arm/boot/dts/am335x-baltos-ir3220.dts +++ b/arch/arm/boot/dts/am335x-baltos-ir3220.dts @@ -14,6 +14,7 @@ /dts-v1/; #include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" / { model = "OnRISC Baltos iR 3220"; diff --git a/arch/arm/boot/dts/am335x-baltos-ir5221.dts b/arch/arm/boot/dts/am335x-baltos-ir5221.dts index 2b9d7f4..5d56355 100644 --- a/arch/arm/boot/dts/am335x-baltos-ir5221.dts +++ b/arch/arm/boot/dts/am335x-baltos-ir5221.dts @@ -14,6 +14,7 @@ /dts-v1/; #include "am335x-baltos.dtsi" +#include "am335x-baltos-leds.dtsi" / { model = "OnRISC Baltos iR 5221"; diff --git a/arch/arm/boot/dts/am335x-baltos-leds.dtsi b/arch/arm/boot/dts/am335x-baltos-leds.dtsi new file mode 100644 index 0000000..3ab1767 --- /dev/null +++ b/arch/arm/boot/dts/am335x-baltos-leds.dtsi @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +/* + * VScom OnRISC + * http://www.vscom.de + */ + +/*#include "am33xx.dtsi"*/ + +/ { + leds { + pinctrl-names = "default"; + pinctrl-0 = <&user_leds>; + + compatible = "gpio-leds"; + + power { + label = "onrisc:red:power"; + linux,default-trigger = "default-on"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + wlan { + label = "onrisc:blue:wlan"; + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + app { + label = "onrisc:green:app"; + gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; + +&am33xx_pinmux { + user_leds: pinmux_user_leds { + pinctrl-single,pins = < + AM33XX_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_col.gpio3_0 PWR LED */ + AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txd3.gpio0_16 WLAN LED */ + AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txd2.gpio0_17 APP LED */ + >; + }; +};