Browse Source

Platform/NXP:LX2160: Enable support of USB controller

- Enable support of USB drives on lx2160 RDB board.
- LX2160 has DWC3 controller
- Increase FD size to accomodate USB driver.

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Meenakshi Aggarwal 3 years ago
parent
commit
265ac57497

+ 1 - 0
Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.dsc

@@ -52,6 +52,7 @@
     gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE
   }
 
+  Silicon/NXP/Drivers/UsbHcdInitDxe/UsbHcd.inf
   Platform/NXP/LX2160aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf
 
   #

+ 15 - 3
Platform/NXP/LX2160aRdbPkg/LX2160aRdbPkg.fdf

@@ -23,10 +23,10 @@
 
 [FD.LX2160ARDB_EFI]
 BaseAddress   = 0x82000000|gArmTokenSpaceGuid.PcdFdBaseAddress  #The base address of the FLASH Device.
-Size          = 0x00140000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
+Size          = 0x00160000|gArmTokenSpaceGuid.PcdFdSize         #The size in bytes of the FLASH Device
 ErasePolarity = 1
 BlockSize     = 0x10000
-NumBlocks     = 0x14
+NumBlocks     = 0x16
 
 ################################################################################
 #
@@ -43,7 +43,7 @@ NumBlocks     = 0x14
 # RegionType <FV, DATA, or FILE>
 #
 ################################################################################
-0x00000000|0x00140000
+0x00000000|0x00160000
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
@@ -135,6 +135,18 @@ READ_LOCK_STATUS   = TRUE
   INF FatPkg/EnhancedFatDxe/Fat.inf
   INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
 
+  INF MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+
+  #
+  # USB Support
+  #
+  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
+  INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+
+  INF Silicon/NXP/Drivers/UsbHcdInitDxe/UsbHcd.inf
   #
   # UEFI application (Shell Embedded Boot Loader)
   #

+ 4 - 0
Silicon/NXP/LX2160A/LX2160A.dsc.inc

@@ -43,6 +43,10 @@
   gNxpQoriqLsTokenSpaceGuid.PcdPcieLutBase|0x80000
   gNxpQoriqLsTokenSpaceGuid.PcdPcieLutDbg|0x407FC
 
+  gNxpQoriqLsTokenSpaceGuid.PcdUsbBaseAddr|0x3100000
+  gNxpQoriqLsTokenSpaceGuid.PcdUsbSize|0x10000
+  gNxpQoriqLsTokenSpaceGuid.PcdNumUsbController|2
+
 [PcdsFeatureFlag]
   gNxpQoriqLsTokenSpaceGuid.PcdI2cErratumA009203|TRUE
 

+ 12 - 0
Silicon/NXP/NxpQoriqLs.dsc.inc

@@ -365,6 +365,18 @@
   FatPkg/FatPei/FatPei.inf
   FatPkg/EnhancedFatDxe/Fat.inf
 
+  #
+  # USB
+  #
+
+  MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+  MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+  MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+  MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
+  MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+
+  MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceDxe.inf
+
   #
   # Bds
   #