Skip to content

Commit

Permalink
Sophgo/DwMac4SnpDxe: Add dwmac4 SNP driver
Browse files Browse the repository at this point in the history
 - Introduce the DWC GMAC driver implementing the Simple Network Protocol (SNP).

 - Add an ETH_ENABLE compilation option to control the loading of network-related
   drivers, which is FALSE by default.

 - Note: The driver is currently not fully functional.

Cc: sharim <[email protected]>

Signed-off-by: Jingyu Li <[email protected]>
  • Loading branch information
jingyu-li98 committed Dec 25, 2024
1 parent e36d426 commit a2feadc
Show file tree
Hide file tree
Showing 8 changed files with 5,471 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Platform/Sophgo/SG2044Pkg/SG2044.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
DEFINE NETWORK_ISCSI_ENABLE = FALSE

DEFINE FLASH_ENABLE = TRUE
DEFINE ETH_ENABLE = FALSE

#
# x64 Emulator
Expand Down Expand Up @@ -276,6 +277,7 @@
RngLib|Silicon/Sophgo/Library/RngLib/RngLib.inf

ResetSystemLib|OvmfPkg/RiscVVirt/Library/ResetSystemLib/BaseResetSystemLib.inf
DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
[LibraryClasses.common.SEC]
ReportStatusCodeLib|MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
Expand Down Expand Up @@ -469,8 +471,11 @@

gUefiCpuPkgTokenSpaceGuid.PcdCpuCoreCrystalClockFrequency|50000000

!if $(ETH_ENABLE) == TRUE
gSophgoTokenSpaceGuid.PcdPhyResetGpio|TRUE
gSophgoTokenSpaceGuid.PcdPhyResetGpioPin|28
gSophgoTokenSpaceGuid.PcdDwMac4DefaultMacAddress|0x12345678ABCD
!endif
[PcdsFixedAtBuild.common]
gSophgoTokenSpaceGuid.PcdSDIOSourceClockFrequency|400000000
gSophgoTokenSpaceGuid.PcdSDIOTransmissionClockFrequency|25000000
Expand Down Expand Up @@ -585,8 +590,11 @@
Silicon/Sophgo/Drivers/SdHostDxe/SdHostDxe.inf
Silicon/Sophgo/Drivers/DwSpiDxe/DwSpiDxe.inf
Silicon/Sophgo/Drivers/DwGpioDxe/DwGpioDxe.inf
!if $(ETH_ENABLE) == TRUE
Silicon/Sophgo/Drivers/Net/StmmacMdioDxe/StmmacMdioDxe.inf
Silicon/Sophgo/Drivers/Net/MotorcommPhyDxe/Motorcomm8531PhyDxe.inf
Silicon/Sophgo/Drivers/Net/DwMac4SnpDxe/DwMac4SnpDxe.inf
!endif

#
# RISC-V Core module
Expand Down
3 changes: 3 additions & 0 deletions Platform/Sophgo/SG2044Pkg/SG2044.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ INF Platform/Sophgo/SG2044Pkg/Drivers/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
# Network modules
#
!include NetworkPkg/Network.fdf.inc
!if $(ETH_ENABLE) == TRUE
INF Silicon/Sophgo/Drivers/Net/StmmacMdioDxe/StmmacMdioDxe.inf
INF Silicon/Sophgo/Drivers/Net/MotorcommPhyDxe/Motorcomm8531PhyDxe.inf
INF Silicon/Sophgo/Drivers/Net/DwMac4SnpDxe/DwMac4SnpDxe.inf
!endif

#
# Random Number Generator Support
Expand Down
Loading

0 comments on commit a2feadc

Please sign in to comment.