i.MX6UL using ENET1 and ENET2 simultaneously

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

i.MX6UL using ENET1 and ENET2 simultaneously

1,333 Views
TerryMcHenry
Contributor II

Our design uses both ENET1 and ENET2, with ENET1 connected to a PHY within a SOC and ENET2 connected to a PHY for Ethernet, both are connected via RMII and have the MDIO bus shared. We are struggling to get both to work. There are two PHYs on the eval board but the code mux’s the signals depending on which FEC you are using. It seems to suggest that you cannot use both ENET ports at the same time and this is what the software team are telling me. Is this correct?  Can the pin conflict (MDIO and MDC) be resoved if both ENET1 and ENET2 can be used simultaneously?

I would have thought both could be used at the same time with ENET1 MDIO or ENET2 MDIO being able to communicate to both PHYs.

Code from eval

+#ifdef CONFIG_FEC_MXC

+/*

+ * pin conflicts for fec1 and fec2, GPIO1_IO06 and GPIO1_IO07 can only

+ * be used for ENET1 or ENET2, cannot be used for both.

+ */

+static iomux_v3_cfg_t const fec1_pads[] = {

+ MX6_PAD_GPIO1_IO06__ENET1_MDIO | MUX_PAD_CTRL(MDIO_PAD_CTRL),

+       MX6_PAD_GPIO1_IO07__ENET1_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_TX_DATA0__ENET1_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_TX_DATA1__ENET1_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_TX_EN__ENET1_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),

+ MX6_PAD_ENET1_RX_DATA0__ENET1_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_RX_DATA1__ENET1_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+       MX6_PAD_ENET1_RX_ER__ENET1_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET1_RX_EN__ENET1_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),

+};

+

+static iomux_v3_cfg_t const fec2_pads[] = {

+ MX6_PAD_GPIO1_IO06__ENET2_MDIO | MUX_PAD_CTRL(MDIO_PAD_CTRL),

+ MX6_PAD_GPIO1_IO07__ENET2_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),

+

+ MX6_PAD_ENET2_TX_DATA0__ENET2_TDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET2_TX_DATA1__ENET2_TDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+       MX6_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),

+ MX6_PAD_ENET2_TX_EN__ENET2_TX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),

+

+ MX6_PAD_ENET2_RX_DATA0__ENET2_RDATA00 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+       MX6_PAD_ENET2_RX_DATA1__ENET2_RDATA01 | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET2_RX_EN__ENET2_RX_EN | MUX_PAD_CTRL(ENET_PAD_CTRL),

+ MX6_PAD_ENET2_RX_ER__ENET2_RX_ER | MUX_PAD_CTRL(ENET_PAD_CTRL),

+};

+

+static void setup_iomux_fec(int fec_id)

+{

+       if (fec_id == 0)

+ imx_iomux_v3_setup_multiple_pads(fec1_pads,

+ ARRAY_SIZE(fec1_pads));

+       else

+ imx_iomux_v3_setup_multiple_pads(fec2_pads,

+ ARRAY_SIZE(fec2_pads));

+}

Labels (1)
0 Kudos
3 Replies

719 Views
dyunasing
Contributor I

Hi, Terry,

     just want to check whether there is any progress to get the 2 ports simultaneously?

     I am considering to use this processor for my next project and 2 LAN ports working together is one of the criteria also.

     thanks for any update.

regards

0 Kudos

719 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi Terry,

       MDIO and MDC are management interface of PHY, according to 802.3 protocal , these two signals can manage 32 PHYs at the same time, so they can ensure both PHYs work simultaneously。

Regards,

Weidong

0 Kudos

719 Views
TerryMcHenry
Contributor II

Weidong,

Can both RMII buses working simultaneously? We can see both PHYs but only the MAC that has the MDIO pins associated with it seems to communicate.

0 Kudos