lan9370_driver.h File Reference

LAN9370 5-port 100Base-T1 Ethernet switch driver. More...

#include "core/nic.h"

Go to the source code of this file.

Macros

#define LAN9370_PORT1   1
 
#define LAN9370_PORT2   2
 
#define LAN9370_PORT3   3
 
#define LAN9370_PORT4   4
 
#define LAN9370_PORT5   5
 
#define LAN9370_PORT_MASK   0x1F
 
#define LAN9370_PORT1_MASK   0x01
 
#define LAN9370_PORT2_MASK   0x02
 
#define LAN9370_PORT3_MASK   0x04
 
#define LAN9370_PORT4_MASK   0x08
 
#define LAN9370_PORT5_MASK   0x10
 
#define LAN9370_SPI_CMD_WRITE   0x40000000
 
#define LAN9370_SPI_CMD_READ   0x60000000
 
#define LAN9370_SPI_CMD_ADDR   0x001FFFE0
 
#define LAN9370_STATIC_MAC_TABLE_SIZE   256
 
#define LAN9370_DYNAMIC_MAC_TABLE_SIZE   1024
 
#define LAN9370_TAIL_TAG_VALID   0x2000
 
#define LAN9370_TAIL_TAG_NORMAL_ADDR_LOOKUP   0x1000
 
#define LAN9370_TAIL_TAG_PORT_BLOCKING_OVERRIDE   0x0800
 
#define LAN9370_TAIL_TAG_PRIORITY   0x0700
 
#define LAN9370_TAIL_TAG_DEST_PORT5   0x0010
 
#define LAN9370_TAIL_TAG_DEST_PORT4   0x0008
 
#define LAN9370_TAIL_TAG_DEST_PORT3   0x0004
 
#define LAN9370_TAIL_TAG_DEST_PORT2   0x0002
 
#define LAN9370_TAIL_TAG_DEST_PORT1   0x0001
 
#define LAN9370_TAIL_TAG_PTP_MSG   0x80
 
#define LAN9370_TAIL_TAG_SRC_PORT   0x07
 
#define LAN9370_BASIC_CONTROL   0x00
 
#define LAN9370_BASIC_STATUS   0x01
 
#define LAN9370_PHY_ID1   0x02
 
#define LAN9370_PHY_ID2   0x03
 
#define LAN9370_MASTER_SLAVE_CONTROL   0x09
 
#define LAN9370_MASTER_SLAVE_STATUS   0x0A
 
#define LAN9370_EXT_REG_CTL   0x14
 
#define LAN9370_EXT_REG_RD_DATA   0x15
 
#define LAN9370_EXT_REG_WR_DATA   0x16
 
#define LAN9370_CHIP_ID0   0x0000
 
#define LAN9370_CHIP_ID1   0x0001
 
#define LAN9370_CHIP_ID2   0x0002
 
#define LAN9370_CHIP_ID3   0x0003
 
#define LAN9370_GLOBAL_CTRL0   0x0007
 
#define LAN9370_SWITCH_OP   0x0300
 
#define LAN9370_SWITCH_LUE_CTRL0   0x0310
 
#define LAN9370_SWITCH_LUE_CTRL1   0x0311
 
#define LAN9370_SWITCH_LUE_CTRL2   0x0312
 
#define LAN9370_SWITCH_LUE_CTRL3   0x0313
 
#define LAN9370_SWITCH_LUE_AGE   0x0320
 
#define LAN9370_UNKONWN_MULTICAST_CTRL   0x0324
 
#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL   0x0370
 
#define LAN9370_ALU_TABLE_CTRL   0x0418
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL   0x041C
 
#define LAN9370_ALU_TABLE_ENTRY1   0x0420
 
#define LAN9370_STATIC_TABLE_ENTRY1   0x0420
 
#define LAN9370_ALU_TABLE_ENTRY2   0x0424
 
#define LAN9370_STATIC_TABLE_ENTRY2   0x0424
 
#define LAN9370_ALU_TABLE_ENTRY3   0x0428
 
#define LAN9370_STATIC_TABLE_ENTRY3   0x0428
 
#define LAN9370_ALU_TABLE_ENTRY4   0x042C
 
#define LAN9370_STATIC_TABLE_ENTRY4   0x042C
 
#define LAN9370_IND_ADDR   0x075C
 
#define LAN9370_IND_DATA   0x0760
 
#define LAN9370_IND_CTRL   0x0768
 
#define LAN9370_VPHY_SPECIAL_CTRL   0x077C
 
#define LAN9370_PORT1_OP_CTRL0   0x1020
 
#define LAN9370_PORT1_STATUS   0x1030
 
#define LAN9370_PORT1_MAC_CTRL0   0x1400
 
#define LAN9370_PORT1_MSTP_STATE   0x1B04
 
#define LAN9370_PORT2_OP_CTRL0   0x2020
 
#define LAN9370_PORT2_STATUS   0x2030
 
#define LAN9370_PORT2_MAC_CTRL0   0x2400
 
#define LAN9370_PORT2_MSTP_STATE   0x2B04
 
#define LAN9370_PORT3_OP_CTRL0   0x3020
 
#define LAN9370_PORT3_STATUS   0x3030
 
#define LAN9370_PORT3_MAC_CTRL0   0x3400
 
#define LAN9370_PORT3_MSTP_STATE   0x3B04
 
#define LAN9370_PORT4_OP_CTRL0   0x4020
 
#define LAN9370_PORT4_STATUS   0x4030
 
#define LAN9370_PORT4_MAC_CTRL0   0x4400
 
#define LAN9370_PORT4_MSTP_STATE   0x4B04
 
#define LAN9370_PORT5_OP_CTRL0   0x5020
 
#define LAN9370_PORT5_STATUS   0x5030
 
#define LAN9370_PORT5_XMII_CTRL0   0x5300
 
#define LAN9370_PORT5_XMII_CTRL1   0x5301
 
#define LAN9370_PORT5_MAC_CTRL0   0x5400
 
#define LAN9370_PORT5_MSTP_STATE   0x5B04
 
#define LAN9370_PORTn_OP_CTRL0(port)   (0x0020 + ((port) * 0x1000))
 
#define LAN9370_PORTn_STATUS(port)   (0x0030 + ((port) * 0x1000))
 
#define LAN9370_PORTn_XMII_CTRL0(port)   (0x0300 + ((port) * 0x1000))
 
#define LAN9370_PORTn_XMII_CTRL1(port)   (0x0301 + ((port) * 0x1000))
 
#define LAN9370_PORTn_MAC_CTRL0(port)   (0x0400 + ((port) * 0x1000))
 
#define LAN9370_PORTn_MSTP_STATE(port)   (0x0B04 + ((port) * 0x1000))
 
#define LAN9370_PORTn_T1_PHY_REG(port, addr)   (0x0100 + ((port) * 0x1000) + ((addr) * 4))
 
#define LAN9370_BASIC_CONTROL_SW_RESET   0x8000
 
#define LAN9370_BASIC_CONTROL_LOOPBACK   0x4000
 
#define LAN9370_BASIC_CONTROL_SPEED_SEL_LSB   0x2000
 
#define LAN9370_BASIC_CONTROL_AN_EN   0x1000
 
#define LAN9370_BASIC_CONTROL_POWER_DOWN   0x0800
 
#define LAN9370_BASIC_CONTROL_ISOLATE   0x0400
 
#define LAN9370_BASIC_CONTROL_RESTART_AN   0x0200
 
#define LAN9370_BASIC_CONTROL_DUPLEX_MODE   0x0100
 
#define LAN9370_BASIC_CONTROL_COL_TEST   0x0080
 
#define LAN9370_BASIC_CONTROL_SPEED_SEL_MSB   0x0040
 
#define LAN9370_BASIC_CONTROL_UNIDIRECTIONAL_EN   0x0020
 
#define LAN9370_BASIC_STATUS_100BT4   0x8000
 
#define LAN9370_BASIC_STATUS_100BTX_FD   0x4000
 
#define LAN9370_BASIC_STATUS_100BTX_HD   0x2000
 
#define LAN9370_BASIC_STATUS_10BT_FD   0x1000
 
#define LAN9370_BASIC_STATUS_10BT_HD   0x0800
 
#define LAN9370_BASIC_STATUS_100BT2_FD   0x0400
 
#define LAN9370_BASIC_STATUS_100BT2_HD   0x0200
 
#define LAN9370_BASIC_STATUS_EXTENDED_STATUS   0x0100
 
#define LAN9370_BASIC_STATUS_UNIDIRECTIONAL_EN   0x0080
 
#define LAN9370_BASIC_STATUS_MF_PREAMBLE_SUPPR   0x0040
 
#define LAN9370_BASIC_STATUS_AN_COMPLETE   0x0020
 
#define LAN9370_BASIC_STATUS_REMOTE_FAULT   0x0010
 
#define LAN9370_BASIC_STATUS_AN_CAPABLE   0x0008
 
#define LAN9370_BASIC_STATUS_LINK_STATUS   0x0004
 
#define LAN9370_BASIC_STATUS_JABBER_DETECT   0x0002
 
#define LAN9370_BASIC_STATUS_EXTENDED_CAPABLE   0x0001
 
#define LAN9370_PHY_ID1_PHY_ID_MSB   0xFFFF
 
#define LAN9370_PHY_ID1_PHY_ID_MSB_DEFAULT   0x0007
 
#define LAN9370_PHY_ID2_PHY_ID_LSB   0xFC00
 
#define LAN9370_PHY_ID2_PHY_ID_LSB_DEFAULT   0xC000
 
#define LAN9370_PHY_ID2_MODEL_NUM   0x03F0
 
#define LAN9370_PHY_ID2_MODEL_NUM_DEFAULT   0x0180
 
#define LAN9370_PHY_ID2_REVISION_NUM   0x000F
 
#define LAN9370_MASTER_SLAVE_CONTROL_TEST_MODE   0xE000
 
#define LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_EN   0x1000
 
#define LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_VAL   0x0800
 
#define LAN9370_MASTER_SLAVE_CONTROL_PORT_TYPE   0x0400
 
