News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Petalinux BSP for TE0720-GigaZee

Started by navarro.arnaud, March 25, 2015, 04:36:20 PM

Previous topic - Next topic

navarro.arnaud

Hello,

I am currently implementing the Zynq with Petalinux 2014.4 and the corresponding Vivado 2014.4. Everything's fine until now.
My Ethernet, USB and I2C don't work (It was actually written in the Petalinux step by step - without the use of the BSP Document). I thought if I use your BSP for Petalinux, it would help me, but when I look into your available files ( http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/BSP.html ), the BSP PetaLinux folder is empty.
What should I do? Is there a possibility the Petalinux BSP can turn things easier?

Regards,

Arnaud Navarro.

Antti Lukats

#1
Hi

we are testing the reference project builds right now, short how-to:

1) if not installed then download and install vivado board part files
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/board_part_files.html
https://wiki.trenz-electronic.de/display/PD/Installation

2) TE0720-02.zip ref design package download-unzip
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/reference_designs.html

cd ../ref_plnx/

run_one.bat
make_images.bat

The above will REBUILD SD card images for TE0720, with working usb, ethernet, i2c...
It will also create hardware handover files, this runs as non-project flow

make_project.bat

this would create Vivado project to be used in GUI mode

Petalinux .bsp also in the download, in the ref design zip are included ready made: fsbl, u-boot and linux image

Note: only SD card image will fully boot into linux, SPI image will boot and stay in uboot, this is due to the u-boot environment the auto boot media detect is not built in. Will be fixed.

.bat file to flash SPI is included already.

This flow works, we will add more project into the same flow, I hope it makes the development much simpler or everyone.


navarro.arnaud

Hi,

Thanks for the fast reply.

I have already installed your "board part files". I did exactly what you describe, step by step. I even use your brand new petalinux BSP. However in the end, I got the same message during the init : no PHY set for ethernet.
So I decided to look deeper in the device tree. I have seen that it exists 3 different files which are connected each other. (zynq_7000.dtsi, system_conf.dtsi and system_top.dts). You wrote inside the system_top.dts (like I wanted actually to do) but still, nothing works.
I have found that in zynq_7000.dtsi, all the ports are "disabled" (status = "disabled"). So I changed this into ""status = "okay"", but still nothing changes.

Have a nice weekend.
Regards,

Arnaud Navarro

Antti Lukats

Hi

We double check this. It really works here. And yes there is only one dts file that can be edited, all what is needed can be done there. This is the way it should be done, and they way we do it also.
With the build scripts for vivado there you can build SD card images also with pre-compiled sw, they SHOULD work.


navarro.arnaud

Hi,

Actually everything's working but still not the Ethernet. Usb and I2C are configurated. I use as a sarting point your gui project that you generated with the .tcl script. I didn't add anything, I just run through the whole process.
In the end I get this message during the boot (see attachment).
I show you that the I2C is working because I have seen that I2C is quite important for the Ethernet. I think that linux knows about Eth0 but still don't set the PHY bus.

root@TE0720-02-refplnx:/usr/sbin# i2cdetect -y -r 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: 20 21 -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- UU
70: -- -- -- -- -- -- -- --

Perhaps I can send you the .bit file or other files on your email address, because in the forum I can't.

Regards,

Antti Lukats

1) access or use of I2C is not all needed or relevant to ethernet use on TE0720
2) you are using some VERY old u-boot and linux kernel? Wau, but that should also not be an issue
but
3) did you use correct fsbl_hooks.c when you generated the FSBL? This is where the primary ETH reset is done.

This file should have been added in the ZIP also, but was left out during zip generation, so it was only visible in the petalinux bsp we provided.

I have updated the ZIP file also to include the fsbl_hooks.c directly

Reading of MAC Address is also done in the fsbl_hooks.c as described here
https://wiki.trenz-electronic.de/display/PD/MAC+Address+usage


navarro.arnaud

Hi,

I have some good and bad news.
So, I took your generated project with your System Controller and the PS. I generated the .bit and the hardware description file. I went through all the config, build processes with petalinux using your BSP then I put the images on the SD card.
I finally found the problem which was the TE0720-20-1CF Micromodule. I changed my current one to a brand new ,ordered 1 week ago. And now everything's work. The PHY is set etc...

So, I don't know if you had some similiar problems before with this module, but when I changed mine, it works. Do you have some ideas where this problem come from?

Regards,

Antti Lukats

did you have the FSBL correct now?

can you just type: mii info from u-boot prompt on the "bad module"

and drop me an email support@

navarro.arnaud

The FSBL was correct before. The hook.c file was from you since the begining.
I send you the command asap.

navarro.arnaud

Hi,

So when I write the command "mii info" on u-boot :

PHY 0x1A: OUI =0702, Model = 0x01, Rev = 0x00, 10baseT, 110X


Antti Lukats

#10
well, this means the Ethernet PHY is not visible on the management bus at all as if not there at all. We need to check the module, please contact per email.

m.brock

Quote from: Antti Lukats on March 31, 2015, 02:24:15 PM
This file should have been added in the ZIP also, but was left out during zip generation, so it was only visible in the petalinux bsp we provided.

I have updated the ZIP file also to include the fsbl_hooks.c directly

I downloaded this ZIP today and found the fsbl_hooks.c here:
\design\TE0720-02\src\sw\FSBL\fsbl_hooks.c
But it is full of syntax errors !

How can I trust this code if it doesn't even pass through the compiler?

Antti Lukats

Hi,

SDK projects do not use the code from the location where it comes into the zip file, we have to copy the .c file manually for inclusion in the zip, as the SDK projects are very often in temporary folders that get deleted often.

fsbl_hooks.c version that appeared in the zip did live on the computer maybe 5 minutes before it was fixed. We are sorry it happened, and thankful that it got reported.

As said the syntax error version did live 5 minutes, then was fixed to not have error or warning during compile.

The location in the zip folder tree will probably change later, I just included one version so that the sources are available. But later different project will include different fsbl_hooks.c files as example the HDMI test pattern design does init TPG and VTC in FSBL, this should not be in generic one, etc, etc..

We are automating the Vivado builds right now, not the SDK builds, hence if by accident bad .c file appears it would not be found with our build process as the build does not compile c files.

ZIP is now fixed, but it may take few hours before update on download area appears





m.brock

Hi again,

Should the run_one.bat execution create a correct system_top.dts for me? Or where else should I get one? It's not in TE0720-02.zip.
I found one by accident in Test_Design TE0720-02-GPIO.bsp after generating it. Is that the recommended approach?
At least now I have a working ethernet in linux. Without it linux knows nothing about the PHY.

Maarten

Antti Lukats

#14
run_one.bat

runs the vivado hardware flow in non-project mode creating BIT files and HDF files (sysdef, hwdef), it does not generate any DTS or DTSI files

We are currently merging the petalinux config and setup files into same single archive, but this is not yet released. As bare minimum the phy stuf has to be added in the top level DTS file by hand.

This archive is however not petalinux BSP we never said that. It is a archive for the reference projects, witch are mainly vivado projects.

In our petalinux BSP the DTS files are correct

m.brock

Quote from: Antti Lukats on April 23, 2015, 05:34:48 PM
We are currently merging the petalinux config and setup files into same single archive, but this is not yet released.

Thank you. I'm looking forward to that.