rtl8211f_driver.h File Reference

RTL8211F Gigabit Ethernet PHY transceiver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define RTL8211F_PHY_ADDR   1
 
#define RTL8211F_BMCR   0x00
 
#define RTL8211F_BMSR   0x01
 
#define RTL8211F_PHYID1   0x02
 
#define RTL8211F_PHYID2   0x03
 
#define RTL8211F_ANAR   0x04
 
#define RTL8211F_ANLPAR   0x05
 
#define RTL8211F_ANER   0x06
 
#define RTL8211F_ANNPTR   0x07
 
#define RTL8211F_ANNPRR   0x08
 
#define RTL8211F_GBCR   0x09
 
#define RTL8211F_GBSR   0x0A
 
#define RTL8211F_MMDACR   0x0D
 
#define RTL8211F_MMDAADR   0x0E
 
#define RTL8211F_GBESR   0x0F
 
#define RTL8211F_INER   0x12
 
#define RTL8211F_PHYCR1   0x18
 
#define RTL8211F_PHYCR2   0x19
 
#define RTL8211F_PHYSR   0x1A
 
#define RTL8211F_INSR   0x1D
 
#define RTL8211F_PAGSR   0x1F
 
#define RTL8211F_BMCR_RESET   0x8000
 
#define RTL8211F_BMCR_LOOPBACK   0x4000
 
#define RTL8211F_BMCR_SPEED_SEL_LSB   0x2000
 
#define RTL8211F_BMCR_AN_EN   0x1000
 
#define RTL8211F_BMCR_POWER_DOWN   0x0800
 
#define RTL8211F_BMCR_ISOLATE   0x0400
 
#define RTL8211F_BMCR_RESTART_AN   0x0200
 
#define RTL8211F_BMCR_DUPLEX_MODE   0x0100
 
#define RTL8211F_BMCR_COL_TEST   0x0080
 
#define RTL8211F_BMCR_SPEED_SEL_MSB   0x0040
 
#define RTL8211F_BMCR_UNI_DIR_EN   0x0020
 
#define RTL8211F_BMSR_100BT4   0x8000
 
#define RTL8211F_BMSR_100BTX_FD   0x4000
 
#define RTL8211F_BMSR_100BTX_HD   0x2000
 
#define RTL8211F_BMSR_10BT_FD   0x1000
 
#define RTL8211F_BMSR_10BT_HD   0x0800
 
#define RTL8211F_BMSR_100BT2_FD   0x0400
 
#define RTL8211F_BMSR_100BT2_HD   0x0200
 
#define RTL8211F_BMSR_EXTENDED_STATUS   0x0100
 
#define RTL8211F_BMSR_UNI_DIR_CAPABLE   0x0080
 
#define RTL8211F_BMSR_PREAMBLE_SUPPR   0x0040
 
#define RTL8211F_BMSR_AN_COMPLETE   0x0020
 
#define RTL8211F_BMSR_REMOTE_FAULT   0x0010
 
#define RTL8211F_BMSR_AN_CAPABLE   0x0008
 
#define RTL8211F_BMSR_LINK_STATUS   0x0004
 
#define RTL8211F_BMSR_JABBER_DETECT   0x0002
 
#define RTL8211F_BMSR_EXTENDED_CAPABLE   0x0001
 
#define RTL8211F_PHYID1_OUI_MSB   0xFFFF
 
#define RTL8211F_PHYID1_OUI_MSB_DEFAULT   0x001C
 
#define RTL8211F_PHYID2_OUI_LSB   0xFC00
 
#define RTL8211F_PHYID2_OUI_LSB_DEFAULT   0xC800
 
#define RTL8211F_PHYID2_MODEL_NUM   0x03F0
 
#define RTL8211F_PHYID2_MODEL_NUM_DEFAULT   0x0110
 
#define RTL8211F_PHYID2_REVISION_NUM   0x000F
 
#define RTL8211F_PHYID2_REVISION_NUM_DEFAULT   0x0006
 
#define RTL8211F_ANAR_NEXT_PAGE   0x8000
 
#define RTL8211F_ANAR_REMOTE_FAULT   0x2000
 
#define RTL8211F_ANAR_ASYM_PAUSE   0x0800
 
#define RTL8211F_ANAR_PAUSE   0x0400
 
#define RTL8211F_ANAR_100BT4   0x0200
 
#define RTL8211F_ANAR_100BTX_FD   0x0100
 
#define RTL8211F_ANAR_100BTX_HD   0x0080
 
#define RTL8211F_ANAR_10BT_FD   0x0040
 
