upd60611_driver.h File Reference

uPD60611 Ethernet PHY transceiver More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define UPD60611_PHY_ADDR   0
 
#define UPD60611_PHY_REG_BMCR   0x00
 
#define UPD60611_PHY_REG_BMSR   0x01
 
#define UPD60611_PHY_REG_PHYIDR1   0x02
 
#define UPD60611_PHY_REG_PHYIDR2   0x03
 
#define UPD60611_PHY_REG_ANAR   0x04
 
#define UPD60611_PHY_REG_ANLPAR   0x05
 
#define UPD60611_PHY_REG_ANER   0x06
 
#define UPD60611_PHY_REG_ANNPTR   0x07
 
#define UPD60611_PHY_REG_SRR   0x10
 
#define UPD60611_PHY_REG_MCSR   0x11
 
#define UPD60611_PHY_REG_SMR   0x12
 
#define UPD60611_PHY_REG_EBSR   0x13
 
#define UPD60611_PHY_REG_BER   0x17
 
#define UPD60611_PHY_REG_FEQMR   0x18
 
#define UPD60611_PHY_REG_DCSR   0x19
 
#define UPD60611_PHY_REG_DCR   0x1A
 
#define UPD60611_PHY_REG_SCSIR   0x1B
 
#define UPD60611_PHY_REG_ISR   0x1D
 
#define UPD60611_PHY_REG_IER   0x1E
 
#define UPD60611_PHY_REG_PSCSR   0x1F
 
#define BMCR_RESET   (1 << 15)
 
#define BMCR_LOOPBACK   (1 << 14)
 
#define BMCR_SPEED_SEL   (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 BMSR_100BT4   (1 << 15)
 
#define BMSR_100BTX_FD   (1 << 14)
 
#define BMSR_100BTX   (1 << 13)
 
#define BMSR_10BT_FD   (1 << 12)
 
#define BMSR_10BT   (1 << 11)
 
#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_NP   (1 << 15)
 
#define ANAR_RF   (1 << 13)
 
#define ANAR_PAUSE1   (1 << 11)
 
#define ANAR_PAUSE0   (1 << 10)
 
#define ANAR_100BT4   (1 << 9)
 
#define ANAR_100BTX_FD   (1 << 8)
 
#define ANAR_100BTX   (1 << 7)
 
#define ANAR_10BT_FD   (1 << 6)
 
#define ANAR_10BT   (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_NP   (1 << 15)
 
#define ANLPAR_ACK   (1 << 14)
 
#define ANLPAR_RF   (1 << 13)
 
#define ANLPAR_PAUSE   (1 << 10)
 
#define ANLPAR_100BT4   (1 << 9)
 
#define ANLPAR_100BTX_FD   (1 << 8)
 
#define ANLPAR_100BTX   (1 << 7)
 
#define ANLPAR_10BT_FD   (1 << 6)
 
#define ANLPAR_10BT   (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_PDF   (1 << 4)
 
#define ANER_LP_NP_ABLE   (1 << 3)
 
#define ANER_NP_ABLE   (1 << 2)
 
#define ANER_PAGE_RX   (1 << 1)
 
#define ANER_LP_AN_ABLE   (1 << 0)
 
#define ANNPTR_NP   (1 << 15)
 
#define ANNPTR_MP   (1 << 13)
 
#define ANNPTR_ACK2   (1 << 12)
 
#define ANNPTR_TOGGLE   (1 << 11)
 
#define ANNPTR_CODE10   (1 << 10)
 
#define ANNPTR_CODE9   (1 << 9)
 
#define ANNPTR_CODE8   (1 << 8)
 
#define ANNPTR_CODE7   (1 << 7)
 
#define ANNPTR_CODE6   (1 << 6)
 
#define ANNPTR_CODE5   (1 << 5)
 
#define ANNPTR_CODE4   (1 << 4)
 
#define ANNPTR_CODE3   (1 << 3)
 
#define ANNPTR_CODE2   (1 << 2)
 
#define ANNPTR_CODE1   (1 << 1)
 
#define ANNPTR_CODE0   (1 << 0)
 
#define MCSR_EDPWRDOWN   (1 << 13)
 
#define MCSR_FARLOOPBACK   (1 << 9)
 
#define MCSR_FASTEST   (1 << 8)
 
#define MCSR_AUTOMDIX_EN   (1 << 7)
 
#define MCSR_MDI   MODE (1 << 6)
 
#define MCSR_FORCE_GOOD_LINK   (1 << 2)
 
#define MCSR_ENERGYON   (1 << 1)
 
#define SMR_FX_MODE   (1 << 10)
 
#define SMR_PHY_MODE3   (1 << 8)
 
#define SMR_PHY_MODE2   (1 << 7)
 
#define SMR_PHY_MODE1   (1 << 6)
 
#define SMR_PHY_MODE0   (1 << 5)
 
#define SMR_PHY_ADD_DEV1   (1 << 4)
 
#define SMR_PHY_ADD_DEV0   (1 << 3)
 
#define SMR_PHY_ADD_MOD2   (1 << 2)
 
#define SMR_PHY_ADD_MOD1   (1 << 1)
 
#define SMR_PHY_ADD_MOD0   (1 << 0)
 
#define EBSR_T_EL_BUF_OVF   (1 << 7)
 
#define EBSR_T_EL_BUF_UDF   (1 << 6)
 
#define EBSR_R_EL_BUF_OVF   (1 << 5)
 
#define EBSR_R_EL_BUF_UDF   (1 << 4)
 
#define BER_LNK_OK   (1 << 15)
 
#define BER_CNT_LNK_EN   (1 << 14)
 
#define BER_CNT_TRIG2   (1 << 13)
 
#define BER_CNT_TRIG1   (1 << 12)
 
#define BER_CNT_TRIG0   (1 << 11)
 
#define BER_WINDOW3   (1 << 10)
 
#define BER_WINDOW2   (1 << 9)
 
#define BER_WINDOW1   (1 << 8)
 
#define BER_WINDOW0   (1 << 7)
 
#define BER_COUNT6   (1 << 6)
 
#define BER_COUNT5   (1 << 5)
 
#define BER_COUNT4   (1 << 4)
 
#define BER_COUNT3   (1 << 3)
 
#define BER_COUNT2   (1 << 2)
 
#define BER_COUNT1   (1 << 1)
 
#define BER_COUNT0   (1 << 0)
 
#define DCSR_DIAG_INIT   (1 << 14)
 
#define DCSR_ADC_MAX_VALUE5   (1 << 13)
 
#define DCSR_ADC_MAX_VALUE4   (1 << 12)
 
#define DCSR_ADC_MAX_VALUE3   (1 << 11)
 
#define DCSR_ADC_MAX_VALUE2   (1 << 10)
 
#define DCSR_ADC_MAX_VALUE1   (1 << 9)
 
#define DCSR_ADC_MAX_VALUE0   (1 << 8)
 
#define DCSR_DIAG_DONE   (1 << 7)
 
#define DCSR_DIAG_POL   (1 << 6)
 
#define DCSR_DIAG_SEL_LINE   (1 << 5)
 
#define DCSR_PW_DIAG4   (1 << 4)
 
#define DCSR_PW_DIAG3   (1 << 3)
 
#define DCSR_PW_DIAG2   (1 << 2)
 
#define DCSR_PW_DIAG1   (1 << 1)
 
#define DCSR_PW_DIAG0   (1 << 0)
 
#define DCR_CNT_WINDOW7   (1 << 15)
 
#define DCR_CNT_WINDOW6   (1 << 14)
 
#define DCR_CNT_WINDOW5   (1 << 13)
 
#define DCR_CNT_WINDOW4   (1 << 12)
 
#define DCR_CNT_WINDOW3   (1 << 11)
 
#define DCR_CNT_WINDOW2   (1 << 10)
 
#define DCR_CNT_WINDOW1   (1 << 9)
 
#define DCR_CNT_WINDOW0   (1 << 8)
 
#define DCR_DIAGCNT7   (1 << 7)
 
#define DCR_DIAGCNT6   (1 << 6)
 
#define DCR_DIAGCNT5   (1 << 5)
 
#define DCR_DIAGCNT4   (1 << 4)
 
#define DCR_DIAGCNT3   (1 << 3)
 
#define DCR_DIAGCNT2   (1 << 2)
 
#define DCR_DIAGCNT1   (1 << 1)
 
#define DCR_DIAGCNT0   (1 << 0)
 
#define SCSIR_SWRST_FAST   (1 << 12)
 
#define SCSIR_SQEOFF   (1 << 11)
 
#define SCSIR_FEFIEN   (1 << 5)
 
#define SCSIR_XPOL   (1 << 4)
 
#define ISR_BER   (1 << 10)
 
#define ISR_FEQ   (1 << 9)
 
#define ISR_ENERGYON   (1 << 7)
 
#define ISR_AN_COMPLETE   (1 << 6)
 
#define ISR_REMOTE_FAULT   (1 << 5)
 
#define ISR_LINK_DOWN   (1 << 4)
 
#define ISR_AN_LP_ACK   (1 << 3)
 
#define ISR_PD_FAULT   (1 << 2)
 
#define ISR_AN_PAGE_RECEIVED   (1 << 1)
 
#define IER_BER   (1 << 10)
 
#define IER_FEQ   (1 << 9)
 
#define IER_ENERGYON   (1 << 7)
 
#define IER_AN_COMPLETE   (1 << 6)
 
#define IER_REMOTE_FAULT   (1 << 5)
 
#define IER_LINK_DOWN   (1 << 4)
 
#define IER_AN_LP_ACK   (1 << 3)
 
#define IER_PD_FAULT   (1 << 2)
 
#define IER_AN_PAGE_RECEIVED   (1 << 1)
 
