HI, team:
Below is my hardware design, My lsdk version is lsdk 2108
My dts is as below:
&pfe {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
pfe_mac0: ethernet@0 {
compatible = "fsl,pfe-gemac-port";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0>; /* GEM_ID */
fsl,gemac-bus-id = <0x0>; /* BUS_ID */
/*fsl,gemac-phy-id = <0x2>; PHY_ID */
fixed-link = <0 1 1000 0 0>;
fsl,mdio-mux-val = <0x0>;
local-mac-address = [ 00 1A 2B 3C 4D 5E ];
phy-mode = "sgmii";
fsl,pfe-gemac-if-name = "eth0";
fsl,pfe-phy-if-flags = <0x0>;
fsl,pfe-gemac-mode = <0x1B00>; /* GEMAC_SW_CONF | GEMAC_SW_FULL_DUPLEX | GEMAC_SW_SPEED_1G */
mdio@0 {
reg = <0x1>; /* enabled/disabled */
fsl,mdio-phy-mask = <0xFFFFFFF9>;
};
};
pfe_mac1: ethernet@1 {
compatible = "fsl,pfe-gemac-port";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x1>; /* GEM_ID */
fsl,gemac-bus-id = < 0x1 >;
fsl,gemac-phy-id = < 0x1 >;
fsl,mdio-mux-val = <0x0>;
local-mac-address = [ 00 AA BB CC DD EE ];
phy-mode = "rgmii-id";
fsl,pfe-gemac-if-name = "eth1";
fsl,pfe-gemac-mode = <0x1B00>;
mdio@0 {
reg = <0x0>; /* enabled/disabled */
fsl,mdio-phy-mask = <0xFFFFFFF9>;
};
};
};
After enter command: can't ping 192.168.0.1 successfully. Could you help to check and give suggestions?
/ # ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1A:2B:3C:4D:5E
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
eth1 Link encap:Ethernet HWaddr 00:AA:BB:CC:DD:EE
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
LOOPBACK MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/ # ifconfig eth1 192.168.0.241 up
[ 24.200539] pfe 4000000.pfe eth1: pfe_eth_open
[ 24.205295] hif_process_client_req: register client_id 1
[ 24.210628] pfe_hif_client_register
[ 24.214147] pfe 4000000.pfe eth1: pfe_gemac_init
/ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
[ 61.577760] random: crng init done
Solved! Go to Solution.
Dear Chavira:
Thanks, based on your suggestions, I made below modifications and finally can ping gateway success.
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 746cdfd06578..c0d27537cd54 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -749,6 +749,7 @@ module_phy_driver(realtek_drvs);
static const struct mdio_device_id __maybe_unused realtek_tbl[] = {
{ PHY_ID_MATCH_VENDOR(0x001cc800) },
+ { PHY_ID_MATCH_VENDOR(0x001cc916) },
{ }
};
before booting into linux, execute command "pfe stop" in uboot.
ifconfig eth1 192.168.0.110 up
ping 192.168.0.1
/ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=0.371 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=0.343 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=0.290 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=0.304 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=0.325 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=0.304 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=0.311 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=0.324 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=0.308 ms
Dear Chavira:
Thanks, based on your suggestions, I made below modifications and finally can ping gateway success.
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 746cdfd06578..c0d27537cd54 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -749,6 +749,7 @@ module_phy_driver(realtek_drvs);
static const struct mdio_device_id __maybe_unused realtek_tbl[] = {
{ PHY_ID_MATCH_VENDOR(0x001cc800) },
+ { PHY_ID_MATCH_VENDOR(0x001cc916) },
{ }
};
before booting into linux, execute command "pfe stop" in uboot.
ifconfig eth1 192.168.0.110 up
ping 192.168.0.1
/ # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=0.371 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=0.343 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=0.290 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=0.304 ms
64 bytes from 192.168.0.1: seq=4 ttl=64 time=0.325 ms
64 bytes from 192.168.0.1: seq=5 ttl=64 time=0.304 ms
64 bytes from 192.168.0.1: seq=6 ttl=64 time=0.311 ms
64 bytes from 192.168.0.1: seq=7 ttl=64 time=0.324 ms
64 bytes from 192.168.0.1: seq=8 ttl=64 time=0.308 ms
Thank you for contacting NXP support!
I attached a Log of ethernet configuration on Tiny Distro.
the commands are:
ifconfig: you can see the ethernet ports available on the system
ifconfig -a: you can see the ethernet ports of your system
ip link set dev <dev name> up/down : you can set up a device
udhcpc -i <dev name>: you can automatically set up the ip of your network.
the steps that I follow are:
1- Identify the port that you want to use
2- discover the name of your port using the command "ifconfig -a"
3- set up the device with the command "ip link set dev <dev name> up"
4- confirm if the device is ready to set up with "ifconfig"
5- set up the network with the command "udhcpc -i <dev name>" to obtain automatically the IP
5a- If you can set up the IP you can do it with the command "ifconfig <dev> <ip>" for example ifconfig fm1-mac1 10.10.10.10