<?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のトピックControlling the System Controller GPIO from Linux IMX8QM</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Controlling-the-System-Controller-GPIO-from-Linux-IMX8QM/m-p/2046670#M234160</link>
    <description>&lt;P&gt;I have a custom board using the IMX8QM and I need to be able to control the SCU GPIO from linux.&lt;/P&gt;&lt;P&gt;I have enabled the scu gpio from the kernel found the imx_scu gpio driver.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Added the libgpiod and when doing gpioinfo I was able to see scu gpio showing with 8 lines, but when I try to read a value from it using 'gpioget gpiochip8 4'&amp;nbsp; &amp;nbsp;I get the following:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;imxscfw_get: failed -22&lt;/P&gt;&lt;P&gt;gpioget: error reading GPIO values: Invalid argument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Added this to the device tree:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;scu_gpio0: scu-gpio0 {&lt;BR /&gt;compatible = "fsl,imx-scu-gpio";&lt;BR /&gt;gpio-controller;&lt;BR /&gt;#gpio-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;#interrupt-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using buildroot to build the linux(5.15.5) and bootloader.&lt;/P&gt;&lt;P&gt;SCFW Version:&lt;/P&gt;&lt;P&gt;imx-scfw-porting-kit-1.14.0&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 21:21:27 GMT</pubDate>
    <dc:creator>st3v3n</dc:creator>
    <dc:date>2025-02-18T21:21:27Z</dc:date>
    <item>
      <title>Controlling the System Controller GPIO from Linux IMX8QM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Controlling-the-System-Controller-GPIO-from-Linux-IMX8QM/m-p/2046670#M234160</link>
      <description>&lt;P&gt;I have a custom board using the IMX8QM and I need to be able to control the SCU GPIO from linux.&lt;/P&gt;&lt;P&gt;I have enabled the scu gpio from the kernel found the imx_scu gpio driver.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Added the libgpiod and when doing gpioinfo I was able to see scu gpio showing with 8 lines, but when I try to read a value from it using 'gpioget gpiochip8 4'&amp;nbsp; &amp;nbsp;I get the following:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;imxscfw_get: failed -22&lt;/P&gt;&lt;P&gt;gpioget: error reading GPIO values: Invalid argument&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Added this to the device tree:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;scu_gpio0: scu-gpio0 {&lt;BR /&gt;compatible = "fsl,imx-scu-gpio";&lt;BR /&gt;gpio-controller;&lt;BR /&gt;#gpio-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;#interrupt-cells = &amp;lt;2&amp;gt;;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using buildroot to build the linux(5.15.5) and bootloader.&lt;/P&gt;&lt;P&gt;SCFW Version:&lt;/P&gt;&lt;P&gt;imx-scfw-porting-kit-1.14.0&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 21:21:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Controlling-the-System-Controller-GPIO-from-Linux-IMX8QM/m-p/2046670#M234160</guid>
      <dc:creator>st3v3n</dc:creator>
      <dc:date>2025-02-18T21:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the System Controller GPIO from Linux IMX8QM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Controlling-the-System-Controller-GPIO-from-Linux-IMX8QM/m-p/2049365#M234336</link>
      <description>&lt;P&gt;pls add more debug information in the function as below to check which one is wrong, it seems this gpio you add doesn't controlled by the scu correctly, &lt;/P&gt;
&lt;P&gt;if (offset &amp;gt;= sizeof(sc_arr)/sizeof(unsigned int))&lt;BR /&gt;return err;&lt;/P&gt;
&lt;P&gt;err = imx_sc_misc_get_control(scu-&amp;gt;handle, sc_arr[offset],&lt;BR /&gt;0, &amp;amp;level)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/nxp-imx/linux-imx/blob/lf-5.15.y/drivers/gpio/gpio-scu.c#L37" target="_blank"&gt;https://github.com/nxp-imx/linux-imx/blob/lf-5.15.y/drivers/gpio/gpio-scu.c#L37&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2025 07:36:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Controlling-the-System-Controller-GPIO-from-Linux-IMX8QM/m-p/2049365#M234336</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2025-02-22T07:36:58Z</dc:date>
    </item>
  </channel>
</rss>

