Skip to contentSkip to conversation

imx: kontron-sl-mx8mm: Sync dts files and fix ethernet

PATCH In review Frieder Schrempf 5 participants 8 messages Jun 14, 2022 – Jun 23, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 imx: kontron-sl-mx8mm: Sync dts files and fix ethernet

From: Frieder Schrempf <[email protected]>

This syncs the devicetree files with the latest Linux kernel (5.19-rc2). This also fixes the currently broken ethernet support:

Before:

Net: Could not get PHY for FEC0: addr 0

After:

Net: eth0: ethernet@30be0000

---
 arch/arm/dts/imx8mm-kontron-n801x-s.dts    | 48 +++-------------------
 arch/arm/dts/imx8mm-kontron-n801x-som.dtsi |  6 +--
 2 files changed, 8 insertions(+), 46 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-s.dts +5 -43
index c796d144e22..23be1ec538b 100644
@@ -6,7 +6,6 @@
 /dts-v1/;
 
 #include "imx8mm-kontron-n801x-som.dtsi"
-#include <dt-bindings/net/mscc-phy-vsc8531.h>
 
 / {
 	model = "Kontron i.MX8MM N801X S";
@@ -81,7 +80,6 @@
 		regulator-name = "vdd-5v";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
 	};
 };
 
@@ -124,38 +122,14 @@
 		#size-cells = <0>;
 
 		ethphy: ethernet-phy@0 {
-			compatible = "ethernet-phy-id0007.0570";
 			reg = <0>;
-			reset-assert-us = <100>;
-			reset-deassert-us = <100>;
+			reset-assert-us = <1>;
+			reset-deassert-us = <15000>;
 			reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>;
-			vsc8531,led-0-mode = <VSC8531_LINK_100_1000_ACTIVITY>;
-			vsc8531,led-1-mode = <VSC8531_LINK_ACTIVITY>;
-			vsc8531,led-0-combine-disable;
 		};
 	};
 };
 
-&gpio4 {
-	dsi_mux_sel: dsi_mux_sel {
-		gpio-hog;
-		gpios = <14 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "dsi-mux-sel";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_dsi_sel>;
-	};
-
-	dsi_mux_oe {
-		gpio-hog;
-		gpios = <15 GPIO_ACTIVE_LOW>;
-		output-high;
-		line-name = "dsi-mux-oe";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_dsi_oe>;
-	};
-};
-
 &i2c4 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -208,7 +182,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbnet: usbether@1 {
+		usbnet: ethernet@1 {
 			compatible = "usb424,ec00";
 			reg = <1>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
@@ -237,18 +211,6 @@
 		>;
 	};
 
-	pinctrl_dsi_sel: dsiselgrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI1_TXD2_GPIO4_IO14		0x19
-		>;
-	};
-
-	pinctrl_dsi_oe: dsioegrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI1_TXD3_GPIO4_IO15		0x19
-		>;
-	};
-
 	pinctrl_ecspi2: ecspi2grp {
 		fsl,pins = <
 			MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO		0x82
@@ -362,7 +324,7 @@
 		>;
 	};
 
-	pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
+	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
 		fsl,pins = <
 			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK			0x194
 			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD			0x1d4
@@ -374,7 +336,7 @@
 		>;
 	};
 
-	pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
+	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
 		fsl,pins = <
 			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK			0x196
 			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD			0x1d6
arch/arm/dts/imx8mm-kontron-n801x-som.dtsi +3 -3
index c3418d263eb..8f90eb02550 100644
@@ -63,10 +63,10 @@
 &ecspi1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_ecspi1>;
-	cs-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+	cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
 	status = "okay";
 
