<?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 LS1021A GPIO numbering in Linux in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/LS1021A-GPIO-numbering-in-Linux/m-p/617034#M1823</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a commercial board based on the LS1021A SoC which is running Linux.&lt;/P&gt;&lt;P&gt;I would like to test the GPIO's functionality by configuring it as output and probing the signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From userspace Linux I would like to export a gpio&amp;nbsp;port and use the sysfs&amp;nbsp;gpio&amp;nbsp;files to manipulate the port. But to do that I need to know what each gpio&amp;lt;number&amp;gt; represents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the port mapping as provided by debugfs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ cat /sys/kernel/debug/gpio&lt;BR /&gt;GPIOs 358-359, i2c/0-0060, gpio-pca9532, can sleep:&lt;BR /&gt;gpio-358 ( |backlight ) out lo&lt;/P&gt;&lt;P&gt;GPIOs 360-367, platform/stmpe-gpio, stmpe, can sleep:&lt;BR /&gt;gpio-360 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-361 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-362 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-363 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-364 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-365 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-366 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-367 ((none) ) in lo edge-inactive&lt;/P&gt;&lt;P&gt;GPIOs 368-375, i2c/0-0021, pca9554, can sleep:&lt;/P&gt;&lt;P&gt;GPIOs 376-383, i2c/0-0020, pca9554, can sleep:&lt;/P&gt;&lt;P&gt;GPIOs 384-415, /soc/gpio@2330000:&lt;/P&gt;&lt;P&gt;GPIOs 416-447, /soc/gpio@2320000:&lt;/P&gt;&lt;P&gt;GPIOs 448-479, /soc/gpio@2310000:&lt;/P&gt;&lt;P&gt;GPIOs 480-511, /soc/gpio@2300000:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to this mapping GPIO1 is assigned the numbers from 480 to 511.&lt;/P&gt;&lt;P&gt;Is GPIO1_13 == 480 , GPIO1_14 == 481 ....and so on?&lt;/P&gt;&lt;P&gt;Same question for the rest of the ports&lt;/P&gt;&lt;P&gt;GPIO2_4 == 448 , GPIO2_5 == 449&lt;/P&gt;&lt;P&gt;GPIO3_0 == 416, GPIO3_1 == 417&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please confirm that this mapping is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 15:20:53 GMT</pubDate>
    <dc:creator>Tarek</dc:creator>
    <dc:date>2016-09-13T15:20:53Z</dc:date>
    <item>
      <title>LS1021A GPIO numbering in Linux</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1021A-GPIO-numbering-in-Linux/m-p/617034#M1823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a commercial board based on the LS1021A SoC which is running Linux.&lt;/P&gt;&lt;P&gt;I would like to test the GPIO's functionality by configuring it as output and probing the signal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From userspace Linux I would like to export a gpio&amp;nbsp;port and use the sysfs&amp;nbsp;gpio&amp;nbsp;files to manipulate the port. But to do that I need to know what each gpio&amp;lt;number&amp;gt; represents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the port mapping as provided by debugfs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;~ cat /sys/kernel/debug/gpio&lt;BR /&gt;GPIOs 358-359, i2c/0-0060, gpio-pca9532, can sleep:&lt;BR /&gt;gpio-358 ( |backlight ) out lo&lt;/P&gt;&lt;P&gt;GPIOs 360-367, platform/stmpe-gpio, stmpe, can sleep:&lt;BR /&gt;gpio-360 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-361 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-362 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-363 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-364 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-365 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-366 ((none) ) in lo edge-inactive&lt;BR /&gt;gpio-367 ((none) ) in lo edge-inactive&lt;/P&gt;&lt;P&gt;GPIOs 368-375, i2c/0-0021, pca9554, can sleep:&lt;/P&gt;&lt;P&gt;GPIOs 376-383, i2c/0-0020, pca9554, can sleep:&lt;/P&gt;&lt;P&gt;GPIOs 384-415, /soc/gpio@2330000:&lt;/P&gt;&lt;P&gt;GPIOs 416-447, /soc/gpio@2320000:&lt;/P&gt;&lt;P&gt;GPIOs 448-479, /soc/gpio@2310000:&lt;/P&gt;&lt;P&gt;GPIOs 480-511, /soc/gpio@2300000:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to this mapping GPIO1 is assigned the numbers from 480 to 511.&lt;/P&gt;&lt;P&gt;Is GPIO1_13 == 480 , GPIO1_14 == 481 ....and so on?&lt;/P&gt;&lt;P&gt;Same question for the rest of the ports&lt;/P&gt;&lt;P&gt;GPIO2_4 == 448 , GPIO2_5 == 449&lt;/P&gt;&lt;P&gt;GPIO3_0 == 416, GPIO3_1 == 417&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please confirm that this mapping is correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 15:20:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1021A-GPIO-numbering-in-Linux/m-p/617034#M1823</guid>
      <dc:creator>Tarek</dc:creator>
      <dc:date>2016-09-13T15:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: LS1021A GPIO numbering in Linux</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1021A-GPIO-numbering-in-Linux/m-p/617035#M1824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;The GPIO1_13 is 480+13= 493.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;GPIO2_4 &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt; 448&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;+4=452&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;The &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;GPIO3_0 == 416, GPIO3_1 == 417&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Look at the following pages:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.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;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;CI20_GPIO_LED_Blink_Tutorial&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Ffalsinsoft.blogspot.ru%2F2012%2F11%2Faccess-gpio-from-linux-user-space.html" rel="nofollow" target="_blank"&gt;http://falsinsoft.blogspot.ru/2012/11/access-gpio-from-linux-user-space.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwiki.openwrt.org%2Fdoc%2Fhardware%2Fport.gpio" rel="nofollow" target="_blank"&gt;https://wiki.openwrt.org/doc/hardware/port.gpio&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Flinux-sunxi.org%2FGPIO" rel="nofollow" target="_blank"&gt;http://linux-sunxi.org/GPIO&lt;/A&gt;&lt;/SPAN&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>Wed, 14 Sep 2016 05:35:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1021A-GPIO-numbering-in-Linux/m-p/617035#M1824</guid>
      <dc:creator>Pavel</dc:creator>
      <dc:date>2016-09-14T05:35:32Z</dc:date>
    </item>
  </channel>
</rss>