#define RTL8211F_ANAR_10BT_HD   0x0020
 
#define RTL8211F_ANAR_SELECTOR   0x001F
 
#define RTL8211F_ANAR_SELECTOR_DEFAULT   0x0001
 
#define RTL8211F_ANLPAR_NEXT_PAGE   0x8000
 
#define RTL8211F_ANLPAR_ACK   0x4000
 
#define RTL8211F_ANLPAR_REMOTE_FAULT   0x2000
 
#define RTL8211F_ANLPAR_ASYM_PAUSE   0x0800
 
#define RTL8211F_ANLPAR_PAUSE   0x0400
 
#define RTL8211F_ANLPAR_100BT4   0x0200
 
#define RTL8211F_ANLPAR_100BTX_FD   0x0100
 
#define RTL8211F_ANLPAR_100BTX_HD   0x0080
 
#define RTL8211F_ANLPAR_10BT_FD   0x0040
 
#define RTL8211F_ANLPAR_10BT_HD   0x0020
 
#define RTL8211F_ANLPAR_SELECTOR   0x001F
 
#define RTL8211F_ANLPAR_SELECTOR_DEFAULT   0x0001
 
#define RTL8211F_ANER_RX_NP_LOCATION_ABLE   0x0040
 
#define RTL8211F_ANER_RX_NP_LOCATION   0x0020
 
#define RTL8211F_ANER_PAR_DETECT_FAULT   0x0010
 
#define RTL8211F_ANER_LP_NEXT_PAGE_ABLE   0x0008
 
#define RTL8211F_ANER_NEXT_PAGE_ABLE   0x0004
 
#define RTL8211F_ANER_PAGE_RECEIVED   0x0002
 
#define RTL8211F_ANER_LP_AN_ABLE   0x0001
 
#define RTL8211F_ANNPTR_NEXT_PAGE   0x8000
 
#define RTL8211F_ANNPTR_MSG_PAGE   0x2000
 
#define RTL8211F_ANNPTR_ACK2   0x1000
 
#define RTL8211F_ANNPTR_TOGGLE   0x0800
 
#define RTL8211F_ANNPTR_MESSAGE   0x07FF
 
#define RTL8211F_ANNPRR_NEXT_PAGE   0x8000
 
#define RTL8211F_ANNPRR_ACK   0x4000
 
#define RTL8211F_ANNPRR_MSG_PAGE   0x2000
 
#define RTL8211F_ANNPRR_ACK2   0x1000
 
#define RTL8211F_ANNPRR_TOGGLE   0x0800
 
#define RTL8211F_ANNPRR_MESSAGE   0x07FF
 
#define RTL8211F_GBCR_TEST_MODE   0xE000
 
#define RTL8211F_GBCR_MS_MAN_CONF_EN   0x1000
 
#define RTL8211F_GBCR_MS_MAN_CONF_VAL   0x0800
 
#define RTL8211F_GBCR_PORT_TYPE   0x0400
 
#define RTL8211F_GBCR_1000BT_FD   0x0200
 
#define RTL8211F_GBSR_MS_CONF_FAULT   0x8000
 
#define RTL8211F_GBSR_MS_CONF_RES   0x4000
 
#define RTL8211F_GBSR_LOCAL_RECEIVER_STATUS   0x2000
 
#define RTL8211F_GBSR_REMOTE_RECEIVER_STATUS   0x1000
 
#define RTL8211F_GBSR_LP_1000BT_FD   0x0800
 
#define RTL8211F_GBSR_LP_1000BT_HD   0x0400
 
#define RTL8211F_GBSR_IDLE_ERR_COUNT   0x00FF
 
#define RTL8211F_MMDACR_FUNC   0xC000
 
#define RTL8211F_MMDACR_FUNC_ADDR   0x0000
 
#define RTL8211F_MMDACR_FUNC_DATA_NO_POST_INC   0x4000
 
#define RTL8211F_MMDACR_FUNC_DATA_POST_INC_RW   0x8000
 
#define RTL8211F_MMDACR_FUNC_DATA_POST_INC_W   0xC000
 
#define RTL8211F_MMDACR_DEVAD   0x001F
 
#define RTL8211F_GBESR_1000BX_FD   0x8000
 
#define RTL8211F_GBESR_1000BX_HD   0x4000
 
#define RTL8211F_GBESR_1000BT_FD   0x2000
 
#define RTL8211F_GBESR_1000BT_HD   0x1000
 
#define RTL8211F_INER_JABBER   0x0400
 
