tja1103_driver.h File Reference

TJA1103 100Base-T1 Ethernet PHY driver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define TJA1103_PHY_ADDR   0
 
#define TJA1103_PHY_ID1   0x02
 
#define TJA1103_PHY_ID2   0x03
 
#define TJA1103_MMDCTRL   0x0D
 
#define TJA1103_MMDAD   0x0E
 
#define TJA1103_B100T1_PMAPMD_CTL   0x01, 0x0834
 
#define TJA1103_DEVICE_CTRL   0x1E, 0x0040
 
#define TJA1103_DEVICE_CONFIG   0x1E, 0x0048
 
#define TJA1103_ALWAYS_ACCESSIBLE   0x1E, 0x801F
 
#define TJA1103_PORT_CTRL   0x1E, 0x8040
 
#define TJA1103_PORT_ABILITIES   0x1E, 0x8046
 
#define TJA1103_PORT_FUNC_IRQ_EN   0x1E, 0x807A
 
#define TJA1103_PHY_IRQ_ACK   0x1E, 0x80A0
 
#define TJA1103_PHY_IRQ_EN   0x1E, 0x80A1
 
#define TJA1103_PHY_IRQ_STATUS   0x1E, 0x80A2
 
#define TJA1103_PHY_CTRL   0x1E, 0x8100
 
#define TJA1103_PHY_STAT   0x1E, 0x8102
 
#define TJA1103_PHY_CONFIG   0x1E, 0x8108
 
#define TJA1103_SIGNAL_QUALITY   0x1E, 0x8320
 
#define TJA1103_CABLE_TEST   0x1E, 0x8330
 
#define TJA1103_SYM_ERR_COUNTER   0x1E, 0x8350
 
#define TJA1103_SYM_ERR_COUNTER_EXTENDED   0x1E, 0x8351
 
#define TJA1103_LINK_DROP_COUNTER   0x1E, 0x8352
 
#define TJA1103_LINK_LOSSES_AND_FAILURES   0x1E, 0x8353
 
#define TJA1103_PTP_IRQ_ACK   0x1E, 0x9008
 
#define TJA1103_RX_GOOD_FRAME_COUNTER   0x1E, 0xA950
 
#define TJA1103_RX_BAD_FRAME_COUNTER   0x1E, 0xA952
 
#define TJA1103_RX_ERR_FRAME_COUNTER   0x1E, 0xA954
 
#define TJA1103_INFRA_CTRL   0x1E, 0xAC00
 
#define TJA1103_MONITOR_STATUS   0x1E, 0xAC80
 
#define TJA1103_MONITOR_CONFIG   0x1E, 0xAC86
 
#define TJA1103_ABILITIES   0x1E, 0xAFC4
 
#define TJA1103_MII_BASIC_CONFIG   0x1E, 0xAFC6
 
#define TJA1103_RXID   0x1E, 0xAFCC
 
#define TJA1103_TXID   0x1E, 0xAFCD
 
#define TJA1103_RX_PREAMBLE_COUNTER   0x1E, 0xAFCE
 
#define TJA1103_TX_PREAMBLE_COUNTER   0x1E, 0xAFCF
 
#define TJA1103_RX_IPG_LENGTH   0x1E, 0xAFD0
 
#define TJA1103_TX_IPG_LENGTH   0x1E, 0xAFD1
 
#define TJA1103_PHY_ID1_OUI_MSB   0xFFFF
 
#define TJA1103_PHY_ID1_OUI_MSB_DEFAULT   0x001B
 
#define TJA1103_PHY_ID2_OUI_LSB   0xFC00
 
#define TJA1103_PHY_ID2_OUI_LSB_DEFAULT   0xB000
 
#define TJA1103_PHY_ID2_TYPE_NO   0x03F0
 
#define TJA1103_PHY_ID2_TYPE_NO_DEFAULT   0x0010
 
#define TJA1103_PHY_ID2_REVISION_NO   0x000F
 
#define TJA1103_MMDCTRL_FNCTN   0xC000
 
#define TJA1103_MMDCTRL_FNCTN_ADDR   0x0000
 
#define TJA1103_MMDCTRL_FNCTN_DATA_NO_POST_INC   0x4000
 
#define TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_RW   0x8000
 
#define TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_W   0xC000
 
#define TJA1103_MMDCTRL_DEVAD   0x001F
 
