UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
7,180 Views
Registered: ‎02-18-2013

Question about Linux on my Zynq

Jump to solution

Hello,

 

I have Linux running on my Zybo and now I want add a ethernet connection.
In my device tree I found this entry:

ps7_ethernet_1: ps7-ethernet@0xe000c000 {
	clock-names = "ref_clk", "aper_clk";
	clocks = <&clkc 14>, <&clkc 31>;
	compatible = "xlnx,ps7-ethernet-1.00.a";
	interrupt-parent = <&ps7_scugic_0>;
	interrupts = <0 45 4>;
	reg = <0xE000C000 0x1000>;
	status = "disabled";
} ;

But I have to modify it a little bit, because I have to add the Phy.
I can´t do the changes in the "ps.dtsi" file, so I have to do it in "system.dts". The whole entry looks like this:

ps7_ethernet_0: ps7-ethernet@e000b000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "ref_clk", "aper_clk";
clocks = <&clkc 13>, <&clkc 30>;
compatible = "xlnx,ps7-ethernet-1.00.a";
interrupt-parent = <&ps7_scugic_0>;
interrupts = <0 22 4>;
local-mac-address = [00 0a 35 00 00 00];
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
reg = <0xe000b000 0x1000>;
xlnx,ptp-enet-clock = <0x6750918>;
xlnx,enet-reset = "";
xlnx,eth-mode = <0x1>;
xlnx,has-mdio = <0x1>;
	mdio {
	#address-cells = <1>;
	#size-cells = <0>;
	phy0: phy@1 {
		compatible = "realtek,RTL8211E";
		device_type = "ethernet-phy";
		reg = <1>;
		} ;
	} ;
} ;

If I add this to my "system.dtsi" I got an error because of multible definitions of "ps7_ethernet_0".
How can I add this to my "system.dtsi"? Maybe you have an answer for this question.

Many thanks!

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
11,536 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

I have solved the problem.
The Clock Source for eth0 was configured for external clock.
After setting this to IO PLL it worked.

View solution in original post

0 Kudos
7 Replies
Scholar sampatd
Scholar
7,165 Views
Registered: ‎09-05-2011

Re: Question about Linux on my Zynq

Jump to solution
0 Kudos
Explorer
Explorer
7,159 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

Great! Thank you :)

 

I change my "system.dts" to this:

 

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Thu Jan 29 07:59:45 2015
*/

/dts-v1/;
/include/ "ps.dtsi"
/include/ "pl.dtsi"
/{
	chosen {
		bootargs = "console=ttyPS0,115200 rootfstype=ext4 root=/dev/mmcblk0p2 rootwait rw";
		linux,stdout-path = &ps7_uart_1;
	} ;
	aliases {
		ethernet0 = &ps7_ethernet_0;
		i2c0 = &ps7_i2c_0;
		serial0 = &ps7_uart_1;
		spi0 = &ps7_qspi_0;
	} ;
	ps7_ddr_0: memory@00100000 {
		device_type = "memory";
		reg = <0x0 0x20000000>;
	} ;
	&ps7_ethernet_0 {
		
 		mdio {
  		#address-cells = <1>;
  		#size-cells = <0>;
 		phy0: phy@1 {
			compatible = "marvell,88e1116r";
			device_type = "ethernet-phy";
 			reg = <1>;
			} ;
		} ;
	};
};

If I try to build the device tree I got this error:

 

Error: /home/ubuntu/Schreibtisch/Media/Zybo_Linux/Vivado/Zybo/Zybo.sdk/device_tree_bsp_0/system.dts:25.8-23 syntax error
FATAL ERROR: Unable to parse input tree

 What is the reason for this error?

Thank you again :)

0 Kudos
Explorer
Explorer
7,091 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

No idea :(?
I doesn´t know much about device tree, so I don´t know where my mistake is.

0 Kudos
Explorer
Explorer
6,953 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

Hello,

 

I add the part for the Phy now:

 

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Fri Feb  6 14:34:05 2015
*/
/dts-v1/;
/include/ "ps.dtsi"
/include/ "pl.dtsi"

&ps7_ethernet_0 {
	phy-handle = <&phy0>;
	xlnx,ptp-enet-clock = <108333336>;
	mdio {
		#address-cells = <1>;
		#size-cells = <0>;
		phy0: phy@1 {
			compatible = "realtek,RTL8211E";
			device_type = "ethernet-phy";
			reg = <1>;
		};
	};
};

/{
	chosen {
		bootargs = "console=ttyPS0,115200 rootfstype=ext4 root=/dev/mmcblk0p2 rootwait rw";
		linux,stdout-path = &ps7_uart_1;
	} ;
	aliases {
		ethernet0 = &ps7_ethernet_0;
		i2c0 = &ps7_i2c_0;
		serial0 = &ps7_uart_1;
		spi0 = &ps7_qspi_0;
	} ;
	ps7_ddr_0: memory@00100000 {
		device_type = "memory";
		reg = <0x0 0x20000000>;
	} ;
};

Now I can compile the device tree, but when I boot my Zybo I can't ping it.
The Zybo has a fix IP and I can't ping from the Zybo.
During boot the system doen't show that there is no phy installed, so I think the phy should work.

What is the problem now?

Thank you!

0 Kudos
Scholar sampatd
Scholar
6,948 Views
Registered: ‎09-05-2011

Re: Question about Linux on my Zynq

Jump to solution
you should be able to change the IP of your board using 'ifconfig'

for example, at zynq prompt:
ifconfig eth0 192.168.10.11 up

You can also set-up the ip address in bootargs.
0 Kudos
Explorer
Explorer
6,945 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

Hello,

 

thank you for your answer.
I did it:

 

root@Zybo:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0A:35:00:01:22
          inet addr:192.168.178.50  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:54 Base address:0xb000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1008 (1008.0 B)  TX bytes:1008 (1008.0 B)

root@Zybo:/# ping 192.168.178.1
PING 192.168.178.1 (192.168.178.1) 56(84) bytes of data.
^C
--- 192.168.178.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2005ms

 But the ping to my router doesn´t work :(

0 Kudos
Explorer
Explorer
11,537 Views
Registered: ‎02-18-2013

Re: Question about Linux on my Zynq

Jump to solution

I have solved the problem.
The Clock Source for eth0 was configured for external clock.
After setting this to IO PLL it worked.

View solution in original post

0 Kudos