<?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>PowerQUICC ProcessorsのトピックMPC8309 GPIO</title>
    <link>https://community.nxp.com/t5/PowerQUICC-Processors/MPC8309-GPIO/m-p/462196#M1311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to control a gpio of MPC8309twr. In my driver, I used gpio_request(38, "gpio_reset") function to request the "USBDR_TXDRXD6/GPIO_38/QE_BRG_9" I/O signal. But the function alway return a negative number.&lt;/P&gt;&lt;P&gt;I have configurated the kernel, added the "QE GPIO support" and "GPIO Support" and "/sys/class/gpio/... (sysfs interface)". In order to multiplex the GPIO_38, I set the SICR_2 register as 0x00080000. In mpc8390twr.dts, I add lines as follows:&lt;/P&gt;&lt;P&gt;gpio2: gpio-controller@d00 {&lt;/P&gt;&lt;P&gt;&amp;nbsp; #gpio-cells = &amp;lt;2&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = &amp;lt;0xd00 0x100&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; interrupts = &amp;lt;75 0x8&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; interrupt-parent = &amp;lt;&amp;amp;ipic&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; gpio-controller;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything wrong in my configuration ?&lt;/P&gt;&lt;P&gt;I will appreciate all your comments and suggestions!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2016 07:16:12 GMT</pubDate>
    <dc:creator>lijiankun198</dc:creator>
    <dc:date>2016-03-31T07:16:12Z</dc:date>
    <item>
      <title>MPC8309 GPIO</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/MPC8309-GPIO/m-p/462196#M1311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to control a gpio of MPC8309twr. In my driver, I used gpio_request(38, "gpio_reset") function to request the "USBDR_TXDRXD6/GPIO_38/QE_BRG_9" I/O signal. But the function alway return a negative number.&lt;/P&gt;&lt;P&gt;I have configurated the kernel, added the "QE GPIO support" and "GPIO Support" and "/sys/class/gpio/... (sysfs interface)". In order to multiplex the GPIO_38, I set the SICR_2 register as 0x00080000. In mpc8390twr.dts, I add lines as follows:&lt;/P&gt;&lt;P&gt;gpio2: gpio-controller@d00 {&lt;/P&gt;&lt;P&gt;&amp;nbsp; #gpio-cells = &amp;lt;2&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; compatible = "fsl,mpc8347-gpio", "fsl,mpc8349-gpio";&lt;/P&gt;&lt;P&gt;&amp;nbsp; reg = &amp;lt;0xd00 0x100&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; interrupts = &amp;lt;75 0x8&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; interrupt-parent = &amp;lt;&amp;amp;ipic&amp;gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; gpio-controller;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything wrong in my configuration ?&lt;/P&gt;&lt;P&gt;I will appreciate all your comments and suggestions!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 07:16:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/MPC8309-GPIO/m-p/462196#M1311</guid>
      <dc:creator>lijiankun198</dc:creator>
      <dc:date>2016-03-31T07:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: MPC8309 GPIO</title>
      <link>https://community.nxp.com/t5/PowerQUICC-Processors/MPC8309-GPIO/m-p/462197#M1312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;NXP BSP supports sysfs possibility for GPIO using from user space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;Check please that the following kernel configuration options are set. These options are necessary for sysfs GPIO support:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_MPC8XXX_GPIO (Platform Support / MPC8xxx GPIO support)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_OF_GPIO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_GPIOLIB (-*- GPIO Support ---&amp;gt;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_GPIO_SYSFS (/sys/class/gpio/... (sysfs interface))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;CONFIG_GENERIC_GPIO&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;This option can be checked using the .config file in the kernel source folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;GPIO controllers should be declared in the Device Tree file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;More information on the device tree GPIO declaration can be found in the kernel source. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;See please the following files: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;/Documentation/powerpc/dts-bindings/gpio.txt and /Documentation/powerpc/dts-bindings/fsl/8xxx_gpio.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;This possibility is available using sysfs from user space.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;See the following pages &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Felinux.org%2FGPIO" rel="nofollow" target="_blank"&gt;http://elinux.org/GPIO&lt;/A&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;and &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=https%3A%2F%2Fwww.kernel.org%2Fdoc%2FDocumentation%2Fgpio%2Fsysfs.txt" rel="nofollow" target="_blank"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Fwww.lindusembedded.com%2Fblog%2F2011%2F12%2F29%2Fgpio-general-purpose-inputoutput-interfaces-in-linux-2%2F" rel="nofollow" target="_blank"&gt;http://www.lindusembedded.com/blog/2011/12/29/gpio-general-purpose-inputoutput-interfaces-in-linux-2/&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=https%3A%2F%2Fwww.kernel.org%2Fdoc%2FDocumentation%2Fgpio%2Fsysfs.txt" rel="nofollow" target="_blank"&gt;https://www.kernel.org/doc/Documentation/gpio/sysfs.txt&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;The GPIO0 usually is GPIO224 under Linux (256-32).&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;2) Look at our dump. It is dump for P2020. Similar command sequence can be used for MPC8309. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;// OUTPUT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;root@p2020ds:/sys/class/gpio/gpio224# echo out &amp;gt; direction&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;This command sets direction (input/output)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;root@p2020ds:/sys/class/gpio/gpio224# echo 1 &amp;gt; value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;This command sets high level on the GPIO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;root@p2020ds:/sys/class/gpio/gpio224# echo 0 &amp;gt; value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;This command sets low level on the GPIO.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;The second method consist of using mmap command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;It is a POSIX-compliant Linux/Unix system call that maps files or devices into memory. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;It is a method of memory-mapped file I/O.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt;For example, look at the following links (&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMmap" rel="nofollow" target="_blank"&gt;http://en.wikipedia.org/wiki/Mmap&lt;/A&gt;&lt;SPAN&gt;) and &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt;"&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.freescale.com/external-link.jspa?url=http%3A%2F%2Fbeej.us%2Fguide%2Fbgipc%2Foutput%2Fhtml%2Fmultipage%2Fmmap.html" rel="nofollow" target="_blank"&gt;http://beej.us/guide/bgipc/output/html/multipage/mmap.html&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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, 04 Apr 2016 05:24:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/PowerQUICC-Processors/MPC8309-GPIO/m-p/462197#M1312</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2016-04-04T05:24:57Z</dc:date>
    </item>
  </channel>
</rss>

