mv88e1512_driver.h File Reference

88E1512 Gigabit Ethernet PHY transceiver More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define MV88E1512_PHY_ADDR   0
 
#define MV88E1512_BMCR   0x00
 
#define MV88E1512_BMSR   0x01
 
#define MV88E1512_PHYID1   0x02
 
#define MV88E1512_PHYID2   0x03
 
#define MV88E1512_ANAR   0x04
 
#define MV88E1512_ANLPAR   0x05
 
#define MV88E1512_ANER   0x06
 
#define MV88E1512_ANNPR   0x07
 
#define MV88E1512_ANLPNPR   0x08
 
#define MV88E1512_GBCR   0x09
 
#define MV88E1512_GBSR   0x0A
 
#define MV88E1512_GBESR   0x0F
 
#define MV88E1512_SCR1   0x10
 
#define MV88E1512_SSR1   0x11
 
#define MV88E1512_IER   0x12
 
#define MV88E1512_ISR   0x13
 
#define MV88E1512_SCR2   0x14
 
#define MV88E1512_RECR   0x15
 
#define MV88E1512_PAGSR   0x16
 
#define MV88E1512_GISR   0x17
 
#define MV88E1512_BMCR_RESET   0x8000
 
#define MV88E1512_BMCR_LOOPBACK   0x4000
 
#define MV88E1512_BMCR_SPEED_SEL_LSB   0x2000
 
#define MV88E1512_BMCR_AN_EN   0x1000
 
#define MV88E1512_BMCR_POWER_DOWN   0x0800
 
#define MV88E1512_BMCR_ISOLATE   0x0400
 
#define MV88E1512_BMCR_RESTART_AN   0x0200
 
#define MV88E1512_BMCR_DUPLEX_MODE   0x0100
 
#define MV88E1512_BMCR_COL_TEST   0x0080
 
#define MV88E1512_BMCR_SPEED_SEL_MSB   0x0040
 
#define MV88E1512_BMSR_100BT4   0x8000
 
#define MV88E1512_BMSR_100BTX_FD   0x4000
 
#define MV88E1512_BMSR_100BTX_HD   0x2000
 
#define MV88E1512_BMSR_10BT_FD   0x1000
 
#define MV88E1512_BMSR_10BT_HD   0x0800
 
#define MV88E1512_BMSR_100BT2_FD   0x0400
 
#define MV88E1512_BMSR_100BT2_HD   0x0200
 
#define MV88E1512_BMSR_EXTENDED_STATUS   0x0100
 
#define MV88E1512_BMSR_MF_PREAMBLE_SUPPR   0x0040
 
#define MV88E1512_BMSR_AN_COMPLETE   0x0020
 
#define MV88E1512_BMSR_REMOTE_FAULT   0x0010
 
#define MV88E1512_BMSR_AN_CAPABLE   0x0008
 
#define MV88E1512_BMSR_LINK_STATUS   0x0004
 
#define MV88E1512_BMSR_JABBER_DETECT   0x0002
 
#define MV88E1512_BMSR_EXTENDED_CAPABLE   0x0001
 
#define MV88E1512_PHYID1_OUI_MSB   0xFFFF
 
#define MV88E1512_PHYID1_OUI_MSB_DEFAULT   0x0141
 
#define MV88E1512_PHYID2_OUI_LSB   0xFC00
 
#define MV88E1512_PHYID2_OUI_LSB_DEFAULT   0x0C00
 
#define MV88E1512_PHYID2_MODEL_NUM   0x03F0
 
#define MV88E1512_PHYID2_MODEL_NUM_DEFAULT   0x01D0
 
#define MV88E1512_PHYID2_REVISION_NUM   0x000F
 
#define MV88E1512_ANAR_NEXT_PAGE   0x8000
 
#define MV88E1512_ANAR_ACK   0x4000
 
#define MV88E1512_ANAR_REMOTE_FAULT   0x2000
 
#define MV88E1512_ANAR_ASYM_PAUSE   0x0800
 
#define MV88E1512_ANAR_PAUSE   0x0400
 
#define MV88E1512_ANAR_100BT4   0x0200
 
#define MV88E1512_ANAR_100BTX_FD   0x0100
 
#define MV88E1512_ANAR_100BTX_HD   0x0080
 
#define MV88E1512_ANAR_10BT_FD   0x0040
 
#define MV88E1512_ANAR_10BT_HD   0x0020
 
#define MV88E1512_ANAR_SELECTOR   0x001F
 
#define MV88E1512_ANAR_SELECTOR_DEFAULT   0x0001
 
#define MV88E1512_ANLPAR_NEXT_PAGE   0x8000
 
#define MV88E1512_ANLPAR_ACK   0x4000
 
#define MV88E1512_ANLPAR_REMOTE_FAULT   0x2000
 
#define MV88E1512_ANLPAR_TECH_ABLE   0x1000
 
#define MV88E1512_ANLPAR_ASYM_PAUSE   0x0800
 
#define MV88E1512_ANLPAR_PAUSE   0x0400
 
#define MV88E1512_ANLPAR_100BT4   0x0200
 
#define MV88E1512_ANLPAR_100BTX_FD   0x0100
 
#define MV88E1512_ANLPAR_100BTX_HD   0x0080
 
#define MV88E1512_ANLPAR_10BT_FD   0x0040
 
#define MV88E1512_ANLPAR_10BT_HD   0x0020
 
#define MV88E1512_ANLPAR_SELECTOR   0x001F
 
#define MV88E1512_ANLPAR_SELECTOR_DEFAULT   0x0001
 
#define MV88E1512_ANER_PAR_DETECT_FAULT   0x0010
 
#define MV88E1512_ANER_LP_NEXT_PAGE_ABLE   0x0008
 
#define MV88E1512_ANER_NEXT_PAGE_ABLE   0x0004
 
#define MV88E1512_ANER_PAGE_RECEIVED   0x0002
 
#define MV88E1512_ANER_LP_AN_ABLE   0x0001
 
#define MV88E1512_ANNPR_NEXT_PAGE   0x8000
 
#define MV88E1512_ANNPR_MSG_PAGE   0x2000
 
#define MV88E1512_ANNPR_ACK2   0x1000
 
#define MV88E1512_ANNPR_TOGGLE   0x0800
 
#define MV88E1512_ANNPR_MESSAGE   0x07FF
 
#define MV88E1512_ANLPNPR_NEXT_PAGE   0x8000
 
#define MV88E1512_ANLPNPR_ACK   0x4000
 
#define MV88E1512_ANLPNPR_MSG_PAGE   0x2000
 
#define MV88E1512_ANLPNPR_ACK2   0x1000
 
#define MV88E1512_ANLPNPR_TOGGLE   0x0800
 
#define MV88E1512_ANLPNPR_MESSAGE   0x07FF
 
#define MV88E1512_GBCR_TEST_MODE   0xE000
 
#define MV88E1512_GBCR_MS_MAN_CONF_EN   0x1000
 
#define MV88E1512_GBCR_MS_MAN_CONF_VAL   0x0800
 
#define MV88E1512_GBCR_PORT_TYPE   0x0400
 
#define MV88E1512_GBCR_1000BT_FD   0x0200
 
#define MV88E1512_GBCR_1000BT_HD   0x0100
 
#define MV88E1512_GBSR_MS_CONF_FAULT   0x8000
 
#define MV88E1512_GBSR_MS_CONF_RES   0x4000
 
#define MV88E1512_GBSR_LOCAL_RECEIVER_STATUS   0x2000
 
#define MV88E1512_GBSR_REMOTE_RECEIVER_STATUS   0x1000
 
#define MV88E1512_GBSR_LP_1000BT_FD   0x0800
 
#define MV88E1512_GBSR_LP_1000BT_HD   0x0400
 
#define MV88E1512_GBSR_IDLE_ERR_COUNT   0x00FF
 
#define MV88E1512_GBESR_1000BX_FD   0x8000
 
#define MV88E1512_GBESR_1000BX_HD   0x4000
 
#define MV88E1512_GBESR_1000BT_FD   0x2000
 
#define MV88E1512_GBESR_1000BT_HD   0x1000
 
#define MV88E1512_SCR1_LINK_PULSE_DIS   0x8000
 
#define MV88E1512_SCR1_FORCE_LINK_GOOD   0x0400
 
#define MV88E1512_SCR1_ENERGY_DETECT   0x0300
 
#define MV88E1512_SCR1_MDIX_MODE   0x0060
 
#define MV88E1512_SCR1_MDIX_MODE_MANUAL_MDI   0x0000
 
#define MV88E1512_SCR1_MDIX_MODE_MANUAL_MDIX   0x0020
 
#define MV88E1512_SCR1_MDIX_MODE_AUTO   0x0060
 
#define MV88E1512_SCR1_TX_DIS   0x0008
 
#define MV88E1512_SCR1_POWER_DOWN   0x0004
 
#define MV88E1512_SCR1_POLARITY_REVERSAL_DIS   0x0002
 
#define MV88E1512_SCR1_JABBER_DIS   0x0001
 
#define MV88E1512_SSR1_SPEED   0xC000
 
#define MV88E1512_SSR1_SPEED_10MBPS   0x0000
 
#define MV88E1512_SSR1_SPEED_100MBPS   0x4000
 
#define MV88E1512_SSR1_SPEED_1000MBPS   0x8000
 
#define MV88E1512_SSR1_DUPLEX   0x2000
 
#define MV88E1512_SSR1_PAGE_RECEIVED   0x1000
 
#define MV88E1512_SSR1_SPEED_DUPLEX_RESOLVED   0x0800
 
#define MV88E1512_SSR1_LINK   0x0400
 
#define MV88E1512_SSR1_TX_PAUSE_EN   0x0200
 
#define MV88E1512_SSR1_RX_PAUSE_EN   0x0100
 
#define MV88E1512_SSR1_MDI_CROSSOVER_STATUS   0x0040
 
#define MV88E1512_SSR1_ENERGY_DETECT_STATUS   0x0010
 
#define MV88E1512_SSR1_GLOBAL_LINK_STATUS   0x0008
 
#define MV88E1512_SSR1_POLARITY   0x0002
 
#define MV88E1512_SSR1_JABBER   0x0001
 
#define MV88E1512_IER_AN_ERROR   0x8000
 
#define MV88E1512_IER_SPEED_CHANGED   0x4000
 
#define MV88E1512_IER_DUPLEX_CHANGED   0x2000
 
#define MV88E1512_IER_PAGE_RECEIVED   0x1000
 
#define MV88E1512_IER_AN_COMPLETE   0x0800
 
#define MV88E1512_IER_LINK_STATUS_CHANGED   0x0400
 
#define MV88E1512_IER_SYMBOL_ERROR   0x0200
 
#define MV88E1512_IER_FALSE_CARRIER   0x0100
 
#define MV88E1512_IER_MDI_CROSSOVER_CHANGED   0x0040
 
#define MV88E1512_IER_ENERGY_DETECT   0x0010
 
#define MV88E1512_IER_FLP_COMPLETE   0x0008
 
#define MV88E1512_IER_POLARITY_CHANGED   0x0002
 
#define MV88E1512_IER_JABBER   0x0001
 
#define MV88E1512_ISR_AN_ERROR   0x8000
 
#define MV88E1512_ISR_SPEED_CHANGED   0x4000
 
#define MV88E1512_ISR_DUPLEX_CHANGED   0x2000
 
#define MV88E1512_ISR_PAGE_RECEIVED   0x1000
 
#define MV88E1512_ISR_AN_COMPLETE   0x0800
 
#define MV88E1512_ISR_LINK_STATUS_CHANGED   0x0400
 
#define MV88E1512_ISR_SYMBOL_ERROR   0x0200
 
#define MV88E1512_ISR_FALSE_CARRIER   0x0100
 
#define MV88E1512_ISR_MDI_CROSSOVER_CHANGED   0x0040
 
#define MV88E1512_ISR_ENERGY_DETECT   0x0010
 
#define MV88E1512_ISR_FLP_COMPLETE   0x0008
 
#define MV88E1512_ISR_POLARITY_CHANGED   0x0002
 
#define MV88E1512_ISR_JABBER   0x0001
 
#define MV88E1512_SCR2_BREAK_LINK_ON_INSUF_IPG   0x0040
 
#define MV88E1512_SCR2_REVERSE_MDIPN3_TX_POL   0x0008
 
#define MV88E1512_SCR2_REVERSE_MDIPN2_TX_POL   0x0004
 
#define MV88E1512_SCR2_REVERSE_MDIPN1_TX_POL   0x0002
 
#define MV88E1512_SCR2_REVERSE_MDIPN0_TX_POL   0x0001
 
#define MV88E1512_PAGSR_PAGE_SEL   0x00FF
 
#define MV88E1512_GISR_INTERRUPT   0x0001
 

Functions

error_t mv88e1512Init (NetInterface *interface)
 88E1512 PHY transceiver initialization More...
 
void mv88e1512Tick (NetInterface *interface)
 88E1512 timer handler More...
 
void mv88e1512EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void mv88e1512DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void mv88e1512EventHandler (NetInterface *interface)
 88E1512 event handler More...
 
void mv88e1512WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t mv88e1512ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void mv88e1512DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 

Variables

const PhyDriver mv88e1512PhyDriver
 88E1512 Ethernet PHY driver More...
 

Detailed Description

88E1512 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 mv88e1512_driver.h.

Macro Definition Documentation

◆ MV88E1512_ANAR

#define MV88E1512_ANAR   0x04

Definition at line 49 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_100BT4

#define MV88E1512_ANAR_100BT4   0x0200

Definition at line 112 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_100BTX_FD

#define MV88E1512_ANAR_100BTX_FD   0x0100

Definition at line 113 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_100BTX_HD

#define MV88E1512_ANAR_100BTX_HD   0x0080

Definition at line 114 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_10BT_FD

#define MV88E1512_ANAR_10BT_FD   0x0040

Definition at line 115 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_10BT_HD

#define MV88E1512_ANAR_10BT_HD   0x0020

Definition at line 116 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_ACK

#define MV88E1512_ANAR_ACK   0x4000

Definition at line 108 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_ASYM_PAUSE

#define MV88E1512_ANAR_ASYM_PAUSE   0x0800

