From patchwork Fri Mar 29 02:10:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Press X-Patchwork-Id: 2360131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 713E43FD40 for ; Fri, 29 Mar 2013 02:14:04 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ULOm4-0002pJ-Kb; Fri, 29 Mar 2013 02:10:36 +0000 Received: from mail-qa0-f51.google.com ([209.85.216.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ULOm0-0002oz-S0 for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2013 02:10:33 +0000 Received: by mail-qa0-f51.google.com with SMTP id hg5so228083qab.17 for ; Thu, 28 Mar 2013 19:10:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=UNu0asZR+WGYPlGIGS9QsyTnImcq7uPftNiPJ0ju8KI=; b=m2BU8t+MMVw2HZb9bmqWrWLFndwINTKBPQtI1Lskssveww4Z0/azpwQxHvNCCszYSj A41gCHZ6xh9E4EG0qMbvJd+RqJMjSev4Tw/f3dt4ob6ebskMHMyAGXQwU0NyjEYJMTp2 kXbA2dq5hphKO+APW955rmyf2ZV3KxfFxlBOv3gHULsQvdvRyo/VpAsWqPSRtlJykhYp MnUxEI/JXnZwx6X9wn60IZ/knBggeOxny7r95gfKsgiP4bc4/tTvLhEtuqtjsbfK/QTF dX5LQTldVKJMA0mkaE+2hjok5lziSm6f0+oMD279wNUsa98tpxCd40GPgpI2ailfFv3W JvJw== X-Received: by 10.229.165.70 with SMTP id h6mr460714qcy.65.1364523030802; Thu, 28 Mar 2013 19:10:30 -0700 (PDT) Received: from archimedes (108-230-157-199.lightspeed.sntcca.sbcglobal.net. [108.230.157.199]) by mx.google.com with ESMTPS id dr7sm3512617qab.5.2013.03.28.19.10.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 28 Mar 2013 19:10:29 -0700 (PDT) Received: by archimedes (sSMTP sendmail emulation); Thu, 28 Mar 2013 19:10:26 -0700 From: Ryan Press To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm: mvebu: Add GPIO LEDs to Mirabox board Date: Thu, 28 Mar 2013 19:10:24 -0700 Message-Id: <1364523024-20306-1-git-send-email-ryan@presslab.us> X-Mailer: git-send-email 1.8.1.2 X-Gm-Message-State: ALoCoQngdYlO8F4WG6mou2MpldecxjQNG2bY9+OTPMGjfEgdAtrm6rw6frf6Ibwwb+XTVwktgFq6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130328_221032_951379_49232458 X-CRM114-Status: GOOD ( 10.28 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.216.51 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Ryan Press , ezequiel.garcia@free-electrons.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add the three external LED definitions to the device tree file on the Mirabox. The Mirabox user guide calls out one as a power LED, and the other two are defined for WiFi, but as the current mwifiex drivers don't have LED support, we make them status LEDs. These have been tested working by writing to the appropriate /sys/class/leds trigger. Signed-off-by: Ryan Press Tested-by: Neil Greatorex Tested-by: Ezequiel Garcia --- arch/arm/boot/dts/armada-370-mirabox.dts | 37 ++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm/boot/dts/armada-370-mirabox.dts b/arch/arm/boot/dts/armada-370-mirabox.dts index dd0c57d..242796e 100644 --- a/arch/arm/boot/dts/armada-370-mirabox.dts +++ b/arch/arm/boot/dts/armada-370-mirabox.dts @@ -33,6 +33,43 @@ clock-frequency = <600000000>; status = "okay"; }; + + pinctrl { + pwr_led_pin: pwr-led-pin { + marvell,pins = "mpp63"; + marvell,function = "gpo"; + }; + + stat_led_pins: stat-led-pins { + marvell,pins = "mpp64", "mpp65"; + marvell,function = "gpio"; + }; + }; + + gpio_leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_led_pin &stat_led_pins>; + + green_pwr_led { + label = "mirabox:green:pwr"; + gpios = <&gpio1 31 1>; + linux,default-trigger = "heartbeat"; + }; + + blue_stat_led { + label = "mirabox:blue:stat"; + gpios = <&gpio2 0 1>; + linux,default-trigger = "cpu0"; + }; + + green_stat_led { + label = "mirabox:green:stat"; + gpios = <&gpio2 1 1>; + default-state = "off"; + }; + }; + mdio { phy0: ethernet-phy@0 { reg = <0>;