#define RTL8211F_INER_ALDPS_STATE   0x0200
 
#define RTL8211F_INER_PME   0x0080
 
#define RTL8211F_INER_PHY_REG_ACCESS   0x0020
 
#define RTL8211F_INER_LINK_STATUS   0x0010
 
#define RTL8211F_INER_AN_COMPLETE   0x0008
 
#define RTL8211F_INER_PAGE_RECEIVED   0x0004
 
#define RTL8211F_INER_AN_ERROR   0x0001
 
#define RTL8211F_PHYCR1_PHYAD_0_EN   0x2000
 
#define RTL8211F_PHYCR1_MDI_MODE_MANUAL_CONFIG   0x0200
 
#define RTL8211F_PHYCR1_MDI_MODE   0x0100
 
#define RTL8211F_PHYCR1_TX_CRS_EN   0x0080
 
#define RTL8211F_PHYCR1_PHYAD_NON_ZERO_DETECT   0x0040
 
#define RTL8211F_PHYCR1_PREAMBLE_CHECK_EN   0x0010
 
#define RTL8211F_PHYCR1_JABBER_DETECT_EN   0x0008
 
#define RTL8211F_PHYCR1_ALDPS_EN   0x0004
 
#define RTL8211F_PHYCR2_CLKOUT_FREQ_SEL   0x0800
 
#define RTL8211F_PHYCR2_CLKOUT_SSC_EN   0x0080
 
#define RTL8211F_PHYCR2_RXC_SSC_EN   0x0008
 
#define RTL8211F_PHYCR2_RXC_EN   0x0002
 
#define RTL8211F_PHYCR2_CLKOUT_EN   0x0001
 
#define RTL8211F_PHYSR_ALDPS_STATE   0x4000
 
#define RTL8211F_PHYSR_MDI_PLUG   0x2000
 
#define RTL8211F_PHYSR_NWAY_EN   0x1000
 
#define RTL8211F_PHYSR_MASTER_MODE   0x0800
 
#define RTL8211F_PHYSR_EEE_CAPABLE   0x0100
 
#define RTL8211F_PHYSR_RX_FLOW_EN   0x0080
 
#define RTL8211F_PHYSR_TX_FLOW_EN   0x0040
 
#define RTL8211F_PHYSR_SPEED   0x0030
 
#define RTL8211F_PHYSR_SPEED_10MBPS   0x0000
 
#define RTL8211F_PHYSR_SPEED_100MBPS   0x0010
 
#define RTL8211F_PHYSR_SPEED_1000MBPS   0x0020
 
#define RTL8211F_PHYSR_DUPLEX   0x0008
 
#define RTL8211F_PHYSR_LINK   0x0004
 
#define RTL8211F_PHYSR_MDI_CROSSOVER_STATUS   0x0002
 
#define RTL8211F_PHYSR_JABBER   0x0001
 
#define RTL8211F_INSR_JABBER   0x0400
 
#define RTL8211F_INSR_ALDPS_STATE   0x0200
 
#define RTL8211F_INSR_PME   0x0080
 
#define RTL8211F_INSR_PHY_REG_ACCESS   0x0020
 
#define RTL8211F_INSR_LINK_STATUS   0x0010
 
#define RTL8211F_INSR_AN_COMPLETE   0x0008
 
#define RTL8211F_INSR_PAGE_RECEIVED   0x0004
 
#define RTL8211F_INSR_AN_ERROR   0x0001
 
#define RTL8211F_PAGSR_PAGE_SEL   0x0007
 

Functions

error_t rtl8211fInit (NetInterface *interface)
 RTL8211F PHY transceiver initialization. More...
 
void rtl8211fTick (NetInterface *interface)
 RTL8211F timer handler. More...
 
void rtl8211fEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void rtl8211fDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void rtl8211fEventHandler (NetInterface *interface)
 RTL8211F event handler. More...
 
void rtl8211fWritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t rtl8211fReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void rtl8211fDumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver rtl8211fPhyDriver
 RTL8211F Ethernet PHY driver. More...
 

Detailed Description

RTL8211F 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.4

Definition in file rtl8211f_driver.h.

Macro Definition Documentation

◆ RTL8211F_ANAR

#define RTL8211F_ANAR   0x04

Definition at line 49 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_100BT4

#define RTL8211F_ANAR_100BT4   0x0200

Definition at line 114 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_100BTX_FD

#define RTL8211F_ANAR_100BTX_FD   0x0100

Definition at line 115 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_100BTX_HD

#define RTL8211F_ANAR_100BTX_HD   0x0080

