Unable to get ethernet working on kernel

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to get ethernet working on kernel

Jump to solution
1,591 Views
jemish_1990
Contributor IV

Hi All,

We have customized board based on iMX6Q. In which we are using Marvell switch mv88e6176. In this switch port0 is connected with external ethernet, port 6 is connected with FEC controller of IMX6Q processor, port5 is connected with MAC of other board.

We got ethernet working on u-boot level and tftp is also working. But at kernel level we got below error while booting. "IP-Config: Failed to open eth0" and  "IP-Config: No network devices available".

Initially it was failing because no PHY device. Then we make few changes related to fix phy our kernel. Now we are stuck at this stage. Any help or suggestion related to this issue will appreciated.

Thanks,

Jemish

Labels (2)
Tags (2)
0 Kudos
Reply
1 Solution
1,240 Views
bpe
NXP Employee
NXP Employee

Based on the attached boot log, the kernel does not see a valid Ethernet to configure. Besides that, I see some output in the kernel

log that suggests that you modified the driver. In general, adding a fixed-link property to the controller device tree node should

be sufficient to bypass the PHY initialization and setup the controller parameters properly without reading the PHY.

Suggestions:

1. Revert to the original BSP kernel.

2. Make sure the device tree correctly reflects the MAC/PHY interface type.

3. Use a sufficiently compact root filesystem image to TFTP it with subsequent ramboot to allow the system to complete booting.

4. Use ifconfig and ethtool to check the status of the interface

5. Use a debugger to verify that the following piece of code in fec_main.c is reached and  of_phy_register_fixed_link() is invoked.


if (!phy_node && of_phy_is_fixed_link(np)) {

    ret = of_phy_register_fixed_link(np);

        if (ret < 0) {

            dev_err(&pdev->dev,

                "broken fixed-link specification\n");

            goto failed_phy;

        }

        phy_node = of_node_get(np);

    }


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
4 Replies
1,240 Views
bpe
NXP Employee
NXP Employee

Please share the following materials:

1. Full system boot log.

2. Your Device Tree source.

3. Output of `ifconfig -a'

Platon

0 Kudos
Reply
1,240 Views
jemish_1990
Contributor IV

Hi Platon

Thanks for your prompt response!

Please find attached all the files as required.

I have upload full dts source code in which we are using "imx6q-lu600board.dtb"

For this .dtb file relevant files are as below:

  • imx6q-lu600board.dtb
  • imx6q-lu600board.dts
  • imx6qdl-lu600board.dtsi
  • imx6q.dtsi
  • imx6qdl-lu600board.dtsi
  • imx6qdl.dtsi
  • imx6q-pinfunc.h

Note: I am not able to boot board till the filesystem prompt so Output of "ifconfig -a" is not possible.

Let me know if anything is required.

Thanks,

Jemish !

0 Kudos
Reply
1,241 Views
bpe
NXP Employee
NXP Employee

Based on the attached boot log, the kernel does not see a valid Ethernet to configure. Besides that, I see some output in the kernel

log that suggests that you modified the driver. In general, adding a fixed-link property to the controller device tree node should

be sufficient to bypass the PHY initialization and setup the controller parameters properly without reading the PHY.

Suggestions:

1. Revert to the original BSP kernel.

2. Make sure the device tree correctly reflects the MAC/PHY interface type.

3. Use a sufficiently compact root filesystem image to TFTP it with subsequent ramboot to allow the system to complete booting.

4. Use ifconfig and ethtool to check the status of the interface

5. Use a debugger to verify that the following piece of code in fec_main.c is reached and  of_phy_register_fixed_link() is invoked.


if (!phy_node && of_phy_is_fixed_link(np)) {

    ret = of_phy_register_fixed_link(np);

        if (ret < 0) {

            dev_err(&pdev->dev,

                "broken fixed-link specification\n");

            goto failed_phy;

        }

        phy_node = of_node_get(np);

    }


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply
1,240 Views
jemish_1990
Contributor IV

Hi Platon,

Thanks a lot for your value able suggestions. After going to through few links and applying below patch for fixed-link I am able to get it working now.

We can close this this discussion.

[RFC PATCHv2 2/4] net: phy: extend fixed driver with fixed_phy_register()

Thanks,

Jemish 

0 Kudos
Reply