Definition at line 110 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_NEXT_PAGE

#define MV88E1512_ANAR_NEXT_PAGE   0x8000

Definition at line 107 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_PAUSE

#define MV88E1512_ANAR_PAUSE   0x0400

Definition at line 111 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_REMOTE_FAULT

#define MV88E1512_ANAR_REMOTE_FAULT   0x2000

Definition at line 109 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_SELECTOR

#define MV88E1512_ANAR_SELECTOR   0x001F

Definition at line 117 of file mv88e1512_driver.h.

◆ MV88E1512_ANAR_SELECTOR_DEFAULT

#define MV88E1512_ANAR_SELECTOR_DEFAULT   0x0001

Definition at line 118 of file mv88e1512_driver.h.

◆ MV88E1512_ANER

#define MV88E1512_ANER   0x06

Definition at line 51 of file mv88e1512_driver.h.

◆ MV88E1512_ANER_LP_AN_ABLE

#define MV88E1512_ANER_LP_AN_ABLE   0x0001

Definition at line 140 of file mv88e1512_driver.h.

◆ MV88E1512_ANER_LP_NEXT_PAGE_ABLE

#define MV88E1512_ANER_LP_NEXT_PAGE_ABLE   0x0008

Definition at line 137 of file mv88e1512_driver.h.

◆ MV88E1512_ANER_NEXT_PAGE_ABLE

#define MV88E1512_ANER_NEXT_PAGE_ABLE   0x0004

Definition at line 138 of file mv88e1512_driver.h.

◆ MV88E1512_ANER_PAGE_RECEIVED

#define MV88E1512_ANER_PAGE_RECEIVED   0x0002

Definition at line 139 of file mv88e1512_driver.h.

◆ MV88E1512_ANER_PAR_DETECT_FAULT

#define MV88E1512_ANER_PAR_DETECT_FAULT   0x0010

Definition at line 136 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR

#define MV88E1512_ANLPAR   0x05

Definition at line 50 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_100BT4

#define MV88E1512_ANLPAR_100BT4   0x0200

Definition at line 127 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_100BTX_FD

#define MV88E1512_ANLPAR_100BTX_FD   0x0100

Definition at line 128 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_100BTX_HD

#define MV88E1512_ANLPAR_100BTX_HD   0x0080

Definition at line 129 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_10BT_FD

#define MV88E1512_ANLPAR_10BT_FD   0x0040

Definition at line 130 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_10BT_HD

#define MV88E1512_ANLPAR_10BT_HD   0x0020

Definition at line 131 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_ACK

#define MV88E1512_ANLPAR_ACK   0x4000

Definition at line 122 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_ASYM_PAUSE

#define MV88E1512_ANLPAR_ASYM_PAUSE   0x0800

Definition at line 125 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_NEXT_PAGE

#define MV88E1512_ANLPAR_NEXT_PAGE   0x8000

Definition at line 121 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_PAUSE

#define MV88E1512_ANLPAR_PAUSE   0x0400

Definition at line 126 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_REMOTE_FAULT

#define MV88E1512_ANLPAR_REMOTE_FAULT   0x2000

Definition at line 123 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_SELECTOR

#define MV88E1512_ANLPAR_SELECTOR   0x001F

Definition at line 132 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_SELECTOR_DEFAULT

#define MV88E1512_ANLPAR_SELECTOR_DEFAULT   0x0001

Definition at line 133 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPAR_TECH_ABLE

#define MV88E1512_ANLPAR_TECH_ABLE   0x1000

Definition at line 124 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR

#define MV88E1512_ANLPNPR   0x08

Definition at line 53 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_ACK

#define MV88E1512_ANLPNPR_ACK   0x4000

Definition at line 151 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_ACK2

#define MV88E1512_ANLPNPR_ACK2   0x1000

Definition at line 153 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_MESSAGE

#define MV88E1512_ANLPNPR_MESSAGE   0x07FF

Definition at line 155 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_MSG_PAGE

#define MV88E1512_ANLPNPR_MSG_PAGE   0x2000

Definition at line 152 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_NEXT_PAGE

#define MV88E1512_ANLPNPR_NEXT_PAGE   0x8000

Definition at line 150 of file mv88e1512_driver.h.

◆ MV88E1512_ANLPNPR_TOGGLE

#define MV88E1512_ANLPNPR_TOGGLE   0x0800

Definition at line 154 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR

#define MV88E1512_ANNPR   0x07

Definition at line 52 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR_ACK2

#define MV88E1512_ANNPR_ACK2   0x1000

Definition at line 145 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR_MESSAGE

#define MV88E1512_ANNPR_MESSAGE   0x07FF

Definition at line 147 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR_MSG_PAGE

#define MV88E1512_ANNPR_MSG_PAGE   0x2000

Definition at line 144 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR_NEXT_PAGE

#define MV88E1512_ANNPR_NEXT_PAGE   0x8000

Definition at line 143 of file mv88e1512_driver.h.

◆ MV88E1512_ANNPR_TOGGLE

#define MV88E1512_ANNPR_TOGGLE   0x0800

Definition at line 146 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR

#define MV88E1512_BMCR   0x00

Definition at line 45 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_AN_EN

#define MV88E1512_BMCR_AN_EN   0x1000

Definition at line 70 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_COL_TEST

#define MV88E1512_BMCR_COL_TEST   0x0080

Definition at line 75 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_DUPLEX_MODE

#define MV88E1512_BMCR_DUPLEX_MODE   0x0100

Definition at line 74 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_ISOLATE

#define MV88E1512_BMCR_ISOLATE   0x0400

Definition at line 72 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_LOOPBACK

#define MV88E1512_BMCR_LOOPBACK   0x4000

Definition at line 68 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_POWER_DOWN

#define MV88E1512_BMCR_POWER_DOWN   0x0800

Definition at line 71 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_RESET

#define MV88E1512_BMCR_RESET   0x8000

Definition at line 67 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_RESTART_AN

#define MV88E1512_BMCR_RESTART_AN   0x0200

Definition at line 73 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_SPEED_SEL_LSB

#define MV88E1512_BMCR_SPEED_SEL_LSB   0x2000

Definition at line 69 of file mv88e1512_driver.h.

◆ MV88E1512_BMCR_SPEED_SEL_MSB

#define MV88E1512_BMCR_SPEED_SEL_MSB   0x0040

Definition at line 76 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR

#define MV88E1512_BMSR   0x01

Definition at line 46 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_100BT2_FD

#define MV88E1512_BMSR_100BT2_FD   0x0400

Definition at line 84 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_100BT2_HD

#define MV88E1512_BMSR_100BT2_HD   0x0200

Definition at line 85 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_100BT4

#define MV88E1512_BMSR_100BT4   0x8000

Definition at line 79 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_100BTX_FD

#define MV88E1512_BMSR_100BTX_FD   0x4000

Definition at line 80 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_100BTX_HD

#define MV88E1512_BMSR_100BTX_HD   0x2000

Definition at line 81 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_10BT_FD

#define MV88E1512_BMSR_10BT_FD   0x1000

Definition at line 82 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_10BT_HD

#define MV88E1512_BMSR_10BT_HD   0x0800

Definition at line 83 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_AN_CAPABLE

#define MV88E1512_BMSR_AN_CAPABLE   0x0008

Definition at line 90 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_AN_COMPLETE

#define MV88E1512_BMSR_AN_COMPLETE   0x0020

Definition at line 88 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_EXTENDED_CAPABLE

#define MV88E1512_BMSR_EXTENDED_CAPABLE   0x0001

Definition at line 93 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_EXTENDED_STATUS

#define MV88E1512_BMSR_EXTENDED_STATUS   0x0100

Definition at line 86 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_JABBER_DETECT

#define MV88E1512_BMSR_JABBER_DETECT   0x0002

Definition at line 92 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_LINK_STATUS

#define MV88E1512_BMSR_LINK_STATUS   0x0004

Definition at line 91 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_MF_PREAMBLE_SUPPR

#define MV88E1512_BMSR_MF_PREAMBLE_SUPPR   0x0040

Definition at line 87 of file mv88e1512_driver.h.

◆ MV88E1512_BMSR_REMOTE_FAULT

#define MV88E1512_BMSR_REMOTE_FAULT   0x0010

Definition at line 89 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR

#define MV88E1512_GBCR   0x09

Definition at line 54 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_1000BT_FD

#define MV88E1512_GBCR_1000BT_FD   0x0200

Definition at line 162 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_1000BT_HD

#define MV88E1512_GBCR_1000BT_HD   0x0100

Definition at line 163 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_MS_MAN_CONF_EN

#define MV88E1512_GBCR_MS_MAN_CONF_EN   0x1000

Definition at line 159 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_MS_MAN_CONF_VAL

#define MV88E1512_GBCR_MS_MAN_CONF_VAL   0x0800

Definition at line 160 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_PORT_TYPE

#define MV88E1512_GBCR_PORT_TYPE   0x0400

Definition at line 161 of file mv88e1512_driver.h.

◆ MV88E1512_GBCR_TEST_MODE

#define MV88E1512_GBCR_TEST_MODE   0xE000

Definition at line 158 of file mv88e1512_driver.h.

◆ MV88E1512_GBESR

#define MV88E1512_GBESR   0x0F

Definition at line 56 of file mv88e1512_driver.h.

◆ MV88E1512_GBESR_1000BT_FD

#define MV88E1512_GBESR_1000BT_FD   0x2000

Definition at line 177 of file mv88e1512_driver.h.

