From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=teemu.s.rytkonen@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 403A021F0DA6B for ; Mon, 12 Feb 2018 13:34:26 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2018 13:40:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,504,1511856000"; d="scan'208";a="203638444" Received: from tsrytkon-mobl.ger.corp.intel.com ([10.232.214.72]) by fmsmga006.fm.intel.com with ESMTP; 12 Feb 2018 13:40:15 -0800 From: tsrytkon To: edk2-devel@lists.01.org Cc: david.wei@intel.com, anthony.loeppert@intel.com, Teemu Rytkonen Date: Mon, 12 Feb 2018 13:31:42 -0800 Message-Id: <20180212213142.14112-1-teemu.s.rytkonen@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 1/2] Add support for SueCreek LED Drivers X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2018 21:34:26 -0000 Adds support for two ACPI entries for PCA9956 LED drivers for SueCreek DMIC board. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Teemu Rytkonen --- .../AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl | 3 + .../PlatformSsdt/SueCreek/SueCreek.asl | 10 ++-- .../PlatformSsdt/SueCreek/SueCreekLeds.asl | 70 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl index b86baf357..93e2592ba 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl @@ -36,12 +36,14 @@ DefinitionBlock ( External(\_SB.GPO0.CWLE, IntObj) External(\_SB.GPO0.AVBL, IntObj) External(\_SB.PCI0.SDIO.PSTS, IntObj) + External(\SUCE, IntObj) External(HIDG, MethodObj) External(OSYS, IntObj) External(SBTD, IntObj) External(WCAS, IntObj) External(UCAS, IntObj) External(CROT, IntObj) + External(TP7G) External(IPUD) @@ -72,6 +74,7 @@ DefinitionBlock ( include ("Fingerprint/Fingerprint_FPC.asl") include ("SueCreek/SueCreek.asl") + include ("SueCreek/SueCreekLeds.asl") include ("Sensors/GenericSpi3.asl") } diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl index 3baa88cc4..b9a3fa9ca 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreek.asl @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Scope (\_SB.PCI0.SPI1) { Device (TP0) { - Name (_HID, "SUE1000") + Name (_HID, "SUE1000") Name (_DDN, "SueCreek - SPI0, CS0") Name (_CRS, ResourceTemplate () { SpiSerialBus ( @@ -23,15 +23,13 @@ Scope (\_SB.PCI0.SPI1) { FourWireMode, // Full duplex 8, // Bits per word is 8 (byte) ControllerInitiated, // Don't care - 9600000, // 9.6 MHz - ClockPolarityHigh, // SPI mode 3 - ClockPhaseSecond, // SPI mode 3 + 9600000, // 9.6 MHz + ClockPolarityHigh, // SPI mode 3 + ClockPhaseSecond, // SPI mode 3 "\\_SB.PCI0.SPI1", // SPI host controller 0 // Must be 0 ) }) - - External(\SUCE, IntObj) Method (_STA, 0x0, NotSerialized) { If (LEqual (SUCE, 0)) { Return (0x0) diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl new file mode 100644 index 000000000..2fcc45742 --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/SueCreek/SueCreekLeds.asl @@ -0,0 +1,70 @@ +/** @file + +Copyright (c) 2017 Intel Corporation. + +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +Scope(\_SB.PCI0.I2C5) { + Device (LED0) { + Name (_HID, "PCA9956") + Name (_DDN, "SueCreekLed, CS0") + Name (SBUF, ResourceTemplate () { + I2cSerialBus ( + 0x0065, + ControllerInitiated, + 400000, + AddressingMode7Bit, + "\\_SB.PCI0.I2C5", + 0x00, + ResourceConsumer, + , + ) + }) + Method (_CRS, 0, NotSerialized) + { + Return (SBUF) + } + Method (_STA, 0x0, NotSerialized) { + If (LEqual (SUCE, 0)) { + Return (0x0) + } else { + Return (0xF) + } + } + } + Device (LED1) { + Name (_HID, "PCA9956") + Name (_DDN, "SueCreekLed, CS0") + Name (SBUF, ResourceTemplate () { + I2cSerialBus ( + 0x0069, + ControllerInitiated, + 400000, + AddressingMode7Bit, + "\\_SB.PCI0.I2C5", + 0x00, + ResourceConsumer, + , + ) + }) + Method (_CRS, 0, NotSerialized) + { + Return (SBUF) + } + Method (_STA, 0x0, NotSerialized) { + If (LEqual (SUCE, 0)) { + Return (0x0) + } else { + Return (0xF) + } + } + } +} -- 2.15.1.windows.2