<?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: iMX8MP Ethernet DeviceTree configuration in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845517#M222411</link>
    <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;RX_CTL doesn't require a pull-up, you can focus on RST and INT.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;Try with this device tree:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;amp;fec {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec&amp;gt;;
	phy-mode = "rgmii-id";
	phy-handle = &amp;lt;&amp;amp;ethphy0&amp;gt;;
	fsl,magic-packet;
	status = "okay";

	mdio {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;0&amp;gt;;

		ethphy0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = &amp;lt;0&amp;gt;;
			pinctrl-names = "default";
			pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec_phy&amp;gt;;
			ti,rx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,tx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,fifo-depth = &amp;lt;DP83867_PHYCR_FIFO_DEPTH_4_B_NIB&amp;gt;;
			ti,dp83867-rxctrl-strap-quirk;
			ti,clk-output-sel = &amp;lt;DP83867_CLK_O_SEL_OFF&amp;gt;;
			reset-gpios = &amp;lt;&amp;amp;gpio4 0 GPIO_ACTIVE_LOW&amp;gt;;
			reset-assert-us = &amp;lt;500000&amp;gt;;
			reset-deassert-us = &amp;lt;50000&amp;gt;;
			enet-phy-lane-no-swap;
			interrupt-parent = &amp;lt;&amp;amp;gpio4&amp;gt;;
			interrupts = &amp;lt;1 IRQ_TYPE_EDGE_FALLING&amp;gt;;
			/* LED0: Link, LED2: activity */
			ti,led-function = &amp;lt;0x0100&amp;gt;;
			/* LED0/2: active High, driven by phy function */
			ti,led-ctrl = &amp;lt;0x1414&amp;gt;;
		};
	};
};


...

&amp;amp;gpio4 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_gpio4&amp;gt;;

	gpio-line-names =
		"ENET0_RST", "ENET0_INT", "ENET1_RST", "ENET1_INT",
		...;
	enet0-int-hog {
		gpio-hog;
		gpios = &amp;lt;1 0&amp;gt;;
		input;
		line-name = "ENET0_INT";
	};

	enet1-int-hog {
		gpio-hog;
		gpios =  0&amp;gt;;
		input;
		line-name = "ENET1_INT";
	};


...

	pinctrl_fec: fecgrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC          0x2
			/* In case MDIO doesn't have a pull up, otherwise 0x2 */
			MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO         0x142
			MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0    0x00000090
			MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1    0x00000090
			MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2    0x00000090
			MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3    0x00000090
			MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC     0x00000090
			MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x00000090
			MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0    0x00000012
			MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1    0x00000012
			MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2    0x00000012
			MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3    0x00000012
			MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x00000012
			MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC    0x00000012
			MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO01         0x150
		&amp;gt;;
	};

	pinctrl_fec_phy: fecphygrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06         0x00000084
			MX8MP_IOMUXC_SD1_DATA5__GPIO2_IO07         0x00000084
			MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO00          0x00000084
		&amp;gt;;
	};&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;Why are GPIO 2-6, 2-7 and 4-0 used for?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2024 22:11:08 GMT</pubDate>
    <dc:creator>JosephAtNXP</dc:creator>
    <dc:date>2024-04-11T22:11:08Z</dc:date>
    <item>
      <title>iMX8MP Ethernet DeviceTree configuration</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845161#M222387</link>
      <description>&lt;P&gt;We use a i.MX8MP processor and connect both ethernet (fec, and qos). Unfortunately, we forgot to put pull-up resistors on both `INT` and `RX_CTL` signals in between CPU and the ETH controller chip.&lt;/P&gt;&lt;P&gt;Now, after starting Linux (rightfully) complains "mdio_bus stmmac-1: MDIO device at address 3 is missing.", same for the other one. After measuring the INT pins, they show 1.7V and 1.2V, respectively. Also, the LED at the RJ45 port is off.&lt;/P&gt;&lt;P&gt;Apart from soldering in a pull-up resistors, we thought about setting the pins on the CPU side in the devicetree file of Linux to (weak) pull-up, but were unsuccessful so far.&lt;/P&gt;&lt;P&gt;Here is an Devicetree file example that works (with hardware pull-up resistors):&lt;/P&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-id";
	phy-handle = &amp;lt;&amp;amp;ethphy0&amp;gt;;
	fsl,magic-packet;
	status = "okay";

	mdio {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;0&amp;gt;;

		ethphy0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = &amp;lt;0&amp;gt;;
			pinctrl-names = "default";
			pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec_phy&amp;gt;;
			ti,rx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,tx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,fifo-depth = &amp;lt;DP83867_PHYCR_FIFO_DEPTH_4_B_NIB&amp;gt;;
			ti,dp83867-rxctrl-strap-quirk;
			ti,clk-output-sel = &amp;lt;DP83867_CLK_O_SEL_OFF&amp;gt;;
			reset-gpios = &amp;lt;&amp;amp;gpio4 0 GPIO_ACTIVE_LOW&amp;gt;;
			reset-assert-us = &amp;lt;500000&amp;gt;;
			reset-deassert-us = &amp;lt;50000&amp;gt;;
			enet-phy-lane-no-swap;
			interrupt-parent = &amp;lt;&amp;amp;gpio4&amp;gt;;
			interrupts = &amp;lt;1 IRQ_TYPE_EDGE_FALLING&amp;gt;;
			/* LED0: Link, LED2: activity */
			ti,led-function = &amp;lt;0x0100&amp;gt;;
			/* LED0/2: active High, driven by phy function */
			ti,led-ctrl = &amp;lt;0x1414&amp;gt;;
		};
	};
};


