<?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 Microchip KSZ9897 Kernel DSA Port6 Support in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Microchip-KSZ9897-Kernel-DSA-Port6-Support/m-p/1389391#M184728</link>
    <description>&lt;P&gt;Recently I am working on switch driver porting with Microchip ksz9897 to support 7 ports in kernel 5.10 DSA. The switch port 0 to 4 are ports which connect to RJ45, port 5 connect to CPU (internal PHYs) via MII, port 6 connect to ksz8081 via RMII (external PHYs).&lt;/P&gt;&lt;P&gt;From hardware point of view port 6 has no difference to port 0 to 4 except an additional PHYs however I am not able to test ping on port 6. Luckily port 6 can be verified without driver, and this makes me believe that something go wrong in Microchip DSA driver.&lt;/P&gt;&lt;P&gt;Attachment is the patch to have switch driver support port 6 with external PHYs. However after speaking to DSA kernel maintainer they talk to me that switch driver should not assume external PHYs exist. &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;On Fri, Dec 17, 2021 at 02:53:15AM +0000, KARL_TSOU (鄒磊) wrote:&lt;BR /&gt;&amp;gt; The Microchip switch ksz9897 support 7 physical port, port 0/1/2/3/4 connect to standard RJ45, port5 connect to PHY via MII to CPU and port6 connect to PHY via RMII (PHY ksz8081) on my custom board.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I am facing a problem that I am not able to verify port6 via ping command even though the link is up, port 0/1/2/3/4 are all works fine by verifying with ping command expect port6&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; When I go through port initialization code, a "if condition" below that aren't included port6 initialization.&lt;BR /&gt;&lt;BR /&gt;This initialization is for the internal PHYs. They have to&lt;BR /&gt;exist. External PHYs the switch driver should not assume exist. You&lt;BR /&gt;normally connect to the CPU directly, not via back to back PHYs. Any&lt;BR /&gt;there could be boards which use port 6 direct to the CPU without a&lt;BR /&gt;PHY. So this change as is, is wrong.&lt;BR /&gt;&lt;BR /&gt;You should be using a phy-handle in DT for port6, or port5, to&lt;BR /&gt;indicate if a PHY is connected to the port. Do you have this property?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone's hardware switch design support port 6 that encounter port 6 aren't working problem please merge the patch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Dec 2021 08:15:08 GMT</pubDate>
    <dc:creator>karl1688</dc:creator>
    <dc:date>2021-12-20T08:15:08Z</dc:date>
    <item>
      <title>Microchip KSZ9897 Kernel DSA Port6 Support</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Microchip-KSZ9897-Kernel-DSA-Port6-Support/m-p/1389391#M184728</link>
      <description>&lt;P&gt;Recently I am working on switch driver porting with Microchip ksz9897 to support 7 ports in kernel 5.10 DSA. The switch port 0 to 4 are ports which connect to RJ45, port 5 connect to CPU (internal PHYs) via MII, port 6 connect to ksz8081 via RMII (external PHYs).&lt;/P&gt;&lt;P&gt;From hardware point of view port 6 has no difference to port 0 to 4 except an additional PHYs however I am not able to test ping on port 6. Luckily port 6 can be verified without driver, and this makes me believe that something go wrong in Microchip DSA driver.&lt;/P&gt;&lt;P&gt;Attachment is the patch to have switch driver support port 6 with external PHYs. However after speaking to DSA kernel maintainer they talk to me that switch driver should not assume external PHYs exist. &lt;LI-EMOJI id="lia_disappointed-face" title=":disappointed_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN&gt;On Fri, Dec 17, 2021 at 02:53:15AM +0000, KARL_TSOU (鄒磊) wrote:&lt;BR /&gt;&amp;gt; The Microchip switch ksz9897 support 7 physical port, port 0/1/2/3/4 connect to standard RJ45, port5 connect to PHY via MII to CPU and port6 connect to PHY via RMII (PHY ksz8081) on my custom board.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I am facing a problem that I am not able to verify port6 via ping command even though the link is up, port 0/1/2/3/4 are all works fine by verifying with ping command expect port6&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; When I go through port initialization code, a "if condition" below that aren't included port6 initialization.&lt;BR /&gt;&lt;BR /&gt;This initialization is for the internal PHYs. They have to&lt;BR /&gt;exist. External PHYs the switch driver should not assume exist. You&lt;BR /&gt;normally connect to the CPU directly, not via back to back PHYs. Any&lt;BR /&gt;there could be boards which use port 6 direct to the CPU without a&lt;BR /&gt;PHY. So this change as is, is wrong.&lt;BR /&gt;&lt;BR /&gt;You should be using a phy-handle in DT for port6, or port5, to&lt;BR /&gt;indicate if a PHY is connected to the port. Do you have this property?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone's hardware switch design support port 6 that encounter port 6 aren't working problem please merge the patch.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 08:15:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Microchip-KSZ9897-Kernel-DSA-Port6-Support/m-p/1389391#M184728</guid>
      <dc:creator>karl1688</dc:creator>
      <dc:date>2021-12-20T08:15:08Z</dc:date>
    </item>
  </channel>
</rss>

