<?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: GPIO shutdown in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322584#M178327</link>
    <description>&lt;P&gt;Hi KUMAR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for shutdown seems most easy way is to use "SCU_WDOG_OUT", "PMIC_WDOG_IN"&lt;/P&gt;
&lt;P&gt;signals on p.18 i.MX8QM MEK SPF-29420 schematic&lt;/P&gt;
&lt;H3 class="media-flex-heading"&gt;&lt;A id="docsAndSoftware_designResultTitle1_1" class="dtmcustomrulelink" href="https://www.nxp.com/downloads/en/schematics/SCH-29420_C7.zip" target="_blank" rel="noopener" data-dtmaction="Documents and Software Results - Software Link click" data-dtmsubaction="MCIMX8QM-CPU MEK – Schematics"&gt;MCIMX8QM-CPU MEK – Schematics&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 10:28:44 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2021-08-12T10:28:44Z</dc:date>
    <item>
      <title>GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322513#M178315</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm using imx8qm mek board yocto based board bring up. I want to do whenever gpio high then board power off(shutdown) state. how to implement this requirement. I need gpio intrrupt&amp;nbsp; based not polling based. Could you please help me out.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 08:43:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322513#M178315</guid>
      <dc:creator>ksaiviswanadhul</dc:creator>
      <dc:date>2021-08-12T08:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322584#M178327</link>
      <description>&lt;P&gt;Hi KUMAR&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for shutdown seems most easy way is to use "SCU_WDOG_OUT", "PMIC_WDOG_IN"&lt;/P&gt;
&lt;P&gt;signals on p.18 i.MX8QM MEK SPF-29420 schematic&lt;/P&gt;
&lt;H3 class="media-flex-heading"&gt;&lt;A id="docsAndSoftware_designResultTitle1_1" class="dtmcustomrulelink" href="https://www.nxp.com/downloads/en/schematics/SCH-29420_C7.zip" target="_blank" rel="noopener" data-dtmaction="Documents and Software Results - Software Link click" data-dtmsubaction="MCIMX8QM-CPU MEK – Schematics"&gt;MCIMX8QM-CPU MEK – Schematics&lt;/A&gt;&lt;/H3&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322584#M178327</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-08-12T10:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322585#M178328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes correct, But I want particular gpio pin high then only shutdown otherwise normal operation. below attached sample code. I did like this but not poweroff&lt;/P&gt;&lt;P&gt;gpio-poweroff {&lt;BR /&gt;compatible = "gpio-poweroff";&lt;BR /&gt;gpios = &amp;lt;&amp;amp;lsio_gpio2 9 GPIO_ACTIVE_LOW&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:33:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1322585#M178328</guid>
      <dc:creator>ksaiviswanadhul</dc:creator>
      <dc:date>2021-08-12T10:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323659#M178473</link>
      <description>&lt;P&gt;the chip has this feature and BSP has already implement the sc_pwrkey(compatible = "fsl,imx8-pwrkey";&lt;BR /&gt;).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;short press as wakeup source and long press power off and power on(working with PMIC).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for you case, you may need as hardware invert signal.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 03:57:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323659#M178473</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-16T03:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323664#M178475</link>
      <description>&lt;P&gt;Hi BiyongSUN,&lt;/P&gt;&lt;P&gt;Thanks for the reply, yes we inverted hardware signal. Do we have a sample code for GPIO shutdown .If you have please post here. so that I'll cross check with my code.&lt;/P&gt;&lt;P&gt;I need complete this task please help me out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saikumar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 04:21:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323664#M178475</guid>
      <dc:creator>ksaiviswanadhul</dc:creator>
      <dc:date>2021-08-16T04:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323728#M178483</link>
      <description>&lt;P&gt;As previous reply, the hardware and BSP already have that function.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sc_pwrkey(compatible = "fsl,imx8-pwrkey") in dts;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitledffff.png" style="width: 833px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152935i88BAD87CF8099A34/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitledffff.png" alt="Untitledffff.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20210816_144531.jpg" style="width: 749px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152936iF65EF22B43368743/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG_20210816_144531.jpg" alt="IMG_20210816_144531.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 06:49:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323728#M178483</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-16T06:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323867#M178497</link>
      <description>&lt;P&gt;If you don't want the snvs on off button as power off button, you can use gpio-key add one key for that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is the same thing, just use that gpio to send KEY_POWER event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The KEY_POWER event:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitledxxx.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152975i5C041F5BD43AB17C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitledxxx.png" alt="Untitledxxx.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With KEY_POWER event, you can modify the systemd configurate to handle this event&lt;/P&gt;