...

&amp;amp;gpio4 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_gpio4&amp;gt;;

	gpio-line-names =
		"ENET0_RST", "ENET0_INT", "ENET1_RST", "ENET1_INT",
		...;
	enet0-int-hog {
		gpio-hog;
		gpios = &amp;lt;1 0&amp;gt;;
		input;
		line-name = "ENET0_INT";
	};

	enet1-int-hog {
		gpio-hog;
		gpios =  0&amp;gt;;
		input;
		line-name = "ENET1_INT";
	};


...

	pinctrl_fec: fecgrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC          0x40000044
			MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO         0x40000044
			MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0    0x00000090
			MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1    0x00000090
			MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2    0x00000090
			MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3    0x00000090
			MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC     0x00000090
			MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x00000090
			MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0    0x00000012
			MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1    0x00000012
			MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2    0x00000012
			MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3    0x00000012
			MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x00000012
			MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC    0x00000014
		&amp;gt;;
	};

	pinctrl_fec_phy: fecphygrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06         0x00000084
			MX8MP_IOMUXC_SD1_DATA5__GPIO2_IO07         0x00000084
			MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO00         0x00000084
			MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01          0x00000084
		&amp;gt;;
	};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the reference manual of the processor, we changed:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;...
			MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RX_CTL     0x000001D0
...
			MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO01          0x000001C4&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;which should set PUE_1_WEAK_PULL_UP and PE_1_PULL_ENABLE, yet with no success. Does it have to be specified somewhere else?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 11:52:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845161#M222387</guid>
      <dc:creator>ChristianD</dc:creator>
      <dc:date>2024-04-11T11:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP Ethernet DeviceTree configuration</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845517#M222411</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;RX_CTL doesn't require a pull-up, you can focus on RST and INT.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;Try with this device tree:&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;amp;fec {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec&amp;gt;;
	phy-mode = "rgmii-id";
	phy-handle = &amp;lt;&amp;amp;ethphy0&amp;gt;;
	fsl,magic-packet;
	status = "okay";

	mdio {
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;0&amp;gt;;

		ethphy0: ethernet-phy@0 {
			compatible = "ethernet-phy-ieee802.3-c22";
			reg = &amp;lt;0&amp;gt;;
			pinctrl-names = "default";
			pinctrl-0 = &amp;lt;&amp;amp;pinctrl_fec_phy&amp;gt;;
			ti,rx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,tx-internal-delay = &amp;lt;DP83867_RGMIIDCTL_2_25_NS&amp;gt;;
			ti,fifo-depth = &amp;lt;DP83867_PHYCR_FIFO_DEPTH_4_B_NIB&amp;gt;;
			ti,dp83867-rxctrl-strap-quirk;
			ti,clk-output-sel = &amp;lt;DP83867_CLK_O_SEL_OFF&amp;gt;;
			reset-gpios = &amp;lt;&amp;amp;gpio4 0 GPIO_ACTIVE_LOW&amp;gt;;
			reset-assert-us = &amp;lt;500000&amp;gt;;
			reset-deassert-us = &amp;lt;50000&amp;gt;;
			enet-phy-lane-no-swap;
			interrupt-parent = &amp;lt;&amp;amp;gpio4&amp;gt;;
			interrupts = &amp;lt;1 IRQ_TYPE_EDGE_FALLING&amp;gt;;
			/* LED0: Link, LED2: activity */
			ti,led-function = &amp;lt;0x0100&amp;gt;;
			/* LED0/2: active High, driven by phy function */
			ti,led-ctrl = &amp;lt;0x1414&amp;gt;;
		};
	};
};


