From patchwork Mon Jan 28 11:27:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 2055421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 753EEE00C6 for ; Mon, 28 Jan 2013 11:41:01 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tzn31-00063q-Co; Mon, 28 Jan 2013 11:38:47 +0000 Received: from avas-mr14.fibertel.com.ar ([24.232.0.245]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tzmvk-0000qe-4E for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2013 11:31:19 +0000 Received: from 201-212-118-238.prima.net.ar ([201.212.118.238]:57618 "EHLO desktop.lan" smtp-auth: "elopez" rhost-flags-OK-OK-OK-FAIL) by avas-mr14.fibertel.com.ar with ESMTPA id S410119Ab3A1LbE; Mon, 28 Jan 2013 08:31:04 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Subject: [PATCH] sunxi: a10-cubieboard: Add user LEDs to the device tree Date: Mon, 28 Jan 2013 08:27:44 -0300 Message-Id: <1359372464-5811-1-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 1.8.1.1 MIME-Version: 1.0 X-Fib-Al-Info: Al X-Fib-Al-MRId: 7584f94f4eb2bd1495cf1d444a1fff87 X-Fib-Al: noav X-Fib-Al-SA: analyzed X-Fib-Al-From: emilio@elopez.com.ar X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130128_063116_591324_78E1C004 X-CRM114-Status: UNSURE ( 7.98 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 3.3 (+++) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (3.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [24.232.0.245 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] 2.5 TAB_IN_FROM From starts with a tab 2.8 KB_DATE_CONTAINS_TAB KB_DATE_CONTAINS_TAB Cc: Ezequiel Garcia , Russell King , Alejandro Mery , =?UTF-8?q?Emilio=20L=C3=B3pez?= , Maxime Ripard , Stefan Roese X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Cubieboard has two LEDs available for use, a blue one (labeled LED1) and a green one (labeled LED2). Signed-off-by: Emilio López --- This patch requires all of the sunxi pinctrl/gpio/led patches by Maxime Ripard to function. arch/arm/boot/dts/sun4i-a10-cubieboard.dts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts index 5cab825..88e2dc1 100644 --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts @@ -27,6 +27,15 @@ }; soc { + pinctrl@01c20800 { + led_pins_cubieboard: led_pins@0 { + allwinner,pins = "PH20", "PH21"; + allwinner,function = "gpio_out"; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + }; + uart0: uart@01c28000 { status = "okay"; }; @@ -35,4 +44,21 @@ status = "okay"; }; }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins_cubieboard>; + + blue { + label = "cubieboard::blue"; + gpios = <&pio 7 21 0>; /* LED1 */ + }; + + green { + label = "cubieboard::green"; + gpios = <&pio 7 20 0>; /* LED2 */ + linux,default-trigger = "heartbeat"; + }; + }; };