<?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>i.MX ProcessorsのトピックRe: Access SPI eeprom from u-boot</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484979#M77421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jemish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems sspi is not working with i.MX as also noted on&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-thread-small" data-containerid="2004" data-containertype="14" data-objectid="316920" data-objecttype="1" href="https://community.freescale.com/thread/316920"&gt;https://community.freescale.com/thread/316920&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One can use similar codes as for spi-nor, which is supported on&lt;/P&gt;&lt;P&gt;Sabre schematic spf-27392. spi-nor pin definitions are defined in &lt;/P&gt;&lt;P&gt;in ..board/freescale/mx6sabresd/mx6sabresd.c&lt;/P&gt;&lt;P&gt;Supported parts (spi-nor ID) in ..drivers/mtd/spi/sf_params.c&lt;/P&gt;&lt;P&gt;Use uboot command : sf probe, read, write, erase&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>Wed, 06 Apr 2016 07:53:40 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2016-04-06T07:53:40Z</dc:date>
    <item>
      <title>Access SPI eeprom from u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484978#M77420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using imx6q based customize board for our product. In our board we have SPI EEPORM (Part number :25AA010A). We are able to operate SPI EEPROM from kernel space. We don't have any issue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we want to use same SPI EEPROM from u-boot level. I tried to to access it using&amp;nbsp; "sspi" command on u-boot but didn't succeed. Every time I got below error :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sspi [&amp;lt;bus&amp;gt;:]&amp;lt;cs&amp;gt;[.&amp;lt;mode&amp;gt;] &amp;lt;bit_len&amp;gt; &amp;lt;dout&amp;gt; - Send and receive bits&lt;/P&gt;&lt;P&gt;&amp;lt;bus&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Identifies the SPI bus&lt;/P&gt;&lt;P&gt;&amp;lt;cs&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Identifies the chip select&lt;/P&gt;&lt;P&gt;&amp;lt;mode&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Identifies the SPI mode to use&lt;/P&gt;&lt;P&gt;&amp;lt;bit_len&amp;gt; - Number of bits to send (base 10)&lt;/P&gt;&lt;P&gt;&amp;lt;dout&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; - Hexadecimal string that gets sent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; sspi 1:0.0 8 3&amp;nbsp; &lt;/P&gt;&lt;P&gt;pre_div = 14, post_div=2&lt;/P&gt;&lt;P&gt;reg_ctrl = 0xe2f1&lt;/P&gt;&lt;P&gt;reg_config = 0x0&lt;/P&gt;&lt;P&gt;spi_xchg_single: bitlen 8 dout 0x8ffa5044 din 0x8ffa5064&lt;/P&gt;&lt;P&gt;Sending SPI&lt;STRONG&gt; 0x30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;spi_xchg_single: Timeout!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error -5 during SPI transaction&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here I have two concerns why it is showing 0x30 even though I write 3 only. &lt;/P&gt;&lt;P&gt;Doesn't matter whatever I write it always shows timeout error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we use this utility as reference to read/write spi eeprom?&lt;/P&gt;&lt;P&gt;I would appreciate if anyone can suggest any other reference code that we can use.&lt;/P&gt;&lt;P&gt;Has any one previously use SPI from u-boot to access SPI slave?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion or pointers would be appreciated.&lt;/P&gt;&lt;P&gt;As we have produce demo on 12th April 2016 this is bit crucial for us.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jemish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 05:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484978#M77420</guid>
      <dc:creator>jemish_1990</dc:creator>
      <dc:date>2016-04-06T05:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Access SPI eeprom from u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484979#M77421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jemish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems sspi is not working with i.MX as also noted on&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-thread-small" data-containerid="2004" data-containertype="14" data-objectid="316920" data-objecttype="1" href="https://community.freescale.com/thread/316920"&gt;https://community.freescale.com/thread/316920&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One can use similar codes as for spi-nor, which is supported on&lt;/P&gt;&lt;P&gt;Sabre schematic spf-27392. spi-nor pin definitions are defined in &lt;/P&gt;&lt;P&gt;in ..board/freescale/mx6sabresd/mx6sabresd.c&lt;/P&gt;&lt;P&gt;Supported parts (spi-nor ID) in ..drivers/mtd/spi/sf_params.c&lt;/P&gt;&lt;P&gt;Use uboot command : sf probe, read, write, erase&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>Wed, 06 Apr 2016 07:53:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484979#M77421</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-04-06T07:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Access SPI eeprom from u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484980#M77422</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;&lt;/P&gt;&lt;P&gt;Thanks for you prompt response!&lt;/P&gt;&lt;P&gt;I tried to use sf probe utility. &lt;/P&gt;&lt;P&gt;I would like to know is there any hardcoding in u-boot related to SPI bus 0.&lt;/P&gt;&lt;P&gt;With "sspi" and "sf" commands I am not getting any error if I have give bus : 0 as an argument.&lt;/P&gt;&lt;P&gt;If I give bus : 1 as an argument I am getting timeout error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider output of below two commands:&lt;/P&gt;&lt;P&gt;=&amp;gt; sf probe 1:0 1000000 0&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;spi_xchg_single: Timeout!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SF: Failed to get idcodes&lt;/P&gt;&lt;P&gt;Failed to initialize SPI flash at 1:0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;gt; sf probe 0:0 1000000 0&lt;/P&gt;&lt;P&gt;SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000&lt;/P&gt;&lt;P&gt;Failed to initialize SPI flash at 0:0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now interesting thing is that we don't have connected anything on SPI bus 0 (No pin mux setting for SPI0). We have SPI EEPROM on SPI bus 1. &lt;/P&gt;&lt;P&gt;Still if you look at the output of above two commands , when I use SPI bus 0 it don't give any timeout error. &lt;/P&gt;&lt;P&gt;If I give bus : 1 it is still giving timeout error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you point out what is going wrong here? Same was the case with sspi command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jemish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 09:20:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484980#M77422</guid>
      <dc:creator>jemish_1990</dc:creator>
      <dc:date>2016-04-06T09:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Access SPI eeprom from u-boot</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484981#M77423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jemish&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;suggest to make debugging with oscilloscope and driver code in&lt;/P&gt;&lt;P&gt;..drivers/mtd/spi/sf_probe.c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 10:23:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Access-SPI-eeprom-from-u-boot/m-p/484981#M77423</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2016-04-06T10:23:32Z</dc:date>
    </item>
  </channel>
</rss>

