From nobody Wed May 1 19:48:48 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 151072222425479.45216424032094; Tue, 14 Nov 2017 21:03:44 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 496BC2034C08E; Tue, 14 Nov 2017 20:59:34 -0800 (PST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 5E1F42034BBF5 for ; Tue, 14 Nov 2017 20:59:32 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2017 21:03:40 -0800 Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.193.132]) by orsmga005.jf.intel.com with ESMTP; 14 Nov 2017 21:03:39 -0800 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,398,1505804400"; d="scan'208";a="173670660" From: zwei4 To: edk2-devel@lists.01.org Date: Wed, 15 Nov 2017 13:03:35 +0800 Message-Id: <20171115050335.1076-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] SueCreek Bypass X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add code in ACPI table for TI audio codec under I2C5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: zwei4 --- .../BensonGlacier/BoardInitPostMem/BoardInit.c | 33 +++++++++++++++- .../BoardInitPostMem/BoardInitPostMem.inf | 1 + .../Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 4 +- .../Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 1 + .../Common/Acpi/AcpiTablesPCAT/GloblNvs.asl | 1 + .../PlatformSsdt/Audio/AudioCodec10TI3100.asl | 44 +++++++++++++++++= ++++ .../AcpiTablesPCAT/PlatformSsdt/PlatformSsdt.asl | 2 + .../Common/Include/Guid/SetupVariable.h | 3 +- .../PlatformSetupDxe/SouthClusterConfig.vfi | 7 ++++ .../PlatformSettings/PlatformSetupDxe/UqiList.uni | Bin 126596 -> 126916 = bytes .../PlatformSetupDxe/VfrStrings.uni | Bin 305486 -> 305886 = bytes Platform/BroxtonPlatformPkg/PlatformPkg.dec | 3 +- .../NorthCluster/Include/Protocol/GlobalNvsArea.h | 3 +- 13 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/= PlatformSsdt/Audio/AudioCodec10TI3100.asl diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostM= em/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitP= ostMem/BoardInit.c index 07246c155..324baf9ad 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInit.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInit.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 =3D 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 + ); =20 Status =3D 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);=20 + DEBUG ((EFI_D_INFO, "Use SueCreek \n")); + } =20 // // Set PcdMaxPkgCState diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostM= em/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/B= oardInitPostMem/BoardInitPostMem.inf index 55ec5b75f..e15e61293 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/Boar= dInitPostMem.inf @@ -65,6 +65,7 @@ gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid gPlatformModuleTokenSpaceGuid.PcdSueCreek gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState + gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable =20 [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlat= form.c index d0c668ef5..c18753b61 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 =3D 100; mGlobalNvsArea.Area->Mmio32Base =3D (MmioRead32 ((UINT= N) PcdGet64 (PcdPciExpressBaseAddress) + 0xBC) & 0xFFF00000);; mGlobalNvsArea.Area->Mmio32Length =3D ACPI_MMIO_BASE_ADD= RESS - mGlobalNvsArea.Area->Mmio32Base; - mGlobalNvsArea.Area->SueCreekEnable =3D PcdGetBool(PcdSu= eCreek); - + mGlobalNvsArea.Area->SueCreekEnable =3D PcdGetBool(PcdSueC= reek); + mGlobalNvsArea.Area->Ti3100AudioCodecEnable =3D PcdGetBool(PcdTi31= 00AudioCodecEnable ); // // Initialize IGD state by checking if IGD Device 2 Function 0 is enab= led in the chipset // diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/Acp= iPlatformDxe.inf index 9d451f598..21ce93822 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf @@ -88,6 +88,7 @@ gPlatformModuleTokenSpaceGuid.PcdResetType gPlatformModuleTokenSpaceGuid.PcdSueCreek gPlatformModuleTokenSpaceGuid.PcdBtDevice + gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable =20 [Depex] gEfiAcpiSupportProtocolGuid AND diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNv= s.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/GloblNvs.asl index 78416f67a..c54d21db3 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 } =20 diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/Platfor= mSsdt/Audio/AudioCodec10TI3100.asl b/Platform/BroxtonPlatformPkg/Common/Acp= i/AcpiTablesPCAT/PlatformSsdt/Audio/AudioCodec10TI3100.asl new file mode 100644 index 000000000..06d2dcfb4 --- /dev/null +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/A= udio/AudioCodec10TI3100.asl @@ -0,0 +1,44 @@ +/** @file + Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
+ + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BS= D License + which accompanies this distribution. The full text of the license may b= e 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 IMP= LIED. + +**/ + +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, AddressingMode7= Bit, "\\_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/Platfor= mSsdt/PlatformSsdt.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTables= PCAT/PlatformSsdt/PlatformSsdt.asl index 1f9da7678..a967a8407 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/P= latformSsdt.asl +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/P= latformSsdt.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 ( =20 include ("Audio/AudioCodec_INT34C1.asl") include ("Audio/AudioCodec_INT343A.asl") + include ("Audio/AudioCodec10TI3100.asl") =20 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 c6ced4616..e511a02a8 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; - + =20 + UINT8 SueCreekBypass; } SYSTEM_CONFIGURATION; #pragma pack(pop) =20 diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSe= tupDxe/SouthClusterConfig.vfi b/Platform/BroxtonPlatformPkg/Common/Platform= Settings/PlatformSetupDxe/SouthClusterConfig.vfi index 448105c92..3dbc2f313 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi @@ -209,6 +209,13 @@ endif; option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D DEFA= ULT | MANUFACTURING | RESET_REQUIRED; option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D RESET= _REQUIRED; endoneof; + =20 + oneof varid =3D Setup.SueCreekBypass, + prompt =3D STRING_TOKEN(STR_SUE_CREEK_BYPASS_PROMPT), + help =3D STRING_TOKEN(STR_SUE_CREEK_BYPASS_HELP), + option text =3D STRING_TOKEN(STR_DISABLE), value =3D 0, flags =3D DEFA= ULT | MANUFACTURING | RESET_REQUIRED; + option text =3D STRING_TOKEN(STR_ENABLE), value =3D 1, flags =3D RESET= _REQUIRED; + endoneof; =20 oneof varid =3D Setup.I2cNfc, prompt =3D STRING_TOKEN(STR_I2C_DEVICE_NFC_PROMPT), diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSe= tupDxe/UqiList.uni b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/Pl= atformSetupDxe/UqiList.uni index df597460ee925f6cd4500fbf9dc0a27cc2b0c0c0..4666b9a6a5b2b365750f5afdbc1= ce1810c62b1e4 100644 GIT binary patch delta 111 zcmZp<%YNiOd&3sSmUq)r9y7|w1~Y^*xH7~uI5PwRX;%hsAlr!{k|BV>ks)|;p|SOJ ihu4f6(=3DQ!ml*6xfdZ8Pm@#F*%4zLC`3kD?yE(QSDe;cO& delta 11 ScmX?dpS|TSd&3sSmUjRn3I)0V diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSe= tupDxe/VfrStrings.uni b/Platform/BroxtonPlatformPkg/Common/PlatformSettings= /PlatformSetupDxe/VfrStrings.uni index f728cf26f90f8aed7a41b5501be77a962db0f622..163b750c3b0c54bd54a0760efff= fcc6c8296ebe1 100644 GIT binary patch delta 157 zcmX?iN$B2Hp@tU5ElhLXiH0(`GQ=3D}DGXw!?R|an&+le7^`oqag_R}}aU{sN;WGG-r zWGDtg1%_aTQifEZ+9DvCIz8|VqoQ;$16BhV0vH^pGrnQ6o^EiG(M{Tk0k<&+Z!)U3 O&w9tSebzhXExP~>Mk>z$ delta 23 fcmcb2Rp{I$p@tU5ElhLXwd;If+OG3~dDAWcj(ZEF diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/Broxton= PlatformPkg/PlatformPkg.dec index d6a175b8c..1de762f79 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|0x= 80000019 ## MemoryCheck value for checking memory before boot OS. ## To save the boot performance, the default MemoryCheck is set to 0. gClientCommonModuleTokenSpaceGuid.PcdPlatformMemoryCheck|0|UINT8|0x40000= 005 diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/= GlobalNvsArea.h b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Prot= ocol/GlobalNvsArea.h index e8319ce0f..22b738ae8 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalN= vsArea.h +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/NorthCluster/Include/Protocol/GlobalN= vsArea.h @@ -506,7 +506,8 @@ typedef struct { UINT8 CriticalThermalTripPointSen2S3; ///< (920) Critica= lThermalTripPointSen2S3 UINT8 HotThermalTripPointSen2; ///< (921) HotTher= malTripPointSen2 UINT8 CriticalThermalTripPointSen2; ///< (922) Critica= lThermalTripPointSen2 - UINT8 SueCreekEnable; ///< (923) SueCree= kEnable: 0: disabled; 1: enabled =20 + UINT8 SueCreekEnable; ///< (923) SueCree= kEnable: 0: disabled; 1: enabled + UINT8 Ti3100AudioCodecEnable; ///< (924) TI3100 = Audio Codec: 0:Disable; 1:Enable } EFI_GLOBAL_NVS_AREA; #pragma pack () =20 --=20 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel