sja1105_driver.c
void nicNotifyLinkChange(NetInterface *interface)
Process link state change notification.
Definition: nic.c:559
#define SJA1105_MIIx_CLK_CTRL_CLKSRC_PLL1
Definition: sja1105_driver.h:1295
#define SJA1105_CFG_PAD_MIIx_TX_D32_OS_HIGH
Definition: sja1105_driver.h:1316
error_t sja1105DeleteStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Remove an entry from the static MAC table.
Definition: sja1105_driver.c:852
error_t sja1105AddStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Add a new entry to the static MAC table.
Definition: sja1105_driver.c:837
void sja1105EventHandler(NetInterface *interface)
SJA1105 event handler.
Definition: sja1105_driver.c:578
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG4_SPEED_1GBPS
Definition: sja1105_driver.h:1052
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG4_SPEED
Definition: sja1105_driver.h:1051
#define SJA1105_INIT_DEV_CONFIG_FLAG_CONFIGS
Definition: sja1105_driver.h:661
#define SJA1105_CFG_PAD_MIIx_TX_CTRL_IPUD_PLAIN
Definition: sja1105_driver.h:1340
#define SJA1105_PORT_STATUS_MIIx_SPEED
Definition: sja1105_driver.h:1501
#define SJA1105_MIIx_CLK_CTRL_CLKSRC_PLL0
Definition: sja1105_driver.h:1292
#define SJA1105_CFG_PAD_MIIx_TX_CLK_OS_HIGH
Definition: sja1105_driver.h:1346
void sja1105WriteMultipleRegs(NetInterface *interface, uint32_t address, const uint32_t *data, uint_t count)
Write multiple registers.
Definition: sja1105_driver.c:1079
void sja1105EnableIgmpSnooping(NetInterface *interface, bool_t enable)
Enable IGMP snooping.
Definition: sja1105_driver.c:800
void sja1105SetAgingTime(NetInterface *interface, uint32_t agingTime)
Set aging time for dynamic filtering entries.
Definition: sja1105_driver.c:788
SwitchPortState sja1105GetPortState(NetInterface *interface, uint8_t port)
Get port state.
Definition: sja1105_driver.c:775
void sja1105FlushStaticFdbTable(NetInterface *interface)
Flush static MAC table.
Definition: sja1105_driver.c:881
error_t sja1105UntagFrame(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Decode tail tag from incoming Ethernet frame.
Definition: sja1105_driver.c:649
#define SJA1105_PORT_STATUS_MIIx_MODE_MII_MAC
Definition: sja1105_driver.h:1506
error_t sja1105Init(NetInterface *interface)
SJA1105 Ethernet switch initialization.
Definition: sja1105_driver.c:79
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG0_VALID
Definition: sja1105_driver.h:1007
error_t sja1105WriteMacConfigEntry(NetInterface *interface, uint8_t port)
Reconfigure an entry in the MAC configuration table.
Definition: sja1105_driver.c:936
#define SJA1105_PORT_STATUS_MIIx_MODE_RMII_MAC
Definition: sja1105_driver.h:1507
void sja1105FlushDynamicFdbTable(NetInterface *interface, uint8_t port)
Flush dynamic MAC table.
Definition: sja1105_driver.c:923
void sja1105WriteSingleReg(NetInterface *interface, uint32_t address, uint32_t data)
Write a single register.
Definition: sja1105_driver.c:1043
#define SJA1105_MIIx_CLK_CTRL_CLKSRC_RX_CLK_x(n)
Definition: sja1105_driver.h:1308
void sja1105DumpReg(NetInterface *interface)
Dump registers for debugging purpose.
Definition: sja1105_driver.c:1168
__weak_func bool_t sja1105GetLinkState(NetInterface *interface, uint8_t port)
Get link state.
Definition: sja1105_driver.c:664
#define SJA1105_CFG_PAD_MIIx_TX_D32_IPUD_PLAIN
Definition: sja1105_driver.h:1320
error_t sja1105TagFrame(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Add tail tag to Ethernet frame.
Definition: sja1105_driver.c:631
SJA1105 5-port Ethernet switch driver.
#define SJA1105_CFG_PAD_MIIx_TX_CLK_IPUD_PLAIN
Definition: sja1105_driver.h:1351
void sja1105EnableRsvdMcastTable(NetInterface *interface, bool_t enable)
Enable reserved multicast table.
Definition: sja1105_driver.c:824
NicDuplexMode sja1105GetDuplexMode(NetInterface *interface, uint8_t port)
Get duplex mode.
Definition: sja1105_driver.c:692
uint16_t sja1105ReadPhyReg(NetInterface *interface, uint8_t phyAddr, uint8_t regAddr)
Read PHY register.
Definition: sja1105_driver.c:1218
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG4_SPEED_100MBPS
Definition: sja1105_driver.h:1053
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG0_RDWRSET
Definition: sja1105_driver.h:1009
#define SJA1105_MIIx_CLK_CTRL_CLKSRC_IDIVx(n)
Definition: sja1105_driver.h:1309
error_t sja1105GetStaticFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the static MAC table.
Definition: sja1105_driver.c:868
__weak_func error_t sja1105InitHook(NetInterface *interface)
SJA1105 custom configuration.
Definition: sja1105_driver.c:126
void sja1105DumpPhyReg(NetInterface *interface, uint8_t phyAddr)
Dump PHY registers for debugging purpose.
Definition: sja1105_driver.c:1246
error_t sja1105ConfigureCgu(NetInterface *interface, uint8_t port)
Clock generation unit setup.
Definition: sja1105_driver.c:320
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG0_PORTIDX
Definition: sja1105_driver.h:1010
const SwitchDriver sja1105SwitchDriver
SJA1105 Ethernet switch driver.
Definition: sja1105_driver.c:45
#define SJA1105_PLL_x_C_PLLCLKSRC_XO66M_0
Definition: sja1105_driver.h:1239
error_t sja1105GetDynamicFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the dynamic MAC table.
Definition: sja1105_driver.c:909
#define SJA1105_CFG_PAD_MIIx_TX_CTRL_OS_HIGH
Definition: sja1105_driver.h:1336
#define SJA1105_CFG_PAD_MIIx_TX_D10_IPUD_PLAIN
Definition: sja1105_driver.h:1330
#define SJA1105_PORT_STATUS_MIIx_SPEED_10MBPS
Definition: sja1105_driver.h:1502
#define SJA1105_PORT_STATUS_MIIx_MODE_SGMII
Definition: sja1105_driver.h:1511
void sja1105EnableMldSnooping(NetInterface *interface, bool_t enable)
Enable MLD snooping.
Definition: sja1105_driver.c:812
uint32_t sja1105ReadSingleReg(NetInterface *interface, uint32_t address)
Read a single register.
Definition: sja1105_driver.c:1058
void sja1105SetUnknownMcastFwdPorts(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Set forward ports for unknown multicast packets.
Definition: sja1105_driver.c:894
#define SJA1105_PORT_STATUS_MIIx_MODE_RMII_PHY
Definition: sja1105_driver.h:1509
void sja1105WritePhyReg(NetInterface *interface, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Write PHY register.
Definition: sja1105_driver.c:1193
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG4
Definition: sja1105_driver.h:132
error_t sja1105LoadStaticConfig(NetInterface *interface, const char_t *data, size_t length)
Load static configuration into the device.
Definition: sja1105_driver.c:141
__weak_func uint32_t sja1105GetLinkSpeed(NetInterface *interface, uint8_t port)
Get link speed.
Definition: sja1105_driver.c:678
#define SJA1105_PORT_STATUS_MIIx_MODE_MII_PHY
Definition: sja1105_driver.h:1508
void sja1105SetPortState(NetInterface *interface, uint8_t port, SwitchPortState state)
Set port state.
Definition: sja1105_driver.c:761
#define SJA1105_CFG_PAD_MIIx_TX_D10_OS_HIGH
Definition: sja1105_driver.h:1326
#define SJA1105_PORT_STATUS_MIIx_MODE_RGMII
Definition: sja1105_driver.h:1510
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG0
Definition: sja1105_driver.h:137
void sja1105ReadMultipleRegs(NetInterface *interface, uint32_t address, uint32_t *data, uint_t count)
Read multiple registers.
Definition: sja1105_driver.c:1127
void sja1105SetPortSpeed(NetInterface *interface, uint8_t port, uint32_t speed)
Reconfigure port speed.
Definition: sja1105_driver.c:707
#define SJA1105_MIIx_CLK_CTRL_CLKSRC_TX_CLK_x(n)
Definition: sja1105_driver.h:1307
#define SJA1105_PORT_STATUS_MIIx_SPEED_100MBPS
Definition: sja1105_driver.h:1503
error_t sja1105ReadMacConfigEntry(NetInterface *interface, uint8_t port)
Read an entry from the MAC configuration table.
Definition: sja1105_driver.c:991
void sja1105ConfigurePll1(NetInterface *interface)
PLL1 setup for 50MHz.
Definition: sja1105_driver.c:292
#define SJA1105_MAC_CONFIG_TABLE_RECONFIG4_SPEED_10MBPS
Definition: sja1105_driver.h:1054
TCP/IP stack core.
#define SJA1105_MIIx_CLK_CTRL_AUTOBLOCK
Definition: sja1105_driver.h:1303
Helper functions for Ethernet.
Debugging facilities.
#define SJA1105_IDIV_x_C_CLKSRC_XO66M_0
Definition: sja1105_driver.h:1264