AnsweredAssumed Answered

Imx8qxp u-boot rmii not working

Question asked by MD Mosaddek Hossain on Apr 21, 2020
Latest reply on Jun 25, 2020 by MD Mosaddek Hossain

U-boot info:

https://source.codeaurora.org/external/imx/uboot-imx.git/

branch -> imx_v2019.04_4.19.35_1.1.0

I am working on a custom board from Imx8qxp. Currently I am facing problem to setup rmii phy of micrel ksz8081rnb. Previously we used mii phy of micrel ksz8081mnx, and we came across the imx8qxp reference manual that it can support from 50MHZ. Thus we changed the phy for rmii. 

 

Ref_clk generates 50 Mhz and set as an input clk SC_P_ENET0_RGMII_TXC_CONN_ENET0_RCLK50M_IN.

Device tree:- 

pinctrl_fec1: fec1grp {
fsl,pins = <
SC_P_ENET0_MDC_CONN_ENET0_MDC 0x06000020
SC_P_ENET0_MDIO_CONN_ENET0_MDIO 0x06000020
SC_P_ENET0_RGMII_TX_CTL_CONN_ENET0_RGMII_TX_CTL 0x00000041
SC_P_ENET0_RGMII_TXC_CONN_ENET0_RCLK50M_IN 0x00000061

// SC_P_ENET0_RGMII_TXC_CONN_ENET0_RCLK50M_OUT 0x00000061
SC_P_ENET0_RGMII_TXD0_CONN_ENET0_RGMII_TXD0 0x00000061
SC_P_ENET0_RGMII_TXD1_CONN_ENET0_RGMII_TXD1 0x00000061
SC_P_ENET0_RGMII_RX_CTL_CONN_ENET0_RGMII_RX_CTL 0x00000061 
SC_P_ENET0_RGMII_RXD0_CONN_ENET0_RGMII_RXD0 0x00000061 
SC_P_ENET0_RGMII_RXD1_CONN_ENET0_RGMII_RXD1 0x00000061 
SC_P_ENET0_RGMII_RXD2_CONN_ENET0_RMII_RX_ER 0x00000061
SC_P_ENET0_REFCLK_125M_25M_LSIO_GPIO5_IO09 0x00000021
>;
};

 

We are using fec1 [enet0] with 50MHz clk.

 

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fec1>;
phy-mode = "rmii";
phy-handle = <&ethphy0>;
fsl,magic-packet;

clocks = <&clk IMX8QXP_ENET0_IPG_CLK>,
<&clk IMX8QXP_ENET0_AHB_CLK>,
<&clk IMX8QXP_ENET0_RMII_RX_CLK>,
<&clk IMX8QXP_ENET0_PTP_CLK>,
<&clk IMX8QXP_ENET0_TX_CLK>;

assigned-clocks = <&clk IMX8QXP_ENET0_PTP_CLK>,
<&clk IMX8QXP_ENET0_REF_DIV>;
assigned-clock-rates = <50000000>, <50000000>; /*clk changed*/

status = "okay";

phy-reset-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
phy-reset-duration = <10>;
phy-reset-post-delay = <150>;

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

ethphy0: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
max-speed =<100>;
reg = <1>;
};
};

};

 

U-boot log:-

clk shows that it has been configured correcly

 

Mii dump shows all the configuration correct

 

I have integrated pcap in the u-boot as it was not supported in the u-boot that i am using. To see the packages. Zero packages are sent or received 

 

Oscilloscope:

I check via oscilloscope the txd0 and txd1 there is no signal. The rxd0,rxd1 have signals.


My Observation:

Note: Is it a hardware issue ? Or is the device tree configuration is not correct?

 

It will be really helpful if anyone finds a solution or and vital suggestion. 

Outcomes