diff mbox series

[edk2,edk-platforms,v1,4/4] Platform/HiKey: enable usb driver

Message ID 1534851338-21419-5-git-send-email-haojian.zhuang@linaro.org
State New
Headers show
Series enable usb driver on HiKey | expand

Commit Message

Haojian Zhuang Aug. 21, 2018, 11:35 a.m. UTC
Enable Designware USB 2.0 device driver on HiKey platform. It's
used in Android Fastboot App.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>

---
 Platform/Hisilicon/HiKey/HiKey.dec |  2 ++
 Platform/Hisilicon/HiKey/HiKey.dsc | 13 +++++++++++++
 Platform/Hisilicon/HiKey/HiKey.fdf |  3 +++
 3 files changed, 18 insertions(+)

-- 
2.7.4

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox series

Patch

diff --git a/Platform/Hisilicon/HiKey/HiKey.dec b/Platform/Hisilicon/HiKey/HiKey.dec
index d5de1a165910..ed9eab7ff2a9 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dec
+++ b/Platform/Hisilicon/HiKey/HiKey.dec
@@ -36,3 +36,5 @@  [PcdsFixedAtBuild.common]
   gHiKeyTokenSpaceGuid.PcdAndroidBootFile|{ 0x36, 0x8b, 0x73, 0x3a, 0xc5, 0xb9, 0x63, 0x47, 0xab, 0xbd, 0x6c, 0xbd, 0x4b, 0x25, 0xf9, 0xff }|VOID*|0x00000002
   gHiKeyTokenSpaceGuid.PcdAndroidFastbootFile|{ 0x2a, 0x50, 0x88, 0x95, 0x70, 0x53, 0xe3, 0x11, 0x86, 0x31, 0xd7, 0xc5, 0x95, 0x13, 0x64, 0xc8 }|VOID*|0x00000003
   gHiKeyTokenSpaceGuid.PcdSdBootDevicePath|L""|VOID*|0x00000004
+  gHiKeyTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L""|VOID*|0x00000005
+  gHiKeyTokenSpaceGuid.PcdArmFastbootFlashLimit|L""|VOID*|0x00000006
diff --git a/Platform/Hisilicon/HiKey/HiKey.dsc b/Platform/Hisilicon/HiKey/HiKey.dsc
index 4b5b73c15afe..93b981767681 100644
--- a/Platform/Hisilicon/HiKey/HiKey.dsc
+++ b/Platform/Hisilicon/HiKey/HiKey.dsc
@@ -53,12 +53,16 @@  [LibraryClasses.common]
   # USB Requirements
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
 
+  UsbSerialNumberLib|Platform/Hisilicon/Library/UsbSerialNumberLib/UsbSerialNumberLib.inf
+
   # Network Libraries
   NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
 
+  DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
+
 [LibraryClasses.common.SEC]
   PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
   ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
@@ -85,6 +89,7 @@  [PcdsFeatureFlag.common]
 [PcdsFixedAtBuild.common]
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|"hikey"
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Alpha"
 
   # System Memory (1GB)
@@ -126,6 +131,11 @@  [PcdsFixedAtBuild.common]
   gEmbeddedTokenSpaceGuid.PcdMetronomeTickPeriod|1000
 
   #
+  # DW USB controller
+  #
+  gDwUsbDxeTokenSpaceGuid.PcdDwUsbDxeBaseAddress|0xF72C0000
+
+  #
   #
   # Fastboot
   #
@@ -222,6 +232,9 @@  [Components.common]
   #
   # USB Peripheral Support
   #
+  Platform/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
+  EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf
+  Platform/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
   EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
 
   #
diff --git a/Platform/Hisilicon/HiKey/HiKey.fdf b/Platform/Hisilicon/HiKey/HiKey.fdf
index 89d3e9280ff6..aedf71667903 100644
--- a/Platform/Hisilicon/HiKey/HiKey.fdf
+++ b/Platform/Hisilicon/HiKey/HiKey.fdf
@@ -152,6 +152,9 @@  [FV.FvMain]
   #
   # USB Peripheral Support
   #
+  INF Platform/Hisilicon/HiKey/HiKeyUsbDxe/HiKeyUsbDxe.inf
+  INF EmbeddedPkg/Drivers/DwUsbDxe/DwUsbDxe.inf
+  INF Platform/Hisilicon/HiKey/HiKeyFastbootDxe/HiKeyFastbootDxe.inf
   INF EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
 
   #