[U-Boot] [PATCH 1/9] m68k: add fec base node to devicetrees

Angelo Dureghello angelo.dureghello at timesys.com
Fri Nov 15 22:54:12 UTC 2019


From: Angelo Durgehello <angelo.dureghello at timesys.com>

Add basic ethernet controller devicetree nodes for all ColdFire
families.

Signed-off-by: Angelo Durgehello <angelo.dureghello at timesys.com>
---
 arch/m68k/dts/mcf5208.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf523x.dtsi  | 12 ++++++++++++
 arch/m68k/dts/mcf5271.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5272.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5275.dtsi  | 22 +++++++++++++++++++++-
 arch/m68k/dts/mcf5282.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5301x.dtsi | 21 +++++++++++++++++++++
 arch/m68k/dts/mcf5329.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf537x.dtsi  | 10 ++++++++++
 arch/m68k/dts/mcf5441x.dtsi | 20 ++++++++++++++++++++
 arch/m68k/dts/mcf5445x.dtsi | 20 ++++++++++++++++++++
 arch/m68k/dts/mcf54xx.dtsi  | 32 ++++++++++++++++++++++++++++++++
 12 files changed, 186 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/dts/mcf5208.dtsi b/arch/m68k/dts/mcf5208.dtsi
index 558d8bf41a..4802dd3074 100644
--- a/arch/m68k/dts/mcf5208.dtsi
+++ b/arch/m68k/dts/mcf5208.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x400>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf523x.dtsi b/arch/m68k/dts/mcf523x.dtsi
index 9e79d472ec..550e824cb1 100644
--- a/arch/m68k/dts/mcf523x.dtsi
+++ b/arch/m68k/dts/mcf523x.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,17 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				#address-cells=<2>;
+				#size-cells=<1>;
+				reg = <0x1000 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5271.dtsi b/arch/m68k/dts/mcf5271.dtsi
index 29355528d0..b3484c2c84 100644
--- a/arch/m68k/dts/mcf5271.dtsi
+++ b/arch/m68k/dts/mcf5271.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,15 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5272.dtsi b/arch/m68k/dts/mcf5272.dtsi
index a56117728b..173baaba3f 100644
--- a/arch/m68k/dts/mcf5272.dtsi
+++ b/arch/m68k/dts/mcf5272.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -33,6 +34,15 @@
 				reg = <0x140 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 840 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x840 0x400>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5275.dtsi b/arch/m68k/dts/mcf5275.dtsi
index b375609d4a..99dd7d3924 100644
--- a/arch/m68k/dts/mcf5275.dtsi
+++ b/arch/m68k/dts/mcf5275.dtsi
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright (C) 2018 Angelo Dureghello <angelo at sysam.it>
+ * Copyright (C) 2019 Angelo Dureghello <angelo at sysam.it>
  */
 
 / {
@@ -8,6 +8,8 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -39,6 +41,24 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x800>;
+				max-speed = <100>;
+				phy-addr = <(-1)>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
+
+			fec1: ethernet at 1800 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1800 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5282.dtsi b/arch/m68k/dts/mcf5282.dtsi
index 3ad1be7bb5..d9916b1cd9 100644
--- a/arch/m68k/dts/mcf5282.dtsi
+++ b/arch/m68k/dts/mcf5282.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -39,6 +40,15 @@
 				reg = <0x280 0x40>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 1000 {
+				compatible = "fsl,mcf-fec";
+				reg = <0x1000 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				status = "disabled";
+			};
 		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5301x.dtsi b/arch/m68k/dts/mcf5301x.dtsi
index 0891e4dfd5..f60898aa4a 100644
--- a/arch/m68k/dts/mcf5301x.dtsi
+++ b/arch/m68k/dts/mcf5301x.dtsi
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -44,5 +46,24 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x200>;
+			mii-base = <0>;
+			max-speed = <100>;
+			phy-addr = <(-1)>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc034000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc034000 0x800>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5329.dtsi b/arch/m68k/dts/mcf5329.dtsi
index aeaa6430af..de348968b5 100644
--- a/arch/m68k/dts/mcf5329.dtsi
+++ b/arch/m68k/dts/mcf5329.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x800>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf537x.dtsi b/arch/m68k/dts/mcf537x.dtsi
index aeaa6430af..2a2a32a59b 100644
--- a/arch/m68k/dts/mcf537x.dtsi
+++ b/arch/m68k/dts/mcf537x.dtsi
@@ -8,6 +8,7 @@
 
 	aliases {
 		serial0 = &uart0;
+		fec0 = &fec0;
 	};
 
 	soc {
@@ -32,5 +33,14 @@
 			reg = <0xfc068000 0x40>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x400>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5441x.dtsi b/arch/m68k/dts/mcf5441x.dtsi
index 71b392adc3..6769bdc270 100644
--- a/arch/m68k/dts/mcf5441x.dtsi
+++ b/arch/m68k/dts/mcf5441x.dtsi
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -83,5 +85,23 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc0d4000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc0d4000 0x4000>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc0d8000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc0d8000 0x4000>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf5445x.dtsi b/arch/m68k/dts/mcf5445x.dtsi
index ccbee29a6c..b7ecc99c09 100644
--- a/arch/m68k/dts/mcf5445x.dtsi
+++ b/arch/m68k/dts/mcf5445x.dtsi
@@ -9,6 +9,8 @@
 	aliases {
 		serial0 = &uart0;
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -44,5 +46,23 @@
 			spi-mode = <0>;
 			status = "disabled";
 		};
+
+		fec0: ethernet at fc030000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc030000 0x4000>;
+			mii-base = <0>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
+
+		fec1: ethernet at fc034000 {
+			compatible = "fsl,mcf-fec";
+			reg = <0xfc034000 0x4000>;
+			mii-base = <1>;
+			max-speed = <100>;
+			timeout-loop = <50000>;
+			status = "disabled";
+		};
 	};
 };
diff --git a/arch/m68k/dts/mcf54xx.dtsi b/arch/m68k/dts/mcf54xx.dtsi
index 537bb424f3..e9cebb9f74 100644
--- a/arch/m68k/dts/mcf54xx.dtsi
+++ b/arch/m68k/dts/mcf54xx.dtsi
@@ -11,6 +11,8 @@
 		 * no UARTS.
 		 */
 		spi0 = &dspi0;
+		fec0 = &fec0;
+		fec1 = &fec1;
 	};
 
 	soc {
@@ -35,6 +37,36 @@
 				spi-mode = <0>;
 				status = "disabled";
 			};
+
+			fec0: ethernet at 9000 {
+				compatible = "fsl,mcf-dma-fec";
+				reg = <0x9000 0x800>;
+				mii-base = <0>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				rx-task = <0>;
+				tx-task = <1>;
+				rx-piority = <6>;
+				tx-piority = <7>;
+				rx-init = <16>;
+				tx-init = <17>;
+				status = "disabled";
+			};
+
+			fec1: ethernet at 9800 {
+				compatible = "fsl,mcf-dma-fec";
+				reg = <0x9800 0x800>;
+				mii-base = <1>;
+				max-speed = <100>;
+				timeout-loop = <50000>;
+				rx-task = <2>;
+				tx-task = <3>;
+				rx-piority = <6>;
+				tx-piority = <7>;
+				rx-init = <30>;
+				tx-init = <31>;
+				status = "disabled";
+			};
 		};
 	};
 };
-- 
2.24.0



More information about the U-Boot mailing list