cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zhangjiali
Visitor
Visitor
2,504 Views
Registered: ‎04-18-2018

how to config gmii to rgmii ip in petalinux

Hi,

 

my project infomation is as follows:

 

vivado project:

微信图片_20180418172320.png

 

device tree:

        ethernet@e000b000 {
            compatible = "cdns,zynq-gem", "cdns,gem";
            reg = <0xe000b000 0x1000>;
            status = "okay";
            interrupts = <0x0 0x16 0x4>;
            clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
            clock-names = "pclk", "hclk", "tx_clk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            enet-reset = <0x5 0x9 0x0>;
            gmii2rgmii-phy-handle = <0x5>;
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            local-mac-address = [00 0a 35 00 1e 53];
            phy-handle = <0x6>;

            mdio {
                #address-cells = <0x1>;
                #size-cells = <0x0>;

                phy@8 {
                    device_type = "ethernet-phy";
                    reg = <0x8>;
                    compatible = "xlnx,gmii-to-rgmii-1.0";
                    phy-handle = <0x6>;
                    linux,phandle = <0x5>;
                    phandle = <0x5>;
                };

                phy@1 {
                    reg = <0x1>;
                    linux,phandle = <0x6>;
                    phandle = <0x6>;
                };
            };
        };

the u-boot information:

Zynq> mii info
PHY 0x00: OUI = 0x0732, Model = 0x11, Rev = 0x06,  10baseT, HDX
PHY 0x01: OUI = 0x0732, Model = 0x11, Rev = 0x06,  10baseT, HDX
PHY 0x08: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX

 

when I boot the linux,  and got the information:

 

libphy: Fixed MDIO Bus: probed
libphy: mdio_driver_register: xgmiitorgmii
CAN device driver interface
libphy: MACB_mii_bus: probed
mdio_bus e000b000.etherne:08: mdio_device_register
xgmiitorgmii e000b000.etherne:08: Couldn't find phydev
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:1e:53)
RTL8211F Gigabit Ethernet e000b000.etherne:01: attached PHY driver [RTL8211F Gigabit Ethernet] (mii_bus:phy_addr=e000b000.etherne:01, irq=-1)

 

and when I login linux, I can't get a IP address;when I set a static IP,I can't ping the host PC.

 

Tags (1)
0 Kudos
6 Replies
zhangjiali
Visitor
Visitor
2,488 Views
Registered: ‎04-18-2018

u-boot information:

 

ethernet@e000b000 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded
Hit any key to stop autoboot:  0
Zynq> mii info
PHY 0x00: OUI = 0x0732, Model = 0x11, Rev = 0x06, 100baseT, FDX
PHY 0x01: OUI = 0x0732, Model = 0x11, Rev = 0x06, 100baseT, FDX
PHY 0x08: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX

Tags (1)
0 Kudos
godevin
Visitor
Visitor
1,959 Views
Registered: ‎01-24-2019

Hi,

I'm having the exact same issue. Have you sorted out how to make it work?

Thanks

0 Kudos
sdyang
Scholar
Scholar
1,245 Views
Registered: ‎11-30-2017

I have the same issue.

---/\/\/\/\/\/\/\---
Always Online
0 Kudos
godevin
Visitor
Visitor
1,233 Views
Registered: ‎01-24-2019

If it can helps, here is what I endde up be using to have it partially running. I couldn't get the gigabit working but at least I did have 10 and 100 mbits available.

 

&gem0 {
  phy-handle = <&phy0>;
  phy-mode = "rgmii-id";
  status = "okay";
  xlnx,ptp-enet-clock = <0x69f6bcb>; // Set clock to 111MHz?
  local-mac-address = [00 0a 35 00 02 90];
 
  gmii2rgmii-phy-handle = <&gmii_to_rgmii_0>;
 
  psu_ethernet_0_mdio: mdio {
    #address-cells = <1>;
    #size-cells = <0>;
 
    phy0: phy@1 {
      device_type = "ethernet-phy";
      reg = <1>;
    };
 
    gmii_to_rgmii_0: phy@8 {
      device_type = "ethernet-phy";
      reg = <8>;
    };
  };
};
0 Kudos
abcdefjxz
Visitor
Visitor
1,160 Views
Registered: ‎03-10-2020

I am having the same problem. Have you sorted out?
0 Kudos
abcdefjxz
Visitor
Visitor
1,160 Views
Registered: ‎03-10-2020

I am having the same problem avout gmii2rgmii. Have you sorted out?
0 Kudos