<?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: GPIO set and clear time duration in u-boot in IMX6</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684862#M105893</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi uday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some customers achieved working with GPIO on SDK :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the trick was to enable MMU, the L2 cache, and set the mmu entry that cover the &lt;BR /&gt;GPIO_DR address of Device type (which set the bufferable attribute)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ mmu_enable();&lt;BR /&gt;+ // Enable L2 Cache&lt;BR /&gt;+ _l2c310_cache_setup();&lt;BR /&gt;+ _l2c310_cache_invalidate();&lt;BR /&gt;+ _l2c310_cache_enable(); &lt;BR /&gt;- mmu_map_l1_range(0x00a00000, 0x00a00000, 0x0f600000, kStronglyOrdered,kShareable, kRWAccess); // More peripherals&lt;BR /&gt;+ mmu_map_l1_range(0x00a00000, 0x00a00000, 0x0f600000, kDevice, kShareable, kRWAccess); // More peripherals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is the entry for mapping a chunk of 0x0f600000 bytes of physical memory &lt;BR /&gt;(0x000A00000 - 0x10000000) to its virtual address 0x000A00000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a 1 to 1 mapping. As one can see all the GPIO registers (0x0209C000 - 0x020B401C) fall in these area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference between the the KStronglyOrdered and the KDevice type is that the later &lt;BR /&gt;enable the bufferable option in its entry descriptor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case kStronglyOrdered:&lt;BR /&gt;entry.c = 0;&lt;BR /&gt;entry.b = 0;&lt;BR /&gt;entry.tex = 0;&lt;BR /&gt;entry.s = 1; // Ignored&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case kDevice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (isShareable)&lt;BR /&gt;{&lt;BR /&gt;entry.c = 0; &lt;BR /&gt;entry.b = 1; &lt;BR /&gt;entry.tex = 0;&lt;BR /&gt;entry.s = 1; // Ignored&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If one already have the L2 cache enabled and the MMU, try to find the entry that &lt;BR /&gt;correspond to the area where the GPIO registers are mapped and set the bufferable &lt;BR /&gt;field for that particuat entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linux some customers succeded to decrease time to 92 ns (184 ns period to toggle IO) &lt;BR /&gt;using direct register acces in a kernel module.&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>Wed, 05 Jul 2017 11:47:46 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2017-07-05T11:47:46Z</dc:date>
    <item>
      <title>GPIO set and clear time duration in u-boot in IMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684861#M105892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; We are using IMX6Quad processor where we set and clear a gpio 3,21 with assembly code in u-boot given below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static iomux_v3_cfg_t const gpio_toggle_pads[] = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MX6_PAD_EIM_D21__GPIO3_IO21&amp;nbsp;&amp;nbsp; &amp;nbsp;| MUX_PAD_CTRL(NO_PAD_CTRL),&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;static void gpio_toggle(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;imx_iomux_v3_setup_multiple_pads(gpio_toggle_pads, ARRAY_SIZE(gpio_toggle_pads));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;gpio_direction_output(IMX_GPIO_NR(3, 21),0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" ldr r0,=0x20A4000");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;asm(" ldr r1,=(1&amp;lt;&amp;lt;21)");&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;asm(" ldr r2,=(0&amp;lt;&amp;lt;21)");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" str r1,[r0]");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" str r2,[r0]");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" str r1,[r0]");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" str r2,[r0]");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; asm(" str r1,[r0]");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="scope_28.bmp"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26145iB6BF842F2BFBB754/image-size/large?v=v2&amp;amp;px=999" role="button" title="scope_28.bmp" alt="scope_28.bmp" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;where for the first low to high is 300ns , and others either low to high or high to low its around 270ns.&lt;/P&gt;&lt;P&gt;1.why this much delay(270ns) between setting and clearing of gpio in imx6 processors ?&lt;/P&gt;&lt;P&gt;2.please provide us solutions to reduce it if possible ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 10:21:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684861#M105892</guid>
      <dc:creator>udayakumar</dc:creator>
      <dc:date>2017-07-05T10:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO set and clear time duration in u-boot in IMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684862#M105893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi uday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some customers achieved working with GPIO on SDK :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the trick was to enable MMU, the L2 cache, and set the mmu entry that cover the &lt;BR /&gt;GPIO_DR address of Device type (which set the bufferable attribute)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+ mmu_enable();&lt;BR /&gt;+ // Enable L2 Cache&lt;BR /&gt;+ _l2c310_cache_setup();&lt;BR /&gt;+ _l2c310_cache_invalidate();&lt;BR /&gt;+ _l2c310_cache_enable(); &lt;BR /&gt;- mmu_map_l1_range(0x00a00000, 0x00a00000, 0x0f600000, kStronglyOrdered,kShareable, kRWAccess); // More peripherals&lt;BR /&gt;+ mmu_map_l1_range(0x00a00000, 0x00a00000, 0x0f600000, kDevice, kShareable, kRWAccess); // More peripherals&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above is the entry for mapping a chunk of 0x0f600000 bytes of physical memory &lt;BR /&gt;(0x000A00000 - 0x10000000) to its virtual address 0x000A00000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a 1 to 1 mapping. As one can see all the GPIO registers (0x0209C000 - 0x020B401C) fall in these area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference between the the KStronglyOrdered and the KDevice type is that the later &lt;BR /&gt;enable the bufferable option in its entry descriptor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case kStronglyOrdered:&lt;BR /&gt;entry.c = 0;&lt;BR /&gt;entry.b = 0;&lt;BR /&gt;entry.tex = 0;&lt;BR /&gt;entry.s = 1; // Ignored&lt;BR /&gt;break;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case kDevice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (isShareable)&lt;BR /&gt;{&lt;BR /&gt;entry.c = 0; &lt;BR /&gt;entry.b = 1; &lt;BR /&gt;entry.tex = 0;&lt;BR /&gt;entry.s = 1; // Ignored&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If one already have the L2 cache enabled and the MMU, try to find the entry that &lt;BR /&gt;correspond to the area where the GPIO registers are mapped and set the bufferable &lt;BR /&gt;field for that particuat entry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In linux some customers succeded to decrease time to 92 ns (184 ns period to toggle IO) &lt;BR /&gt;using direct register acces in a kernel module.&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>Wed, 05 Jul 2017 11:47:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684862#M105893</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-07-05T11:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO set and clear time duration in u-boot in IMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684863#M105894</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;can you give me the linux SDK version and link for imx6Quad processors to work on ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;uday&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:52:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684863#M105894</guid>
      <dc:creator>udayakumar</dc:creator>
      <dc:date>2017-07-05T13:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO set and clear time duration in u-boot in IMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684864#M105895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi uday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK" title="https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK"&gt;swp-report/iMX6_Platform_SDK at master · backenklee/swp-report · GitHub&lt;/A&gt;&amp;nbsp;&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, 05 Jul 2017 23:04:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-set-and-clear-time-duration-in-u-boot-in-IMX6/m-p/684864#M105895</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2017-07-05T23:04:28Z</dc:date>
    </item>
  </channel>
</rss>

