-
Notifications
You must be signed in to change notification settings - Fork 0
/
ETH_TSE errata.txt
109 lines (46 loc) · 3.24 KB
/
ETH_TSE errata.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Description
Due to the default timeout period in the Simple Socket Server template, there is a possibility that auto-negotiation at 1G speed may fail in Cyclone® V, Cyclone® 10, Max® 10 devices.
Resolution
To work around this problem, the user is required to modify the BSP source code to increase auto-negotiation timeout delay and recompile to generate the new ELF file using the instructions below.
Open the following file in the project directory:
../software/<project_name_bsp>/drivers/src/altera_avalon_tse.c
Change the timeout delay from "usleep(1000)" to "usleep(5000)" as shown in the next portion of code:
alt_32 alt_tse_phy_restart_an(alt_tse_phy_info *pphy, alt_u32 timeout_threshold) {
………………………………….
while(alt_tse_phy_rd_mdio_reg(pphy, TSE_PHY_MDIO_STATUS, TSE_PHY_MDIO_STATUS_AN_COMPLETE, 1) == 0 ){
if(timeout > timeout_threshold) { tse_dprintf(4, "WARNING : PHY[%d.%d] - Auto-Negotiation FAILED\n", mac_group_index, mac_info_index);
/* Restore previous MDIO address */
alt_tse_phy_wr_mdio_addr(pphy, mdioadd_prev);
return TSE_PHY_AN_NOT_COMPLETE;
}
usleep(5000); //updated from usleep(1000)
}
*******************************************************************************
NOTE: This edit is near line number 1610 in the altera_avalon_tse.c that
NOTE: uses the MSGDMA controller _bsp auto-generated by Quartus 20.1. The
NOTE: other usleep(1000) that does not get changed is near line number 1671.
*******************************************************************************
----------------------------------------------------------------------------------
Description
Due to a problem in Nios® II Software Build Tool, the default settings for Nios® II Simple Socket Server (RMII) template is not targeted to MARVELL PHY, which resulted in wrong PHY configurations causing Ethernet link down. This problem is observed in Nios® II SBT version 17.1 onwards.
Resolution
To work around this problem the user is required to modify below parameters in template to enable MARVELL PHY RGMII configurations.
Browse to project directory: ../software/<project_name>/tse_my_system.c
Step 1. Uncomment the next definition:
/* if using marvell phy and you want rgmii mode, uncomment this define */
#define SET_MARVELL_RGMII_MODE //uncomment this definition to enable RGMII
#ifdef SET_MARVELL_RGMII_MODE
#define ADDITIONAL_PHY_CFG &marvell_cfg_rgmii
#else
#define ADDITIONAL_PHY_CFG 0
#endif
Step 2. Find the definition "ifdef DESCRIPTOR MEMORY BASE" and verify the first argument from function TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO to be declared as "ETH_TSE" and not as "TSE_0_TSE"
As shown in the next code portion:
#ifdef DESCRIPTOR_MEMORY_BASE
alt_tse_system_info tse_mac_device[MAXNETS] = {
TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO(ETH_TSE, 0, TSE_0_DMA_TX, TSE_0_DMA_RX, TSE_PHY_AUTO_ADDRESS, ADDITIONAL_PHY_CFG, DESCRIPTOR_MEMORY)
NOTE: I had to further edit the above line in tse_my_system to also change the DMA names (at line 27):
#ifdef DESCRIPTOR_MEMORY_BASE
alt_tse_system_info tse_mac_device[MAXNETS] = {
TSE_SYSTEM_EXT_MEM_NO_SHARED_FIFO(ETH_TSE, 0, MSGDMA_TX, MSGDMA_RX, TSE_PHY_AUTO_ADDRESS, ADDITIONAL_PHY_CFG, DESCRIPTOR_MEMORY)
};