From fb26da182091a7fd547af208363314b8e21464fc Mon Sep 17 00:00:00 2001 From: "Rytkonen, Teemu S" Date: Wed, 15 Nov 2017 01:16:05 +0800 Subject: BensonGlacier: Enable generic SPI device -Enable generic SPI device for BensonGlacier config to be used with SenseHat board. -Enable GPIO config to enable SenseHat board programming Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Teemu Rytkonen --- .../AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl | 2 ++ .../PlatformSsdt/Sensors/GenericSpi3.asl | 38 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Sensors/GenericSpi3.asl (limited to 'Platform/BroxtonPlatformPkg/Common') diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl index a967a84073..9cd50ae7f4 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl @@ -31,6 +31,7 @@ DefinitionBlock ( External(\_SB.PCI0.URT2, DeviceObj) External(\_SB.PCI0.SDIO, DeviceObj) External(\_SB.PCI0.SPI1, DeviceObj) + External(\_SB.PCI0.SPI3, DeviceObj) External(\_SB.GPO0.CWLE, IntObj) External(\_SB.GPO0.AVBL, IntObj) External(\_SB.PCI0.SDIO.PSTS, IntObj) @@ -68,5 +69,6 @@ DefinitionBlock ( include ("Fingerprint/Fingerprint_FPC.asl") include ("SueCreek/SueCreek.asl") + include ("Sensors/GenericSpi3.asl") } diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Sensors/GenericSpi3.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Sensors/GenericSpi3.asl new file mode 100644 index 0000000000..830765bf39 --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Sensors/GenericSpi3.asl @@ -0,0 +1,38 @@ +/** @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.SPI3) { + Device (TP0) { + Name (_HID, "SPT0001") + Name (_DDN, "Sensor - SPI3, CS0") + Name (_CRS, ResourceTemplate () { + SpiSerialBus ( + 0, // Chip select (0, 1, 2) + PolarityLow, // Chip select is active low + FourWireMode, // Full duplex + 8, // Bits per word is 8 (byte) + ControllerInitiated, // Don't care + 1000000, // 1 MHz + ClockPolarityLow, // SPI mode 0 + ClockPhaseFirst, // SPI mode 0 + "\\_SB.PCI0.SPI3", // SPI host controller + 0 // Must be 0 + ) + }) + Method (_STA, 0x0, NotSerialized) { + Return (0xF) + } + } +} + -- cgit v1.2.3