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
Visitor asuarez
Visitor
1,700 Views
Registered: ‎02-14-2018

ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

Hello,

 

We are developing a custom board similar to the ZC702 zynq board with Petalinux 2017.4 but we are using the TI DP83867CR ethernet chip instead of the Marvell one used on the ZC702.

 

Does anyone know what steps need to be taken to make sure the board works with the new chip? Are there any changes that need to be made in Vivado? And What changes need to be made to the device tree/kernel?

 

Thank you.

0 Kudos
1 Solution

Accepted Solutions
Visitor asuarez
Visitor
2,335 Views
Registered: ‎02-14-2018

Re: ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

Not sure which setting got it to work but this is my working device tree config (system-user.dtsi) for ethernet:

 

&gem0{
    status = "okay";
    phy-handle = <&phy0>;
    phy-mode = "rgmii-id";
    
    pinctrl-names = "default";
    phy-reset-gpio = <&gpio0 49 0>;
    phy-reset-active-low;
	
    xlnx,eth-mode = <0x1>;
    fixed-link {
	 max-speed = <1000>;
	 ull-duplex;
    };

    mdio {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;
        phy0: phy@15 {
            compatible = "ethernet-phy-ieee802.3-c22";
            device_type = "ethernet-phy";

            reg = <15>;
            ti,rx-internal-delay = <0x8>; 
            ti,tx-internal-delay = <0xa>; 
            ti,fifo-depth = <0x01>; 
            ti,min-output-impedance;
            ti,dp83867-rxctrl-strap-quirk;
            status = "okay";
        };
    };
};

Also to get u-boot to work with the dp83867 I had to add this line to my platform-top.h:

 

 

#include <configs/platform-auto.h>
#define CONFIG_SYS_BOOTM_LEN 0xF000000

#undef CONFIG_PHY_MARVELL
#define CONFIG_PHY_TI

Best to luck if anyone else has this issue. 

0 Kudos
4 Replies
Scholar hbucher
Scholar
1,689 Views
Registered: ‎03-22-2016

Re: ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

@asuarez

First I'm sure your board designer will make sure to make the board files available to you so you include it in the Vivado board_files folder.

Second  I see it in both the Linux and xilinx kernels

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/phy/dp83867.c

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/net/phy/dp83867.c

As these are a couple years old already I don't see how it is not there

You can search for it explicitly in petalinux-config

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Visitor asuarez
Visitor
1,651 Views
Registered: ‎02-14-2018

Re: ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

@hbucher thanks for the reply.

 

So the electrical engineer that created the board sent me a .hdf file which to be honest I don't entirely trust which is why I asked about Vivado. I've done some searching and have gotten this far.

 

- I've added the device driver for the DP83867CR in the kernel config

- I've added what I think are the correct settings to the device tree.  

 

 

&gem0 {
    status = "okay";
    phy-mode = "rgmii-id";
    phy-handle = <&phy0>;
    
    mdio {
        phy0: phy@f {
            pinctrl-names = "default";
            phy-reset-gpio = <&gpio0 49 0>;
	    phy-reset-active-low;
	        
            device_type = "ethernet-phy";
            reg = <0x0f>;
            ti,rx-internal-delay = <0x8>; 
            ti,tx-internal-delay = <0xa>; 
            ti,fifo-depth = <0x01>; 
            ti,rxctrl-strap-worka;
        };
    };
};

The problem I'm having is that the PHY is not found. See dmesg below. 

 

 

 

root@OL772_peta:~# dmesg | grep phy
[    1.021399] libphy: Fixed MDIO Bus: probed
[    1.061654] libphy: MACB_mii_bus: probed
root@OL772_peta:~# dmesg | grep eth
[    1.065529] mdio_bus e000b000.etherne:0f: mdio_device_register
[    1.071490] macb e000b000.ethernet eth0: no PHY found

 

but when I check for the device during boot i can see it.

 

Zynq> mdio list
eth0: 
f - Generic PHY <--> ethernet@e000b000

I'm not exactly sure if I missed a step or am missing something else. 

 

 

0 Kudos
Scholar hbucher
Scholar
1,645 Views
Registered: ‎03-22-2016

Re: ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

@asuarez

An HDF file is not a board file. It is output when you export the design from Vivado to the SDK. 

You need the XML board files. See here for examples of board files from Digilent that are used in Vivado:

https://github.com/Digilent/vivado-boards/tree/master/new/board_files

As per chip support, TI and Marvell are the ONLY chips supported by Xilinx in standalone mode. I have boards that use Realtek chips and I had to write my own standalone drivers. However, Linux should be able to support all of them out of the box, though. 

Make sure this driver is selected in petalinux-config (when building the kernel) otherwise it wont be recognized. 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Visitor asuarez
Visitor
2,336 Views
Registered: ‎02-14-2018

Re: ZC702 Like Board with DP83867CR Ethernet Petalinux 2017.4

Jump to solution

Not sure which setting got it to work but this is my working device tree config (system-user.dtsi) for ethernet:

 

&gem0{
    status = "okay";
    phy-handle = <&phy0>;
    phy-mode = "rgmii-id";
    
    pinctrl-names = "default";
    phy-reset-gpio = <&gpio0 49 0>;
    phy-reset-active-low;
	
    xlnx,eth-mode = <0x1>;
    fixed-link {
	 max-speed = <1000>;
	 ull-duplex;
    };

    mdio {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;
        phy0: phy@15 {
            compatible = "ethernet-phy-ieee802.3-c22";
            device_type = "ethernet-phy";

            reg = <15>;
            ti,rx-internal-delay = <0x8>; 
            ti,tx-internal-delay = <0xa>; 
            ti,fifo-depth = <0x01>; 
            ti,min-output-impedance;
            ti,dp83867-rxctrl-strap-quirk;
            status = "okay";
        };
    };
};

Also to get u-boot to work with the dp83867 I had to add this line to my platform-top.h:

 

 

#include <configs/platform-auto.h>
#define CONFIG_SYS_BOOTM_LEN 0xF000000

#undef CONFIG_PHY_MARVELL
#define CONFIG_PHY_TI

Best to luck if anyone else has this issue. 

0 Kudos