<?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: SPI - F-RAM usage on Linux in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952425#M142352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steffen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try to debug it using description in sect.3.8 SPI NOR Flash Memory&lt;/P&gt;&lt;P&gt;Technology Device (MTD) attached Linux Manual, not using spidev.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;fram mb85rs4mt seems is not supported in linux/drivers/mtd/spi-nor/spi-nor.c,&lt;/P&gt;&lt;P&gt;not listed in flash_info spi_nor_ids[] structure:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/spi-nor/spi-nor.c?h=imx_4.14.98_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/spi-nor/spi-nor.c?h=imx_4.14.98_2.0.0_ga"&gt;spi-nor.c\spi-nor\mtd\drivers - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specific timings can be added in the same manner as for "m25p80.c" part which&lt;/P&gt;&lt;P&gt;is supported in BSP.&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>Mon, 07 Oct 2019 08:30:02 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2019-10-07T08:30:02Z</dc:date>
    <item>
      <title>SPI - F-RAM usage on Linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952424#M142351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use a Fujitsu F-RAM on a custom i.MX6 Linux platform.&lt;/P&gt;&lt;P&gt;The F-RAM:&amp;nbsp;&lt;A class="link-titled" href="https://www.fujitsu.com/uk/Images/MB85RS1MT.pdf" title="https://www.fujitsu.com/uk/Images/MB85RS1MT.pdf"&gt;https://www.fujitsu.com/uk/Images/MB85RS1MT.pdf&lt;/A&gt;&amp;nbsp;should be available with Linux' &amp;lt;spi-nor&amp;gt; driver.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My devicetree configuration for this F-RAM looks like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;ecspi2: ecspi@0200c000 {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;#size-cells = &amp;lt;0&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;reg = &amp;lt;0x0200c000 0x4000&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;interrupts = &amp;lt;0 32 IRQ_TYPE_LEVEL_HIGH&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;clocks = &amp;lt;&amp;amp;clks IMX6QDL_CLK_ECSPI2&amp;gt;,&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&amp;amp;clks IMX6QDL_CLK_ECSPI2&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;clock-names = "ipg", "per";&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;fsl,spi-num-chipselects = &amp;lt;1&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;pinctrl-names = "default";&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_ecspi2&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;dmas = &amp;lt;&amp;amp;sdma 5 7 1&amp;gt;, &amp;lt;&amp;amp;sdma 6 7 2&amp;gt;;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;dma-names = "rx", "tx";&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;status = "okay";&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;/*&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;spidev: spidev@0 {&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;compatible = "linux,spidev";&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;reg = &amp;lt;0&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; spi-max-frequency = &amp;lt;25000000&amp;gt;;&lt;BR /&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; status = "okay";&lt;/P&gt;&lt;P&gt;&amp;nbsp;*&amp;nbsp; &amp;nbsp; }; &lt;BR /&gt;&amp;nbsp;*/&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;fram: mb85rs4mt@0 {&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;compatible = "jedec,spi-nor";&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;reg = &amp;lt;0&amp;gt;;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;spi-max-frequency = &amp;lt;40000000&amp;gt;;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;#address-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;#size-cells = &amp;lt;1&amp;gt;;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;m25p,fast-read;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;status = "okay";&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;partition@p1 {&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;label = "spi-fram";&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;reg = &amp;lt;0x0 0x20000&amp;gt;;&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;};&lt;BR /&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;};&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used spidev to debug the device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is: this configuration does not recognize the F-RAM as it should. The F-RAM has the JEDEC RDID-functionality which gives you the Device-ID by&amp;nbsp;sending RDID-command 0x9f.&lt;/P&gt;&lt;P&gt;Linux attempts to read this register but only gets back 0xffffff.&lt;/P&gt;&lt;P&gt;The Error is:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;m25p80 spi1.0: unrecognized JEDEC id bytes: ff, ff, ff&lt;BR /&gt;m25p80: probe of spi1.0 failed with error -2&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I tried to read the Device-ID with &amp;lt;spidev&amp;gt; and got a valid answer (0x047f27).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference between both SPI-communications is the timing!&lt;/P&gt;&lt;P&gt;When I use spidev I send the RDID and immediately (in the same chip-select) some dummy bytes to read the informations sent by the F-RAM.&lt;/P&gt;&lt;P&gt;When Linux tries to get the Device-ID it sends the command (0x9f), sets the Chip-Select back to high and after a while it tries to get the data by setting Chip-Select to low and clocking the device. But then the answer from the device is 0xffffff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this with other devices mentioned in &amp;lt;spi-nor.c&amp;gt; (for example a m25p20) and they all have the same behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I get Linux to do the RDID in a single Chip-Select???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2019 07:16:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952424#M142351</guid>
      <dc:creator>steffendoster</dc:creator>
      <dc:date>2019-10-07T07:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SPI - F-RAM usage on Linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952425#M142352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steffen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one can try to debug it using description in sect.3.8 SPI NOR Flash Memory&lt;/P&gt;&lt;P&gt;Technology Device (MTD) attached Linux Manual, not using spidev.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;fram mb85rs4mt seems is not supported in linux/drivers/mtd/spi-nor/spi-nor.c,&lt;/P&gt;&lt;P&gt;not listed in flash_info spi_nor_ids[] structure:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/spi-nor/spi-nor.c?h=imx_4.14.98_2.0.0_ga" title="https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/spi-nor/spi-nor.c?h=imx_4.14.98_2.0.0_ga"&gt;spi-nor.c\spi-nor\mtd\drivers - linux-imx - i.MX Linux kernel&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specific timings can be added in the same manner as for "m25p80.c" part which&lt;/P&gt;&lt;P&gt;is supported in BSP.&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>Mon, 07 Oct 2019 08:30:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952425#M142352</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2019-10-07T08:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: SPI - F-RAM usage on Linux</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952426#M142353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IT WORKS!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why didn't I find the answer earlier?&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/506074"&gt;Problem with jedec,spi-nor on IMX8M Mini EVK&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is the behaviour of the ss0-signal (used as chip-select).&lt;/P&gt;&lt;P&gt;I switched to a simple GPIO on IO-Mux and added the cs-gpio-entry to the spi-port:&lt;/P&gt;&lt;P&gt;cs-gpios = &amp;lt;&amp;amp;gpio2 26 GPIO_ACTIVE_LOW&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now it works! The FRAM is detected correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By the way: I added the mb85rs4mt to &amp;lt;spi-nor.c&amp;gt; because the smaller mb85rs1mt is already defined there.&lt;/P&gt;&lt;P&gt;Just changed size and ID to fit the additional Device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;Steffen Doster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2019 08:55:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SPI-F-RAM-usage-on-Linux/m-p/952426#M142353</guid>
      <dc:creator>steffendoster</dc:creator>
      <dc:date>2019-10-07T08:55:59Z</dc:date>
    </item>
  </channel>
</rss>

