Changes

Jump to: navigation, search
Introduction
== Introduction ==
This white paper is based on [[AN-BELK-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB | AN-BELK-006]] and shows how to enable second Ethernet interface by the use of native 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 access 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. For more details please contact TBD
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.
Below is the The following block diagram describing shows the ethernet phyEthernet native Ethernet controllers' and phys's topology as implemented in the [[AN-BELK-006:_Enabling_dual_Gigabit_Ethernet_support_on_BoraEVB/BoraXEVB | AN-BELK-006]].* PHY #1 : is the ethernet Ethernet PHY on the Bora SOM* PHY #2 : is the ethernet Ethernet PHY on the BoraEVB* PHY #3 : is a dummy PHY implemented in the GMII-to-RGMII bridge IP. It has only one register to correctly set the RGMII bus frequency , based on ETH Ethernet link speed.
Following commands shows show how to initialize the second ethernet PHY Ethernet port in U-boot and to download a file via TFTP:* at first boot the second ethernet Ethernet interface is unable to find MAC address, so it must be set as an U-boot 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 Ethernet interfaces the user must be corretly set the ''<code>ethact'' </code> environment variable properly (this variable is reset to its default at every system reboot):** To to access GEM0 (Bora SOM ethernet phy) : <code>setenv ethact Gem.e000b000</code>** To to access GEM1 (BoraEVB ethernet phy) : <code>setenv ethact Gem.e000c000</code>
If the user want wants to use the Bora SOM ethernet Ethernet interface all accesses such as loading a file via TFTP are stright straight forward.
If the user want wants to access the net LAN through the BoraEVB ethernet interface, some init additional initialization commands must be issued. Below this these steps are provided:.
Issue a net access command like <code>ping</code>. This command is used to init initialize the ethernet Ethernet PHY #2 on the BoraEVB. The <code>ping </code> command fails because the GMII-to-RGMII bridge (PHY #3) is not yet 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 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 the GMII-to-RGMII bridge. This IP has an internal dummy MDIO PHY at the ''<code>0x8'' </code> address. Is has only one internal register that is used to set ethernet 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 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 the commands :
** link @ 10M 10Mbps : <code>mii write 0x08 0x10 0x0</code>** link @ 100M 100Mbps : <code>mii write 0x08 0x10 0x2000</code>** link @ 1000M 1000Mbps : <code>mii write 0x08 0x10 0x40</code>
After Once virtual PHY #3 is initiliazed properly, the user can access the net via the BoraEVB ethernetuse second Ethernet port:
<pre>
zynq-uboot> ping 192.168.0.23
4,650
edits

Navigation menu