From patchwork Sat May 18 22:13:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 17039 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0DB7B24AAB for ; Sat, 18 May 2013 22:13:58 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id bv4sf2373262qab.2 for ; Sat, 18 May 2013 15:13:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=A81RJq3WeQvGkyZ5A9z1HSzeiqfYNoDJKwU9S6GXtR8=; b=gF6tbfy22wYG+VOp0zKu7GZctBPIpIp18F0YcCR2s7oZzGmpxCsm5scTsfO5BdY1JP 3SH8xUouaVyo/MsX47BJC8nN7ROfMOzLN3YNckDU2mt5ECx3/3Tj5f440ooGF7lwHei7 No+dNV8o4Jm5iYysSE01d3dTiRIvOYtzDt66/0JB+9gefBlqRJcRQHT9rGN2Vb5BvArN 0Q/D+gYLptCtOVrIBS2X+65PBuf311Ehno0TdRHsKo7g0DQtKqepFpG46JNMMHsfeYJl uYdMf7uWcDIEIvchoAC9ZDsaQi0q7Ccz+7xcyAuKLhshV6mLafysKCSDAFam3H+JhvZJ mNyA== X-Received: by 10.224.215.194 with SMTP id hf2mr31277506qab.0.1368915193299; Sat, 18 May 2013 15:13:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.128.229 with SMTP id nr5ls2426761qeb.44.gmail; Sat, 18 May 2013 15:13:13 -0700 (PDT) X-Received: by 10.220.237.193 with SMTP id kp1mr32258061vcb.68.1368915192961; Sat, 18 May 2013 15:13:12 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id x6si8662386vcj.81.2013.05.18.15.13.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 15:13:12 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id kw10so4464475vcb.14 for ; Sat, 18 May 2013 15:13:12 -0700 (PDT) X-Received: by 10.220.192.3 with SMTP id do3mr31985409vcb.16.1368915192730; Sat, 18 May 2013 15:13:12 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp27846vcs; Sat, 18 May 2013 15:13:11 -0700 (PDT) X-Received: by 10.112.73.70 with SMTP id j6mr24963338lbv.39.1368915191203; Sat, 18 May 2013 15:13:11 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com [209.85.217.178]) by mx.google.com with ESMTPS id ku8si5761263lbc.224.2013.05.18.15.13.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 18 May 2013 15:13:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.217.178 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id w10so3915841lbi.23 for ; Sat, 18 May 2013 15:13:10 -0700 (PDT) X-Received: by 10.152.120.4 with SMTP id ky4mr25690449lab.5.1368915190173; Sat, 18 May 2013 15:13:10 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-67.bredband.comhem.se. [83.249.208.67]) by mx.google.com with ESMTPSA id n5sm7145172lbe.15.2013.05.18.15.13.08 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 18 May 2013 15:13:09 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: devicetree-discuss@lists.ozlabs.org, Linus Walleij Subject: [PATCH] ARM: nomadik: add led and key for S8815 Date: Sun, 19 May 2013 00:13:04 +0200 Message-Id: <1368915184-29657-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQlK2L23cCSwoWPjmyQm4doDXwX+qZFHn//49dqnbC/LCWGbSGazH+w9LAM9N9qqkfxOe6nx X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This adds device tree hunks for the LED and userbutton on the USB S8815 board, and set up a heartbeat trigger on the LED and an escape key on the user button. Alter the defconfig to enable these standard DT-enabled GPIO drivers. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/ste-nomadik-s8815.dts | 22 ++++++++++++++++++++++ arch/arm/configs/nhk8815_defconfig | 6 ++++++ arch/arm/mach-nomadik/cpu-8815.c | 4 ++++ 3 files changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/ste-nomadik-s8815.dts b/arch/arm/boot/dts/ste-nomadik-s8815.dts index b28fbf3..666945a 100644 --- a/arch/arm/boot/dts/ste-nomadik-s8815.dts +++ b/arch/arm/boot/dts/ste-nomadik-s8815.dts @@ -27,4 +27,26 @@ gpios = <&gpio3 16 0x1>; }; }; + + /* The user LED on the board is set up to be used for heartbeat */ + leds { + compatible = "gpio-leds"; + user-led { + label = "user_led"; + gpios = <&gpio0 2 0x1>; + default-state = "off"; + linux,default-trigger = "heartbeat"; + }; + }; + + /* User key mapped in as "escape" */ + gpio-keys { + compatible = "gpio-keys"; + user-button { + label = "user_button"; + gpios = <&gpio0 3 0x1>; + linux,code = <1>; /* KEY_ESC */ + gpio-key,wakeup; + }; + }; }; diff --git a/arch/arm/configs/nhk8815_defconfig b/arch/arm/configs/nhk8815_defconfig index b01e763..35f8cf2 100644 --- a/arch/arm/configs/nhk8815_defconfig +++ b/arch/arm/configs/nhk8815_defconfig @@ -81,6 +81,7 @@ CONFIG_PPP_SYNC_TTY=m # CONFIG_INPUT_MOUSEDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=y # CONFIG_MOUSE_PS2 is not set # CONFIG_SERIO is not set # CONFIG_LEGACY_PTYS is not set @@ -96,6 +97,11 @@ CONFIG_DEBUG_GPIO=y CONFIG_MMC=y CONFIG_MMC_CLKGATE=y CONFIG_MMC_ARMMMCI=y +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PL031=y CONFIG_DMADEVICES=y diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c index 59f6ff5..1e0ec38 100644 --- a/arch/arm/mach-nomadik/cpu-8815.c +++ b/arch/arm/mach-nomadik/cpu-8815.c @@ -99,6 +99,10 @@ static unsigned long in_pullup[] = { PIN_INPUT_PULLUP }; static struct pinctrl_map __initdata nhk8815_pinmap[] = { PIN_MAP_MUX_GROUP_DEFAULT("uart0", "pinctrl-stn8815", "u0_a_1", "u0"), PIN_MAP_MUX_GROUP_DEFAULT("uart1", "pinctrl-stn8815", "u1_a_1", "u1"), + /* User LED on S8815 */ + PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO2_C5", out_high), + /* User button on S8815 */ + PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-stn8815", "GPIO3_A4", in_nopull), /* Hog in MMC/SD card mux */ PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-stn8815", "mmcsd_a_1", "mmcsd"), /* MCCLK */