<?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: VF6xxx NFC (NAND) module clocking in Vybrid Processors</title>
    <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265088#M1556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Section &lt;STRONG&gt;3.7.6.2 NAND Flash Controller (NFC) Timing&lt;/STRONG&gt; of &lt;A href="http://cache.freescale.com/files/dsp/doc/data_sheet/IMX25CEC.pdf?pspll=1"&gt;IMX25CEC.pdf&lt;/A&gt; has the kind of timing diagrams I would expect/like so that we can know what kind of signalling the NAND flash chip can expect.&amp;nbsp; The IMX25 is a synchronously clocked controller.&amp;nbsp; Using the same Micron series with 8-bit 256MB version,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux MTD test modules provide a means to measure flash performance. &lt;/P&gt;&lt;TABLE style="background: #E6F7FF; color: blue; border: 2px solid darkgray;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="background: lightgreen; color: white;"&gt; NFC clock &lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt;T (nS)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Div &lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Write (MB/s)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Read (MB/s)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Erase (MB/s) &lt;/TH&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 22MHz &lt;/TD&gt;&lt;TD&gt; 45 &lt;/TD&gt;&lt;TD&gt; /6 &lt;/TD&gt;&lt;TD&gt; 3.6 &lt;/TD&gt;&lt;TD&gt; 5.2 &lt;/TD&gt;&lt;TD&gt; 148 &lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 33MHz &lt;/TD&gt;&lt;TD&gt; 30 &lt;/TD&gt;&lt;TD&gt; /4 &lt;/TD&gt;&lt;TD&gt; 4.2 &lt;/TD&gt;&lt;TD&gt; 6.9 &lt;/TD&gt;&lt;TD&gt; 154 &lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 44MHz &lt;/TD&gt;&lt;TD&gt; 22 &lt;/TD&gt;&lt;TD&gt; /3 &lt;/TD&gt;&lt;TD&gt; 4.6 &lt;/TD&gt;&lt;TD&gt; 7.7 &lt;/TD&gt;&lt;TD&gt; 154 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These values on an IMX25 (especially @44MHz) are double the current Vybrid speeds.&amp;nbsp; I have re-written the &lt;STRONG&gt;fsl_nfc.c&lt;/STRONG&gt; driver and am trying to prepare it for the mainline Linux.&amp;nbsp; However, the hardware ECC doesn't not seem to work above speeds of 33Mhz with EDO enabled on the Vybrid.&amp;nbsp; Why?&amp;nbsp; I suspect that the hardware ECC is asynchronous and if we read too fast, it can not handle the data rate.&amp;nbsp; Oddly, the faster clocking does not seem to increase the data rate much/at all for the Vybrid NFC controller.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 16:11:44 GMT</pubDate>
    <dc:creator>billpringlemeir</dc:creator>
    <dc:date>2013-12-19T16:11:44Z</dc:date>
    <item>
      <title>VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265085#M1553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Section &lt;STRONG&gt;31.4.5 Fast Flash Configuration for EDO&lt;/STRONG&gt; has the following,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;The NFC clock must be configured fast enough (usually &amp;gt; 33 MHz) according to the data sheet of flash devices.&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;On the IMX25, there are various timing diagrams which show how the NAND clock affect the timing.&amp;nbsp; Originally, the NFC_CLK (from Chapter 10) was 133MHz with the main line Linux.&amp;nbsp; I set this to 66MHz and the normal mode starts to function in EDO mode on the Tower board.&amp;nbsp; However, when I turn on the ECC code it fails.&amp;nbsp; I set the clock to 33Mhz and it is functioning.&amp;nbsp; &lt;STRONG&gt;9.12 Maximum Frequencies Supported&lt;/STRONG&gt; has a maximum clocking of 80Mhz for the module.&amp;nbsp; What kind of clock ranges does the module accept and are there timing diagrams so we can run a timing budget with our NAND chip selection and PCB traces?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;19.4.3 Clocks at Boot Time&lt;/STRONG&gt; has some timings that the boot code sets, but it never has the ECC enabled.&amp;nbsp; Clocks are &lt;EM&gt;30.85 (Normal Frequency)&lt;/EM&gt; and &lt;EM&gt;45.25 (Fast Frequency)&lt;/EM&gt;.&amp;nbsp; It seems odd that all of the MTD tests pass without ECC and a 66MHz clock, but they fail with ECC enabled.&amp;nbsp; The raw signals to the flash chip should be un-altered by the ECC; but I maybe running the NAND chip out of spec; how do I know?&amp;nbsp; Is the clocking different when the module ECC is enabled?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case, I have a software ECC (Hamming, much like boot code) and all checks pass.&amp;nbsp; There are other CRC32 data validations and no data or filesystem corruptions are observed with no hardware ECC and a 66MHz NFC clock.&amp;nbsp; However, as soon as the hardware ECC is enabled, usually the 2nd 16bit value is corrupted unless the clock is change to ~33Mhz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Dec 2013 22:08:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265085#M1553</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-16T22:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265086#M1554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timesyssupport"&gt;timesyssupport&lt;/A&gt; can you help on this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Dec 2013 22:57:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265086#M1554</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2013-12-18T22:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265087#M1555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be clear, &lt;STRONG&gt;mainline linux&lt;/STRONG&gt;, means I am using the Linux kernel 3.13-rc4 (actually the arm-soc for/next branch).&amp;nbsp; In the TimeSys Linux 3.0, the &lt;STRONG&gt;fsl_nfc&lt;/STRONG&gt; driver will not work unless u-boot sets up clocks; running the TimeSys 3.0 Linux from the mainline u-boot.imx has the SDHC/eMMC functioning, but the flash is not recognized due to the default clock that is set for the NFC peripheral.&amp;nbsp; For the combination of TimeSys Linux + TimeSys u-boot, the NFC clock is ~16.6MHz.&amp;nbsp; These are setup in &lt;EM&gt;lowlevel_init.S&lt;/EM&gt; via the macros in &lt;EM&gt;vybrid.h&lt;/EM&gt;,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;CONFIG_SYS_CLKCTRL_CSCMR1 - platform bus clock&lt;/LI&gt;&lt;LI&gt;CONFIG_SYS_CLKCTRL_CSCDR2 - clock invert, divide by 5&lt;/LI&gt;&lt;LI&gt;CONFIG_SYS_CLKCTRL_CSCDR3 - divide by 2.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is in the TimeSys u-boot source.&amp;nbsp; I guess the platform bus clock is 166MHz.&amp;nbsp; It seems like the TimeSys u-boot source divides by 10.&amp;nbsp; This is actually out of spec according to the &lt;STRONG&gt;EDO&lt;/STRONG&gt; text.&amp;nbsp; So in the Linux source we have,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp; /* SET FAST_FLASH = 1 */
