Skip to content

Commit a556e2a

Browse files
committed
[dm][ethernet] add MACB and DWMAC ethernet support
They support PTP, too. Signed-off-by: GuEe-GUI <2991707448@qq.com>
1 parent dc414fb commit a556e2a

16 files changed

Lines changed: 5389 additions & 0 deletions

File tree

components/drivers/ethernet/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ menuconfig RT_USING_ETHERNET
77
default n
88

99
if RT_USING_ETHERNET
10+
rsource "cadence/Kconfig"
11+
rsource "synopsys/Kconfig"
1012
osource "$(SOC_DM_ETHERNET_DIR)/Kconfig"
1113
endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
config RT_ETHERNET_CADENCE
2+
bool "Cadence GEM/MACB Ethernet"
3+
depends on RT_USING_PHY_V2
4+
depends on RT_USING_DMA
5+
depends on RT_USING_PIN
6+
7+
config RT_ETHERNET_CADENCE_PCI
8+
bool "PCI supported"
9+
depends on RT_ETHERNET_CADENCE
10+
depends on RT_USING_PCI
11+
12+
config RT_ETHERNET_CADENCE_PTP
13+
bool "PTP supported"
14+
depends on RT_ETHERNET_CADENCE
15+
depends on RT_USING_PTP
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from building import *
2+
3+
group = []
4+
5+
if not GetDepend(['RT_ETHERNET_CADENCE']):
6+
Return('group')
7+
8+
cwd = GetCurrentDir()
9+
CPPPATH = [cwd + '/../../include', cwd + '/../../phy']
10+
11+
src = ['macb.c']
12+
13+
if GetDepend(['RT_ETHERNET_CADENCE_PCI']):
14+
src += ['macb_pci.c']
15+
16+
if GetDepend(['RT_ETHERNET_CADENCE_PTP']):
17+
src += ['macb_ptp.c']
18+
19+
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
20+
21+
Return('group')

0 commit comments

Comments
 (0)