<?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 single burst transfers in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281408#M32452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you mean you enabled user land SPI support in the kernel?&amp;nbsp; So you expecting somthing like /dev/spidevx.y?&amp;nbsp; If so then you need to add an entry in your board descriptor for spidev, as the spidev driver doesn't dynamically register this with the kernel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the board descriptor file for your platform (found under arch/arm/mach-mx6 for the i.mx6), you need to add spidev entry like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="directive"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;struct&lt;/SPAN&gt; spi_board_info imx6q_spi_device[] __initdata = {&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.modalias = "spidev",&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.max_speed_hz = 48000000, /* max spi clock (SCK) speed in HZ */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.bus_num = 2,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.chip_select = 0,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.mode = SPI_MODE_1,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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 imx6q_spi_cs3[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMX6Q_ECSPI3_CS0,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const struct spi_imx_master imx6q_spi_data3 __initconst = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .chipselect&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = imx6q_spi_cs3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .num_chipselect = ARRAY_SIZE(imx6q_spi_cs3),&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;There should be a spi_init function where you add the spi device.&amp;nbsp; Again this depends on your platform but they should all be roughly the same.&amp;nbsp; Most will already have a configuration for some sort of on board spi nor flash you can use as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also need to configure the iomux depending on your platform, in mine I had to setup the chip select for the spi controller I was using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other good sources of information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/spi/spi-summary" title="https://www.kernel.org/doc/Documentation/spi/spi-summary"&gt;https://www.kernel.org/doc/Documentation/spi/spi-summary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/spi/spidev" title="https://www.kernel.org/doc/Documentation/spi/spidev"&gt;https://www.kernel.org/doc/Documentation/spi/spidev&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2013 16:10:13 GMT</pubDate>
    <dc:creator>jeffreycoffman</dc:creator>
    <dc:date>2013-09-05T16:10:13Z</dc:date>
    <item>
      <title>i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281395#M32439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to interface a SPI NOR flash (slave) to my i.MX6 (master).&amp;nbsp; My device requires that the CS be held for the entire transaction (cmd byte + N data bytes returned from the device), however when I observe the spi transfer on my logic analyzer I noticed that the i.MX6 releases CS between each data word.&amp;nbsp; My device will not shift out its data in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should mention I am using spidev, and that I've tried setting cs_change in the spi_transfer and that had no effect...&amp;nbsp; Looking in spi_imx.c I don't see where the cs_change parameter is ever used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears from the code in spi_imx.c that the ecspi controller should be set up todo a single burst transfer for the bus I am using (ecspi3) as shown in figure 21-8 of the IMX6DQRM.&amp;nbsp; However I am seeing behavior more like figure 21-9 on my logic analyzer even though SS_CTL[3:0] is appears correct and SMC is cleared.&amp;nbsp; So I don't understand whats going on at this point. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can some i.MX6 spi expert chim in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 22:14:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281395#M32439</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-18T22:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281396#M32440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After double checking I noticed that SS_CTL is always getting set to multi burst mode for any device.&amp;nbsp; I modified the driver so SS_CTL was set to single burst mode but when I perform a transaction now the driver hangs up.&amp;nbsp; Any Ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jul 2013 08:30:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281396#M32440</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-19T08:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281397#M32441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you are using the ioctl() calls like in spidev_test.c (&lt;A href="https://raw.github.com/torvalds/linux/master/Documentation/spi/spidev_test.c" title="https://raw.github.com/torvalds/linux/master/Documentation/spi/spidev_test.c"&gt;https://raw.github.com/torvalds/linux/master/Documentation/spi/spidev_test.c&lt;/A&gt;) to interface to spidev? cs_change must be cleared in spi_ioc_transfer struct in order for single burst mode to work. Most likely spidev ioctl handler is hanging because of this. Can you try this? Clearing cs_change in spi_transfer may not work because the spi_ioc_transfer code may override it (just for my curiosity, where did you set cs_change in spi_transfer struct - i.e what file and function?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for an example, look here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/297197#297197"&gt;https://community.freescale.com/message/297197#297197&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jul 2013 14:25:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281397#M32441</guid>
      <dc:creator>varsmolta</dc:creator>
      <dc:date>2013-07-20T14:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281398#M32442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used spidev_test.c as my starting point, I have not tried to write a protocol driver yet as I'm hoping to get spidev working first.&amp;nbsp; I was already setting cs_change to 0 explicitly (even though the memset should take care of this) after I create the spi_transfer struct.&amp;nbsp; I will double check my settings and rerun my test and update this thread.&amp;nbsp; I did not see where in spi_imx.c this flag ever got used as the driver appears to always configure the controller for multi burst.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jul 2013 19:06:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281398#M32442</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-20T19:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281399#M32443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I doubled checked and I was indeed setting cs_change=0.&amp;nbsp; Here is a snippet from my code where I setup the transfer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pastebin.com/CfWj2Pza" title="http://pastebin.com/CfWj2Pza"&gt;http://pastebin.com/CfWj2Pza&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a ss of when it hangs.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="screenshot.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/39952i9BC688116F6FA04F/image-size/large?v=v2&amp;amp;px=999" role="button" title="screenshot.png" alt="screenshot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jul 2013 20:59:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281399#M32443</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-20T20:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281400#M32444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would recommend to probe the ecspi status register (ECSPIx_STATREG ) when it hangs to see the Rx/Tx status in the two cases (SS_CTL set vs cleared). This may shed light on what to do to fix the spi_imx driver. You are correct, in that this file does not use the cs_change parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a devregs program from here that you can use to probe the imx6 registers from user space (its for imx5 but applies to imx6 as well): &lt;A href="http://boundarydevices.com/i-mx5x-device-register-access/" title="http://boundarydevices.com/i-mx5x-device-register-access/"&gt;http://boundarydevices.com/i-mx5x-device-register-access/&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've added the ECSPI reigsters in my forked git repo. Its here: &lt;A href="https://github.com/VarsMolta/imx-utils" title="https://github.com/VarsMolta/imx-utils"&gt;VarsMolta/imx-utils · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 07:03:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281400#M32444</guid>
      <dc:creator>varsmolta</dc:creator>
      <dc:date>2013-07-22T07:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281401#M32445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will give that a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:54:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281401#M32445</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-22T19:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281402#M32446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out what my problem was.&amp;nbsp; In addition to setting up SS_CTL correctly, I also needed to configure the burst length in CONREG as well.&amp;nbsp; I had to define the total number of bits in a single transfer.&amp;nbsp; The driver only sets bits [24:20] in CONREG; however for single burst the total number of bits in the transfer needs to be set.&amp;nbsp; Now I see the CS held the entire transaction and the device shifting out data as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've modified the driver to take cs_change into account now and configure single burst mode or multi burst mode based on it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 00:29:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281402#M32446</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-07-25T00:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281403#M32447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have the same problem. Please, how did you fix it? Where can we configure the burst length?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 10:32:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281403#M32447</guid>
      <dc:creator>sergiogómez</dc:creator>
      <dc:date>2013-08-31T10:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281404#M32448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please submit a patch for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 12:29:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281404#M32448</guid>
      <dc:creator>varsmolta</dc:creator>
      <dc:date>2013-08-31T12:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281405#M32449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a patch with my changes to the spi_imx driver.&amp;nbsp; I've have only tested it with an M25P64 NOR SPI flash, as that's what we're using in our system.&amp;nbsp; Currently I have only added support for 8 bpw.&amp;nbsp; Based on limitation in the spi controller your limited to 4096 bits per single burst transfer.&amp;nbsp; I left most the original driver code in place, the difference being it only gets called when cs_change&amp;nbsp; =1, otherwise it sets up a single burst transfer.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Aug 2013 15:48:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281405#M32449</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-08-31T15:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281406#M32450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I'll give it a try myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 13:19:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281406#M32450</guid>
      <dc:creator>varsmolta</dc:creator>
      <dc:date>2013-09-02T13:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281407#M32451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;I enabled the spi device in the kernel config and it did show up in the /sys/.. directory but not in /dev&lt;/P&gt;&lt;P&gt;can you give me some tips how to add the spi device correctly?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 05:49:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281407#M32451</guid>
      <dc:creator>robertbouwens</dc:creator>
      <dc:date>2013-09-05T05:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281408#M32452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume you mean you enabled user land SPI support in the kernel?&amp;nbsp; So you expecting somthing like /dev/spidevx.y?&amp;nbsp; If so then you need to add an entry in your board descriptor for spidev, as the spidev driver doesn't dynamically register this with the kernel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the board descriptor file for your platform (found under arch/arm/mach-mx6 for the i.mx6), you need to add spidev entry like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="directive"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;struct&lt;/SPAN&gt; spi_board_info imx6q_spi_device[] __initdata = {&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.modalias = "spidev",&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.max_speed_hz = 48000000, /* max spi clock (SCK) speed in HZ */&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.bus_num = 2,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.chip_select = 0,&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;.mode = SPI_MODE_1,&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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 imx6q_spi_cs3[] = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IMX6Q_ECSPI3_CS0,&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static const struct spi_imx_master imx6q_spi_data3 __initconst = {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .chipselect&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = imx6q_spi_cs3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .num_chipselect = ARRAY_SIZE(imx6q_spi_cs3),&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;There should be a spi_init function where you add the spi device.&amp;nbsp; Again this depends on your platform but they should all be roughly the same.&amp;nbsp; Most will already have a configuration for some sort of on board spi nor flash you can use as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also need to configure the iomux depending on your platform, in mine I had to setup the chip select for the spi controller I was using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other good sources of information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/spi/spi-summary" title="https://www.kernel.org/doc/Documentation/spi/spi-summary"&gt;https://www.kernel.org/doc/Documentation/spi/spi-summary&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.kernel.org/doc/Documentation/spi/spidev" title="https://www.kernel.org/doc/Documentation/spi/spidev"&gt;https://www.kernel.org/doc/Documentation/spi/spidev&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 16:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281408#M32452</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-09-05T16:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281409#M32453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi jeff,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;yes, absolutly right.&lt;/P&gt;&lt;P&gt;i managed it to get the driver visible in /dev.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;but thank you very much for the answer.&lt;/P&gt;&lt;P&gt;yesterday this 'thing' got me nailed down.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;your patch is also very interesting as we are to build communication gateways using spi.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;what about:&lt;/P&gt;&lt;P&gt;static const ...&lt;/P&gt;&lt;P&gt;makes shure it is in flash space not ram.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;best&lt;/P&gt;&lt;P&gt;robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 16:28:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281409#M32453</guid>
      <dc:creator>robertbouwens</dc:creator>
      <dc:date>2013-09-05T16:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281410#M32454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you got it working.&amp;nbsp; I'm not sure what your platform is or whether its custom hardware, but I would avoid using the spi controllers cs select if possible and instead use a GPIO.&amp;nbsp; Using the i.MX6's spi controller in single burst mode is very painful.&amp;nbsp; On our board the vendor did this with their spi flash, but as I am using another spi controller connected to the Q7 signals, I was stuck with it and had no choice. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what flash, static const would ensure?&amp;nbsp; What if you have an SD card and no flash?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 17:18:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281410#M32454</guid>
      <dc:creator>jeffreycoffman</dc:creator>
      <dc:date>2013-09-05T17:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281411#M32455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeffrey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have you updated your patch against kernel 3.10.17 coming with Yocto? I need a SPI single burst feature because I've a SLIC chip which require CS asserted as per 8bit transfer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 13:46:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281411#M32455</guid>
      <dc:creator>robyf</dc:creator>
      <dc:date>2014-10-20T13:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 ECSPI single burst transfers</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281412#M32456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff, Roberto,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;avoid using the spi controllers cs select if possible and instead use a GPIO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I'm in a similar situation. But I think it is complex, because it looks like you can't trivially use SPI_NO_CS with imx_spi , _and_ spidev requires a working imx_spi which requires a valid chipselect. I'm going to try giving it a dummy chipselect and see if I can make it work even without SPI_NO_CS set in the userspace mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;jaya&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 07:39:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-ECSPI-single-burst-transfers/m-p/281412#M32456</guid>
      <dc:creator>jayakumar2</dc:creator>
      <dc:date>2016-03-17T07:39:29Z</dc:date>
    </item>
  </channel>
</rss>

