Changes

Jump to: navigation, search
no edit summary
{{Applies To Bora}}
{{Applies To BoraX}}
{{AppliesToBORA_TN}}
{{AppliesToBORA_Xpress_TN}}
{{InfoBoxBottom}}
!Version
!Date
!BELK/BXELK version
!Notes
|-
|1.0.0
|November 2016
|[[Bora_Embedded_Linux_Kit_(BELK)#BELK_software_components|2.2.0, 3.0.0]]
|First public release
|-
== Introduction ==
[[AN-BELK-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB | AN-BELK-006]] shows how to enable second Ethernet interface by the use of native Gem1 GEM1 controller. That application note allows to support both Ethernet ports in Linux. In some circumstances, it can be required to access second Ethernet port in U-Boot as well.
This white paper describes how to use both Ethernet ports in U-Boot. It is worth remembering that '''default U-Boot delivered with Bora Embedded Linux Kit ''' or '''BoraX Embedded Linux Kit does not support second Ethernet interface'''. A modified version is required to run the examples presented here. For more information please contact [mailto:support-bora@dave.eu|technical support].
ETH PHY on Bora SOM and BoraEVB through MDIO interfaces under U-boot. Some changes must be made in U-boot sources in order to enable access to both GEM0 and GEM1 Zynq controllers.  The [[AN-BELK-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB | AN-BELK-006]] gives access to both ethernet ports only under U-boot. For some reasons the user may want to fully access the net independently through both ETH connection even by the U-boot bootloader.  The following block diagram shows the Ethernet native Ethernet controllers' and phys' /PHYs topology as implemented in the [[AN-BELK-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB | AN-BELK-006]].
* PHY #1 : is the Ethernet PHY on the Bora SOM
* PHY #2 : is the Ethernet PHY on the BoraEVB
Following commands show how to initialize second Ethernet port in U-boot and to download a file via TFTP:.* at At first boot the second Ethernet interface is unable to find MAC address, so it must be set as an environment variable:
<pre>
U-Boot 2014.07-00002-g61aeb00 (Nov 07 2016 - 14:42:16) [belk-3.0.0]
resetting ...
</pre>
* To switch between the two Ethernet interfaces user must set the <code>ethact</code> environment variable properly (this variable is reset to its default at every system reboot):** to access GEM0 (Bora SOM ethernet phy) : <code>setenv ethact Gem.e000b000</code>** to access GEM1 (BoraEVB ethernet phy) : <code>setenv ethact Gem.e000c000</code> If the user wants to use the Bora SOM Ethernet interface all accesses such as loading a file via TFTP are straight forward.
If the user wants to use the Bora SOM Ethernet interface, regular network commands can be used.Instead, If the user wants to access the LAN through the BoraEVB ethernet Ethernet interface, some additional initialization commands must be issued. Below these steps are provided, as detailed in the rest of the document.
Issue After setting <code>ethact</code> variable to select second Ethernet port, issue a net command like <code>ping</code>. This command is just used to initialize the Ethernet PHY #2 and PHY #3 on the BoraEVB. The <code>ping</code> command fails because the GMII-to-RGMII bridge (PHY #3) is not yet fully initialized :
<pre>
zynq-uboot> ping 192.168.0.23
ping failed; host 192.168.0.23 is not alive
</pre>
The two PHY #2 and PHY #3 are now partially initialized and, as such, can be listed and accessed via <code>mii</code> U-boot command:
<pre>
zynq-uboot> mii info
PHY 0x08: OUI = 0x0000, Model = 0x00, Rev = 0x00, 10baseT, HDX
</pre>
The last steps implies to correctly configure step consists of configuring the GMII-to-RGMII bridge. This IP has an internal dummy (virtual) MDIO PHY at the <code>0x8</code> address. Is has only one internal register that is used to set Ethernet link speed and consequently the RGMII interface clock frequency. For more detail about the GMII-to-RGMII bridge IP and the internal register please refer to the [https://www.xilinx.com/support/documentation/ip_documentation/gmii_to_rgmii/v3_0/pg160-gmii-to-rgmii.pdf Product Guide].
Since the ethernet Ethernet PHY on BoraEVB is configured with auto-negotiation enabled by default, The user must know the link speed negotiated on this interface before setting the GMII-to-RGMII register.Following are Please use the command associated to the commands negotiated link speed:** link @ 10Mbps : <code>mii write 0x08 0x10 0x0</code>** link @ 100Mbps : <code>mii write 0x08 0x10 0x2000</code>** link @ 1000Mbps : <code>mii write 0x08 0x10 0x40</code>
Once virtual PHY #3 is initiliazed properlyfully initialiazed, the user can use second Ethernet portis finally available:
<pre>
zynq-uboot> ping 192.168.0.23
8,154
edits

Navigation menu