i.MX8MM RMII Switch Ethernet issues

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MM RMII Switch Ethernet issues

478 Views
koejul
Contributor II

I'm trying to get an i.MX8MM on a Variscite VAR-SOM-MX8M-MINI to communicate with an ethernet switch, specifically the Microchip/Micrel KSZ8463FRLI via RMII.

When probing the "ENET_TD2_ENET1_TX_CLK" pad, the 50MHz sine wave clock is measured.

Also, I can take the switch "up" and "down" via "ifconfig eth0 up/down". This is clearly visible as the led indicator on the connected ethernet port gets dis/enabled. Also I get this message in my debug windows:

[ 55.506158][ T389] Generic PHY 30be0000.ethernet-1:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=30be0000.ethernet-1:01, irq=POLL)

 My device tree looks like following:

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
phy-reset-gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>;
phy-reset-on-resume;
status = "okay";

assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_266M>,
<&clk IMX8MM_SYS_PLL2_100M>,
<&clk IMX8MM_SYS_PLL2_50M>,
<&clk IMX8MM_SYS_PLL2_50M>;

assigned-clock-rates = <0>, <100000000>, <50000000>, <50000000>;

mdio {
#address-cells = <1>;
#size-cells = <0>;

ethphy0: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
at803x,led-act-blind-workaround;
at803x,eee-disabled;
at803x,vddio-1p8v;
};
};
};

&iomuxc {
pinctrl_fec1: fec1grp {
fsl,pins = <
MX8MM_IOMUXC_ENET_MDC_ENET1_MDC 0x3
MX8MM_IOMUXC_ENET_MDIO_ENET1_MDIO 0x23
MX8MM_IOMUXC_ENET_TD2_ENET1_TX_CLK 0x4000001f
MX8MM_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x56
MX8MM_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x56
MX8MM_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x56
MX8MM_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x56
MX8MM_IOMUXC_ENET_RXC_ENET1_RX_ER 0x56
MX8MM_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x56
MX8MM_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x56
>;
};
}

When assigning an IP to eth0 (eg 192.168.10.1) and trying to ping this address, the ping works and outputs something in the sub ms range.
When a PC is connected to one ethernet port of the switch and I am trying to ping this IP (eg 192.168.10.3), the ping fails and outputs "connect: Network is unreachable".

No traffic is visible on the RD, TD or RX/TX-CTL Pins.

The OS used is android 11 with kernel 5.10.72.

Labels (1)
0 Kudos
Reply
1 Reply

469 Views
Sanket_Parekh
NXP TechSupport
NXP TechSupport

Hi @koejul 

I hope you are doing well.

It seems your ethernet switch is act like an ethernet phy.

Please refer the link to configure ethernet switch.

Thanks & Regards

Sanket Parekh

0 Kudos
Reply