IMX6Q Linux 4.14.78 can't get ip address by udhcpc

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

IMX6Q Linux 4.14.78 can't get ip address by udhcpc

1,736 Views
wtt
Contributor I

Hello everyone,

I am porting the linux 4.14.78 linux kernel to our imx6q board. 

The problem is thernet can't get ip by udhcpc, and if i set a static ip to eth0, the network can't send and recevie data checked by ping command.

Previously, the same board has work fine with Linux 4.1.15 linux kernel.

The pin mux is same in the two dts files (4.1.15 version and 4.14.78version)

below is the dmesg information in 4.14.78 system for your reference.

The dts contents as below.

pinctrl_enet: enetgrp {
fsl,pins = <
MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0
MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0
MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0
MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0
MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0
MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0
MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0
MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0
MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x0000a0b1
MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0
MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0
MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0
MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0
MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0
MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0
MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x4001b0a8
/* MX6QDL_PAD_ENET_TX_EN__GPIO1_IO28 0x00020000 */
>;
};

&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-reset-gpios = <&gpio1 25 0>;
fsl,magic-packet;
status = "okay";
};

1> root@imx6qsabresd:~# dmesg | grep eth0
[ 1.740873] fec 2188000.ethernet eth0: registered PHC device 0
[ 10.238538] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 13.365172] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 13.371577] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

2> and ifconfig command gets below information.

root@imx6qsabresd:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 46:94:d6:a2:76:06
UP BROADCAST RUNNING MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:34702 dropped:0 overruns:0 frame:34702
TX packets:289 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:123096 (120.2 KiB)

3> dmesg gets below message

3.1 >root@imx6qsabresd:~# dmesg | grep fec
[ 1.709199] fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
[ 1.737465] libphy: fec_enet_mii_bus: probed
[ 1.740873] fec 2188000.ethernet eth0: registered PHC device 0
[ 5.511500] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 13.365172] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

3.2 > ethernet 2188000.ethernet-1:01 (I found the phy_id is 1 and not 0, maybe there is some problem?)
root@imx6qsabresd:~# dmesg | grep ethernet
[ 1.709199] fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
[ 1.740873] fec 2188000.ethernet eth0: registered PHC device 0
[ 10.093439] mark-3 drivers/net/ethernet/freescale/fec_main.c |fec_enet_open |3058
[ 10.225876] Atheros 8031 ethernet 2188000.ethernet-1:01: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=2188000.ethernet-1:01, irq=POLL)
[ 13.365172] fec 2188000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

4> but udhcdc can't get validate ip as below.

root@imx6qsabresd:~# udhcpc -i eth0
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending discover

....
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

Please give me some advise to resolve this problem.

Thanks in advance!

Taotao Wang

0 Kudos
3 Replies

1,543 Views
lindensong
Contributor I

@wtt  

Hi Taotao Wang, I  have the same problem as you, but my IMX6QSDBRESD BOARD still can not get ip through DHCP when it connected with a router. 

Hi Jimmychan,  Could  you please tell me how to configure  IMX6QSDBRESD BOARD to get ip through DHCP when it connected with a router ? 

Thanks a lot!

0 Kudos

1,559 Views
jimmychan
NXP TechSupport
NXP TechSupport

I don't see any problem on your setting.

Maybe try to change the PAD setting of MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK to 0x1b0b0.

0 Kudos

1,559 Views
wtt
Contributor I

Hi Jimmychan,

Thanks for your support. 

I found that the ethernet can work when it connected with a router.

But if the board connected with PC directly, the ping command will be failed.

Would you please give me some advise for this problem?

0 Kudos