<?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: i.MX6 ECSPI CS &amp; timing issues in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-CS-timing-issues/m-p/543877#M85622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julien&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. "cs_change" is not used in nxp ecspi driver (please check attached&lt;/P&gt;&lt;P&gt;Linux Manual Chapter 37) and sources/dts documentation :&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%2Fgit.freescale.com%2Fgit%2Fcgit.cgi%2Fimx%2Flinux-2.6-imx.git%2Ftree%2FDocumentation%2Fdevicetree%2Fbindings%2Fspi%2Ffsl-imx-cspi.txt%3Fh%3Dimx_3.14.52_1.1.0_ga" rel="nofollow" target="_blank"&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt?h=imx_3.14.52_1.1.0_ga&lt;/A&gt;&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%2Fgit.freescale.com%2Fgit%2Fcgit.cgi%2Fimx%2Flinux-2.6-imx.git%2Ftree%2Fdrivers%2Fspi%2Fspi-imx.c%3Fh%3Dimx_3.14.52_1.1.0_ga" rel="nofollow" target="_blank"&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/spi/spi-imx.c?h=imx_3.14.52_1.1.0_ga&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In general one can add support for it using "of_get_named_gpio" in&amp;nbsp; spi_imx_probe()&lt;/P&gt;&lt;P&gt;function. To avoid CS disabling between the two bursts it is necessary to set ECSPIx_CONREG&lt;/P&gt;&lt;P&gt;BURST_LENGTH with data burst and provide algorithm to avoid emptying TX FIFO, untill&lt;/P&gt;&lt;P&gt;all bits data sent out.&lt;/P&gt;&lt;P&gt;2. issue was not confirmed by nxp expert, in particular one can pay attention to&lt;/P&gt;&lt;P&gt;ERR009606 eCSPI: In master mode, burst lengths of 32n+1 will transmit incorrect data&lt;/P&gt;&lt;P&gt;3. timing may be affected by OS overheads, so one can try to optimize it removing&lt;/P&gt;&lt;P&gt;unused modules and tasks with heavy graphic.&lt;/P&gt;&lt;P&gt;4. set ECSPIx_CONREG[BURST_LENGTH] for 40 data burst and provide such algorithm&lt;/P&gt;&lt;P&gt;so TX FIFO was never empty, untill all data sent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, NXP has service for helping customers with porting drivers:&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%2Fsupport%2Fnxp-professional-services%3APROFESSIONAL-SERVICE" rel="nofollow" target="_blank"&gt;http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Pro-Support contact &lt;A href="https://community.nxp.com/www.nxp.com/prosupport" target="test_blank"&gt;www.nxp.com/prosupport&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2016 01:41:35 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2016-08-23T01:41:35Z</dc:date>
    <item>
      <title>i.MX6 ECSPI CS &amp; timing issues</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-CS-timing-issues/m-p/543876#M85621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm facing several issues with communication between an i.MX6Q ECSPI2 and an FPGA. Goal is to write 8bits address and read a 32bits value as fast as we can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my DTS file I set-up ECSPI2 to use SCLK/MISO/MOSI/SS0 and I wrote my own fpga kernel driver (kernel rel_imx_3.14.52_1.1.0_ga is compiled with imx-spi driver). You can find both at the end of this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, here is a capture of two SPI transfert in one SPI message : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scope_6.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/1550i210006C5F71815ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="scope_6.png" alt="scope_6.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 1 : CS have to stay enabled between 8bits address writing and 32bits value reading.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Even if I set explicitely cs_change to 0 in my kernel driver, CS is disabled between the two bursts. I assume that I have to set SS_CTL to 0 but I have no idea how to do that in my driver&lt;/P&gt;&lt;P&gt;Note : If I change CS from SS0(DISP0_DAT18 - ALT2) to GPIO5_IO12 (DISP0_DAT18 - ALT5) this CS issue disappear - see oscilloscope print bellow - but I'd prefer to use native ECSPI CS.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scope_7.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/1588iC423F4106454EEE6/image-size/large?v=v2&amp;amp;px=999" role="button" title="scope_7.png" alt="scope_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 2 : Why Is there a CLK tick between the two SPI message?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This issue is the same than the one describe here : &lt;A _jive_internal="true" href="https://community.nxp.com/message/625531#comment-625531" title="https://community.nxp.com/message/625531#comment-625531"&gt;https://community.nxp.com/message/625531#comment-625531&lt;/A&gt; but solution have not been found yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 3 : Time to take / release SPI communication is huge&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;As you can notice in the oscilloscope prints the time to take / release the SPI communication is really disappointing. I assume this is because SPI communication is handled by the kernel instead of the ECSPI bloc. Is there any way to change that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue 4 : How to handle a 40bits SPI message with BURST ECSPI capability in my FPGA kernel driver?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=== DTS File ===&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;amp;ecspi2 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; pinctrl-names = "default";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ecspi2&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; fsl,spi-num-chipselects = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; cs-gpios = &amp;lt;0&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; status = "okay";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; fpga: fpga {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; compatible = "eca,fpga";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; reg = &amp;lt;0&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; spi-max-frequency = &amp;lt;20000000&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;amp;iomuxc {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; ecspi2 {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; pinctrl_ecspi2: ecspi2grp {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; fsl,pins = &amp;lt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO 0x100b1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; MX6QDL_PAD_DISP0_DAT16__ECSPI2_MOSI 0x100b1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; MX6QDL_PAD_DISP0_DAT19__ECSPI2_SCLK 0x100b1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; MX6QDL_PAD_DISP0_DAT18__ECSPI2_SS0&amp;nbsp; 0x100b1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; &amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&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; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp; };&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=== SPI driver ===&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;static int eca_fpga_reg_read(void *context, unsigned int reg, unsigned int *out)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; struct device *dev = context;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; struct spi_transfer t[2];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; struct spi_message m;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; u8 address;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; __le32 val;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; int ret;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; mutex_lock(&amp;amp;spi_lock);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; address = (reg &amp;lt;&amp;lt; 1) | 0x1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; spi_message_init(&amp;amp;m);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; memset(t, 0, sizeof(t));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[0].tx_buf = &amp;amp;address;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[0].len = sizeof(address);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[0].cs_change = 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[0].bits_per_word = 8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[1].rx_buf = &amp;amp;val;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[1].len = sizeof(val);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; t[1].bits_per_word = 32;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; spi_message_add_tail(&amp;amp;t[0], &amp;amp;m);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; spi_message_add_tail(&amp;amp;t[1], &amp;amp;m);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; ret = spi_sync(to_spi_device(dev), &amp;amp;m);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; mutex_unlock(&amp;amp;spi_lock);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; if (ret)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; return ret;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; *out = cpu_to_le32(val);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;&amp;nbsp; return 0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 8pt; font-family: 'courier new', courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice/hint/solution is more than welcome :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 13:15:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-CS-timing-issues/m-p/543876#M85621</guid>
      <dc:creator>juliencorjon</dc:creator>
      <dc:date>2016-08-22T13:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI CS &amp; timing issues</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-CS-timing-issues/m-p/543877#M85622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julien&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. "cs_change" is not used in nxp ecspi driver (please check attached&lt;/P&gt;&lt;P&gt;Linux Manual Chapter 37) and sources/dts documentation :&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%2Fgit.freescale.com%2Fgit%2Fcgit.cgi%2Fimx%2Flinux-2.6-imx.git%2Ftree%2FDocumentation%2Fdevicetree%2Fbindings%2Fspi%2Ffsl-imx-cspi.txt%3Fh%3Dimx_3.14.52_1.1.0_ga" rel="nofollow" target="_blank"&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt?h=imx_3.14.52_1.1.0_ga&lt;/A&gt;&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%2Fgit.freescale.com%2Fgit%2Fcgit.cgi%2Fimx%2Flinux-2.6-imx.git%2Ftree%2Fdrivers%2Fspi%2Fspi-imx.c%3Fh%3Dimx_3.14.52_1.1.0_ga" rel="nofollow" target="_blank"&gt;http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/spi/spi-imx.c?h=imx_3.14.52_1.1.0_ga&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In general one can add support for it using "of_get_named_gpio" in&amp;nbsp; spi_imx_probe()&lt;/P&gt;&lt;P&gt;function. To avoid CS disabling between the two bursts it is necessary to set ECSPIx_CONREG&lt;/P&gt;&lt;P&gt;BURST_LENGTH with data burst and provide algorithm to avoid emptying TX FIFO, untill&lt;/P&gt;&lt;P&gt;all bits data sent out.&lt;/P&gt;&lt;P&gt;2. issue was not confirmed by nxp expert, in particular one can pay attention to&lt;/P&gt;&lt;P&gt;ERR009606 eCSPI: In master mode, burst lengths of 32n+1 will transmit incorrect data&lt;/P&gt;&lt;P&gt;3. timing may be affected by OS overheads, so one can try to optimize it removing&lt;/P&gt;&lt;P&gt;unused modules and tasks with heavy graphic.&lt;/P&gt;&lt;P&gt;4. set ECSPIx_CONREG[BURST_LENGTH] for 40 data burst and provide such algorithm&lt;/P&gt;&lt;P&gt;so TX FIFO was never empty, untill all data sent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, NXP has service for helping customers with porting drivers:&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%2Fsupport%2Fnxp-professional-services%3APROFESSIONAL-SERVICE" rel="nofollow" target="_blank"&gt;http://www.nxp.com/support/nxp-professional-services:PROFESSIONAL-SERVICE&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Pro-Support contact &lt;A href="https://community.nxp.com/www.nxp.com/prosupport" target="test_blank"&gt;www.nxp.com/prosupport&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;igor&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 01:41:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-CS-timing-issues/m-p/543877#M85622</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-08-23T01:41:35Z</dc:date>
    </item>
  </channel>
</rss>