-	spi-flash@0 {
+	flash@0 {
 		compatible = "mxicy,mx25r1635f", "jedec,spi-nor";
 		spi-max-frequency = <80000000>;
 		reg = <0>;
@@ -154,7 +154,7 @@
 			reg_vdd_snvs: LDO2 {
 				regulator-name = "ldo2";
 				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
+				regulator-max-microvolt = <900000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
Signature · 1 line
2.36.1
#1 lore raw

PATCH 2/2 imx: kontron-sl-mx8mm: Remove deprecated phy-mode property

From: Frieder Schrempf <[email protected]>

This was previously needed, but U-Boot is now capable of parsing the new "phy-connection-type" property that is already used in the main devicetree.

---
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +0 -4
index 6fdc1968158..2c62f05cec1 100644
@@ -41,10 +41,6 @@
 	u-boot,dm-spl;
 };
 
-&fec1 {
-	phy-mode = "rgmii-rxid";
-};
-
 &i2c1 {
 	u-boot,dm-spl;
 	u-boot,dm-pre-reloc;
Signature · 1 line
2.36.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] imx: kontron-sl-mx8mm: Remove deprecated phy-mode property

Hi Frieder,

Quoted 7 lines · Frieder Schrempf

From: Frieder Schrempf <[email protected]>

This was previously needed, but U-Boot is now capable of parsing the new "phy-connection-type" property that is already used in the main devicetree.

Should the Subject say "unneeded" instead of "deprecated"?

#3 lore raw

Re: [PATCH 2/2] imx: kontron-sl-mx8mm: Remove deprecated phy-mode property

Am 14.06.22 um 15:13 schrieb Fabio Estevam:

Quoted 5 lines

Hi Frieder,

Quoted 2 lines · Frieder Schrempf

From: Frieder Schrempf <[email protected]>

Quoted 7 lines
Quoted 5 lines

This was previously needed, but U-Boot is now capable of parsing the new "phy-connection-type" property that is already used in the main devicetree.

Should the Subject say "unneeded" instead of "deprecated"?

Maybe that would be more appropriate, yes. I just checked the kernel bindings and it seems like in contrast to what I memorized, "phy-mode" is actually not (yet?) marked as deprecated.

#4 lore raw

Re: [PATCH 2/2] imx: kontron-sl-mx8mm: Remove deprecated phy-mode property

In reply to Frieder Schrempf
Quoted 8 lines · Frieder Schrempf

From: Frieder Schrempf <[email protected]>

This was previously needed, but U-Boot is now capable of parsing the new "phy-connection-type" property that is already used in the main devicetree.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom
#5 lore raw
In reply to Frieder Schrempf

Hi Tom,

Am 14.06.22 um 15:03 schrieb Frieder Schrempf:

Quoted 7 lines

From: Frieder Schrempf <[email protected]>

This syncs the devicetree files with the latest Linux kernel (5.19-rc2). This also fixes the currently broken ethernet support:

Before:

Quoted 7 lines

Net: Could not get PHY for FEC0: addr 0

After:

Net: eth0: ethernet@30be0000

I only posted this last week and there haven't been any responses yet. But as the 2022.07 release is approaching and you were asking for pending fixes, this is one you might consider.

Thanks
Frieder

Quoted 138 lines
---
 arch/arm/dts/imx8mm-kontron-n801x-s.dts    | 48 +++-------------------
 arch/arm/dts/imx8mm-kontron-n801x-som.dtsi |  6 +--
 2 files changed, 8 insertions(+), 46 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-s.dts +5 -43
index c796d144e22..23be1ec538b 100644
@@ -6,7 +6,6 @@
 /dts-v1/;
 
 #include "imx8mm-kontron-n801x-som.dtsi"
-#include <dt-bindings/net/mscc-phy-vsc8531.h>
 
 / {
 	model = "Kontron i.MX8MM N801X S";
@@ -81,7 +80,6 @@
 		regulator-name = "vdd-5v";
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
-		regulator-always-on;
 	};
 };
 
@@ -124,38 +122,14 @@
 		#size-cells = <0>;
 
 		ethphy: ethernet-phy@0 {
-			compatible = "ethernet-phy-id0007.0570";
 			reg = <0>;
-			reset-assert-us = <100>;
-			reset-deassert-us = <100>;
+			reset-assert-us = <1>;
+			reset-deassert-us = <15000>;
 			reset-gpios = <&gpio4 27 GPIO_ACTIVE_LOW>;
-			vsc8531,led-0-mode = <VSC8531_LINK_100_1000_ACTIVITY>;
-			vsc8531,led-1-mode = <VSC8531_LINK_ACTIVITY>;
-			vsc8531,led-0-combine-disable;
 		};
 	};
 };
 
-&gpio4 {
-	dsi_mux_sel: dsi_mux_sel {
-		gpio-hog;
-		gpios = <14 GPIO_ACTIVE_HIGH>;
-		output-high;
-		line-name = "dsi-mux-sel";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_dsi_sel>;
-	};
-
-	dsi_mux_oe {
-		gpio-hog;
-		gpios = <15 GPIO_ACTIVE_LOW>;
-		output-high;
-		line-name = "dsi-mux-oe";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_dsi_oe>;
-	};
-};
-
 &i2c4 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -208,7 +182,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		usbnet: usbether@1 {
+		usbnet: ethernet@1 {
 			compatible = "usb424,ec00";
 			reg = <1>;
 			local-mac-address = [ 00 00 00 00 00 00 ];
@@ -237,18 +211,6 @@
 		>;
 	};
 
-	pinctrl_dsi_sel: dsiselgrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI1_TXD2_GPIO4_IO14		0x19
-		>;
-	};
-
-	pinctrl_dsi_oe: dsioegrp {
-		fsl,pins = <
-			MX8MM_IOMUXC_SAI1_TXD3_GPIO4_IO15		0x19
-		>;
-	};
-
 	pinctrl_ecspi2: ecspi2grp {
 		fsl,pins = <
 			MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO		0x82
@@ -362,7 +324,7 @@
 		>;
 	};
 
-	pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
+	pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp {
 		fsl,pins = <
 			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK			0x194
 			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD			0x1d4
@@ -374,7 +336,7 @@
 		>;
 	};
 
-	pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
+	pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp {
 		fsl,pins = <
 			MX8MM_IOMUXC_SD2_CLK_USDHC2_CLK			0x196
 			MX8MM_IOMUXC_SD2_CMD_USDHC2_CMD			0x1d6
arch/arm/dts/imx8mm-kontron-n801x-som.dtsi +3 -3
index c3418d263eb..8f90eb02550 100644
@@ -63,10 +63,10 @@
 &ecspi1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_ecspi1>;
-	cs-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
+	cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
 	status = "okay";
 
-	spi-flash@0 {
+	flash@0 {
 		compatible = "mxicy,mx25r1635f", "jedec,spi-nor";
 		spi-max-frequency = <80000000>;
 		reg = <0>;
@@ -154,7 +154,7 @@
 			reg_vdd_snvs: LDO2 {
 				regulator-name = "ldo2";
 				regulator-min-microvolt = <800000>;
-				regulator-max-microvolt = <800000>;
+				regulator-max-microvolt = <900000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
reviewer Reviewed-by
#6 lore raw

Hi Frieder,

Quoted 15 lines · Frieder Schrempf

Hi Tom,

Am 14.06.22 um 15:03 schrieb Frieder Schrempf:

Quoted 11 lines

From: Frieder Schrempf <[email protected]>

This syncs the devicetree files with the latest Linux kernel (5.19-rc2). This also fixes the currently broken ethernet support:

Before:

Net: Could not get PHY for FEC0: addr 0

After:

Quoted 7 lines
Quoted 3 lines

Net: eth0: ethernet@30be0000

I only posted this last week and there haven't been any responses yet. But as the 2022.07 release is approaching and you were asking for pending fixes, this is one you might consider.

Yes, this one is a bug fix, so it should go to 2022.07 final.

#7 lore raw
In reply to Frieder Schrempf
Quoted 7 lines · Frieder Schrempf

From: Frieder Schrempf <[email protected]>

This syncs the devicetree files with the latest Linux kernel (5.19-rc2). This also fixes the currently broken ethernet support:

Before:

Quoted 8 lines

Net: Could not get PHY for FEC0: addr 0

After:

Net: eth0: ethernet@30be0000

Applied to u-boot/master, thanks!

Signature · 1 line
Tom