ar8031_driver.h File Reference

AR8031 Gigabit Ethernet PHY transceiver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define AR8031_PHY_ADDR   0
 
#define AR8031_BMCR   0x00
 
#define AR8031_BMSR   0x01
 
#define AR8031_PHYID1   0x02
 
#define AR8031_PHYID2   0x03
 
#define AR8031_ANAR   0x04
 
#define AR8031_ANLPAR   0x05
 
#define AR8031_ANER   0x06
 
#define AR8031_ANNPR   0x07
 
#define AR8031_ANLPNPR   0x08
 
#define AR8031_GBCR   0x09
 
#define AR8031_GBSR   0x0A
 
#define AR8031_MMDACR   0x0D
 
#define AR8031_MMDAADR   0x0E
 
#define AR8031_GBESR   0x0F
 
#define AR8031_FUNC_CTRL   0x10
 
#define AR8031_PHY_STATUS   0x11
 
#define AR8031_INT_EN   0x12
 
#define AR8031_INT_STATUS   0x13
 
#define AR8031_SMART_SPEED   0x14
 
#define AR8031_CDT_CTRL   0x16
 
#define AR8031_LED_CTRL   0x18
 
#define AR8031_MAN_LED_OVERRIDE   0x19
 
#define AR8031_COPPER_FIBER_STATUS   0x1B
 
#define AR8031_CDT_STATUS   0x1C
 
#define AR8031_DBG_PORT_ADDR_OFFSET   0x1D
 
#define AR8031_DBG_PORT_DATA   0x1E
 
#define AR8031_CHIP_CONF   0x1F
 
#define AR8031_BMCR_RESET   0x8000
 
#define AR8031_BMCR_LOOPBACK   0x4000
 
#define AR8031_BMCR_SPEED_SEL_LSB   0x2000
 
#define AR8031_BMCR_AN_EN   0x1000
 
#define AR8031_BMCR_POWER_DOWN   0x0800
 
#define AR8031_BMCR_ISOLATE   0x0400
 
#define AR8031_BMCR_RESTART_AN   0x0200
 
#define AR8031_BMCR_DUPLEX_MODE   0x0100
 
#define AR8031_BMCR_COL_TEST   0x0080
 
#define AR8031_BMCR_SPEED_SEL_MSB   0x0040
 
#define AR8031_BMSR_100BT4   0x8000
 
#define AR8031_BMSR_100BTX_FD   0x4000
 
#define AR8031_BMSR_100BTX_HD   0x2000
 
#define AR8031_BMSR_10BT_FD   0x1000
 
#define AR8031_BMSR_10BT_HD   0x0800
 
#define AR8031_BMSR_100BT2_FD   0x0400
 
#define AR8031_BMSR_100BT2_HD   0x0200
 
#define AR8031_BMSR_EXTENDED_STATUS   0x0100
 
#define AR8031_BMSR_MF_PREAMBLE_SUPPR   0x0040
 
#define AR8031_BMSR_AN_COMPLETE   0x0020
 
#define AR8031_BMSR_REMOTE_FAULT   0x0010
 
#define AR8031_BMSR_AN_CAPABLE   0x0008
 
#define AR8031_BMSR_LINK_STATUS   0x0004
 
#define AR8031_BMSR_JABBER_DETECT   0x0002
 
#define AR8031_BMSR_EXTENDED_CAPABLE   0x0001
 
#define AR8031_PHYID1_OUI_MSB   0xFFFF
 
#define AR8031_PHYID1_OUI_MSB_DEFAULT   0x004D
 
#define AR8031_PHYID2_OUI_LSB   0xFC00
 
#define AR8031_PHYID2_OUI_LSB_DEFAULT   0xD000
 
#define AR8031_PHYID2_MODEL_NUM   0x03F0
 
#define AR8031_PHYID2_MODEL_NUM_DEFAULT   0x0070
 
#define AR8031_PHYID2_REVISION_NUM   0x000F
 
#define AR8031_ANAR_NEXT_PAGE   0x8000
 
#define AR8031_ANAR_ACK   0x4000
 
#define AR8031_ANAR_REMOTE_FAULT   0x2000
 
#define AR8031_ANAR_XNP_ABLE   0x1000
 
#define AR8031_ANAR_ASYM_PAUSE   0x0800
 
#define AR8031_ANAR_PAUSE   0x0400
 
#define AR8031_ANAR_100BT4   0x0200
 
#define AR8031_ANAR_100BTX_FD   0x0100
 
#define AR8031_ANAR_100BTX_HD   0x0080
 
#define AR8031_ANAR_10BT_FD   0x0040
 
#define AR8031_ANAR_10BT_HD   0x0020
 
#define AR8031_ANAR_SELECTOR   0x001F
 
#define AR8031_ANAR_SELECTOR_DEFAULT   0x0001
 
#define AR8031_ANLPAR_NEXT_PAGE   0x8000
 
#define AR8031_ANLPAR_ACK   0x4000
 
#define AR8031_ANLPAR_REMOTE_FAULT   0x2000
 
#define AR8031_ANLPAR_ASYM_PAUSE   0x0800
 
#define AR8031_ANLPAR_PAUSE   0x0400
 
#define AR8031_ANLPAR_100BT4   0x0200
 
#define AR8031_ANLPAR_100BTX_FD   0x0100
 
#define AR8031_ANLPAR_100BTX_HD   0x0080
 
#define AR8031_ANLPAR_10BT_FD   0x0040
 
#define AR8031_ANLPAR_10BT_HD   0x0020
 
#define AR8031_ANLPAR_SELECTOR   0x001F
 
#define AR8031_ANLPAR_SELECTOR_DEFAULT   0x0001
 
#define AR8031_ANER_PAR_DETECT_FAULT   0x0010
 
#define AR8031_ANER_LP_NEXT_PAGE_ABLE   0x0008
 
#define AR8031_ANER_NEXT_PAGE_ABLE   0x0004
 
#define AR8031_ANER_PAGE_RECEIVED   0x0002
 
#define AR8031_ANER_LP_AN_ABLE   0x0001
 
#define AR8031_ANNPR_NEXT_PAGE   0x8000
 
#define AR8031_ANNPR_MSG_PAGE   0x2000
 
#define AR8031_ANNPR_ACK2   0x1000
 
#define AR8031_ANNPR_TOGGLE   0x0800
 
#define AR8031_ANNPR_MESSAGE   0x07FF
 
#define AR8031_ANLPNPR_NEXT_PAGE   0x8000
 