#define PSCSR_AUTODONE   (1 << 12)
 
#define PSCSR_ENABLE_4B5B   (1 << 6)
 
#define PSCSR_HCDSPEED2   (1 << 4)
 
#define PSCSR_HCDSPEED1   (1 << 3)
 
#define PSCSR_HCDSPEED0   (1 << 2)
 
#define PSCSR_RX_DV_J2T   (1 << 1)
 
#define PSCSR_SCRAMBLE_DIS   (1 << 0)
 
#define PSCSR_HCDSPEED_MASK   (7 << 2)
 
#define PSCSR_HCDSPEED_10BT   (1 << 2)
 
#define PSCSR_HCDSPEED_100BTX   (2 << 2)
 
#define PSCSR_HCDSPEED_10BT_FD   (5 << 2)
 
#define PSCSR_HCDSPEED_100BTX_FD   (6 << 2)
 

Functions

error_t upd60611Init (NetInterface *interface)
 uPD60611 PHY transceiver initialization More...
 
void upd60611Tick (NetInterface *interface)
 uPD60611 timer handler More...
 
void upd60611EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void upd60611DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void upd60611EventHandler (NetInterface *interface)
 uPD60611 event handler More...
 
void upd60611WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t upd60611ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void upd60611DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver upd60611PhyDriver
 uPD60611 Ethernet PHY driver More...
 

Detailed Description

uPD60611 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 upd60611_driver.h.

Macro Definition Documentation

◆ ANAR_100BT4

#define ANAR_100BT4   (1 << 9)

Definition at line 93 of file upd60611_driver.h.

◆ ANAR_100BTX

#define ANAR_100BTX   (1 << 7)

Definition at line 95 of file upd60611_driver.h.

◆ ANAR_100BTX_FD

#define ANAR_100BTX_FD   (1 << 8)

Definition at line 94 of file upd60611_driver.h.

◆ ANAR_10BT

#define ANAR_10BT   (1 << 5)

Definition at line 97 of file upd60611_driver.h.

◆ ANAR_10BT_FD

#define ANAR_10BT_FD   (1 << 6)

Definition at line 96 of file upd60611_driver.h.

◆ ANAR_NP

#define ANAR_NP   (1 << 15)

Definition at line 89 of file upd60611_driver.h.

◆ ANAR_PAUSE0

#define ANAR_PAUSE0   (1 << 10)

Definition at line 92 of file upd60611_driver.h.

◆ ANAR_PAUSE1

#define ANAR_PAUSE1   (1 << 11)

Definition at line 91 of file upd60611_driver.h.

◆ ANAR_RF

#define ANAR_RF   (1 << 13)

Definition at line 90 of file upd60611_driver.h.

◆ ANAR_SELECTOR0

#define ANAR_SELECTOR0   (1 << 0)

Definition at line 102 of file upd60611_driver.h.

◆ ANAR_SELECTOR1

#define ANAR_SELECTOR1   (1 << 1)

Definition at line 101 of file upd60611_driver.h.

◆ ANAR_SELECTOR2

#define ANAR_SELECTOR2   (1 << 2)

Definition at line 100 of file upd60611_driver.h.

◆ ANAR_SELECTOR3

#define ANAR_SELECTOR3   (1 << 3)

Definition at line 99 of file upd60611_driver.h.

◆ ANAR_SELECTOR4

#define ANAR_SELECTOR4   (1 << 4)

Definition at line 98 of file upd60611_driver.h.

◆ ANER_LP_AN_ABLE

#define ANER_LP_AN_ABLE   (1 << 0)

Definition at line 125 of file upd60611_driver.h.

◆ ANER_LP_NP_ABLE

#define ANER_LP_NP_ABLE   (1 << 3)

Definition at line 122 of file upd60611_driver.h.

◆ ANER_NP_ABLE

#define ANER_NP_ABLE   (1 << 2)

Definition at line 123 of file upd60611_driver.h.

◆ ANER_PAGE_RX

#define ANER_PAGE_RX   (1 << 1)

Definition at line 124 of file upd60611_driver.h.

◆ ANER_PDF

#define ANER_PDF   (1 << 4)

Definition at line 121 of file upd60611_driver.h.

◆ ANLPAR_100BT4

#define ANLPAR_100BT4   (1 << 9)

Definition at line 109 of file upd60611_driver.h.

◆ ANLPAR_100BTX

#define ANLPAR_100BTX   (1 << 7)

Definition at line 111 of file upd60611_driver.h.

◆ ANLPAR_100BTX_FD

#define ANLPAR_100BTX_FD   (1 << 8)

Definition at line 110 of file upd60611_driver.h.

◆ ANLPAR_10BT

#define ANLPAR_10BT   (1 << 5)

Definition at line 113 of file upd60611_driver.h.

◆ ANLPAR_10BT_FD

#define ANLPAR_10BT_FD   (1 << 6)

Definition at line 112 of file upd60611_driver.h.

