<?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: Using SPI (&amp;ecspi1) on iMX6ULL-EVK in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Using-SPI-ecspi1-on-iMX6ULL-EVK/m-p/735709#M114490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Popo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look on&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/467909"&gt;How to support SPIDEV on imx6ull evk?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/439913"&gt;SPI in /dev not showing in imx6ul custom board&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>Thu, 18 Jan 2018 22:56:38 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2018-01-18T22:56:38Z</dc:date>
    <item>
      <title>Using SPI (&amp;ecspi1) on iMX6ULL-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SPI-ecspi1-on-iMX6ULL-EVK/m-p/735708#M114489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. I need your assistance in using&amp;nbsp;SPI (&amp;amp;ecspi1) on iMX6ULL-EVK board I got.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The steps I've taken:&lt;/P&gt;&lt;P&gt;1) cloned &amp;amp; compiled Linux kernel version 4.1.15 from the "linux-imx" branch.&lt;/P&gt;&lt;P&gt;It boots and runs fine as far as I can tell.&lt;/P&gt;&lt;P&gt;2) manually altered the "imx6ull-14x14-evk.dts" device tree to add the following:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;amp;iomuxc {&lt;/P&gt;&lt;P&gt;/*&amp;nbsp;skip */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pinctrl_ecspi1: ecspi1grp {&lt;BR /&gt; fsl,pins = &amp;lt;&lt;BR /&gt; MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK 0x1b088&lt;BR /&gt; MX6UL_PAD_CSI_DATA05__ECSPI1_SS0 0x1b088&lt;BR /&gt; MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI 0x1b088&lt;BR /&gt; MX6UL_PAD_CSI_DATA07__ECSPI1_MISO 0x1b088&lt;BR /&gt; &amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* skip */&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/ * And at the very bottom */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp;ecspi1 {&lt;BR /&gt; fsl,spi-num-chipselects = &amp;lt;1&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;BR /&gt; spidev@0x00 {&lt;BR /&gt; compatible = "spidev";&lt;BR /&gt; spi-max-frequency = &amp;lt;20000000&amp;gt;;&lt;BR /&gt; reg = &amp;lt;0&amp;gt;;&lt;BR /&gt; };&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I see a /dev/spidev0.0 device being created and when I test it with the spidev_test.c utility (taken from&amp;nbsp;&lt;A href="https://wolfgangklenk.wordpress.com/2013/02/20/checking-spi-on-raspberry-pi/"&gt;this blog post&lt;/A&gt;) it produces expected results:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;root@imx6ull:~# ./spidev_test&lt;BR /&gt;spi mode: 0&lt;BR /&gt;bits per word: 8&lt;BR /&gt;max speed: 500000 Hz (500 KHz)&lt;/P&gt;&lt;P&gt;00 00 00 00 00 00&lt;BR /&gt;00 00 00 00 00 00&lt;BR /&gt;00 00 00 00 00 00&lt;BR /&gt;00 00 00 00 00 00&lt;BR /&gt;00 00 00 00 00 00&lt;BR /&gt;00 00 00 00 00 00&lt;BR /&gt;00 00&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, when I short MISO and MOSI pins, the output doesn't change (still all zeroes). My guess is I've incorrectly mapped the MISO pin in the device tree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's related dmesg output:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;root@imx6ull:~# dmesg | grep spi&lt;BR /&gt;[ 1.210672] fsl-quadspi 21e0000.qspi: n25q256a (32768 Kbytes)&lt;BR /&gt;[ 1.222921] spi_gpio spi4: gpio-miso property not found, switching to no-rx mode&lt;BR /&gt;[ 1.232862] spidev spi0.0: buggy DT: spidev listed directly in DT&lt;BR /&gt;[ 1.241057] WARNING: CPU: 0 PID: 1 at drivers/spi/spidev.c:731 spidev_probe+0x1a4/0x1c0()&lt;BR /&gt;[ 1.288293] [&amp;lt;800368e8&amp;gt;] (warn_slowpath_null) from [&amp;lt;804296bc&amp;gt;] (spidev_probe+0x1a4/0x1c0)&lt;BR /&gt;[ 1.295338] [&amp;lt;804296bc&amp;gt;] (spidev_probe) from [&amp;lt;80427504&amp;gt;] (spi_drv_probe+0x50/0x74)&lt;BR /&gt;[ 1.301781] [&amp;lt;80427504&amp;gt;] (spi_drv_probe) from [&amp;lt;803857b8&amp;gt;] (driver_probe_device+0x174/0x2ac)&lt;BR /&gt;[ 1.336540] [&amp;lt;80383028&amp;gt;] (device_add) from [&amp;lt;80427c30&amp;gt;] (spi_add_device+0x98/0x130)&lt;BR /&gt;[ 1.342975] [&amp;lt;80427c30&amp;gt;] (spi_add_device) from [&amp;lt;80429118&amp;gt;] (spi_register_master+0x5c0/0x70c)&lt;BR /&gt;[ 1.350234] [&amp;lt;80429118&amp;gt;] (spi_register_master) from [&amp;lt;8042a7c8&amp;gt;] (spi_bitbang_start+0x9c/0x108)&lt;BR /&gt;[ 1.357710] [&amp;lt;8042a7c8&amp;gt;] (spi_bitbang_start) from [&amp;lt;8042c6ac&amp;gt;] (spi_imx_probe+0x3ec/0x654)&lt;BR /&gt;[ 1.364757] [&amp;lt;8042c6ac&amp;gt;] (spi_imx_probe) from [&amp;lt;80386f28&amp;gt;] (platform_drv_probe+0x44/0xac)&lt;BR /&gt;[ 1.438856] spi_imx 2008000.ecspi: probed&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any help or advice you could give me. I'm somewhat poking in the dark here so if you could keep it simple it would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jan 2018 11:13:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SPI-ecspi1-on-iMX6ULL-EVK/m-p/735708#M114489</guid>
      <dc:creator>poponopo</dc:creator>
      <dc:date>2018-01-18T11:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using SPI (&amp;ecspi1) on iMX6ULL-EVK</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Using-SPI-ecspi1-on-iMX6ULL-EVK/m-p/735709#M114490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Popo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look on&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/467909"&gt;How to support SPIDEV on imx6ull evk?&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/439913"&gt;SPI in /dev not showing in imx6ul custom board&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>Thu, 18 Jan 2018 22:56:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Using-SPI-ecspi1-on-iMX6ULL-EVK/m-p/735709#M114490</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-01-18T22:56:38Z</dc:date>
    </item>
  </channel>
</rss>