&amp;nbsp;&amp;nbsp; #if 0
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nfc_set_field(mtd, NFC_FLASH_CONFIG,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_FAST_FLASH_MASK,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONFIG_FAST_FLASH_SHIFT, 1);
&amp;nbsp;&amp;nbsp; #endif
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which leaves the &lt;STRONG&gt;EDO&lt;/STRONG&gt; feature disabled.&amp;nbsp; Pg 22-23 of the Micron data sheets have the timing for EDO modes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If the host controller is using a t RC of 30ns or greater, the host can latch the data on the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rising edge of RE# (see the figure below for proper timing). If the host controller is using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; a t RC of less than 30ns, the host can latch the data on the next falling edge of RE#.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The EDO mode assumes a latch on the falling edge of RE#.&amp;nbsp; The value 33MHz corresponds to a 30nS timing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This controller seems to be far slower than the IMX version.&amp;nbsp; Sustained transfers of only 2MB/s write and 4MB/s read.&amp;nbsp; The IMX25 gets double the performance using a similar Micron chip set; The IMX25 is using an 8bit flash versus the Tower 16bit flash chip!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 15:49:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265087#M1555</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-19T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265088#M1556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Section &lt;STRONG&gt;3.7.6.2 NAND Flash Controller (NFC) Timing&lt;/STRONG&gt; of &lt;A href="http://cache.freescale.com/files/dsp/doc/data_sheet/IMX25CEC.pdf?pspll=1"&gt;IMX25CEC.pdf&lt;/A&gt; has the kind of timing diagrams I would expect/like so that we can know what kind of signalling the NAND flash chip can expect.&amp;nbsp; The IMX25 is a synchronously clocked controller.&amp;nbsp; Using the same Micron series with 8-bit 256MB version,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Linux MTD test modules provide a means to measure flash performance. &lt;/P&gt;&lt;TABLE style="background: #E6F7FF; color: blue; border: 2px solid darkgray;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="background: lightgreen; color: white;"&gt; NFC clock &lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt;T (nS)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Div &lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Write (MB/s)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Read (MB/s)&lt;/TH&gt;&lt;TH style="background: lightgreen; color: white;"&gt; Erase (MB/s) &lt;/TH&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 22MHz &lt;/TD&gt;&lt;TD&gt; 45 &lt;/TD&gt;&lt;TD&gt; /6 &lt;/TD&gt;&lt;TD&gt; 3.6 &lt;/TD&gt;&lt;TD&gt; 5.2 &lt;/TD&gt;&lt;TD&gt; 148 &lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 33MHz &lt;/TD&gt;&lt;TD&gt; 30 &lt;/TD&gt;&lt;TD&gt; /4 &lt;/TD&gt;&lt;TD&gt; 4.2 &lt;/TD&gt;&lt;TD&gt; 6.9 &lt;/TD&gt;&lt;TD&gt; 154 &lt;/TD&gt;&lt;/TR&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&amp;nbsp; 44MHz &lt;/TD&gt;&lt;TD&gt; 22 &lt;/TD&gt;&lt;TD&gt; /3 &lt;/TD&gt;&lt;TD&gt; 4.6 &lt;/TD&gt;&lt;TD&gt; 7.7 &lt;/TD&gt;&lt;TD&gt; 154 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These values on an IMX25 (especially @44MHz) are double the current Vybrid speeds.&amp;nbsp; I have re-written the &lt;STRONG&gt;fsl_nfc.c&lt;/STRONG&gt; driver and am trying to prepare it for the mainline Linux.&amp;nbsp; However, the hardware ECC doesn't not seem to work above speeds of 33Mhz with EDO enabled on the Vybrid.&amp;nbsp; Why?&amp;nbsp; I suspect that the hardware ECC is asynchronous and if we read too fast, it can not handle the data rate.&amp;nbsp; Oddly, the faster clocking does not seem to increase the data rate much/at all for the Vybrid NFC controller.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 16:11:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265088#M1556</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-19T16:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265089#M1557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At least part of the performance issue is due to the Linux driver structure; at least for the write side.&amp;nbsp; I am not sure why the read performance is so slow for the Vybrid controller.&amp;nbsp; Also, I still don't understand why the hardware ECC fails with faster clock rates.&amp;nbsp; Finally, it is not entirely clear what kind of signalling the NFC will generate.&amp;nbsp; Maybe I have to solder a bunch of fly wires...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Dec 2013 00:16:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265089#M1557</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-21T00:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265090#M1558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now, I am smoking the IMX25 [&lt;EM&gt;memcpy()&lt;/EM&gt; vs &lt;EM&gt;memcpy_fromio()&lt;/EM&gt;],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;mtd_speedtest: MTD device: 1
mtd_speedtest: MTD device size 8388608, eraseblock size 131072, page size 2048, count of eraseblocks 64, pages per eraseblock 64, OOB size 64
mtd_test: scanning for bad eraseblocks
mtd_test: scanned 64 eraseblocks, 0 are bad
mtd_speedtest: testing eraseblock write speed
mtd_speedtest: eraseblock write speed is 4284 KiB/s
mtd_speedtest: testing eraseblock read speed
mtd_speedtest: eraseblock read speed is 16286 KiB/s
mtd_speedtest: testing page write speed
mtd_speedtest: page write speed is 3560 KiB/s
mtd_speedtest: testing page read speed
mtd_speedtest: page read speed is 15937 KiB/s
mtd_speedtest: testing 2 page write speed
mtd_speedtest: 2 page write speed is 3893 KiB/s
mtd_speedtest: testing 2 page read speed
mtd_speedtest: 2 page read speed is 16125 KiB/s
mtd_speedtest: Testing erase speed
mtd_speedtest: erase speed is 132129 KiB/s
mtd_speedtest: Testing 2x multi-block erase speed
mtd_speedtest: 2x multi-block erase speed is 234057 KiB/s
mtd_speedtest: Testing 4x multi-block erase speed
mtd_speedtest: 4x multi-block erase speed is 248242 KiB/s
mtd_speedtest: Testing 8x multi-block erase speed
mtd_speedtest: 8x multi-block erase speed is 256000 KiB/s
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The buffering must be re-written to improve the write speed; it should be about 8MB/s. However, I still want to know why the ECC controller fails above 33MHz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Dec 2013 00:43:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265090#M1558</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2013-12-21T00:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265091#M1559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timesyssupport"&gt;timesyssupport&lt;/A&gt; do you have an update on this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 16:33:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265091#M1559</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2014-01-06T16:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265092#M1560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your detailed analysis of this issue. I have added this as a bug in our internal issue tracking for the Linux 3.0 kernel for Vybrid. I do not have an ETA on a fix for this, as our development resources are focused on updating to a later version of the kernel for Vybrid. If this is a time sensitive issue for you, I would recommend escalating with Timesys as a services project.&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 15:50:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265092#M1560</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-07T15:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265093#M1561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what the issue you have filed is?&amp;nbsp; Your driver is slow?&amp;nbsp; I have attached patches for the 3.12-3.14 series that allow the Vybrid-NFC device to be used; It is GPL and your developers are free to use it.&amp;nbsp; I am still working on minor issues before I try to submit it.&amp;nbsp; The 'devm' and 'of' (open firmware/device tree) stuff would need to be removed to back-port to the 3.0 TimeSys series.&amp;nbsp; Also, the 'FAST_FLASH' should not be set if the NFC clock remains under ~30Mhz as the TimeSys U-boot does.&amp;nbsp; My original question was related to how the NFC clock input affects the module.&amp;nbsp; If the clock is above 33MHz, the hardware ECC begins to fail.&amp;nbsp; As the TimeSys code never runs above ~13MHz, you will never see this issue.&amp;nbsp; I don't think that TimeSys can answer this question.&amp;nbsp; This needs to be answered by Freescale or have I missed something in your reply?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 16:53:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265093#M1561</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2014-01-07T16:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265094#M1562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for attaching the patches. I filed the issue as that the ECC controller fails when the NFC clock is set over 33MHz. This may not be a driver issue, in which case Freescale would be better suited to assist with this issue. To confirm, you see the same issue when using your patches with mainline Linux, correct?&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 17:16:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265094#M1562</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-07T17:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265095#M1563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can only see this issue with the main-line driver above; more over only the mainline has the infra-structure to set the input clock to the NFC.&amp;nbsp; I guess if you edit the 'u-boot' source to change the NFC clock, you would see the issue with the TimeSys 3.0 driver; but I have not tried this.&amp;nbsp; The way the 'u-boot' and 'Linux' combination is setup with TimeSys, there is no way to clock the NFC above ~13MHz unless the source is modified.&amp;nbsp; With the mainline driver I have above, altering 'vf610-twr.dts' nfc '&amp;lt;clock&amp;gt;' line, you can change the frequency in divisors of 133Mhz (66, 44, 33, 26, 22, 19, 16, etc).&amp;nbsp; To verify with the TimeSys driver, the u-boot's CONFIG_SYS_CLKCTRL_CSCDR2 and CONFIG_SYS_CLKCTRL_CSCDR3 can change to alter the divisor and the 'FAST_FLASH' should be enabled (EDO flash mode).&amp;nbsp; The software ECC should work at 66MHz and 44Mhz, but the hardware ECC would fail (as per my observations).&amp;nbsp; I have dumped the buffers and the 2nd word is corrupt always.&amp;nbsp; I think that the ECC controller goes crazy with it's 'correction' if it is clocked above 33MHz, which is a magic number for the 'FAST_FLASH' to work.&amp;nbsp; Clocking above 33Mhz does not significantly improve read/write/erase performance as the controller make NFC access CPU bound.&amp;nbsp; However, below 33MHz, the time to move data from the flash starts to be more significant.&amp;nbsp; &lt;STRONG&gt;tR_ECC&lt;/STRONG&gt; is typical 45uS, max 70 uS for the Micron flash (move data from NAND cell to NAND buffer); during this time the NFC is waiting for READY/BUSY.&amp;nbsp; The interface timing is ~16nS*1k -&amp;gt; 16uS (the minimum time for the NFC to act during a page read).&amp;nbsp;&amp;nbsp; This is the time related to NFC clock input; but I don't know how.&amp;nbsp; It seems that 33MHz gives a read speed of ~15MB/s and 66MHz gives a read speed of 16.6MB/s.&amp;nbsp; The Hardware ECC @33MHz gives 16.2MB/s as in the numbers above; it is &lt;EM&gt;in-between &lt;/EM&gt;as the software doesn't run the ECC, but the interface time runs slower (the NFC moving data from flash to buffers time increased).&amp;nbsp; If you could confirm the hardware ECC busts above 33MHz, that would help.&amp;nbsp; If I confirm, can we get someone from Freescale to answer/act or should I open a service request with Freescale or something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also things &lt;STRONG&gt;may work &lt;/STRONG&gt;as in HardwareECC@33MHz; but that doesn't mean they are right.&amp;nbsp; I don't want the code to fail on one out of every 1000 units, especially on a hot day in some dirty location that I have to visit to diagnose the issue.&amp;nbsp; I would like some official confirmation on the timing for the chip.&amp;nbsp; Usually you must do a timing budget for the system, which is the flash chip, the flash controller and the PCB inter-connect.&amp;nbsp; Each new Vybrid design using NAND flash should have the information on the controller so an appropriate clock can be picked (no matter what software is used).&amp;nbsp; There really is no timing documentation on this NFC controller?&amp;nbsp;&amp;nbsp; The same controller seems to be used for the MPC5125 (PowerPC) and the MCF54418 (ColdFire) SOCs.&amp;nbsp; Is there an NDA or public timing diagram for these SOC and the NFC in those implementations?&amp;nbsp; I think the Hardware ECC failing above 33MHz is an errata, but only a system designer could say if it may reliably work at 33MHz under different voltage/temperatures.&amp;nbsp; Or maybe I have set something up wrong; but if this is the case, it is most likely related to timing which I have no information on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; The timing is available in &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/VYBRIDFSERIESEC.pdf?fpsp=1"&gt;Vybrid Fact sheet section 9.5.2&lt;/A&gt;.&amp;nbsp; This was the electrical/timing data that I wanted.&amp;nbsp; Now section &lt;STRONG&gt;9.10.4 NFC clocking&lt;/STRONG&gt; of the software user manual makes no sense.&amp;nbsp; There is no mention of high/low time there.&amp;nbsp; The clock inversion parameter makes more sense with the &lt;EM&gt;fact sheet&lt;/EM&gt; timing.&amp;nbsp; However, this additional information doesn't explain the Hardware ECC failure above 33MHz.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd EDIT:&lt;/STRONG&gt; Apparently the &lt;EM&gt;Vybrid Fact sheet&lt;/EM&gt; is a copy of the Kinetis parts? See: &lt;A _jive_internal="true" href="https://community.nxp.com/message/334844#334844http:"&gt;MQX and Kinetis&lt;/A&gt;.&amp;nbsp; Also the &lt;A href="http://cache.freescale.com/files/microcontrollers/doc/data_sheet/K70P256M120SF3.pdfhttp://"&gt;&lt;SPAN&gt;MK70FN1M0VMJ12&lt;/SPAN&gt; data sheet, section 6.4.3.&lt;/A&gt; which is the same as the Vybrid document. This part seems to have a SIM_CLKDIV4; probably the Vybrid supplies tH/tL in a different way?&amp;nbsp; So I still do not know of any definitive answer on the Vybrid timing.&amp;nbsp; I think part of the story is in the &lt;EM&gt;fact sheet &lt;/EM&gt;timing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3rd Edit:&lt;/STRONG&gt; I have open &lt;STRONG&gt;Service Request SR 1-1262845281&lt;/STRONG&gt;.&amp;nbsp; This confirms that the electrical data sheet does not have the complete information.&amp;nbsp; Ie, the &lt;STRONG&gt;SIM_CLKDIV4&lt;/STRONG&gt; register doesn't exist on the Vybrid and there is some other timing source to the NFC controller; probably 9.10.4, but is the clock ever asymmetric.&amp;nbsp; Ie,&amp;nbsp; Is there still GLUE between these?&amp;nbsp; Or is NFC clock feed direct, which makes the &lt;STRONG&gt;NFC_CLK_INV&lt;/STRONG&gt; bit in &lt;STRONG&gt;CCM_CSCDR2[14]&lt;/STRONG&gt; rather confusing unless there is some phase relation.&amp;nbsp; I believe the MQX driver divides the platform clock by 5 for a 26MHz source and it does not set &lt;STRONG&gt;FASTFLASH&lt;/STRONG&gt;, which also indicates a clocking under 33MHz.&amp;nbsp; The MQX driver does enable hw-ecc by default.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 18:15:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265095#M1563</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2014-01-07T18:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265096#M1564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/timesyssupport"&gt;timesyssupport&lt;/A&gt; please continue with the follow up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 16:51:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265096#M1564</guid>
      <dc:creator>karina_valencia</dc:creator>
      <dc:date>2014-01-10T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265097#M1565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are looking into reproducing this issue with the Timesys BSP. We expect to have an update early next week.&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jan 2014 00:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265097#M1565</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-11T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265098#M1566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an attempt to reproduce this issue with the Timesys BSP, in u-boot 2011.12, I set CONFIG_SYS_CLKCTRL_CSCDR2 to 0x30114210 (for a total nfc clock divide of 4, leaving the nfc clock over 33MHz).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Linux 3.0, I removed the #if block around the FAST_FLASH comment to enable EDO mode, and set CONFIG_MTD_NAND_FSL_NFC_SWECC=n in the kernel configuration (so hardware ecc is used). I was not successful in seeing any problems - the kernel loaded successfully, and I was also able to mount a jffs2 image as the root filesystem. Was there anything else you would like us to try under these conditions?&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 23:02:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265098#M1566</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-13T23:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265099#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;4th Edit: &lt;/STRONG&gt;I had an &lt;EM&gt;off by one&lt;/EM&gt; error in setting the NFC clock.&amp;nbsp; My divide by 3 was actually 4; the CCM adds one to everything.&amp;nbsp; My '/3' is actually divide by 4 or 33MHz, which works.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3rd Edit: &lt;/STRONG&gt;I am running the same test with the mainline u-boot and the TimeSys 3.0 Linux driver and I also &lt;STRONG&gt;don't&lt;/STRONG&gt; see any issues when running the &lt;A href="http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;EM&gt;mtd_pagetest.ko&lt;/EM&gt;&lt;/A&gt;. I will look into this some more.&amp;nbsp; It is odd that the &lt;EM&gt;mtd_speedtest.ko&lt;/EM&gt; is giving the same results no matter what the clock is, but maybe the driver is the overhead.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2nd Edit: &lt;/STRONG&gt;To quickly test, use the &lt;A href="http://www.linux-mtd.infradead.org/doc/general.html#L_mtd_tests" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;EM&gt;mtd_pagetest.ko&lt;/EM&gt; &lt;/A&gt;as I have done below.&amp;nbsp; Hopefully it passes with Software ECC and at lower speed hardware ECC.&amp;nbsp; If it always fails, then you can not use this test and need to fix your driver.&amp;nbsp; I have high lighted some issues below; mainly the current driver doesn't detect hardware ECC errors and turns off hardware ECC for some critical pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CONFIG_SYS_CLKCTRL_CSCDR2 and CONFIG_SYS_CLKCTRL_CSCDR3 must both change; they both have NFC divisors.&amp;nbsp; With&amp;nbsp; a divisor of four, the platform bus speed is 133MHz and this gives the 33MHz value.&amp;nbsp; Are you sure you are clocking faster than 33MHz?&amp;nbsp; You should be able to divide by 2 or 3.&amp;nbsp; '3' should fail at either 133MHz or 166Mhz platform bus and be in-range according to spec.&amp;nbsp; Also, it may boot and mount.&amp;nbsp; The driver you are using doesn't check for errors.&amp;nbsp; Look for &lt;EM&gt;fsl_nfc_check_ecc_status();&lt;/EM&gt; There is a &lt;A _jive_internal="true" href="https://community.nxp.com/message/368216#368216" rel="nofollow noopener noreferrer" target="_blank"&gt;bug in the documentation&lt;/A&gt; in regards to the &lt;EM&gt;ecc_status &lt;/EM&gt;line.&amp;nbsp; Change the '7' to a '4' and I think you will read the correct ECC status (also there is an implementation in &lt;EM&gt;nfc_correct_data()&lt;/EM&gt; in my 2nd patch above if you want to refer to that).&amp;nbsp; The symptom of the corruption for me was that the 2nd word was invalid.&amp;nbsp; Can you compile the 'mtd tests' (CONFIG_MTD_TESTS) and load these modules (from drivers/mtd/test/*.ko) to validate the nand flash system?&amp;nbsp; I think this is a more reliable test.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, there is &lt;EM&gt;if(!(page%0x40))&amp;nbsp; &lt;/EM&gt;in &lt;EM&gt;fsl_nfc_command().&lt;/EM&gt;&amp;nbsp; This should be un-needed, but it maybe what is making jffs2 work as usually flash headers are placed at the start of an erase sector which I think is what the '0x40' is about (64*2k=128k erase block).&amp;nbsp; I am not really familiar with jffs2 and always use ubi/ubifs; but the mtd tests are best.&amp;nbsp; The 'page test' is the most basic one which should pass.&amp;nbsp; Enable the &lt;EM&gt;fsl_nfc_check_ecc_status()&amp;nbsp; (&lt;/EM&gt;with fix) in &lt;EM&gt;fsl_nfc_read_page()&lt;/EM&gt;, and see if there are any kernel logs printed where the ECC is reported as failed.&amp;nbsp; When I turn the NFC clock above 33MHz, the controller gives errors.&amp;nbsp; Inspecting read/write buffers was showing the 2nd word as failing.&amp;nbsp; The ECC stops here and the rest of the buffer is fine.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Also, if it is still passing and you have patches can you supply them and so I can retry on my hardware?&amp;nbsp; Perhaps the silicon revision maters?&amp;nbsp; This should tell if it is my code with an issue or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bill Pringlemeir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: &lt;/STRONG&gt;Below is a sample session from an &lt;EM&gt;initramfs&lt;/EM&gt; to test an MTD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;# cd /lib/modules
