From patchwork Tue Aug 21 01:43:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1351481 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 20631DFFED for ; Tue, 21 Aug 2012 01:47:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T3dVL-0008I0-6K; Tue, 21 Aug 2012 01:43:39 +0000 Received: from mail-gg0-f177.google.com ([209.85.161.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T3dVG-0008Hl-TJ for linux-arm-kernel@lists.infradead.org; Tue, 21 Aug 2012 01:43:36 +0000 Received: by ggnm2 with SMTP id m2so5907867ggn.36 for ; Mon, 20 Aug 2012 18:43:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=4zYtqFypi7RyUp+dSCKxzX/HOWbwwLcM6AsDw+YExQs=; b=qLAAfs1+exImpkQ0uFbBTUXvE30dHPaKQJQ+rF9Wjx5/GzRlhT8cN5neAMCZt5LjLe YqSjO+iqg8jKIRRlM+OJG+ZYsCYMUFmwJjBmPEPudsKACAcK5+DdoGP7emksLOxrtbBp 9tXjLvyAtC5kgT9N+Ql+z1jgU75OTvAVdwYDVRcAgonJ/+wSZgiLpj4sE0AaZPn2pxtO FuR8JhwebZPykOF9AEcEVBVHO9fgEYU8Wl73MHhRz2fbOBgPw/hpTfgb35IX1RWPIQCy R7mIMLIEZr1LePUzRN9/ZiFS0sWjZeE7LaOxjaldo7LE/mlbfVpcM4T7QR3gYsx24UKu dCiw== Received: by 10.236.201.161 with SMTP id b21mr24221105yho.41.1345513413153; Mon, 20 Aug 2012 18:43:33 -0700 (PDT) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([201.82.136.222]) by mx.google.com with ESMTPS id a4sm58771anm.14.2012.08.20.18.43.31 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Aug 2012 18:43:32 -0700 (PDT) From: Fabio Estevam To: shawn.guo@linaro.org Subject: [PATCH] ARM: olinuxino: Add gpio-led support Date: Mon, 20 Aug 2012 22:43:15 -0300 Message-Id: <1345513396-12320-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.161.177 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] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Fabio Estevam , linux-arm-kernel@lists.infradead.org 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Fabio Estevam Olinuxino has a LED connected to MX23_PAD_SSP1_DETECT__GPIO_2_1 pin. Since mmc0_4bit_pins_a defines MX23_PAD_SSP1_DETECT as SSP function, create a new mmc0_4bit_pins_b. Signed-off-by: Fabio Estevam --- arch/arm/boot/dts/imx23-olinuxino.dts | 28 +++++++++++++++++++++++++++- arch/arm/boot/dts/imx23.dtsi | 15 +++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts index a286873..dece3fe 100644 --- a/arch/arm/boot/dts/imx23-olinuxino.dts +++ b/arch/arm/boot/dts/imx23-olinuxino.dts @@ -27,10 +27,25 @@ ssp0: ssp@80010000 { compatible = "fsl,imx23-mmc"; pinctrl-names = "default"; - pinctrl-0 = <&mmc0_4bit_pins_a &mmc0_pins_fixup>; + pinctrl-0 = <&mmc0_4bit_pins_b &mmc0_pins_fixup>; bus-width = <4>; status = "okay"; }; + + pinctrl@80018000 { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>; + + hog_pins_a: hog-gpios@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ + >; + fsl,drive-strength = <0>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + }; }; apbx@80040000 { @@ -47,4 +62,15 @@ }; }; }; + + leds { + compatible = "gpio-leds"; + + user { + label = "green"; + gpios = <&gpio2 1 0>; + linux,default-trigger = "default-on"; + default-state = "on"; + }; + }; }; diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi index 9700872..a8b423a 100644 --- a/arch/arm/boot/dts/imx23.dtsi +++ b/arch/arm/boot/dts/imx23.dtsi @@ -202,6 +202,21 @@ fsl,pull-up = <1>; }; + mmc0_4bit_pins_b: mmc0-4bit_b@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2020 /* MX23_PAD_SSP1_DATA0__SSP1_DATA0 */ + 0x2030 /* MX23_PAD_SSP1_DATA1__SSP1_DATA1 */ + 0x2040 /* MX23_PAD_SSP1_DATA2__SSP1_DATA2 */ + 0x2050 /* MX23_PAD_SSP1_DATA3__SSP1_DATA3 */ + 0x2000 /* MX23_PAD_SSP1_CMD__SSP1_CMD */ + 0x2060 /* MX23_PAD_SSP1_SCK__SSP1_SCK */ + >; + fsl,drive-strength = <1>; + fsl,voltage = <1>; + fsl,pull-up = <1>; + }; + mmc0_8bit_pins_a: mmc0-8bit@0 { reg = <0>; fsl,pinmux-ids = <