U-Boot Network Setup (MitySOM-5CSX-H6-42A)
Added by Jose Berlioz almost 3 years ago
Hello,
I was trying to load the kernel and fpga files through a TFTP server. I have to use a static IP for this as a requirement (cant use dhcp).
Is there any setup I have to do besides establishing environment variables on U-boot? I can't seem to be able to ping my server or my gateway (192.168.1.1) from my devkit, even though I am able to ping it from Yocto.
I am using a 5CSX-H6-42A Mitysom with the standard CriticalLink image.
This is the console message I get when I use ping:
MitySOM-5CSx # ping 192.168.1.1
designware_board_phy_init: enter
Waiting for PHY auto negotiation to complete............. TIMEOUT!
ENET Speed is 10 Mbps - HALF duplex connection
Using mii0 device
ping failed; host 192.168.1.1 is not alive
This is the environment variables loaded on U-boot:
MitySOM-5CSx # printenv
autoload=no
axibridge=ffd0501c
axibridge_handoff=0x00000004
baudrate=115200
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
bootcmd=run mmcload; run mmcboot
bootdelay=5
bridge_disable=mw $fpgaintf 0; mw $fpga2sdram 0; go $fpga2sdram_apply; mw $axibridge 0; mw $l3remap 0x1
bridge_enable_handoff=mw $fpgaintf ${fpgaintf_handoff}; go $fpga2sdram_apply; mw $fpga2sdram ${fpga2sdr
am_handoff}; mw $axibridge ${axibridge_handoff}; mw $l3remap ${l3remap_handoff}
clmodelnum=5CSX-H6-42A-RC
ethact=mii0
ethaddr=c4:ff:bc:70:39:fd
filesize=0x6aebe4
fpga=0
fpga2sdram=ffc25080
fpga2sdram_apply=3ff76598
fpga2sdram_handoff=0x00000000
fpgaintf=ffd08028
fpgaintf_handoff=0x00000000
fpgaload=run bridge_disable;fpga load 0 ${loadfpgaaddr} ${loadfpgasize}; run bridge_enable_handoff
gatewayip=192.168.1.1
ipaddr=192.168.1.103
l3remap=ff800000
l3remap_handoff=0x00000019
loadfdtaddr=0x00000100
loadfpgaaddr=0x2000000
loadfpgasize=0x700000
loadinitramfsaddr=0x3000000
loadkerneladdr=0xA000
mmcboot=run mmcsetbootargs;run fpgaload;bootz ${loadkerneladdr} - ${loadfdtaddr}
mmcextpart=3
mmcfatpart=1
mmcfdtloc=/boot/socfpga_mitysom5csx_devkit.dtb
mmcfpgaloc=/dev_5cs.rbf
mmckernelloc=/boot/zImage
mmcload=mmc rescan;run mmcloadkernel;run mmcloadfdt;run mmcloadfpga
mmcloadfdt=ext2load mmc 0:${mmcextpart} ${loadfdtaddr} ${mmcfdtloc}
mmcloadfpga=fatload mmc 0:${mmcfatpart} ${loadfpgaaddr} ${mmcfpgaloc}
mmcloadkernel=ext2load mmc 0:${mmcextpart} ${loadkerneladdr} ${mmckernelloc}
mmcloadpart=2
mmcroot=/dev/mmcblk0p3
mmcsetbootargs=setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait
netmask=255.255.255.0
preboot=run setup_usb; ab1805 cs ${rtccal}
qspiboot=run qspisetbootargs;run fpgaload;bootz ${loadkerneladdr} ${loadinitramfsaddr} ${loadfdtaddr}
qspifdtloc=0x50000
qspifdtsize=0x6000
qspifpgaloc=0x8E0000
qspiinitfsramloc=0x0
qspiinitfsramsize=0x1000000
qspikernelloc=0xe0000
qspikernelsize=0x600000
qspiload=run qspiloadkernel;run qspiloadfdt;run qspiloadfpga;run qspiloadinitramfs
qspiloadfdt=sf probe 0; sf read ${loadfdtaddr} ${qspifdtloc} ${qspifdtsize}
qspiloadfpga=sf probe 0; sf read ${loadfpgaaddr} ${qspifpgaloc} ${loadfpgasize}
qspiloadinitramfs=sf probe 1; sf read ${loadinitramfsaddr} ${qspiinitfsramloc} ${qspiinitfsramsize}
qspiloadkernel=sf probe 0; sf read ${loadkerneladdr} ${qspikernelloc} ${qspikernelsize}
qspisetbootargs=setenv bootargs console=ttyS0,115200 root=/dev/ram0
rtccal=0
setup_usb=gpio set 0
stderr=serial
stdin=serial
stdout=serial
verify=n
Environment size: 2616/4092 bytes
Thanks,
-Jose
Replies (4)
RE: U-Boot Network Setup (MitySOM-5CSX-H6-42A) - Added by Michael Williamson almost 3 years ago
Hi Jose,
Are you using a MitySOM-5CSX Development kit board, or a custom carrier board?
The first couple of lines:
aiting for PHY auto negotiation to complete............. TIMEOUT! ENET Speed is 10 Mbps - HALF duplex connection
are very suspicious. I assume you are using a switch that is at least 100 Mbps?
This could be because the ethernet reset line is not being asserted or released correctly, or it could indicate other issues with the PHY MII interface to the SOM. I thought that our default u-Boot scripts included GPIO commands to toggle the ethernet reset pin as part of the bootcmd script to ensure the PHY reset with the correct boostrap options (after the SOM was powered). I am not seeing that in your environment. There should be an "initphy" or "initeth" u_boot script command in the stock environment.
-Mike
RE: U-Boot Network Setup (MitySOM-5CSX-H6-42A) - Added by Jose Berlioz almost 3 years ago
Hey Mike,
Yes, I have a 300Mbps switch, but I can test it in a faster one. I am also testing it in the devkit, not the custom board.
When yocto comes up, it looks like it is able to get to 100Mbps:
socfpga-dwmac ff702000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
and is able to ping too:
root@mitysom-c5:~# ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.35 ms
I also had issues with my image so I was trying this with the SD Card image given in the CriticalLink website for the 5CSX-42A. The only thing that was changed were adding the ip address environment variables. Can you post the script in here since I can't seem to find it? I can add it manually.
-Jose
RE: U-Boot Network Setup (MitySOM-5CSX-H6-42A) - Added by Zachary Miller almost 3 years ago
Hi Jose,
You can make the following changes to the U-Boot environment to enable Ethernet:
initphy=gpio clear 28; gpio set 28; sleep 1 preboot=run initphy; run setup_usb; ab1805 cs ${rtccal}
You'll also need to set the ipaddr
environment variable to assign a static IP to the board.
Note that although the sleep in initphy
is only one second, it may take another few seconds for the PHY to actually come up. After that, you should be able to ping/TFTP.
Zach
RE: U-Boot Network Setup (MitySOM-5CSX-H6-42A) - Added by Jose Berlioz almost 3 years ago
That did it.
MitySOM-5CSx # ping 192.168.1.1 designware_board_phy_init: enter Waiting for PHY auto negotiation to complete. done ENET Speed is 100 Mbps - FULL duplex connection Using mii0 device host 192.168.1.1 is alive
Thanks,
Jose