svn commit: r298500 - head/sys/boot/fdt/dts/mips

Stanislav Galabov sgalabov at FreeBSD.org
Sat Apr 23 04:24:32 UTC 2016


Author: sgalabov
Date: Sat Apr 23 04:24:30 2016
New Revision: 298500
URL: https://svnweb.freebsd.org/changeset/base/298500

Log:
  Reduce the FreeBSD specific DTS files for Mediatek/Ralink
  
  The introduction of palmbus and previous work allows us to cut the
  differences between FreeBSD and OpenWRT DTS files a bit further.
  
  Approved by:	adrian (mentor)
  Sponsored by:	Smartcom - Bulgaria AD
  Differential Revision:	https://reviews.freebsd.org/D6043

Modified:
  head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
  head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi

Modified: head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,22 +14,9 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the clocks node for the usbphy */
 	usbphy: usbphy {
 		clocks = <&clkctrl 22 &clkctrl 25>;
-		clock-names = "host", "device";
 	};
 
 	pcie at 10140000 {

Modified: head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,21 +14,8 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the clocks node for the usbphy */
 	usbphy: usbphy {
 		clocks = <&clkctrl 22 &clkctrl 25>;
-		clock-names = "host", "device";
 	};
 };

Modified: head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 1E000000/uartlite at c00";
 	};
 
 	/*
@@ -18,33 +14,8 @@
 		#clock-cells = <1>;
 	};
 
-	gic: interrupt-controller at 1fbc0000 {
-		/*
-		 * OpenWRT does not define the GIC interrupt, but we need it
-		 * for now, at least until we re-work our GIC driver
-		 */
-		interrupt-parent = <&cpuintc>;
-		interrupts = <2>;
-	};
-
 	palmbus at 1E000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {
-			/*
-			 * Mark uartlite as compatible to mtk,ns16550a instead
-			 * of simply ns16550a so we can autodetect the UART
-			 * clock
-			 */
-			compatible = "mtk,ns16550a";
-		};
+		uartlite at c00 { clock-frequency = <50000000>; };
 
 		gpio at 600 {
 			/*
@@ -62,17 +33,17 @@
 
 			gpio0: bank at 0 {
 				reg = <0x0 0x100>;
-				interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <0 6 4>;
 			};
 
 			gpio1: bank at 1 {
 				reg = <0x0 0x100>;
-				interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <0 6 4>;
 			};
 
 			gpio2: bank at 2 {
 				reg = <0x0 0x100>;
-				interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <0 6 4>;
 			};
 		};
 	};

Modified: head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uart2 at e00";
 	};
 
 	/*
@@ -19,23 +15,9 @@
 	};
 
 	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uart2 at e00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uart2 at e00 {
-			/*
-			 * Mark uartlite as compatible to mtk,ns16550a instead
-			 * of simply ns16550a so we can autodetect the UART
-			 * clock
-			 */
-			compatible = "mtk,ns16550a";
-		};
+		uartlite at c00 { clock-frequency = <40000000>; };
+		uart1 at d00 { clock-frequency = <40000000>; };
+		uart2 at e00 { clock-frequency = <40000000>; };
 
 		gpio at 600 {
 			/*
@@ -66,9 +48,9 @@
 		};
 	};
 
+	/* Specify the clocks node for the usbphy */
 	usbphy: usbphy at 10120000 {
 		clocks = <&clkctrl 22 &clkctrl 25>;
-		clock-names = "host", "device";
 	};
 
 	pcie at 10140000 {

Modified: head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 300000/uartlite at c00";
 	};
 
 	/*
@@ -17,17 +13,4 @@
 		compatible = "ralink,rt2880-clock";
 		#clock-cells = <1>;
 	};
-
-	palmbus at 300000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
 };

Modified: head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,24 +14,10 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the USB PHY */
 	usbphy: usbphy {
 		compatible = "ralink,rt3050-usbphy";
 		resets = <&rstctrl 22>;
-		reset-names = "otg";
 		clocks = <&clkctrl 18>;
-		clock-names = "otg";
 	};
 };

Modified: head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,21 +14,8 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the clocks node for the usbphy */
 	usbphy {
 		clocks = <&clkctrl 18 &clkctrl 20>;
-		clock-names = "host", "device";
 	};
 };

Modified: head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,19 +14,7 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the clocks node for the usbphy */
 	usbphy: usbphy {
 		clocks = <&clkctrl 22 &clkctrl 25>;
 		clock-names = "host", "device";

Modified: head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi
==============================================================================
--- head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi	Sat Apr 23 04:22:38 2016	(r298499)
+++ head/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi	Sat Apr 23 04:24:30 2016	(r298500)
@@ -1,13 +1,9 @@
 /* $FreeBSD$ */
 
 / {
-
-	/*
-	 * FreeBSD's stdin and stdout, so we can have a console
-	 */
-	chosen {
-		stdin = &uartlite;
-		stdout = &uartlite;
+	/* Specify alias for serial0 so we have a working console */
+	aliases {
+		serial0 = "/palmbus at 10000000/uartlite at c00";
 	};
 
 	/*
@@ -18,21 +14,8 @@
 		#clock-cells = <1>;
 	};
 
-	palmbus at 10000000 {
-		/*
-		 * Make palmbus compatible to our simplebus
-		 */
-		compatible = "simple-bus";
-
-		/*
-		 * Reference uartlite at c00 as uartlite, so we can address it
-		 * within the chosen node above
-		 */
-		uartlite: uartlite at c00 {};
-	};
-
+	/* Specify the clocks node for the USB PHY */
 	usbphy {
 		clocks = <&clkctrl 18>;
-		clock-names = "host";
 	};
 };


More information about the svn-src-head mailing list