#define AR8031_ANLPNPR_MSG_PAGE   0x2000
 
#define AR8031_ANLPNPR_ACK2   0x1000
 
#define AR8031_ANLPNPR_TOGGLE   0x0800
 
#define AR8031_ANLPNPR_MESSAGE   0x07FF
 
#define AR8031_GBCR_TEST_MODE   0xE000
 
#define AR8031_GBCR_MS_MAN_CONF_EN   0x1000
 
#define AR8031_GBCR_MS_MAN_CONF_VAL   0x0800
 
#define AR8031_GBCR_PORT_TYPE   0x0400
 
#define AR8031_GBCR_1000BT_FD   0x0200
 
#define AR8031_GBCR_1000BT_HD   0x0100
 
#define AR8031_GBSR_MS_CONF_FAULT   0x8000
 
#define AR8031_GBSR_MS_CONF_RES   0x4000
 
#define AR8031_GBSR_LOCAL_RECEIVER_STATUS   0x2000
 
#define AR8031_GBSR_REMOTE_RECEIVER_STATUS   0x1000
 
#define AR8031_GBSR_LP_1000BT_FD   0x0800
 
#define AR8031_GBSR_LP_1000BT_HD   0x0400
 
#define AR8031_GBSR_IDLE_ERR_COUNT   0x00FF
 
#define AR8031_MMDACR_FUNC   0xC000
 
#define AR8031_MMDACR_FUNC_ADDR   0x0000
 
#define AR8031_MMDACR_FUNC_DATA_NO_POST_INC   0x4000
 
#define AR8031_MMDACR_FUNC_DATA_POST_INC_RW   0x8000
 
#define AR8031_MMDACR_FUNC_DATA_POST_INC_W   0xC000
 
#define AR8031_MMDACR_DEVAD   0x001F
 
#define AR8031_GBESR_1000BX_FD   0x8000
 
#define AR8031_GBESR_1000BX_HD   0x4000
 
#define AR8031_GBESR_1000BT_FD   0x2000
 
#define AR8031_GBESR_1000BT_HD   0x1000
 
#define AR8031_FUNC_CTRL_ASSERT_CRS_ON_TX   0x0800
 
#define AR8031_FUNC_CTRL_FORCE_LINK   0x0400
 
#define AR8031_FUNC_CTRL_MDIX_MODE   0x0060
 
#define AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDI   0x0000
 
#define AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDIX   0x0020
 
#define AR8031_FUNC_CTRL_MDIX_MODE_AUTO   0x0060
 
#define AR8031_FUNC_CTRL_SQE_TEST   0x0004
 
#define AR8031_FUNC_CTRL_POLARITY_REVERSAL   0x0002
 
#define AR8031_FUNC_CTRL_JABBER_DIS   0x0001
 
#define AR8031_PHY_STATUS_SPEED   0xC000
 
#define AR8031_PHY_STATUS_SPEED_10MBPS   0x0000
 
#define AR8031_PHY_STATUS_SPEED_100MBPS   0x4000
 
#define AR8031_PHY_STATUS_SPEED_1000MBPS   0x8000
 
#define AR8031_PHY_STATUS_DUPLEX   0x2000
 
#define AR8031_PHY_STATUS_PAGE_RECEIVED   0x1000
 
#define AR8031_PHY_STATUS_SPEED_DUPLEX_RESOLVED   0x0800
 
#define AR8031_PHY_STATUS_LINK   0x0400
 
#define AR8031_PHY_STATUS_MDI_CROSSOVER_STATUS   0x0040
 
#define AR8031_PHY_STATUS_WIRESPEED_DOWNGRADE   0x0020
 
#define AR8031_PHY_STATUS_TX_PAUSE_EN   0x0008
 
#define AR8031_PHY_STATUS_RX_PAUSE_EN   0x0004
 
#define AR8031_PHY_STATUS_POLARITY   0x0002
 
#define AR8031_PHY_STATUS_JABBER   0x0001
 
#define AR8031_INT_EN_AN_ERROR   0x8000
 
#define AR8031_INT_EN_SPEED_CHANGED   0x4000
 
#define AR8031_INT_EN_PAGE_RECEIVED   0x1000
 
#define AR8031_INT_EN_LINK_FAIL   0x0800
 
#define AR8031_INT_EN_LINK_SUCCESS   0x0400
 
#define AR8031_INT_EN_FAST_LINK_DOWN1   0x0200
 
#define AR8031_INT_EN_LINK_FAIL_BX   0x0100
 
#define AR8031_INT_EN_LINK_SUCCESS_BX   0x0080
 
#define AR8031_INT_EN_FAST_LINK_DOWN0   0x0040
 
#define AR8031_INT_EN_WIRESPEED_DOWNGRADE   0x0020
 
#define AR8031_INT_EN_10MS_PTP   0x0010
 
#define AR8031_INT_EN_RX_PTP   0x0008
 
#define AR8031_INT_EN_TX_PTP   0x0004
 
#define AR8031_INT_EN_POLARITY_CHANGED   0x0002
 
#define AR8031_INT_EN_WOL_PTP   0x0001
 
#define AR8031_INT_STATUS_AN_ERROR   0x8000
 
#define AR8031_INT_STATUS_SPEED_CHANGED   0x4000
 
#define AR8031_INT_STATUS_PAGE_RECEIVED   0x1000
 
#define AR8031_INT_STATUS_LINK_FAIL   0x0800
 
#define AR8031_INT_STATUS_LINK_SUCCESS   0x0400
 
#define AR8031_INT_STATUS_FAST_LINK_DOWN1   0x0200
 
#define AR8031_INT_STATUS_LINK_FAIL_BX   0x0100
 
#define AR8031_INT_STATUS_LINK_SUCCESS_BX   0x0080
 
#define AR8031_INT_STATUS_FAST_LINK_DOWN0   0x0040
 
#define AR8031_INT_STATUS_WIRESPEED_DOWNGRADE   0x0020
 
#define AR8031_INT_STATUS_10MS_PTP   0x0010
 
#define AR8031_INT_STATUS_RX_PTP   0x0008
 
#define AR8031_INT_STATUS_TX_PTP   0x0004
 
#define AR8031_INT_STATUS_POLARITY_CHANGED   0x0002
 
#define AR8031_INT_STATUS_WOL_PTP   0x0001
 
#define AR8031_SMART_SPEED_EN   0x0020
 