◆ ANLPAR_ACK

#define ANLPAR_ACK   (1 << 14)

Definition at line 106 of file upd60611_driver.h.

◆ ANLPAR_NP

#define ANLPAR_NP   (1 << 15)

Definition at line 105 of file upd60611_driver.h.

◆ ANLPAR_PAUSE

#define ANLPAR_PAUSE   (1 << 10)

Definition at line 108 of file upd60611_driver.h.

◆ ANLPAR_RF

#define ANLPAR_RF   (1 << 13)

Definition at line 107 of file upd60611_driver.h.

◆ ANLPAR_SELECTOR0

#define ANLPAR_SELECTOR0   (1 << 0)

Definition at line 118 of file upd60611_driver.h.

◆ ANLPAR_SELECTOR1

#define ANLPAR_SELECTOR1   (1 << 1)

Definition at line 117 of file upd60611_driver.h.

◆ ANLPAR_SELECTOR2

#define ANLPAR_SELECTOR2   (1 << 2)

Definition at line 116 of file upd60611_driver.h.

◆ ANLPAR_SELECTOR3

#define ANLPAR_SELECTOR3   (1 << 3)

Definition at line 115 of file upd60611_driver.h.

◆ ANLPAR_SELECTOR4

#define ANLPAR_SELECTOR4   (1 << 4)

Definition at line 114 of file upd60611_driver.h.

◆ ANNPTR_ACK2

#define ANNPTR_ACK2   (1 << 12)

Definition at line 130 of file upd60611_driver.h.

◆ ANNPTR_CODE0

#define ANNPTR_CODE0   (1 << 0)

Definition at line 142 of file upd60611_driver.h.

◆ ANNPTR_CODE1

#define ANNPTR_CODE1   (1 << 1)

Definition at line 141 of file upd60611_driver.h.

◆ ANNPTR_CODE10

#define ANNPTR_CODE10   (1 << 10)

Definition at line 132 of file upd60611_driver.h.

◆ ANNPTR_CODE2

#define ANNPTR_CODE2   (1 << 2)

Definition at line 140 of file upd60611_driver.h.

◆ ANNPTR_CODE3

#define ANNPTR_CODE3   (1 << 3)

Definition at line 139 of file upd60611_driver.h.

◆ ANNPTR_CODE4

#define ANNPTR_CODE4   (1 << 4)

Definition at line 138 of file upd60611_driver.h.

◆ ANNPTR_CODE5

#define ANNPTR_CODE5   (1 << 5)

Definition at line 137 of file upd60611_driver.h.

◆ ANNPTR_CODE6

#define ANNPTR_CODE6   (1 << 6)

Definition at line 136 of file upd60611_driver.h.

◆ ANNPTR_CODE7

#define ANNPTR_CODE7   (1 << 7)

Definition at line 135 of file upd60611_driver.h.

◆ ANNPTR_CODE8

#define ANNPTR_CODE8   (1 << 8)

Definition at line 134 of file upd60611_driver.h.

◆ ANNPTR_CODE9

#define ANNPTR_CODE9   (1 << 9)

Definition at line 133 of file upd60611_driver.h.

◆ ANNPTR_MP

#define ANNPTR_MP   (1 << 13)

Definition at line 129 of file upd60611_driver.h.

◆ ANNPTR_NP

#define ANNPTR_NP   (1 << 15)

Definition at line 128 of file upd60611_driver.h.

◆ ANNPTR_TOGGLE

#define ANNPTR_TOGGLE   (1 << 11)

Definition at line 131 of file upd60611_driver.h.

◆ BER_CNT_LNK_EN

#define BER_CNT_LNK_EN   (1 << 14)

Definition at line 173 of file upd60611_driver.h.

◆ BER_CNT_TRIG0

#define BER_CNT_TRIG0   (1 << 11)

Definition at line 176 of file upd60611_driver.h.

◆ BER_CNT_TRIG1

#define BER_CNT_TRIG1   (1 << 12)

Definition at line 175 of file upd60611_driver.h.

◆ BER_CNT_TRIG2

#define BER_CNT_TRIG2   (1 << 13)

Definition at line 174 of file upd60611_driver.h.

◆ BER_COUNT0

#define BER_COUNT0   (1 << 0)

Definition at line 187 of file upd60611_driver.h.

◆ BER_COUNT1

#define BER_COUNT1   (1 << 1)

Definition at line 186 of file upd60611_driver.h.

◆ BER_COUNT2

#define BER_COUNT2   (1 << 2)

Definition at line 185 of file upd60611_driver.h.

◆ BER_COUNT3

#define BER_COUNT3   (1 << 3)

Definition at line 184 of file upd60611_driver.h.

◆ BER_COUNT4

#define BER_COUNT4   (1 << 4)

Definition at line 183 of file upd60611_driver.h.

◆ BER_COUNT5

#define BER_COUNT5   (1 << 5)

Definition at line 182 of file upd60611_driver.h.