#define TJA1103_B100T1_PMAPMD_CTL_CONFIG_EN   0x8000
 
#define TJA1103_B100T1_PMAPMD_CTL_MASTER   0x4000
 
#define TJA1103_DEVICE_CTRL_RESET   0x8000
 
#define TJA1103_DEVICE_CTRL_CONFIG_GLOBAL_EN   0x4000
 
#define TJA1103_DEVICE_CTRL_CONFIG_ALL_EN   0x2000
 
#define TJA1103_ALWAYS_ACCESSIBLE_FUSA_PASS   0x0010
 
#define TJA1103_PORT_CTRL_EN   0x4000
 
#define TJA1103_PORT_ABILITIES_PTP   0x0010
 
#define TJA1103_PORT_FUNC_IRQ_EN_PTP_IRQS   0x0008
 
#define TJA1103_PHY_IRQ_ACK_LINK_EVENT   0x0002
 
#define TJA1103_PHY_IRQ_EN_LINK_AVAIL   0x0004
 
#define TJA1103_PHY_IRQ_EN_LINK_EVENT   0x0002
 
#define TJA1103_PHY_IRQ_STATUS_LINK_AVAIL   0x0004
 
#define TJA1103_PHY_IRQ_STATUS_LINK_EVENT   0x0002
 
#define TJA1103_PHY_CTRL_CONFIG_EN   0x4000
 
#define TJA1103_PHY_CTRL_START_OP   0x0001
 
#define TJA1103_PHY_STAT_LINK_STATUS   0x0004
 
#define TJA1103_PHY_CONFIG_AUTO   0x0001
 
#define TJA1103_SIGNAL_QUALITY_SQI_VALID   0x4000
 
#define TJA1103_SIGNAL_QUALITY_SQI_MASK   0x0007
 
#define TJA1103_CABLE_TEST_EN   0x8000
 
#define TJA1103_CABLE_TEST_START   0x4000
 
#define TJA1103_CABLE_TEST_VALID   0x2000
 
#define TJA1103_CABLE_TEST_RESULT   0x0007
 
#define TJA1103_CABLE_TEST_RESULT_OK   0x0000
 
#define TJA1103_CABLE_TEST_RESULT_SHORTED   0x0001
 
#define TJA1103_CABLE_TEST_RESULT_OPEN   0x0002
 
#define TJA1103_CABLE_TEST_RESULT_UNKNOWN   0x0007
 
#define TJA1103_INFRA_CTRL_EN   0x4000
 
#define TJA1103_ABILITIES_RGMII_ID   0x8000
 
#define TJA1103_ABILITIES_RGMII   0x4000
 
#define TJA1103_ABILITIES_RMII   0x0400
 
#define TJA1103_ABILITIES_REVMII   0x0200
 
#define TJA1103_ABILITIES_MII   0x0100
 
#define TJA1103_ABILITIES_SGMII   0x0001
 
#define TJA1103_MII_BASIC_CONFIG_REV   0x0100
 
#define TJA1103_MII_BASIC_CONFIG_MODE   0x000F
 
#define TJA1103_MII_BASIC_CONFIG_MODE_MII   0x0004
 
#define TJA1103_MII_BASIC_CONFIG_MODE_RMII   0x0005
 
#define TJA1103_MII_BASIC_CONFIG_MODE_RGMII   0x0007
 
#define TJA1103_MII_BASIC_CONFIG_MODE_SGMII   0x0009
 
#define TJA1103_RXID_EN   0x8000
 
#define TJA1103_TXID_EN   0x8000
 
#define TJA1103_SYM_ERR_COUNTER_EN   0x8000
 
#define TJA1103_SYM_ERR_COUNTER_EXTENDED_EN   0x8000
 
#define TJA1103_LINK_DROP_COUNTER_EN   0x8000
 
#define TJA1103_LINK_LOSSES_AND_FAILURES_EN   0x8000
 
#define TJA1103_RX_GOOD_FRAME_COUNTER_EN   0x8000
 
#define TJA1103_RX_BAD_FRAME_COUNTER_EN   0x8000
 
#define TJA1103_RX_ERR_FRAME_COUNTER_EN   0x8000
 
#define TJA1103_RX_PREAMBLE_COUNTER_EN   0x8000
 
#define TJA1103_TX_PREAMBLE_COUNTER_EN   0x8000
 
#define TJA1103_MONITOR_STATUS_RESET   0x8000
 