#define AR8031_SMART_SPEED_RETRY_LIMIT   0x001C
 
#define AR8031_SMART_SPEED_BYPASS_TIMER   0x0002
 
#define AR8031_CDT_CTRL_MDI_PAIR_SELECT   0x0300
 
#define AR8031_CDT_CTRL_TEST_EN   0x0001
 
#define AR8031_LED_CTRL_LED_DIS   0x8000
 
#define AR8031_LED_CTRL_LED_ON_TIME   0x7000
 
#define AR8031_LED_CTRL_LED_OFF_TIME   0x0700
 
#define AR8031_LED_CTRL_LED_LINK_CTRL   0x0018
 
#define AR8031_LED_CTRL_LED_ACT_CTRL   0x0004
 
#define AR8031_MAN_LED_OVERRIDE_LED_ACT   0x1000
 
#define AR8031_MAN_LED_OVERRIDE_LED_LINK10_100_CTRL   0x00C0
 
#define AR8031_MAN_LED_OVERRIDE_LED_RX_CTRL   0x000C
 
#define AR8031_MAN_LED_OVERRIDE_LED_TX_CTRL   0x0003
 
#define AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BX   0x2000
 
#define AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BX   0x1000
 
#define AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BX   0x0800
 
#define AR8031_COPPER_FIBER_STATUS_FD_MODE_BX   0x0400
 
#define AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BX   0x0300
 
#define AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BT   0x0020
 
#define AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BT   0x0010
 
#define AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BT   0x0008
 
#define AR8031_COPPER_FIBER_STATUS_FD_MODE_BT   0x0004
 
#define AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BT   0x0003
 
#define AR8031_CDT_STATUS_STATUS   0x0300
 
#define AR8031_CDT_STATUS_DELTA_TIME   0x00FF
 
#define AR8031_CHIP_CONF_BT_BX_REG_SEL   0x8000
 
#define AR8031_CHIP_CONF_SMII_IMP_50_75_AUTO   0x4000
 
#define AR8031_CHIP_CONF_SGMII_RXIMP_50_75   0x2000
 
#define AR8031_CHIP_CONF_SGMII_TXIMP_50_75   0x1000
 
#define AR8031_CHIP_CONF_PRIORITY_SEL   0x0400
 
#define AR8031_CHIP_CONF_FIBER_MODE_AUTO   0x0100
 
#define AR8031_CHIP_CONF_MODE_CFG_QUAL   0x00F0
 
#define AR8031_CHIP_CONF_MODE_CFG   0x000F
 

Functions

error_t ar8031Init (NetInterface *interface)
 AR8031 PHY transceiver initialization. More...
 
void ar8031Tick (NetInterface *interface)
 AR8031 timer handler. More...
 
void ar8031EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void ar8031DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void ar8031EventHandler (NetInterface *interface)
 AR8031 event handler. More...
 
void ar8031WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t ar8031ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void ar8031DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver ar8031PhyDriver
 AR8031 Ethernet PHY driver. More...
 

Detailed Description

AR8031 Gigabit Ethernet PHY transceiver.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2019 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
1.9.6

Definition in file ar8031_driver.h.

Macro Definition Documentation

◆ AR8031_ANAR

#define AR8031_ANAR   0x04

Definition at line 49 of file ar8031_driver.h.

◆ AR8031_ANAR_100BT4

#define AR8031_ANAR_100BT4   0x0200

Definition at line 120 of file ar8031_driver.h.

◆ AR8031_ANAR_100BTX_FD

#define AR8031_ANAR_100BTX_FD   0x0100

Definition at line 121 of file ar8031_driver.h.

◆ AR8031_ANAR_100BTX_HD

#define AR8031_ANAR_100BTX_HD   0x0080

Definition at line 122 of file ar8031_driver.h.

◆ AR8031_ANAR_10BT_FD

#define AR8031_ANAR_10BT_FD   0x0040

Definition at line 123 of file ar8031_driver.h.

◆ AR8031_ANAR_10BT_HD

#define AR8031_ANAR_10BT_HD   0x0020

Definition at line 124 of file ar8031_driver.h.

◆ AR8031_ANAR_ACK

#define AR8031_ANAR_ACK   0x4000

Definition at line 115 of file ar8031_driver.h.

◆ AR8031_ANAR_ASYM_PAUSE

#define AR8031_ANAR_ASYM_PAUSE   0x0800

Definition at line 118 of file ar8031_driver.h.

◆ AR8031_ANAR_NEXT_PAGE

#define AR8031_ANAR_NEXT_PAGE   0x8000

Definition at line 114 of file ar8031_driver.h.

◆ AR8031_ANAR_PAUSE

#define AR8031_ANAR_PAUSE   0x0400

Definition at line 119 of file ar8031_driver.h.

◆ AR8031_ANAR_REMOTE_FAULT

#define AR8031_ANAR_REMOTE_FAULT   0x2000

Definition at line 116 of file ar8031_driver.h.

◆ AR8031_ANAR_SELECTOR

#define AR8031_ANAR_SELECTOR   0x001F

Definition at line 125 of file ar8031_driver.h.

◆ AR8031_ANAR_SELECTOR_DEFAULT

#define AR8031_ANAR_SELECTOR_DEFAULT   0x0001

Definition at line 126 of file ar8031_driver.h.

◆ AR8031_ANAR_XNP_ABLE

#define AR8031_ANAR_XNP_ABLE   0x1000

Definition at line 117 of file ar8031_driver.h.

◆ AR8031_ANER

#define AR8031_ANER   0x06

Definition at line 51 of file ar8031_driver.h.

◆ AR8031_ANER_LP_AN_ABLE

#define AR8031_ANER_LP_AN_ABLE   0x0001

Definition at line 147 of file ar8031_driver.h.

◆ AR8031_ANER_LP_NEXT_PAGE_ABLE

#define AR8031_ANER_LP_NEXT_PAGE_ABLE   0x0008

Definition at line 144 of file ar8031_driver.h.

◆ AR8031_ANER_NEXT_PAGE_ABLE

#define AR8031_ANER_NEXT_PAGE_ABLE   0x0004

Definition at line 145 of file ar8031_driver.h.

◆ AR8031_ANER_PAGE_RECEIVED

#define AR8031_ANER_PAGE_RECEIVED   0x0002

Definition at line 146 of file ar8031_driver.h.

◆ AR8031_ANER_PAR_DETECT_FAULT

#define AR8031_ANER_PAR_DETECT_FAULT   0x0010

Definition at line 143 of file ar8031_driver.h.

◆ AR8031_ANLPAR

#define AR8031_ANLPAR   0x05

Definition at line 50 of file ar8031_driver.h.

◆ AR8031_ANLPAR_100BT4

#define AR8031_ANLPAR_100BT4   0x0200

Definition at line 134 of file ar8031_driver.h.

◆ AR8031_ANLPAR_100BTX_FD

#define AR8031_ANLPAR_100BTX_FD   0x0100

Definition at line 135 of file ar8031_driver.h.

◆ AR8031_ANLPAR_100BTX_HD

#define AR8031_ANLPAR_100BTX_HD   0x0080

Definition at line 136 of file ar8031_driver.h.

◆ AR8031_ANLPAR_10BT_FD

#define AR8031_ANLPAR_10BT_FD   0x0040

Definition at line 137 of file ar8031_driver.h.

◆ AR8031_ANLPAR_10BT_HD

#define AR8031_ANLPAR_10BT_HD   0x0020

Definition at line 138 of file ar8031_driver.h.

◆ AR8031_ANLPAR_ACK

#define AR8031_ANLPAR_ACK   0x4000

Definition at line 130 of file ar8031_driver.h.

◆ AR8031_ANLPAR_ASYM_PAUSE

#define AR8031_ANLPAR_ASYM_PAUSE   0x0800

Definition at line 132 of file ar8031_driver.h.

◆ AR8031_ANLPAR_NEXT_PAGE

#define AR8031_ANLPAR_NEXT_PAGE   0x8000

Definition at line 129 of file ar8031_driver.h.

◆ AR8031_ANLPAR_PAUSE

#define AR8031_ANLPAR_PAUSE   0x0400

Definition at line 133 of file ar8031_driver.h.

◆ AR8031_ANLPAR_REMOTE_FAULT

#define AR8031_ANLPAR_REMOTE_FAULT   0x2000

Definition at line 131 of file ar8031_driver.h.

◆ AR8031_ANLPAR_SELECTOR

#define AR8031_ANLPAR_SELECTOR   0x001F

Definition at line 139 of file ar8031_driver.h.

◆ AR8031_ANLPAR_SELECTOR_DEFAULT

#define AR8031_ANLPAR_SELECTOR_DEFAULT   0x0001

Definition at line 140 of file ar8031_driver.h.

◆ AR8031_ANLPNPR

#define AR8031_ANLPNPR   0x08

Definition at line 53 of file ar8031_driver.h.

◆ AR8031_ANLPNPR_ACK2

#define AR8031_ANLPNPR_ACK2   0x1000

Definition at line 159 of file ar8031_driver.h.

◆ AR8031_ANLPNPR_MESSAGE

#define AR8031_ANLPNPR_MESSAGE   0x07FF

Definition at line 161 of file ar8031_driver.h.

◆ AR8031_ANLPNPR_MSG_PAGE

#define AR8031_ANLPNPR_MSG_PAGE   0x2000

Definition at line 158 of file ar8031_driver.h.

◆ AR8031_ANLPNPR_NEXT_PAGE

#define AR8031_ANLPNPR_NEXT_PAGE   0x8000

Definition at line 157 of file ar8031_driver.h.

◆ AR8031_ANLPNPR_TOGGLE

#define AR8031_ANLPNPR_TOGGLE   0x0800

Definition at line 160 of file ar8031_driver.h.

◆ AR8031_ANNPR

#define AR8031_ANNPR   0x07

Definition at line 52 of file ar8031_driver.h.

◆ AR8031_ANNPR_ACK2

#define AR8031_ANNPR_ACK2   0x1000

Definition at line 152 of file ar8031_driver.h.

◆ AR8031_ANNPR_MESSAGE

#define AR8031_ANNPR_MESSAGE   0x07FF

Definition at line 154 of file ar8031_driver.h.

◆ AR8031_ANNPR_MSG_PAGE

#define AR8031_ANNPR_MSG_PAGE   0x2000

Definition at line 151 of file ar8031_driver.h.

◆ AR8031_ANNPR_NEXT_PAGE

#define AR8031_ANNPR_NEXT_PAGE   0x8000

Definition at line 150 of file ar8031_driver.h.

◆ AR8031_ANNPR_TOGGLE

#define AR8031_ANNPR_TOGGLE   0x0800

Definition at line 153 of file ar8031_driver.h.

◆ AR8031_BMCR

#define AR8031_BMCR   0x00

Definition at line 45 of file ar8031_driver.h.

◆ AR8031_BMCR_AN_EN

#define AR8031_BMCR_AN_EN   0x1000

Definition at line 77 of file ar8031_driver.h.

◆ AR8031_BMCR_COL_TEST

#define AR8031_BMCR_COL_TEST   0x0080

Definition at line 82 of file ar8031_driver.h.

◆ AR8031_BMCR_DUPLEX_MODE

#define AR8031_BMCR_DUPLEX_MODE   0x0100

Definition at line 81 of file ar8031_driver.h.

◆ AR8031_BMCR_ISOLATE

#define AR8031_BMCR_ISOLATE   0x0400

Definition at line 79 of file ar8031_driver.h.

◆ AR8031_BMCR_LOOPBACK

#define AR8031_BMCR_LOOPBACK   0x4000

Definition at line 75 of file ar8031_driver.h.

◆ AR8031_BMCR_POWER_DOWN

#define AR8031_BMCR_POWER_DOWN   0x0800

Definition at line 78 of file ar8031_driver.h.

◆ AR8031_BMCR_RESET

#define AR8031_BMCR_RESET   0x8000

Definition at line 74 of file ar8031_driver.h.

◆ AR8031_BMCR_RESTART_AN

#define AR8031_BMCR_RESTART_AN   0x0200

Definition at line 80 of file ar8031_driver.h.

◆ AR8031_BMCR_SPEED_SEL_LSB

#define AR8031_BMCR_SPEED_SEL_LSB   0x2000

Definition at line 76 of file ar8031_driver.h.

◆ AR8031_BMCR_SPEED_SEL_MSB

#define AR8031_BMCR_SPEED_SEL_MSB   0x0040

Definition at line 83 of file ar8031_driver.h.

◆ AR8031_BMSR

#define AR8031_BMSR   0x01

Definition at line 46 of file ar8031_driver.h.

◆ AR8031_BMSR_100BT2_FD

#define AR8031_BMSR_100BT2_FD   0x0400

Definition at line 91 of file ar8031_driver.h.

◆ AR8031_BMSR_100BT2_HD

#define AR8031_BMSR_100BT2_HD   0x0200

Definition at line 92 of file ar8031_driver.h.

◆ AR8031_BMSR_100BT4

#define AR8031_BMSR_100BT4   0x8000

Definition at line 86 of file ar8031_driver.h.

◆ AR8031_BMSR_100BTX_FD

#define AR8031_BMSR_100BTX_FD   0x4000

Definition at line 87 of file ar8031_driver.h.

◆ AR8031_BMSR_100BTX_HD

#define AR8031_BMSR_100BTX_HD   0x2000

Definition at line 88 of file ar8031_driver.h.

◆ AR8031_BMSR_10BT_FD

#define AR8031_BMSR_10BT_FD   0x1000

Definition at line 89 of file ar8031_driver.h.

◆ AR8031_BMSR_10BT_HD

#define AR8031_BMSR_10BT_HD   0x0800

Definition at line 90 of file ar8031_driver.h.

◆ AR8031_BMSR_AN_CAPABLE

#define AR8031_BMSR_AN_CAPABLE   0x0008

Definition at line 97 of file ar8031_driver.h.

◆ AR8031_BMSR_AN_COMPLETE

#define AR8031_BMSR_AN_COMPLETE   0x0020

Definition at line 95 of file ar8031_driver.h.

◆ AR8031_BMSR_EXTENDED_CAPABLE

#define AR8031_BMSR_EXTENDED_CAPABLE   0x0001

Definition at line 100 of file ar8031_driver.h.

◆ AR8031_BMSR_EXTENDED_STATUS

#define AR8031_BMSR_EXTENDED_STATUS   0x0100

Definition at line 93 of file ar8031_driver.h.

◆ AR8031_BMSR_JABBER_DETECT

#define AR8031_BMSR_JABBER_DETECT   0x0002

Definition at line 99 of file ar8031_driver.h.

◆ AR8031_BMSR_LINK_STATUS

#define AR8031_BMSR_LINK_STATUS   0x0004

Definition at line 98 of file ar8031_driver.h.

◆ AR8031_BMSR_MF_PREAMBLE_SUPPR

#define AR8031_BMSR_MF_PREAMBLE_SUPPR   0x0040

Definition at line 94 of file ar8031_driver.h.

◆ AR8031_BMSR_REMOTE_FAULT

#define AR8031_BMSR_REMOTE_FAULT   0x0010

Definition at line 96 of file ar8031_driver.h.

◆ AR8031_CDT_CTRL

#define AR8031_CDT_CTRL   0x16

Definition at line 64 of file ar8031_driver.h.

◆ AR8031_CDT_CTRL_MDI_PAIR_SELECT

#define AR8031_CDT_CTRL_MDI_PAIR_SELECT   0x0300

Definition at line 261 of file ar8031_driver.h.

◆ AR8031_CDT_CTRL_TEST_EN

#define AR8031_CDT_CTRL_TEST_EN   0x0001

Definition at line 262 of file ar8031_driver.h.

◆ AR8031_CDT_STATUS

#define AR8031_CDT_STATUS   0x1C

Definition at line 68 of file ar8031_driver.h.

◆ AR8031_CDT_STATUS_DELTA_TIME

#define AR8031_CDT_STATUS_DELTA_TIME   0x00FF

Definition at line 291 of file ar8031_driver.h.

◆ AR8031_CDT_STATUS_STATUS

#define AR8031_CDT_STATUS_STATUS   0x0300

Definition at line 290 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF

#define AR8031_CHIP_CONF   0x1F

Definition at line 71 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_BT_BX_REG_SEL

#define AR8031_CHIP_CONF_BT_BX_REG_SEL   0x8000

Definition at line 294 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_FIBER_MODE_AUTO

#define AR8031_CHIP_CONF_FIBER_MODE_AUTO   0x0100

Definition at line 299 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_MODE_CFG

#define AR8031_CHIP_CONF_MODE_CFG   0x000F

Definition at line 301 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_MODE_CFG_QUAL

#define AR8031_CHIP_CONF_MODE_CFG_QUAL   0x00F0

Definition at line 300 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_PRIORITY_SEL

#define AR8031_CHIP_CONF_PRIORITY_SEL   0x0400

Definition at line 298 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_SGMII_RXIMP_50_75

#define AR8031_CHIP_CONF_SGMII_RXIMP_50_75   0x2000

Definition at line 296 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_SGMII_TXIMP_50_75

#define AR8031_CHIP_CONF_SGMII_TXIMP_50_75   0x1000

Definition at line 297 of file ar8031_driver.h.

◆ AR8031_CHIP_CONF_SMII_IMP_50_75_AUTO

#define AR8031_CHIP_CONF_SMII_IMP_50_75_AUTO   0x4000

Definition at line 295 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS

#define AR8031_COPPER_FIBER_STATUS   0x1B

Definition at line 67 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_FD_MODE_BT

#define AR8031_COPPER_FIBER_STATUS_FD_MODE_BT   0x0004

Definition at line 286 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_FD_MODE_BX

#define AR8031_COPPER_FIBER_STATUS_FD_MODE_BX   0x0400

Definition at line 281 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BT

#define AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BT   0x0008

Definition at line 285 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BX

#define AR8031_COPPER_FIBER_STATUS_LINK_ESTABLISHED_BX   0x0800

Definition at line 280 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BT

#define AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BT   0x0010

Definition at line 284 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BX

#define AR8031_COPPER_FIBER_STATUS_RX_PAUSE_EN_BX   0x1000

Definition at line 279 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BT

#define AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BT   0x0003

Definition at line 287 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BX

#define AR8031_COPPER_FIBER_STATUS_SPEED_MODE_BX   0x0300

Definition at line 282 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BT

#define AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BT   0x0020

Definition at line 283 of file ar8031_driver.h.

◆ AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BX

#define AR8031_COPPER_FIBER_STATUS_TX_PAUSE_EN_BX   0x2000

Definition at line 278 of file ar8031_driver.h.

◆ AR8031_DBG_PORT_ADDR_OFFSET

#define AR8031_DBG_PORT_ADDR_OFFSET   0x1D

Definition at line 69 of file ar8031_driver.h.

◆ AR8031_DBG_PORT_DATA

#define AR8031_DBG_PORT_DATA   0x1E

Definition at line 70 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL

#define AR8031_FUNC_CTRL   0x10

Definition at line 59 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_ASSERT_CRS_ON_TX

#define AR8031_FUNC_CTRL_ASSERT_CRS_ON_TX   0x0800

Definition at line 195 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_FORCE_LINK

#define AR8031_FUNC_CTRL_FORCE_LINK   0x0400

Definition at line 196 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_JABBER_DIS

#define AR8031_FUNC_CTRL_JABBER_DIS   0x0001

Definition at line 203 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_MDIX_MODE

#define AR8031_FUNC_CTRL_MDIX_MODE   0x0060

Definition at line 197 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_MDIX_MODE_AUTO

#define AR8031_FUNC_CTRL_MDIX_MODE_AUTO   0x0060

Definition at line 200 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDI

#define AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDI   0x0000

Definition at line 198 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDIX

#define AR8031_FUNC_CTRL_MDIX_MODE_MANUAL_MDIX   0x0020

Definition at line 199 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_POLARITY_REVERSAL

#define AR8031_FUNC_CTRL_POLARITY_REVERSAL   0x0002

Definition at line 202 of file ar8031_driver.h.

◆ AR8031_FUNC_CTRL_SQE_TEST

#define AR8031_FUNC_CTRL_SQE_TEST   0x0004

Definition at line 201 of file ar8031_driver.h.

◆ AR8031_GBCR

#define AR8031_GBCR   0x09

Definition at line 54 of file ar8031_driver.h.

◆ AR8031_GBCR_1000BT_FD

#define AR8031_GBCR_1000BT_FD   0x0200

Definition at line 168 of file ar8031_driver.h.

◆ AR8031_GBCR_1000BT_HD

#define AR8031_GBCR_1000BT_HD   0x0100

Definition at line 169 of file ar8031_driver.h.

◆ AR8031_GBCR_MS_MAN_CONF_EN

#define AR8031_GBCR_MS_MAN_CONF_EN   0x1000

Definition at line 165 of file ar8031_driver.h.

◆ AR8031_GBCR_MS_MAN_CONF_VAL

#define AR8031_GBCR_MS_MAN_CONF_VAL   0x0800

Definition at line 166 of file ar8031_driver.h.

◆ AR8031_GBCR_PORT_TYPE

#define AR8031_GBCR_PORT_TYPE   0x0400

Definition at line 167 of file ar8031_driver.h.

◆ AR8031_GBCR_TEST_MODE

#define AR8031_GBCR_TEST_MODE   0xE000

Definition at line 164 of file ar8031_driver.h.

◆ AR8031_GBESR

#define AR8031_GBESR   0x0F

Definition at line 58 of file ar8031_driver.h.

◆ AR8031_GBESR_1000BT_FD

#define AR8031_GBESR_1000BT_FD   0x2000

Definition at line 191 of file ar8031_driver.h.

◆ AR8031_GBESR_1000BT_HD

#define AR8031_GBESR_1000BT_HD   0x1000

Definition at line 192 of file ar8031_driver.h.

◆ AR8031_GBESR_1000BX_FD

#define AR8031_GBESR_1000BX_FD   0x8000

Definition at line 189 of file ar8031_driver.h.

◆ AR8031_GBESR_1000BX_HD

#define AR8031_GBESR_1000BX_HD   0x4000

Definition at line 190 of file ar8031_driver.h.

◆ AR8031_GBSR

#define AR8031_GBSR   0x0A

Definition at line 55 of file ar8031_driver.h.

◆ AR8031_GBSR_IDLE_ERR_COUNT

#define AR8031_GBSR_IDLE_ERR_COUNT   0x00FF

Definition at line 178 of file ar8031_driver.h.

◆ AR8031_GBSR_LOCAL_RECEIVER_STATUS

#define AR8031_GBSR_LOCAL_RECEIVER_STATUS   0x2000

Definition at line 174 of file ar8031_driver.h.

◆ AR8031_GBSR_LP_1000BT_FD

#define AR8031_GBSR_LP_1000BT_FD   0x0800

Definition at line 176 of file ar8031_driver.h.

◆ AR8031_GBSR_LP_1000BT_HD

#define AR8031_GBSR_LP_1000BT_HD   0x0400

Definition at line 177 of file ar8031_driver.h.

◆ AR8031_GBSR_MS_CONF_FAULT

#define AR8031_GBSR_MS_CONF_FAULT   0x8000

Definition at line 172 of file ar8031_driver.h.

◆ AR8031_GBSR_MS_CONF_RES

#define AR8031_GBSR_MS_CONF_RES   0x4000

Definition at line 173 of file ar8031_driver.h.

◆ AR8031_GBSR_REMOTE_RECEIVER_STATUS

#define AR8031_GBSR_REMOTE_RECEIVER_STATUS   0x1000

Definition at line 175 of file ar8031_driver.h.

◆ AR8031_INT_EN

#define AR8031_INT_EN   0x12

Definition at line 61 of file ar8031_driver.h.

◆ AR8031_INT_EN_10MS_PTP

#define AR8031_INT_EN_10MS_PTP   0x0010

Definition at line 232 of file ar8031_driver.h.

◆ AR8031_INT_EN_AN_ERROR

#define AR8031_INT_EN_AN_ERROR   0x8000

Definition at line 222 of file ar8031_driver.h.

◆ AR8031_INT_EN_FAST_LINK_DOWN0

#define AR8031_INT_EN_FAST_LINK_DOWN0   0x0040

Definition at line 230 of file ar8031_driver.h.

◆ AR8031_INT_EN_FAST_LINK_DOWN1

#define AR8031_INT_EN_FAST_LINK_DOWN1   0x0200

Definition at line 227 of file ar8031_driver.h.

◆ AR8031_INT_EN_LINK_FAIL

#define AR8031_INT_EN_LINK_FAIL   0x0800

Definition at line 225 of file ar8031_driver.h.

◆ AR8031_INT_EN_LINK_FAIL_BX

#define AR8031_INT_EN_LINK_FAIL_BX   0x0100

Definition at line 228 of file ar8031_driver.h.

◆ AR8031_INT_EN_LINK_SUCCESS

#define AR8031_INT_EN_LINK_SUCCESS   0x0400

Definition at line 226 of file ar8031_driver.h.

◆ AR8031_INT_EN_LINK_SUCCESS_BX

#define AR8031_INT_EN_LINK_SUCCESS_BX   0x0080

Definition at line 229 of file ar8031_driver.h.

◆ AR8031_INT_EN_PAGE_RECEIVED

#define AR8031_INT_EN_PAGE_RECEIVED   0x1000

Definition at line 224 of file ar8031_driver.h.

◆ AR8031_INT_EN_POLARITY_CHANGED

#define AR8031_INT_EN_POLARITY_CHANGED   0x0002

Definition at line 235 of file ar8031_driver.h.

◆ AR8031_INT_EN_RX_PTP

#define AR8031_INT_EN_RX_PTP   0x0008

Definition at line 233 of file ar8031_driver.h.

◆ AR8031_INT_EN_SPEED_CHANGED

#define AR8031_INT_EN_SPEED_CHANGED   0x4000

Definition at line 223 of file ar8031_driver.h.

◆ AR8031_INT_EN_TX_PTP

#define AR8031_INT_EN_TX_PTP   0x0004

Definition at line 234 of file ar8031_driver.h.

◆ AR8031_INT_EN_WIRESPEED_DOWNGRADE

#define AR8031_INT_EN_WIRESPEED_DOWNGRADE   0x0020

Definition at line 231 of file ar8031_driver.h.

◆ AR8031_INT_EN_WOL_PTP

#define AR8031_INT_EN_WOL_PTP   0x0001

Definition at line 236 of file ar8031_driver.h.

◆ AR8031_INT_STATUS

#define AR8031_INT_STATUS   0x13

Definition at line 62 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_10MS_PTP

#define AR8031_INT_STATUS_10MS_PTP   0x0010

Definition at line 249 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_AN_ERROR

#define AR8031_INT_STATUS_AN_ERROR   0x8000

Definition at line 239 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_FAST_LINK_DOWN0

#define AR8031_INT_STATUS_FAST_LINK_DOWN0   0x0040

Definition at line 247 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_FAST_LINK_DOWN1

#define AR8031_INT_STATUS_FAST_LINK_DOWN1   0x0200

Definition at line 244 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_LINK_FAIL

#define AR8031_INT_STATUS_LINK_FAIL   0x0800

Definition at line 242 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_LINK_FAIL_BX

#define AR8031_INT_STATUS_LINK_FAIL_BX   0x0100

Definition at line 245 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_LINK_SUCCESS

#define AR8031_INT_STATUS_LINK_SUCCESS   0x0400

Definition at line 243 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_LINK_SUCCESS_BX

#define AR8031_INT_STATUS_LINK_SUCCESS_BX   0x0080

Definition at line 246 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_PAGE_RECEIVED

#define AR8031_INT_STATUS_PAGE_RECEIVED   0x1000

Definition at line 241 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_POLARITY_CHANGED

#define AR8031_INT_STATUS_POLARITY_CHANGED   0x0002

Definition at line 252 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_RX_PTP

#define AR8031_INT_STATUS_RX_PTP   0x0008

Definition at line 250 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_SPEED_CHANGED

#define AR8031_INT_STATUS_SPEED_CHANGED   0x4000

Definition at line 240 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_TX_PTP

#define AR8031_INT_STATUS_TX_PTP   0x0004

Definition at line 251 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_WIRESPEED_DOWNGRADE

#define AR8031_INT_STATUS_WIRESPEED_DOWNGRADE   0x0020

Definition at line 248 of file ar8031_driver.h.

◆ AR8031_INT_STATUS_WOL_PTP

#define AR8031_INT_STATUS_WOL_PTP   0x0001

Definition at line 253 of file ar8031_driver.h.

◆ AR8031_LED_CTRL

#define AR8031_LED_CTRL   0x18

Definition at line 65 of file ar8031_driver.h.

◆ AR8031_LED_CTRL_LED_ACT_CTRL

#define AR8031_LED_CTRL_LED_ACT_CTRL   0x0004

Definition at line 269 of file ar8031_driver.h.

◆ AR8031_LED_CTRL_LED_DIS

#define AR8031_LED_CTRL_LED_DIS   0x8000

Definition at line 265 of file ar8031_driver.h.

◆ AR8031_LED_CTRL_LED_LINK_CTRL

#define AR8031_LED_CTRL_LED_LINK_CTRL   0x0018

Definition at line 268 of file ar8031_driver.h.

◆ AR8031_LED_CTRL_LED_OFF_TIME

#define AR8031_LED_CTRL_LED_OFF_TIME   0x0700

Definition at line 267 of file ar8031_driver.h.

◆ AR8031_LED_CTRL_LED_ON_TIME

#define AR8031_LED_CTRL_LED_ON_TIME   0x7000

Definition at line 266 of file ar8031_driver.h.

◆ AR8031_MAN_LED_OVERRIDE

#define AR8031_MAN_LED_OVERRIDE   0x19

Definition at line 66 of file ar8031_driver.h.

◆ AR8031_MAN_LED_OVERRIDE_LED_ACT

#define AR8031_MAN_LED_OVERRIDE_LED_ACT   0x1000

Definition at line 272 of file ar8031_driver.h.

◆ AR8031_MAN_LED_OVERRIDE_LED_LINK10_100_CTRL

#define AR8031_MAN_LED_OVERRIDE_LED_LINK10_100_CTRL   0x00C0

Definition at line 273 of file ar8031_driver.h.

◆ AR8031_MAN_LED_OVERRIDE_LED_RX_CTRL

#define AR8031_MAN_LED_OVERRIDE_LED_RX_CTRL   0x000C

Definition at line 274 of file ar8031_driver.h.

◆ AR8031_MAN_LED_OVERRIDE_LED_TX_CTRL

#define AR8031_MAN_LED_OVERRIDE_LED_TX_CTRL   0x0003

Definition at line 275 of file ar8031_driver.h.

◆ AR8031_MMDAADR

#define AR8031_MMDAADR   0x0E

Definition at line 57 of file ar8031_driver.h.

◆ AR8031_MMDACR

#define AR8031_MMDACR   0x0D

Definition at line 56 of file ar8031_driver.h.

◆ AR8031_MMDACR_DEVAD

#define AR8031_MMDACR_DEVAD   0x001F

Definition at line 186 of file ar8031_driver.h.

◆ AR8031_MMDACR_FUNC

#define AR8031_MMDACR_FUNC   0xC000

Definition at line 181 of file ar8031_driver.h.

◆ AR8031_MMDACR_FUNC_ADDR

#define AR8031_MMDACR_FUNC_ADDR   0x0000

Definition at line 182 of file ar8031_driver.h.

◆ AR8031_MMDACR_FUNC_DATA_NO_POST_INC

#define AR8031_MMDACR_FUNC_DATA_NO_POST_INC   0x4000

Definition at line 183 of file ar8031_driver.h.

◆ AR8031_MMDACR_FUNC_DATA_POST_INC_RW

#define AR8031_MMDACR_FUNC_DATA_POST_INC_RW   0x8000

Definition at line 184 of file ar8031_driver.h.

◆ AR8031_MMDACR_FUNC_DATA_POST_INC_W

#define AR8031_MMDACR_FUNC_DATA_POST_INC_W   0xC000

Definition at line 185 of file ar8031_driver.h.

◆ AR8031_PHY_ADDR

#define AR8031_PHY_ADDR   0

Definition at line 39 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS

#define AR8031_PHY_STATUS   0x11

Definition at line 60 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_DUPLEX

#define AR8031_PHY_STATUS_DUPLEX   0x2000

Definition at line 210 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_JABBER

#define AR8031_PHY_STATUS_JABBER   0x0001

Definition at line 219 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_LINK

#define AR8031_PHY_STATUS_LINK   0x0400

Definition at line 213 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_MDI_CROSSOVER_STATUS

#define AR8031_PHY_STATUS_MDI_CROSSOVER_STATUS   0x0040

Definition at line 214 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_PAGE_RECEIVED

#define AR8031_PHY_STATUS_PAGE_RECEIVED   0x1000

Definition at line 211 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_POLARITY

#define AR8031_PHY_STATUS_POLARITY   0x0002

Definition at line 218 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_RX_PAUSE_EN

#define AR8031_PHY_STATUS_RX_PAUSE_EN   0x0004

Definition at line 217 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_SPEED

#define AR8031_PHY_STATUS_SPEED   0xC000

Definition at line 206 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_SPEED_1000MBPS

#define AR8031_PHY_STATUS_SPEED_1000MBPS   0x8000

Definition at line 209 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_SPEED_100MBPS

#define AR8031_PHY_STATUS_SPEED_100MBPS   0x4000

Definition at line 208 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_SPEED_10MBPS

#define AR8031_PHY_STATUS_SPEED_10MBPS   0x0000

Definition at line 207 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_SPEED_DUPLEX_RESOLVED

#define AR8031_PHY_STATUS_SPEED_DUPLEX_RESOLVED   0x0800

Definition at line 212 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_TX_PAUSE_EN

#define AR8031_PHY_STATUS_TX_PAUSE_EN   0x0008

Definition at line 216 of file ar8031_driver.h.

◆ AR8031_PHY_STATUS_WIRESPEED_DOWNGRADE

#define AR8031_PHY_STATUS_WIRESPEED_DOWNGRADE   0x0020

Definition at line 215 of file ar8031_driver.h.

◆ AR8031_PHYID1

#define AR8031_PHYID1   0x02

Definition at line 47 of file ar8031_driver.h.

◆ AR8031_PHYID1_OUI_MSB

#define AR8031_PHYID1_OUI_MSB   0xFFFF

Definition at line 103 of file ar8031_driver.h.

◆ AR8031_PHYID1_OUI_MSB_DEFAULT

#define AR8031_PHYID1_OUI_MSB_DEFAULT   0x004D

Definition at line 104 of file ar8031_driver.h.

◆ AR8031_PHYID2

#define AR8031_PHYID2   0x03

Definition at line 48 of file ar8031_driver.h.

◆ AR8031_PHYID2_MODEL_NUM

#define AR8031_PHYID2_MODEL_NUM   0x03F0

Definition at line 109 of file ar8031_driver.h.

◆ AR8031_PHYID2_MODEL_NUM_DEFAULT

#define AR8031_PHYID2_MODEL_NUM_DEFAULT   0x0070

Definition at line 110 of file ar8031_driver.h.

◆ AR8031_PHYID2_OUI_LSB

#define AR8031_PHYID2_OUI_LSB   0xFC00

Definition at line 107 of file ar8031_driver.h.

◆ AR8031_PHYID2_OUI_LSB_DEFAULT

#define AR8031_PHYID2_OUI_LSB_DEFAULT   0xD000

Definition at line 108 of file ar8031_driver.h.

◆ AR8031_PHYID2_REVISION_NUM

#define AR8031_PHYID2_REVISION_NUM   0x000F

Definition at line 111 of file ar8031_driver.h.

◆ AR8031_SMART_SPEED

#define AR8031_SMART_SPEED   0x14

Definition at line 63 of file ar8031_driver.h.

◆ AR8031_SMART_SPEED_BYPASS_TIMER

#define AR8031_SMART_SPEED_BYPASS_TIMER   0x0002

Definition at line 258 of file ar8031_driver.h.

◆ AR8031_SMART_SPEED_EN

#define AR8031_SMART_SPEED_EN   0x0020

Definition at line 256 of file ar8031_driver.h.

◆ AR8031_SMART_SPEED_RETRY_LIMIT

#define AR8031_SMART_SPEED_RETRY_LIMIT   0x001C

Definition at line 257 of file ar8031_driver.h.

Function Documentation

◆ ar8031DisableIrq()

void ar8031DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 185 of file ar8031_driver.c.

◆ ar8031DumpPhyReg()

void ar8031DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 298 of file ar8031_driver.c.

◆ ar8031EnableIrq()

void ar8031EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 170 of file ar8031_driver.c.

◆ ar8031EventHandler()

void ar8031EventHandler ( NetInterface interface)

AR8031 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 200 of file ar8031_driver.c.

◆ ar8031Init()

error_t ar8031Init ( NetInterface interface)

AR8031 PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 62 of file ar8031_driver.c.

◆ ar8031ReadPhyReg()

uint16_t ar8031ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

Parameters
[in]interfaceUnderlying network interface
[in]addressPHY register address
Returns
Register value

Definition at line 285 of file ar8031_driver.c.

◆ ar8031Tick()

void ar8031Tick ( NetInterface interface)

AR8031 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 132 of file ar8031_driver.c.

◆ ar8031WritePhyReg()

void ar8031WritePhyReg ( NetInterface interface,
uint8_t  address,
uint16_t  data 
)

Write PHY register.

Parameters
[in]interfaceUnderlying network interface
[in]addressPHY register address
[in]dataRegister value

Definition at line 269 of file ar8031_driver.c.

Variable Documentation

◆ ar8031PhyDriver

const PhyDriver ar8031PhyDriver

AR8031 Ethernet PHY driver.

Definition at line 44 of file ar8031_driver.c.