<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using ENET1_REF_CLK_25M on IMX6UL in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749286#M116579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a custom board with a IMX6UL. The IMX is connected to a generic PHY using RMII.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENET1_TX_CLK is configured as ENET1_REF_CLK1, and should be an output from the PHY at 25MHz (I think).&lt;/P&gt;&lt;P&gt;ENET2_RX_EN is configured as ENET1_REF_CLK_25M and should be an output from the IMX to the PHY at 25MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using u-boot ATM, and have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;static iomux_v3_cfg_t const fec1_pads[] = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX6_PAD_ENET2_RX_EN__ENET1_REF_CLK_25M | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int board_eth_init(bd_t *bis)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int setup_fec(void)&lt;BR /&gt;{&lt;BR /&gt; struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;&lt;BR /&gt; int ret;&lt;/P&gt;&lt;P&gt;// Use ENET1_TX_CLK as an input&lt;BR /&gt; // Set GRP1[13] - ENET1_CLK_SEL - get ENET1 Tx clk from ENET1_TX_CLK pin&lt;BR /&gt; // clear GPR1[17] - ENET1_TX_CLK_DIR - output driver is disabled&lt;BR /&gt; clrsetbits_le32(&amp;amp;iomuxc_regs-&amp;gt;gpr[1], IOMUX_GPR1_FEC1_MASK,&lt;BR /&gt; IOMUX_GPR1_FEC1_CLOCK_MUX2_SEL_MASK);&lt;/P&gt;&lt;P&gt;ret = enable_fec_anatop_clock(0, ENET_25MHZ);&lt;BR /&gt; if (ret)&lt;BR /&gt; {&lt;BR /&gt; printf("Failed to enable clock\n");&lt;BR /&gt; return ret;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;enable_enet_clk(1);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately there appears to be nothing outputted on the REF_CLK_25M signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see much in the TRM on how to enable this. As far as I can tell just muxing the ENET2_RX_EN as ENET1_REF_CLK_25M should be enough. There's no reference to clock gating or anything else that I can find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2018 18:24:43 GMT</pubDate>
    <dc:creator>andrewparlane2</dc:creator>
    <dc:date>2018-02-15T18:24:43Z</dc:date>
    <item>
      <title>Using ENET1_REF_CLK_25M on IMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749286#M116579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have a custom board with a IMX6UL. The IMX is connected to a generic PHY using RMII.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENET1_TX_CLK is configured as ENET1_REF_CLK1, and should be an output from the PHY at 25MHz (I think).&lt;/P&gt;&lt;P&gt;ENET2_RX_EN is configured as ENET1_REF_CLK_25M and should be an output from the IMX to the PHY at 25MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using u-boot ATM, and have the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;static iomux_v3_cfg_t const fec1_pads[] = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX6_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;MX6_PAD_ENET2_RX_EN__ENET1_REF_CLK_25M | MUX_PAD_CTRL(ENET_CLK_PAD_CTRL),&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int board_eth_init(bd_t *bis)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static int setup_fec(void)&lt;BR /&gt;{&lt;BR /&gt; struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;&lt;BR /&gt; int ret;&lt;/P&gt;&lt;P&gt;// Use ENET1_TX_CLK as an input&lt;BR /&gt; // Set GRP1[13] - ENET1_CLK_SEL - get ENET1 Tx clk from ENET1_TX_CLK pin&lt;BR /&gt; // clear GPR1[17] - ENET1_TX_CLK_DIR - output driver is disabled&lt;BR /&gt; clrsetbits_le32(&amp;amp;iomuxc_regs-&amp;gt;gpr[1], IOMUX_GPR1_FEC1_MASK,&lt;BR /&gt; IOMUX_GPR1_FEC1_CLOCK_MUX2_SEL_MASK);&lt;/P&gt;&lt;P&gt;ret = enable_fec_anatop_clock(0, ENET_25MHZ);&lt;BR /&gt; if (ret)&lt;BR /&gt; {&lt;BR /&gt; printf("Failed to enable clock\n");&lt;BR /&gt; return ret;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;enable_enet_clk(1);&lt;/P&gt;&lt;P&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately there appears to be nothing outputted on the REF_CLK_25M signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't see much in the TRM on how to enable this. As far as I can tell just muxing the ENET2_RX_EN as ENET1_REF_CLK_25M should be enough. There's no reference to clock gating or anything else that I can find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:24:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749286#M116579</guid>
      <dc:creator>andrewparlane2</dc:creator>
      <dc:date>2018-02-15T18:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using ENET1_REF_CLK_25M on IMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749287#M116580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for muxing ENET2_RX_EN as ENET1_REF_CLK_25M one can use&lt;/P&gt;&lt;P&gt;register IOMUXC_SW_MUX_CTL_PAD_ENET2_RX_EN described in&lt;/P&gt;&lt;P&gt;sect.30.5.55 SW_MUX_CTL_PAD_ENET2_RX_EN SW MUX Control&lt;BR /&gt;Register (IOMUXC_SW_MUX_CTL_PAD_ENET2_RX_EN) i.MX6UL Reference Manual&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Freference-manual%2FIMX6ULRM.pdf" rel="nofollow" target="_blank"&gt;http://www.nxp.com/docs/en/reference-manual/IMX6ULRM.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 23:05:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749287#M116580</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-02-15T23:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using ENET1_REF_CLK_25M on IMX6UL</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749288#M116581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had the muxing set OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem was the&amp;nbsp;BM_ANADIG_PLL_ENET_REF_25M_ENABLE bit in the pll_enet register.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2018 23:32:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-ENET1-REF-CLK-25M-on-IMX6UL/m-p/749288#M116581</guid>
      <dc:creator>andrewparlane2</dc:creator>
      <dc:date>2018-02-15T23:32:56Z</dc:date>
    </item>
  </channel>
</rss>