#define TJA1103_MONITOR_CONFIG_LOST_FRAMES_CNT_EN   0x0200
 
#define TJA1103_MONITOR_CONFIG_ALL_FRAMES_CNT_EN   0x0100
 

Functions

error_t tja1103Init (NetInterface *interface)
 TJA1103 PHY transceiver initialization. More...
 
void tja1103InitHook (NetInterface *interface)
 TJA1103 custom configuration. More...
 
void tja1103Tick (NetInterface *interface)
 TJA1103 timer handler. More...
 
void tja1103EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void tja1103DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void tja1103EventHandler (NetInterface *interface)
 TJA1103 event handler. More...
 
void tja1103WritePhyReg (NetInterface *interface, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t tja1103ReadPhyReg (NetInterface *interface, uint8_t address)
 Read PHY register. More...
 
void tja1103DumpPhyReg (NetInterface *interface)
 Dump PHY registers for debugging purpose. More...
 
void tja1103WriteMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data)
 Write MMD register. More...
 
uint16_t tja1103ReadMmdReg (NetInterface *interface, uint8_t devAddr, uint16_t regAddr)
 Read MMD register. More...
 

Variables

const PhyDriver tja1103PhyDriver
 TJA1103 Ethernet PHY driver. More...
 

Detailed Description

TJA1103 100Base-T1 Ethernet PHY driver.

License

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

Copyright (C) 2010-2024 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
2.4.4

Definition in file tja1103_driver.h.

Macro Definition Documentation

◆ TJA1103_ABILITIES

#define TJA1103_ABILITIES   0x1E, 0xAFC4

Definition at line 77 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_MII

#define TJA1103_ABILITIES_MII   0x0100

Definition at line 169 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_REVMII

#define TJA1103_ABILITIES_REVMII   0x0200

Definition at line 168 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_RGMII

#define TJA1103_ABILITIES_RGMII   0x4000

Definition at line 166 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_RGMII_ID

#define TJA1103_ABILITIES_RGMII_ID   0x8000

Definition at line 165 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_RMII

#define TJA1103_ABILITIES_RMII   0x0400

Definition at line 167 of file tja1103_driver.h.

◆ TJA1103_ABILITIES_SGMII

#define TJA1103_ABILITIES_SGMII   0x0001

Definition at line 170 of file tja1103_driver.h.

◆ TJA1103_ALWAYS_ACCESSIBLE

#define TJA1103_ALWAYS_ACCESSIBLE   0x1E, 0x801F

Definition at line 54 of file tja1103_driver.h.

◆ TJA1103_ALWAYS_ACCESSIBLE_FUSA_PASS

#define TJA1103_ALWAYS_ACCESSIBLE_FUSA_PASS   0x0010

Definition at line 115 of file tja1103_driver.h.

◆ TJA1103_B100T1_PMAPMD_CTL

#define TJA1103_B100T1_PMAPMD_CTL   0x01, 0x0834

Definition at line 51 of file tja1103_driver.h.

◆ TJA1103_B100T1_PMAPMD_CTL_CONFIG_EN

#define TJA1103_B100T1_PMAPMD_CTL_CONFIG_EN   0x8000

Definition at line 106 of file tja1103_driver.h.

◆ TJA1103_B100T1_PMAPMD_CTL_MASTER

#define TJA1103_B100T1_PMAPMD_CTL_MASTER   0x4000

Definition at line 107 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST

#define TJA1103_CABLE_TEST   0x1E, 0x8330

Definition at line 65 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_EN

#define TJA1103_CABLE_TEST_EN   0x8000

Definition at line 152 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_RESULT

#define TJA1103_CABLE_TEST_RESULT   0x0007

Definition at line 155 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_RESULT_OK

#define TJA1103_CABLE_TEST_RESULT_OK   0x0000

Definition at line 156 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_RESULT_OPEN

#define TJA1103_CABLE_TEST_RESULT_OPEN   0x0002

Definition at line 158 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_RESULT_SHORTED

#define TJA1103_CABLE_TEST_RESULT_SHORTED   0x0001

Definition at line 157 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_RESULT_UNKNOWN

#define TJA1103_CABLE_TEST_RESULT_UNKNOWN   0x0007

Definition at line 159 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_START

#define TJA1103_CABLE_TEST_START   0x4000

Definition at line 153 of file tja1103_driver.h.

◆ TJA1103_CABLE_TEST_VALID

#define TJA1103_CABLE_TEST_VALID   0x2000

Definition at line 154 of file tja1103_driver.h.

◆ TJA1103_DEVICE_CONFIG

#define TJA1103_DEVICE_CONFIG   0x1E, 0x0048

Definition at line 53 of file tja1103_driver.h.

◆ TJA1103_DEVICE_CTRL

#define TJA1103_DEVICE_CTRL   0x1E, 0x0040

Definition at line 52 of file tja1103_driver.h.

◆ TJA1103_DEVICE_CTRL_CONFIG_ALL_EN

#define TJA1103_DEVICE_CTRL_CONFIG_ALL_EN   0x2000

Definition at line 112 of file tja1103_driver.h.

◆ TJA1103_DEVICE_CTRL_CONFIG_GLOBAL_EN

#define TJA1103_DEVICE_CTRL_CONFIG_GLOBAL_EN   0x4000

Definition at line 111 of file tja1103_driver.h.

◆ TJA1103_DEVICE_CTRL_RESET

#define TJA1103_DEVICE_CTRL_RESET   0x8000

Definition at line 110 of file tja1103_driver.h.

◆ TJA1103_INFRA_CTRL

#define TJA1103_INFRA_CTRL   0x1E, 0xAC00

Definition at line 74 of file tja1103_driver.h.

◆ TJA1103_INFRA_CTRL_EN

#define TJA1103_INFRA_CTRL_EN   0x4000

Definition at line 162 of file tja1103_driver.h.

◆ TJA1103_LINK_DROP_COUNTER

#define TJA1103_LINK_DROP_COUNTER   0x1E, 0x8352

Definition at line 68 of file tja1103_driver.h.

◆ TJA1103_LINK_DROP_COUNTER_EN

#define TJA1103_LINK_DROP_COUNTER_EN   0x8000

Definition at line 193 of file tja1103_driver.h.

◆ TJA1103_LINK_LOSSES_AND_FAILURES

#define TJA1103_LINK_LOSSES_AND_FAILURES   0x1E, 0x8353

Definition at line 69 of file tja1103_driver.h.

◆ TJA1103_LINK_LOSSES_AND_FAILURES_EN

#define TJA1103_LINK_LOSSES_AND_FAILURES_EN   0x8000

Definition at line 196 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG

#define TJA1103_MII_BASIC_CONFIG   0x1E, 0xAFC6

Definition at line 78 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_MODE

#define TJA1103_MII_BASIC_CONFIG_MODE   0x000F

Definition at line 174 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_MODE_MII

#define TJA1103_MII_BASIC_CONFIG_MODE_MII   0x0004

Definition at line 175 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_MODE_RGMII

#define TJA1103_MII_BASIC_CONFIG_MODE_RGMII   0x0007

Definition at line 177 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_MODE_RMII

#define TJA1103_MII_BASIC_CONFIG_MODE_RMII   0x0005

Definition at line 176 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_MODE_SGMII

#define TJA1103_MII_BASIC_CONFIG_MODE_SGMII   0x0009

Definition at line 178 of file tja1103_driver.h.

◆ TJA1103_MII_BASIC_CONFIG_REV

#define TJA1103_MII_BASIC_CONFIG_REV   0x0100

Definition at line 173 of file tja1103_driver.h.

◆ TJA1103_MMDAD

#define TJA1103_MMDAD   0x0E

Definition at line 48 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL

#define TJA1103_MMDCTRL   0x0D

Definition at line 47 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_DEVAD

#define TJA1103_MMDCTRL_DEVAD   0x001F

Definition at line 103 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_FNCTN

#define TJA1103_MMDCTRL_FNCTN   0xC000

Definition at line 98 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_FNCTN_ADDR

#define TJA1103_MMDCTRL_FNCTN_ADDR   0x0000

Definition at line 99 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_FNCTN_DATA_NO_POST_INC

#define TJA1103_MMDCTRL_FNCTN_DATA_NO_POST_INC   0x4000

Definition at line 100 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_RW

#define TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_RW   0x8000

Definition at line 101 of file tja1103_driver.h.

◆ TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_W

#define TJA1103_MMDCTRL_FNCTN_DATA_POST_INC_W   0xC000

Definition at line 102 of file tja1103_driver.h.

◆ TJA1103_MONITOR_CONFIG

#define TJA1103_MONITOR_CONFIG   0x1E, 0xAC86

Definition at line 76 of file tja1103_driver.h.

◆ TJA1103_MONITOR_CONFIG_ALL_FRAMES_CNT_EN

#define TJA1103_MONITOR_CONFIG_ALL_FRAMES_CNT_EN   0x0100

Definition at line 218 of file tja1103_driver.h.

◆ TJA1103_MONITOR_CONFIG_LOST_FRAMES_CNT_EN

#define TJA1103_MONITOR_CONFIG_LOST_FRAMES_CNT_EN   0x0200

Definition at line 217 of file tja1103_driver.h.

◆ TJA1103_MONITOR_STATUS

#define TJA1103_MONITOR_STATUS   0x1E, 0xAC80

Definition at line 75 of file tja1103_driver.h.

◆ TJA1103_MONITOR_STATUS_RESET

#define TJA1103_MONITOR_STATUS_RESET   0x8000

Definition at line 214 of file tja1103_driver.h.

◆ TJA1103_PHY_ADDR

#define TJA1103_PHY_ADDR   0

Definition at line 39 of file tja1103_driver.h.

◆ TJA1103_PHY_CONFIG

#define TJA1103_PHY_CONFIG   0x1E, 0x8108

Definition at line 63 of file tja1103_driver.h.

◆ TJA1103_PHY_CONFIG_AUTO

#define TJA1103_PHY_CONFIG_AUTO   0x0001

Definition at line 145 of file tja1103_driver.h.

◆ TJA1103_PHY_CTRL

#define TJA1103_PHY_CTRL   0x1E, 0x8100

Definition at line 61 of file tja1103_driver.h.

◆ TJA1103_PHY_CTRL_CONFIG_EN

#define TJA1103_PHY_CTRL_CONFIG_EN   0x4000

Definition at line 138 of file tja1103_driver.h.

◆ TJA1103_PHY_CTRL_START_OP

#define TJA1103_PHY_CTRL_START_OP   0x0001

Definition at line 139 of file tja1103_driver.h.

◆ TJA1103_PHY_ID1

#define TJA1103_PHY_ID1   0x02

Definition at line 45 of file tja1103_driver.h.

◆ TJA1103_PHY_ID1_OUI_MSB

#define TJA1103_PHY_ID1_OUI_MSB   0xFFFF

Definition at line 87 of file tja1103_driver.h.

◆ TJA1103_PHY_ID1_OUI_MSB_DEFAULT

#define TJA1103_PHY_ID1_OUI_MSB_DEFAULT   0x001B

Definition at line 88 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2

#define TJA1103_PHY_ID2   0x03

Definition at line 46 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2_OUI_LSB

#define TJA1103_PHY_ID2_OUI_LSB   0xFC00

Definition at line 91 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2_OUI_LSB_DEFAULT

#define TJA1103_PHY_ID2_OUI_LSB_DEFAULT   0xB000

Definition at line 92 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2_REVISION_NO

#define TJA1103_PHY_ID2_REVISION_NO   0x000F

Definition at line 95 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2_TYPE_NO

#define TJA1103_PHY_ID2_TYPE_NO   0x03F0

Definition at line 93 of file tja1103_driver.h.

◆ TJA1103_PHY_ID2_TYPE_NO_DEFAULT

#define TJA1103_PHY_ID2_TYPE_NO_DEFAULT   0x0010

Definition at line 94 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_ACK

#define TJA1103_PHY_IRQ_ACK   0x1E, 0x80A0

Definition at line 58 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_ACK_LINK_EVENT

#define TJA1103_PHY_IRQ_ACK_LINK_EVENT   0x0002

Definition at line 127 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_EN

#define TJA1103_PHY_IRQ_EN   0x1E, 0x80A1

Definition at line 59 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_EN_LINK_AVAIL

#define TJA1103_PHY_IRQ_EN_LINK_AVAIL   0x0004

Definition at line 130 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_EN_LINK_EVENT

#define TJA1103_PHY_IRQ_EN_LINK_EVENT   0x0002

Definition at line 131 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_STATUS

#define TJA1103_PHY_IRQ_STATUS   0x1E, 0x80A2

Definition at line 60 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_STATUS_LINK_AVAIL

#define TJA1103_PHY_IRQ_STATUS_LINK_AVAIL   0x0004

Definition at line 134 of file tja1103_driver.h.