Definition at line 116 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_10BT_FD

#define RTL8211F_ANAR_10BT_FD   0x0040

Definition at line 117 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_10BT_HD

#define RTL8211F_ANAR_10BT_HD   0x0020

Definition at line 118 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_ASYM_PAUSE

#define RTL8211F_ANAR_ASYM_PAUSE   0x0800

Definition at line 112 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_NEXT_PAGE

#define RTL8211F_ANAR_NEXT_PAGE   0x8000

Definition at line 110 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_PAUSE

#define RTL8211F_ANAR_PAUSE   0x0400

Definition at line 113 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_REMOTE_FAULT

#define RTL8211F_ANAR_REMOTE_FAULT   0x2000

Definition at line 111 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_SELECTOR

#define RTL8211F_ANAR_SELECTOR   0x001F

Definition at line 119 of file rtl8211f_driver.h.

◆ RTL8211F_ANAR_SELECTOR_DEFAULT

#define RTL8211F_ANAR_SELECTOR_DEFAULT   0x0001

Definition at line 120 of file rtl8211f_driver.h.

◆ RTL8211F_ANER

#define RTL8211F_ANER   0x06

Definition at line 51 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_LP_AN_ABLE

#define RTL8211F_ANER_LP_AN_ABLE   0x0001

Definition at line 143 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_LP_NEXT_PAGE_ABLE

#define RTL8211F_ANER_LP_NEXT_PAGE_ABLE   0x0008

Definition at line 140 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_NEXT_PAGE_ABLE

#define RTL8211F_ANER_NEXT_PAGE_ABLE   0x0004

Definition at line 141 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_PAGE_RECEIVED

#define RTL8211F_ANER_PAGE_RECEIVED   0x0002

Definition at line 142 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_PAR_DETECT_FAULT

#define RTL8211F_ANER_PAR_DETECT_FAULT   0x0010

Definition at line 139 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_RX_NP_LOCATION

#define RTL8211F_ANER_RX_NP_LOCATION   0x0020

Definition at line 138 of file rtl8211f_driver.h.

◆ RTL8211F_ANER_RX_NP_LOCATION_ABLE

#define RTL8211F_ANER_RX_NP_LOCATION_ABLE   0x0040

Definition at line 137 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR

#define RTL8211F_ANLPAR   0x05

Definition at line 50 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_100BT4

#define RTL8211F_ANLPAR_100BT4   0x0200

Definition at line 128 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_100BTX_FD

#define RTL8211F_ANLPAR_100BTX_FD   0x0100

Definition at line 129 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_100BTX_HD

#define RTL8211F_ANLPAR_100BTX_HD   0x0080

Definition at line 130 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_10BT_FD

#define RTL8211F_ANLPAR_10BT_FD   0x0040

Definition at line 131 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_10BT_HD

#define RTL8211F_ANLPAR_10BT_HD   0x0020

Definition at line 132 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_ACK

#define RTL8211F_ANLPAR_ACK   0x4000

Definition at line 124 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_ASYM_PAUSE

#define RTL8211F_ANLPAR_ASYM_PAUSE   0x0800

Definition at line 126 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_NEXT_PAGE

#define RTL8211F_ANLPAR_NEXT_PAGE   0x8000

Definition at line 123 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_PAUSE

#define RTL8211F_ANLPAR_PAUSE   0x0400

Definition at line 127 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_REMOTE_FAULT

#define RTL8211F_ANLPAR_REMOTE_FAULT   0x2000

Definition at line 125 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_SELECTOR

#define RTL8211F_ANLPAR_SELECTOR   0x001F

Definition at line 133 of file rtl8211f_driver.h.

◆ RTL8211F_ANLPAR_SELECTOR_DEFAULT

#define RTL8211F_ANLPAR_SELECTOR_DEFAULT   0x0001

Definition at line 134 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR

#define RTL8211F_ANNPRR   0x08

Definition at line 53 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_ACK

#define RTL8211F_ANNPRR_ACK   0x4000

Definition at line 154 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_ACK2

#define RTL8211F_ANNPRR_ACK2   0x1000

Definition at line 156 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_MESSAGE

#define RTL8211F_ANNPRR_MESSAGE   0x07FF

Definition at line 158 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_MSG_PAGE

#define RTL8211F_ANNPRR_MSG_PAGE   0x2000

Definition at line 155 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_NEXT_PAGE

#define RTL8211F_ANNPRR_NEXT_PAGE   0x8000

Definition at line 153 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPRR_TOGGLE

#define RTL8211F_ANNPRR_TOGGLE   0x0800

