From patchwork Thu Aug 25 14:04:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 662820 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sKmDF72CCz9s3T for ; Fri, 26 Aug 2016 00:05:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 443742DE38; Thu, 25 Aug 2016 14:05:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zzcpUDSmPyMb; Thu, 25 Aug 2016 14:05:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C333F31708; Thu, 25 Aug 2016 14:05:11 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 723191C0677 for ; Thu, 25 Aug 2016 14:04:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6F9ED866B0 for ; Thu, 25 Aug 2016 14:04:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JMJnjaIyGBuG for ; Thu, 25 Aug 2016 14:04:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by whitealder.osuosl.org (Postfix) with ESMTPS id DCBC38BF9C for ; Thu, 25 Aug 2016 14:04:57 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 25 Aug 2016 07:04:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,575,1464678000"; d="scan'208";a="753385504" Received: from black.fi.intel.com ([10.237.72.56]) by FMSMGA003.fm.intel.com with ESMTP; 25 Aug 2016 07:04:51 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 866F43A0; Thu, 25 Aug 2016 17:04:48 +0300 (EEST) From: Andy Shevchenko To: Padraig James Connolly , Mika Westerberg , buildroot@busybox.net, Thomas Petazzoni Date: Thu, 25 Aug 2016 17:04:47 +0300 Message-Id: <1472133887-34746-10-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1472133887-34746-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1472133887-34746-1-git-send-email-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko Subject: [Buildroot] [PATCH v1 9/9] board / intel: Add GPIO buttons for Intel Minnowboard X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Mika Westerberg There are 4 user controllable switches (S0, S1, S2, S3) on Intel Minnowboard. This adds GPIO buttons device that is able to report key presses through input layer for those. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko --- board/intel/minnowboard/acpi/buttons.asl | 104 +++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 board/intel/minnowboard/acpi/buttons.asl diff --git a/board/intel/minnowboard/acpi/buttons.asl b/board/intel/minnowboard/acpi/buttons.asl new file mode 100644 index 0000000..2bc4220 --- /dev/null +++ b/board/intel/minnowboard/acpi/buttons.asl @@ -0,0 +1,104 @@ +/* + * Intel Minnowboard + * + * http://wiki.minnowboard.org/MinnowBoard + * + * This adds GPIO buttons device for the 4 switches found on Intel + * Minnowboard available for users. + * + * GPIO name GPIO number switch + * --------------------------------------- + * E6XX_GPIO_S0 0 S0 + * E6XX_GPIO_S1 1 S1 + * E6XX_GPIO_S2 2 S2 + * E6XX_GPIO_S3 3 S3 + * + * In Linux you need to set CONFIG_KEYBOARD_GPIO_POLLED=y (or m) to be + * able to use this device. + */ +DefinitionBlock ("buttons.aml", "SSDT", 5, "INTEL", "BUTTONS", 1) +{ + External (_SB_.PCI0.LPC, DeviceObj) + + Scope (\_SB.PCI0.LPC) + { + Device (BTNS) + { + Name (_HID, "PRP0001") + Name (_DDN, "GPIO buttons device") + + Name (_CRS, ResourceTemplate () { + GpioIo ( + Exclusive, // Not shared + PullUp, // Pull up the line + 0, // Debounce timeout + 0, // Drive strength + IoRestrictionInputOnly, // Only used as input + "\\_SB.PCI0.LPC", // GPIO controller + 0) // Must be 0 + { + 0, // E6XX_GPIO_S0 + 1, // E6XX_GPIO_S1 + 2, // E6XX_GPIO_S2 + 3, // E6XX_GPIO_S3 + } + }) + + Name (_DSD, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"compatible", "gpio-keys-polled"}, + Package () {"poll-interval", 100}, + Package () {"autorepeat", 1} + }, + ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), + Package () { + Package () {"button-0", "BTN0"}, + Package () {"button-1", "BTN1"}, + Package () {"button-2", "BTN2"}, + Package () {"button-3", "BTN3"} + } + }) + + // For more information about these bindings see: + // Documentation/devicetree/bindings/input/gpio-keys-polled.txt + // and Documentation/acpi/gpio-properties.txt. + + Name (BTN0, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"linux,code", 105}, + Package () {"linux,input-type", 1}, + Package () {"gpios", Package () {^BTNS, 0, 0, 1}} + } + }) + + Name (BTN1, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"linux,code", 108}, + Package () {"linux,input-type", 1}, + Package () {"gpios", Package (4) {^BTNS, 0, 1, 1}} + } + }) + + Name (BTN2, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"linux,code", 103}, + Package () {"linux,input-type", 1}, + Package () {"gpios", Package () {^BTNS, 0, 2, 1}} + } + }) + + Name (BTN3, Package () { + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package () {"linux,code", 106}, + Package () {"linux,input-type", 1}, + Package () {"gpios", Package () {^BTNS, 0, 3, 1}} + } + }) + } + } +}