◆ TJA1103_PHY_IRQ_STATUS_LINK_EVENT

#define TJA1103_PHY_IRQ_STATUS_LINK_EVENT   0x0002

Definition at line 135 of file tja1103_driver.h.

◆ TJA1103_PHY_STAT

#define TJA1103_PHY_STAT   0x1E, 0x8102

Definition at line 62 of file tja1103_driver.h.

◆ TJA1103_PHY_STAT_LINK_STATUS

#define TJA1103_PHY_STAT_LINK_STATUS   0x0004

Definition at line 142 of file tja1103_driver.h.

◆ TJA1103_PORT_ABILITIES

#define TJA1103_PORT_ABILITIES   0x1E, 0x8046

Definition at line 56 of file tja1103_driver.h.

◆ TJA1103_PORT_ABILITIES_PTP

#define TJA1103_PORT_ABILITIES_PTP   0x0010

Definition at line 121 of file tja1103_driver.h.

◆ TJA1103_PORT_CTRL

#define TJA1103_PORT_CTRL   0x1E, 0x8040

Definition at line 55 of file tja1103_driver.h.

◆ TJA1103_PORT_CTRL_EN

#define TJA1103_PORT_CTRL_EN   0x4000

Definition at line 118 of file tja1103_driver.h.

◆ TJA1103_PORT_FUNC_IRQ_EN

#define TJA1103_PORT_FUNC_IRQ_EN   0x1E, 0x807A

Definition at line 57 of file tja1103_driver.h.

◆ TJA1103_PORT_FUNC_IRQ_EN_PTP_IRQS

#define TJA1103_PORT_FUNC_IRQ_EN_PTP_IRQS   0x0008

Definition at line 124 of file tja1103_driver.h.

◆ TJA1103_PTP_IRQ_ACK

#define TJA1103_PTP_IRQ_ACK   0x1E, 0x9008

Definition at line 70 of file tja1103_driver.h.

◆ TJA1103_RX_BAD_FRAME_COUNTER

#define TJA1103_RX_BAD_FRAME_COUNTER   0x1E, 0xA952

Definition at line 72 of file tja1103_driver.h.

◆ TJA1103_RX_BAD_FRAME_COUNTER_EN

#define TJA1103_RX_BAD_FRAME_COUNTER_EN   0x8000

Definition at line 202 of file tja1103_driver.h.

◆ TJA1103_RX_ERR_FRAME_COUNTER

#define TJA1103_RX_ERR_FRAME_COUNTER   0x1E, 0xA954

Definition at line 73 of file tja1103_driver.h.

◆ TJA1103_RX_ERR_FRAME_COUNTER_EN

#define TJA1103_RX_ERR_FRAME_COUNTER_EN   0x8000

Definition at line 205 of file tja1103_driver.h.

◆ TJA1103_RX_GOOD_FRAME_COUNTER

#define TJA1103_RX_GOOD_FRAME_COUNTER   0x1E, 0xA950

Definition at line 71 of file tja1103_driver.h.

◆ TJA1103_RX_GOOD_FRAME_COUNTER_EN

#define TJA1103_RX_GOOD_FRAME_COUNTER_EN   0x8000

Definition at line 199 of file tja1103_driver.h.

◆ TJA1103_RX_IPG_LENGTH

#define TJA1103_RX_IPG_LENGTH   0x1E, 0xAFD0

Definition at line 83 of file tja1103_driver.h.

◆ TJA1103_RX_PREAMBLE_COUNTER

#define TJA1103_RX_PREAMBLE_COUNTER   0x1E, 0xAFCE

Definition at line 81 of file tja1103_driver.h.

◆ TJA1103_RX_PREAMBLE_COUNTER_EN

#define TJA1103_RX_PREAMBLE_COUNTER_EN   0x8000

Definition at line 208 of file tja1103_driver.h.

◆ TJA1103_RXID

#define TJA1103_RXID   0x1E, 0xAFCC

Definition at line 79 of file tja1103_driver.h.

◆ TJA1103_RXID_EN

#define TJA1103_RXID_EN   0x8000

Definition at line 181 of file tja1103_driver.h.

◆ TJA1103_SIGNAL_QUALITY

#define TJA1103_SIGNAL_QUALITY   0x1E, 0x8320

Definition at line 64 of file tja1103_driver.h.

◆ TJA1103_SIGNAL_QUALITY_SQI_MASK