Definition at line 157 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR

#define RTL8211F_ANNPTR   0x07

Definition at line 52 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR_ACK2

#define RTL8211F_ANNPTR_ACK2   0x1000

Definition at line 148 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR_MESSAGE

#define RTL8211F_ANNPTR_MESSAGE   0x07FF

Definition at line 150 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR_MSG_PAGE

#define RTL8211F_ANNPTR_MSG_PAGE   0x2000

Definition at line 147 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR_NEXT_PAGE

#define RTL8211F_ANNPTR_NEXT_PAGE   0x8000

Definition at line 146 of file rtl8211f_driver.h.

◆ RTL8211F_ANNPTR_TOGGLE

#define RTL8211F_ANNPTR_TOGGLE   0x0800

Definition at line 149 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR

#define RTL8211F_BMCR   0x00

Definition at line 45 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_AN_EN

#define RTL8211F_BMCR_AN_EN   0x1000

Definition at line 70 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_COL_TEST

#define RTL8211F_BMCR_COL_TEST   0x0080

Definition at line 75 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_DUPLEX_MODE

#define RTL8211F_BMCR_DUPLEX_MODE   0x0100

Definition at line 74 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_ISOLATE

#define RTL8211F_BMCR_ISOLATE   0x0400

Definition at line 72 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_LOOPBACK

#define RTL8211F_BMCR_LOOPBACK   0x4000

Definition at line 68 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_POWER_DOWN

#define RTL8211F_BMCR_POWER_DOWN   0x0800

Definition at line 71 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_RESET

#define RTL8211F_BMCR_RESET   0x8000

Definition at line 67 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_RESTART_AN

#define RTL8211F_BMCR_RESTART_AN   0x0200

Definition at line 73 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_SPEED_SEL_LSB

#define RTL8211F_BMCR_SPEED_SEL_LSB   0x2000

Definition at line 69 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_SPEED_SEL_MSB

#define RTL8211F_BMCR_SPEED_SEL_MSB   0x0040

Definition at line 76 of file rtl8211f_driver.h.

◆ RTL8211F_BMCR_UNI_DIR_EN

#define RTL8211F_BMCR_UNI_DIR_EN   0x0020

Definition at line 77 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR

#define RTL8211F_BMSR   0x01

Definition at line 46 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_100BT2_FD

#define RTL8211F_BMSR_100BT2_FD   0x0400

Definition at line 85 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_100BT2_HD

#define RTL8211F_BMSR_100BT2_HD   0x0200

Definition at line 86 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_100BT4

#define RTL8211F_BMSR_100BT4   0x8000

Definition at line 80 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_100BTX_FD

#define RTL8211F_BMSR_100BTX_FD   0x4000

Definition at line 81 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_100BTX_HD

#define RTL8211F_BMSR_100BTX_HD   0x2000

Definition at line 82 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_10BT_FD

#define RTL8211F_BMSR_10BT_FD   0x1000

Definition at line 83 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_10BT_HD

#define RTL8211F_BMSR_10BT_HD   0x0800

Definition at line 84 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_AN_CAPABLE

#define RTL8211F_BMSR_AN_CAPABLE   0x0008

Definition at line 92 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_AN_COMPLETE

#define RTL8211F_BMSR_AN_COMPLETE   0x0020

Definition at line 90 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_EXTENDED_CAPABLE

#define RTL8211F_BMSR_EXTENDED_CAPABLE   0x0001

Definition at line 95 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_EXTENDED_STATUS

#define RTL8211F_BMSR_EXTENDED_STATUS   0x0100

Definition at line 87 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_JABBER_DETECT

#define RTL8211F_BMSR_JABBER_DETECT   0x0002

Definition at line 94 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_LINK_STATUS

#define RTL8211F_BMSR_LINK_STATUS   0x0004

Definition at line 93 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_PREAMBLE_SUPPR

#define RTL8211F_BMSR_PREAMBLE_SUPPR   0x0040

Definition at line 89 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_REMOTE_FAULT

#define RTL8211F_BMSR_REMOTE_FAULT   0x0010

Definition at line 91 of file rtl8211f_driver.h.

◆ RTL8211F_BMSR_UNI_DIR_CAPABLE

#define RTL8211F_BMSR_UNI_DIR_CAPABLE   0x0080

Definition at line 88 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR

#define RTL8211F_GBCR   0x09

Definition at line 54 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR_1000BT_FD

#define RTL8211F_GBCR_1000BT_FD   0x0200

Definition at line 165 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR_MS_MAN_CONF_EN