◆ BER_COUNT6

#define BER_COUNT6   (1 << 6)

Definition at line 181 of file upd60611_driver.h.

◆ BER_LNK_OK

#define BER_LNK_OK   (1 << 15)

Definition at line 172 of file upd60611_driver.h.

◆ BER_WINDOW0

#define BER_WINDOW0   (1 << 7)

Definition at line 180 of file upd60611_driver.h.

◆ BER_WINDOW1

#define BER_WINDOW1   (1 << 8)

Definition at line 179 of file upd60611_driver.h.

◆ BER_WINDOW2

#define BER_WINDOW2   (1 << 9)

Definition at line 178 of file upd60611_driver.h.

◆ BER_WINDOW3

#define BER_WINDOW3   (1 << 10)

Definition at line 177 of file upd60611_driver.h.

◆ BMCR_AN_EN

#define BMCR_AN_EN   (1 << 12)

Definition at line 68 of file upd60611_driver.h.

◆ BMCR_COL_TEST

#define BMCR_COL_TEST   (1 << 7)

Definition at line 73 of file upd60611_driver.h.

◆ BMCR_DUPLEX_MODE

#define BMCR_DUPLEX_MODE   (1 << 8)

Definition at line 72 of file upd60611_driver.h.

◆ BMCR_ISOLATE

#define BMCR_ISOLATE   (1 << 10)

Definition at line 70 of file upd60611_driver.h.

◆ BMCR_LOOPBACK

#define BMCR_LOOPBACK   (1 << 14)

Definition at line 66 of file upd60611_driver.h.

◆ BMCR_POWER_DOWN

#define BMCR_POWER_DOWN   (1 << 11)

Definition at line 69 of file upd60611_driver.h.

◆ BMCR_RESET

#define BMCR_RESET   (1 << 15)

Definition at line 65 of file upd60611_driver.h.

◆ BMCR_RESTART_AN

#define BMCR_RESTART_AN   (1 << 9)

Definition at line 71 of file upd60611_driver.h.

◆ BMCR_SPEED_SEL

#define BMCR_SPEED_SEL   (1 << 13)

Definition at line 67 of file upd60611_driver.h.

◆ BMSR_100BT4

#define BMSR_100BT4   (1 << 15)

Definition at line 76 of file upd60611_driver.h.

◆ BMSR_100BTX

#define BMSR_100BTX   (1 << 13)

Definition at line 78 of file upd60611_driver.h.

◆ BMSR_100BTX_FD

#define BMSR_100BTX_FD   (1 << 14)

Definition at line 77 of file upd60611_driver.h.

◆ BMSR_10BT

#define BMSR_10BT   (1 << 11)

Definition at line 80 of file upd60611_driver.h.

◆ BMSR_10BT_FD

#define BMSR_10BT_FD   (1 << 12)

Definition at line 79 of file upd60611_driver.h.

◆ BMSR_AN_ABLE

#define BMSR_AN_ABLE   (1 << 3)

Definition at line 83 of file upd60611_driver.h.

◆ BMSR_AN_COMPLETE

#define BMSR_AN_COMPLETE   (1 << 5)

Definition at line 81 of file upd60611_driver.h.

◆ BMSR_EXTENDED_CAP

#define BMSR_EXTENDED_CAP   (1 << 0)

Definition at line 86 of file upd60611_driver.h.

◆ BMSR_JABBER_DETECT

#define BMSR_JABBER_DETECT   (1 << 1)

Definition at line 85 of file upd60611_driver.h.

◆ BMSR_LINK_STATUS

#define BMSR_LINK_STATUS   (1 << 2)

Definition at line 84 of file upd60611_driver.h.

◆ BMSR_REMOTE_FAULT

#define BMSR_REMOTE_FAULT   (1 << 4)

Definition at line 82 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW0

#define DCR_CNT_WINDOW0   (1 << 8)

Definition at line 214 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW1

#define DCR_CNT_WINDOW1   (1 << 9)

Definition at line 213 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW2

#define DCR_CNT_WINDOW2   (1 << 10)

Definition at line 212 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW3

#define DCR_CNT_WINDOW3   (1 << 11)

Definition at line 211 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW4

#define DCR_CNT_WINDOW4   (1 << 12)

Definition at line 210 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW5

#define DCR_CNT_WINDOW5   (1 << 13)

Definition at line 209 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW6

#define DCR_CNT_WINDOW6   (1 << 14)

Definition at line 208 of file upd60611_driver.h.

◆ DCR_CNT_WINDOW7

#define DCR_CNT_WINDOW7   (1 << 15)

Definition at line 207 of file upd60611_driver.h.

◆ DCR_DIAGCNT0

#define DCR_DIAGCNT0   (1 << 0)

Definition at line 222 of file upd60611_driver.h.

◆ DCR_DIAGCNT1

#define DCR_DIAGCNT1   (1 << 1)

Definition at line 221 of file upd60611_driver.h.