◆ MV88E1512_GBESR_1000BT_HD

#define MV88E1512_GBESR_1000BT_HD   0x1000

Definition at line 178 of file mv88e1512_driver.h.

◆ MV88E1512_GBESR_1000BX_FD

#define MV88E1512_GBESR_1000BX_FD   0x8000

Definition at line 175 of file mv88e1512_driver.h.

◆ MV88E1512_GBESR_1000BX_HD

#define MV88E1512_GBESR_1000BX_HD   0x4000

Definition at line 176 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR

#define MV88E1512_GBSR   0x0A

Definition at line 55 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_IDLE_ERR_COUNT

#define MV88E1512_GBSR_IDLE_ERR_COUNT   0x00FF

Definition at line 172 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_LOCAL_RECEIVER_STATUS

#define MV88E1512_GBSR_LOCAL_RECEIVER_STATUS   0x2000

Definition at line 168 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_LP_1000BT_FD

#define MV88E1512_GBSR_LP_1000BT_FD   0x0800

Definition at line 170 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_LP_1000BT_HD

#define MV88E1512_GBSR_LP_1000BT_HD   0x0400

Definition at line 171 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_MS_CONF_FAULT

#define MV88E1512_GBSR_MS_CONF_FAULT   0x8000

Definition at line 166 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_MS_CONF_RES

#define MV88E1512_GBSR_MS_CONF_RES   0x4000

Definition at line 167 of file mv88e1512_driver.h.

◆ MV88E1512_GBSR_REMOTE_RECEIVER_STATUS

#define MV88E1512_GBSR_REMOTE_RECEIVER_STATUS   0x1000

Definition at line 169 of file mv88e1512_driver.h.

◆ MV88E1512_GISR

#define MV88E1512_GISR   0x17

Definition at line 64 of file mv88e1512_driver.h.

◆ MV88E1512_GISR_INTERRUPT

#define MV88E1512_GISR_INTERRUPT   0x0001

Definition at line 251 of file mv88e1512_driver.h.

◆ MV88E1512_IER

#define MV88E1512_IER   0x12

Definition at line 59 of file mv88e1512_driver.h.

◆ MV88E1512_IER_AN_COMPLETE

#define MV88E1512_IER_AN_COMPLETE   0x0800

Definition at line 215 of file mv88e1512_driver.h.

◆ MV88E1512_IER_AN_ERROR

#define MV88E1512_IER_AN_ERROR   0x8000

Definition at line 211 of file mv88e1512_driver.h.

◆ MV88E1512_IER_DUPLEX_CHANGED

#define MV88E1512_IER_DUPLEX_CHANGED   0x2000

Definition at line 213 of file mv88e1512_driver.h.

◆ MV88E1512_IER_ENERGY_DETECT

#define MV88E1512_IER_ENERGY_DETECT   0x0010

Definition at line 220 of file mv88e1512_driver.h.

◆ MV88E1512_IER_FALSE_CARRIER

#define MV88E1512_IER_FALSE_CARRIER   0x0100

Definition at line 218 of file mv88e1512_driver.h.

◆ MV88E1512_IER_FLP_COMPLETE

#define MV88E1512_IER_FLP_COMPLETE   0x0008

Definition at line 221 of file mv88e1512_driver.h.

◆ MV88E1512_IER_JABBER

#define MV88E1512_IER_JABBER   0x0001

Definition at line 223 of file mv88e1512_driver.h.

◆ MV88E1512_IER_LINK_STATUS_CHANGED

#define MV88E1512_IER_LINK_STATUS_CHANGED   0x0400

Definition at line 216 of file mv88e1512_driver.h.

◆ MV88E1512_IER_MDI_CROSSOVER_CHANGED

#define MV88E1512_IER_MDI_CROSSOVER_CHANGED   0x0040

Definition at line 219 of file mv88e1512_driver.h.

◆ MV88E1512_IER_PAGE_RECEIVED

#define MV88E1512_IER_PAGE_RECEIVED   0x1000

Definition at line 214 of file mv88e1512_driver.h.

◆ MV88E1512_IER_POLARITY_CHANGED

#define MV88E1512_IER_POLARITY_CHANGED   0x0002

Definition at line 222 of file mv88e1512_driver.h.

◆ MV88E1512_IER_SPEED_CHANGED

#define MV88E1512_IER_SPEED_CHANGED   0x4000

Definition at line 212 of file mv88e1512_driver.h.

◆ MV88E1512_IER_SYMBOL_ERROR

#define MV88E1512_IER_SYMBOL_ERROR   0x0200

Definition at line 217 of file mv88e1512_driver.h.

◆ MV88E1512_ISR

#define MV88E1512_ISR   0x13

Definition at line 60 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_AN_COMPLETE

#define MV88E1512_ISR_AN_COMPLETE   0x0800

Definition at line 230 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_AN_ERROR

