add user PHY init event

This commit is contained in:
Sergio R. Caprile committed 2026-11-30 12:02:19 -03:00
1 parent 3322a119eb
commit c0630a7039
12 files changed
+12

No files matched your search

+1
View File
@@ -104,6 +104,7 @@ static bool mg_tcpip_driver_imxrt_init(struct mg_tcpip_if *ifp) {
ENET->MSCR = (1 << 8) | ((cr & 0x3f) << 1); // HOLDTIME 2 clks
struct mg_phy phy = {enet_read_phy, enet_write_phy};
mg_phy_init(&phy, d->phy_addr, MG_PHY_LEDS_ACTIVE_HIGH); // MAC clocks PHY
mg_tcpip_call(ifp, MG_TCPIP_EV_PHY_INIT, &phy);
// Select RMII mode, 100M, keep CRC, set max rx length, disable loop
ENET->RCR = (1518 << 16) | MG_BIT(8) | MG_BIT(2);
// ENET->RCR |= MG_BIT(3); // Receive all