<?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 GPIO access in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172919#M5962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hoping to get some help with the imx53 loco board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get GPIO access to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've set up the /sys/class sysfs support in the system using a new kernel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the ubuntu micro sd shipped with the qsb board (with newly flashed kernel)&lt;/P&gt;&lt;P&gt;I get permission denied when I try to echo 12 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With an ltib made rootfs and kernel&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get all the way through&amp;nbsp;&lt;/P&gt;&lt;P&gt;echo 12 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;echo out &amp;gt; /sys/class/gpio/gpio12/direction&lt;/P&gt;&lt;P&gt;echo 1 &amp;gt; /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the value doesn't change on the pin nor the actual file "value"&lt;/P&gt;&lt;P&gt;&amp;gt;cat /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&amp;gt;0&lt;/P&gt;&lt;P&gt;I can change the direction just fine, however the value still eludes me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried this on different ports, still nothing works.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Sep 2011 21:56:50 GMT</pubDate>
    <dc:creator>JoshuaParrish</dc:creator>
    <dc:date>2011-09-27T21:56:50Z</dc:date>
    <item>
      <title>GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172919#M5962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hoping to get some help with the imx53 loco board.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't get GPIO access to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've set up the /sys/class sysfs support in the system using a new kernel.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the ubuntu micro sd shipped with the qsb board (with newly flashed kernel)&lt;/P&gt;&lt;P&gt;I get permission denied when I try to echo 12 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With an ltib made rootfs and kernel&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get all the way through&amp;nbsp;&lt;/P&gt;&lt;P&gt;echo 12 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;echo out &amp;gt; /sys/class/gpio/gpio12/direction&lt;/P&gt;&lt;P&gt;echo 1 &amp;gt; /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the value doesn't change on the pin nor the actual file "value"&lt;/P&gt;&lt;P&gt;&amp;gt;cat /sys/class/gpio/gpio12/value&lt;/P&gt;&lt;P&gt;&amp;gt;0&lt;/P&gt;&lt;P&gt;I can change the direction just fine, however the value still eludes me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also tried this on different ports, still nothing works.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2011 21:56:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172919#M5962</guid>
      <dc:creator>JoshuaParrish</dc:creator>
      <dc:date>2011-09-27T21:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172920#M5963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the name of the pin you are trying to access?&lt;/P&gt;&lt;P&gt;Have you setup the IOMUX for&amp;nbsp;this pin as GPIO?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fabio Estevam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 02:36:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172920#M5963</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2011-09-28T02:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172921#M5964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not sure I know how to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be willing to give me some instruction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked at the user guide where gpio is concerned and I'm a little confused on the pin muxing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exact pin I'd like to configure is GPIO_17 with an alternate name of GPIO1_12.&lt;/P&gt;&lt;P&gt;From the user guide and the hardware layout this pin can be probed via the 40th pin on J13 expansion header.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2011 15:21:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172921#M5964</guid>
      <dc:creator>JoshuaParrish</dc:creator>
      <dc:date>2011-09-28T15:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172922#M5965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, GPIO_17 corresponds to GPIO7_12 in ALT1 mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is what you need to do:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Open arch/arm/mach-mx5/mx53_loco.c file and add the following enty to the mx53_loco_pads array:&lt;/P&gt;&lt;P&gt;MX53_PAD_GPIO_17__GPIO7_12,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will let the kernel configure the MX53_PAD_GPIO_17 pad as GPIO7_12 function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Rebuild and deploy the new kernel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;GPIO7_12 corresponds to (7-1)*32 + 12 =&amp;nbsp; 204 GPIO number in Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Access the GPIO as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;echo 204 &amp;gt; /sys/class/gpio/export&lt;/P&gt;&lt;P&gt;echo out &amp;gt; /sys/class/gpio/gpio204/direction&lt;/P&gt;&lt;P&gt;echo 1 &amp;gt; /sys/class/gpio/gpio204/value&lt;/P&gt;&lt;P&gt;echo 0 &amp;gt; /sys/class/gpio/gpio204/value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should work fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 01:46:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172922#M5965</guid>
      <dc:creator>fabio_estevam</dc:creator>
      <dc:date>2011-09-29T01:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172923#M5966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou, for such a quick reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had actually just discovered the GPIO7 issue. The User guide says that it is GPIO1_12, yet the io PIN mux tool available on the freescale site labeled it GPIO7_12, thank you for supporting that claim.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, thank you for going over the mux setup. The user guide just didn't make sense to me. I hope that I can return the favor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 05:43:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172923#M5966</guid>
      <dc:creator>JoshuaParrish</dc:creator>
      <dc:date>2011-09-29T05:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO access</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172924#M5967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Fabio,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am working on IMX53_smd (sabre tablet). since I was trying to toggle the LEDs in Linux ( charge and user debug D27, D32 from schematic ) which are connected to these pins :&lt;/P&gt;&lt;P&gt;&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;&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MX53_PAD_EIM_D30__GPIO_30&lt;/P&gt;&lt;P&gt;&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;&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;&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;&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MX53_PAD_PATA_DA_1__GPIO7_7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; But these definitions are already registered in "iomux-mx53.h" and "mx53_smd.c"&lt;/P&gt;&lt;P&gt;&amp;nbsp; so I tried to access the pins directly from sysfs like this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for MX53_PAD_EIM_D30__GPIO_30 : "echo 94 &amp;gt; /sys/class/gpio/export &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; But when I do ls i count see any new directory..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for MX53_PAD_PATA_DA_1__GPIO7_7 I did "echo 199 &amp;gt; sys/class/gpio/export&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Here also No directories created... I dont understand why .. Is it because these pins are already being used for Charge_done and USER_DEBUG ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another case :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I thought I will access the free GPIO pin on the expansion connector, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; that is 40th pin on J78 i.e. MX53_PAD_GPIO_17__GPIO7_12 &lt;/P&gt;&lt;P&gt;&amp;nbsp; So i Added this pin in "../mach-mx5/mx53_smd.c" in static iomux_v3_cfg_t mx53_smd_pads[] array..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then i recompiled the kernel and deployed it, booted from SD card. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; But when I try to access it : echo 204 &amp;gt; export&lt;/P&gt;&lt;P&gt;&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;&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;&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;&amp;nbsp;&amp;nbsp; echo out &amp;gt; gpio204/direction&lt;/P&gt;&lt;P&gt;&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;&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;&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;&amp;nbsp;&amp;nbsp; echo 1 &amp;gt; gpio204/value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; But when i see the value it is still '0' and the Pin doesnt change. but direction has changed to "out"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; What am I doing wrong here ... ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Winston.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 06:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-access/m-p/172924#M5967</guid>
      <dc:creator>winstonrodrigue</dc:creator>
      <dc:date>2013-03-11T06:58:14Z</dc:date>
    </item>
  </channel>
</rss>

