summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwei4 <david.wei@intel.com>2017-11-15 13:03:04 +0800
committerzwei4 <david.wei@intel.com>2017-11-15 13:08:41 +0800
commitea234bbec77b843748f08e490ddb70fe2787281c (patch)
tree01e027c6d8051a4a5ed99926d6ae5c24f6dc2a89
parent62dae830d67a5db7ec8ad5f197cd432864bcf293 (diff)
downloadedk2-platforms-ea234bbec77b843748f08e490ddb70fe2787281c.tar.xz
SueCreek Bypass
Add code in ACPI table for TI audio codec under I2C5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 <david.wei@intel.com>
-rw-r--r--Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c33
-rw-r--r--Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c4
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl1
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Audio/AudioCodec10TI3100.asl44
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl2
-rw-r--r--Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h3
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi7
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/UqiList.unibin126596 -> 126916 bytes
-rw-r--r--Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.unibin305486 -> 305886 bytes
-rw-r--r--Platform/BroxtonPlatformPkg/PlatformPkg.dec3
-rw-r--r--Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalNvsArea.h3
13 files changed, 96 insertions, 6 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
index 07246c155d..324baf9ada 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
@@ -51,6 +51,29 @@ BensonGlacierPostMemInitCallback (
UINT8 ResetType;
UINTN BufferSize;
UINT8 MaxPkgCState;
+ UINTN VariableSize;
+ EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices;
+ SYSTEM_CONFIGURATION SystemConfiguration;
+
+ VariableSize = sizeof (SYSTEM_CONFIGURATION);
+ ZeroMem (&SystemConfiguration, sizeof (SYSTEM_CONFIGURATION));
+
+ (*PeiServices)->LocatePpi (
+ PeiServices,
+ &gEfiPeiReadOnlyVariable2PpiGuid,
+ 0,
+ NULL,
+ (VOID **) &VariableServices
+ );
+
+ VariableServices->GetVariable (
+ VariableServices,
+ PLATFORM_SETUP_VARIABLE_NAME,
+ &gEfiSetupVariableGuid,
+ NULL,
+ &VariableSize,
+ &SystemConfiguration
+ );
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -91,7 +114,15 @@ BensonGlacierPostMemInitCallback (
//
// Set PcdSueCreek
//
- PcdSetBool (PcdSueCreek, TRUE);
+ if (SystemConfiguration.SueCreekBypass) {
+ PcdSetBool (PcdSueCreek, FALSE);
+ PcdSetBool (PcdTi3100AudioCodecEnable, TRUE);
+ DEBUG ((EFI_D_INFO, "Bypass SueCreek \n"));
+ } else {
+ PcdSetBool (PcdSueCreek, TRUE);
+ PcdSetBool (PcdTi3100AudioCodecEnable, FALSE);
+ DEBUG ((EFI_D_INFO, "Use SueCreek \n"));
+ }
//
// Set PcdMaxPkgCState
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
index 55ec5b75f0..e15e612939 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
@@ -65,6 +65,7 @@
gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState
+ gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable
[Guids]
gEfiPlatformInfoGuid
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
index d0c668ef58..c18753b61c 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c
@@ -1439,8 +1439,8 @@ AcpiPlatformEntryPoint (
mGlobalNvsArea.Area->BatteryCapacity0 = 100;
mGlobalNvsArea.Area->Mmio32Base = (MmioRead32 ((UINTN) PcdGet64 (PcdPciExpressBaseAddress) + 0xBC) & 0xFFF00000);;
mGlobalNvsArea.Area->Mmio32Length = ACPI_MMIO_BASE_ADDRESS - mGlobalNvsArea.Area->Mmio32Base;
- mGlobalNvsArea.Area->SueCreekEnable = PcdGetBool(PcdSueCreek);
-
+ mGlobalNvsArea.Area->SueCreekEnable = PcdGetBool(PcdSueCreek);
+ mGlobalNvsArea.Area->Ti3100AudioCodecEnable = PcdGetBool(PcdTi3100AudioCodecEnable );
//
// Initialize IGD state by checking if IGD Device 2 Function 0 is enabled in the chipset
//
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
index 9d451f5982..21ce938229 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -88,6 +88,7 @@
gPlatformModuleTokenSpaceGuid.PcdResetType
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdBtDevice
+ gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable
[Depex]
gEfiAcpiSupportProtocolGuid AND
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl
index 78416f67ab..c54d21db3e 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl
@@ -480,5 +480,6 @@
HTTP, 8, // (921) HotThermalTripPointSen2
CRTP, 8, // (922) CriticalThermalTripPointSen2
SUCE, 8, // (923) SueCreekEnable: 0: disabled; 1: enabled
+ ISCT, 8, // (924) TI3100 Audio Codec: 0:Disable; 1:Enable
}
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Audio/AudioCodec10TI3100.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Audio/AudioCodec10TI3100.asl
new file mode 100644
index 0000000000..06d2dcfb46
--- /dev/null
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/Audio/AudioCodec10TI3100.asl
@@ -0,0 +1,44 @@
+/** @file
+ Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
+
+ 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.
+
+**/
+
+External(\ISCT, IntObj)
+
+Scope(\_SB.PCI0.I2C5)
+{
+ Device (ACDT) // Audio Codec driver I2C
+ {
+ Name (_ADR, 0x18)
+ Name (_HID, "10TI3100")
+ Name (_CID, "10TI3100")
+ Name (_DDN, "Intel(R) Smart Sound Technology Audio Codec" )
+ Name (_UID, 1)
+
+ Method(_CRS, 0x0, Serialized)
+ {
+ Name(SBUF,ResourceTemplate ()
+ {
+ I2CSerialBus (0x18, ControllerInitiated, 400000, AddressingMode7Bit, "\\_SB.PCI0.I2C5",0x00, ResourceConsumer,,)
+ })
+ Return (SBUF)
+ }
+
+ Method (_STA, 0x0, NotSerialized)
+ {
+ If (LEqual (ISCT, 1)) {
+ Return (0xF) // I2S Codec Enabled
+ }
+ Return (0)
+ }
+ } // Device (ACDT)
+}
+
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
index 1f9da76789..a967a84073 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl
@@ -25,6 +25,7 @@ DefinitionBlock (
External(\_SB.PCI0.I2C2, DeviceObj)
External(\_SB.PCI0.I2C3, DeviceObj)
External(\_SB.PCI0.I2C4, DeviceObj)
+ External(\_SB.PCI0.I2C5, DeviceObj)
External(\_SB.PCI0.I2C7, DeviceObj)
External(\_SB.PCI0.URT1, DeviceObj)
External(\_SB.PCI0.URT2, DeviceObj)
@@ -44,6 +45,7 @@ DefinitionBlock (
include ("Audio/AudioCodec_INT34C1.asl")
include ("Audio/AudioCodec_INT343A.asl")
+ include ("Audio/AudioCodec10TI3100.asl")
If (LEqual(IPUD, 1)) {
include ("Camera/Camera_INT3471.asl")
diff --git a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
index c6ced46167..e511a02a81 100644
--- a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
+++ b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h
@@ -1133,7 +1133,8 @@ typedef struct {
UINT8 CriticalThermalTripPointSen2;
UINT8 CriticalThermalTripPointSen2S3;
UINT8 HotThermalTripPointSen2;
-
+
+ UINT8 SueCreekBypass;
} SYSTEM_CONFIGURATION;
#pragma pack(pop)
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi
index 448105c920..3dbc2f313c 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi
@@ -209,6 +209,13 @@ endif;
option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED;
endoneof;
+
+ oneof varid = Setup.SueCreekBypass,
+ prompt = STRING_TOKEN(STR_SUE_CREEK_BYPASS_PROMPT),
+ help = STRING_TOKEN(STR_SUE_CREEK_BYPASS_HELP),
+ option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ option text = STRING_TOKEN(STR_ENABLE), value = 1, flags = RESET_REQUIRED;
+ endoneof;
oneof varid = Setup.I2cNfc,
prompt = STRING_TOKEN(STR_I2C_DEVICE_NFC_PROMPT),
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/UqiList.uni b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/UqiList.uni
index df597460ee..4666b9a6a5 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/UqiList.uni
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/UqiList.uni
Binary files differ
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
index f728cf26f9..163b750c3b 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/VfrStrings.uni
Binary files differ
diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/BroxtonPlatformPkg/PlatformPkg.dec
index d6a175b8ca..1de762f798 100644
--- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec
+++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec
@@ -190,7 +190,8 @@
gPlatformModuleTokenSpaceGuid.PcdBtDevice|0x00|UINT8|0x80000017
## This PCD used to select MaxPkgCState
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState|0x00|UINT8|0x80000018
-
+ ## This PCD used to select TI3100 Audio Codec
+ gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable|FALSE|BOOLEAN|0x80000019
## MemoryCheck value for checking memory before boot OS.
## To save the boot performance, the default MemoryCheck is set to 0.
gClientCommonModuleTokenSpaceGuid.PcdPlatformMemoryCheck|0|UINT8|0x40000005
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalNvsArea.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalNvsArea.h
index e8319ce0ff..22b738ae85 100644
--- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalNvsArea.h
+++ b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalNvsArea.h
@@ -506,7 +506,8 @@ typedef struct {
UINT8 CriticalThermalTripPointSen2S3; ///< (920) CriticalThermalTripPointSen2S3
UINT8 HotThermalTripPointSen2; ///< (921) HotThermalTripPointSen2
UINT8 CriticalThermalTripPointSen2; ///< (922) CriticalThermalTripPointSen2
- UINT8 SueCreekEnable; ///< (923) SueCreekEnable: 0: disabled; 1: enabled
+ UINT8 SueCreekEnable; ///< (923) SueCreekEnable: 0: disabled; 1: enabled
+ UINT8 Ti3100AudioCodecEnable; ///< (924) TI3100 Audio Codec: 0:Disable; 1:Enable
} EFI_GLOBAL_NVS_AREA;
#pragma pack ()