From patchwork Thu Jun 4 09:19:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6545051 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@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 DA4499F3D1 for ; Thu, 4 Jun 2015 09:20:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAAC620780 for ; Thu, 4 Jun 2015 09:20:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ED36220782 for ; Thu, 4 Jun 2015 09:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753233AbbFDJUQ (ORCPT ); Thu, 4 Jun 2015 05:20:16 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:36805 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753024AbbFDJTb (ORCPT ); Thu, 4 Jun 2015 05:19:31 -0400 Received: by wibdq8 with SMTP id dq8so118079834wib.1 for ; Thu, 04 Jun 2015 02:19:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fXj5fN78Yq1Md4mlvwlyCRXovq87M6OQoyvuEC6VIYs=; b=CN9eWu9VUiX0OoFq++RzucEGnxQyxFA1eE4SIyO707cA0oqMlTI+Jg9KFSORWncTbF ZYQgqQlXtODr4nWoHnr+igm1kh/bkWT0XEMTX9RSzd5n3gMDWCLpV2v0qsdfOTpCMdhW a0fPvHBIQx2UkBIAsUKtVnS+5R6O6bQ43f/l4ScnGioRLJ2mIQZucC523V4CNzdUS5rg ZyP2IMpqzftPWqBPTGQ3sMdD6mje+T0BUrZ2wtY9HZR1tNaJzjevyOvMr3NX8nyEC1Cg UAHvtPqJiyKxV0GIwzq5YTgB6Q5dPx1n+EO/8Rx45JzRXW8AHLMfpHjT5ICu5UcpPj0+ pbmQ== X-Gm-Message-State: ALoCoQmvSZFSJUFHg238zzDHIg/dGwSF5TqL9Lse2QXcxkTD2Axba5S/IaXw3oRkUvv+j/WpCL/S X-Received: by 10.180.206.229 with SMTP id lr5mr50609530wic.86.1433409569491; Thu, 04 Jun 2015 02:19:29 -0700 (PDT) Received: from mms-0439.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id ex5sm5419213wib.2.2015.06.04.02.19.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jun 2015 02:19:28 -0700 (PDT) From: "Ivan T. Ivanov" To: Kumar Gala , Andy Gross Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Stanimir Varbanov , Srinivas Kandagatla , Olof Johansson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: qcom: Add apq8016-sbc board LED's related device nodes Date: Thu, 4 Jun 2015 12:19:06 +0300 Message-Id: <1433409546-23995-8-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433409546-23995-1-git-send-email-ivan.ivanov@linaro.org> References: <1433409546-23995-1-git-send-email-ivan.ivanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 APQ8016 SBC board have 6 user controllable LED's. Add following devices: LED1 green LED triggered by system heartbeat. LED2 green LED triggered by access to eMMC device. LED3 green LED triggered by access to SD card. LED4 green LED no trigger assigned. LED5 yellow LED triggered by access to WLAN. LED6 blue LED triggered by access to Bluetooth. Signed-off-by: Ivan T. Ivanov --- .../arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 19 ++++++++ arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi | 11 ++--- arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 51 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 8 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi index b568c49..e03c11d 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi @@ -18,4 +18,23 @@ input-disable; }; }; + + pm8916_gpios_leds: pm8916_gpios_leds { + pinconf { + pins = "gpio1", "gpio2"; + function = PMIC_GPIO_FUNC_NORMAL; + output-low; + }; + }; +}; + +&pm8916_mpps { + + pm8916_mpps_leds: pm8916_mpps_leds { + pinconf { + pins = "mpp2", "mpp3"; + function = PMIC_GPIO_FUNC_NORMAL; + output-low; + }; + }; }; diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi index 27087cf..cbeee0b 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc-soc-pins.dtsi @@ -3,14 +3,9 @@ &msmgpio { - soc_gpios_default: default { - usr_led_1_ctrl_default: usr_led_1_ctrl_default { - pins = "gpio21"; - function = "gpio"; - output-low; - }; - usr_led_2_ctrl_default: usr_led_2_ctrl_default { - pins = "gpio120"; + msmgpio_leds: msmgpio_leds { + pinconf { + pins = "gpio21", "gpio120"; function = "gpio"; output-low; }; diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi index 98abece..66804ff 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi @@ -32,5 +32,56 @@ pinctrl-0 = <&blsp1_uart2_default>; pinctrl-1 = <&blsp1_uart2_sleep>; }; + + leds { + pinctrl-names = "default"; + pinctrl-0 = <&msmgpio_leds>, + <&pm8916_gpios_leds>, + <&pm8916_mpps_leds>; + + compatible = "gpio-leds"; + + led@1 { + label = "apq8016-sbc:green:user1"; + gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + + led@2 { + label = "apq8016-sbc:green:user2"; + gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc0"; + default-state = "off"; + }; + + led@3 { + label = "apq8016-sbc:green:user3"; + gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc1"; + default-state = "off"; + }; + + led@4 { + label = "apq8016-sbc:green:user4"; + gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "none"; + default-state = "off"; + }; + + led@5 { + label = "apq8016-sbc:yellow:wlan"; + gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "wlan"; + default-state = "off"; + }; + + led@6 { + label = "apq8016-sbc:blue:bt"; + gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "bt"; + default-state = "off"; + }; + }; }; };