<?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: PCIe EndPoint iMX6SX in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996760#M147869</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in general one can try to test without linux, baremetal test:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/RT-Thread/rt-thread/blob/master/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/pcie/src/pcie.c" title="https://github.com/RT-Thread/rt-thread/blob/master/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/pcie/src/pcie.c"&gt;rt-thread/pcie.c at master · RT-Thread/rt-thread · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2020 14:41:06 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2020-03-24T14:41:06Z</dc:date>
    <item>
      <title>PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996756#M147865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we are trying to connect&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;iMX6SX cpu&lt;/LI&gt;&lt;LI&gt;x86&amp;nbsp;module&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;by PCIe.&lt;/P&gt;&lt;P&gt;The iMX6SX must be a &lt;STRONG&gt;PCIe Endpoint&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I need &lt;STRONG&gt;only shared memory&lt;/STRONG&gt; between iMX6SX and x86. &lt;STRONG&gt;I do not need interrupt&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Shared memory must be in a region of DDR RAM of iMX6SX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On iMX6SX I use&amp;nbsp;&lt;STRONG&gt;linux-imx-imx_4.9.88_2.0.0_ga-var01&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;On&amp;nbsp;x86 I'm using an &lt;STRONG&gt;EFI shell&lt;/STRONG&gt; that allow me to see pci devices and addresses assigned.&lt;/P&gt;&lt;P&gt;I reserve some memory for shared memory, so Linux will not use this.&lt;/P&gt;&lt;P&gt;I boot with &lt;STRONG&gt;mem=128M&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I start using the endpoint configuration used from the validation test.&lt;/P&gt;&lt;P&gt;On Linux I have&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_12.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/101965i3B3C2E287EDF51CB/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_12.png" alt="pastedImage_12.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_13.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102334iC35364DBDF91CF69/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_13.png" alt="pastedImage_13.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I power-on the iMX6SX and&amp;nbsp; I see on serial console :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;PCIe EP: waiting for link up...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All is OK ... iMX6SX is waiting PCIe link.&lt;/P&gt;&lt;P&gt;Now I reset the&amp;nbsp;x86 module.&lt;/P&gt;&lt;P&gt;As soon as I power-on x86, iMX6SX get the link.&lt;/P&gt;&lt;P&gt;For now all is OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I have a linux uart console.&lt;/P&gt;&lt;P&gt;On&amp;nbsp;x86 I can see using the EFI shell the PCI configurazione.&lt;/P&gt;&lt;P&gt;I see:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;my endpoint as Memory controller - RAM memory controller.&lt;/LI&gt;&lt;LI&gt;VID and PID are correct.&lt;/LI&gt;&lt;LI&gt;the address assigned by&amp;nbsp;x86 to BARs.&lt;/LI&gt;&lt;LI&gt;the correct size of the BARs I assigned&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that after some seconds linux freezes.&lt;/P&gt;&lt;P&gt;On the&amp;nbsp;x86 I can see the PCI register of the iMX6SX endpoint.&lt;/P&gt;&lt;P&gt;x86&amp;nbsp;works OK, does not freeze.&lt;/P&gt;&lt;P&gt;I attach the complete dump of my PCI endpoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the dump I see two strange things:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Command register go to 0.&lt;/LI&gt;&lt;LI&gt;Received Master Abort:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only for testing, I tried&amp;nbsp;&lt;STRONG&gt;linux-imx-rel_imx_4.1.15_2.1.0_ga&lt;/STRONG&gt; and &lt;STRONG&gt;linux-imx-rel_imx_4.14.98_2.0.0_ga.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;On 4.1.15 I have seen problem with the PCIe link, with 4.14.98 I have seen something similar what I have seen with 4.9.88.&lt;/P&gt;&lt;P&gt;I did not investigate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On 4.14.98 I have seen an option in menuconfig.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_20.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102307i79D57ADB6A08F9A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_20.png" alt="pastedImage_20.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_21.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102197iE5A9D25B7B4D0B60/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_21.png" alt="pastedImage_21.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but I don't think it is the right way to follow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My final question is if I'm on the correct way using EP config used for Validation Test.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is this OK as a base for PCIe Endpoint ? If is not complete, what it is missing ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I realize that I could have setted badly some address in PCI controller, but for now, if none writes (x86 and iMX6SX), I think that this kind of error could not be important.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Mar 2020 10:47:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996756#M147865</guid>
      <dc:creator>paolo_minazzi</dc:creator>
      <dc:date>2020-03-21T10:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996757#M147866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to skip the memory speed test (adding a return, see code below).&lt;/P&gt;&lt;P&gt;Adding the return, I have :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;command 0x00&lt;/LI&gt;&lt;LI&gt;Status(6) 0x0010 (that is, Receive Master Abort is not setted)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I verify,&amp;nbsp; after the link is OK, command is 0x07 (correct) for some seconds, than it become 0x00.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;do {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;usleep_range(10, 20);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (time_after(jiffies, timeout)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;dev_info(dev, "PCIe EP: link down.\n");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;return 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt; } while ((readl(pp-&amp;gt;dbi_base + PCIE_PHY_DEBUG_R1) &amp;amp; 0x10) == 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #000000; font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;return;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #000000; font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Mar 2020 07:24:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996757#M147866</guid>
      <dc:creator>paolo_minazzi</dc:creator>
      <dc:date>2020-03-22T07:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996758#M147867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe EP config can be used for validation test:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-95014"&gt;i.MX6Q PCIe EP/RC Validation System&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To narrow down freeze problems one can try with other pcie cards&lt;/P&gt;&lt;P&gt;(check if this is caused by low signals). Just for test one can try using Gen1 mode&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/313631"&gt;https://community.nxp.com/thread/313631&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/304284"&gt;i.MX6Q: Re-establishing a PCIe link&lt;/A&gt;&amp;nbsp;&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>Tue, 24 Mar 2020 00:48:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996758#M147867</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-03-24T00:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996759#M147868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for you answers Igor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. PCIe LINK&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried to force Gen1 (both BIOS x86 and iMX6SX) using the link you have show to me.&lt;/P&gt;&lt;P&gt;In UEFI shell I verify the link speed is Gen1 (that is 2.5GHZ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, I checked the link seems good.&lt;/P&gt;&lt;P&gt;To do this, after I have the link, I use simple&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;while(1) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; printk("%d", (readl(pp-&amp;gt;dbi_base + PCIE_PHY_DEBUG_R1) &amp;amp; 0x10) != 0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;And I see always "1". Then, after some seconds, I have the freeze. But the &lt;STRONG&gt;link seems OK&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. PROBLEM FLAG PCI_COMMAND_MEMORY&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I see in sequence:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;boot linux on iMX6&lt;/LI&gt;&lt;LI&gt;iMX6 wait PCIe link&lt;/LI&gt;&lt;LI&gt;boot x86&lt;/LI&gt;&lt;LI&gt;iMX6 see link&lt;/LI&gt;&lt;LI&gt;for some seconds flag &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;PCI_COMMAND_MEMORY&lt;/SPAN&gt; is setted&lt;/LI&gt;&lt;LI&gt;someone (I think x86) reset flag &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;PCI_COMMAND_MEMORY&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;After 1 second I have linux freeze&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Why &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;PCI_COMMAND_MEMORY flag&lt;/SPAN&gt; is resetted ? How reset it ? x86 ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3. TEST : RESET ALL BARS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried a simple test : disable all BARs (putting 0 in the MASK of all BARs) .&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;writel(0, pp-&amp;gt;dbi_base + (1 &amp;lt;&amp;lt; 12) + PCI_BASE_ADDRESS_0..5);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also in this case I see the linux freeze freeze.&lt;/P&gt;&lt;P&gt;This says it should not be a memory address problem. All BARs are disabled!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;4. ADDRESS OR BAR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Latest question.&lt;/P&gt;&lt;P&gt;My iMX6SX has 1GB DDR.&lt;/P&gt;&lt;P&gt;The start physical address of DDR is 0x8000_0000.&lt;/P&gt;&lt;P&gt;The end physical address of DDR is 0xc000_0000.&lt;/P&gt;&lt;P&gt;If I want a shared memory of 1MB at the end of my DDR, my address is 0xbff0_0000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_33.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/102958i53BF7A3BB8137CC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_33.png" alt="pastedImage_33.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;writel(0xbff00000, pp-&amp;gt;dbi_base + PCI_BASE_ADDRESS_0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;writel(SZ_1M, pp-&amp;gt;dbi_base + (1 &amp;lt;&amp;lt; 12) + PCI_BASE_ADDRESS_0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it OK ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you time and support.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 14:06:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996759#M147868</guid>
      <dc:creator>paolo_minazzi</dc:creator>
      <dc:date>2020-03-24T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996760#M147869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in general one can try to test without linux, baremetal test:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/RT-Thread/rt-thread/blob/master/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/pcie/src/pcie.c" title="https://github.com/RT-Thread/rt-thread/blob/master/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/pcie/src/pcie.c"&gt;rt-thread/pcie.c at master · RT-Thread/rt-thread · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 14:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996760#M147869</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-03-24T14:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996761#M147870</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;thanks for the link. I studied the code and I found &lt;SPAN class=""&gt;&lt;STRONG&gt;pcie_map_space&lt;/STRONG&gt; function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I still cannot understand the linux freeze.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Now I have a question abount clocks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The standard DTS of iMX6SX is &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;clocks = &amp;lt;&amp;amp;clks IMX6SX_CLK_PCIE_AXI&amp;gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;amp;clks IMX6SX_CLK_LVDS1_OUT&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;amp;clks IMX6SX_CLK_PCIE_REF_125M&amp;gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;&amp;amp;clks IMX6SX_CLK_DISPLAY_AXI&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace; font-size: 12px;"&gt;clock-names = "pcie", "pcie_bus", "pcie_phy", "pcie_inbound_axi";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is our PCI system:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_9.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/104484i3E9E885B5E92584C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_9.png" alt="pastedImage_9.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The clk is &lt;SPAN&gt;the PCIexpress &lt;/SPAN&gt;100 MHz&lt;SPAN&gt; LVDS clock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is connected to the CLK1p, CLK1n pins.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Q1 : Is the standard DTS ok for this configuration ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the standard DTS :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;the iMX6SX can see PCIe link&lt;/LI&gt;&lt;LI&gt;the x86 can assign BAR0 to the endpoint&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Q2 : Does it means that the clocks are already ok ?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The freeze depends on PCI. I'm sure of this, but for now I cannot find the source.&lt;/P&gt;&lt;P&gt;Thanks for support,&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2020 15:06:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996761#M147870</guid>
      <dc:creator>paolo_minazzi</dc:creator>
      <dc:date>2020-03-30T15:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996762#M147871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paolo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Q1 : Is the standard DTS ok for this configuration ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from log ("&amp;nbsp;linux-imx-imx_4.9.88_2.0.0_ga-var01") seems you are using&lt;/P&gt;&lt;P&gt;some of variscite (&lt;A class="link-titled" href="https://www.variscite.com" title="https://www.variscite.com"&gt;Leading ARM System On Module (SoM) designer and manufacturer | Variscite&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;boards. I am not familiar with them, NXP i.MX6SX reference board uses external PCIe clock, below&lt;/P&gt;&lt;P&gt;part of i.MX6SX Sabre SD schematic:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/sabre-board-for-smart-devices-based-on-the-i-mx-6solox-applications-processors:RD-IMX6SX-SABRE" title="https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/sabre-board-for-smart-devices-based-on-the-i-mx-6solox-applications-processors:RD-IMX6SX-SABRE"&gt;i.MX 6SoloX SABRE Development Board | NXP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/99392i59BF95759BA03346/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.jpg" alt="pastedImage_5.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;Q2 : Does it means that the clocks are already ok ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe yes. However based on your description :&lt;/P&gt;&lt;P&gt;"The problem is that after some seconds linux freezes."&lt;/P&gt;&lt;P&gt;There may be issues with long term clock instabilities appearing after some time,&lt;/P&gt;&lt;P&gt;so recommendation is to test this case on NXP i.MX6SX Sabre SD reference board&lt;/P&gt;&lt;P&gt;with official Linux from source.codeaurora.org/external/imx/linux-imx&amp;nbsp; repository&lt;BR /&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.9.88_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.9.88_2.0.0_ga"&gt;linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also may be useful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/308436"&gt;PCIe BAR length limit&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/302811"&gt;i.MX6 PCIe: supporting devices larger than 16MB&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2020 00:57:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996762#M147871</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-03-31T00:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: PCIe EndPoint iMX6SX</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996763#M147872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Igor.&lt;/P&gt;&lt;P&gt;On x86 using both&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;linux&lt;/LI&gt;&lt;LI&gt;windows&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I do not have the freezer on iMX6SX.&lt;/P&gt;&lt;P&gt;The problem was something in the BIOS of x86.&lt;/P&gt;&lt;P&gt;Maybe it writes some configuration that is not OK. Now I will investigate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the shared memory I have setted the iATU registers in this way.&lt;/P&gt;&lt;P&gt;Maybe it could be useful to someone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;uint32_t viewport&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;BR /&gt;uint32_t tlp_type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;BR /&gt;uint32_t addr_base_cpu_side&amp;nbsp;&amp;nbsp; = 0xbff00000; // phy address&lt;BR /&gt;uint32_t size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = SZ_1M;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;HW_PCIE_PL_IATUVR_WR((viewport &amp;amp; 0x0F) | (1 &amp;lt;&amp;lt; 31));&amp;nbsp; // orig 0&amp;lt;&amp;lt;31&lt;BR /&gt;HW_PCIE_PL_IATURLBA_WR(addr_base_cpu_side);&lt;BR /&gt;HW_PCIE_PL_IATURUBA_WR(0);&lt;BR /&gt;HW_PCIE_PL_IATURLA_WR(addr_base_cpu_side + size - 1);&lt;BR /&gt;HW_PCIE_PL_IATURC1_WR(tlp_type &amp;amp; 0x0F);&lt;BR /&gt;HW_PCIE_PL_IATURC2_WR(&amp;nbsp;&amp;nbsp; ((unsigned int)(1 &amp;lt;&amp;lt; 31))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ((unsigned int)(1 &amp;lt;&amp;lt; 30))&amp;nbsp; // BAR MODE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2020 08:01:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/PCIe-EndPoint-iMX6SX/m-p/996763#M147872</guid>
      <dc:creator>paolo_minazzi</dc:creator>
      <dc:date>2020-04-01T08:01:19Z</dc:date>
    </item>
  </channel>
</rss>

