Tool/software:
HI
We are using CPSW port on linux in our Custom AM64X board.
WE are unable to ping to the PC.
AM64x Custom Board IP : 192.168.1.10
PC ip : 192.168.1.100
The PHY DP83822 is connected to AM64x over RMII interface.
Below are the dmesg logs
[ 1.287904] davinci_mdio 8000f00.mdio: Configuring MDIO in manual mode
[ 1.321722] davinci_mdio 8000f00.mdio: davinci mdio revision 9.7, bus freq 1000000
[ 1.329227] TI DP83822 8000f00.mdio:00: dp83822_read_straps MII_DP83822_SOR1[0x467] VAL :[0x43f3]*********
[ 1.329245] TI DP83822 8000f00.mdio:00: dp83822_config_intr*********
[ 1.329889] davinci_mdio 8000f00.mdio: phy[0]: device 8000f00.mdio:00, driver TI DP83822
[ 1.330103] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.4
[ 1.335939] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:0
[ 1.353671] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 16
[ 1.373892] am65-cpts 39000000.cpts: CPTS ver 0x4e8a010c, freq:500000000, add_val:1 pps:0
[ 14.757272] am65-cpsw-nuss 8000000.ethernet eth0: PHY [8000f00.mdio:00] driver [TI DP83822] (irq=POLL)
[ 14.757303] am65-cpsw-nuss 8000000.ethernet eth0: configuring for phy/rmii link mode
[ 17.828388] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
We are able to read PHY DP83822 registers
Other informations are as below.
root@am64xx-evm:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::1e63:49ff:fe10:63d1 prefixlen 64 scopeid 0x20<link>
ether 1c:63:49:10:63:d1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38 bytes 4838 (4.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 95 bytes 7834 (7.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 95 bytes 7834 (7.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@am64xx-evm:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: gs
Wake-on: d
SecureOn password: 00:00:00:00:00:00
Current message level: 0x000020f7 (8439)
drv probe link ifdown ifup rx_err tx_err hw
Link detected: yes
Our Modified DEvice tree
&cpsw3g {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&rmii1_pins_default>;
/* Map HW8_TS_PUSH to GENF1 */
/*cpts@3d000 {
ti,pps = <7 1>;
};*/
};
&cpsw3g_mdio {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mdio1_pins_default>;
//reset-gpios = <&mcu_gpio0 4 GPIO_ACTIVE_LOW>; //commented by us
//reset-delay-us = <2>; //commented by us
cpsw3g_phy0: ethernet-phy@0 {
status = "okay";
compatible = "ti,dp83822", "ethernet-phy-ieee802.3-c22", "TI DP83822";
reg = <0>;
};
};
rmii1_pins_default: rmii1-pins-default {
pinctrl-single,pins = <
AM64X_IOPAD(0x0154, PIN_INPUT, 5) /* (V12) PRG1_PRU1_GPO19.RMII1_CRS_DV */
AM64X_IOPAD(0x0124, PIN_INPUT, 5) /* (V15) PRG1_PRU1_GPO7.RMII1_RXD0 */
AM64X_IOPAD(0x012c, PIN_INPUT, 5) /* (V14) PRG1_PRU1_GPO9.RMII1_RXD1 */
AM64X_IOPAD(0x00dc, PIN_INPUT, 5) /* (U15) PRG1_PRU0_GPO9.RMII1_RX_ER */
AM64X_IOPAD(0x0130, PIN_OUTPUT, 5) /* (W14) PRG1_PRU1_GPO10.RMII1_TXD0 */
AM64X_IOPAD(0x014c, PIN_OUTPUT, 5) /* (AA14) PRG1_PRU1_GPO17.RMII1_TXD1 */
AM64X_IOPAD(0x0150, PIN_OUTPUT, 5) /* (Y13) PRG1_PRU1_GPO18.RMII1_TX_EN */
AM64X_IOPAD(0x00e0, PIN_OUTPUT, 5) /* (U14) PRG1_PRU0_GPO10.RMII_REF_CLK */
>;
};
&cpsw_port1 {
status = "okay";
phy-mode = "rmii";
phy-handle = <&cpsw3g_phy0>;
};
Please help us in resolving the issue.