Other Parts Discussed in Thread: BEAGLEBOARD-X15, AM5728
Hi all,
we are facing issues while bringing up Ethernet on custom board am5708.
currently we are trying with fixed link.
Could anyone please let me know what is going wrong?
SDK version: PROCESSOR-SDK-LINUX-AM57X 06_03_00_106
Part number:KSZ9031RN
Gigabit Ethernet PHY0 Address | PHYAD[2:0]=0x00 | |
Gigabit Ethernet PHY1 Address | PHYAD[2:0]=0x01 |
we have enabled phy reset gpios for both the phys.
miii tool output in uboot-
=> mii dump 0 0
Error reading from the PHY addr=00 reg=00
phytool output as follows:
root@am57xx-evm:~# phytool print eth0/0
ieee-phy: id:00000000
ieee-phy: reg:BMCR(0x00) val:0x0140
flags: -reset -loopback -aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 1000-full
ieee-phy: reg:BMSR(0x01) val:0x012c
capabilities: -100-b4 -100-f -100-h -10-f -10-h -100-t2-f -100-t2-h
flags: +ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber -ext-register
ethtool output is as follow:
Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Half 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 1000baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
Settings for eth1:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 1000baseT/Half 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Half 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 1000baseT/Full
Link partner advertised pause frame use: No
Link partner advertised auto-negotiation: No
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes
Error logs from kernel:
root@am57xx-evm:~# dmesg | grep mdio
[ 2.844419] mdio_bus fixed-0: GPIO lookup for consumer reset
[ 2.844426] mdio_bus fixed-0: using lookup tables for GPIO lookup
[ 2.844434] mdio_bus fixed-0: No GPIO consumer reset found
[ 2.891805] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
[ 2.891812] mdio_bus 48485000.mdio: using device tree for GPIO lookup
[ 2.891830] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[ 2.891844] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[ 2.891853] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
[ 2.891860] mdio_bus 48485000.mdio: No GPIO consumer reset found
[ 2.951643] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 2.959337] libphy: 48485000.mdio: probed
[ 2.964472] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
[ 2.972292] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
[ 3.619854] mdio_bus 48485000.mdio: GPIO lookup for consumer reset
[ 3.619861] mdio_bus 48485000.mdio: using device tree for GPIO lookup
[ 3.619877] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[ 3.619891] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/ethernet@48484000/mdio@48485000[0]'
[ 3.619900] mdio_bus 48485000.mdio: using lookup tables for GPIO lookup
[ 3.619907] mdio_bus 48485000.mdio: No GPIO consumer reset found
[ 3.671634] davinci_mdio 48485000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 3.679330] libphy: 48485000.mdio: probed
[ 3.684256] mdio_bus 48485000.mdio: MDIO device at address 0 is missing.
[ 3.692086] mdio_bus 48485000.mdio: MDIO device at address 1 is missing.
root@am57xx-evm:~# dmesg | grep cpsw
[ 3.703621] cpsw 48484000.ethernet: Detected MACID = 38:81:d7:9f:e4:22
[ 3.710240] cpsw 48484000.ethernet: initialized cpsw ale version 1.4
[ 3.716683] cpsw 48484000.ethernet: ALE Table size 1024
[ 3.722019] cpsw 48484000.ethernet: cpts: overflow check period 500 (jiffies)
[ 3.730162] cpsw 48484000.ethernet: cpsw: Detected MACID = 38:81:d7:9f:e4:23
[ 11.115313] net eth0: initializing cpsw version 1.15 (0)
[ 11.755176] net eth1: initializing cpsw version 1.15 (0)
[ 12.481709] cpsw 48484000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 13.041705] cpsw 48484000.ethernet eth1: Link is Up - 1Gbps/Full - flow control off
root@am57xx-evm:~# dmesg | grep phy
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
[ 0.632716] dra7-pcie 51000000.pcie: Linked as a consumer to phy-4a094000.pciephy.0
[ 2.844458] libphy: Fixed MDIO Bus: probed
[ 2.959337] libphy: 48485000.mdio: probed
[ 3.679330] libphy: 48485000.mdio: probed
[ 11.278678] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)
[ 11.882061] Generic PHY fixed-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:01, irq=POLL)
[ 12.251104] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.280424] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.358453] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.398503] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.561585] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.622757] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.707469] phy_omap_usb2: disagrees about version of symbol module_layout
[ 12.746584] phy_omap_usb2: disagrees about version of symbol module_layout
we have modified am57xx-idk-common.dtsi.
AMX_ETH0_PHY_RST is gpio7_5
AMX_ETH1_PHY_RST is gpio7_6
we have made pin mux changes related to mdio,cpsw and gpio reset as follows:
&gpio7 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&gpio7_pins_default>;
};
&mac {
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_pins_default>;
pinctrl-1 = <&cpsw_pins_sleep>;
dual_emac;
//rx_descs = <64>;
};
&davinci_mdio{
status = "okay";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mdio_pins_default>;
pinctrl-1 = <&mdio_pins_sleep>;
};
&davinci_mdio {
phy0: ethernet-phy@0 {
reg = <0>;
//compatible = "micrel,ksz9031";
device_type = "ethernet-phy";
//max-speed = <1000>;
};
phy1: ethernet-phy@1 {
reg = <1>;
//compatible = "micrel,ksz9031";
device_type = "ethernet-phy";
//max-speed = <1000>;
};
};
&cpsw_emac0 {
status = "okay";
reset-gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
reset-delay-us = <2>;
phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii";
dual_emac_res_vlan = <1>;
pinctrl-names = "default";
pinctrl-0 = <&phy0_rst_gpios>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
&cpsw_emac1 {
status = "okay";
reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
reset-delay-us = <2>;
phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii";
dual_emac_res_vlan = <2>;
pinctrl-names = "default";
pinctrl-0 = <&phy1_rst_gpios>;
fixed-link {
speed = <1000>;
full-duplex;
};
};
this is the reset pin of processor