#define RTL8211F_GBCR_MS_MAN_CONF_EN   0x1000

Definition at line 162 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR_MS_MAN_CONF_VAL

#define RTL8211F_GBCR_MS_MAN_CONF_VAL   0x0800

Definition at line 163 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR_PORT_TYPE

#define RTL8211F_GBCR_PORT_TYPE   0x0400

Definition at line 164 of file rtl8211f_driver.h.

◆ RTL8211F_GBCR_TEST_MODE

#define RTL8211F_GBCR_TEST_MODE   0xE000

Definition at line 161 of file rtl8211f_driver.h.

◆ RTL8211F_GBESR

#define RTL8211F_GBESR   0x0F

Definition at line 58 of file rtl8211f_driver.h.

◆ RTL8211F_GBESR_1000BT_FD

#define RTL8211F_GBESR_1000BT_FD   0x2000

Definition at line 187 of file rtl8211f_driver.h.

◆ RTL8211F_GBESR_1000BT_HD

#define RTL8211F_GBESR_1000BT_HD   0x1000

Definition at line 188 of file rtl8211f_driver.h.

◆ RTL8211F_GBESR_1000BX_FD

#define RTL8211F_GBESR_1000BX_FD   0x8000

Definition at line 185 of file rtl8211f_driver.h.

◆ RTL8211F_GBESR_1000BX_HD

#define RTL8211F_GBESR_1000BX_HD   0x4000

Definition at line 186 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR

#define RTL8211F_GBSR   0x0A

Definition at line 55 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_IDLE_ERR_COUNT

#define RTL8211F_GBSR_IDLE_ERR_COUNT   0x00FF

Definition at line 174 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_LOCAL_RECEIVER_STATUS

#define RTL8211F_GBSR_LOCAL_RECEIVER_STATUS   0x2000

Definition at line 170 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_LP_1000BT_FD

#define RTL8211F_GBSR_LP_1000BT_FD   0x0800

Definition at line 172 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_LP_1000BT_HD

#define RTL8211F_GBSR_LP_1000BT_HD   0x0400

Definition at line 173 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_MS_CONF_FAULT

#define RTL8211F_GBSR_MS_CONF_FAULT   0x8000

Definition at line 168 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_MS_CONF_RES

#define RTL8211F_GBSR_MS_CONF_RES   0x4000

Definition at line 169 of file rtl8211f_driver.h.

◆ RTL8211F_GBSR_REMOTE_RECEIVER_STATUS

#define RTL8211F_GBSR_REMOTE_RECEIVER_STATUS   0x1000

Definition at line 171 of file rtl8211f_driver.h.

◆ RTL8211F_INER

#define RTL8211F_INER   0x12

Definition at line 59 of file rtl8211f_driver.h.

◆ RTL8211F_INER_ALDPS_STATE

#define RTL8211F_INER_ALDPS_STATE   0x0200

Definition at line 192 of file rtl8211f_driver.h.

◆ RTL8211F_INER_AN_COMPLETE

#define RTL8211F_INER_AN_COMPLETE   0x0008

Definition at line 196 of file rtl8211f_driver.h.

◆ RTL8211F_INER_AN_ERROR

#define RTL8211F_INER_AN_ERROR   0x0001

Definition at line 198 of file rtl8211f_driver.h.

◆ RTL8211F_INER_JABBER

#define RTL8211F_INER_JABBER   0x0400

Definition at line 191 of file rtl8211f_driver.h.

◆ RTL8211F_INER_LINK_STATUS

#define RTL8211F_INER_LINK_STATUS   0x0010

Definition at line 195 of file rtl8211f_driver.h.

◆ RTL8211F_INER_PAGE_RECEIVED

#define RTL8211F_INER_PAGE_RECEIVED   0x0004

Definition at line 197 of file rtl8211f_driver.h.

◆ RTL8211F_INER_PHY_REG_ACCESS

#define RTL8211F_INER_PHY_REG_ACCESS   0x0020

Definition at line 194 of file rtl8211f_driver.h.

◆ RTL8211F_INER_PME

#define RTL8211F_INER_PME   0x0080

Definition at line 193 of file rtl8211f_driver.h.

◆ RTL8211F_INSR

#define RTL8211F_INSR   0x1D

Definition at line 63 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_ALDPS_STATE

#define RTL8211F_INSR_ALDPS_STATE   0x0200

Definition at line 236 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_AN_COMPLETE

#define RTL8211F_INSR_AN_COMPLETE   0x0008

Definition at line 240 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_AN_ERROR

