<?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 Re: LS1043A GPIO addressing in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/LS1043A-GPIO-addressing/m-p/1769348#M13728</link>
    <description>&lt;P&gt;I'll leave this up in case anyone runs into the same issue.&lt;/P&gt;&lt;P&gt;Long story short, I was not byte swapping correctly. I was taking the full 32bit value and reversing it, instead of reversing each 8 bit block within that 32bit value.&lt;/P&gt;&lt;P&gt;Learn from my mistake and have fun with those GPIOs. Not sure how to set this as solved.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 00:46:38 GMT</pubDate>
    <dc:creator>endrunner_smw</dc:creator>
    <dc:date>2023-12-06T00:46:38Z</dc:date>
    <item>
      <title>LS1043A GPIO addressing</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-GPIO-addressing/m-p/1768486#M13722</link>
      <description>&lt;P&gt;Perhaps somebody can assist me in further understanding the GPIO listings.&lt;/P&gt;&lt;P&gt;Cross referencing LS1043A.pdf and LS1043ARM.pdf&lt;/P&gt;&lt;P&gt;Documentation shows that pin M2 with RCW[uart_base] = 5 should be GPIO1_22.&lt;/P&gt;&lt;P&gt;If I use:&lt;/P&gt;&lt;P&gt;gpiomon gpiochip0 22&lt;/P&gt;&lt;P&gt;which should monitor GPIO1_22 I do get reply messages when using the button attached. So that should be correct.&lt;/P&gt;&lt;P&gt;However, when utilizing the memory mapped io for the GPIO the bit position doesn't match up with GPIO1_22.&lt;/P&gt;&lt;P&gt;Utilizing the GPIO base of 0x230_0000 (adding underscore for easier reading), then the offset for GPIODAT, we get a 32 bit value that each bit represents a GPIO pin, correct? If this is the case I would assume the bit associated with line 22 would have the hex value 0x20_0000, however I get no reply in my simple test program. However, after reviewing the whole 32 bit value to determine which bit was flipping on button press it was value 0x2_0000. This value would indicate GPIO1_18, correct? And GPIO1_18 should not be enabled if using RCW[UART_BASE]=5 because that line would be UART2_SIN.&lt;/P&gt;&lt;P&gt;So how is my button supposedly working on GPIO1_18, but my UART2 is also working? Am I misunderstanding how the multiplex works, am I misunderstanding notation somewhere? And this isn't the only button reporting incorrectly, but it seems the most nonsensical as it should be the UART2_SIN&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 19:45:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-GPIO-addressing/m-p/1768486#M13722</guid>
      <dc:creator>endrunner_smw</dc:creator>
      <dc:date>2023-12-04T19:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: LS1043A GPIO addressing</title>
      <link>https://community.nxp.com/t5/Layerscape/LS1043A-GPIO-addressing/m-p/1769348#M13728</link>
      <description>&lt;P&gt;I'll leave this up in case anyone runs into the same issue.&lt;/P&gt;&lt;P&gt;Long story short, I was not byte swapping correctly. I was taking the full 32bit value and reversing it, instead of reversing each 8 bit block within that 32bit value.&lt;/P&gt;&lt;P&gt;Learn from my mistake and have fun with those GPIOs. Not sure how to set this as solved.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 00:46:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/LS1043A-GPIO-addressing/m-p/1769348#M13728</guid>
      <dc:creator>endrunner_smw</dc:creator>
      <dc:date>2023-12-06T00:46:38Z</dc:date>
    </item>
  </channel>
</rss>