# ls
drwxr-xr-x 2 0 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 .
drwxr-xr-x 4 0 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 ..
-rwxr-xr-x 1 0 0&amp;nbsp; 8511 mtd_nandecctest.ko
-rwxr-xr-x 1 0 0 12970 mtd_speedtest.ko
-rwxr-xr-x 1 0 0 13878 mtd_subpagetest.ko
-rwxr-xr-x 1 0 0 12640 mtd_nandbiterrs.ko
-rwxr-xr-x 1 0 0 16479 mtd_oobtest.ko
-rwxr-xr-x 1 0 0&amp;nbsp; 9593 mtd_readtest.ko
-rwxr-xr-x 1 0 0 13869 mtd_pagetest.ko
-rwxr-xr-x 1 0 0&amp;nbsp; 9826 mtd_stresstest.ko
# insmod ./mtd_pagetest.ko dev=1

=================================================
mtd_pagetest: MTD device: 1
mtd_pagetest: MTD device size 8388608, eraseblock size 131072, page size 2048, count of eraseblocks 64, pages per eraseblock 64, OOB size 64
mtd_test: scanning for bad eraseblocks
mtd_test: scanned 64 eraseblocks, 0 are bad
mtd_pagetest: erasing whole device
mtd_pagetest: erased 64 eraseblocks
mtd_pagetest: writing whole device
mtd_pagetest: written up to eraseblock 0
mtd_pagetest: written 64 eraseblocks
mtd_pagetest: verifying all eraseblocks
mtd_pagetest: verified up to eraseblock 0
mtd_pagetest: verified 64 eraseblocks
mtd_pagetest: crosstest
mtd_pagetest: reading page at 0x0
mtd_pagetest: reading page at 0x7ff800
mtd_pagetest: reading page at 0x0
mtd_pagetest: verifying pages read at 0x0 match
mtd_pagetest: crosstest ok
mtd_pagetest: erasecrosstest
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: erasing block 63
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0
mtd_pagetest: erasecrosstest ok
mtd_pagetest: erasetest
mtd_pagetest: erasing block 0
mtd_pagetest: writing 1st page of block 0
mtd_pagetest: erasing block 0
mtd_pagetest: reading 1st page of block 0
mtd_pagetest: verifying 1st page of block 0 is all 0xff
mtd_pagetest: erasetest ok
mtd_pagetest: finished with 0 errors
=================================================
# 
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On a system clocked over 33MHz, this gives me errors.&amp;nbsp; You may wish several MTD partitions as the errors are large.&amp;nbsp; For example, adding &lt;EM&gt;mtdparts=NAND:256k(loader),8M(boot0),8M(boot1),-(root)&lt;/EM&gt; to &lt;EM&gt;bootargs &lt;/EM&gt;will give a small 256k &lt;EM&gt;mtd0&lt;/EM&gt; which is good as the kernel log will be large if the problem occurs for you.&amp;nbsp; Above, I tested an 8M partition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 16:20:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265099#M1567</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2014-01-14T16:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265100#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bill,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I set CONFIG_SYS_CLKCTRL_CSCDR2 to 0x30114210 and CONFIG_SYS_CLKCTRL_CSCDR3 to 0x00003F1F, which had a total divisor of 4. I can try with a total divisor of 2 (eg change CONFIG_SYS_CLKCTRL_CSCDR2 to 0x30114200). I will change &lt;EM&gt;fsl_nfc_check_ecc_status() &lt;/EM&gt;and try compiling and running the mtd tests, and let you know what the results are. I will supply patches once I have completed running the tests as well.&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2014 22:30:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265100#M1568</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-14T22:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265101#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Edit:&amp;nbsp; &lt;/STRONG&gt;As per above, the '/3' is actually '/4' or 33MHz.&amp;nbsp; I changed the CSCDR2 from 0x??????3? to 0x??????2? and the TimeSys 3.0 Linux NFC also starts to fail in &lt;EM&gt;hardware ECC&lt;/EM&gt; mode for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;Sorry, I don't know if you saw my post.&amp;nbsp; It went to a moderator.&amp;nbsp; I have altered the mainline u-boot to setup the clocks for the TimeSys 3.0 Linux NFC and I set the clock to divide by 3 and it still seems to work!&amp;nbsp; With Linux 3.13+, I can print-out the clock tree and the &lt;STRONG&gt;platform bus &lt;/STRONG&gt;clock is 133MHz.&amp;nbsp; I am not 100% sure what the &lt;STRONG&gt;platform bus&lt;/STRONG&gt; clock is for your case.&amp;nbsp; But a divide by four of 133MHz gives ~33MHz.&amp;nbsp; However, I haven't seen any issue with the TimeSys 3.0 version of the driver running at /3 bus speed (should be 44Mhz).&amp;nbsp; I get some marginal increases with speedtest,&lt;/SPAN&gt;&lt;SUP&gt;Preceding information is wrong.&lt;/SUP&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; stock -&amp;gt; 2053kb/S read and 4023 kb/S write.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;/3&lt;/SPAN&gt;/4hw -&amp;gt; 2265kb/S read and 4654 kb/S write&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;/3&lt;/SPAN&gt;/4sw -&amp;gt; 2570kb/S read and 4457 kb/S write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This with the TimeSys 3.0 nfc driver.&amp;nbsp; The clock does increase the speed marginally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still investigating what else is different between the drivers.&amp;nbsp; My code does work until the clock goes above 33Mhz and the the hardware ECC signals error on reads.&amp;nbsp; With Software ECC, I can run at 66Mhz without errors with the updated driver.&amp;nbsp; It must be some sort of race in the driver if it is software related.&amp;nbsp; The TimeSys driver is running about 4x slower due to the software structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The controller doesn't support running above 80Mhz; make sure you don't exceed that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jan 2014 00:06:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265101#M1569</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2014-01-15T00:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265102#M1570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After making the attached modifications to u-boot (platform clock divider = 3) and Linux, and setting&amp;nbsp; CONFIG_MTD_NAND_FSL_NFC_SWECC=n in the kernel configuration, I was able to run mtd_pagetest successfully. I also tried booting from a jffs2 image in NAND. There are a number of 'ECC failed to correct all errors!' messages printed to console, but system appears to be functional.&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 17:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265102#M1570</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-16T17:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265103#M1571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you retry with CSCDR3 as &lt;SPAN style="text-decoration: line-through;"&gt;0x00000F1F&lt;/SPAN&gt; 0x1F1F?&amp;nbsp; We currently have 0x00003F0F &lt;SPAN style="text-decoration: line-through;"&gt;and both must have mis-read the data sheet.&amp;nbsp; Maybe I mis-read it and you just followed my mistake...&lt;/SPAN&gt;;your patches clued me in.&amp;nbsp; Anyways, I don't think we have had the clock set to &amp;gt;33Mhz with the TimeSys 3.0 code.&amp;nbsp; I have a u-boot set this way and I get failures now with the 3.0 code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A few 'ECC fail...' are normal as when code reads an erased page, there is no ECC bytes in the OOB (extra area).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;So, originally, the clock was running at /20 of 133Mhz or ~6.5Mhz.&lt;/SPAN&gt;&amp;nbsp; I also confirmed that&amp;nbsp; the platform bus clock seems to be 133Mhz (at least in my setup).&amp;nbsp; I enable&amp;nbsp; &lt;STRONG&gt;CLK_DEBUG&amp;nbsp; &lt;/STRONG&gt;and patched the &lt;EM&gt;mach-mvf/clock.c,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;+++ b/arch/arm/mach-mvf/clock.c
@@ -1956,11 +1956,13 @@ int __init mvf_clocks_init(unsigned long ckil, unsigned long osc,
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; apll_base = MVF_IO_ADDRESS(MVF_ANATOP_BASE_ADDR);
 
-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; ARRAY_SIZE(lookups); i++)
-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clkdev_add(&amp;amp;lookups[i]);
-
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clk_tree_init();
 
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i = 0; i &amp;lt; ARRAY_SIZE(lookups); i++) {
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clkdev_add(&amp;amp;lookups[i]);
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; clk_debug_register(lookups[i].clk);
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do&amp;nbsp; a &lt;EM&gt;mount -t debugfs debugs /sys/kernel/debug&lt;/EM&gt; and there are then files in &lt;EM&gt;/sys/kernel/debug/clock&lt;/EM&gt; which have the clock rates as Linux sees things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: &lt;/STRONG&gt;I did read the data sheet correctly the first time.&amp;nbsp; Bits 13-15 in CSCDR3 are the NFC_PRE_DIV.&amp;nbsp; I was thinking Bits 12-15 when I wrote the striked out text above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 18:42:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265103#M1571</guid>
      <dc:creator>billpringlemeir</dc:creator>
      <dc:date>2014-01-16T18:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: VF6xxx NFC (NAND) module clocking</title>
      <link>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265104#M1572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Bill,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the above modifications to the Linux 3.0 kernel to see what the platform bus clock rate is. Unfortunately, this is just hard-coded in the kernel source (in the &lt;/P&gt;&lt;P&gt;_clk_periph_get_rate() function in clock.c, as 132MHz), so it is not giving a true glimpse of the clock rate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After re-running mtd_pagetest with CSCDR2 = 0x30114220 and CSCDR3 = 0x00001F1F set in u-boot (nfc clock divider of 3), I too am getting numerous errors (mtd_pagetest: error: verify failed at 0x*),&lt;/P&gt;&lt;P&gt;so this does not appear to be a bootloader/kernel specific issue. Also, when setting the NFC clock divider &amp;lt;=3, this causes u-boot 2011.12 to not recognize the NAND flash controller: It is recognized in Linux, however, which made it possible to run mtd_pagetest.&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;Timesys Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 00:34:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Vybrid-Processors/VF6xxx-NFC-NAND-module-clocking/m-p/265104#M1572</guid>
      <dc:creator>timesyssupport</dc:creator>
      <dc:date>2014-01-21T00:34:22Z</dc:date>
    </item>
  </channel>
</rss>