&lt;P&gt;uncomment&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;HandlePowerKey=poweroff&lt;/FONT&gt;&lt;/STRONG&gt; and comment&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&amp;nbsp;#&lt;/STRONG&gt;&lt;/FONT&gt;HandlePowerKey=ignore&lt;/P&gt;
&lt;P&gt;/etc/systemd/logind.conf&lt;/P&gt;
&lt;P&gt;#ReserveVT=6&lt;BR /&gt;#KillUserProcesses=yes&lt;BR /&gt;#KillOnlyUsers=&lt;BR /&gt;#KillExcludeUsers=root&lt;BR /&gt;#InhibitDelayMaxSec=5&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;HandlePowerKey=poweroff&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;# i.MX-specific&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;#&lt;/FONT&gt;&lt;/STRONG&gt;HandlePowerKey=ignore&lt;BR /&gt;#HandleSuspendKey=suspend&lt;BR /&gt;#HandleHibernateKey=hibernate&lt;BR /&gt;#HandleLidSwitch=suspend&lt;BR /&gt;#HandleLidSwitchExternalPower=suspend&lt;BR /&gt;#HandleLidSwitchDocked=ignore&lt;BR /&gt;#PowerKeyIgnoreInhibited=no&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitledfafd.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152976i07DB8BFEB70D488A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitledfafd.png" alt="Untitledfafd.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 10:31:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323867#M178497</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-16T10:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323880#M178499</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I want to shutdown particular gpio low. I added below code to dts file is it correct?&lt;/P&gt;&lt;P&gt;gpio-poweroff {&lt;BR /&gt;compatible = "gpio-poweroff";&lt;BR /&gt;gpios = &amp;lt;&amp;amp;gpio2 9 GPIO_ACTIVE_LOW&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;If wrong add to dts file.. what to add code in dts file?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 10:40:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1323880#M178499</guid>
      <dc:creator>ksaiviswanadhul</dc:creator>
      <dc:date>2021-08-16T10:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1324139#M178518</link>
      <description>&lt;P&gt;I already told you everything.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153027i4D9F276890A266AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;gpio-keys {&lt;BR /&gt;compatible = "gpio-keys";&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_gpio_keys&amp;gt;;&lt;/P&gt;
&lt;P&gt;power {&lt;BR /&gt;label = "GPIO Key Power";&lt;BR /&gt;linux,code = &amp;lt;KEY_POWER&amp;gt;;&lt;BR /&gt;&amp;lt;&amp;amp;gpio2 9 GPIO_ACTIVE_LOW&amp;gt;;&lt;BR /&gt;&amp;nbsp; debounce-interval = &amp;lt;50&amp;gt;;&lt;/P&gt;
&lt;P&gt;};&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Aug 2021 23:49:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1324139#M178518</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-16T23:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1324157#M178522</link>
      <description>&lt;P&gt;HW:&amp;nbsp; i.MX8QM MEK&lt;/P&gt;
&lt;P&gt;SW:&amp;nbsp; LF-v5.10.9_1.0.0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;USDHC1_DATA7&amp;nbsp; -- &amp;gt; LSIO_GPIO5_IO22&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled.png" style="width: 998px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153029i15D26F0C38935FF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_20210817_083413.jpg" style="width: 952px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153032i8E77C44E9DBA59D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="IMG_20210817_083413.jpg" alt="IMG_20210817_083413.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;imx8qm-mek-gpio-poweroff.dts&lt;/P&gt;
&lt;P&gt;#include "imx8qm-mek.dts"&lt;/P&gt;
&lt;P&gt;/{&lt;/P&gt;
&lt;P&gt;gpio-keys {&lt;BR /&gt;compatible = "gpio-keys";&lt;BR /&gt;pinctrl-names = "default";&lt;BR /&gt;pinctrl-0 = &amp;lt;&amp;amp;pinctrl_gpio_keys&amp;gt;;&lt;/P&gt;
&lt;P&gt;power {&lt;BR /&gt;label = "GPIO Key Power";&lt;BR /&gt;linux,code = &amp;lt;KEY_POWER&amp;gt;;&lt;BR /&gt;gpios = &amp;lt;&amp;amp;lsio_gpio5 22 GPIO_ACTIVE_LOW&amp;gt;;&lt;BR /&gt;debounce-interval = &amp;lt;50&amp;gt;;&lt;/P&gt;
&lt;P&gt;};&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;};&lt;/P&gt;
&lt;P&gt;&amp;amp;iomuxc {&lt;/P&gt;
&lt;P&gt;/delete-node/ pinctrl_usdhc2;&lt;BR /&gt;/delete-node/ pinctrl_usdhc2_gpio;&lt;/P&gt;
&lt;P&gt;pinctrl_gpio_keys: gpio_keys_grp {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;IMX8QM_USDHC1_DATA7_LSIO_GPIO5_IO22 0x00000021&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;&amp;amp;usdhc2 {&lt;BR /&gt;status = "disabled";&lt;BR /&gt;};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;event check:&lt;/P&gt;
&lt;P&gt;plugin sdcard to tigger the pin(sdcard CD, now it is&amp;nbsp;LSIO_GPIO5_IO22 )&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled1.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153033i29E67CCF31061EDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled1.png" alt="Untitled1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;check the power off:&lt;/P&gt;
&lt;P&gt;1. modify the /etc/systemd/logind.conf and restart systemd or reboot the board&lt;/P&gt;
&lt;P&gt;#KillExcludeUsers=root&lt;BR /&gt;#InhibitDelayMaxSec=5&lt;BR /&gt;HandlePowerKey=poweroff&lt;BR /&gt;# i.MX-specific&lt;BR /&gt;#HandlePowerKey=ignore&lt;BR /&gt;#HandleSuspendKey=suspe&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;plugin sdcard to tigger the pin(sdcard CD, now it is&amp;nbsp;LSIO_GPIO5_IO22 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Untitled3.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/153034i652006AA8CA6C965/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled3.png" alt="Untitled3.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 01:11:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1324157#M178522</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-17T01:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1610176#M202376</link>
      <description>&lt;P&gt;This looks great.&amp;nbsp; How do I customise this to make a GPIO pin change state just as this closes?&lt;/P&gt;&lt;P&gt;The previous approach was "gpio-poweroff" which made a GPIO pin low immediately before HALT.&amp;nbsp; This GPIO is needed to operate a switch to deactivate the other voltage regulators on the board, and prevent the battery from discharging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 17:22:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1610176#M202376</guid>
      <dc:creator>HB010</dc:creator>
      <dc:date>2023-03-06T17:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO shutdown</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1610199#M202378</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am also using imx8x family.&amp;nbsp; Did you find a way to get the approach to send out a GPIO change event as part of the processor shut down?&amp;nbsp; I have an external net that needs to be switched off.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 17:46:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-shutdown/m-p/1610199#M202378</guid>
      <dc:creator>HB010</dc:creator>
      <dc:date>2023-03-06T17:46:07Z</dc:date>
    </item>
  </channel>
</rss>

