Ethernet Phy Management for RTL8201 series.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
#include "board.h"
#include "delay.h"
#include "conf_clock.h"
#include "conf_eth.h"
#include "conf_rtl8201.h"
#include "macb.h"
Macros | |
#define | EXTPHY_MACB_PHYRSTB_PIN AVR32_PIN_PA01 |
#define | EXTPHY_PHY_ADDR 0x01 |
#define | EXTPHY_PHY_ID 0x001CC810 |
Extended registers for RTL8201 | |
#define | PHY_TEST 0x19 |
Test reg. More... | |
#define | TEST_RMII 0x0400 |
RMII Mode. More... | |
#define | TEST_TXC_OUT 0x0800 |
TXC Out Mask. More... | |
Functions | |
static void | ethernet_phy_hw_reset (void) |
Generate an Hardware Reset on the Phy. More... | |
static void | ethernet_phy_setup_auto_negotiation (volatile avr32_macb_t *macb, volatile unsigned long *config) |
Setup auto-negotiation for the Phy. More... | |
static void | ethernet_phy_setup_rmii (volatile avr32_macb_t *macb) |
Setup the Phy in RMII mode. More... | |
static void | ethernet_phy_sw_reset (volatile avr32_macb_t *macb) |
Generate a Software Reset on the Phy. More... | |
#define EXTPHY_MACB_PHYRSTB_PIN AVR32_PIN_PA01 |
Referenced by ethernet_phy_hw_reset().
#define EXTPHY_PHY_ADDR 0x01 |
Phy Address (set through strap options) This Define must be place in the board configuration
Referenced by ulReadMDIO(), and vWriteMDIO().
#define EXTPHY_PHY_ID 0x001CC810 |
Phy Identifier for the RTL8201
Referenced by prvProbePHY().
#define PHY_TEST 0x19 |
Test reg.
Referenced by ethernet_phy_setup_rmii().
#define TEST_RMII 0x0400 |
#define TEST_TXC_OUT 0x0800 |
|
inlinestatic |
Generate an Hardware Reset on the Phy.
References delay_ms, EXTPHY_MACB_PHYRSTB_PIN, gpio_clr_gpio_pin(), and gpio_set_gpio_pin().
Referenced by xMACBInit().
|
inlinestatic |
Setup auto-negotiation for the Phy.
References BMCR_ANENABLE, BMCR_ANRESTART, BMCR_FULLDPLX, and BMCR_SPEED100.
Referenced by prvProbePHY().
|
inlinestatic |
Setup the Phy in RMII mode.
References PHY_TEST, TEST_RMII, TEST_TXC_OUT, ulReadMDIO(), and vWriteMDIO().
Referenced by prvProbePHY().
|
inlinestatic |
Generate a Software Reset on the Phy.
Referenced by xMACBInit().