<?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>i.MX ProcessorsのトピックRe: Accessing GPIO from User space for LED Board Control.</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1864738#M223663</link>
    <description>&lt;DIV style="direction: ltr; border-width: 100%;"&gt;
&lt;DIV style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 5.4444in;"&gt;
&lt;DIV style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 5.4444in;"&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;You need to add the GPIO on device tree and change the IOMUX configuration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;You can take as a reference the &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mp-evk.dts" target="_blank"&gt;EVK device tree&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Best regards.&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 13 May 2024 20:35:49 GMT</pubDate>
    <dc:creator>JorgeCas</dc:creator>
    <dc:date>2024-05-13T20:35:49Z</dc:date>
    <item>
      <title>Accessing GPIO from User space for LED Board Control.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1863864#M223592</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;UART3_RXD_3V3 (GPIO5_IO08), UART3_TXD_3V3 (GPIO5_IO07) gpios connected with LED Board.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;When i try to check the GPIO Set value i am not to able set this with sysfs&amp;nbsp;&lt;BR /&gt;Bellow are the gpio&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# find / -name "gpio"&lt;BR /&gt;find: '/proc/2514': No such file or directory&lt;BR /&gt;/lib/modules/6.1.55+g770c5fe2c1d1/kernel/drivers/gpio&lt;BR /&gt;/sys/kernel/debug/gpio&lt;BR /&gt;/sys/bus/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-pcie/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-vbus/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-audio-pwr/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-can2-stby/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-can1-stby/gpio&lt;BR /&gt;/sys/firmware/devicetree/base/regulator-usdhc2/gpio&lt;BR /&gt;root@imx8mp-lpddr4-evk:~#&lt;BR /&gt;&lt;BR /&gt;Is there any specific config need to enable to operate from sysyfs, apart from the bellow&amp;nbsp;&lt;BR /&gt;CONFIG_SYSFS=y&lt;BR /&gt;CONFIG_PWM_SYSFS=y&lt;BR /&gt;&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# ls /sys/class/g&lt;BR /&gt;gpu_class/ graphics/&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# ls /sys/class/g&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;As with the blow attached document i tried to check.&lt;BR /&gt;&lt;BR /&gt;Is there anything need to be enabled?&lt;BR /&gt;Guide me to SET and read the value form the&amp;nbsp;GPIO5_IO08&amp;nbsp;GPIO5_IO07.&lt;BR /&gt;Is there any Dts configuration has reference will be helpful.&lt;BR /&gt;&lt;BR /&gt;ThankYou&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 10:31:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1863864#M223592</guid>
      <dc:creator>MJD</dc:creator>
      <dc:date>2024-05-11T10:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing GPIO from User space for LED Board Control.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1864738#M223663</link>
      <description>&lt;DIV style="direction: ltr; border-width: 100%;"&gt;
&lt;DIV style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 5.4444in;"&gt;
&lt;DIV style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 5.4444in;"&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Hello,&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;You need to add the GPIO on device tree and change the IOMUX configuration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;You can take as a reference the &lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8mp-evk.dts" target="_blank"&gt;EVK device tree&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;FONT face="arial,helvetica,sans-serif" size="3"&gt;Best regards.&lt;/FONT&gt;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 May 2024 20:35:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1864738#M223663</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2024-05-13T20:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing GPIO from User space for LED Board Control.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1868383#M223910</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203308"&gt;@JorgeCas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have configured Dts to use&amp;nbsp;GPIO5_IO07 pin from user space has bellow.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MJD_0-1716023735578.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/279496iD899A25C1D19522B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MJD_0-1716023735578.png" alt="MJD_0-1716023735578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;#define MX8MP_IOMUXC_ECSPI1_MOSI__GPIO5_IO07 0x1E4 0x444 0x000 0x5 0x0&lt;BR /&gt;&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# echo 135 &amp;gt; /sys/class/gpio/export&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# echo out &amp;gt; /sys/class/gpio/gpio135/direction&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# cat /sys/class/gpio/gpio135/value&lt;BR /&gt;0&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# echo 1 &amp;gt; /sys/class/gpio/gpio135/value&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# cat /sys/class/gpio/gpio135/value&lt;BR /&gt;1&lt;BR /&gt;&lt;A href="mailto:root@imx8mp-lpddr4-evk:~" target="_blank"&gt;root@imx8mp-lpddr4-evk:~# &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I am able set the value but when i probe with that pin, i do not see any changes on the pin, will always be High.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any changes need to be done in my dts?&lt;BR /&gt;&lt;BR /&gt;Any one give any me pin configuration with Dts to use GPIO in Userspace.&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;With the bellow link i am not able to set.&lt;BR /&gt;root@imx8mp-lpddr4-evk:~#&lt;BR /&gt;root@imx8mp-lpddr4-evk:~# gpioset -c gpiochip4 7=1&lt;BR /&gt;&lt;BR /&gt;The above command doesn't execute&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://variwiki.com/index.php?title=MX8M_GPIO" target="_blank"&gt;https://variwiki.com/index.php?title=MX8M_GPIO&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 May 2024 09:31:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Accessing-GPIO-from-User-space-for-LED-Board-Control/m-p/1868383#M223910</guid>
      <dc:creator>MJD</dc:creator>
      <dc:date>2024-05-18T09:31:01Z</dc:date>
    </item>
  </channel>
</rss>

