<?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: ECSPI driver for kernel 2.6.35.3?</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/ECSPI-driver-for-kernel-2-6-35-3/m-p/175588#M6550</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, found a solution!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ECSPI is already implemented in mxc_spi.c. To select the correct SPI implementation the following spi_version has to be set.&lt;/P&gt;&lt;P&gt;static struct mxc_spi_master mxcspi1_data = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.maxchipselect = 2,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.spi_version = 23,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.chipselect_active = mx53_ft_gpio_spi_chipselect_active,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.chipselect_inactive = mx53_ft_gpio_spi_chipselect_inactive,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless the SPI clock frequency is still limited to 12MBit. Looking through the source code I found function mx53_clocks_init() in arch/arm/mach-mx5/clock.c.&lt;/P&gt;&lt;P&gt;The parent clock for the SPI Modul is set to the 24MHz input oscillator frequency.&lt;/P&gt;&lt;P&gt;clk_set_parent(&amp;amp;cspi_main_clk, &amp;amp;lp_apm_clk);&lt;BR /&gt;clk_set_rate(&amp;amp;cspi_main_clk, 12000000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get higher baudrate change these two lines to:&lt;/P&gt;&lt;P&gt;clk_set_parent(&amp;amp;cspi_main_clk, &amp;amp;pll3_sw_clk);&lt;BR /&gt;clk_set_rate(&amp;amp;cspi_main_clk, 60000000);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jul 2012 17:27:19 GMT</pubDate>
    <dc:creator>Rooney</dc:creator>
    <dc:date>2012-07-16T17:27:19Z</dc:date>
    <item>
      <title>ECSPI driver for kernel 2.6.35.3?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/ECSPI-driver-for-kernel-2-6-35-3/m-p/175587#M6549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an ECSPI driver for kernel 2.6.35.3 available?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I'm using the CSPI driver mxc_spi.c, but unfortunately the SPI clock is limited to about 12MBit. According to the datasheet ECSPI should work up to 60MBit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rooney&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 13:06:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/ECSPI-driver-for-kernel-2-6-35-3/m-p/175587#M6549</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-07-16T13:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: ECSPI driver for kernel 2.6.35.3?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/ECSPI-driver-for-kernel-2-6-35-3/m-p/175588#M6550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, found a solution!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ECSPI is already implemented in mxc_spi.c. To select the correct SPI implementation the following spi_version has to be set.&lt;/P&gt;&lt;P&gt;static struct mxc_spi_master mxcspi1_data = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.maxchipselect = 2,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.spi_version = 23,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.chipselect_active = mx53_ft_gpio_spi_chipselect_active,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;.chipselect_inactive = mx53_ft_gpio_spi_chipselect_inactive,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless the SPI clock frequency is still limited to 12MBit. Looking through the source code I found function mx53_clocks_init() in arch/arm/mach-mx5/clock.c.&lt;/P&gt;&lt;P&gt;The parent clock for the SPI Modul is set to the 24MHz input oscillator frequency.&lt;/P&gt;&lt;P&gt;clk_set_parent(&amp;amp;cspi_main_clk, &amp;amp;lp_apm_clk);&lt;BR /&gt;clk_set_rate(&amp;amp;cspi_main_clk, 12000000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get higher baudrate change these two lines to:&lt;/P&gt;&lt;P&gt;clk_set_parent(&amp;amp;cspi_main_clk, &amp;amp;pll3_sw_clk);&lt;BR /&gt;clk_set_rate(&amp;amp;cspi_main_clk, 60000000);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2012 17:27:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/ECSPI-driver-for-kernel-2-6-35-3/m-p/175588#M6550</guid>
      <dc:creator>Rooney</dc:creator>
      <dc:date>2012-07-16T17:27:19Z</dc:date>
    </item>
  </channel>
</rss>

