RMII in imx6sx for DP83849I

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

RMII in imx6sx for DP83849I

1,958 Views
chenmeng
Contributor II

DP83849I can not work.please help me check,thanks..

1.dts config

&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-supply = <&reg_enet_3v3>;
phy-mode = "gmii";
phy-handle = <&ethphy1>;
status = "okay";

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

ethphy1: ethernet-phy@0 {
reg = <0>;
};

ethphy2: ethernet-phy@1 {
reg = <1>;
};
};
};

pinctrl_enet1: enet1grp {
fsl,pins = <
MX6SX_PAD_ENET1_MDIO__ENET1_MDIO 0xa0b1
MX6SX_PAD_ENET1_MDC__ENET1_MDC 0xa0b1
MX6SX_PAD_RGMII1_TXC__ENET1_RGMII_TXC 0xa0b9
MX6SX_PAD_RGMII1_TD0__ENET1_TX_DATA_0 0xa0b1
MX6SX_PAD_RGMII1_TD1__ENET1_TX_DATA_1 0xa0b1
MX6SX_PAD_RGMII1_TD2__ENET1_TX_DATA_2 0xa0b1
MX6SX_PAD_RGMII1_TD3__ENET1_TX_DATA_3 0xa0b1
MX6SX_PAD_RGMII1_TX_CTL__ENET1_TX_EN 0xa0b1
MX6SX_PAD_RGMII1_RXC__ENET1_RX_CLK 0x3081
MX6SX_PAD_RGMII1_RD0__ENET1_RX_DATA_0 0x3081
MX6SX_PAD_RGMII1_RD1__ENET1_RX_DATA_1 0x3081
MX6SX_PAD_RGMII1_RD2__ENET1_RX_DATA_2 0x3081
MX6SX_PAD_RGMII1_RD3__ENET1_RX_DATA_3 0x3081
MX6SX_PAD_RGMII1_RX_CTL__ENET1_RX_EN 0x3081
MX6SX_PAD_MX6SX_PAD_ENET2_RX_CLK__ENET2_RX_CLK 0x91
>;
};

pinctrl_enet_3v3: enet3v3grp {
fsl,pins = <
MX6SX_PAD_ENET2_COL__GPIO2_IO_6 0x80000000
>;
};

pinctrl_enet2: enet2grp {
fsl,pins = <
MX6SX_PAD_RGMII2_TXC__ENET2_RGMII_TXC 0xa0b9
MX6SX_PAD_RGMII2_TD0__ENET2_TX_DATA_0 0xa0b1
MX6SX_PAD_RGMII2_TD1__ENET2_TX_DATA_1 0xa0b1
MX6SX_PAD_RGMII2_TD2__ENET2_TX_DATA_2 0xa0b1
MX6SX_PAD_RGMII2_TD3__ENET2_TX_DATA_3 0xa0b1
MX6SX_PAD_RGMII2_TX_CTL__ENET2_TX_EN 0xa0b1
MX6SX_PAD_RGMII2_RXC__ENET2_RX_CLK 0x3081
MX6SX_PAD_RGMII2_RD0__ENET2_RX_DATA_0 0x3081
MX6SX_PAD_RGMII2_RD1__ENET2_RX_DATA_1 0x3081
MX6SX_PAD_RGMII2_RD2__ENET2_RX_DATA_2 0x3081
MX6SX_PAD_RGMII2_RD3__ENET2_RX_DATA_3 0x3081
MX6SX_PAD_RGMII2_RX_CTL__ENET2_RX_EN 0x3081
>;
};

2.enable driver/net/phy/dp83849.c

1.png

2.png

fec 2188000.ethernet eth0: Freescale FEC PHY driver [TI DP83849I 10/100 Mbps PHY] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
init: Starting service 'dhcpcd_eth0'...
nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
fec 2188000.ethernet eth0: Link is Down
fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off

0 Kudos
3 Replies

1,118 Views
igorpadykov
NXP Employee
NXP Employee

Hi chen

please check IOMUXC_GPR_GPR1 register, ENET1_CLK_SEL, ENET1_TX_CLK_DIR settings
for external reference clock usage, defined in mach-imx6sx.c (function imx6sx_enet_clk_sel()).
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/mach-imx/mach-imx6sx.c?id=...
Also using enet1, for pinctrl_enet1: enet1grp seems MX6SX_PAD_MX6SX_PAD_ENET2_RX_CLK__ENET1_RX_CLK
should be used.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,118 Views
chenmeng
Contributor II

thanks,the dp83849i have work.

0 Kudos

1,118 Views
rasmusrahunen
Senior Contributor I

Hi Chen,

I have been facing similar problems with the DP83849 ethernet chip, but with i.MX 7Dual processor. I've created another ticket about these problems: Ethernet problem with i.MX 7Dual and DP83849IVS PHY 

You seem to have a Linux driver for the chip (driver/net/phy/dp83849.c). Could you please share that driver, since I haven't found that from anywhere? I only have found the common driver for DP83848 and DP83849 (https://github.com/opennetworklinux/linux-3.8.13/blob/master/drivers/net/phy/dp8384x.c)

Also I would be interested in knowing what was the fix that corrected the problem in your case? Was it the pinmux or the ENET1_CLK_SEL, ENET1_TX_CLK_DIR settings?

Best regards,

Rasmus

0 Kudos