From c8c94805d7bf3d2c3c833a0a5e843b8cb4a26d79 Mon Sep 17 00:00:00 2001 From: tsrytkon Date: Tue, 6 Feb 2018 13:17:14 -0800 Subject: Add support for SueCreek LED Drivers 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 b86baf3571..93e2592baf 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 3baa88cc41..b9a3fa9cab 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 0000000000..2fcc45742c --- /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) + } + } + } +} -- cgit v1.2.3