From patchwork Sun May 6 13:00:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10382787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 060CF60353 for ; Sun, 6 May 2018 13:01:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBF2928A2D for ; Sun, 6 May 2018 13:01:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E022728C45; Sun, 6 May 2018 13:01:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720B228C63 for ; Sun, 6 May 2018 13:01:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751203AbeEFNBB (ORCPT ); Sun, 6 May 2018 09:01:01 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:38915 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbeEFNBA (ORCPT ); Sun, 6 May 2018 09:01:00 -0400 Received: by mail-io0-f195.google.com with SMTP id r9-v6so30606601iod.6 for ; Sun, 06 May 2018 06:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MqGKMsqnTLbce1NwFX+ZRZ+swWyyTTLrUoKUs6XmPio=; b=hJpa5AIo/zvjrj3M3qgB+yf1tXyVih8IkmRmPHQO8MbCEQoGkYJK6Ysw27Y/Zc/Css auCsyUAiN6c1e+3U/xfUDJYfg/NsrjTi8fTBCSwZlhxSGXroaV8l8vAFQnVTd9JioOfk 6Z8c6w3G5vQHxPaoaQT6JxojRgoRL4bGWktzddRyBC9eV+RRsH6bKE+66POeEDZJpKPF bv43ScBPkcuXvPcwkb2cDQ88TrYUrP3ebu7IMqSJFNT/83MahxOx/VC4NSrTvIN39b4X nBiRWeynPszjmzdHTxrmkZfgEv1yKxbHKKKPzq8U1j1aPjMEcElnhrNzokDJUhMyDiRn AmDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MqGKMsqnTLbce1NwFX+ZRZ+swWyyTTLrUoKUs6XmPio=; b=T8CtwoR9clm7ilGyRJl0Md1iUHc3RV29a4ni5cvsWS4IaoJdIaOMZW6428oYtp1/gt wIL8g6utAho1vI52jHWxwzoPi1y7DpLu0SmA9zKRZcvWmYd+xy0cwUSNC++8InN5w6sE KFhyqsTjG33Z340ud3nGsZnyDjRgiYdcsdQdgv+ARMsde/bXFn0tnvV8gfjgTmkkEePV 8Rir1hjxyXuQCFZyNSghe+b7BXK4NkulTjt7gajP052fYYEnXDAWckaG6DgUSN9HIkS3 XWPyXOn5j3NUdmf2WDDTbOiuaRxrS8Xw/e4+PQQhdGeBqN2wsmCyPWtz9iJ3q1j38DXz kKVQ== X-Gm-Message-State: ALQs6tAtsQLPN93mKOoboGh57pi3RIZbBEx6rr8NxqZBt1bC6FDu1Foi 3683CM/FtfBbHpmG6tgNpwjfag== X-Google-Smtp-Source: AB8JxZpuQWhv+3QVONxBZ1JmckBoqJQ6jwW1ziPjEYLp+SZPP7ZoXH4Za5YjUaBYobetVlB5Hq/Lcw== X-Received: by 2002:a6b:3288:: with SMTP id y130-v6mr35630390ioy.287.1525611659500; Sun, 06 May 2018 06:00:59 -0700 (PDT) Received: from localhost.localdomain (c-73-65-120-235.hsd1.mn.comcast.net. [73.65.120.235]) by smtp.gmail.com with ESMTPSA id e1-v6sm3050183ita.23.2018.05.06.06.00.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 06:00:58 -0700 (PDT) From: Adam Ford To: linux-omap@vger.kernel.org Cc: woods.technical@gmail.com, adam.ford@logicpd.com, Adam Ford Subject: [PATCH 3/3] ARM: dts: am3517-evm: Add User LEDs and Pushbutton Date: Sun, 6 May 2018 08:00:49 -0500 Message-Id: <20180506130049.21701-3-aford173@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180506130049.21701-1-aford173@gmail.com> References: <20180506130049.21701-1-aford173@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There are some LED's attached to the GPIO expander, and there are is a bank of switches attached to the GPIO expander. This patch associates the LED and the switches to it. Signed-off-by: Derald D. Woods Signed-off-by: Adam Ford diff --git a/arch/arm/boot/dts/am3517-evm.dts b/arch/arm/boot/dts/am3517-evm.dts index e5cc93053539..98aadb0f81c5 100644 --- a/arch/arm/boot/dts/am3517-evm.dts +++ b/arch/arm/boot/dts/am3517-evm.dts @@ -9,6 +9,8 @@ #include "am3517.dtsi" #include "am3517-som.dtsi" +#include + / { model = "TI AM3517 EVM (AM3517/05 TMDSEVM3517)"; compatible = "ti,am3517-evm", "ti,am3517", "ti,omap3"; @@ -29,6 +31,96 @@ regulator-max-microvolt = <3300000>; }; + gpio-keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + user_pb { + label = "User Push Button"; + linux,code = ; + gpios = <&tca6416 5 GPIO_ACTIVE_LOW>; + }; + + user_sw_1 { + label = "User Switch 1"; + linux,code = ; + gpios = <&tca6416 8 GPIO_ACTIVE_LOW>; + }; + + user_sw_2 { + label = "User Switch 2"; + linux,code = ; + gpios = <&tca6416 9 GPIO_ACTIVE_LOW>; + }; + + user_sw_3 { + label = "User Switch 3"; + linux,code = ; + gpios = <&tca6416 10 GPIO_ACTIVE_LOW>; + }; + + user_sw_4 { + label = "User Switch 4"; + linux,code = ; + gpios = <&tca6416 11 GPIO_ACTIVE_LOW>; + }; + + user_sw_5 { + label = "User Switch 5"; + linux,code = ; + gpios = <&tca6416 12 GPIO_ACTIVE_LOW>; + }; + + user_sw_6 { + label = "User Switch 6"; + linux,code = ; + gpios = <&tca6416 13 GPIO_ACTIVE_LOW>; + }; + + user_sw_7 { + label = "User Switch 7"; + linux,code = ; + gpios = <&tca6416 14 GPIO_ACTIVE_LOW>; + }; + + user_sw_8 { + label = "User Switch 8"; + linux,code = ; + gpios = <&tca6416 15 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&leds_pins>; + + user_led_1 { + label = "am3517evm:green:user_led_1"; + gpios = <&tca6416 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + user_led_2 { + label = "am3517evm:green:user_led_2"; + gpios = <&tca6416 6 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + user_led_3 { + label = "am3517evm:green:user_led_3"; + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "mmc0"; /* SD/MMC card activity */ + }; + + user_led_4 { + label = "am3517evm:green:user_led_4"; + gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; + lcd0: display@0 { compatible = "panel-dpi"; label = "15"; @@ -138,6 +230,13 @@ &omap3_pmx_core { + leds_pins: pinmux_leds_pins { + pinctrl-single,pins = < + OMAP3_WKUP_IOPAD(0x2a24, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu0.gpio_11 */ + OMAP3_WKUP_IOPAD(0x2a26, PIN_OUTPUT_PULLUP | MUX_MODE4) /* jtag_emu1.gpio_31 */ + >; + }; + mmc1_pins: pinmux_mmc1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x2144, PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */