I am working on a custom carrier board for Apalis iMX8QP SOM. The Yocto build output with full multimedia reference image is working fine with the HDMI, two USB 2.0 for keyboard & mouse, and ETH0 GBe port. The board has another ethernet port connected to RMII bus of the ETH1 port using an external phy chip LAN8720A from Microchip. The chip is configured for generating its own 50MHz REFCLK and feed it back to the SOM at pin IMX8QM_ENET1_RGMII_TXC_CONN_ENET1_RGMII_TXC. But this is not working.
I am seeing an error in the dmesg output saying “mdio_bus 5b050000.ethernet-1: MDIO device at address 0 is missing.” and then followed by “fec 5b050000.ethernet end1: Unable to connect to phy”.
I am posting the contents of the fec2 blob from the device tree files here. I am curious to know what is wrong here:
imx8-apalis-v1.1.dtsi:
&fec2 {
pinctrl-names = “default”, “sleep”;
pinctrl-0 = <&pinctrl_fec2>;
pinctrl-1 = <&pinctrl_fec2_sleep>;
fsl,mdio-enable;
fsl,magic-packet;
// fsl,mii-exclusive;
fsl,use-independent-clock;
phy-mode = “rmii”; // LAN8720A uses RMII mode
phy-handle = <ðphy1>;
status = “okay”;
/* assigned-clocks = <&clk IMX8QM_ENET1_RGMII_TXC_CONN_ENET1_RGMII_TXC>;
assigned-clock-parents = <&clk IMX8QM_ENET1_REF_50M>;
assigned-clock-rates = <50000000>;
*/
mdio {
compatible = "fsl,fec-mdio";
#address-cells = <1>;
#size-cells = <0>;
ethphy1: ethernet-phy@0 { // Address at pin PHYAD0 is 0 (GND)
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
// clocks = <&clk IMX8QM_ENET_PLL_50M>; /* PHY gets 50 MHz from its own crystal */
clock-output-names = “rmii-ref”;
reset-gpios = <&lsio_gpio4 24 GPIO_ACTIVE_LOW>;
reset-names = “phy2-reset”;
reset-assert-us = <10000>;
reset-deassert-us = <50000>;
};
};
};
imx8-ss-conn.dtsi (under conn_subsys: bus@5b000000 section):
fec2: ethernet@5b050000 {
compatible = “fsl,imx8qm-fec”, “fsl,imx6q-fec”;
reg = <0x5b050000 0x10000>;
interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&enet1_lpcg 4>,
<&enet1_lpcg 2>,
<&enet1_lpcg 3>,
<&enet1_lpcg 0>,
<&enet1_lpcg 1>;
clock-names = “ipg”, “ahb”, “enet_clk_ref”, “ptp”, “enet_2x_txclk”;
/* assigned-clocks = <&clk IMX_SC_R_ENET_1 IMX_SC_PM_CLK_PER>,
<&clk IMX_SC_R_ENET_1 IMX_SC_C_CLKDIV>;
assigned-clock-rates = <250000000>, <125000000>;/
/ assigned-clocks = <&clk IMX8QM_ENET1_ROOT_CLK IMX_SC_C_CLKDIV>;
assigned-clock-rates = <50000000>;*/
fsl,num-tx-queues = <3>;
fsl,num-rx-queues = <3>;
power-domains = <&pd IMX_SC_R_ENET_1>;
status = “okay”;
};
Here is the output of my tdx-info command:
Software summary
Bootloader: U-Boot
Kernel version: 6.6.54-7.2.0-devel-g91c19e78f9da-dirty #1 SMP PREEMPT Fri Jan 31 15:24:42 UTC 2025
Kernel command line: root=PARTUUID=d1d30004-02 ro rootwait console=tty1 console=ttyLP1,115200
Distro name: NAME=“TDX Wayland with XWayland”
Distro version: VERSION_ID=7.2.0-devel-20250218083915-build.0
Distro variant: -
Hostname: apalis-imx8-07006145
Hardware info
HW model: Toradex Apalis iMX8QP V1.1 on Apalis Evaluation Board
Toradex version: 0049 V1.1C
Serial number: 07006145
Processor arch: aarch64
Thanks and Regards
Vasudeo