<?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 not functioning over ls1012a-frdm Arduino header (?) in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/Spidev-not-functioning-over-ls1012a-frdm-Arduino-header/m-p/717648#M2935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Is the current RCW as reported by u-boot correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;RCW[SDHC2_BASE_DAT321] / RCW[SDHC2_BASE_BASE] should be set to 0b11 for SPI using. See the Table 3-6 of the LS1012a Reference Manual.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Is there a way to read out the RCW configuration on the chip after Linux has booted?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;RCWSRa registers contain the LS1012a RCW value. Use mmap possibility for read RCWSRa registers. U-boot reports RCW value using theses registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 29 Jan 2018 07:00:51 GMT</pubDate>
    <dc:creator>Pavel</dc:creator>
    <dc:date>2018-01-29T07:00:51Z</dc:date>
    <item>
      <title>Spidev not functioning over ls1012a-frdm Arduino header (?)</title>
      <link>https://community.nxp.com/t5/Layerscape/Spidev-not-functioning-over-ls1012a-frdm-Arduino-header/m-p/717647#M2934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Background:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am trying to communicate over the&amp;nbsp;SPI pins on&amp;nbsp;the ls1012a Freedom board. I have added entries to the device tree and verified that they are being used. The spidev devices are listed under /dev on the ls1012a-frdm and the spidev kernel module is being loaded (as indicated by the /dev/spidev* entries).&amp;nbsp;I'm using the Qoriq SDK v2.0 with the 1703 patch&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point I suspect that there is an issue with the RCW and the ls1012a pins used for&amp;nbsp;SPI communication to the Arduino headers are not configured correctly. It seems that&amp;nbsp;SDHC2_BASE_DAT321 &amp;amp; SDHC2_BASE_BASE should be set to 11 for SPI but are not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally, it seems that rcw repo from git://git.freescale.com/ppc/sdk/rcw.git does not contain the source for the ls1012a-frdm RCW binary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Is the current RCW as reported by u-boot correct?&lt;/P&gt;&lt;P&gt;- Is there any plan to make the ls1012a RCW source code available in the public repo?&lt;/P&gt;&lt;P&gt;- Is there a way to read out the RCW configuration on the chip after Linux has booted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to anyone who can assist,&lt;/P&gt;&lt;P&gt;- Patrick&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Details:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;u-boot log with RCW:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 13px;"&gt;U-Boot 2016.01LS1012A-SDK+g7944a94 (Aug 30 2016 - 13:13:19 +0800)&lt;/SPAN&gt;

&lt;SPAN style="font-size: 13px;"&gt;SoC: LS1012AE (0x87040010)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Clock Configuration:&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; CPU0(A53):800 MHz &lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; Bus: 250 MHz DDR: 1000 MT/s&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Reset Configuration Word (RCW):&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; 00000000: 08000008 00000000 00000000 00000000&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; 00000010: 33050000 c000000c 40000000 00001800&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; 00000020: 00000000 00000000 00000000 000c4571&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt; 00000030: 00000000 00c28120 00000096 00000000&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;I2C: ready&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;DRAM: 510 MiB&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Using SERDES1 Protocol: 13061 (0x3305)&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;SF: Detected S25FS512S_256K with page size 512 Bytes, erase size 128 KiB, total 64 MiB&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;In: serial&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Out: serial&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Err: serial&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Model: LS1012A FREEDOM Board&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;Board: LS1012AFRDM Net: cbus_baseaddr: 0000000004000000, ddr_baseaddr: 0000000083800000, ddr_phys_baseaddr: 03800000&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;class init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;tmu init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;bmu1 init: done&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;bmu2 init: done&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;GPI1 init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;GPI2 init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;HGPI init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;hif_tx_desc_init: Tx desc_base: 0000000083e40400, base_pa: 03e40400, desc_count: 64&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;hif_rx_desc_init: Rx desc base: 0000000083e40000, base_pa: 03e40000, desc_count: 64&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;HIF tx desc: base_va: 0000000083e40400, base_pa: 03e40400&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;HIF init complete&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;bmu1 enabled&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;bmu2 enabled&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_hw_init: done&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_firmware_init&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_load_elf: no of sections: 13&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_firmware_init: class firmware loaded&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_load_elf: no of sections: 10&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_firmware_init: tmu firmware loaded&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;ls1012a_configure_serdes 0&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;ls1012a_configure_serdes 1&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;pfe_eth0, pfe_eth1&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;=&amp;gt; &lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the dts snippet inserted into fsl-ls1012a-frdm.dts:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;amp;dspi {&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; bus-num = &amp;lt;0&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp; status = "okay";&lt;/SPAN&gt;

&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp; spidev@0 { /* Should be the SPI-&amp;gt;UART bridge on CS0 */&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #address-cells = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #size-cells = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "spidev";&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi-max-frequency = &amp;lt;10000000&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;0&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp; };&lt;/SPAN&gt;

&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp; spidev@1 { /* Should be the Arduino SPI pins on CS1 */&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #address-cells = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #size-cells = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; compatible = "spidev";&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spi-max-frequency = &amp;lt;10000000&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reg = &amp;lt;1&amp;gt;;&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp; };&lt;/SPAN&gt;
&lt;SPAN style="font-size: 13px;"&gt;};
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;output of &lt;STRONG&gt;ls -l /dev/spidev*&lt;/STRONG&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;crw------- 1 root root 153, 0 Jan 1 1970 /dev/spidev0.0&lt;BR /&gt;crw------- 1 root root 153, 1 Jan 1 1970 /dev/spidev0.1&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 21:24:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Spidev-not-functioning-over-ls1012a-frdm-Arduino-header/m-p/717647#M2934</guid>
      <dc:creator>patrickb-iss</dc:creator>
      <dc:date>2017-12-14T21:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spidev not functioning over ls1012a-frdm Arduino header (?)</title>
      <link>https://community.nxp.com/t5/Layerscape/Spidev-not-functioning-over-ls1012a-frdm-Arduino-header/m-p/717648#M2935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Is the current RCW as reported by u-boot correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;RCW[SDHC2_BASE_DAT321] / RCW[SDHC2_BASE_BASE] should be set to 0b11 for SPI using. See the Table 3-6 of the LS1012a Reference Manual.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm; margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;- Is there a way to read out the RCW configuration on the chip after Linux has booted?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; background: white;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;RCWSRa registers contain the LS1012a RCW value. Use mmap possibility for read RCWSRa registers. U-boot reports RCW value using theses registers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Pavel Chubakov&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&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, 29 Jan 2018 07:00:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/Spidev-not-functioning-over-ls1012a-frdm-Arduino-header/m-p/717648#M2935</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2018-01-29T07:00:51Z</dc:date>
    </item>
  </channel>
</rss>

