<?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: Cannot control GPIO pin from sysfs in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Cannot-control-GPIO-pin-from-sysfs/m-p/1874801#M224151</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196878"&gt;@sharmilad&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Thank you for contacting NXP Support!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend using the commands gpioset and gpioget for that purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For gpio5 io00 should you can use the commands below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set gpio5 io0 in a LOW state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"gpioset -c gpiochip4 0=0"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set gpio5 io0 in a HIGH state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"gpioset -c gpiochip4 0=1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you can use the command gpioinfo to see all the gpios available in the processor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Chavira&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 16:59:55 GMT</pubDate>
    <dc:creator>Chavira</dc:creator>
    <dc:date>2024-05-24T16:59:55Z</dc:date>
    <item>
      <title>Cannot control GPIO pin from sysfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Cannot-control-GPIO-pin-from-sysfs/m-p/1874571#M224138</link>
      <description>&lt;P&gt;Dear NXP team,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;We are using an iMX6SoloX processor in our custom product. One of the IO pins, EIM_WAIT, is connected to our cellular modem connector. We need to configure this EIM_WAIT pin as a GPIO and control it via sysfs. I have configured this pin in the &lt;/SPAN&gt;pinctrl_hog&lt;SPAN&gt; group as follows:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT face="times new roman,times"&gt;pinctrl_hog: hoggrp {&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT face="times new roman,times"&gt;fsl,pins = &amp;lt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT face="times new roman,times"&gt;MX6QDL_PAD_EIM_WAIT__GPIO5_IO00 0x4001b0b1&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT face="times new roman,times"&gt;&amp;gt;;&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;&lt;FONT face="times new roman,times"&gt;};&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using the following commands to control the GPIO via sysfs:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;EM&gt;echo 128 &amp;gt; /sys/class/gpio/export&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;echo out &amp;gt; /sys/class/gpio/gpio128/direction&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;EM&gt;echo 0 &amp;gt; /sys/class/gpio/gpio128/value&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;However, these commands do not seem to affect the pin status—it always reads high. I tried configuring this pin in U-Boot and toggling it from the U-Boot command line, and it works fine there. But I am unable to control this pin from sysfs in Linux. Can you please suggest what might be wrong?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Thanks &amp;amp; Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Sharmila D&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 10:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Cannot-control-GPIO-pin-from-sysfs/m-p/1874571#M224138</guid>
      <dc:creator>sharmilad</dc:creator>
      <dc:date>2024-05-24T10:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot control GPIO pin from sysfs</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Cannot-control-GPIO-pin-from-sysfs/m-p/1874801#M224151</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/196878"&gt;@sharmilad&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;Thank you for contacting NXP Support!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend using the commands gpioset and gpioget for that purpose.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For gpio5 io00 should you can use the commands below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set gpio5 io0 in a LOW state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"gpioset -c gpiochip4 0=0"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set gpio5 io0 in a HIGH state&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"gpioset -c gpiochip4 0=1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you can use the command gpioinfo to see all the gpios available in the processor&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards!&lt;/P&gt;
&lt;P&gt;Chavira&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 16:59:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Cannot-control-GPIO-pin-from-sysfs/m-p/1874801#M224151</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2024-05-24T16:59:55Z</dc:date>
    </item>
  </channel>
</rss>

