<?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 Re: RMII-MDIO fails with Linux 4.9.11 Kernel in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716647#M111354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The&amp;nbsp;two images I am using are both built from NXP/Freescale distributed BSP's. &amp;nbsp;These BSP's are derivatives of the Yocto build system.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both instances, the network is configured in the kernel. &amp;nbsp;I have run menuconfig in both instances and made them match as much as possible. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fec_main driver is loading in the 4.9 kernel and is responding to MII MDIO transactions when the PHY comes out of reset correctly.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 May 2018 14:51:10 GMT</pubDate>
    <dc:creator>dougbailey</dc:creator>
    <dc:date>2018-05-24T14:51:10Z</dc:date>
    <item>
      <title>RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716644#M111351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a board based on the Freescale iMX6DL SabreSD design that I have working fine with the Korgoth based BSP that runs Linux 4.1.15. I am trying to upgrade the BSP running on the board to the Morty based BSP that runs Linux 4.9.11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been able to port my device tree files to the new BSP and I have migrated my init files over to the systemd board initialization.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One problem I am having is that the Ethernet port does not operate under the new kernel. (The Ethernet port works flawlessly with the 4.1.15 kernel.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first issue I am trying to correct is the operation of the MDIO communicating with the Phy. The behavior is manifested with the use of the mii-tool utility. Sometimes when the board boots, mii-tool properly communicates and I am able to read the Phy registers. Other times, the tool fails and all that I read back from the Phy are 0xffff's. (mii-tool never fails running under the 4.1.15 kernel.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The network interface on this board is different from the SabreSD board in that it is communicating to a 10/100 Micrel KSZ8081RNA Phy. It communicates via an RMII interface with the 50 MHz reference clock supplied by the PHY device. That reference clock is input on the GPIO_16 pin of the iMX6DL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my device tree file, I have the fast Ethernet controller defined as:&lt;/P&gt;&lt;P&gt;&amp;amp;fec {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; pinctrl-names = "default";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; pinctrl-0 = &amp;lt;&amp;amp;pinctrl_enet&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; phy-mode = "rmii";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; phy-reset-gpios = &amp;lt;&amp;amp;gpio1 2 0&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fsl,magic-packet;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; status = "okay";&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;where the fec is also defined in the imx6qdl.dtsi device tree include is defined as:&lt;/P&gt;&lt;P&gt;fec: ethernet@02188000 {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; compatible = "fsl,imx6q-fec";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; reg = &amp;lt;0x02188000 0x4000&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; interrupts-extended =&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;amp;gpc 0 118 IRQ_TYPE_LEVEL_HIGH&amp;gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;amp;gpc 0 119 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_ENET&amp;gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;amp;clks IMX6QDL_CLK_ENET&amp;gt;,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&amp;amp;clks IMX6QDL_CLK_ENET_REF&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; clock-names = "ipg", "ahb", "ptp";&lt;BR /&gt;&amp;nbsp; &amp;nbsp; stop-mode = &amp;lt;&amp;amp;gpr 0x34 27&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fsl,wakeup_irq = &amp;lt;0&amp;gt;;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; status = "disabled";&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IOMuxc pins for the Ethernet is defined as: &lt;BR /&gt; pinctrl_enet: enetgrp {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fsl,pins = &amp;lt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MX6QDL_PAD_GPIO_2__GPIO1_IO02 0x1b0b0&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of these device tree definitions are the same between the 4.1.15 and the 4.9.11 kernel. &lt;BR /&gt; &lt;BR /&gt;I am at a loss for what is causing the mii-tool to fail sometimes and succeed at other times. Does anyone have suggestions where I should look to determine what has changed in the Ethernet interface?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug Bailey&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2018 15:01:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716644#M111351</guid>
      <dc:creator>dougbailey</dc:creator>
      <dc:date>2018-04-30T15:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716645#M111352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It turns out that the PHY I am using is booting at a PHY address that I am not expecting. &amp;nbsp;The Micrel/Microchip KSZ8081RNA PHY is supposed to boot at either PHY address 0 or 3. &amp;nbsp;In my instance, it is booting at address 4. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have talked with the MicroChip people to try to determine what is going on with the PHY.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2018 18:37:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716645#M111352</guid>
      <dc:creator>dougbailey</dc:creator>
      <dc:date>2018-05-11T18:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716646#M111353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Was this from a packaged image or a Yocto build?&lt;/P&gt;&lt;P&gt;If it was a Yocto build chances are the networking in the Kernel configuration were not enabled.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 14:56:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716646#M111353</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2018-05-16T14:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716647#M111354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The&amp;nbsp;two images I am using are both built from NXP/Freescale distributed BSP's. &amp;nbsp;These BSP's are derivatives of the Yocto build system.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both instances, the network is configured in the kernel. &amp;nbsp;I have run menuconfig in both instances and made them match as much as possible. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fec_main driver is loading in the 4.9 kernel and is responding to MII MDIO transactions when the PHY comes out of reset correctly.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2018 14:51:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716647#M111354</guid>
      <dc:creator>dougbailey</dc:creator>
      <dc:date>2018-05-24T14:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716648#M111355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to be a regresion, please answer these question:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Where does the reference clock come from ?&amp;nbsp; External OSC or SOC internal clock ?&lt;/P&gt;&lt;P&gt;2. Please measure the RMII reference clock to ensure it is 50Mhz.&lt;/P&gt;&lt;P&gt;3. Please ensure the pin setting: MX6QDL_PAD_GPIO_16__ENET_REF_CLK&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x4001b0a8&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;Regard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 16:58:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716648#M111355</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2018-06-01T16:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716649#M111356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem turned out to be the ENET_CLK_SEL bit (bit 21) of the IOMUXc GPR1 register. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My PHY generated the 50 MHz reference clock but I had not selected the fact that it would be driven into the iMX6 so I ended up with contention on the clock signal . &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found that the code setting this bit is in arch/arm/mach-imx/mach-imx6q.c:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");&lt;BR /&gt; if (!IS_ERR(gpr))&lt;BR /&gt;&amp;nbsp; &amp;nbsp; regmap_update_bits(gpr, IOMUXC_GPR1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IMX6Q_GPR1_ENET_CLK_SEL_MASK,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IMX6Q_GPR1_ENET_CLK_SEL_PAD);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, there is no way of setting this pin value in the device tree and requires a code change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2018 19:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716649#M111356</guid>
      <dc:creator>dougbailey</dc:creator>
      <dc:date>2018-06-01T19:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: RMII-MDIO fails with Linux 4.9.11 Kernel</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716650#M111357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a castom board based on imx6sx-sdb board. We use KSZ8081RNA with 50Mhz like you.&lt;/P&gt;&lt;P&gt;Uboot works correctly after many changes.&lt;/P&gt;&lt;P&gt;When kernel is started, PHY is detected with right address but can't connect to PHY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The correction above is the only modification apply to kernel sources ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2019 20:21:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/RMII-MDIO-fails-with-Linux-4-9-11-Kernel/m-p/716650#M111357</guid>
      <dc:creator>florian_germain</dc:creator>
      <dc:date>2019-05-21T20:21:21Z</dc:date>
    </item>
  </channel>
</rss>

