<?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: Ethernet RGMII pins cannot be reassigned as GPIO</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053747#M234589</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Yes, this solved our problem, we can control GPIO pins with libgpiod library. Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dragan&lt;/P&gt;</description>
    <pubDate>Fri, 28 Feb 2025 11:08:08 GMT</pubDate>
    <dc:creator>idragan</dc:creator>
    <dc:date>2025-02-28T11:08:08Z</dc:date>
    <item>
      <title>Ethernet RGMII pins cannot be reassigned as GPIO</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2052803#M234537</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;We are using DART-MX8M-PLUS development kit, along with &lt;/SPAN&gt;&lt;SPAN&gt;our&lt;/SPAN&gt;&lt;SPAN&gt; custom board based on iMX8MP. In order to &lt;/SPAN&gt;&lt;SPAN&gt;use&lt;/SPAN&gt;&lt;SPAN&gt; ADC connected on i2c5 bus, we need pins that are originally used &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; ethernet RGMII (ENET1_RGMII*) &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; a part of ethernet device named &lt;/SPAN&gt;&lt;SPAN&gt;as&lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt; fec&lt;/STRONG&gt;, within the&lt;STRONG&gt;&amp;nbsp;imx8mp-var-dart-dt8mcustomboard.dts&lt;/STRONG&gt; device tree file:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;fec {
pinctrl-names = "default";
pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec&amp;gt;;
phy-mode = "rgmii";
phy-handle = &amp;lt;&amp;amp;ethphy1&amp;gt;;
status = "okay";
};

...

pinctrl_fec: fecgrp {
fsl,pins = &amp;lt;
MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0 0x90
MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1 0x90
MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2 0x90
MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3 0x90
MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC 0x90
MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x90
MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0 0x00
MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1 0x00
MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2 0x00
MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3 0x00
MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x00
MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC 0x00
&amp;gt;;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;In order &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt;&lt;SPAN&gt; pins&amp;nbsp;SAI1_TXD1&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;SAI1_RXD5 to be used &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;our&lt;/SPAN&gt;&lt;SPAN&gt; ADC, I&lt;/SPAN&gt;&lt;SPAN&gt;'ve removed shown fec entry from device tree, as well as those RGMII pins definitions. After that, i2c device was added, as well as desired pins, in the following way:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;&amp;amp;i2c5{
clock-frequency = &amp;lt;400000&amp;gt;;
pinctrl-names = "default", "gpio", "adc";
pinctrl-0 = &amp;lt;&amp;amp;pinctrl_i2c5&amp;gt;;
pinctrl-1 = &amp;lt;&amp;amp;pinctrl_i2c5_gpio&amp;gt;;
pinctrl-2 = &amp;lt;&amp;amp;pinctrl_adc&amp;gt;;
scl-gpios = &amp;lt;&amp;amp;gpio3 26 GPIO_ACTIVE_HIGH&amp;gt;;
sda-gpios = &amp;lt;&amp;amp;gpio3 27 GPIO_ACTIVE_HIGH&amp;gt;;
status = "okay";

adc@2f {
compatible = "adi,ad7091r5";
reg = &amp;lt;0x2f&amp;gt;;
};
};

...

pinctrl_adc: adcgpiogrp {
fsl,pins = &amp;lt;
MX8MP_IOMUXC_SAI1_TXD1__GPIO4_IO13 0x1c2
MX8MP_IOMUXC_SAI1_RXD5__GPIO4_IO07 0x1c2
&amp;gt;;
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;After the boot, I can see that those changes are present in the system by running the following command:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;cat /sys/kernel/debug/pinctrl/pinctrl-handles
...
device: 30ad0000.i2c current state: default
state: default
type: MUX_GROUP controller 30330000.pinctrl group: i2c5grp (21) function: pinctrl (0)
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_HDMI_DDC_SCL (144)config 000001c2
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_HDMI_DDC_SDA (145)config 000001c2
state: gpio
type: MUX_GROUP controller 30330000.pinctrl group: i2c5gpiogrp (25) function: pinctrl (0)
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_HDMI_DDC_SCL (144)config 000001c2
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_HDMI_DDC_SDA (145)config 000001c2
state: adc
type: MUX_GROUP controller 30330000.pinctrl group: adcgpiogrp (26) function: pinctrl (0)
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_SAI1_TXD1 (95)config 000001c2
type: CONFIGS_PIN controller 30330000.pinctrl pin MX8MP_IOMUXC_SAI1_RXD5 (89)config 000001c2
...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;The problem is that setting GPIO value using libgpiod doesn'&lt;/SPAN&gt;&lt;SPAN&gt;t reflect on those pins. I&lt;/SPAN&gt;&lt;SPAN&gt;'ve connected those pins to the oscilloscope and neither in the case of development board nor of our custom board the change can be seen. I'&lt;/SPAN&gt;&lt;SPAN&gt;ve even tried toggling those &lt;/SPAN&gt;&lt;SPAN&gt;values&lt;/SPAN&gt;&lt;SPAN&gt; from the Uboot but, again, with &lt;/SPAN&gt;&lt;SPAN&gt;no&lt;/SPAN&gt;&lt;SPAN&gt; success. I&lt;/SPAN&gt;&lt;SPAN&gt;'d like to add that using &lt;STRONG&gt;gpioinfo&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;cat /sys/kernel/debug/gpio&amp;nbsp;&lt;/STRONG&gt;commands don'&lt;/SPAN&gt;&lt;SPAN&gt;t show that those pins are used by any device.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;In order to debug the problem, I&lt;/SPAN&gt;&lt;SPAN&gt;'ve tried to use other SAI1 pins and I'&lt;/SPAN&gt;&lt;SPAN&gt;ve noticed that only those which are related to the ethernet RGMII cannot be controlled; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; I define other pins in the same way, the value can be changed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Therefore, I&lt;/SPAN&gt;&lt;SPAN&gt;'d like to ask, could you know what might be the cause of the problem? Are ethernet RGMII pins somehow hardwired to the appropriate SAI1 pins or the problem comes from somewhere else?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Dragan&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Feb 2025 08:41:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2052803#M234537</guid>
      <dc:creator>idragan</dc:creator>
      <dc:date>2025-02-27T08:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet RGMII pins cannot be reassigned as GPIO</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053030#M234546</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/247319"&gt;@idragan&lt;/a&gt;!&lt;BR /&gt;Thank you for contacting NXP Support!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you share the device tree of your development board?&lt;/P&gt;
&lt;P&gt;The pins that you want to use as a GPIOS are the &lt;STRONG&gt;SAI1_TXD1&amp;nbsp;&lt;/STRONG&gt;and &lt;STRONG&gt;SAI1_RXD5&lt;/STRONG&gt;?&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>Thu, 27 Feb 2025 14:41:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053030#M234546</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2025-02-27T14:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet RGMII pins cannot be reassigned as GPIO</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053126#M234557</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the fast response!&lt;BR /&gt;&lt;BR /&gt;Sure, I'm attaching dts file we're using. As for the pins, yes, we'd like to use&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;SAI1_TXD1&lt;/STRONG&gt;,&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;SAI1_RXD5&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;SAI1_RXD4 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;which is currently not present in this device tree).&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dragan&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 16:33:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053126#M234557</guid>
      <dc:creator>idragan</dc:creator>
      <dc:date>2025-02-27T16:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet RGMII pins cannot be reassigned as GPIO</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053140#M234562</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/247319"&gt;@idragan&lt;/a&gt;!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I attached two modifications.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with the first one you should be able to use the gpios using the gpio commands &lt;STRONG&gt;(gpioset, gpioget, gpioinfo)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the second one you should be able to use the gpios usingthe next commands:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;$ echo 0 &amp;gt;&amp;gt; /sys/class/leds/&amp;lt;label&amp;gt;/brigthness
$ echo 1 &amp;gt;&amp;gt; /sys/class/leds/&amp;lt;label&amp;gt;/brigthness&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will wait for your update.&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>Thu, 27 Feb 2025 17:00:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053140#M234562</guid>
      <dc:creator>Chavira</dc:creator>
      <dc:date>2025-02-27T17:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ethernet RGMII pins cannot be reassigned as GPIO</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053747#M234589</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/206761"&gt;@Chavira&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Yes, this solved our problem, we can control GPIO pins with libgpiod library. Thanks a lot!&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Dragan&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2025 11:08:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Ethernet-RGMII-pins-cannot-be-reassigned-as-GPIO/m-p/2053747#M234589</guid>
      <dc:creator>idragan</dc:creator>
      <dc:date>2025-02-28T11:08:08Z</dc:date>
    </item>
  </channel>
</rss>