#define RTL8211F_INSR_AN_ERROR   0x0001

Definition at line 242 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_JABBER

#define RTL8211F_INSR_JABBER   0x0400

Definition at line 235 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_LINK_STATUS

#define RTL8211F_INSR_LINK_STATUS   0x0010

Definition at line 239 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_PAGE_RECEIVED

#define RTL8211F_INSR_PAGE_RECEIVED   0x0004

Definition at line 241 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_PHY_REG_ACCESS

#define RTL8211F_INSR_PHY_REG_ACCESS   0x0020

Definition at line 238 of file rtl8211f_driver.h.

◆ RTL8211F_INSR_PME

#define RTL8211F_INSR_PME   0x0080

Definition at line 237 of file rtl8211f_driver.h.

◆ RTL8211F_MMDAADR

#define RTL8211F_MMDAADR   0x0E

Definition at line 57 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR

#define RTL8211F_MMDACR   0x0D

Definition at line 56 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_DEVAD

#define RTL8211F_MMDACR_DEVAD   0x001F

Definition at line 182 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_FUNC

#define RTL8211F_MMDACR_FUNC   0xC000

Definition at line 177 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_FUNC_ADDR

#define RTL8211F_MMDACR_FUNC_ADDR   0x0000

Definition at line 178 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_FUNC_DATA_NO_POST_INC

#define RTL8211F_MMDACR_FUNC_DATA_NO_POST_INC   0x4000

Definition at line 179 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_FUNC_DATA_POST_INC_RW

#define RTL8211F_MMDACR_FUNC_DATA_POST_INC_RW   0x8000

Definition at line 180 of file rtl8211f_driver.h.

◆ RTL8211F_MMDACR_FUNC_DATA_POST_INC_W

#define RTL8211F_MMDACR_FUNC_DATA_POST_INC_W   0xC000

Definition at line 181 of file rtl8211f_driver.h.

◆ RTL8211F_PAGSR

#define RTL8211F_PAGSR   0x1F

Definition at line 64 of file rtl8211f_driver.h.

◆ RTL8211F_PAGSR_PAGE_SEL

#define RTL8211F_PAGSR_PAGE_SEL   0x0007

Definition at line 245 of file rtl8211f_driver.h.

◆ RTL8211F_PHY_ADDR

#define RTL8211F_PHY_ADDR   1

Definition at line 39 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1

#define RTL8211F_PHYCR1   0x18

Definition at line 60 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_ALDPS_EN

#define RTL8211F_PHYCR1_ALDPS_EN   0x0004

Definition at line 208 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_JABBER_DETECT_EN

#define RTL8211F_PHYCR1_JABBER_DETECT_EN   0x0008

Definition at line 207 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_MDI_MODE

#define RTL8211F_PHYCR1_MDI_MODE   0x0100

Definition at line 203 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_MDI_MODE_MANUAL_CONFIG

#define RTL8211F_PHYCR1_MDI_MODE_MANUAL_CONFIG   0x0200

Definition at line 202 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_PHYAD_0_EN

#define RTL8211F_PHYCR1_PHYAD_0_EN   0x2000

Definition at line 201 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_PHYAD_NON_ZERO_DETECT

#define RTL8211F_PHYCR1_PHYAD_NON_ZERO_DETECT   0x0040

Definition at line 205 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_PREAMBLE_CHECK_EN

#define RTL8211F_PHYCR1_PREAMBLE_CHECK_EN   0x0010

Definition at line 206 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR1_TX_CRS_EN

#define RTL8211F_PHYCR1_TX_CRS_EN   0x0080

Definition at line 204 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2

#define RTL8211F_PHYCR2   0x19

Definition at line 61 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2_CLKOUT_EN

#define RTL8211F_PHYCR2_CLKOUT_EN   0x0001

Definition at line 215 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2_CLKOUT_FREQ_SEL

#define RTL8211F_PHYCR2_CLKOUT_FREQ_SEL   0x0800

Definition at line 211 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2_CLKOUT_SSC_EN

#define RTL8211F_PHYCR2_CLKOUT_SSC_EN   0x0080

Definition at line 212 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2_RXC_EN

#define RTL8211F_PHYCR2_RXC_EN   0x0002

Definition at line 214 of file rtl8211f_driver.h.

◆ RTL8211F_PHYCR2_RXC_SSC_EN

#define RTL8211F_PHYCR2_RXC_SSC_EN   0x0008

Definition at line 213 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID1

#define RTL8211F_PHYID1   0x02

Definition at line 47 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID1_OUI_MSB

