<?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: SPIDEV problem in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331691#M44827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0xb0b0 /* CS0 */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2014 00:31:31 GMT</pubDate>
    <dc:creator>fabio_estevam</dc:creator>
    <dc:date>2014-11-12T00:31:31Z</dc:date>
    <item>
      <title>SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331689#M44825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;All,&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;SPIDEV PROBLEM, MUST SOLVE&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;I have been battling the wandboard quad C1 with kernel version 3.17.2-armv7-x3, Ubuntu 14.04 LTS, and u-boot 2014.07 dirty.&amp;nbsp; Successfully, I can rebuild the kernel with changes to the imx6qdl-wandboard.dtsi for enabling peripherial access to /dev/...&amp;nbsp; I can access spidev0.0 right now.&amp;nbsp; I also have captured some interesting waveforms:&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;First waveform is spi bus spidev1.0 running on the beaglebone black rev B with kernel version 3.8.13-bone30, Ubuntu 13.10, and whatever U-boot that came with armhf image.&amp;nbsp; I cannot paste a picture of the waveform apparently, but what I can say it that the spi bus acts accordingly.&amp;nbsp; I send three bytes (address, data[0], data[1]).&amp;nbsp; Chip select stays low for the entire duration of the transaction.&amp;nbsp; &lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;Second waveform is spi bus spidev0.0 running on the wandboard that i described earlier.&amp;nbsp; With the same exact code, asside from the spidev change, I get incorrect results.&amp;nbsp; I send the exact same three bytes like I did with the beaglebone black, but what I have lacked to capture over the past few days, is the chip select line.&amp;nbsp; For every byte that goes across the spi bus, the chip select line goes low then back high.&amp;nbsp; Just to make it clear, if I send a three byte transaction across the spi bus, I would expect the chip select line to stay low for the entire transaction.&amp;nbsp; However, that is not the case.&amp;nbsp; The spi bus chip select line toggles in between each byte that is sent across the bus.&amp;nbsp; Obviously, this makes it impossible to talk to any spi device and also puts my development process in a screeching halt status.&amp;nbsp; &lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;I have put countless hours into understanding the kernel and build process just to wiggle some spi lines.&amp;nbsp; I need guidance for solving this problem.&amp;nbsp; Below are the changes I made to imx6qdl-wandboard.dtsi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;&amp;amp;ecspi1 {&lt;BR /&gt;fsl,spi-num-chipselects = &amp;lt;1&amp;gt;;&lt;BR /&gt;cs-gpios = &amp;lt;&amp;amp;gpio2 30 0&amp;gt;;&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ecspi1&amp;gt;;&lt;BR /&gt;status = "okay";&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;spidev@1 {&lt;BR /&gt;spi-max-frequency = &amp;lt;24000000&amp;gt;;&lt;BR /&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;compatible = "spidev";&lt;BR /&gt;};&lt;BR /&gt;};&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;AND IN IOMUX SECTION...&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;pinctrl_ecspi1: ecspi1grp {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x100b1&lt;BR /&gt;MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x100b1&lt;BR /&gt;MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x100b1&lt;BR /&gt;MX6QDL_PAD_EIM_EB2__ECSPI1_SS0 0x000b1 /* CS0 */&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;If I were a betting man, I would say this is kernel driver issue.&amp;nbsp; It seems like the big boys need to get involved in order to address this issue.&amp;nbsp; Since I do not have anything better to do until I get a response, I am going to go ahead and try a different kernel build and see if I can validate my assumption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-top: 10px; color: #333333; font-family: Arial, sans-serif; font-size: 14px;"&gt;John L.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 18:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331689#M44825</guid>
      <dc:creator>jrlitzenberger</dc:creator>
      <dc:date>2014-11-11T18:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331690#M44826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First you say:&lt;/P&gt;&lt;P&gt;cs-gpios = &amp;lt;&amp;amp;gpio2 30 0&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So this means that GPIO2_30 will be used as the chip select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but in the IOMUX settings you define:&lt;/P&gt;&lt;P&gt;MX6QDL_PAD_EIM_EB2__ECSPI1_SS0 0x000b1 /* CS0 */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use the GPIO as chip select instead of the native chip select of the port.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 00:26:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331690#M44826</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-12T00:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331691#M44827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0xb0b0 /* CS0 */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 00:31:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331691#M44827</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-12T00:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331692#M44828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for you response.&amp;nbsp; I will try your suggestion.&amp;nbsp; Real quick just for clarification, all other bit wise values have been 0xXXXXX, in saying that is 0xb0b0 the actual desired number or is this typo?&amp;nbsp; Also, can you direct me to the documentation that states what the bit wise values actually do as far as configuring the GPIO?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will post here in the next hour my results with your current suggestion.&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;John L.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 21:49:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331692#M44828</guid>
      <dc:creator>jrlitzenberger</dc:creator>
      <dc:date>2014-11-14T21:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331693#M44829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following up on your original post, I was able to get the spi bus to communicate with the device I was intending to talk to. I have one issue that I would like to understand.&amp;nbsp; After capturing my waveform on my scope, I can see a considerable amount of time between chip select going low, data, and chip select going high.&amp;nbsp; in some instances almost double the amount of time necessary.&amp;nbsp; When I was using the spi bus configured as SS0 I did not see any delay at all with the chip select.&amp;nbsp; So again, documentation on gpio configuration for spi bus and some incite into why I am seeing what I'm seeing would be much appreciated.&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;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 21:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331693#M44829</guid>
      <dc:creator>jrlitzenberger</dc:creator>
      <dc:date>2014-11-18T21:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331694#M44830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the register IOMUXC_SW_PAD_CTL_PAD_EIM_EB2_B in the Reference Manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reset value is 0xb0b0. It is OK to use the reset value for a GPIO functionality.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 23:11:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331694#M44830</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-18T23:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: SPIDEV problem</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331695#M44831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad to know you got it working. Please mark this thread answered, by the way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have an insight as to the extra delay you are seeing, sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Nov 2014 23:12:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPIDEV-problem/m-p/331695#M44831</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2014-11-18T23:12:22Z</dc:date>
    </item>
  </channel>
</rss>