◆ DCR_DIAGCNT2

#define DCR_DIAGCNT2   (1 << 2)

Definition at line 220 of file upd60611_driver.h.

◆ DCR_DIAGCNT3

#define DCR_DIAGCNT3   (1 << 3)

Definition at line 219 of file upd60611_driver.h.

◆ DCR_DIAGCNT4

#define DCR_DIAGCNT4   (1 << 4)

Definition at line 218 of file upd60611_driver.h.

◆ DCR_DIAGCNT5

#define DCR_DIAGCNT5   (1 << 5)

Definition at line 217 of file upd60611_driver.h.

◆ DCR_DIAGCNT6

#define DCR_DIAGCNT6   (1 << 6)

Definition at line 216 of file upd60611_driver.h.

◆ DCR_DIAGCNT7

#define DCR_DIAGCNT7   (1 << 7)

Definition at line 215 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE0

#define DCSR_ADC_MAX_VALUE0   (1 << 8)

Definition at line 196 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE1

#define DCSR_ADC_MAX_VALUE1   (1 << 9)

Definition at line 195 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE2

#define DCSR_ADC_MAX_VALUE2   (1 << 10)

Definition at line 194 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE3

#define DCSR_ADC_MAX_VALUE3   (1 << 11)

Definition at line 193 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE4

#define DCSR_ADC_MAX_VALUE4   (1 << 12)

Definition at line 192 of file upd60611_driver.h.

◆ DCSR_ADC_MAX_VALUE5

#define DCSR_ADC_MAX_VALUE5   (1 << 13)

Definition at line 191 of file upd60611_driver.h.

◆ DCSR_DIAG_DONE

#define DCSR_DIAG_DONE   (1 << 7)

Definition at line 197 of file upd60611_driver.h.

◆ DCSR_DIAG_INIT

#define DCSR_DIAG_INIT   (1 << 14)

Definition at line 190 of file upd60611_driver.h.

◆ DCSR_DIAG_POL

#define DCSR_DIAG_POL   (1 << 6)

Definition at line 198 of file upd60611_driver.h.

◆ DCSR_DIAG_SEL_LINE

#define DCSR_DIAG_SEL_LINE   (1 << 5)

Definition at line 199 of file upd60611_driver.h.

◆ DCSR_PW_DIAG0

#define DCSR_PW_DIAG0   (1 << 0)

Definition at line 204 of file upd60611_driver.h.

◆ DCSR_PW_DIAG1

#define DCSR_PW_DIAG1   (1 << 1)

Definition at line 203 of file upd60611_driver.h.

◆ DCSR_PW_DIAG2

#define DCSR_PW_DIAG2   (1 << 2)

Definition at line 202 of file upd60611_driver.h.

◆ DCSR_PW_DIAG3

#define DCSR_PW_DIAG3   (1 << 3)

Definition at line 201 of file upd60611_driver.h.

◆ DCSR_PW_DIAG4

#define DCSR_PW_DIAG4   (1 << 4)

Definition at line 200 of file upd60611_driver.h.

◆ EBSR_R_EL_BUF_OVF

#define EBSR_R_EL_BUF_OVF   (1 << 5)

Definition at line 168 of file upd60611_driver.h.

◆ EBSR_R_EL_BUF_UDF

#define EBSR_R_EL_BUF_UDF   (1 << 4)

Definition at line 169 of file upd60611_driver.h.

◆ EBSR_T_EL_BUF_OVF

#define EBSR_T_EL_BUF_OVF   (1 << 7)

Definition at line 166 of file upd60611_driver.h.

◆ EBSR_T_EL_BUF_UDF

#define EBSR_T_EL_BUF_UDF   (1 << 6)

Definition at line 167 of file upd60611_driver.h.

◆ IER_AN_COMPLETE

#define IER_AN_COMPLETE   (1 << 6)

Definition at line 245 of file upd60611_driver.h.

◆ IER_AN_LP_ACK

#define IER_AN_LP_ACK   (1 << 3)

Definition at line 248 of file upd60611_driver.h.

◆ IER_AN_PAGE_RECEIVED

#define IER_AN_PAGE_RECEIVED   (1 << 1)

Definition at line 250 of file upd60611_driver.h.

◆ IER_BER

#define IER_BER   (1 << 10)

Definition at line 242 of file upd60611_driver.h.

◆ IER_ENERGYON

#define IER_ENERGYON   (1 << 7)

Definition at line 244 of file upd60611_driver.h.

◆ IER_FEQ

#define IER_FEQ   (1 << 9)

Definition at line 243 of file upd60611_driver.h.

◆ IER_LINK_DOWN

#define IER_LINK_DOWN   (1 << 4)

Definition at line 247 of file upd60611_driver.h.

◆ IER_PD_FAULT

#define IER_PD_FAULT   (1 << 2)

Definition at line 249 of file upd60611_driver.h.

◆ IER_REMOTE_FAULT

#define IER_REMOTE_FAULT   (1 << 5)