#define RTL8211F_PHYID1_OUI_MSB   0xFFFF

Definition at line 98 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID1_OUI_MSB_DEFAULT

#define RTL8211F_PHYID1_OUI_MSB_DEFAULT   0x001C

Definition at line 99 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2

#define RTL8211F_PHYID2   0x03

Definition at line 48 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_MODEL_NUM

#define RTL8211F_PHYID2_MODEL_NUM   0x03F0

Definition at line 104 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_MODEL_NUM_DEFAULT

#define RTL8211F_PHYID2_MODEL_NUM_DEFAULT   0x0110

Definition at line 105 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_OUI_LSB

#define RTL8211F_PHYID2_OUI_LSB   0xFC00

Definition at line 102 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_OUI_LSB_DEFAULT

#define RTL8211F_PHYID2_OUI_LSB_DEFAULT   0xC800

Definition at line 103 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_REVISION_NUM

#define RTL8211F_PHYID2_REVISION_NUM   0x000F

Definition at line 106 of file rtl8211f_driver.h.

◆ RTL8211F_PHYID2_REVISION_NUM_DEFAULT

#define RTL8211F_PHYID2_REVISION_NUM_DEFAULT   0x0006

Definition at line 107 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR

#define RTL8211F_PHYSR   0x1A

Definition at line 62 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_ALDPS_STATE

#define RTL8211F_PHYSR_ALDPS_STATE   0x4000

Definition at line 218 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_DUPLEX

#define RTL8211F_PHYSR_DUPLEX   0x0008

Definition at line 229 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_EEE_CAPABLE

#define RTL8211F_PHYSR_EEE_CAPABLE   0x0100

Definition at line 222 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_JABBER

#define RTL8211F_PHYSR_JABBER   0x0001

Definition at line 232 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_LINK

#define RTL8211F_PHYSR_LINK   0x0004

Definition at line 230 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_MASTER_MODE

#define RTL8211F_PHYSR_MASTER_MODE   0x0800

Definition at line 221 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_MDI_CROSSOVER_STATUS

#define RTL8211F_PHYSR_MDI_CROSSOVER_STATUS   0x0002

Definition at line 231 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_MDI_PLUG

#define RTL8211F_PHYSR_MDI_PLUG   0x2000

Definition at line 219 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_NWAY_EN

#define RTL8211F_PHYSR_NWAY_EN   0x1000

Definition at line 220 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_RX_FLOW_EN

#define RTL8211F_PHYSR_RX_FLOW_EN   0x0080

Definition at line 223 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_SPEED

#define RTL8211F_PHYSR_SPEED   0x0030

Definition at line 225 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_SPEED_1000MBPS

#define RTL8211F_PHYSR_SPEED_1000MBPS   0x0020

Definition at line 228 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_SPEED_100MBPS

#define RTL8211F_PHYSR_SPEED_100MBPS   0x0010

Definition at line 227 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_SPEED_10MBPS

#define RTL8211F_PHYSR_SPEED_10MBPS   0x0000

Definition at line 226 of file rtl8211f_driver.h.

◆ RTL8211F_PHYSR_TX_FLOW_EN

#define RTL8211F_PHYSR_TX_FLOW_EN   0x0040

Definition at line 224 of file rtl8211f_driver.h.

Function Documentation

◆ rtl8211fDisableIrq()

void rtl8211fDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 163 of file rtl8211f_driver.c.

◆ rtl8211fDumpPhyReg()

void rtl8211fDumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 281 of file rtl8211f_driver.c.

◆ rtl8211fEnableIrq()

void rtl8211fEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 148 of file rtl8211f_driver.c.

◆ rtl8211fEventHandler()

void rtl8211fEventHandler ( NetInterface interface)

RTL8211F event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 178 of file rtl8211f_driver.c.

◆ rtl8211fInit()

error_t rtl8211fInit ( NetInterface interface)

RTL8211F PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 62 of file rtl8211f_driver.c.

◆ rtl8211fReadPhyReg()

uint16_t rtl8211fReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 268 of file rtl8211f_driver.c.

◆ rtl8211fTick()

void rtl8211fTick ( NetInterface interface)

RTL8211F timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 110 of file rtl8211f_driver.c.

◆ rtl8211fWritePhyReg()

void rtl8211fWritePhyReg ( 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 252 of file rtl8211f_driver.c.

Variable Documentation

◆ rtl8211fPhyDriver

const PhyDriver rtl8211fPhyDriver

RTL8211F Ethernet PHY driver.

Definition at line 44 of file rtl8211f_driver.c.