#define LAN9370_MASTER_SLAVE_CONTROL_1000BT_FD   0x0200
 
#define LAN9370_MASTER_SLAVE_CONTROL_1000BT_HD   0x0100
 
#define LAN9370_MASTER_SLAVE_STATUS_MS_CONF_FAULT   0x8000
 
#define LAN9370_MASTER_SLAVE_STATUS_MS_CONF_RES   0x4000
 
#define LAN9370_MASTER_SLAVE_STATUS_LOC_RCVR_STATUS   0x2000
 
#define LAN9370_MASTER_SLAVE_STATUS_REM_RCVR_STATUS   0x1000
 
#define LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_FD   0x0800
 
#define LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_HD   0x0400
 
#define LAN9370_MASTER_SLAVE_STATUS_IDLE_ERR_COUNT   0x00FF
 
#define LAN9370_EXT_REG_CTL_READ_CONTROL   0x1000
 
#define LAN9370_EXT_REG_CTL_WRITE_CONTROL   0x0800
 
#define LAN9370_EXT_REG_CTL_REGISTER_BANK   0x0700
 
#define LAN9370_EXT_REG_CTL_REGISTER_BANK_MISC   0x0100
 
#define LAN9370_EXT_REG_CTL_REGISTER_BANK_PCS   0x0200
 
#define LAN9370_EXT_REG_CTL_REGISTER_BANK_AFE   0x0300
 
#define LAN9370_EXT_REG_CTL_REGISTER_BANK_DSP   0x0400
 
#define LAN9370_EXT_REG_CTL_REGISTER_ADDR   0x00FF
 
#define LAN9370_CHIP_ID0_DEFAULT   0x00
 
#define LAN9370_CHIP_ID1_DEFAULT   0x93
 
#define LAN9370_CHIP_ID2_DEFAULT   0x70
 
#define LAN9370_CHIP_ID3_REVISION_ID   0xF0
 
#define LAN9370_GLOBAL_CTRL0_APB_PHY_REG_BLK   0x80
 
#define LAN9370_GLOBAL_CTRL0_SW_INI_DONE   0x10
 
#define LAN9370_SWITCH_OP_DOUBLE_TAG_EN   0x80
 
#define LAN9370_SWITCH_OP_OVER_TEMP_ADJ   0x70
 
#define LAN9370_SWITCH_OP_OVER_TEMP_FORCE   0x08
 
#define LAN9370_SWITCH_OP_OVER_TEMP_EN   0x04
 
#define LAN9370_SWITCH_OP_SOFT_HARD_RESET   0x02
 
#define LAN9370_SWITCH_OP_START_SWITCH   0x01
 
#define LAN9370_SWITCH_LUE_CTRL0_VLAN_EN   0x80
 
#define LAN9370_SWITCH_LUE_CTRL0_DROP_INVALID_VID   0x40
 
#define LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT   0x38
 
#define LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT_DEFAULT   0x20
 
#define LAN9370_SWITCH_LUE_CTRL0_RESERVED_LUE_EN   0x04
 
#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION   0x03
 
#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_NONE   0x00
 
#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_CRC   0x01
 
#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_XOR   0x02
 
#define LAN9370_SWITCH_LUE_CTRL1_UNICAST_LEARNING_DIS   0x80
 
#define LAN9370_SWITCH_LUE_CTRL1_SELF_ADDR_FILT   0x40
 
#define LAN9370_SWITCH_LUE_CTRL1_FLUSH_ALU_TABLE   0x20
 
#define LAN9370_SWITCH_LUE_CTRL1_FLUSH_MSTP_ENTRIES   0x10
 
#define LAN9370_SWITCH_LUE_CTRL1_SRC_ADDR_FILT   0x08
 
#define LAN9370_SWITCH_LUE_CTRL1_AGING_EN   0x04
 
#define LAN9370_SWITCH_LUE_CTRL1_FAST_AGE_EN   0x02
 
#define LAN9370_SWITCH_LUE_CTRL1_LINK_DOWN_FLUSH   0x01
 
#define LAN9370_SWITCH_LUE_CTRL2_MID_RANGE_AGE   0x80
 
#define LAN9370_SWITCH_LUE_CTRL2_LINK_DOWN_FLUSH_ACTIVATED   0x40
 
#define LAN9370_SWITCH_LUE_CTRL2_DYNAMIC_EGRESS_VLAN_FILTERING   0x20
 
#define LAN9370_SWITCH_LUE_CTRL2_STATIC_EGRESS_VLAN_FILTERING   0x10
 
#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION   0x0C
 
#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_NONE   0x00
 
#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_DYNAMIC   0x04
 
#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_STATIC   0x08
 
#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_BOTH   0x0C
 
#define LAN9370_SWITCH_LUE_CTRL2_ALU_PRIORITY_GEN   0x03
 
#define LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0   0xFF
 
#define LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0_DEFAULT   0x4B
 
#define LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8   0x0FFF
 
#define LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8_DEFAULT   0x0000
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD   0x80000000
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP   0x0000001F
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT1   0x00000001
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT2   0x00000002
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT3   0x00000004
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT4   0x00000008
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT5   0x00000010
 
#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_ALL   0x0000001F
 
#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_IGMP_SNOOP_EN   0x40
 
#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_OPT   0x08
 
#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_EN   0x04
 
#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_SNIFF_MODE_SEL   0x01
 
#define LAN9370_ALU_TABLE_CTRL_VALID_COUNT   0x3FFF0000
 
#define LAN9370_ALU_TABLE_CTRL_START_FINISH   0x00000080
 
#define LAN9370_ALU_TABLE_CTRL_VALID   0x00000040
 
#define LAN9370_ALU_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END   0x00000020
 
#define LAN9370_ALU_TABLE_CTRL_DIRECT   0x00000004
 
#define LAN9370_ALU_TABLE_CTRL_ACTION   0x00000003
 
#define LAN9370_ALU_TABLE_CTRL_ACTION_NOP   0x00000000
 
#define LAN9370_ALU_TABLE_CTRL_ACTION_WRITE   0x00000001
 
#define LAN9370_ALU_TABLE_CTRL_ACTION_READ   0x00000002
 
#define LAN9370_ALU_TABLE_CTRL_ACTION_SEARCH   0x00000003
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_COUNT   0x1FF00000
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_INDEX   0x0000FF00
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_START_FINISH   0x00000080
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID   0x00000040
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END   0x00000020
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_DIRECT_ACCESS   0x00000008
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT   0x00000004
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_STATIC   0x00000000
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_RESERVED   0x00000004
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION   0x00000003
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_NOP   0x00000000
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_WRITE   0x00000001
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_READ   0x00000002
 
#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_SEARCH   0x00000003
 
#define LAN9370_ALU_TABLE_ENTRY1_STATIC   0x80000000
 
#define LAN9370_ALU_TABLE_ENTRY1_SRC_FILTER   0x40000000
 
#define LAN9370_ALU_TABLE_ENTRY1_DES_FILTER   0x20000000
 
#define LAN9370_ALU_TABLE_ENTRY1_PRIORITY   0x1C000000
 
#define LAN9370_ALU_TABLE_ENTRY1_AGE_COUNT   0x1C000000
 
#define LAN9370_ALU_TABLE_ENTRY1_MSTP   0x00000007
 
#define LAN9370_ALU_TABLE_ENTRY2_OVERRIDE   0x80000000
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT_FORWARD   0x0000001F
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT5_FORWARD   0x00000010
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT4_FORWARD   0x00000008
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT3_FORWARD   0x00000004
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT2_FORWARD   0x00000002
 
#define LAN9370_ALU_TABLE_ENTRY2_PORT1_FORWARD   0x00000001
 
#define LAN9370_ALU_TABLE_ENTRY3_FID   0x007F0000
 
#define LAN9370_ALU_TABLE_ENTRY3_MAC_ADDR_MSB   0x0000FFFF
 
#define LAN9370_ALU_TABLE_ENTRY4_MAC_ADDR_LSB   0xFFFFFFFF
 
#define LAN9370_STATIC_TABLE_ENTRY1_VALID   0x80000000
 
#define LAN9370_STATIC_TABLE_ENTRY1_SRC_FILTER   0x40000000
 
#define LAN9370_STATIC_TABLE_ENTRY1_DES_FILTER   0x20000000
 
#define LAN9370_STATIC_TABLE_ENTRY1_PRIORITY   0x1C000000
 
#define LAN9370_STATIC_TABLE_ENTRY1_MSTP   0x00000007
 
#define LAN9370_STATIC_TABLE_ENTRY2_OVERRIDE   0x80000000
 
#define LAN9370_STATIC_TABLE_ENTRY2_USE_FID   0x40000000
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT_FORWARD   0x0000001F
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT5_FORWARD   0x00000010
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT4_FORWARD   0x00000008
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT3_FORWARD   0x00000004
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT2_FORWARD   0x00000002
 
#define LAN9370_STATIC_TABLE_ENTRY2_PORT1_FORWARD   0x00000001
 
#define LAN9370_STATIC_TABLE_ENTRY3_FID   0x007F0000
 
#define LAN9370_STATIC_TABLE_ENTRY3_MAC_ADDR_MSB   0x0000FFFF
 
#define LAN9370_STATIC_TABLE_ENTRY4_MAC_ADDR_LSB   0xFFFFFFFF
 
#define LAN9370_IND_CTRL_OP   0x0002
 
#define LAN9370_IND_CTRL_OP_READ   0x0000
 
#define LAN9370_IND_CTRL_OP_WRITE   0x0002
 
#define LAN9370_IND_CTRL_BUSY   0x0001
 
#define LAN9370_VPHY_SPECIAL_CTRL_SMI_INDIRECT_EN   0x8000
 
#define LAN9370_VPHY_SPECIAL_CTRL_SW_LOOPBACK   0x4000
 
#define LAN9370_VPHY_SPECIAL_CTRL_MDIO_INT_EN   0x2000
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPI_INDIRECT_EN   0x1000
 
#define LAN9370_VPHY_SPECIAL_CTRL_MODE   0x0300
 
#define LAN9370_VPHY_SPECIAL_CTRL_MODE_RGMII   0x0000
 
#define LAN9370_VPHY_SPECIAL_CTRL_MODE_MII_PHY   0x0100
 
#define LAN9370_VPHY_SPECIAL_CTRL_MODE_SGMII   0x0200
 
#define LAN9370_VPHY_SPECIAL_CTRL_MODE_RMII_PHY   0x0300
 
#define LAN9370_VPHY_SPECIAL_CTRL_SW_COL_TEST   0x0080
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND   0x001C
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_HD   0x0004
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_HD   0x0008
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_FD   0x0014
 
#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_FD   0x0018
 
#define LAN9370_PORTn_OP_CTRL0_LOCAL_LOOPBACK   0x80
 
#define LAN9370_PORTn_OP_CTRL0_REMOTE_LOOPBACK   0x40
 
#define LAN9370_PORTn_OP_CTRL0_K2L_INSERT_EN   0x20
 
#define LAN9370_PORTn_OP_CTRL0_K2L_DEBUG_EN   0x10
 
#define LAN9370_PORTn_OP_CTRL0_TAIL_TAG_EN   0x04
 
#define LAN9370_PORTn_OP_CTRL0_TX_QUEUE_SPLIT_EN   0x03
 
#define LAN9370_PORTn_STATUS_SPEED   0x18
 
#define LAN9370_PORTn_STATUS_SPEED_10MBPS   0x00
 
#define LAN9370_PORTn_STATUS_SPEED_100MBPS   0x08
 
#define LAN9370_PORTn_STATUS_SPEED_1000MBPS   0x10
 
#define LAN9370_PORTn_STATUS_DUPLEX   0x04
 
#define LAN9370_PORTn_STATUS_TX_FLOW_CTRL_EN   0x02
 
#define LAN9370_PORTn_STATUS_RX_FLOW_CTRL_EN   0x01
 
#define LAN9370_PORTn_XMII_CTRL0_DUPLEX   0x40
 
#define LAN9370_PORTn_XMII_CTRL0_TX_FLOW_CTRL_EN   0x20
 
#define LAN9370_PORTn_XMII_CTRL0_SPEED_10_100   0x10
 
#define LAN9370_PORTn_XMII_CTRL0_RX_FLOW_CTRL_EN   0x08
 
#define LAN9370_PORTn_XMII_CTRL0_CRS_COL_EN   0x02
 
#define LAN9370_PORTn_XMII_CTRL0_AUTO_COL_DET   0x01
 
#define LAN9370_PORTn_XMII_CTRL1_RGMII_SPEED_1000   0x40
 
#define LAN9370_PORTn_XMII_CTRL1_SEL_EDGE   0x20
 
#define LAN9370_PORTn_XMII_CTRL1_RGMII_ID_IG   0x10
 
#define LAN9370_PORTn_XMII_CTRL1_RGMII_ID_EG   0x08
 
#define LAN9370_PORTn_XMII_CTRL1_MII_RMII_MODE   0x04
 
#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL   0x03
 
#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RGMII   0x00
 
#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RMII   0x01
 
#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_MII   0x03
 
#define LAN9370_PORTn_MAC_CTRL0_FR_LEN_CHK   0x04
 
#define LAN9370_PORTn_MAC_CTRL0_BCAST_STORM_EN   0x02
 
#define LAN9370_PORTn_MAC_CTRL0_JUMBO_PKT_EN   0x01
 
#define LAN9370_PORTn_MSTP_STATE_TRANSMIT_EN   0x04
 
#define LAN9370_PORTn_MSTP_STATE_RECEIVE_EN   0x02
 
#define LAN9370_PORTn_MSTP_STATE_LEARNING_DIS   0x01
 

Functions

error_t lan9370Init (NetInterface *interface)
 LAN9370 Ethernet switch initialization. More...
 
void lan9370InitHook (NetInterface *interface)
 LAN9370 custom configuration. More...
 
void lan9370Tick (NetInterface *interface)
 LAN9370 timer handler. More...
 
void lan9370EnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void lan9370DisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void lan9370EventHandler (NetInterface *interface)
 LAN9370 event handler. More...
 
error_t lan9370TagFrame (NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
 Add tail tag to Ethernet frame. More...
 
error_t lan9370UntagFrame (NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
 Decode tail tag from incoming Ethernet frame. More...
 
bool_t lan9370GetLinkState (NetInterface *interface, uint8_t port)
 Get link state. More...
 
uint32_t lan9370GetLinkSpeed (NetInterface *interface, uint8_t port)
 Get link speed. More...
 
NicDuplexMode lan9370GetDuplexMode (NetInterface *interface, uint8_t port)
 Get duplex mode. More...
 
void lan9370SetPortState (NetInterface *interface, uint8_t port, SwitchPortState state)
 Set port state. More...
 
SwitchPortState lan9370GetPortState (NetInterface *interface, uint8_t port)
 Get port state. More...
 
void lan9370SetAgingTime (NetInterface *interface, uint32_t agingTime)
 Set aging time for dynamic filtering entries. More...
 
void lan9370EnableIgmpSnooping (NetInterface *interface, bool_t enable)
 Enable IGMP snooping. More...
 
void lan9370EnableMldSnooping (NetInterface *interface, bool_t enable)
 Enable MLD snooping. More...
 
void lan9370EnableRsvdMcastTable (NetInterface *interface, bool_t enable)
 Enable reserved multicast table. More...
 
error_t lan9370AddStaticFdbEntry (NetInterface *interface, const SwitchFdbEntry *entry)
 Add a new entry to the static MAC table. More...
 
error_t lan9370DeleteStaticFdbEntry (NetInterface *interface, const SwitchFdbEntry *entry)
 Remove an entry from the static MAC table. More...
 
error_t lan9370GetStaticFdbEntry (NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
 Read an entry from the static MAC table. More...
 
void lan9370FlushStaticFdbTable (NetInterface *interface)
 Flush static MAC table. More...
 
error_t lan9370GetDynamicFdbEntry (NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
 Read an entry from the dynamic MAC table. More...
 
void lan9370FlushDynamicFdbTable (NetInterface *interface, uint8_t port)
 Flush dynamic MAC table. More...
 
void lan9370SetUnknownMcastFwdPorts (NetInterface *interface, bool_t enable, uint32_t forwardPorts)
 Set forward ports for unknown multicast packets. More...
 
void lan9370WritePhyReg (NetInterface *interface, uint8_t port, uint8_t address, uint16_t data)
 Write PHY register. More...
 
uint16_t lan9370ReadPhyReg (NetInterface *interface, uint8_t port, uint8_t address)
 Read PHY register. More...
 
void lan9370DumpPhyReg (NetInterface *interface, uint8_t port)
 Dump PHY registers for debugging purpose. More...
 
void lan9370WriteExtReg (NetInterface *interface, uint8_t port, uint8_t bank, uint8_t addr, uint16_t data)
 Write extended register. More...
 
uint16_t lan9370ReadExtReg (NetInterface *interface, uint8_t port, uint8_t bank, uint8_t addr)
 Read extended register. More...
 
void lan9370WriteSwitchReg8 (NetInterface *interface, uint16_t address, uint8_t data)
 Write switch register (8 bits) More...
 
uint8_t lan9370ReadSwitchReg8 (NetInterface *interface, uint16_t address)
 Read switch register (8 bits) More...
 
void lan9370WriteSwitchReg16 (NetInterface *interface, uint16_t address, uint16_t data)
 Write switch register (16 bits) More...
 
uint16_t lan9370ReadSwitchReg16 (NetInterface *interface, uint16_t address)
 Read switch register (16 bits) More...
 
void lan9370WriteSwitchReg32 (NetInterface *interface, uint16_t address, uint32_t data)
 Write switch register (32 bits) More...
 
uint32_t lan9370ReadSwitchReg32 (NetInterface *interface, uint16_t address)
 Read switch register (32 bits) More...
 

Variables

const SwitchDriver lan9370SwitchDriver
 LAN9370 Ethernet switch driver. More...
 

Detailed Description

LAN9370 5-port 100Base-T1 Ethernet switch 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.0

Definition in file lan9370_driver.h.

Macro Definition Documentation

◆ LAN9370_ALU_TABLE_CTRL

#define LAN9370_ALU_TABLE_CTRL   0x0418

Definition at line 101 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_ACTION

#define LAN9370_ALU_TABLE_CTRL_ACTION   0x00000003

Definition at line 303 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_ACTION_NOP

#define LAN9370_ALU_TABLE_CTRL_ACTION_NOP   0x00000000

Definition at line 304 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_ACTION_READ

#define LAN9370_ALU_TABLE_CTRL_ACTION_READ   0x00000002

Definition at line 306 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_ACTION_SEARCH

#define LAN9370_ALU_TABLE_CTRL_ACTION_SEARCH   0x00000003

Definition at line 307 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_ACTION_WRITE

#define LAN9370_ALU_TABLE_CTRL_ACTION_WRITE   0x00000001

Definition at line 305 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_DIRECT

#define LAN9370_ALU_TABLE_CTRL_DIRECT   0x00000004

Definition at line 302 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_START_FINISH

#define LAN9370_ALU_TABLE_CTRL_START_FINISH   0x00000080

Definition at line 299 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_VALID

#define LAN9370_ALU_TABLE_CTRL_VALID   0x00000040

Definition at line 300 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_VALID_COUNT

#define LAN9370_ALU_TABLE_CTRL_VALID_COUNT   0x3FFF0000

Definition at line 298 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END

#define LAN9370_ALU_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END   0x00000020

Definition at line 301 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1

#define LAN9370_ALU_TABLE_ENTRY1   0x0420

Definition at line 103 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_AGE_COUNT

#define LAN9370_ALU_TABLE_ENTRY1_AGE_COUNT   0x1C000000

Definition at line 330 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_DES_FILTER

#define LAN9370_ALU_TABLE_ENTRY1_DES_FILTER   0x20000000

Definition at line 328 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_MSTP

#define LAN9370_ALU_TABLE_ENTRY1_MSTP   0x00000007

Definition at line 331 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_PRIORITY

#define LAN9370_ALU_TABLE_ENTRY1_PRIORITY   0x1C000000

Definition at line 329 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_SRC_FILTER

#define LAN9370_ALU_TABLE_ENTRY1_SRC_FILTER   0x40000000

Definition at line 327 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY1_STATIC

#define LAN9370_ALU_TABLE_ENTRY1_STATIC   0x80000000

Definition at line 326 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2

#define LAN9370_ALU_TABLE_ENTRY2   0x0424

Definition at line 105 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_OVERRIDE

#define LAN9370_ALU_TABLE_ENTRY2_OVERRIDE   0x80000000

Definition at line 334 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT1_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT1_FORWARD   0x00000001

Definition at line 340 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT2_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT2_FORWARD   0x00000002

Definition at line 339 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT3_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT3_FORWARD   0x00000004

Definition at line 338 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT4_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT4_FORWARD   0x00000008

Definition at line 337 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT5_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT5_FORWARD   0x00000010

Definition at line 336 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY2_PORT_FORWARD

#define LAN9370_ALU_TABLE_ENTRY2_PORT_FORWARD   0x0000001F

Definition at line 335 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY3

#define LAN9370_ALU_TABLE_ENTRY3   0x0428

Definition at line 107 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY3_FID

#define LAN9370_ALU_TABLE_ENTRY3_FID   0x007F0000

Definition at line 343 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY3_MAC_ADDR_MSB

#define LAN9370_ALU_TABLE_ENTRY3_MAC_ADDR_MSB   0x0000FFFF

Definition at line 344 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY4

#define LAN9370_ALU_TABLE_ENTRY4   0x042C

Definition at line 109 of file lan9370_driver.h.

◆ LAN9370_ALU_TABLE_ENTRY4_MAC_ADDR_LSB

#define LAN9370_ALU_TABLE_ENTRY4_MAC_ADDR_LSB   0xFFFFFFFF

Definition at line 347 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL

#define LAN9370_BASIC_CONTROL   0x00

Definition at line 77 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_AN_EN

#define LAN9370_BASIC_CONTROL_AN_EN   0x1000

Definition at line 151 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_COL_TEST

#define LAN9370_BASIC_CONTROL_COL_TEST   0x0080

Definition at line 156 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_DUPLEX_MODE

#define LAN9370_BASIC_CONTROL_DUPLEX_MODE   0x0100

Definition at line 155 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_ISOLATE

#define LAN9370_BASIC_CONTROL_ISOLATE   0x0400

Definition at line 153 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_LOOPBACK

#define LAN9370_BASIC_CONTROL_LOOPBACK   0x4000

Definition at line 149 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_POWER_DOWN

#define LAN9370_BASIC_CONTROL_POWER_DOWN   0x0800

Definition at line 152 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_RESTART_AN

#define LAN9370_BASIC_CONTROL_RESTART_AN   0x0200

Definition at line 154 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_SPEED_SEL_LSB

#define LAN9370_BASIC_CONTROL_SPEED_SEL_LSB   0x2000

Definition at line 150 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_SPEED_SEL_MSB

#define LAN9370_BASIC_CONTROL_SPEED_SEL_MSB   0x0040

Definition at line 157 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_SW_RESET

#define LAN9370_BASIC_CONTROL_SW_RESET   0x8000

Definition at line 148 of file lan9370_driver.h.

◆ LAN9370_BASIC_CONTROL_UNIDIRECTIONAL_EN

#define LAN9370_BASIC_CONTROL_UNIDIRECTIONAL_EN   0x0020

Definition at line 158 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS

#define LAN9370_BASIC_STATUS   0x01

Definition at line 78 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_100BT2_FD

#define LAN9370_BASIC_STATUS_100BT2_FD   0x0400

Definition at line 166 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_100BT2_HD

#define LAN9370_BASIC_STATUS_100BT2_HD   0x0200

Definition at line 167 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_100BT4

#define LAN9370_BASIC_STATUS_100BT4   0x8000

Definition at line 161 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_100BTX_FD

#define LAN9370_BASIC_STATUS_100BTX_FD   0x4000

Definition at line 162 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_100BTX_HD

#define LAN9370_BASIC_STATUS_100BTX_HD   0x2000

Definition at line 163 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_10BT_FD

#define LAN9370_BASIC_STATUS_10BT_FD   0x1000

Definition at line 164 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_10BT_HD

#define LAN9370_BASIC_STATUS_10BT_HD   0x0800

Definition at line 165 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_AN_CAPABLE

#define LAN9370_BASIC_STATUS_AN_CAPABLE   0x0008

Definition at line 173 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_AN_COMPLETE

#define LAN9370_BASIC_STATUS_AN_COMPLETE   0x0020

Definition at line 171 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_EXTENDED_CAPABLE

#define LAN9370_BASIC_STATUS_EXTENDED_CAPABLE   0x0001

Definition at line 176 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_EXTENDED_STATUS

#define LAN9370_BASIC_STATUS_EXTENDED_STATUS   0x0100

Definition at line 168 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_JABBER_DETECT

#define LAN9370_BASIC_STATUS_JABBER_DETECT   0x0002

Definition at line 175 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_LINK_STATUS

#define LAN9370_BASIC_STATUS_LINK_STATUS   0x0004

Definition at line 174 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_MF_PREAMBLE_SUPPR

#define LAN9370_BASIC_STATUS_MF_PREAMBLE_SUPPR   0x0040

Definition at line 170 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_REMOTE_FAULT

#define LAN9370_BASIC_STATUS_REMOTE_FAULT   0x0010

Definition at line 172 of file lan9370_driver.h.

◆ LAN9370_BASIC_STATUS_UNIDIRECTIONAL_EN

#define LAN9370_BASIC_STATUS_UNIDIRECTIONAL_EN   0x0080

Definition at line 169 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID0

#define LAN9370_CHIP_ID0   0x0000

Definition at line 88 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID0_DEFAULT

#define LAN9370_CHIP_ID0_DEFAULT   0x00

Definition at line 217 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID1

#define LAN9370_CHIP_ID1   0x0001

Definition at line 89 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID1_DEFAULT

#define LAN9370_CHIP_ID1_DEFAULT   0x93

Definition at line 220 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID2

#define LAN9370_CHIP_ID2   0x0002

Definition at line 90 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID2_DEFAULT

#define LAN9370_CHIP_ID2_DEFAULT   0x70

Definition at line 223 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID3

#define LAN9370_CHIP_ID3   0x0003

Definition at line 91 of file lan9370_driver.h.

◆ LAN9370_CHIP_ID3_REVISION_ID

#define LAN9370_CHIP_ID3_REVISION_ID   0xF0

Definition at line 226 of file lan9370_driver.h.

◆ LAN9370_DYNAMIC_MAC_TABLE_SIZE

#define LAN9370_DYNAMIC_MAC_TABLE_SIZE   1024

Definition at line 59 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL

#define LAN9370_EXT_REG_CTL   0x14

Definition at line 83 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_READ_CONTROL

#define LAN9370_EXT_REG_CTL_READ_CONTROL   0x1000

Definition at line 207 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_ADDR

#define LAN9370_EXT_REG_CTL_REGISTER_ADDR   0x00FF

Definition at line 214 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_BANK

#define LAN9370_EXT_REG_CTL_REGISTER_BANK   0x0700

Definition at line 209 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_BANK_AFE

#define LAN9370_EXT_REG_CTL_REGISTER_BANK_AFE   0x0300

Definition at line 212 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_BANK_DSP

#define LAN9370_EXT_REG_CTL_REGISTER_BANK_DSP   0x0400

Definition at line 213 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_BANK_MISC

#define LAN9370_EXT_REG_CTL_REGISTER_BANK_MISC   0x0100

Definition at line 210 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_REGISTER_BANK_PCS

#define LAN9370_EXT_REG_CTL_REGISTER_BANK_PCS   0x0200

Definition at line 211 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_CTL_WRITE_CONTROL

#define LAN9370_EXT_REG_CTL_WRITE_CONTROL   0x0800

Definition at line 208 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_RD_DATA

#define LAN9370_EXT_REG_RD_DATA   0x15

Definition at line 84 of file lan9370_driver.h.

◆ LAN9370_EXT_REG_WR_DATA

#define LAN9370_EXT_REG_WR_DATA   0x16

Definition at line 85 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_CTRL0

#define LAN9370_GLOBAL_CTRL0   0x0007

Definition at line 92 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_CTRL0_APB_PHY_REG_BLK

#define LAN9370_GLOBAL_CTRL0_APB_PHY_REG_BLK   0x80

Definition at line 229 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_CTRL0_SW_INI_DONE

#define LAN9370_GLOBAL_CTRL0_SW_INI_DONE   0x10

Definition at line 230 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL

#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL   0x0370

Definition at line 100 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_IGMP_SNOOP_EN

#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_IGMP_SNOOP_EN   0x40

Definition at line 292 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_EN

#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_EN   0x04

Definition at line 294 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_OPT

#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_MLD_SNOOP_OPT   0x08

Definition at line 293 of file lan9370_driver.h.

◆ LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_SNIFF_MODE_SEL

#define LAN9370_GLOBAL_PORT_MIRROR_SNOOP_CTRL_SNIFF_MODE_SEL   0x01

Definition at line 295 of file lan9370_driver.h.

◆ LAN9370_IND_ADDR

#define LAN9370_IND_ADDR   0x075C

Definition at line 111 of file lan9370_driver.h.

◆ LAN9370_IND_CTRL

#define LAN9370_IND_CTRL   0x0768

Definition at line 113 of file lan9370_driver.h.

◆ LAN9370_IND_CTRL_BUSY

#define LAN9370_IND_CTRL_BUSY   0x0001

Definition at line 377 of file lan9370_driver.h.

◆ LAN9370_IND_CTRL_OP

#define LAN9370_IND_CTRL_OP   0x0002

Definition at line 374 of file lan9370_driver.h.

◆ LAN9370_IND_CTRL_OP_READ

#define LAN9370_IND_CTRL_OP_READ   0x0000

Definition at line 375 of file lan9370_driver.h.

◆ LAN9370_IND_CTRL_OP_WRITE

#define LAN9370_IND_CTRL_OP_WRITE   0x0002

Definition at line 376 of file lan9370_driver.h.

◆ LAN9370_IND_DATA

#define LAN9370_IND_DATA   0x0760

Definition at line 112 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL

#define LAN9370_MASTER_SLAVE_CONTROL   0x09

Definition at line 81 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_1000BT_FD

#define LAN9370_MASTER_SLAVE_CONTROL_1000BT_FD   0x0200

Definition at line 194 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_1000BT_HD

#define LAN9370_MASTER_SLAVE_CONTROL_1000BT_HD   0x0100

Definition at line 195 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_EN

#define LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_EN   0x1000

Definition at line 191 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_VAL

#define LAN9370_MASTER_SLAVE_CONTROL_MS_MAN_CONF_VAL   0x0800

Definition at line 192 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_PORT_TYPE

#define LAN9370_MASTER_SLAVE_CONTROL_PORT_TYPE   0x0400

Definition at line 193 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_CONTROL_TEST_MODE

#define LAN9370_MASTER_SLAVE_CONTROL_TEST_MODE   0xE000

Definition at line 190 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS

#define LAN9370_MASTER_SLAVE_STATUS   0x0A

Definition at line 82 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_IDLE_ERR_COUNT

#define LAN9370_MASTER_SLAVE_STATUS_IDLE_ERR_COUNT   0x00FF

Definition at line 204 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_LOC_RCVR_STATUS

#define LAN9370_MASTER_SLAVE_STATUS_LOC_RCVR_STATUS   0x2000

Definition at line 200 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_FD

#define LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_FD   0x0800

Definition at line 202 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_HD

#define LAN9370_MASTER_SLAVE_STATUS_LP_1000BT_HD   0x0400

Definition at line 203 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_MS_CONF_FAULT

#define LAN9370_MASTER_SLAVE_STATUS_MS_CONF_FAULT   0x8000

Definition at line 198 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_MS_CONF_RES

#define LAN9370_MASTER_SLAVE_STATUS_MS_CONF_RES   0x4000

Definition at line 199 of file lan9370_driver.h.

◆ LAN9370_MASTER_SLAVE_STATUS_REM_RCVR_STATUS

#define LAN9370_MASTER_SLAVE_STATUS_REM_RCVR_STATUS   0x1000

Definition at line 201 of file lan9370_driver.h.

◆ LAN9370_PHY_ID1

#define LAN9370_PHY_ID1   0x02

Definition at line 79 of file lan9370_driver.h.

◆ LAN9370_PHY_ID1_PHY_ID_MSB

#define LAN9370_PHY_ID1_PHY_ID_MSB   0xFFFF

Definition at line 179 of file lan9370_driver.h.

◆ LAN9370_PHY_ID1_PHY_ID_MSB_DEFAULT

#define LAN9370_PHY_ID1_PHY_ID_MSB_DEFAULT   0x0007

Definition at line 180 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2

#define LAN9370_PHY_ID2   0x03

Definition at line 80 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2_MODEL_NUM

#define LAN9370_PHY_ID2_MODEL_NUM   0x03F0

Definition at line 185 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2_MODEL_NUM_DEFAULT

#define LAN9370_PHY_ID2_MODEL_NUM_DEFAULT   0x0180

Definition at line 186 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2_PHY_ID_LSB

#define LAN9370_PHY_ID2_PHY_ID_LSB   0xFC00

Definition at line 183 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2_PHY_ID_LSB_DEFAULT

#define LAN9370_PHY_ID2_PHY_ID_LSB_DEFAULT   0xC000

Definition at line 184 of file lan9370_driver.h.

◆ LAN9370_PHY_ID2_REVISION_NUM

#define LAN9370_PHY_ID2_REVISION_NUM   0x000F

Definition at line 187 of file lan9370_driver.h.

◆ LAN9370_PORT1

#define LAN9370_PORT1   1

Definition at line 38 of file lan9370_driver.h.

◆ LAN9370_PORT1_MAC_CTRL0

#define LAN9370_PORT1_MAC_CTRL0   0x1400

Definition at line 117 of file lan9370_driver.h.

◆ LAN9370_PORT1_MASK

#define LAN9370_PORT1_MASK   0x01

Definition at line 46 of file lan9370_driver.h.

◆ LAN9370_PORT1_MSTP_STATE

#define LAN9370_PORT1_MSTP_STATE   0x1B04

Definition at line 118 of file lan9370_driver.h.

◆ LAN9370_PORT1_OP_CTRL0

#define LAN9370_PORT1_OP_CTRL0   0x1020

Definition at line 115 of file lan9370_driver.h.

◆ LAN9370_PORT1_STATUS

#define LAN9370_PORT1_STATUS   0x1030

Definition at line 116 of file lan9370_driver.h.

◆ LAN9370_PORT2

#define LAN9370_PORT2   2

Definition at line 39 of file lan9370_driver.h.

◆ LAN9370_PORT2_MAC_CTRL0

#define LAN9370_PORT2_MAC_CTRL0   0x2400

Definition at line 121 of file lan9370_driver.h.

◆ LAN9370_PORT2_MASK

#define LAN9370_PORT2_MASK   0x02

Definition at line 47 of file lan9370_driver.h.

◆ LAN9370_PORT2_MSTP_STATE

#define LAN9370_PORT2_MSTP_STATE   0x2B04

Definition at line 122 of file lan9370_driver.h.

◆ LAN9370_PORT2_OP_CTRL0

#define LAN9370_PORT2_OP_CTRL0   0x2020

Definition at line 119 of file lan9370_driver.h.

◆ LAN9370_PORT2_STATUS

#define LAN9370_PORT2_STATUS   0x2030

Definition at line 120 of file lan9370_driver.h.

◆ LAN9370_PORT3

#define LAN9370_PORT3   3

Definition at line 40 of file lan9370_driver.h.

◆ LAN9370_PORT3_MAC_CTRL0

#define LAN9370_PORT3_MAC_CTRL0   0x3400

Definition at line 125 of file lan9370_driver.h.

◆ LAN9370_PORT3_MASK

#define LAN9370_PORT3_MASK   0x04

Definition at line 48 of file lan9370_driver.h.

◆ LAN9370_PORT3_MSTP_STATE

#define LAN9370_PORT3_MSTP_STATE   0x3B04

Definition at line 126 of file lan9370_driver.h.

◆ LAN9370_PORT3_OP_CTRL0

#define LAN9370_PORT3_OP_CTRL0   0x3020

Definition at line 123 of file lan9370_driver.h.

◆ LAN9370_PORT3_STATUS

#define LAN9370_PORT3_STATUS   0x3030

Definition at line 124 of file lan9370_driver.h.

◆ LAN9370_PORT4

#define LAN9370_PORT4   4

Definition at line 41 of file lan9370_driver.h.

◆ LAN9370_PORT4_MAC_CTRL0

#define LAN9370_PORT4_MAC_CTRL0   0x4400

Definition at line 129 of file lan9370_driver.h.

◆ LAN9370_PORT4_MASK

#define LAN9370_PORT4_MASK   0x08

Definition at line 49 of file lan9370_driver.h.

◆ LAN9370_PORT4_MSTP_STATE

#define LAN9370_PORT4_MSTP_STATE   0x4B04

Definition at line 130 of file lan9370_driver.h.

◆ LAN9370_PORT4_OP_CTRL0

#define LAN9370_PORT4_OP_CTRL0   0x4020

Definition at line 127 of file lan9370_driver.h.

◆ LAN9370_PORT4_STATUS

#define LAN9370_PORT4_STATUS   0x4030

Definition at line 128 of file lan9370_driver.h.

◆ LAN9370_PORT5

#define LAN9370_PORT5   5

Definition at line 42 of file lan9370_driver.h.

◆ LAN9370_PORT5_MAC_CTRL0

#define LAN9370_PORT5_MAC_CTRL0   0x5400

Definition at line 135 of file lan9370_driver.h.

◆ LAN9370_PORT5_MASK

#define LAN9370_PORT5_MASK   0x10

Definition at line 50 of file lan9370_driver.h.

◆ LAN9370_PORT5_MSTP_STATE

#define LAN9370_PORT5_MSTP_STATE   0x5B04

Definition at line 136 of file lan9370_driver.h.

◆ LAN9370_PORT5_OP_CTRL0

#define LAN9370_PORT5_OP_CTRL0   0x5020

Definition at line 131 of file lan9370_driver.h.

◆ LAN9370_PORT5_STATUS

#define LAN9370_PORT5_STATUS   0x5030

Definition at line 132 of file lan9370_driver.h.

◆ LAN9370_PORT5_XMII_CTRL0

#define LAN9370_PORT5_XMII_CTRL0   0x5300

Definition at line 133 of file lan9370_driver.h.

◆ LAN9370_PORT5_XMII_CTRL1

#define LAN9370_PORT5_XMII_CTRL1   0x5301

Definition at line 134 of file lan9370_driver.h.

◆ LAN9370_PORT_MASK

#define LAN9370_PORT_MASK   0x1F

Definition at line 45 of file lan9370_driver.h.

◆ LAN9370_PORTn_MAC_CTRL0

#define LAN9370_PORTn_MAC_CTRL0 (   port)    (0x0400 + ((port) * 0x1000))

Definition at line 143 of file lan9370_driver.h.

◆ LAN9370_PORTn_MAC_CTRL0_BCAST_STORM_EN

#define LAN9370_PORTn_MAC_CTRL0_BCAST_STORM_EN   0x02

Definition at line 434 of file lan9370_driver.h.

◆ LAN9370_PORTn_MAC_CTRL0_FR_LEN_CHK

#define LAN9370_PORTn_MAC_CTRL0_FR_LEN_CHK   0x04

Definition at line 433 of file lan9370_driver.h.

◆ LAN9370_PORTn_MAC_CTRL0_JUMBO_PKT_EN

#define LAN9370_PORTn_MAC_CTRL0_JUMBO_PKT_EN   0x01

Definition at line 435 of file lan9370_driver.h.

◆ LAN9370_PORTn_MSTP_STATE

#define LAN9370_PORTn_MSTP_STATE (   port)    (0x0B04 + ((port) * 0x1000))

Definition at line 144 of file lan9370_driver.h.

◆ LAN9370_PORTn_MSTP_STATE_LEARNING_DIS

#define LAN9370_PORTn_MSTP_STATE_LEARNING_DIS   0x01

Definition at line 440 of file lan9370_driver.h.

◆ LAN9370_PORTn_MSTP_STATE_RECEIVE_EN

#define LAN9370_PORTn_MSTP_STATE_RECEIVE_EN   0x02

Definition at line 439 of file lan9370_driver.h.

◆ LAN9370_PORTn_MSTP_STATE_TRANSMIT_EN

#define LAN9370_PORTn_MSTP_STATE_TRANSMIT_EN   0x04

Definition at line 438 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0

#define LAN9370_PORTn_OP_CTRL0 (   port)    (0x0020 + ((port) * 0x1000))

Definition at line 139 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_K2L_DEBUG_EN

#define LAN9370_PORTn_OP_CTRL0_K2L_DEBUG_EN   0x10

Definition at line 400 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_K2L_INSERT_EN

#define LAN9370_PORTn_OP_CTRL0_K2L_INSERT_EN   0x20

Definition at line 399 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_LOCAL_LOOPBACK

#define LAN9370_PORTn_OP_CTRL0_LOCAL_LOOPBACK   0x80

Definition at line 397 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_REMOTE_LOOPBACK

#define LAN9370_PORTn_OP_CTRL0_REMOTE_LOOPBACK   0x40

Definition at line 398 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_TAIL_TAG_EN

#define LAN9370_PORTn_OP_CTRL0_TAIL_TAG_EN   0x04

Definition at line 401 of file lan9370_driver.h.

◆ LAN9370_PORTn_OP_CTRL0_TX_QUEUE_SPLIT_EN

#define LAN9370_PORTn_OP_CTRL0_TX_QUEUE_SPLIT_EN   0x03

Definition at line 402 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS

#define LAN9370_PORTn_STATUS (   port)    (0x0030 + ((port) * 0x1000))

Definition at line 140 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_DUPLEX

#define LAN9370_PORTn_STATUS_DUPLEX   0x04

Definition at line 409 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_RX_FLOW_CTRL_EN

#define LAN9370_PORTn_STATUS_RX_FLOW_CTRL_EN   0x01

Definition at line 411 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_SPEED

#define LAN9370_PORTn_STATUS_SPEED   0x18

Definition at line 405 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_SPEED_1000MBPS

#define LAN9370_PORTn_STATUS_SPEED_1000MBPS   0x10

Definition at line 408 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_SPEED_100MBPS

#define LAN9370_PORTn_STATUS_SPEED_100MBPS   0x08

Definition at line 407 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_SPEED_10MBPS

#define LAN9370_PORTn_STATUS_SPEED_10MBPS   0x00

Definition at line 406 of file lan9370_driver.h.

◆ LAN9370_PORTn_STATUS_TX_FLOW_CTRL_EN

#define LAN9370_PORTn_STATUS_TX_FLOW_CTRL_EN   0x02

Definition at line 410 of file lan9370_driver.h.

◆ LAN9370_PORTn_T1_PHY_REG

#define LAN9370_PORTn_T1_PHY_REG (   port,
  addr 
)    (0x0100 + ((port) * 0x1000) + ((addr) * 4))

Definition at line 145 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0

#define LAN9370_PORTn_XMII_CTRL0 (   port)    (0x0300 + ((port) * 0x1000))

Definition at line 141 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_AUTO_COL_DET

#define LAN9370_PORTn_XMII_CTRL0_AUTO_COL_DET   0x01

Definition at line 419 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_CRS_COL_EN

#define LAN9370_PORTn_XMII_CTRL0_CRS_COL_EN   0x02

Definition at line 418 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_DUPLEX

#define LAN9370_PORTn_XMII_CTRL0_DUPLEX   0x40

Definition at line 414 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_RX_FLOW_CTRL_EN

#define LAN9370_PORTn_XMII_CTRL0_RX_FLOW_CTRL_EN   0x08

Definition at line 417 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_SPEED_10_100

#define LAN9370_PORTn_XMII_CTRL0_SPEED_10_100   0x10

Definition at line 416 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL0_TX_FLOW_CTRL_EN

#define LAN9370_PORTn_XMII_CTRL0_TX_FLOW_CTRL_EN   0x20

Definition at line 415 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1

#define LAN9370_PORTn_XMII_CTRL1 (   port)    (0x0301 + ((port) * 0x1000))

Definition at line 142 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL

#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL   0x03

Definition at line 427 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_MII

#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_MII   0x03

Definition at line 430 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RGMII

#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RGMII   0x00

Definition at line 428 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RMII

#define LAN9370_PORTn_XMII_CTRL1_MII_INTF_SEL_RMII   0x01

Definition at line 429 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_MII_RMII_MODE

#define LAN9370_PORTn_XMII_CTRL1_MII_RMII_MODE   0x04

Definition at line 426 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_RGMII_ID_EG

#define LAN9370_PORTn_XMII_CTRL1_RGMII_ID_EG   0x08

Definition at line 425 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_RGMII_ID_IG

#define LAN9370_PORTn_XMII_CTRL1_RGMII_ID_IG   0x10

Definition at line 424 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_RGMII_SPEED_1000

#define LAN9370_PORTn_XMII_CTRL1_RGMII_SPEED_1000   0x40

Definition at line 422 of file lan9370_driver.h.

◆ LAN9370_PORTn_XMII_CTRL1_SEL_EDGE

#define LAN9370_PORTn_XMII_CTRL1_SEL_EDGE   0x20

Definition at line 423 of file lan9370_driver.h.

◆ LAN9370_SPI_CMD_ADDR

#define LAN9370_SPI_CMD_ADDR   0x001FFFE0

Definition at line 55 of file lan9370_driver.h.

◆ LAN9370_SPI_CMD_READ

#define LAN9370_SPI_CMD_READ   0x60000000

Definition at line 54 of file lan9370_driver.h.

◆ LAN9370_SPI_CMD_WRITE

#define LAN9370_SPI_CMD_WRITE   0x40000000

Definition at line 53 of file lan9370_driver.h.

◆ LAN9370_STATIC_MAC_TABLE_SIZE

#define LAN9370_STATIC_MAC_TABLE_SIZE   256

Definition at line 58 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL

#define LAN9370_STATIC_MCAST_TABLE_CTRL   0x041C

Definition at line 102 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION

#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION   0x00000003

Definition at line 319 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_NOP

#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_NOP   0x00000000

Definition at line 320 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_READ

#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_READ   0x00000002

Definition at line 322 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_SEARCH

#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_SEARCH   0x00000003

Definition at line 323 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_WRITE

#define LAN9370_STATIC_MCAST_TABLE_CTRL_ACTION_WRITE   0x00000001

Definition at line 321 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_DIRECT_ACCESS

#define LAN9370_STATIC_MCAST_TABLE_CTRL_DIRECT_ACCESS   0x00000008

Definition at line 315 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_START_FINISH

#define LAN9370_STATIC_MCAST_TABLE_CTRL_START_FINISH   0x00000080

Definition at line 312 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_INDEX

#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_INDEX   0x0000FF00

Definition at line 311 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT

#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT   0x00000004

Definition at line 316 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_RESERVED

#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_RESERVED   0x00000004

Definition at line 318 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_STATIC

#define LAN9370_STATIC_MCAST_TABLE_CTRL_TABLE_SELECT_STATIC   0x00000000

Definition at line 317 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_VALID

#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID   0x00000040

Definition at line 313 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_COUNT

#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_COUNT   0x1FF00000

Definition at line 310 of file lan9370_driver.h.

◆ LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END

#define LAN9370_STATIC_MCAST_TABLE_CTRL_VALID_ENTRY_OR_SEARCH_END   0x00000020

Definition at line 314 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1

#define LAN9370_STATIC_TABLE_ENTRY1   0x0420

Definition at line 104 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1_DES_FILTER

#define LAN9370_STATIC_TABLE_ENTRY1_DES_FILTER   0x20000000

Definition at line 352 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1_MSTP

#define LAN9370_STATIC_TABLE_ENTRY1_MSTP   0x00000007

Definition at line 354 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1_PRIORITY

#define LAN9370_STATIC_TABLE_ENTRY1_PRIORITY   0x1C000000

Definition at line 353 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1_SRC_FILTER

#define LAN9370_STATIC_TABLE_ENTRY1_SRC_FILTER   0x40000000

Definition at line 351 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY1_VALID

#define LAN9370_STATIC_TABLE_ENTRY1_VALID   0x80000000

Definition at line 350 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2

#define LAN9370_STATIC_TABLE_ENTRY2   0x0424

Definition at line 106 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_OVERRIDE

#define LAN9370_STATIC_TABLE_ENTRY2_OVERRIDE   0x80000000

Definition at line 357 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT1_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT1_FORWARD   0x00000001

Definition at line 364 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT2_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT2_FORWARD   0x00000002

Definition at line 363 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT3_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT3_FORWARD   0x00000004

Definition at line 362 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT4_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT4_FORWARD   0x00000008

Definition at line 361 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT5_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT5_FORWARD   0x00000010

Definition at line 360 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_PORT_FORWARD

#define LAN9370_STATIC_TABLE_ENTRY2_PORT_FORWARD   0x0000001F

Definition at line 359 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY2_USE_FID

#define LAN9370_STATIC_TABLE_ENTRY2_USE_FID   0x40000000

Definition at line 358 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY3

#define LAN9370_STATIC_TABLE_ENTRY3   0x0428

Definition at line 108 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY3_FID

#define LAN9370_STATIC_TABLE_ENTRY3_FID   0x007F0000

Definition at line 367 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY3_MAC_ADDR_MSB

#define LAN9370_STATIC_TABLE_ENTRY3_MAC_ADDR_MSB   0x0000FFFF

Definition at line 368 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY4

#define LAN9370_STATIC_TABLE_ENTRY4   0x042C

Definition at line 110 of file lan9370_driver.h.

◆ LAN9370_STATIC_TABLE_ENTRY4_MAC_ADDR_LSB

#define LAN9370_STATIC_TABLE_ENTRY4_MAC_ADDR_LSB   0xFFFFFFFF

Definition at line 371 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_AGE

#define LAN9370_SWITCH_LUE_AGE   0x0320

Definition at line 98 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8

#define LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8   0x0FFF

Definition at line 278 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8_DEFAULT

#define LAN9370_SWITCH_LUE_AGE_AGE_PERIOD_19_8_DEFAULT   0x0000

Definition at line 279 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0

#define LAN9370_SWITCH_LUE_CTRL0   0x0310

Definition at line 94 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT

#define LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT   0x38

Definition at line 243 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT_DEFAULT

#define LAN9370_SWITCH_LUE_CTRL0_AGE_COUNT_DEFAULT   0x20

Definition at line 244 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_DROP_INVALID_VID

#define LAN9370_SWITCH_LUE_CTRL0_DROP_INVALID_VID   0x40

Definition at line 242 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION

#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION   0x03

Definition at line 246 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_CRC

#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_CRC   0x01

Definition at line 248 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_NONE

#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_NONE   0x00

Definition at line 247 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_XOR

#define LAN9370_SWITCH_LUE_CTRL0_HASH_OPTION_XOR   0x02

Definition at line 249 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_RESERVED_LUE_EN

#define LAN9370_SWITCH_LUE_CTRL0_RESERVED_LUE_EN   0x04

Definition at line 245 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL0_VLAN_EN

#define LAN9370_SWITCH_LUE_CTRL0_VLAN_EN   0x80

Definition at line 241 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1

#define LAN9370_SWITCH_LUE_CTRL1   0x0311

Definition at line 95 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_AGING_EN

#define LAN9370_SWITCH_LUE_CTRL1_AGING_EN   0x04

Definition at line 257 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_FAST_AGE_EN

#define LAN9370_SWITCH_LUE_CTRL1_FAST_AGE_EN   0x02

Definition at line 258 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_FLUSH_ALU_TABLE

#define LAN9370_SWITCH_LUE_CTRL1_FLUSH_ALU_TABLE   0x20

Definition at line 254 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_FLUSH_MSTP_ENTRIES

#define LAN9370_SWITCH_LUE_CTRL1_FLUSH_MSTP_ENTRIES   0x10

Definition at line 255 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_LINK_DOWN_FLUSH

#define LAN9370_SWITCH_LUE_CTRL1_LINK_DOWN_FLUSH   0x01

Definition at line 259 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_SELF_ADDR_FILT

#define LAN9370_SWITCH_LUE_CTRL1_SELF_ADDR_FILT   0x40

Definition at line 253 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_SRC_ADDR_FILT

#define LAN9370_SWITCH_LUE_CTRL1_SRC_ADDR_FILT   0x08

Definition at line 256 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL1_UNICAST_LEARNING_DIS

#define LAN9370_SWITCH_LUE_CTRL1_UNICAST_LEARNING_DIS   0x80

Definition at line 252 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2

#define LAN9370_SWITCH_LUE_CTRL2   0x0312

Definition at line 96 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_ALU_PRIORITY_GEN

#define LAN9370_SWITCH_LUE_CTRL2_ALU_PRIORITY_GEN   0x03

Definition at line 271 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_DYNAMIC_EGRESS_VLAN_FILTERING

#define LAN9370_SWITCH_LUE_CTRL2_DYNAMIC_EGRESS_VLAN_FILTERING   0x20

Definition at line 264 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION

#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION   0x0C

Definition at line 266 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_BOTH

#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_BOTH   0x0C

Definition at line 270 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_DYNAMIC

#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_DYNAMIC   0x04

Definition at line 268 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_NONE

#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_NONE   0x00

Definition at line 267 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_STATIC

#define LAN9370_SWITCH_LUE_CTRL2_FLUSH_OPTION_STATIC   0x08

Definition at line 269 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_LINK_DOWN_FLUSH_ACTIVATED

#define LAN9370_SWITCH_LUE_CTRL2_LINK_DOWN_FLUSH_ACTIVATED   0x40

Definition at line 263 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_MID_RANGE_AGE

#define LAN9370_SWITCH_LUE_CTRL2_MID_RANGE_AGE   0x80

Definition at line 262 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL2_STATIC_EGRESS_VLAN_FILTERING

#define LAN9370_SWITCH_LUE_CTRL2_STATIC_EGRESS_VLAN_FILTERING   0x10

Definition at line 265 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL3

#define LAN9370_SWITCH_LUE_CTRL3   0x0313

Definition at line 97 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0

#define LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0   0xFF

Definition at line 274 of file lan9370_driver.h.

◆ LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0_DEFAULT

#define LAN9370_SWITCH_LUE_CTRL3_AGE_PERIOD_7_0_DEFAULT   0x4B

Definition at line 275 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP

#define LAN9370_SWITCH_OP   0x0300

Definition at line 93 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_DOUBLE_TAG_EN

#define LAN9370_SWITCH_OP_DOUBLE_TAG_EN   0x80

Definition at line 233 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_OVER_TEMP_ADJ

#define LAN9370_SWITCH_OP_OVER_TEMP_ADJ   0x70

Definition at line 234 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_OVER_TEMP_EN

#define LAN9370_SWITCH_OP_OVER_TEMP_EN   0x04

Definition at line 236 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_OVER_TEMP_FORCE

#define LAN9370_SWITCH_OP_OVER_TEMP_FORCE   0x08

Definition at line 235 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_SOFT_HARD_RESET

#define LAN9370_SWITCH_OP_SOFT_HARD_RESET   0x02

Definition at line 237 of file lan9370_driver.h.

◆ LAN9370_SWITCH_OP_START_SWITCH

#define LAN9370_SWITCH_OP_START_SWITCH   0x01

Definition at line 238 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_DEST_PORT1

#define LAN9370_TAIL_TAG_DEST_PORT1   0x0001

Definition at line 70 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_DEST_PORT2

#define LAN9370_TAIL_TAG_DEST_PORT2   0x0002

Definition at line 69 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_DEST_PORT3

#define LAN9370_TAIL_TAG_DEST_PORT3   0x0004

Definition at line 68 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_DEST_PORT4

#define LAN9370_TAIL_TAG_DEST_PORT4   0x0008

Definition at line 67 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_DEST_PORT5

#define LAN9370_TAIL_TAG_DEST_PORT5   0x0010

Definition at line 66 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_NORMAL_ADDR_LOOKUP

#define LAN9370_TAIL_TAG_NORMAL_ADDR_LOOKUP   0x1000

Definition at line 63 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_PORT_BLOCKING_OVERRIDE

#define LAN9370_TAIL_TAG_PORT_BLOCKING_OVERRIDE   0x0800

Definition at line 64 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_PRIORITY

#define LAN9370_TAIL_TAG_PRIORITY   0x0700

Definition at line 65 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_PTP_MSG

#define LAN9370_TAIL_TAG_PTP_MSG   0x80

Definition at line 73 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_SRC_PORT

#define LAN9370_TAIL_TAG_SRC_PORT   0x07

Definition at line 74 of file lan9370_driver.h.

◆ LAN9370_TAIL_TAG_VALID

#define LAN9370_TAIL_TAG_VALID   0x2000

Definition at line 62 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL

#define LAN9370_UNKONWN_MULTICAST_CTRL   0x0324

Definition at line 99 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD   0x80000000

Definition at line 282 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP   0x0000001F

Definition at line 283 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_ALL

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_ALL   0x0000001F

Definition at line 289 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT1

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT1   0x00000001

Definition at line 284 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT2

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT2   0x00000002

Definition at line 285 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT3

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT3   0x00000004

Definition at line 286 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT4

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT4   0x00000008

Definition at line 287 of file lan9370_driver.h.

◆ LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT5

#define LAN9370_UNKONWN_MULTICAST_CTRL_FWD_MAP_PORT5   0x00000010

Definition at line 288 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL

#define LAN9370_VPHY_SPECIAL_CTRL   0x077C

Definition at line 114 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MDIO_INT_EN

#define LAN9370_VPHY_SPECIAL_CTRL_MDIO_INT_EN   0x2000

Definition at line 382 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MODE

#define LAN9370_VPHY_SPECIAL_CTRL_MODE   0x0300

Definition at line 384 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MODE_MII_PHY

#define LAN9370_VPHY_SPECIAL_CTRL_MODE_MII_PHY   0x0100

Definition at line 386 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MODE_RGMII

#define LAN9370_VPHY_SPECIAL_CTRL_MODE_RGMII   0x0000

Definition at line 385 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MODE_RMII_PHY

#define LAN9370_VPHY_SPECIAL_CTRL_MODE_RMII_PHY   0x0300

Definition at line 388 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_MODE_SGMII

#define LAN9370_VPHY_SPECIAL_CTRL_MODE_SGMII   0x0200

Definition at line 387 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SMI_INDIRECT_EN

#define LAN9370_VPHY_SPECIAL_CTRL_SMI_INDIRECT_EN   0x8000

Definition at line 380 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND

#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND   0x001C

Definition at line 390 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_FD

#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_FD   0x0018

Definition at line 394 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_HD

#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_100_HD   0x0008

Definition at line 392 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_FD

#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_FD   0x0014

Definition at line 393 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_HD

#define LAN9370_VPHY_SPECIAL_CTRL_SPEED_DUPLEX_IND_10_HD   0x0004

Definition at line 391 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SPI_INDIRECT_EN

#define LAN9370_VPHY_SPECIAL_CTRL_SPI_INDIRECT_EN   0x1000

Definition at line 383 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SW_COL_TEST

#define LAN9370_VPHY_SPECIAL_CTRL_SW_COL_TEST   0x0080

Definition at line 389 of file lan9370_driver.h.

◆ LAN9370_VPHY_SPECIAL_CTRL_SW_LOOPBACK

#define LAN9370_VPHY_SPECIAL_CTRL_SW_LOOPBACK   0x4000

Definition at line 381 of file lan9370_driver.h.

Function Documentation

◆ lan9370AddStaticFdbEntry()

error_t lan9370AddStaticFdbEntry ( NetInterface interface,
const SwitchFdbEntry entry 
)

Add a new entry to the static MAC table.

Parameters
[in]interfaceUnderlying network interface
[in]entryPointer to the forwarding database entry
Returns
Error code

Definition at line 959 of file lan9370_driver.c.

◆ lan9370DeleteStaticFdbEntry()

error_t lan9370DeleteStaticFdbEntry ( NetInterface interface,
const SwitchFdbEntry entry 
)

Remove an entry from the static MAC table.

Parameters
[in]interfaceUnderlying network interface
[in]entryForwarding database entry to remove from the table
Returns
Error code

Definition at line 1080 of file lan9370_driver.c.

◆ lan9370DisableIrq()

void lan9370DisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 319 of file lan9370_driver.c.

◆ lan9370DumpPhyReg()

void lan9370DumpPhyReg ( NetInterface interface,
uint8_t  port 
)

Dump PHY registers for debugging purpose.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number

Definition at line 1594 of file lan9370_driver.c.

◆ lan9370EnableIgmpSnooping()

void lan9370EnableIgmpSnooping ( NetInterface interface,
bool_t  enable 
)

Enable IGMP snooping.

Parameters
[in]interfaceUnderlying network interface
[in]enableEnable or disable IGMP snooping

Definition at line 870 of file lan9370_driver.c.

◆ lan9370EnableIrq()

void lan9370EnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 309 of file lan9370_driver.c.

◆ lan9370EnableMldSnooping()

void lan9370EnableMldSnooping ( NetInterface interface,
bool_t  enable 
)

Enable MLD snooping.

Parameters
[in]interfaceUnderlying network interface
[in]enableEnable or disable MLD snooping

Definition at line 900 of file lan9370_driver.c.

◆ lan9370EnableRsvdMcastTable()

void lan9370EnableRsvdMcastTable ( NetInterface interface,
bool_t  enable 
)

Enable reserved multicast table.

Parameters
[in]interfaceUnderlying network interface
[in]enableEnable or disable reserved group addresses

Definition at line 930 of file lan9370_driver.c.

◆ lan9370EventHandler()

void lan9370EventHandler ( NetInterface interface)

LAN9370 event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 329 of file lan9370_driver.c.

◆ lan9370FlushDynamicFdbTable()

void lan9370FlushDynamicFdbTable ( NetInterface interface,
uint8_t  port 
)

Flush dynamic MAC table.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number

Definition at line 1405 of file lan9370_driver.c.

◆ lan9370FlushStaticFdbTable()

void lan9370FlushStaticFdbTable ( NetInterface interface)

Flush static MAC table.

Parameters
[in]interfaceUnderlying network interface

Definition at line 1256 of file lan9370_driver.c.

◆ lan9370GetDuplexMode()

NicDuplexMode lan9370GetDuplexMode ( NetInterface interface,
uint8_t  port 
)

Get duplex mode.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
Returns
Duplex mode

Definition at line 672 of file lan9370_driver.c.

◆ lan9370GetDynamicFdbEntry()

error_t lan9370GetDynamicFdbEntry ( NetInterface interface,
uint_t  index,
SwitchFdbEntry entry 
)

Read an entry from the dynamic MAC table.

Parameters
[in]interfaceUnderlying network interface
[in]indexZero-based index of the entry to read
[out]entryPointer to the forwarding database entry
Returns
Error code

Definition at line 1304 of file lan9370_driver.c.

◆ lan9370GetLinkSpeed()

uint32_t lan9370GetLinkSpeed ( NetInterface interface,
uint8_t  port 
)

Get link speed.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
Returns
Link speed

Definition at line 599 of file lan9370_driver.c.

◆ lan9370GetLinkState()

bool_t lan9370GetLinkState ( NetInterface interface,
uint8_t  port 
)

Get link state.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
Returns
Link state

Definition at line 565 of file lan9370_driver.c.

◆ lan9370GetPortState()

SwitchPortState lan9370GetPortState ( NetInterface interface,
uint8_t  port 
)

Get port state.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
Returns
Port state

Definition at line 782 of file lan9370_driver.c.

◆ lan9370GetStaticFdbEntry()

error_t lan9370GetStaticFdbEntry ( NetInterface interface,
uint_t  index,
SwitchFdbEntry entry 
)

Read an entry from the static MAC table.

Parameters
[in]interfaceUnderlying network interface
[in]indexZero-based index of the entry to read
[out]entryPointer to the forwarding database entry
Returns
Error code

Definition at line 1159 of file lan9370_driver.c.

◆ lan9370Init()

error_t lan9370Init ( NetInterface interface)

LAN9370 Ethernet switch initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 97 of file lan9370_driver.c.

◆ lan9370InitHook()

void lan9370InitHook ( NetInterface interface)

LAN9370 custom configuration.

Parameters
[in]interfaceUnderlying network interface

Definition at line 229 of file lan9370_driver.c.

◆ lan9370ReadExtReg()

uint16_t lan9370ReadExtReg ( NetInterface interface,
uint8_t  port,
uint8_t  bank,
uint8_t  addr 
)

Read extended register.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
[in]bankRegister bank
[in]addrRegister address
Returns
Extended register value

Definition at line 1649 of file lan9370_driver.c.

◆ lan9370ReadPhyReg()

uint16_t lan9370ReadPhyReg ( NetInterface interface,
uint8_t  port,
uint8_t  address 
)

Read PHY register.

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

Definition at line 1544 of file lan9370_driver.c.

◆ lan9370ReadSwitchReg16()

uint16_t lan9370ReadSwitchReg16 ( NetInterface interface,
uint16_t  address 
)

Read switch register (16 bits)

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

Definition at line 1810 of file lan9370_driver.c.

◆ lan9370ReadSwitchReg32()

uint32_t lan9370ReadSwitchReg32 ( NetInterface interface,
uint16_t  address 
)

Read switch register (32 bits)

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

Definition at line 1904 of file lan9370_driver.c.

◆ lan9370ReadSwitchReg8()

uint8_t lan9370ReadSwitchReg8 ( NetInterface interface,
uint16_t  address 
)

Read switch register (8 bits)

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

Definition at line 1719 of file lan9370_driver.c.

◆ lan9370SetAgingTime()

void lan9370SetAgingTime ( NetInterface interface,
uint32_t  agingTime 
)

Set aging time for dynamic filtering entries.

Parameters
[in]interfaceUnderlying network interface
[in]agingTimeAging time, in seconds

Definition at line 845 of file lan9370_driver.c.

◆ lan9370SetPortState()

void lan9370SetPortState ( NetInterface interface,
uint8_t  port,
SwitchPortState  state 
)

Set port state.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
[in]statePort state

Definition at line 726 of file lan9370_driver.c.

◆ lan9370SetUnknownMcastFwdPorts()

void lan9370SetUnknownMcastFwdPorts ( NetInterface interface,
bool_t  enable,
uint32_t  forwardPorts 
)

Set forward ports for unknown multicast packets.

Parameters
[in]interfaceUnderlying network interface
[in]enableEnable or disable forwarding of unknown multicast packets
[in]forwardPortsPort map

Definition at line 1452 of file lan9370_driver.c.

◆ lan9370TagFrame()

error_t lan9370TagFrame ( NetInterface interface,
NetBuffer buffer,
size_t *  offset,
NetTxAncillary ancillary 
)

Add tail tag to Ethernet frame.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the payload
[in,out]offsetOffset to the first payload byte
[in]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 454 of file lan9370_driver.c.

◆ lan9370Tick()

void lan9370Tick ( NetInterface interface)

LAN9370 timer handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 239 of file lan9370_driver.c.

◆ lan9370UntagFrame()

error_t lan9370UntagFrame ( NetInterface interface,
uint8_t **  frame,
size_t *  length,
NetRxAncillary ancillary 
)

Decode tail tag from incoming Ethernet frame.

Parameters
[in]interfaceUnderlying network interface
[in,out]framePointer to the received Ethernet frame
[in,out]lengthLength of the frame, in bytes
[in,out]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 513 of file lan9370_driver.c.

◆ lan9370WriteExtReg()

void lan9370WriteExtReg ( NetInterface interface,
uint8_t  port,
uint8_t  bank,
uint8_t  addr,
uint16_t  data 
)

Write extended register.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
[in]bankRegister bank
[in]addrRegister address
[in]dataExtended register value

Definition at line 1620 of file lan9370_driver.c.

◆ lan9370WritePhyReg()

void lan9370WritePhyReg ( NetInterface interface,
uint8_t  port,
uint8_t  address,
uint16_t  data 
)

Write PHY register.

Parameters
[in]interfaceUnderlying network interface
[in]portPort number
[in]addressPHY register address
[in]dataRegister value

Definition at line 1497 of file lan9370_driver.c.

◆ lan9370WriteSwitchReg16()

void lan9370WriteSwitchReg16 ( NetInterface interface,
uint16_t  address,
uint16_t  data 
)

Write switch register (16 bits)

Parameters
[in]interfaceUnderlying network interface
[in]addressSwitch register address
[in]dataRegister value

Definition at line 1766 of file lan9370_driver.c.

◆ lan9370WriteSwitchReg32()

void lan9370WriteSwitchReg32 ( NetInterface interface,
uint16_t  address,
uint32_t  data 
)

Write switch register (32 bits)

Parameters
[in]interfaceUnderlying network interface
[in]addressSwitch register address
[in]dataRegister value

Definition at line 1858 of file lan9370_driver.c.

◆ lan9370WriteSwitchReg8()

void lan9370WriteSwitchReg8 ( NetInterface interface,
uint16_t  address,
uint8_t  data 
)

Write switch register (8 bits)

Parameters
[in]interfaceUnderlying network interface
[in]addressSwitch register address
[in]dataRegister value

Definition at line 1676 of file lan9370_driver.c.

Variable Documentation

◆ lan9370SwitchDriver

const SwitchDriver lan9370SwitchDriver
extern

LAN9370 Ethernet switch driver.

Definition at line 45 of file lan9370_driver.c.