Hello,
I have a custom PCB that has an AM3552 microprocessor and I'm having some trouble trying to make my ethernet bus work properly. I'm using an external PHY, which is identified when I bring the interface up, but so far I wasn't able to ping an outside IP (localhost works just fine).
The board uses the pins reserved for rgmii1 to other purposes, leaving rgmii2 to serve as the ethernet interface. Our PHY transceiver is the KSZ9021RL from Micrel.
First I configured the mux in the configuration file and it looks like this:
/* Module pin mux for rgmii2 */
static struct pinmux_config rgmii2_pin_mux[] = {
{"mdio_clk.mdio_clk", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT_PULLUP},
{"mdio_data.mdio_data", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},
{"gpmc_a0.rgmii2_tctl", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a1.rgmii2_rctl", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a6.rgmii2_tclk", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a7.rgmii2_rclk", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a2.rgmii2_td3", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a3.rgmii2_td2", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a4.rgmii2_td1", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a5.rgmii2_td0", OMAP_MUX_MODE2 | AM33XX_PIN_OUTPUT},
{"gpmc_a8.rgmii2_rd3", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a9.rgmii2_rd2", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a10.rgmii2_rd1", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{"gpmc_a11.rgmii2_rd0", OMAP_MUX_MODE2 | AM33XX_PIN_INPUT_PULLDOWN},
{NULL, 0},
};
and when I set it up I also call
am33xx_cpsw_init(AM33XX_CPSW_MODE_RGMII, NULL, "0:01");
to configure it to RGMII.
On the console, I can bring the interface up and list it with ethtool:
root@UCC3:~# ifconfig eth1 up
[ 58.139617] net eth1: CPSW phy found : id is : 0x221611
[ 60.138305] PHY: 0:01 - Link is Up - 100/Full
root@UCC3:~# ifconfig eth1 192.168.100.15
root@UCC3:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr BC:6A:29:96:AC:ED
inet addr:192.168.100.15 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING 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)
root@UCC3:~# ethtool eth1
Settings for eth1:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Current message level: 0x00000000 (0)
Link detected: yes
But I still can't ping anything. When I do the same thing on the console of our Beaglebone the ping command works as expected.
I read a lot of topics in the forum, but so far none of them was of much use in my case. In any case, we boot the board via NAND and will not use the ETH for it.
I'm trying to check if there is some specific configuration for this particular PHY in the Kernel that would need to be adjusted. Anything regarding this topic would be of much help!
So, that is pretty much all the information I think is relevant. Thank you for the patience to read all this!