Hi everyone,
We designed a custom board based on i.MX6solo with a phy MICREL KSZ9021 connected on ENET with RGMII.
U-boot discovers the phy at address 7 (which is the correct address), but linux can't discover it.
In attachments below, see the log file of u-boot and linux.
Here is the device tree code we are using :
pinctrl_enet: enetgrp { fsl,pins = < MX6QDL_PAD_KEY_COL1__ENET_MDIO 0x1b0b0 MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b0 MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0 MX6QDL_PAD_RGMII_RD0__RGMII_RD0 0x1b0b0 MX6QDL_PAD_RGMII_RD1__RGMII_RD1 0x1b0b0 MX6QDL_PAD_RGMII_RD2__RGMII_RD2 0x1b0b0 MX6QDL_PAD_RGMII_RD3__RGMII_RD3 0x1b0b0 MX6QDL_PAD_RGMII_RX_CTL__RGMII_RX_CTL 0x1b0b0 MX6QDL_PAD_RGMII_RXC__RGMII_RXC 0x1b0b0 MX6QDL_PAD_RGMII_TD0__RGMII_TD0 0x1b0b0 MX6QDL_PAD_RGMII_TD1__RGMII_TD1 0x1b0b0 MX6QDL_PAD_RGMII_TD2__RGMII_TD2 0x1b0b0 MX6QDL_PAD_RGMII_TD3__RGMII_TD3 0x1b0b0 MX6QDL_PAD_RGMII_TX_CTL__RGMII_TX_CTL 0x1b0b0 MX6QDL_PAD_RGMII_TXC__RGMII_TXC 0x1b0b0 MX6QDL_PAD_SD2_CLK__GPIO1_IO10 0x1b0b0 //Phy Reset MX6QDL_PAD_GPIO_0__GPIO1_IO00 0x1b0b0 //Phy Int >; }; @ &fec { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet>; phy-mode = "rgmii"; phy-reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; status = "okay"; };
Any idea where does the problem provide ?
Thanks a lot.
Regards,
Original Attachment has been moved to: linux-no-discover-phy.txt.zip
Original Attachment has been moved to: u-boot-phy-7.txt.zip
Solved! Go to Solution.
you can stop in mdiobus_scan function, then connect jtag
and check signals on phy with oscilloscope.
~igor
suffer a same symptom with message "2188000.ethernet supply phy not found, using dummy regulator" prompt.
Hi jbd64
one can look at KSZ9021 initialization on sabrelite board
linux-imx6/mach-imx6q.c at boundary-imx_3.14.28_1.0.0_ga · boundarydevices/linux-imx6 · GitHub
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igorpadykov
Thanks for your reply !
I added printk in imx6q_enet_phy_init and ksz9021rn_phy_fixup functions.
printk of the imx6q_enet_phy_init function is executed but ksz9021rn_phy_fixup is not.
As you can see in linux-no-discover-phy.txt, mdiobus_scan tries to discover phy connected to the CPU, but it can't find anyone. If it discovered KSZ9021, ksz9021rn_phy_fixup
sould have been printed after mdiobus_scan addr=7 print.
I don't understand why KSZ9021 is not discovered by mdiobus_scan function.
Any idea ?
you can stop in mdiobus_scan function, then connect jtag
and check signals on phy with oscilloscope.
~igor
Thanks for your reactivity !
I added printk in get_phy_device function (phy_device.c), just after get_phy_id call and... it works ! :/
With printk call, it adds a certain delay... It may be a timing problem... that's the only explanation I have.
Not the easiest problem to solve ! :/
Thanks a lot !