#define MV88E1512_ISR_AN_ERROR   0x8000

Definition at line 226 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_DUPLEX_CHANGED

#define MV88E1512_ISR_DUPLEX_CHANGED   0x2000

Definition at line 228 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_ENERGY_DETECT

#define MV88E1512_ISR_ENERGY_DETECT   0x0010

Definition at line 235 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_FALSE_CARRIER

#define MV88E1512_ISR_FALSE_CARRIER   0x0100

Definition at line 233 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_FLP_COMPLETE

#define MV88E1512_ISR_FLP_COMPLETE   0x0008

Definition at line 236 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_JABBER

#define MV88E1512_ISR_JABBER   0x0001

Definition at line 238 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_LINK_STATUS_CHANGED

#define MV88E1512_ISR_LINK_STATUS_CHANGED   0x0400

Definition at line 231 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_MDI_CROSSOVER_CHANGED

#define MV88E1512_ISR_MDI_CROSSOVER_CHANGED   0x0040

Definition at line 234 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_PAGE_RECEIVED

#define MV88E1512_ISR_PAGE_RECEIVED   0x1000

Definition at line 229 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_POLARITY_CHANGED

#define MV88E1512_ISR_POLARITY_CHANGED   0x0002

Definition at line 237 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_SPEED_CHANGED

#define MV88E1512_ISR_SPEED_CHANGED   0x4000

Definition at line 227 of file mv88e1512_driver.h.

◆ MV88E1512_ISR_SYMBOL_ERROR

#define MV88E1512_ISR_SYMBOL_ERROR   0x0200

Definition at line 232 of file mv88e1512_driver.h.

◆ MV88E1512_PAGSR

#define MV88E1512_PAGSR   0x16

Definition at line 63 of file mv88e1512_driver.h.

◆ MV88E1512_PAGSR_PAGE_SEL

#define MV88E1512_PAGSR_PAGE_SEL   0x00FF

Definition at line 248 of file mv88e1512_driver.h.

◆ MV88E1512_PHY_ADDR

#define MV88E1512_PHY_ADDR   0

Definition at line 39 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID1

#define MV88E1512_PHYID1   0x02

Definition at line 47 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID1_OUI_MSB

#define MV88E1512_PHYID1_OUI_MSB   0xFFFF

Definition at line 96 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID1_OUI_MSB_DEFAULT

#define MV88E1512_PHYID1_OUI_MSB_DEFAULT   0x0141

Definition at line 97 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2

#define MV88E1512_PHYID2   0x03

Definition at line 48 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2_MODEL_NUM

#define MV88E1512_PHYID2_MODEL_NUM   0x03F0

Definition at line 102 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2_MODEL_NUM_DEFAULT

#define MV88E1512_PHYID2_MODEL_NUM_DEFAULT   0x01D0

Definition at line 103 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2_OUI_LSB

#define MV88E1512_PHYID2_OUI_LSB   0xFC00

Definition at line 100 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2_OUI_LSB_DEFAULT

#define MV88E1512_PHYID2_OUI_LSB_DEFAULT   0x0C00

Definition at line 101 of file mv88e1512_driver.h.

◆ MV88E1512_PHYID2_REVISION_NUM

#define MV88E1512_PHYID2_REVISION_NUM   0x000F

Definition at line 104 of file mv88e1512_driver.h.

◆ MV88E1512_RECR

#define MV88E1512_RECR   0x15

Definition at line 62 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1

#define MV88E1512_SCR1   0x10

Definition at line 57 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_ENERGY_DETECT

#define MV88E1512_SCR1_ENERGY_DETECT   0x0300

Definition at line 183 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_FORCE_LINK_GOOD

#define MV88E1512_SCR1_FORCE_LINK_GOOD   0x0400

Definition at line 182 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_JABBER_DIS

#define MV88E1512_SCR1_JABBER_DIS   0x0001

Definition at line 191 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_LINK_PULSE_DIS

#define MV88E1512_SCR1_LINK_PULSE_DIS   0x8000

Definition at line 181 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_MDIX_MODE

#define MV88E1512_SCR1_MDIX_MODE   0x0060

Definition at line 184 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_MDIX_MODE_AUTO

#define MV88E1512_SCR1_MDIX_MODE_AUTO   0x0060

Definition at line 187 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_MDIX_MODE_MANUAL_MDI

#define MV88E1512_SCR1_MDIX_MODE_MANUAL_MDI   0x0000

Definition at line 185 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_MDIX_MODE_MANUAL_MDIX

#define MV88E1512_SCR1_MDIX_MODE_MANUAL_MDIX   0x0020

Definition at line 186 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_POLARITY_REVERSAL_DIS

#define MV88E1512_SCR1_POLARITY_REVERSAL_DIS   0x0002

Definition at line 190 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_POWER_DOWN

