From nobody Fri May 3 17:27:17 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 1507953198015953.9526737137123; Fri, 13 Oct 2017 20:53:18 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 82127202E5CEB; Fri, 13 Oct 2017 20:49:44 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 30BF5202E5CE2 for ; Fri, 13 Oct 2017 20:49:44 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 20:53:16 -0700 Received: from shwdeopenpsi011.ccr.corp.intel.com (HELO SHWDEOPENPSI011.local) ([10.239.9.126]) by orsmga003.jf.intel.com with SMTP; 13 Oct 2017 20:53:15 -0700 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=134.134.136.20; helo=mga02.intel.com; envelope-from=shifeix.a.lu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,374,1503385200"; d="scan'208";a="1025077206" Date: Sat, 14 Oct 2017 11:53:15 +0800 From: lushifex To: edk2-devel@lists.01.org Message-ID: <2cdae62e-bb85-4107-8ec1-7bb8bb5beceb@SHWDEOPENPSI011.local> X-Mailer: TortoiseGit MIME-Version: 1.0 Subject: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017] Blue tooth device 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: , Cc: , david.wei@intel.com 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" Use Pcd to select blue tooth device. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- .../Board/MinnowBoard3/BoardInitPostMem/BoardInit.c | 7 +++= ++++ .../Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h | 7 +++= ++++ .../Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf | 3 ++- .../BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c | 2 +- .../Common/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 1 + .../Acpi/AcpiTablesPCAT/PlatformSsdt/Bluetooth/LBEE5KL1DX.asl | 5 +++= +- .../PlatformSettings/PlatformSetupDxe/SouthClusterConfig.vfi | 2 ++ Platform/BroxtonPlatformPkg/PlatformPkg.dec | 4 +++- 8 files changed, 27 insertions(+), 4 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMe= m/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPos= tMem/BoardInit.c index 69b7df9..f329b5f 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= Init.c +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= Init.c @@ -57,6 +57,7 @@ MinnowBoard3PostMemInitCallback ( UINT8 BoardId; UINT8 FabId; UINT8 ResetType; + UINT8 BtDevice; UINTN BufferSize; =20 Status =3D PeiServicesLocatePpi ( @@ -92,6 +93,12 @@ MinnowBoard3PostMemInitCallback ( PcdSet8 (PcdResetType, (UINT8) ResetType); =20 // + // Select bluetooth device. + // + BtDevice =3D SELECT_BLUE_TOOTH_BCM2E40; + PcdSet8 (PcdBtDevice, (UINT8) BtDevice); + + // // Board specific VBT table. // BufferSize =3D sizeof (EFI_GUID); diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMe= m/BoardInitMiscs.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardIn= itPostMem/BoardInitMiscs.h index 2c8c7eb..37faf87 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitMiscs.h +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitMiscs.h @@ -23,6 +23,13 @@ // #define RES_MEM32_MIN_LEN 0x38000000 =20 +// +// Bluetooth device identifier. +// +#define SELECT_BLUE_TOOTH_DISABLE 0x00 +#define SELECT_BLUE_TOOTH_BCM2E40 0x01 +#define SELECT_BLUE_TOOTH_BCM2EA1 0x02 + #define RES_IO_BASE 0x0D00 #define RES_IO_LIMIT 0xFFFF =20 diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMe= m/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/Boa= rdInitPostMem/BoardInitPostMem.inf index 1392cdd..665a557 100644 --- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitPostMem.inf +++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/Board= InitPostMem.inf @@ -60,7 +60,8 @@ gPlatformModuleTokenSpaceGuid.PcdResetType gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid gPlatformModuleTokenSpaceGuid.PcdSueCreek - gPlatformModuleTokenSpaceGuid.PcdLogoDisplay + gPlatformModuleTokenSpaceGuid.PcdLogoDisplay + gPlatformModuleTokenSpaceGuid.PcdBtDevice =20 [Guids] gEfiPlatformInfoGuid diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atform.c b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlat= form.c index f0a77d1..d0c668e 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatform.c @@ -1456,7 +1456,7 @@ AcpiPlatformEntryPoint ( mGlobalNvsArea.Area->Rtd3Support =3D mSystemConfigura= tion.Rtd3Support; mGlobalNvsArea.Area->RTD3Config0 =3D mSystemConfigura= tion.RTD3ZPODD; mGlobalNvsArea.Area->EnableModernStandby =3D mSystemConfigura= tion.ConsolidatedPR; - mGlobalNvsArea.Area->SelectBtDevice =3D mSystemConfigura= tion.SelectBtDevice; + mGlobalNvsArea.Area->SelectBtDevice =3D (UINT8) PcdGet8 = (PcdBtDevice); mGlobalNvsArea.Area->ScHdAudioIoBufferOwnership =3D mSystemConfigura= tion.ScHdAudioIoBufferOwnership; mGlobalNvsArea.Area->XdciEnable =3D mSystemConfigura= tion.ScUsbOtg; mGlobalNvsArea.Area->PciDelayOptimizationEcr =3D mSystemConfigura= tion.PciDelayOptimizationEcr; diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPl= atformDxe.inf b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/Acp= iPlatformDxe.inf index be047c1..9d451f5 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiPlatformDxe/AcpiPlatformD= xe.inf @@ -87,6 +87,7 @@ gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress gPlatformModuleTokenSpaceGuid.PcdResetType gPlatformModuleTokenSpaceGuid.PcdSueCreek + gPlatformModuleTokenSpaceGuid.PcdBtDevice =20 [Depex] gEfiAcpiSupportProtocolGuid AND diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/Platfor= mSsdt/Bluetooth/LBEE5KL1DX.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/Ac= piTablesPCAT/PlatformSsdt/Bluetooth/LBEE5KL1DX.asl index 0421cf6..6110c56 100644 --- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/B= luetooth/LBEE5KL1DX.asl +++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/PlatformSsdt/B= luetooth/LBEE5KL1DX.asl @@ -32,7 +32,10 @@ Scope(\_SB.PCI0.URT1) } =20 Method (_STA, 0x0, NotSerialized) { - Return (0xF) + If (LEqual (SBTD, 1)) { + Return (0xF) + } + Return (0) } =20 Name (_S0W, 2) // required to put the devic= e to D2 during S0 idle diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSe= tupDxe/SouthClusterConfig.vfi b/Platform/BroxtonPlatformPkg/Common/Platform= Settings/PlatformSetupDxe/SouthClusterConfig.vfi index 1b0e93d..448105c 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/= SouthClusterConfig.vfi @@ -186,6 +186,7 @@ form formid =3D MISC_OPTIONS_FORM_ID, subtitle text =3D STRING_TOKEN(STR_NULL_STRING); subtitle text =3D STRING_TOKEN(STR_LPSS_DEVICE_SETTING_SUBTITLE); =20 +suppressif TRUE; oneof varid =3D SETUP_DATA.SelectBtDevice, prompt =3D STRING_TOKEN(STR_PCH_SERIAL_IO_BLUETOOTH_DEVICE), help =3D STRING_TOKEN(STR_PCH_SERIAL_IO_BLUETOOTH_HELP), @@ -193,6 +194,7 @@ form formid =3D MISC_OPTIONS_FORM_ID, option text =3D STRING_TOKEN(STR_BT_BCM2E40), value =3D 1, flags =3D= RESET_REQUIRED; // option text =3D STRING_TOKEN(STR_BT_BCM2EA1), value =3D 2, flags = =3D RESET_REQUIRED; endoneof; +endif; =20 oneof varid =3D Setup.I2s343A, prompt =3D STRING_TOKEN(STR_I2C_DEVICE_CODEC_INT343A_PROMPT), diff --git a/Platform/BroxtonPlatformPkg/PlatformPkg.dec b/Platform/Broxton= PlatformPkg/PlatformPkg.dec index 5d372b0..8bf6dc2 100644 --- a/Platform/BroxtonPlatformPkg/PlatformPkg.dec +++ b/Platform/BroxtonPlatformPkg/PlatformPkg.dec @@ -185,7 +185,9 @@ ## This PCD used to enable or disable SueCreek gPlatformModuleTokenSpaceGuid.PcdSueCreek|FALSE|BOOLEAN|0x80000015 ## This PCD used for QR code display under EFI Shell - gPlatformModuleTokenSpaceGuid.PcdLogoDisplay|FALSE|BOOLEAN|0x80000016 + gPlatformModuleTokenSpaceGuid.PcdLogoDisplay|FALSE|BOOLEAN|0x80000016 + ## This PCD used to select bluetooth device + gPlatformModuleTokenSpaceGuid.PcdBtDevice|0x00|UINT8|0x80000017 =20 ## MemoryCheck value for checking memory before boot OS. ## To save the boot performance, the default MemoryCheck is set to 0. --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel