<?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: how does it control the GPIO as input/output in DTS ? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320267#M178068</link>
    <description>&lt;P&gt;This is linux question, not about the imx itself, please read the linux document.&lt;/P&gt;
&lt;P&gt;Here is imx forum, not linux forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config in dts, should be the&amp;nbsp;gpio-hog.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;others must combined to a certain device such a phy, pcie, etc.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read the linux documents. strong suggest you to do it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pin is not gpio.&amp;nbsp; GPIO is the same as uart, i2c.&amp;nbsp; without pin configuration. GPIO still can work, just no way output or input, linux uart could work without pin configuration. it is the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure you understand the pin and the gpio, uart, etc. modules.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GPIO is the same as ADC, SAI, Timer.&amp;nbsp; Pin is related to the IOMUX and IOMUX right side in this picture.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pin pull up/down no any related to the GPIO input/output. pull up/down also can be use as ADC output or input&amp;nbsp; "pin".&lt;/P&gt;
&lt;P&gt;“Other SOC”, which one. all the binding guide in linux is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the&amp;nbsp;linux/Documentation/devicetree/bindings/gpio/. I don't find one not follow the linux.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some SOC has no pin/iomux. The GPIO pin is dedicated. no need to configurate the pin for GPIO. but still need to follow the linux to config the GPIO.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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="Untitled.png" style="width: 856px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152278iD67077C260A43D1D/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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is in very details. for the linux, next time read the linux documents.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before you say "&lt;SPAN&gt;surprise&lt;/SPAN&gt;", make sure you understand the linux documents.&lt;/P&gt;
&lt;P&gt;linux/Documentation/gpio/gpio.txt&lt;/P&gt;
&lt;P&gt;linux/Documentation/gpio/sysfs.txt&lt;/P&gt;
&lt;P&gt;linux/Documentation/devicetree/bindings/gpio/gpio.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use gpio-hog demo&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Simple GPIO Example - quandry &lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458761#598834" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458761#598834&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Accessing GPIO From UserSpace&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Accessing-GPIO-From-UserSpace/ta-p/1113118" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Accessing-GPIO-From-UserSpace/ta-p/1113118&lt;/A&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>Mon, 09 Aug 2021 09:57:51 GMT</pubDate>
    <dc:creator>BiyongSUN</dc:creator>
    <dc:date>2021-08-09T09:57:51Z</dc:date>
    <item>
      <title>how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1319972#M178041</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I got this from pin tool, but it didn't configure input or output for each pin in generated file.&lt;/P&gt;&lt;P&gt;What shall I do to make IO20 &amp;amp; IO21 as input and IO22 - IO24 as output high ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pinctrl_hog_1: hoggrp-1 {&lt;BR /&gt;fsl,pins = &amp;lt;&lt;BR /&gt;MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0x00000116&lt;BR /&gt;MX8MN_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x00000116&lt;BR /&gt;MX8MN_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x00000116&lt;BR /&gt;MX8MN_IOMUXC_SAI5_RXD2_GPIO3_IO23 0x00000116&lt;BR /&gt;MX8MN_IOMUXC_SAI5_RXD3_GPIO3_IO24 0x00000116&lt;BR /&gt;&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;</description>
      <pubDate>Sun, 08 Aug 2021 17:03:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1319972#M178041</guid>
      <dc:creator>Luke-Hsieh</dc:creator>
      <dc:date>2021-08-08T17:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1319988#M178044</link>
      <description>&lt;P&gt;Hi Luke&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"pinctrl_hog" configures pad settings, for example for&lt;/P&gt;
&lt;P&gt;MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0x00000116 it is&lt;/P&gt;
&lt;P&gt;register described in sect.8.2.5.203 Pad Control Register (IOMUXC_SW_PAD_CTL_PAD_SAI5_RXC)&lt;/P&gt;
&lt;P&gt;&lt;A id="relatedDocsClick_1" href="https://www.nxp.com/webapp/Download?colCode=IMX8MNRM" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;i.MX 8M Nano Applications Processor Reference Manual&lt;/STRONG&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For GPIO direction one can look at linux documentation (hog definition) :&lt;/P&gt;
&lt;P&gt;&lt;A href="https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/devicetree/bindings/gpio/gpio.txt?h=lf-5.10.y" target="_blank"&gt;https://source.codeaurora.org/external/imx/linux-imx/tree/Documentation/devicetree/bindings/gpio/gpio.txt?h=lf-5.10.y&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;</description>
      <pubDate>Sat, 21 Aug 2021 00:29:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1319988#M178044</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2021-08-21T00:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320010#M178046</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0x00000116&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I want a pull high, I shall change the value from 0x116 to 0x156, right ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a bit surprised that it can't change the GPIO direction and value in device tree is supported on other SoC.&lt;/P&gt;&lt;P&gt;Anyway, it is what it is.&lt;/P&gt;&lt;P&gt;Will it be configured as GPIO input if I configure it as an interrupt pin without any modifications in uboot ? Or I have to change the GPIO direction even it's a interrupt pin in DTS ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there any API in kernel I can read/write the register value ?&lt;/P&gt;&lt;P&gt;Are there any utility in user space I can read/write the register value ?&lt;/P&gt;&lt;P&gt;This is helpful to confirm if I have a proper configuration if DTS and kernel driver.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 02:28:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320010#M178046</guid>
      <dc:creator>Luke-Hsieh</dc:creator>
      <dc:date>2021-08-09T02:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320267#M178068</link>
      <description>&lt;P&gt;This is linux question, not about the imx itself, please read the linux document.&lt;/P&gt;
&lt;P&gt;Here is imx forum, not linux forum.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config in dts, should be the&amp;nbsp;gpio-hog.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;others must combined to a certain device such a phy, pcie, etc.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read the linux documents. strong suggest you to do it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pin is not gpio.&amp;nbsp; GPIO is the same as uart, i2c.&amp;nbsp; without pin configuration. GPIO still can work, just no way output or input, linux uart could work without pin configuration. it is the same.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure you understand the pin and the gpio, uart, etc. modules.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;GPIO is the same as ADC, SAI, Timer.&amp;nbsp; Pin is related to the IOMUX and IOMUX right side in this picture.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;pin pull up/down no any related to the GPIO input/output. pull up/down also can be use as ADC output or input&amp;nbsp; "pin".&lt;/P&gt;
&lt;P&gt;“Other SOC”, which one. all the binding guide in linux is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the&amp;nbsp;linux/Documentation/devicetree/bindings/gpio/. I don't find one not follow the linux.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some SOC has no pin/iomux. The GPIO pin is dedicated. no need to configurate the pin for GPIO. but still need to follow the linux to config the GPIO.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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="Untitled.png" style="width: 856px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/152278iD67077C260A43D1D/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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is in very details. for the linux, next time read the linux documents.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before you say "&lt;SPAN&gt;surprise&lt;/SPAN&gt;", make sure you understand the linux documents.&lt;/P&gt;
&lt;P&gt;linux/Documentation/gpio/gpio.txt&lt;/P&gt;
&lt;P&gt;linux/Documentation/gpio/sysfs.txt&lt;/P&gt;
&lt;P&gt;linux/Documentation/devicetree/bindings/gpio/gpio.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use gpio-hog demo&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Simple GPIO Example - quandry &lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458761#598834" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors/Simple-GPIO-Example-quandry/m-p/458761#598834&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Accessing GPIO From UserSpace&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Accessing-GPIO-From-UserSpace/ta-p/1113118" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Accessing-GPIO-From-UserSpace/ta-p/1113118&lt;/A&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>Mon, 09 Aug 2021 09:57:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320267#M178068</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-09T09:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320296#M178073</link>
      <description>&lt;P&gt;Hi BiyongSUN,&lt;/P&gt;&lt;P&gt;Noted! You're right.&lt;BR /&gt;I should ask the imx related in imx forum.&lt;BR /&gt;I'm sorry about the &lt;SPAN&gt;improper expression&lt;/SPAN&gt;!&lt;/P&gt;&lt;P&gt;By the way.&lt;BR /&gt;I got the answer why the register value was 0x116 in sect.8.2.5.203 Pad Control Register (IOMUXC_SW_PAD_CTL_PAD_SAI5_RXC)&lt;BR /&gt;Thanks, Igorpadykov&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 10:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320296#M178073</guid>
      <dc:creator>Luke-Hsieh</dc:creator>
      <dc:date>2021-08-09T10:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320780#M178116</link>
      <description>&lt;P&gt;GPIO direction could be set in the DTS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and it is in the device tree binding guide.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to use gpio-hog demo&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709" target="_blank" rel="noopener"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 05:05:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1320780#M178116</guid>
      <dc:creator>BiyongSUN</dc:creator>
      <dc:date>2021-08-10T05:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: how does it control the GPIO as input/output in DTS ?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1321027#M178145</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 10:23:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/how-does-it-control-the-GPIO-as-input-output-in-DTS/m-p/1321027#M178145</guid>
      <dc:creator>Luke-Hsieh</dc:creator>
      <dc:date>2021-08-10T10:23:44Z</dc:date>
    </item>
  </channel>
</rss>