...

&amp;amp;gpio4 {
	pinctrl-names = "default";
	pinctrl-0 = &amp;lt;&amp;amp;pinctrl_gpio4&amp;gt;;

	gpio-line-names =
		"ENET0_RST", "ENET0_INT", "ENET1_RST", "ENET1_INT",
		...;
	enet0-int-hog {
		gpio-hog;
		gpios = &amp;lt;1 0&amp;gt;;
		input;
		line-name = "ENET0_INT";
	};

	enet1-int-hog {
		gpio-hog;
		gpios =  0&amp;gt;;
		input;
		line-name = "ENET1_INT";
	};


...

	pinctrl_fec: fecgrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SAI1_RXD2__ENET1_MDC          0x2
			/* In case MDIO doesn't have a pull up, otherwise 0x2 */
			MX8MP_IOMUXC_SAI1_RXD3__ENET1_MDIO         0x142
			MX8MP_IOMUXC_SAI1_RXD4__ENET1_RGMII_RD0    0x00000090
			MX8MP_IOMUXC_SAI1_RXD5__ENET1_RGMII_RD1    0x00000090
			MX8MP_IOMUXC_SAI1_RXD6__ENET1_RGMII_RD2    0x00000090
			MX8MP_IOMUXC_SAI1_RXD7__ENET1_RGMII_RD3    0x00000090
			MX8MP_IOMUXC_SAI1_TXC__ENET1_RGMII_RXC     0x00000090
			MX8MP_IOMUXC_SAI1_TXFS__ENET1_RGMII_RX_CTL 0x00000090
			MX8MP_IOMUXC_SAI1_TXD0__ENET1_RGMII_TD0    0x00000012
			MX8MP_IOMUXC_SAI1_TXD1__ENET1_RGMII_TD1    0x00000012
			MX8MP_IOMUXC_SAI1_TXD2__ENET1_RGMII_TD2    0x00000012
			MX8MP_IOMUXC_SAI1_TXD3__ENET1_RGMII_TD3    0x00000012
			MX8MP_IOMUXC_SAI1_TXD4__ENET1_RGMII_TX_CTL 0x00000012
			MX8MP_IOMUXC_SAI1_TXD5__ENET1_RGMII_TXC    0x00000012
			MX8MP_IOMUXC_SAI1_RXFS__GPIO4_IO01         0x150
		&amp;gt;;
	};

	pinctrl_fec_phy: fecphygrp {
		fsl,pins = &amp;lt;
			MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06         0x00000084
			MX8MP_IOMUXC_SD1_DATA5__GPIO2_IO07         0x00000084
			MX8MP_IOMUXC_SAI1_RXC__GPIO4_IO00          0x00000084
		&amp;gt;;
	};&lt;/LI-CODE&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt;"&gt;Why are GPIO 2-6, 2-7 and 4-0 used for?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2024 22:11:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845517#M222411</guid>
      <dc:creator>JosephAtNXP</dc:creator>
      <dc:date>2024-04-11T22:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP Ethernet DeviceTree configuration</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845915#M222432</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;GPIO4-0 is connected to ENET_RST, GPIOs 2-6 and -7 are some extended run-time configuration and status info bits (&lt;A href="https://www.ti.com/lit/gpn/DP83867IS" target="_blank" rel="noopener nofollow noreferrer"&gt;https://www.ti.com/lit/gpn/DP83867IS&lt;/A&gt; GPIO_MUX_CTL register has more details)&lt;/P&gt;&lt;P&gt;On a side note: you were right with your suspicion on the MDIO. The pullups were forgotten there, too. Kudos!&lt;/P&gt;&lt;P&gt;I tried your modifications (including the MDIO pullup), but to no avail. The ENET_RST on GPIO4-0 I did not modify since this guy has a HW pullup resistor on it. After modifications to the Linux devicetree, even the RJ45 LEDs stays disabled. Is it maybe required to also do these modifications for uboot devicetree files?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Apr 2024 09:19:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-Ethernet-DeviceTree-configuration/m-p/1845915#M222432</guid>
      <dc:creator>ChristianD</dc:creator>
      <dc:date>2024-04-12T09:19:21Z</dc:date>
    </item>
  </channel>
</rss>