#define MV88E1512_SCR1_POWER_DOWN   0x0004

Definition at line 189 of file mv88e1512_driver.h.

◆ MV88E1512_SCR1_TX_DIS

#define MV88E1512_SCR1_TX_DIS   0x0008

Definition at line 188 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2

#define MV88E1512_SCR2   0x14

Definition at line 61 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2_BREAK_LINK_ON_INSUF_IPG

#define MV88E1512_SCR2_BREAK_LINK_ON_INSUF_IPG   0x0040

Definition at line 241 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2_REVERSE_MDIPN0_TX_POL

#define MV88E1512_SCR2_REVERSE_MDIPN0_TX_POL   0x0001

Definition at line 245 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2_REVERSE_MDIPN1_TX_POL

#define MV88E1512_SCR2_REVERSE_MDIPN1_TX_POL   0x0002

Definition at line 244 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2_REVERSE_MDIPN2_TX_POL

#define MV88E1512_SCR2_REVERSE_MDIPN2_TX_POL   0x0004

Definition at line 243 of file mv88e1512_driver.h.

◆ MV88E1512_SCR2_REVERSE_MDIPN3_TX_POL

#define MV88E1512_SCR2_REVERSE_MDIPN3_TX_POL   0x0008

Definition at line 242 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1

#define MV88E1512_SSR1   0x11

Definition at line 58 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_DUPLEX

#define MV88E1512_SSR1_DUPLEX   0x2000

Definition at line 198 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_ENERGY_DETECT_STATUS

#define MV88E1512_SSR1_ENERGY_DETECT_STATUS   0x0010

Definition at line 205 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_GLOBAL_LINK_STATUS

#define MV88E1512_SSR1_GLOBAL_LINK_STATUS   0x0008

Definition at line 206 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_JABBER

#define MV88E1512_SSR1_JABBER   0x0001

Definition at line 208 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_LINK

#define MV88E1512_SSR1_LINK   0x0400

Definition at line 201 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_MDI_CROSSOVER_STATUS

#define MV88E1512_SSR1_MDI_CROSSOVER_STATUS   0x0040

Definition at line 204 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_PAGE_RECEIVED

#define MV88E1512_SSR1_PAGE_RECEIVED   0x1000

Definition at line 199 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_POLARITY

#define MV88E1512_SSR1_POLARITY   0x0002

Definition at line 207 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_RX_PAUSE_EN

#define MV88E1512_SSR1_RX_PAUSE_EN   0x0100

Definition at line 203 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_SPEED

#define MV88E1512_SSR1_SPEED   0xC000

Definition at line 194 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_SPEED_1000MBPS

#define MV88E1512_SSR1_SPEED_1000MBPS   0x8000

Definition at line 197 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_SPEED_100MBPS

#define MV88E1512_SSR1_SPEED_100MBPS   0x4000

Definition at line 196 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_SPEED_10MBPS

#define MV88E1512_SSR1_SPEED_10MBPS   0x0000

Definition at line 195 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_SPEED_DUPLEX_RESOLVED

#define MV88E1512_SSR1_SPEED_DUPLEX_RESOLVED   0x0800

Definition at line 200 of file mv88e1512_driver.h.

◆ MV88E1512_SSR1_TX_PAUSE_EN

#define MV88E1512_SSR1_TX_PAUSE_EN   0x0200

Definition at line 202 of file mv88e1512_driver.h.

Function Documentation

◆ mv88e1512DisableIrq()

void mv88e1512DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 144 of file mv88e1512_driver.c.

◆ mv88e1512DumpPhyReg()

void mv88e1512DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 245 of file mv88e1512_driver.c.

◆ mv88e1512EnableIrq()

void mv88e1512EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 134 of file mv88e1512_driver.c.

◆ mv88e1512EventHandler()

void mv88e1512EventHandler ( NetInterface interface)

88E1512 event handler

Parameters
[in]interfaceUnderlying network interface

Definition at line 154 of file mv88e1512_driver.c.

◆ mv88e1512Init()

error_t mv88e1512Init ( NetInterface interface)

88E1512 PHY transceiver initialization

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 62 of file mv88e1512_driver.c.

◆ mv88e1512ReadPhyReg()

uint16_t mv88e1512ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 232 of file mv88e1512_driver.c.

◆ mv88e1512Tick()

void mv88e1512Tick ( NetInterface interface)

88E1512 timer handler

Parameters
[in]interfaceUnderlying network interface

Definition at line 100 of file mv88e1512_driver.c.

◆ mv88e1512WritePhyReg()

void mv88e1512WritePhyReg ( 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 216 of file mv88e1512_driver.c.

Variable Documentation

◆ mv88e1512PhyDriver

const PhyDriver mv88e1512PhyDriver

88E1512 Ethernet PHY driver

Definition at line 44 of file mv88e1512_driver.c.