[U-Boot] [PATCH 1/4] imx: cx9020: migrate cx9020 to CONFIG_DM_ETH

linux-kernel-dev at beckhoff.com linux-kernel-dev at beckhoff.com
Wed Oct 23 05:40:40 UTC 2019


From: Steffen Dirkwinkel <s.dirkwinkel at beckhoff.com>

Acked-by: Patrick Bruenn <p.bruenn at beckhoff.com>
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel at beckhoff.com>
---

 arch/arm/dts/imx53-cx9020.dts | 31 ++++++++++++++++++++-----------
 configs/mx53cx9020_defconfig  |  2 ++
 include/configs/mx53cx9020.h  |  4 ----
 3 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/arch/arm/dts/imx53-cx9020.dts b/arch/arm/dts/imx53-cx9020.dts
index 36ceae36aa9..2b7f7288088 100644
--- a/arch/arm/dts/imx53-cx9020.dts
+++ b/arch/arm/dts/imx53-cx9020.dts
@@ -99,17 +99,6 @@
 				MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS	0x80000000
 				MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD	0x80000000
 
-				MX53_PAD_FEC_MDC__FEC_MDC		0x4
-				MX53_PAD_FEC_MDIO__FEC_MDIO		0x1fc
-				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x180
-				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x180
-				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x180
-				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x180
-				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x180
-				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x4
-				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x4
-				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x4
-
 				MX53_PAD_CSI0_DAT8__I2C1_SDA		0x400001ec
 				MX53_PAD_CSI0_DAT9__I2C1_SCL		0x400001ec
 
@@ -148,6 +137,21 @@
 			>;
 		};
 
+		pinctrl_fec0: fec0grp {
+			fsl,pins = <
+				MX53_PAD_FEC_MDC__FEC_MDC		0x4
+				MX53_PAD_FEC_MDIO__FEC_MDIO		0x1fc
+				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x180
+				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x180
+				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x180
+				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x180
+				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x180
+				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x4
+				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x4
+				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x4
+			>;
+		};
+
 		pinctrl_esdhc1: esdhc1grp {
 			fsl,pins = <
 				MX53_PAD_SD1_DATA0__ESDHC1_DAT0		0x1d5
@@ -209,5 +213,10 @@
 	pinctrl-names = "default";
 	phy-mode = "rmii";
 	phy-reset-gpios = <&gpio7 6 0>;
+	pinctrl-0 = <&pinctrl_fec0>;
 	status = "okay";
+	fixed-link { /* RMII fixed link to KZ8863 */
+		speed = <100>;
+		full-duplex;
+	};
 };
diff --git a/configs/mx53cx9020_defconfig b/configs/mx53cx9020_defconfig
index 4ed38250f31..17c44bd070a 100644
--- a/configs/mx53cx9020_defconfig
+++ b/configs/mx53cx9020_defconfig
@@ -28,7 +28,9 @@ CONFIG_FPGA_CYCLON2=y
 CONFIG_DM_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_ESDHC_IMX=y
+CONFIG_DM_ETH=y
 CONFIG_FEC_MXC=y
+CONFIG_PHYLIB=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX5=y
diff --git a/include/configs/mx53cx9020.h b/include/configs/mx53cx9020.h
index bbe05740330..f1007915118 100644
--- a/include/configs/mx53cx9020.h
+++ b/include/configs/mx53cx9020.h
@@ -35,10 +35,6 @@
 
 /* bootz: zImage/initrd.img support */
 
-/* Eth Configs */
-#define IMX_FEC_BASE	FEC_BASE_ADDR
-#define CONFIG_ETHPRIME		"FEC0"
-#define CONFIG_FEC_MXC_PHYADDR	0x1F
 
 /* USB Configs */
 #define CONFIG_MXC_USB_PORT	1
-- 
2.23.0


More information about the U-Boot mailing list