Definition at line 246 of file upd60611_driver.h.

◆ ISR_AN_COMPLETE

#define ISR_AN_COMPLETE   (1 << 6)

Definition at line 234 of file upd60611_driver.h.

◆ ISR_AN_LP_ACK

#define ISR_AN_LP_ACK   (1 << 3)

Definition at line 237 of file upd60611_driver.h.

◆ ISR_AN_PAGE_RECEIVED

#define ISR_AN_PAGE_RECEIVED   (1 << 1)

Definition at line 239 of file upd60611_driver.h.

◆ ISR_BER

#define ISR_BER   (1 << 10)

Definition at line 231 of file upd60611_driver.h.

◆ ISR_ENERGYON

#define ISR_ENERGYON   (1 << 7)

Definition at line 233 of file upd60611_driver.h.

◆ ISR_FEQ

#define ISR_FEQ   (1 << 9)

Definition at line 232 of file upd60611_driver.h.

◆ ISR_LINK_DOWN

#define ISR_LINK_DOWN   (1 << 4)

Definition at line 236 of file upd60611_driver.h.

◆ ISR_PD_FAULT

#define ISR_PD_FAULT   (1 << 2)

Definition at line 238 of file upd60611_driver.h.

◆ ISR_REMOTE_FAULT

#define ISR_REMOTE_FAULT   (1 << 5)

Definition at line 235 of file upd60611_driver.h.

◆ MCSR_AUTOMDIX_EN

#define MCSR_AUTOMDIX_EN   (1 << 7)

Definition at line 148 of file upd60611_driver.h.

◆ MCSR_EDPWRDOWN

#define MCSR_EDPWRDOWN   (1 << 13)

Definition at line 145 of file upd60611_driver.h.

◆ MCSR_ENERGYON

#define MCSR_ENERGYON   (1 << 1)

Definition at line 151 of file upd60611_driver.h.

◆ MCSR_FARLOOPBACK

#define MCSR_FARLOOPBACK   (1 << 9)

Definition at line 146 of file upd60611_driver.h.

◆ MCSR_FASTEST

#define MCSR_FASTEST   (1 << 8)

Definition at line 147 of file upd60611_driver.h.

◆ MCSR_FORCE_GOOD_LINK

#define MCSR_FORCE_GOOD_LINK   (1 << 2)

Definition at line 150 of file upd60611_driver.h.

◆ MCSR_MDI

#define MCSR_MDI   MODE (1 << 6)

Definition at line 149 of file upd60611_driver.h.

◆ PSCSR_AUTODONE

#define PSCSR_AUTODONE   (1 << 12)

Definition at line 253 of file upd60611_driver.h.

◆ PSCSR_ENABLE_4B5B

#define PSCSR_ENABLE_4B5B   (1 << 6)

Definition at line 254 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED0

#define PSCSR_HCDSPEED0   (1 << 2)

Definition at line 257 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED1

#define PSCSR_HCDSPEED1   (1 << 3)

Definition at line 256 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED2

#define PSCSR_HCDSPEED2   (1 << 4)

Definition at line 255 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED_100BTX

#define PSCSR_HCDSPEED_100BTX   (2 << 2)

Definition at line 264 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED_100BTX_FD

#define PSCSR_HCDSPEED_100BTX_FD   (6 << 2)

Definition at line 266 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED_10BT

#define PSCSR_HCDSPEED_10BT   (1 << 2)

Definition at line 263 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED_10BT_FD

#define PSCSR_HCDSPEED_10BT_FD   (5 << 2)

Definition at line 265 of file upd60611_driver.h.

◆ PSCSR_HCDSPEED_MASK

#define PSCSR_HCDSPEED_MASK   (7 << 2)

Definition at line 262 of file upd60611_driver.h.

◆ PSCSR_RX_DV_J2T

#define PSCSR_RX_DV_J2T   (1 << 1)

Definition at line 258 of file upd60611_driver.h.

◆ PSCSR_SCRAMBLE_DIS

#define PSCSR_SCRAMBLE_DIS   (1 << 0)

Definition at line 259 of file upd60611_driver.h.

◆ SCSIR_FEFIEN

#define SCSIR_FEFIEN   (1 << 5)

Definition at line 227 of file upd60611_driver.h.

◆ SCSIR_SQEOFF

#define SCSIR_SQEOFF   (1 << 11)

Definition at line 226 of file upd60611_driver.h.

◆ SCSIR_SWRST_FAST

#define SCSIR_SWRST_FAST   (1 << 12)

Definition at line 225 of file upd60611_driver.h.

◆ SCSIR_XPOL

#define SCSIR_XPOL   (1 << 4)

Definition at line 228 of file upd60611_driver.h.

◆ SMR_FX_MODE

#define SMR_FX_MODE   (1 << 10)

Definition at line 154 of file upd60611_driver.h.

◆ SMR_PHY_ADD_DEV0

