Problem about replacing PHY of Xavier with a Switch

I can set the clock skew to TX and RX clock singals at SWITCH side,and don’t know how to set it at the XAVIER side also.

I`ve referred to the above file,and our device tree is like this now.

fec1:ether_qos@2490000 {
                /* PTP_ref clock speed in MHz */
                nvidia,ptp_ref_clock_speed = <312500000>;
                /* rxq_enable_ctrl = <rx0 rx1 rx2 rx3>
                 * 0x0 = Not enabled, 0x1 = Enabled for AV
                 * 0x2 = Enabled for Legacy, 0x3 = Reserved
                nvidia,rxq_enable_ctrl = <2 2 2 2>;
                nvidia,queue_prio = <0 1 2 3>;

                nvidia,ptp_dma_ch = <3>;

                nvidia,chan_napi_quota = <64 64 64 64>;
                nvidia,pause_frames = <0>; /*0=enable, 1=disable */
                nvidia,phy-reset-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(G, 5) 0>;
                nvidia,phy-max-frame-size = <16>;       /* size in kbytes */
                nvidia,eth_iso_enable = <1>; /*0=enable, 1=disable */
                phy-mode = "rgmii";
                phy-handle = <&switch0port6>;
              mdio:mdio {
                        compatible = "nvidia,eqos-mdio";
                        #address-cells = <1>;
                        #size-cells = <0>;

                        switch0: switch0@0 {
                                  compatible = "marvell,mv88e6352","marvell,mv88e6085";
                                  #address-cells = <1>;
                                #size-cells = <0>;
                                reg = <0>;

                                dsa,member = <0 0>;

                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        port@0 {
                                                reg = <0>;
                                                label = "lan0";

                                        port@1 {
                                                reg = <1>;
                                                label = "lan1";

                                        port@2 {
                                                reg = <2>;
                                                label = "lan2";

                                        port@3 {
                                                reg = <3>;
                                                label = "lan3";

                                        port@4 {
                                                reg = <4>;
                                                label = "lan4";

                                   switch0port6:port@6 {
                                                reg = <6>;
                                                label = "cpu";
                                                ethernet = <&fec1>;
                                                phy-mode = "rgmii";
                                                fixed-link {
                                                        speed = <10>;



now ,If I type the command ifconfig I can see eth0\lan0\lan1\lan2\lan3\lan4,But I can’t Ping the other devices connected to the port1.Even if I configure the Ip address for eth0, the result is the same.

Hi,WayneWWW,thanks for reply.
The lastest status:
We set both XAVIER and Switch with 10Mbps,and measure the data of RGMII,we can find the ARP package(with correct MAC address) from XAVIER.
We also can find the MAC address of XAVIER in the package,which returning form SWITCH(88E6352,RGMII TX).
But we can’t ping each other.

Does this mean,the TX end of XAVIER can communicate with SWITCH,but can’t receive data from SWITCH ?Maybe the problem comes from STWITCH RGMII TX to XAVIER RGMII RX.

Can I configure the RGMII RX clock skew of of XAVIER ?

What is the result of “arp -a”? If ARP has no issue, could you try to assign a static IP and ping?
“tcpdump -I eth0 -w data.pcap”output will can help to check if received any packets or not.

This is the package I captured. rth0 doesn`t seem to have received anything. It can only capture the ARP package it sent out.

data.7z (279 Bytes)

This is the latest data that I have captured on eth0,which contains the packets sent and received by ARP ,as well as some other data packets.

But I still can`t ping or surf the Internet.
data_new.7z (8.57 KB)

Could you

Execute “iptables -t mangle -F INPUT” which will clear the filters and check the ping
ethtool -S eth0 this will give the dump of the registers
cat /proc/interrupts | grep eth* this will be give us the interrupt count.

We have the same problem with the Marvell 88E6190 switch. What the our problem is… Is the switch is NOT autoconfigured with the EEPROM (24C512). It is put in autoconfig by HW straps (NOCPU mode). Once it is NOT configured via EEPROM… We have problems when the Linux booting phase comes to LIBPHY. Since switch should be transparent to the PHYs at that time, but it is NOT!

Once LIBPHY starts writing to the switch (since MDIO commands are not reaching PHYs), switch blocks. Exist from auto config mode and refuses to respond. So no ping possible.

If we physically cut the MDIO line, then switch stays in autoconfig mode (by HW straps), but then it is impossible to do RGMII Tx and Rx clock skew, since i.MX6 has the silicon bug which does NOT allow this skew to be applied (1.2ns skew MUST be applied to the both clocks).

I am wondering if we can solve this problem changing LIBPHY, some how???

What will be your suggestion(s)/advise(s) for this problem?

Thank you!

I would like to know if someone has solved replacing PHY of Xavier with a Switch?