#define TJA1103_SIGNAL_QUALITY_SQI_MASK   0x0007

Definition at line 149 of file tja1103_driver.h.

◆ TJA1103_SIGNAL_QUALITY_SQI_VALID

#define TJA1103_SIGNAL_QUALITY_SQI_VALID   0x4000

Definition at line 148 of file tja1103_driver.h.

◆ TJA1103_SYM_ERR_COUNTER

#define TJA1103_SYM_ERR_COUNTER   0x1E, 0x8350

Definition at line 66 of file tja1103_driver.h.

◆ TJA1103_SYM_ERR_COUNTER_EN

#define TJA1103_SYM_ERR_COUNTER_EN   0x8000

Definition at line 187 of file tja1103_driver.h.

◆ TJA1103_SYM_ERR_COUNTER_EXTENDED

#define TJA1103_SYM_ERR_COUNTER_EXTENDED   0x1E, 0x8351

Definition at line 67 of file tja1103_driver.h.

◆ TJA1103_SYM_ERR_COUNTER_EXTENDED_EN

#define TJA1103_SYM_ERR_COUNTER_EXTENDED_EN   0x8000

Definition at line 190 of file tja1103_driver.h.

◆ TJA1103_TX_IPG_LENGTH

#define TJA1103_TX_IPG_LENGTH   0x1E, 0xAFD1

Definition at line 84 of file tja1103_driver.h.

◆ TJA1103_TX_PREAMBLE_COUNTER

#define TJA1103_TX_PREAMBLE_COUNTER   0x1E, 0xAFCF

Definition at line 82 of file tja1103_driver.h.

◆ TJA1103_TX_PREAMBLE_COUNTER_EN

#define TJA1103_TX_PREAMBLE_COUNTER_EN   0x8000

Definition at line 211 of file tja1103_driver.h.

◆ TJA1103_TXID

#define TJA1103_TXID   0x1E, 0xAFCD

Definition at line 80 of file tja1103_driver.h.

◆ TJA1103_TXID_EN

#define TJA1103_TXID_EN   0x8000

Definition at line 184 of file tja1103_driver.h.

Function Documentation

◆ tja1103DisableIrq()

void tja1103DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 201 of file tja1103_driver.c.

◆ tja1103DumpPhyReg()

void tja1103DumpPhyReg ( NetInterface interface)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface

Definition at line 302 of file tja1103_driver.c.

◆ tja1103EnableIrq()

void tja1103EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 186 of file tja1103_driver.c.

◆ tja1103EventHandler()

void tja1103EventHandler ( NetInterface interface)

TJA1103 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 216 of file tja1103_driver.c.

◆ tja1103Init()

error_t tja1103Init ( NetInterface interface)

TJA1103 PHY transceiver initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 60 of file tja1103_driver.c.

◆ tja1103InitHook()

void tja1103InitHook ( NetInterface interface)

TJA1103 custom configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 138 of file tja1103_driver.c.

◆ tja1103ReadMmdReg()

uint16_t tja1103ReadMmdReg ( NetInterface interface,
uint8_t  devAddr,
uint16_t  regAddr 
)

Read MMD register.

Parameters
[in]interfaceUnderlying network interface
[in]devAddrDevice address
[in]regAddrRegister address
Returns
MMD register value

Definition at line 354 of file tja1103_driver.c.

◆ tja1103ReadPhyReg()

uint16_t tja1103ReadPhyReg ( NetInterface interface,
uint8_t  address 
)

Read PHY register.

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

Definition at line 276 of file tja1103_driver.c.

◆ tja1103Tick()

void tja1103Tick ( NetInterface interface)

TJA1103 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 148 of file tja1103_driver.c.

◆ tja1103WriteMmdReg()

void tja1103WriteMmdReg ( NetInterface interface,
uint8_t  devAddr,
uint16_t  regAddr,
uint16_t  data 
)

Write MMD register.

Parameters
[in]interfaceUnderlying network interface
[in]devAddrDevice address
[in]regAddrRegister address
[in]dataMMD register value

Definition at line 327 of file tja1103_driver.c.

◆ tja1103WritePhyReg()

void tja1103WritePhyReg ( 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 tja1103_driver.c.

Variable Documentation

◆ tja1103PhyDriver

const PhyDriver tja1103PhyDriver
extern

TJA1103 Ethernet PHY driver.

Definition at line 44 of file tja1103_driver.c.