Part Number: AM3358
Hi,
The customer connect one 100M (DP83848 (eth0)) network port and one 1000M (DP83867 (eth1)) network port by CPSW. The 100M network port can work normally. The 1000M port can be linked up, but cannot ping successfully. The device tree configuration as follows:
&mac {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
dual_emac = <1>;
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
dp83867_0: ethernet-phy@3 {
reg = <3>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,min-output-impedance;
ti,dp83867-rxctrl-strap-quirk;
};
dp83848_0: ethernet-phy@7 {
reg = <7>;
};
};
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <7>;
dual_emac_res_vlan = <1>;
phy-mode = "rmii";
};
&cpsw_emac1 {
phy_id = <&davinci_mdio>, <3>;
dual_emac_res_vlan = <2>;
phy-mode = "rgmii-id";
};
内核log如下
Configuring network interfaces...
[ 10.518385] net eth0: initializing cpsw version 1.12 (0)
[ 10.687456] NS DP83848C 10/100 Mbps PHY 4a101000.mdio:07: attached PHY driver [NS DP83848C 10/100 Mbps PHY] (mii_bus:phy_addr=4a101000.mdio:07, irq=POLL)
[ 10.701969] PHY_INTERFACE_MODE_RMII
[ 10.705494] gmii_sel:reg=0xe9
[ 10.718883] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 10.724805] 8021q: adding VLAN 0 to HW filter on device eth0
[ 10.773229] net eth1: initializing cpsw version 1.12 (0)
[ 10.789765] TI DP83867 4a101000.mdio:03: attached PHY driver [TI DP83867] (mii_bus:phy_addr=4a101000.mdio:03, irq=POLL)
[ 10.801731] AM33XX_GMII_SEL_MODE_RGMII
[ 10.805508] gmii_sel:reg=0xe9
[ 10.813426] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 10.819411] 8021q: adding VLAN 0 to HW filter on device eth1
[ 12.888081] _cpsw_adjust_link:mac_control=0x20
[ 12.892601] cpsw 4a100000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[ 12.901400] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
The gmii_sel is set to 0xe9 according to the data manual register, 1000M network port will be normal when inserted and removed.