public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Haojian Zhuang <haojian.zhuang@linaro.org>
To: edk2-devel@lists.01.org
Subject: [PATCH edk-platforms v1 4/4] Platform/HiKey: enable usb driver
Date: Tue, 21 Aug 2018 19:35:38 +0800	[thread overview]
Message-ID: <1534851338-21419-5-git-send-email-haojian.zhuang@linaro.org> (raw)
In-Reply-To: <1534851338-21419-1-git-send-email-haojian.zhuang@linaro.org>

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(+)

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
 
   #
-- 
2.7.4



      parent reply	other threads:[~2018-08-21 11:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 11:35 [PATCH edk-platforms v1 0/4] enable usb driver on HiKey Haojian Zhuang
2018-08-21 11:35 ` [PATCH edk-platforms v1 1/4] Platform/HiKey: add more register definitions Haojian Zhuang
2018-08-21 11:35 ` [PATCH edk-platforms v1 2/4] Platform/HiKey: add usb platform driver Haojian Zhuang
2018-08-21 11:35 ` [PATCH edk-platforms v1 3/4] Platform/HiKey: add fastboot " Haojian Zhuang
2018-08-21 11:35 ` Haojian Zhuang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534851338-21419-5-git-send-email-haojian.zhuang@linaro.org \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox