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_PHY_REG_BMCR   0x00
 
#define AR8031_PHY_REG_BMSR   0x01
 
#define AR8031_PHY_REG_PHYIDR1   0x02
 
#define AR8031_PHY_REG_PHYIDR2   0x03
 
#define AR8031_PHY_REG_ANAR   0x04
 
#define AR8031_PHY_REG_ANLPAR   0x05
 
#define AR8031_PHY_REG_ANER   0x06
 
#define AR8031_PHY_REG_ANNPTR   0x07
 
#define AR8031_PHY_REG_LPNPAR   0x08
 
#define AR8031_PHY_REG_1000BT_CTRL   0x09
 
#define AR8031_PHY_REG_1000BT_STATUS   0x0A
 
#define AR8031_PHY_REG_MMD_CTRL   0x0D
 
#define AR8031_PHY_REG_MMD_DATA   0x0E
 
#define AR8031_PHY_REG_EXT_STATUS   0x0F
 
#define AR8031_PHY_REG_FUNCTION_CTRL   0x10
 
#define AR8031_PHY_REG_PHY_STATUS   0x11
 
#define AR8031_PHY_REG_INT_EN   0x12
 
#define AR8031_PHY_REG_INT_STATUS   0x13
 
#define AR8031_PHY_REG_SMART_SPEED   0x14
 
#define AR8031_PHY_REG_CDT_CTRL   0x16
 
#define AR8031_PHY_REG_LED_CTRL   0x18
 
#define AR8031_PHY_REG_MAN_LED_OVERRIDE   0x19
 
#define AR8031_PHY_REG_CDT_STATUS   0x1C
 
#define AR8031_PHY_REG_DBG_PORT   0x1D
 
#define AR8031_PHY_REG_DBG_PORT2   0x1E
 
#define AR8031_PHY_REG_CHIP_CONFIG   0x1F
 
#define BMCR_RESET   (1 << 15)
 
#define BMCR_LOOPBACK   (1 << 14)
 
#define BMCR_SPEED_SEL_LSB   (1 << 13)
 
#define BMCR_AN_EN   (1 << 12)
 
#define BMCR_POWER_DOWN   (1 << 11)
 
#define BMCR_ISOLATE   (1 << 10)
 
#define BMCR_RESTART_AN   (1 << 9)
 
#define BMCR_DUPLEX_MODE   (1 << 8)
 
#define BMCR_COL_TEST   (1 << 7)
 
#define BMCR_SPEED_SEL_MSB   (1 << 6)
 
#define BMSR_100BT4   (1 << 15)
 
#define BMSR_100BTX_FD   (1 << 14)
 
#define BMSR_100BTX_HD   (1 << 13)
 
#define BMSR_10BT_FD   (1 << 12)
 
#define BMSR_10BT_HD   (1 << 11)
 
#define BMSR_100BT2_FD   (1 << 10)
 
#define BMSR_100BT2_HD   (1 << 9)
 
#define BMSR_EXTENDED_STATUS   (1 << 8)
 
#define BMSR_NO_PREAMBLE   (1 << 6)
 
#define BMSR_AN_COMPLETE   (1 << 5)
 
#define BMSR_REMOTE_FAULT   (1 << 4)
 
#define BMSR_AN_ABLE   (1 << 3)
 
#define BMSR_LINK_STATUS   (1 << 2)
 
#define BMSR_JABBER_DETECT   (1 << 1)
 
#define BMSR_EXTENDED_CAP   (1 << 0)
 
#define ANAR_NEXT_PAGE   (1 << 15)
 
#define ANAR_ACK   (1 << 14)
 
#define ANAR_REMOTE_FAULT   (1 << 13)
 
#define ANAR_XNP_ABLE   (1 << 12)
 
#define ANAR_ASYMMETRIC_PAUSE   (1 << 11)
 
#define ANAR_PAUSE   (1 << 10)
 
#define ANAR_100BT4   (1 << 9)
 
#define ANAR_100BTX_FD   (1 << 8)
 
#define ANAR_100BTX_HD   (1 << 7)
 
#define ANAR_10BT_FD   (1 << 6)
 
#define ANAR_10BT_HD   (1 << 5)
 
#define ANAR_SELECTOR4   (1 << 4)
 
#define ANAR_SELECTOR3   (1 << 3)
 
#define ANAR_SELECTOR2   (1 << 2)
 
#define ANAR_SELECTOR1   (1 << 1)
 
#define ANAR_SELECTOR0   (1 << 0)
 
#define ANLPAR_NEXT_PAGE   (1 << 15)
 
#define ANLPAR_ACK   (1 << 14)
 
#define ANLPAR_REMOTE_FAULT   (1 << 13)
 
#define ANLPAR_ASYMMETRIC_PAUSE   (1 << 11)
 
#define ANLPAR_PAUSE   (1 << 10)
 
#define ANLPAR_100BT4   (1 << 9)
 
#define ANLPAR_100BTX_FD   (1 << 8)
 
#define ANLPAR_100BTX_HD   (1 << 7)
 
#define ANLPAR_10BT_FD   (1 << 6)
 
#define ANLPAR_10BT_HD   (1 << 5)
 
#define ANLPAR_SELECTOR4   (1 << 4)
 
#define ANLPAR_SELECTOR3   (1 << 3)
 
#define ANLPAR_SELECTOR2   (1 << 2)
 
#define ANLPAR_SELECTOR1   (1 << 1)
 
#define ANLPAR_SELECTOR0   (1 << 0)
 
#define ANER_PAR_DET_FAULT   (1 << 4)
 
#define ANER_LP_NEXT_PAGE_ABLE   (1 << 3)
 
#define ANER_NEXT_PAGE_ABLE   (1 << 2)
 
#define ANER_PAGE_RECEIVED   (1 << 1)
 
#define ANER_LP_AN_ABLE   (1 << 0)
 
#define ANNPTR_NEXT_PAGE   (1 << 15)
 
#define ANNPTR_MSG_PAGE   (1 << 13)
 
#define ANNPTR_ACK2   (1 << 12)
 
#define ANNPTR_TOGGLE   (1 << 11)
 
#define ANNPTR_MESSAGE10   (1 << 10)
 
#define ANNPTR_MESSAGE9   (1 << 9)
 
#define ANNPTR_MESSAGE8   (1 << 8)
 
#define ANNPTR_MESSAGE7   (1 << 7)
 
#define ANNPTR_MESSAGE6   (1 << 6)
 
#define ANNPTR_MESSAGE5   (1 << 5)
 
#define ANNPTR_MESSAGE4   (1 << 4)
 
#define ANNPTR_MESSAGE3   (1 << 3)
 
#define ANNPTR_MESSAGE2   (1 << 2)
 
#define ANNPTR_MESSAGE1   (1 << 1)
 
#define ANNPTR_MESSAGE0   (1 << 0)
 
#define LPNPAR_NEXT_PAGE   (1 << 15)
 
#define LPNPAR_MSG_PAGE   (1 << 13)
 
#define LPNPAR_ACK2   (1 << 12)
 
#define LPNPAR_TOGGLE   (1 << 11)
 
#define LPNPAR_MESSAGE10   (1 << 10)
 
#define LPNPAR_MESSAGE9   (1 << 9)
 
#define LPNPAR_MESSAGE8   (1 << 8)
 
#define LPNPAR_MESSAGE7   (1 << 7)
 
#define LPNPAR_MESSAGE6   (1 << 6)
 
#define LPNPAR_MESSAGE5   (1 << 5)
 
#define LPNPAR_MESSAGE4   (1 << 4)
 
#define LPNPAR_MESSAGE3   (1 << 3)
 
#define LPNPAR_MESSAGE2   (1 << 2)
 
#define LPNPAR_MESSAGE1   (1 << 1)
 
#define LPNPAR_MESSAGE0   (1 << 0)
 
#define _1000BT_CTRL_TEST_MODE2   (1 << 15)
 
#define _1000BT_CTRL_TEST_MODE1   (1 << 14)
 
#define _1000BT_CTRL_TEST_MODE0   (1 << 13)
 
#define _1000BT_CTRL_MS_MAN_CONF_EN   (1 << 12)
 
#define _1000BT_CTRL_MS_MAN_CONF_VAL   (1 << 11)
 
#define _1000BT_CTRL_PORT_TYPE   (1 << 10)
 
#define _1000BT_CTRL_1000BT_FD   (1 << 9)
 
#define _1000BT_CTRL_1000BT_HD   (1 << 8)
 
#define _1000BT_STATUS_MS_CONF_FAULT   (1 << 15)
 
#define _1000BT_STATUS_MS_CONF_RES   (1 << 14)
 
#define _1000BT_STATUS_LOC_REC_STATUS   (1 << 13)
 
#define _1000BT_STATUS_REM_REC_STATUS   (1 << 12)
 
#define _1000BT_STATUS_LP_1000BT_FD   (1 << 11)
 
#define _1000BT_STATUS_LP_1000BT_HD   (1 << 10)
 
#define _1000BT_STATUS_IDLE_ERR_CTR7   (1 << 7)
 
#define _1000BT_STATUS_IDLE_ERR_CTR6   (1 << 6)
 
#define _1000BT_STATUS_IDLE_ERR_CTR5   (1 << 5)
 
#define _1000BT_STATUS_IDLE_ERR_CTR4   (1 << 4)
 
#define _1000BT_STATUS_IDLE_ERR_CTR3   (1 << 3)
 
#define _1000BT_STATUS_IDLE_ERR_CTR2   (1 << 2)
 
#define _1000BT_STATUS_IDLE_ERR_CTR1   (1 << 1)
 
#define _1000BT_STATUS_IDLE_ERR_CTR0   (1 << 0)
 
#define MMD_CTRL_FUNCTION1   (1 << 15)
 
#define MMD_CTRL_FUNCTION0   (1 << 14)
 
#define MMD_CTRL_DEVAD4   (1 << 4)
 
#define MMD_CTRL_DEVAD3   (1 << 3)
 
#define MMD_CTRL_DEVAD2   (1 << 2)
 
#define MMD_CTRL_DEVAD1   (1 << 1)
 
#define MMD_CTRL_DEVAD0   (1 << 0)
 
#define EXT_STATUS_1000BX_FD   (1 << 15)
 
#define EXT_STATUS_1000BX_HD   (1 << 14)
 
#define EXT_STATUS_1000BT_FD   (1 << 13)
 
#define EXT_STATUS_1000BT_HD   (1 << 12)
 
#define FUNCTION_ASSERT_CRS_ON_TX   (1 << 11)
 
#define FUNCTION_FORCE_LINK   (1 << 10)
 
#define FUNCTION_MDI_CROSSOVER_MODE1   (1 << 6)
 
#define FUNCTION_MDI_CROSSOVER_MODE0   (1 << 5)
 
#define FUNCTION_SQE_TEST   (1 << 2)
 
#define FUNCTION_POLARITY_REVERSAL   (1 << 1)
 
#define FUNCTION_DISABLE_JABBER   (1 << 0)
 
#define PHY_STATUS_SPEED1   (1 << 15)
 
#define PHY_STATUS_SPEED0   (1 << 14)
 
#define PHY_STATUS_DUPLEX   (1 << 13)
 
#define PHY_STATUS_PAGE_RECEIVED   (1 << 12)
 
#define PHY_STATUS_SPEED_DUPLEX_RESOLVED   (1 << 11)
 
#define PHY_STATUS_LINK   (1 << 10)
 
#define PHY_STATUS_MDI_CROSSOVER_STATUS   (1 << 6)
 
#define PHY_STATUS_WIRESPEED_DOWNGRADE   (1 << 5)
 
#define PHY_STATUS_TX_PAUSE_ENABLED   (1 << 3)
 
#define PHY_STATUS_RX_PAUSE_ENABLED   (1 << 2)
 
#define PHY_STATUS_POLARITY   (1 << 1)
 
#define PHY_STATUS_JABBER   (1 << 0)
 
#define PHY_STATUS_SPEED_MASK   (3 << 14)
 
#define PHY_STATUS_SPEED_10   (0 << 14)
 
#define PHY_STATUS_SPEED_100   (1 << 14)
 
#define PHY_STATUS_SPEED_1000   (2 << 14)
 
#define INT_EN_AN_ERROR   (1 << 15)
 
#define INT_EN_SPEED_CHANGED   (1 << 14)
 
#define INT_EN_PAGE_RECEIVED   (1 << 12)
 
#define INT_EN_LINK_FAIL   (1 << 11)
 
#define INT_EN_LINK_SUCCESS   (1 << 10)
 
#define INT_EN_FAST_LINK_DOWN1   (1 << 9)
 
#define INT_EN_LINK_FAIL_BX   (1 << 8)
 
#define INT_EN_LINK_SUCCESS_BX   (1 << 7)
 
#define INT_EN_FAST_LINK_DOWN0   (1 << 6)
 
#define INT_EN_WIRESPEED_DOWNGRADE   (1 << 5)
 
#define INT_EN_10MS_PTP   (1 << 4)
 
#define INT_EN_RX_PTP   (1 << 3)
 
#define INT_EN_TX_PTP   (1 << 2)
 
#define INT_EN_POLARITY_CHANGED   (1 << 1)
 
#define INT_EN_WOL_PTP   (1 << 0)
 
#define INT_STATUS_AN_ERROR   (1 << 15)
 
#define INT_STATUS_SPEED_CHANGED   (1 << 14)
 
#define INT_STATUS_PAGE_RECEIVED   (1 << 12)
 
#define INT_STATUS_LINK_FAIL   (1 << 11)
 
#define INT_STATUS_LINK_SUCCESS   (1 << 10)
 
#define INT_STATUS_FAST_LINK_DOWN1   (1 << 9)
 
#define INT_STATUS_LINK_FAIL_BX   (1 << 8)
 
#define INT_STATUS_LINK_SUCCESS_BX   (1 << 7)
 
#define INT_STATUS_FAST_LINK_DOWN0   (1 << 6)
 
#define INT_STATUS_WIRESPEED_DOWNGRADE   (1 << 5)
 
#define INT_STATUS_10MS_PTP   (1 << 4)
 
#define INT_STATUS_RX_PTP   (1 << 3)
 
#define INT_STATUS_TX_PTP   (1 << 2)
 
#define INT_STATUS_POLARITY_CHANGED   (1 << 1)
 
#define INT_STATUS_WOL_PTP   (1 << 0)
 
#define SMART_SPEED_EN   (1 << 5)
 
#define SMART_SPEED_RETRY_LIMIT2   (1 << 4)
 
#define SMART_SPEED_RETRY_LIMIT1   (1 << 3)
 
#define SMART_SPEED_RETRY_LIMIT0   (1 << 2)
 
#define SMART_SPEED_TIMER   (1 << 1)
 
#define CDT_CTRL_MDI_PAIR_SELECT1   (1 << 9)
 
#define CDT_CTRL_MDI_PAIR_SELECT0   (1 << 8)
 
#define CDT_CTRL_ENABLE_TEST   (1 << 0)
 
#define LED_CTRL_DISABLE_LED   (1 << 15)
 
#define LED_CTRL_LED_ON_TIME2   (1 << 14)
 
#define LED_CTRL_LED_ON_TIME1   (1 << 13)
 
#define LED_CTRL_LED_ON_TIME0   (1 << 12)
 
#define LED_CTRL_LED_OFF_TIME2   (1 << 10)
 
#define LED_CTRL_LED_OFF_TIME1   (1 << 9)
 
#define LED_CTRL_LED_OFF_TIME0   (1 << 8)
 
#define LED_CTRL_LED_LINK_CTRL1   (1 << 4)
 
#define LED_CTRL_LED_LINK_CTRL0   (1 << 3)
 
#define LED_CTRL_LED_ACT_CTRL   (1 << 1)
 
#define MAN_LED_OVERRIDE_LED_ACT_CTRL   (1 << 12)
 
#define MAN_LED_OVERRIDE_LED_LINK_CTRL1   (1 << 7)
 
#define MAN_LED_OVERRIDE_LED_LINK_CTRL0   (1 << 6)
 
#define MAN_LED_OVERRIDE_LED_RX_CTRL1   (1 << 3)
 
#define MAN_LED_OVERRIDE_LED_RX_CTRL0   (1 << 2)
 
#define MAN_LED_OVERRIDE_LED_TX_CTRL1   (1 << 1)
 
#define MAN_LED_OVERRIDE_LED_TX_CTRL0   (1 << 0)
 
#define CDT_STATUS_STATUS1   (1 << 9)
 
#define CDT_STATUS_STATUS0   (1 << 8)
 
#define CDT_STATUS_DELTA_TIME7   (1 << 7)
 
#define CDT_STATUS_DELTA_TIME6   (1 << 6)
 
#define CDT_STATUS_DELTA_TIME5   (1 << 5)
 
#define CDT_STATUS_DELTA_TIME4   (1 << 4)
 
#define CDT_STATUS_DELTA_TIME3   (1 << 3)
 
#define CDT_STATUS_DELTA_TIME2   (1 << 2)
 
#define CDT_STATUS_DELTA_TIME1   (1 << 1)
 
#define CDT_STATUS_DELTA_TIME0   (1 << 0)
 
#define CHIP_CONFIG_BT_BX_REG_SEL   (1 << 15)
 
#define CHIP_CONFIG_SMII_IMP_50_75_AUTO   (1 << 14)
 
#define CHIP_CONFIG_SGMII_RXIMP_50_75   (1 << 13)
 
#define CHIP_CONFIG_SGMII_TXIMP_50_75   (1 << 12)
 
#define CHIP_CONFIG_PRIORITY_SEL   (1 << 10)
 
#define CHIP_CONFIG_FIBER_MODE_AUTO   (1 << 8)
 
#define CHIP_CONFIG_MODE_CFG_QUAL3   (1 << 7)
 
#define CHIP_CONFIG_MODE_CFG_QUAL2   (1 << 6)
 
#define CHIP_CONFIG_MODE_CFG_QUAL1   (1 << 5)
 
#define CHIP_CONFIG_MODE_CFG_QUAL0   (1 << 4)
 
#define CHIP_CONFIG_MODE_CFG3   (1 << 3)
 
#define CHIP_CONFIG_MODE_CFG2   (1 << 2)
 
#define CHIP_CONFIG_MODE_CFG1   (1 << 1)
 
#define CHIP_CONFIG_MODE_CFG0   (1 << 0)
 

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

Copyright (C) 2010-2018 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.0

Definition in file ar8031_driver.h.

Macro Definition Documentation

◆ _1000BT_CTRL_1000BT_FD

#define _1000BT_CTRL_1000BT_FD   (1 << 9)

Definition at line 182 of file ar8031_driver.h.

◆ _1000BT_CTRL_1000BT_HD

#define _1000BT_CTRL_1000BT_HD   (1 << 8)

Definition at line 183 of file ar8031_driver.h.

◆ _1000BT_CTRL_MS_MAN_CONF_EN

#define _1000BT_CTRL_MS_MAN_CONF_EN   (1 << 12)

Definition at line 179 of file ar8031_driver.h.

◆ _1000BT_CTRL_MS_MAN_CONF_VAL

#define _1000BT_CTRL_MS_MAN_CONF_VAL   (1 << 11)

Definition at line 180 of file ar8031_driver.h.

◆ _1000BT_CTRL_PORT_TYPE

#define _1000BT_CTRL_PORT_TYPE   (1 << 10)

Definition at line 181 of file ar8031_driver.h.

◆ _1000BT_CTRL_TEST_MODE0

#define _1000BT_CTRL_TEST_MODE0   (1 << 13)

Definition at line 178 of file ar8031_driver.h.

◆ _1000BT_CTRL_TEST_MODE1

#define _1000BT_CTRL_TEST_MODE1   (1 << 14)

Definition at line 177 of file ar8031_driver.h.

◆ _1000BT_CTRL_TEST_MODE2

#define _1000BT_CTRL_TEST_MODE2   (1 << 15)

Definition at line 176 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR0

#define _1000BT_STATUS_IDLE_ERR_CTR0   (1 << 0)

Definition at line 199 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR1

#define _1000BT_STATUS_IDLE_ERR_CTR1   (1 << 1)

Definition at line 198 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR2

#define _1000BT_STATUS_IDLE_ERR_CTR2   (1 << 2)

Definition at line 197 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR3

#define _1000BT_STATUS_IDLE_ERR_CTR3   (1 << 3)

Definition at line 196 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR4

#define _1000BT_STATUS_IDLE_ERR_CTR4   (1 << 4)

Definition at line 195 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR5

#define _1000BT_STATUS_IDLE_ERR_CTR5   (1 << 5)

Definition at line 194 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR6

#define _1000BT_STATUS_IDLE_ERR_CTR6   (1 << 6)

Definition at line 193 of file ar8031_driver.h.

◆ _1000BT_STATUS_IDLE_ERR_CTR7

#define _1000BT_STATUS_IDLE_ERR_CTR7   (1 << 7)

Definition at line 192 of file ar8031_driver.h.

◆ _1000BT_STATUS_LOC_REC_STATUS

#define _1000BT_STATUS_LOC_REC_STATUS   (1 << 13)

Definition at line 188 of file ar8031_driver.h.

◆ _1000BT_STATUS_LP_1000BT_FD

#define _1000BT_STATUS_LP_1000BT_FD   (1 << 11)

Definition at line 190 of file ar8031_driver.h.

◆ _1000BT_STATUS_LP_1000BT_HD

#define _1000BT_STATUS_LP_1000BT_HD   (1 << 10)

Definition at line 191 of file ar8031_driver.h.

◆ _1000BT_STATUS_MS_CONF_FAULT

#define _1000BT_STATUS_MS_CONF_FAULT   (1 << 15)

Definition at line 186 of file ar8031_driver.h.

◆ _1000BT_STATUS_MS_CONF_RES

#define _1000BT_STATUS_MS_CONF_RES   (1 << 14)

Definition at line 187 of file ar8031_driver.h.

◆ _1000BT_STATUS_REM_REC_STATUS

#define _1000BT_STATUS_REM_REC_STATUS   (1 << 12)

Definition at line 189 of file ar8031_driver.h.

◆ ANAR_100BT4

#define ANAR_100BT4   (1 << 9)

Definition at line 106 of file ar8031_driver.h.

◆ ANAR_100BTX_FD

#define ANAR_100BTX_FD   (1 << 8)

Definition at line 107 of file ar8031_driver.h.

◆ ANAR_100BTX_HD

#define ANAR_100BTX_HD   (1 << 7)

Definition at line 108 of file ar8031_driver.h.

◆ ANAR_10BT_FD

#define ANAR_10BT_FD   (1 << 6)

Definition at line 109 of file ar8031_driver.h.

◆ ANAR_10BT_HD

#define ANAR_10BT_HD   (1 << 5)

Definition at line 110 of file ar8031_driver.h.

◆ ANAR_ACK

#define ANAR_ACK   (1 << 14)

Definition at line 101 of file ar8031_driver.h.

◆ ANAR_ASYMMETRIC_PAUSE

#define ANAR_ASYMMETRIC_PAUSE   (1 << 11)

Definition at line 104 of file ar8031_driver.h.

◆ ANAR_NEXT_PAGE

#define ANAR_NEXT_PAGE   (1 << 15)

Definition at line 100 of file ar8031_driver.h.

◆ ANAR_PAUSE

#define ANAR_PAUSE   (1 << 10)

Definition at line 105 of file ar8031_driver.h.

◆ ANAR_REMOTE_FAULT

#define ANAR_REMOTE_FAULT   (1 << 13)

Definition at line 102 of file ar8031_driver.h.

◆ ANAR_SELECTOR0

#define ANAR_SELECTOR0   (1 << 0)

Definition at line 115 of file ar8031_driver.h.

◆ ANAR_SELECTOR1

#define ANAR_SELECTOR1   (1 << 1)

Definition at line 114 of file ar8031_driver.h.

◆ ANAR_SELECTOR2

#define ANAR_SELECTOR2   (1 << 2)

Definition at line 113 of file ar8031_driver.h.

◆ ANAR_SELECTOR3

#define ANAR_SELECTOR3   (1 << 3)

Definition at line 112 of file ar8031_driver.h.

◆ ANAR_SELECTOR4

#define ANAR_SELECTOR4   (1 << 4)

Definition at line 111 of file ar8031_driver.h.

◆ ANAR_XNP_ABLE

#define ANAR_XNP_ABLE   (1 << 12)

Definition at line 103 of file ar8031_driver.h.

◆ ANER_LP_AN_ABLE

#define ANER_LP_AN_ABLE   (1 << 0)

Definition at line 139 of file ar8031_driver.h.

◆ ANER_LP_NEXT_PAGE_ABLE

#define ANER_LP_NEXT_PAGE_ABLE   (1 << 3)

Definition at line 136 of file ar8031_driver.h.

◆ ANER_NEXT_PAGE_ABLE

#define ANER_NEXT_PAGE_ABLE   (1 << 2)

Definition at line 137 of file ar8031_driver.h.

◆ ANER_PAGE_RECEIVED

#define ANER_PAGE_RECEIVED   (1 << 1)

Definition at line 138 of file ar8031_driver.h.

◆ ANER_PAR_DET_FAULT

#define ANER_PAR_DET_FAULT   (1 << 4)

Definition at line 135 of file ar8031_driver.h.

◆ ANLPAR_100BT4

#define ANLPAR_100BT4   (1 << 9)

Definition at line 123 of file ar8031_driver.h.

◆ ANLPAR_100BTX_FD

#define ANLPAR_100BTX_FD   (1 << 8)

Definition at line 124 of file ar8031_driver.h.

◆ ANLPAR_100BTX_HD

#define ANLPAR_100BTX_HD   (1 << 7)

Definition at line 125 of file ar8031_driver.h.

◆ ANLPAR_10BT_FD

#define ANLPAR_10BT_FD   (1 << 6)

Definition at line 126 of file ar8031_driver.h.

◆ ANLPAR_10BT_HD

#define ANLPAR_10BT_HD   (1 << 5)

Definition at line 127 of file ar8031_driver.h.

◆ ANLPAR_ACK

#define ANLPAR_ACK   (1 << 14)

Definition at line 119 of file ar8031_driver.h.

◆ ANLPAR_ASYMMETRIC_PAUSE

#define ANLPAR_ASYMMETRIC_PAUSE   (1 << 11)

Definition at line 121 of file ar8031_driver.h.

◆ ANLPAR_NEXT_PAGE

#define ANLPAR_NEXT_PAGE   (1 << 15)

Definition at line 118 of file ar8031_driver.h.

◆ ANLPAR_PAUSE

#define ANLPAR_PAUSE   (1 << 10)

Definition at line 122 of file ar8031_driver.h.

◆ ANLPAR_REMOTE_FAULT

#define ANLPAR_REMOTE_FAULT   (1 << 13)

Definition at line 120 of file ar8031_driver.h.

◆ ANLPAR_SELECTOR0

#define ANLPAR_SELECTOR0   (1 << 0)

Definition at line 132 of file ar8031_driver.h.

◆ ANLPAR_SELECTOR1

#define ANLPAR_SELECTOR1   (1 << 1)

Definition at line 131 of file ar8031_driver.h.

◆ ANLPAR_SELECTOR2

#define ANLPAR_SELECTOR2   (1 << 2)

Definition at line 130 of file ar8031_driver.h.

◆ ANLPAR_SELECTOR3

#define ANLPAR_SELECTOR3   (1 << 3)

Definition at line 129 of file ar8031_driver.h.

◆ ANLPAR_SELECTOR4

#define ANLPAR_SELECTOR4   (1 << 4)

Definition at line 128 of file ar8031_driver.h.

◆ ANNPTR_ACK2

#define ANNPTR_ACK2   (1 << 12)

Definition at line 144 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE0

#define ANNPTR_MESSAGE0   (1 << 0)

Definition at line 156 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE1

#define ANNPTR_MESSAGE1   (1 << 1)

Definition at line 155 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE10

#define ANNPTR_MESSAGE10   (1 << 10)

Definition at line 146 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE2

#define ANNPTR_MESSAGE2   (1 << 2)

Definition at line 154 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE3

#define ANNPTR_MESSAGE3   (1 << 3)

Definition at line 153 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE4

#define ANNPTR_MESSAGE4   (1 << 4)

Definition at line 152 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE5

#define ANNPTR_MESSAGE5   (1 << 5)

Definition at line 151 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE6

#define ANNPTR_MESSAGE6   (1 << 6)

Definition at line 150 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE7

#define ANNPTR_MESSAGE7   (1 << 7)

Definition at line 149 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE8

#define ANNPTR_MESSAGE8   (1 << 8)

Definition at line 148 of file ar8031_driver.h.

◆ ANNPTR_MESSAGE9

#define ANNPTR_MESSAGE9   (1 << 9)

Definition at line 147 of file ar8031_driver.h.

◆ ANNPTR_MSG_PAGE

#define ANNPTR_MSG_PAGE   (1 << 13)

Definition at line 143 of file ar8031_driver.h.

◆ ANNPTR_NEXT_PAGE

#define ANNPTR_NEXT_PAGE   (1 << 15)

Definition at line 142 of file ar8031_driver.h.

◆ ANNPTR_TOGGLE

#define ANNPTR_TOGGLE   (1 << 11)

Definition at line 145 of file ar8031_driver.h.

◆ AR8031_PHY_ADDR

#define AR8031_PHY_ADDR   0

Definition at line 37 of file ar8031_driver.h.

◆ AR8031_PHY_REG_1000BT_CTRL

#define AR8031_PHY_REG_1000BT_CTRL   0x09

Definition at line 52 of file ar8031_driver.h.

◆ AR8031_PHY_REG_1000BT_STATUS

#define AR8031_PHY_REG_1000BT_STATUS   0x0A

Definition at line 53 of file ar8031_driver.h.

◆ AR8031_PHY_REG_ANAR

#define AR8031_PHY_REG_ANAR   0x04

Definition at line 47 of file ar8031_driver.h.

◆ AR8031_PHY_REG_ANER

#define AR8031_PHY_REG_ANER   0x06

Definition at line 49 of file ar8031_driver.h.

◆ AR8031_PHY_REG_ANLPAR

#define AR8031_PHY_REG_ANLPAR   0x05

Definition at line 48 of file ar8031_driver.h.

◆ AR8031_PHY_REG_ANNPTR

#define AR8031_PHY_REG_ANNPTR   0x07

Definition at line 50 of file ar8031_driver.h.

◆ AR8031_PHY_REG_BMCR

#define AR8031_PHY_REG_BMCR   0x00

Definition at line 43 of file ar8031_driver.h.

◆ AR8031_PHY_REG_BMSR

#define AR8031_PHY_REG_BMSR   0x01

Definition at line 44 of file ar8031_driver.h.

◆ AR8031_PHY_REG_CDT_CTRL

#define AR8031_PHY_REG_CDT_CTRL   0x16

Definition at line 62 of file ar8031_driver.h.

◆ AR8031_PHY_REG_CDT_STATUS

#define AR8031_PHY_REG_CDT_STATUS   0x1C

Definition at line 65 of file ar8031_driver.h.

◆ AR8031_PHY_REG_CHIP_CONFIG

#define AR8031_PHY_REG_CHIP_CONFIG   0x1F

Definition at line 68 of file ar8031_driver.h.

◆ AR8031_PHY_REG_DBG_PORT

#define AR8031_PHY_REG_DBG_PORT   0x1D

Definition at line 66 of file ar8031_driver.h.

◆ AR8031_PHY_REG_DBG_PORT2

#define AR8031_PHY_REG_DBG_PORT2   0x1E

Definition at line 67 of file ar8031_driver.h.

◆ AR8031_PHY_REG_EXT_STATUS

#define AR8031_PHY_REG_EXT_STATUS   0x0F

Definition at line 56 of file ar8031_driver.h.

◆ AR8031_PHY_REG_FUNCTION_CTRL

#define AR8031_PHY_REG_FUNCTION_CTRL   0x10

Definition at line 57 of file ar8031_driver.h.

◆ AR8031_PHY_REG_INT_EN

#define AR8031_PHY_REG_INT_EN   0x12

Definition at line 59 of file ar8031_driver.h.

◆ AR8031_PHY_REG_INT_STATUS

#define AR8031_PHY_REG_INT_STATUS   0x13

Definition at line 60 of file ar8031_driver.h.

◆ AR8031_PHY_REG_LED_CTRL

#define AR8031_PHY_REG_LED_CTRL   0x18

Definition at line 63 of file ar8031_driver.h.

◆ AR8031_PHY_REG_LPNPAR

#define AR8031_PHY_REG_LPNPAR   0x08

Definition at line 51 of file ar8031_driver.h.

◆ AR8031_PHY_REG_MAN_LED_OVERRIDE

#define AR8031_PHY_REG_MAN_LED_OVERRIDE   0x19

Definition at line 64 of file ar8031_driver.h.

◆ AR8031_PHY_REG_MMD_CTRL

#define AR8031_PHY_REG_MMD_CTRL   0x0D

Definition at line 54 of file ar8031_driver.h.

◆ AR8031_PHY_REG_MMD_DATA

#define AR8031_PHY_REG_MMD_DATA   0x0E

Definition at line 55 of file ar8031_driver.h.

◆ AR8031_PHY_REG_PHY_STATUS

#define AR8031_PHY_REG_PHY_STATUS   0x11

Definition at line 58 of file ar8031_driver.h.

◆ AR8031_PHY_REG_PHYIDR1

#define AR8031_PHY_REG_PHYIDR1   0x02

Definition at line 45 of file ar8031_driver.h.

◆ AR8031_PHY_REG_PHYIDR2

#define AR8031_PHY_REG_PHYIDR2   0x03

Definition at line 46 of file ar8031_driver.h.

◆ AR8031_PHY_REG_SMART_SPEED

#define AR8031_PHY_REG_SMART_SPEED   0x14

Definition at line 61 of file ar8031_driver.h.

◆ BMCR_AN_EN

#define BMCR_AN_EN   (1 << 12)

Definition at line 74 of file ar8031_driver.h.

◆ BMCR_COL_TEST

#define BMCR_COL_TEST   (1 << 7)

Definition at line 79 of file ar8031_driver.h.

◆ BMCR_DUPLEX_MODE

#define BMCR_DUPLEX_MODE   (1 << 8)

Definition at line 78 of file ar8031_driver.h.

◆ BMCR_ISOLATE

#define BMCR_ISOLATE   (1 << 10)

Definition at line 76 of file ar8031_driver.h.

◆ BMCR_LOOPBACK

#define BMCR_LOOPBACK   (1 << 14)

Definition at line 72 of file ar8031_driver.h.

◆ BMCR_POWER_DOWN

#define BMCR_POWER_DOWN   (1 << 11)

Definition at line 75 of file ar8031_driver.h.

◆ BMCR_RESET

#define BMCR_RESET   (1 << 15)

Definition at line 71 of file ar8031_driver.h.

◆ BMCR_RESTART_AN

#define BMCR_RESTART_AN   (1 << 9)

Definition at line 77 of file ar8031_driver.h.

◆ BMCR_SPEED_SEL_LSB

#define BMCR_SPEED_SEL_LSB   (1 << 13)

Definition at line 73 of file ar8031_driver.h.

◆ BMCR_SPEED_SEL_MSB

#define BMCR_SPEED_SEL_MSB   (1 << 6)

Definition at line 80 of file ar8031_driver.h.

◆ BMSR_100BT2_FD

#define BMSR_100BT2_FD   (1 << 10)

Definition at line 88 of file ar8031_driver.h.

◆ BMSR_100BT2_HD

#define BMSR_100BT2_HD   (1 << 9)

Definition at line 89 of file ar8031_driver.h.

◆ BMSR_100BT4

#define BMSR_100BT4   (1 << 15)

Definition at line 83 of file ar8031_driver.h.

◆ BMSR_100BTX_FD

#define BMSR_100BTX_FD   (1 << 14)

Definition at line 84 of file ar8031_driver.h.

◆ BMSR_100BTX_HD

#define BMSR_100BTX_HD   (1 << 13)

Definition at line 85 of file ar8031_driver.h.

◆ BMSR_10BT_FD

#define BMSR_10BT_FD   (1 << 12)

Definition at line 86 of file ar8031_driver.h.

◆ BMSR_10BT_HD

#define BMSR_10BT_HD   (1 << 11)

Definition at line 87 of file ar8031_driver.h.

◆ BMSR_AN_ABLE

#define BMSR_AN_ABLE   (1 << 3)

Definition at line 94 of file ar8031_driver.h.

◆ BMSR_AN_COMPLETE

#define BMSR_AN_COMPLETE   (1 << 5)

Definition at line 92 of file ar8031_driver.h.

◆ BMSR_EXTENDED_CAP

#define BMSR_EXTENDED_CAP   (1 << 0)

Definition at line 97 of file ar8031_driver.h.

◆ BMSR_EXTENDED_STATUS

#define BMSR_EXTENDED_STATUS   (1 << 8)

Definition at line 90 of file ar8031_driver.h.

◆ BMSR_JABBER_DETECT

#define BMSR_JABBER_DETECT   (1 << 1)

Definition at line 96 of file ar8031_driver.h.

◆ BMSR_LINK_STATUS

#define BMSR_LINK_STATUS   (1 << 2)

Definition at line 95 of file ar8031_driver.h.

◆ BMSR_NO_PREAMBLE

#define BMSR_NO_PREAMBLE   (1 << 6)

Definition at line 91 of file ar8031_driver.h.

◆ BMSR_REMOTE_FAULT

#define BMSR_REMOTE_FAULT   (1 << 4)

Definition at line 93 of file ar8031_driver.h.

◆ CDT_CTRL_ENABLE_TEST

#define CDT_CTRL_ENABLE_TEST   (1 << 0)

Definition at line 289 of file ar8031_driver.h.

◆ CDT_CTRL_MDI_PAIR_SELECT0

#define CDT_CTRL_MDI_PAIR_SELECT0   (1 << 8)

Definition at line 288 of file ar8031_driver.h.

◆ CDT_CTRL_MDI_PAIR_SELECT1

#define CDT_CTRL_MDI_PAIR_SELECT1   (1 << 9)

Definition at line 287 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME0

#define CDT_STATUS_DELTA_TIME0   (1 << 0)

Definition at line 322 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME1

#define CDT_STATUS_DELTA_TIME1   (1 << 1)

Definition at line 321 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME2

#define CDT_STATUS_DELTA_TIME2   (1 << 2)

Definition at line 320 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME3

#define CDT_STATUS_DELTA_TIME3   (1 << 3)

Definition at line 319 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME4

#define CDT_STATUS_DELTA_TIME4   (1 << 4)

Definition at line 318 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME5

#define CDT_STATUS_DELTA_TIME5   (1 << 5)

Definition at line 317 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME6

#define CDT_STATUS_DELTA_TIME6   (1 << 6)

Definition at line 316 of file ar8031_driver.h.

◆ CDT_STATUS_DELTA_TIME7

#define CDT_STATUS_DELTA_TIME7   (1 << 7)

Definition at line 315 of file ar8031_driver.h.

◆ CDT_STATUS_STATUS0

#define CDT_STATUS_STATUS0   (1 << 8)

Definition at line 314 of file ar8031_driver.h.

◆ CDT_STATUS_STATUS1

#define CDT_STATUS_STATUS1   (1 << 9)

Definition at line 313 of file ar8031_driver.h.

◆ CHIP_CONFIG_BT_BX_REG_SEL

#define CHIP_CONFIG_BT_BX_REG_SEL   (1 << 15)

Definition at line 325 of file ar8031_driver.h.

◆ CHIP_CONFIG_FIBER_MODE_AUTO

#define CHIP_CONFIG_FIBER_MODE_AUTO   (1 << 8)

Definition at line 330 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG0

#define CHIP_CONFIG_MODE_CFG0   (1 << 0)

Definition at line 338 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG1

#define CHIP_CONFIG_MODE_CFG1   (1 << 1)

Definition at line 337 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG2

#define CHIP_CONFIG_MODE_CFG2   (1 << 2)

Definition at line 336 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG3

#define CHIP_CONFIG_MODE_CFG3   (1 << 3)

Definition at line 335 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG_QUAL0

#define CHIP_CONFIG_MODE_CFG_QUAL0   (1 << 4)

Definition at line 334 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG_QUAL1

#define CHIP_CONFIG_MODE_CFG_QUAL1   (1 << 5)

Definition at line 333 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG_QUAL2

#define CHIP_CONFIG_MODE_CFG_QUAL2   (1 << 6)

Definition at line 332 of file ar8031_driver.h.

◆ CHIP_CONFIG_MODE_CFG_QUAL3

#define CHIP_CONFIG_MODE_CFG_QUAL3   (1 << 7)

Definition at line 331 of file ar8031_driver.h.

◆ CHIP_CONFIG_PRIORITY_SEL

#define CHIP_CONFIG_PRIORITY_SEL   (1 << 10)

Definition at line 329 of file ar8031_driver.h.

◆ CHIP_CONFIG_SGMII_RXIMP_50_75

#define CHIP_CONFIG_SGMII_RXIMP_50_75   (1 << 13)

Definition at line 327 of file ar8031_driver.h.

◆ CHIP_CONFIG_SGMII_TXIMP_50_75

#define CHIP_CONFIG_SGMII_TXIMP_50_75   (1 << 12)

Definition at line 328 of file ar8031_driver.h.

◆ CHIP_CONFIG_SMII_IMP_50_75_AUTO

#define CHIP_CONFIG_SMII_IMP_50_75_AUTO   (1 << 14)

Definition at line 326 of file ar8031_driver.h.

◆ EXT_STATUS_1000BT_FD

#define EXT_STATUS_1000BT_FD   (1 << 13)

Definition at line 213 of file ar8031_driver.h.

◆ EXT_STATUS_1000BT_HD

#define EXT_STATUS_1000BT_HD   (1 << 12)

Definition at line 214 of file ar8031_driver.h.

◆ EXT_STATUS_1000BX_FD

#define EXT_STATUS_1000BX_FD   (1 << 15)

Definition at line 211 of file ar8031_driver.h.

◆ EXT_STATUS_1000BX_HD

#define EXT_STATUS_1000BX_HD   (1 << 14)

Definition at line 212 of file ar8031_driver.h.

◆ FUNCTION_ASSERT_CRS_ON_TX

#define FUNCTION_ASSERT_CRS_ON_TX   (1 << 11)

Definition at line 217 of file ar8031_driver.h.

◆ FUNCTION_DISABLE_JABBER

#define FUNCTION_DISABLE_JABBER   (1 << 0)

Definition at line 223 of file ar8031_driver.h.

◆ FUNCTION_FORCE_LINK

#define FUNCTION_FORCE_LINK   (1 << 10)

Definition at line 218 of file ar8031_driver.h.

◆ FUNCTION_MDI_CROSSOVER_MODE0

#define FUNCTION_MDI_CROSSOVER_MODE0   (1 << 5)

Definition at line 220 of file ar8031_driver.h.

◆ FUNCTION_MDI_CROSSOVER_MODE1

#define FUNCTION_MDI_CROSSOVER_MODE1   (1 << 6)

Definition at line 219 of file ar8031_driver.h.

◆ FUNCTION_POLARITY_REVERSAL

#define FUNCTION_POLARITY_REVERSAL   (1 << 1)

Definition at line 222 of file ar8031_driver.h.

◆ FUNCTION_SQE_TEST

#define FUNCTION_SQE_TEST   (1 << 2)

Definition at line 221 of file ar8031_driver.h.

◆ INT_EN_10MS_PTP

#define INT_EN_10MS_PTP   (1 << 4)

Definition at line 256 of file ar8031_driver.h.

◆ INT_EN_AN_ERROR

#define INT_EN_AN_ERROR   (1 << 15)

Definition at line 246 of file ar8031_driver.h.

◆ INT_EN_FAST_LINK_DOWN0

#define INT_EN_FAST_LINK_DOWN0   (1 << 6)

Definition at line 254 of file ar8031_driver.h.

◆ INT_EN_FAST_LINK_DOWN1

#define INT_EN_FAST_LINK_DOWN1   (1 << 9)

Definition at line 251 of file ar8031_driver.h.

◆ INT_EN_LINK_FAIL

#define INT_EN_LINK_FAIL   (1 << 11)

Definition at line 249 of file ar8031_driver.h.

◆ INT_EN_LINK_FAIL_BX

#define INT_EN_LINK_FAIL_BX   (1 << 8)

Definition at line 252 of file ar8031_driver.h.

◆ INT_EN_LINK_SUCCESS

#define INT_EN_LINK_SUCCESS   (1 << 10)

Definition at line 250 of file ar8031_driver.h.

◆ INT_EN_LINK_SUCCESS_BX

#define INT_EN_LINK_SUCCESS_BX   (1 << 7)

Definition at line 253 of file ar8031_driver.h.

◆ INT_EN_PAGE_RECEIVED

#define INT_EN_PAGE_RECEIVED   (1 << 12)

Definition at line 248 of file ar8031_driver.h.

◆ INT_EN_POLARITY_CHANGED

#define INT_EN_POLARITY_CHANGED   (1 << 1)

Definition at line 259 of file ar8031_driver.h.

◆ INT_EN_RX_PTP

#define INT_EN_RX_PTP   (1 << 3)

Definition at line 257 of file ar8031_driver.h.

◆ INT_EN_SPEED_CHANGED

#define INT_EN_SPEED_CHANGED   (1 << 14)

Definition at line 247 of file ar8031_driver.h.

◆ INT_EN_TX_PTP

#define INT_EN_TX_PTP   (1 << 2)

Definition at line 258 of file ar8031_driver.h.

◆ INT_EN_WIRESPEED_DOWNGRADE

#define INT_EN_WIRESPEED_DOWNGRADE   (1 << 5)

Definition at line 255 of file ar8031_driver.h.

◆ INT_EN_WOL_PTP

#define INT_EN_WOL_PTP   (1 << 0)

Definition at line 260 of file ar8031_driver.h.

◆ INT_STATUS_10MS_PTP

#define INT_STATUS_10MS_PTP   (1 << 4)

Definition at line 273 of file ar8031_driver.h.

◆ INT_STATUS_AN_ERROR

#define INT_STATUS_AN_ERROR   (1 << 15)

Definition at line 263 of file ar8031_driver.h.

◆ INT_STATUS_FAST_LINK_DOWN0

#define INT_STATUS_FAST_LINK_DOWN0   (1 << 6)

Definition at line 271 of file ar8031_driver.h.

◆ INT_STATUS_FAST_LINK_DOWN1

#define INT_STATUS_FAST_LINK_DOWN1   (1 << 9)

Definition at line 268 of file ar8031_driver.h.

◆ INT_STATUS_LINK_FAIL

#define INT_STATUS_LINK_FAIL   (1 << 11)

Definition at line 266 of file ar8031_driver.h.

◆ INT_STATUS_LINK_FAIL_BX

#define INT_STATUS_LINK_FAIL_BX   (1 << 8)

Definition at line 269 of file ar8031_driver.h.

◆ INT_STATUS_LINK_SUCCESS

#define INT_STATUS_LINK_SUCCESS   (1 << 10)

Definition at line 267 of file ar8031_driver.h.

◆ INT_STATUS_LINK_SUCCESS_BX

#define INT_STATUS_LINK_SUCCESS_BX   (1 << 7)

Definition at line 270 of file ar8031_driver.h.

◆ INT_STATUS_PAGE_RECEIVED

#define INT_STATUS_PAGE_RECEIVED   (1 << 12)

Definition at line 265 of file ar8031_driver.h.

◆ INT_STATUS_POLARITY_CHANGED

#define INT_STATUS_POLARITY_CHANGED   (1 << 1)

Definition at line 276 of file ar8031_driver.h.

◆ INT_STATUS_RX_PTP

#define INT_STATUS_RX_PTP   (1 << 3)

Definition at line 274 of file ar8031_driver.h.

◆ INT_STATUS_SPEED_CHANGED

#define INT_STATUS_SPEED_CHANGED   (1 << 14)

Definition at line 264 of file ar8031_driver.h.

◆ INT_STATUS_TX_PTP

#define INT_STATUS_TX_PTP   (1 << 2)

Definition at line 275 of file ar8031_driver.h.

◆ INT_STATUS_WIRESPEED_DOWNGRADE

#define INT_STATUS_WIRESPEED_DOWNGRADE   (1 << 5)

Definition at line 272 of file ar8031_driver.h.

◆ INT_STATUS_WOL_PTP

#define INT_STATUS_WOL_PTP   (1 << 0)

Definition at line 277 of file ar8031_driver.h.

◆ LED_CTRL_DISABLE_LED

#define LED_CTRL_DISABLE_LED   (1 << 15)

Definition at line 292 of file ar8031_driver.h.

◆ LED_CTRL_LED_ACT_CTRL

#define LED_CTRL_LED_ACT_CTRL   (1 << 1)

Definition at line 301 of file ar8031_driver.h.

◆ LED_CTRL_LED_LINK_CTRL0

#define LED_CTRL_LED_LINK_CTRL0   (1 << 3)

Definition at line 300 of file ar8031_driver.h.

◆ LED_CTRL_LED_LINK_CTRL1

#define LED_CTRL_LED_LINK_CTRL1   (1 << 4)

Definition at line 299 of file ar8031_driver.h.

◆ LED_CTRL_LED_OFF_TIME0

#define LED_CTRL_LED_OFF_TIME0   (1 << 8)

Definition at line 298 of file ar8031_driver.h.

◆ LED_CTRL_LED_OFF_TIME1

#define LED_CTRL_LED_OFF_TIME1   (1 << 9)

Definition at line 297 of file ar8031_driver.h.

◆ LED_CTRL_LED_OFF_TIME2

#define LED_CTRL_LED_OFF_TIME2   (1 << 10)

Definition at line 296 of file ar8031_driver.h.

◆ LED_CTRL_LED_ON_TIME0

#define LED_CTRL_LED_ON_TIME0   (1 << 12)

Definition at line 295 of file ar8031_driver.h.

◆ LED_CTRL_LED_ON_TIME1

#define LED_CTRL_LED_ON_TIME1   (1 << 13)

Definition at line 294 of file ar8031_driver.h.

◆ LED_CTRL_LED_ON_TIME2

#define LED_CTRL_LED_ON_TIME2   (1 << 14)

Definition at line 293 of file ar8031_driver.h.

◆ LPNPAR_ACK2

#define LPNPAR_ACK2   (1 << 12)

Definition at line 161 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE0

#define LPNPAR_MESSAGE0   (1 << 0)

Definition at line 173 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE1

#define LPNPAR_MESSAGE1   (1 << 1)

Definition at line 172 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE10

#define LPNPAR_MESSAGE10   (1 << 10)

Definition at line 163 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE2

#define LPNPAR_MESSAGE2   (1 << 2)

Definition at line 171 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE3

#define LPNPAR_MESSAGE3   (1 << 3)

Definition at line 170 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE4

#define LPNPAR_MESSAGE4   (1 << 4)

Definition at line 169 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE5

#define LPNPAR_MESSAGE5   (1 << 5)

Definition at line 168 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE6

#define LPNPAR_MESSAGE6   (1 << 6)

Definition at line 167 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE7

#define LPNPAR_MESSAGE7   (1 << 7)

Definition at line 166 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE8

#define LPNPAR_MESSAGE8   (1 << 8)

Definition at line 165 of file ar8031_driver.h.

◆ LPNPAR_MESSAGE9

#define LPNPAR_MESSAGE9   (1 << 9)

Definition at line 164 of file ar8031_driver.h.

◆ LPNPAR_MSG_PAGE

#define LPNPAR_MSG_PAGE   (1 << 13)

Definition at line 160 of file ar8031_driver.h.

◆ LPNPAR_NEXT_PAGE

#define LPNPAR_NEXT_PAGE   (1 << 15)

Definition at line 159 of file ar8031_driver.h.

◆ LPNPAR_TOGGLE

#define LPNPAR_TOGGLE   (1 << 11)

Definition at line 162 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_ACT_CTRL

#define MAN_LED_OVERRIDE_LED_ACT_CTRL   (1 << 12)

Definition at line 304 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_LINK_CTRL0

#define MAN_LED_OVERRIDE_LED_LINK_CTRL0   (1 << 6)

Definition at line 306 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_LINK_CTRL1

#define MAN_LED_OVERRIDE_LED_LINK_CTRL1   (1 << 7)

Definition at line 305 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_RX_CTRL0

#define MAN_LED_OVERRIDE_LED_RX_CTRL0   (1 << 2)

Definition at line 308 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_RX_CTRL1

#define MAN_LED_OVERRIDE_LED_RX_CTRL1   (1 << 3)

Definition at line 307 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_TX_CTRL0

#define MAN_LED_OVERRIDE_LED_TX_CTRL0   (1 << 0)

Definition at line 310 of file ar8031_driver.h.

◆ MAN_LED_OVERRIDE_LED_TX_CTRL1

#define MAN_LED_OVERRIDE_LED_TX_CTRL1   (1 << 1)

Definition at line 309 of file ar8031_driver.h.

◆ MMD_CTRL_DEVAD0

#define MMD_CTRL_DEVAD0   (1 << 0)

Definition at line 208 of file ar8031_driver.h.

◆ MMD_CTRL_DEVAD1

#define MMD_CTRL_DEVAD1   (1 << 1)

Definition at line 207 of file ar8031_driver.h.

◆ MMD_CTRL_DEVAD2

#define MMD_CTRL_DEVAD2   (1 << 2)

Definition at line 206 of file ar8031_driver.h.

◆ MMD_CTRL_DEVAD3

#define MMD_CTRL_DEVAD3   (1 << 3)

Definition at line 205 of file ar8031_driver.h.

◆ MMD_CTRL_DEVAD4

#define MMD_CTRL_DEVAD4   (1 << 4)

Definition at line 204 of file ar8031_driver.h.

◆ MMD_CTRL_FUNCTION0

#define MMD_CTRL_FUNCTION0   (1 << 14)

Definition at line 203 of file ar8031_driver.h.

◆ MMD_CTRL_FUNCTION1

#define MMD_CTRL_FUNCTION1   (1 << 15)

Definition at line 202 of file ar8031_driver.h.

◆ PHY_STATUS_DUPLEX

#define PHY_STATUS_DUPLEX   (1 << 13)

Definition at line 228 of file ar8031_driver.h.

◆ PHY_STATUS_JABBER

#define PHY_STATUS_JABBER   (1 << 0)

Definition at line 237 of file ar8031_driver.h.

◆ PHY_STATUS_LINK

#define PHY_STATUS_LINK   (1 << 10)

Definition at line 231 of file ar8031_driver.h.

◆ PHY_STATUS_MDI_CROSSOVER_STATUS

#define PHY_STATUS_MDI_CROSSOVER_STATUS   (1 << 6)

Definition at line 232 of file ar8031_driver.h.

◆ PHY_STATUS_PAGE_RECEIVED

#define PHY_STATUS_PAGE_RECEIVED   (1 << 12)

Definition at line 229 of file ar8031_driver.h.

◆ PHY_STATUS_POLARITY

#define PHY_STATUS_POLARITY   (1 << 1)

Definition at line 236 of file ar8031_driver.h.

◆ PHY_STATUS_RX_PAUSE_ENABLED

#define PHY_STATUS_RX_PAUSE_ENABLED   (1 << 2)

Definition at line 235 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED0

#define PHY_STATUS_SPEED0   (1 << 14)

Definition at line 227 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED1

#define PHY_STATUS_SPEED1   (1 << 15)

Definition at line 226 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED_10

#define PHY_STATUS_SPEED_10   (0 << 14)

Definition at line 241 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED_100

#define PHY_STATUS_SPEED_100   (1 << 14)

Definition at line 242 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED_1000

#define PHY_STATUS_SPEED_1000   (2 << 14)

Definition at line 243 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED_DUPLEX_RESOLVED

#define PHY_STATUS_SPEED_DUPLEX_RESOLVED   (1 << 11)

Definition at line 230 of file ar8031_driver.h.

◆ PHY_STATUS_SPEED_MASK

#define PHY_STATUS_SPEED_MASK   (3 << 14)

Definition at line 240 of file ar8031_driver.h.

◆ PHY_STATUS_TX_PAUSE_ENABLED

#define PHY_STATUS_TX_PAUSE_ENABLED   (1 << 3)

Definition at line 234 of file ar8031_driver.h.

◆ PHY_STATUS_WIRESPEED_DOWNGRADE

#define PHY_STATUS_WIRESPEED_DOWNGRADE   (1 << 5)

Definition at line 233 of file ar8031_driver.h.

◆ SMART_SPEED_EN

#define SMART_SPEED_EN   (1 << 5)

Definition at line 280 of file ar8031_driver.h.

◆ SMART_SPEED_RETRY_LIMIT0

#define SMART_SPEED_RETRY_LIMIT0   (1 << 2)

Definition at line 283 of file ar8031_driver.h.

◆ SMART_SPEED_RETRY_LIMIT1

#define SMART_SPEED_RETRY_LIMIT1   (1 << 3)

Definition at line 282 of file ar8031_driver.h.

◆ SMART_SPEED_RETRY_LIMIT2

#define SMART_SPEED_RETRY_LIMIT2   (1 << 4)

Definition at line 281 of file ar8031_driver.h.

◆ SMART_SPEED_TIMER

#define SMART_SPEED_TIMER   (1 << 1)

Definition at line 284 of file ar8031_driver.h.

Function Documentation

◆ ar8031DisableIrq()

void ar8031DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 167 of file ar8031_driver.c.

◆ ar8031DumpPhyReg()

void ar8031DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 291 of file ar8031_driver.c.

◆ ar8031EnableIrq()

void ar8031EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 154 of file ar8031_driver.c.

◆ ar8031EventHandler()

void ar8031EventHandler ( NetInterface interface)

AR8031 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 180 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 58 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 271 of file ar8031_driver.c.

◆ ar8031Tick()

void ar8031Tick ( NetInterface interface)

AR8031 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 116 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 249 of file ar8031_driver.c.

Variable Documentation

◆ ar8031PhyDriver

const PhyDriver ar8031PhyDriver

AR8031 Ethernet PHY driver.

Definition at line 42 of file ar8031_driver.c.