#define SMR_PHY_ADD_DEV0   (1 << 3)

Definition at line 160 of file upd60611_driver.h.

◆ SMR_PHY_ADD_DEV1

#define SMR_PHY_ADD_DEV1   (1 << 4)

Definition at line 159 of file upd60611_driver.h.

◆ SMR_PHY_ADD_MOD0

#define SMR_PHY_ADD_MOD0   (1 << 0)

Definition at line 163 of file upd60611_driver.h.

◆ SMR_PHY_ADD_MOD1

#define SMR_PHY_ADD_MOD1   (1 << 1)

Definition at line 162 of file upd60611_driver.h.

◆ SMR_PHY_ADD_MOD2

#define SMR_PHY_ADD_MOD2   (1 << 2)

Definition at line 161 of file upd60611_driver.h.

◆ SMR_PHY_MODE0

#define SMR_PHY_MODE0   (1 << 5)

Definition at line 158 of file upd60611_driver.h.

◆ SMR_PHY_MODE1

#define SMR_PHY_MODE1   (1 << 6)

Definition at line 157 of file upd60611_driver.h.

◆ SMR_PHY_MODE2

#define SMR_PHY_MODE2   (1 << 7)

Definition at line 156 of file upd60611_driver.h.

◆ SMR_PHY_MODE3

#define SMR_PHY_MODE3   (1 << 8)

Definition at line 155 of file upd60611_driver.h.

◆ UPD60611_PHY_ADDR

#define UPD60611_PHY_ADDR   0

Definition at line 37 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_ANAR

#define UPD60611_PHY_REG_ANAR   0x04

Definition at line 47 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_ANER

#define UPD60611_PHY_REG_ANER   0x06

Definition at line 49 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_ANLPAR

#define UPD60611_PHY_REG_ANLPAR   0x05

Definition at line 48 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_ANNPTR

#define UPD60611_PHY_REG_ANNPTR   0x07

Definition at line 50 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_BER

#define UPD60611_PHY_REG_BER   0x17

Definition at line 55 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_BMCR

#define UPD60611_PHY_REG_BMCR   0x00

Definition at line 43 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_BMSR

#define UPD60611_PHY_REG_BMSR   0x01

Definition at line 44 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_DCR

#define UPD60611_PHY_REG_DCR   0x1A

Definition at line 58 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_DCSR

#define UPD60611_PHY_REG_DCSR   0x19

Definition at line 57 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_EBSR

#define UPD60611_PHY_REG_EBSR   0x13

Definition at line 54 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_FEQMR

#define UPD60611_PHY_REG_FEQMR   0x18

Definition at line 56 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_IER

#define UPD60611_PHY_REG_IER   0x1E

Definition at line 61 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_ISR

#define UPD60611_PHY_REG_ISR   0x1D

Definition at line 60 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_MCSR

#define UPD60611_PHY_REG_MCSR   0x11

Definition at line 52 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_PHYIDR1

#define UPD60611_PHY_REG_PHYIDR1   0x02

Definition at line 45 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_PHYIDR2

#define UPD60611_PHY_REG_PHYIDR2   0x03

Definition at line 46 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_PSCSR

#define UPD60611_PHY_REG_PSCSR   0x1F

Definition at line 62 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_SCSIR

#define UPD60611_PHY_REG_SCSIR   0x1B

Definition at line 59 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_SMR

#define UPD60611_PHY_REG_SMR   0x12

Definition at line 53 of file upd60611_driver.h.

◆ UPD60611_PHY_REG_SRR

#define UPD60611_PHY_REG_SRR   0x10

Definition at line 51 of file upd60611_driver.h.

Function Documentation

◆ upd60611DisableIrq()

void upd60611DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 130 of file upd60611_driver.c.

◆ upd60611DumpPhyReg()

void upd60611DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 259 of file upd60611_driver.c.

◆ upd60611EnableIrq()

void upd60611EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 120 of file upd60611_driver.c.

◆ upd60611EventHandler()

void upd60611EventHandler ( NetInterface interface)

uPD60611 event handler

Parameters
[in]interfaceUnderlying network interface

Definition at line 140 of file upd60611_driver.c.

◆ upd60611Init()

error_t upd60611Init ( NetInterface interface)

uPD60611 PHY transceiver initialization

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 58 of file upd60611_driver.c.

◆ upd60611ReadPhyReg()

uint16_t upd60611ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 239 of file upd60611_driver.c.

◆ upd60611Tick()

void upd60611Tick ( NetInterface interface)

uPD60611 timer handler

Parameters
[in]interfaceUnderlying network interface

Definition at line 86 of file upd60611_driver.c.

◆ upd60611WritePhyReg()

void upd60611WritePhyReg ( 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 217 of file upd60611_driver.c.

Variable Documentation

◆ upd60611PhyDriver

const PhyDriver upd60611PhyDriver

uPD60611 Ethernet PHY driver

Definition at line 42 of file upd60611_driver.c.