cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hokim
Scholar
Scholar
11,747 Views
Registered: ‎10-21-2015

why kernel updating doesn't find ethernet phy?

Jump to solution

Hello,

I'm running linux on zybo board with realtek RTL8211E.

It worked well in the kernel of https://github.com/Xilinx/linux-xlnx/tree/xilinx-v2016.3  as following log

[    0.789804] CAN device driver interface
[    0.793466] libphy: MACB_mii_bus: probed
[    0.796009] mdio_bus e000b000.etherne: /amba/ethernet@e000b000/mdio has invalid PHY address
[    0.803062] mdio_bus e000b000.etherne: scan phy mdio at address 0
[    0.808253] mdio_bus e000b000.etherne: scan phy mdio at address 1
[    0.813386] mdio_bus e000b000.etherne: scan phy mdio at address 2
[    0.818156] mdio_bus e000b000.etherne: scan phy mdio at address 3
[    0.822967] mdio_bus e000b000.etherne: scan phy mdio at address 4
[    0.827727] mdio_bus e000b000.etherne: scan phy mdio at address 5
[    0.832530] mdio_bus e000b000.etherne: scan phy mdio at address 6
[    0.837292] mdio_bus e000b000.etherne: scan phy mdio at address 7
[    0.842080] mdio_bus e000b000.etherne: scan phy mdio at address 8
[    0.846841] mdio_bus e000b000.etherne: scan phy mdio at address 9
[    0.851629] mdio_bus e000b000.etherne: scan phy mdio at address 10
[    0.856476] mdio_bus e000b000.etherne: scan phy mdio at address 11
[    0.861347] mdio_bus e000b000.etherne: scan phy mdio at address 12
[    0.866196] mdio_bus e000b000.etherne: scan phy mdio at address 13
[    0.871070] mdio_bus e000b000.etherne: scan phy mdio at address 14
[    0.875919] mdio_bus e000b000.etherne: scan phy mdio at address 15
[    0.880790] mdio_bus e000b000.etherne: scan phy mdio at address 16
[    0.885640] mdio_bus e000b000.etherne: scan phy mdio at address 17
[    0.890512] mdio_bus e000b000.etherne: scan phy mdio at address 18
[    0.895361] mdio_bus e000b000.etherne: scan phy mdio at address 19
[    0.900232] mdio_bus e000b000.etherne: scan phy mdio at address 20
[    0.905083] mdio_bus e000b000.etherne: scan phy mdio at address 21
[    0.909946] mdio_bus e000b000.etherne: scan phy mdio at address 22
[    0.914805] mdio_bus e000b000.etherne: scan phy mdio at address 23
[    0.919665] mdio_bus e000b000.etherne: scan phy mdio at address 24
[    0.924542] mdio_bus e000b000.etherne: scan phy mdio at address 25
[    0.929396] mdio_bus e000b000.etherne: scan phy mdio at address 26
[    0.934276] mdio_bus e000b000.etherne: scan phy mdio at address 27
[    0.939126] mdio_bus e000b000.etherne: scan phy mdio at address 28
[    0.944001] mdio_bus e000b000.etherne: scan phy mdio at address 29
[    0.948848] mdio_bus e000b000.etherne: scan phy mdio at address 30
[    0.953721] mdio_bus e000b000.etherne: scan phy mdio at address 31
[    0.958655] macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:01:22)
[    0.967222] macb e000b000.ethernet eth0: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
[    0.978192] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k

I updated only kernel to https://github.com/Xilinx/linux-xlnx/tree/xilinx-v2016.3.

It doesn't find phy chip as following.

[    0.755426] CAN device driver interface
[    0.758303] gpiod_set_value: invalid GPIO
[    0.761895] libphy: MACB_mii_bus: probed
[    0.764735] mdio_bus e000b000.etherne:01: mdio_device_register
[    0.769311] macb e000b000.ethernet eth0: no PHY found
[    0.842919] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k

Why kernel updating doesn't find ethernet phy?

 

The following is devicetree for ethernet

        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>;
            local-mac-address = [00 0a 35 00 00 00];
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x6750918>;
            phy-handle = <0x4>;

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

                phy@1 {
                    compatible = "realtek,RTL8211E";
                    device_type = "ethernet-phy";
                    reg = <0x1>;
                    linux,phandle = <0x4>;
                    phandle = <0x4>;
                };
            };
        };

 

 

 

0 Kudos
Reply
1 Solution

Accepted Solutions
hokim
Scholar
Scholar
16,990 Views
Registered: ‎10-21-2015

I found the solution for myself.

Devicetree for lastest kernel version should be like the following.

Now it works well.

        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>;
            local-mac-address = [00 0a 35 00 00 00];
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x6750918>;
            ethernet-phy@1 {
                compatible = "realtek,RTL8211E";
                device_type = "ethernet-phy";
                reg = <0x1>;
            };
        };

View solution in original post

0 Kudos
Reply
3 Replies
hokim
Scholar
Scholar
16,991 Views
Registered: ‎10-21-2015

I found the solution for myself.

Devicetree for lastest kernel version should be like the following.

Now it works well.

        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>;
            local-mac-address = [00 0a 35 00 00 00];
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x6750918>;
            ethernet-phy@1 {
                compatible = "realtek,RTL8211E";
                device_type = "ethernet-phy";
                reg = <0x1>;
            };
        };

View solution in original post

0 Kudos
Reply
luodicaizi84
Contributor
Contributor
11,518 Views
Registered: ‎10-17-2013

Dear sir :

  i have the same problem! 

 After changed devicetree for servel vertion ,it doesn't work yet ;

could you please send me the whole devicetree data ; 

i use xilinx linux 2016.3 kernel vertion 4.6.0 ;

my mail address is 000lidongsheng@163.com

0 Kudos
Reply
gsatish10
Explorer
Explorer
11,458 Views
Registered: ‎06-03-2015

Hi Hokim,

 

It is glad that you found the solution, to give the better understanding of the Issue

MAC controller is part of SoC, PHY is part of Kenrel templete and MII bus is Protocol.

MII(Media Independent Interface) is used to connect between the MAC controller and PHY Chip.

 

MAC controller Driver is Provided by SoC vendor and MII is part of Linux kernel and PHY Template (Base Driver) is part of Linux kernel.

So to interface between the MAC and PHY , MII or MDIO Bus will consider Board provided details nothing but Device Tree Details.

 

In this scenario, Device tree details are not provided in proper/excepted format so it is not identified the corrspending PHY device.

 

Thanks & Regards
Satish.G

G Satish Kumar
0 Kudos
Reply