summaryrefslogtreecommitdiffstats
path: root/sys/boot/fdt
diff options
context:
space:
mode:
authorsgalabov <sgalabov@FreeBSD.org>2016-04-23 04:24:30 +0000
committersgalabov <sgalabov@FreeBSD.org>2016-04-23 04:24:30 +0000
commite9158ddce02fd6f30f67428a796ec439fc53ca7e (patch)
tree5668b9c4fcd51e48e8e50f05cbabd959b0a2ff7c /sys/boot/fdt
parent0be3909c273eadc90bcfbc3860861230b4a1059b (diff)
downloadFreeBSD-src-e9158ddce02fd6f30f67428a796ec439fc53ca7e.zip
FreeBSD-src-e9158ddce02fd6f30f67428a796ec439fc53ca7e.tar.gz
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
Diffstat (limited to 'sys/boot/fdt')
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi25
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi25
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi43
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi32
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi23
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi26
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi25
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi24
-rw-r--r--sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi25
9 files changed, 41 insertions, 207 deletions
diff --git a/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi b/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
index 8f4c9d5..36b0132 100644
--- a/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-mt7620a.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,22 +14,9 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the clocks node for the usbphy */
usbphy: usbphy {
clocks = <&clkctrl 22 &clkctrl 25>;
- clock-names = "host", "device";
};
pcie@10140000 {
diff --git a/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi b/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
index c1d537b..5a213db 100644
--- a/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-mt7620n.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,21 +14,8 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the clocks node for the usbphy */
usbphy: usbphy {
clocks = <&clkctrl 22 &clkctrl 25>;
- clock-names = "host", "device";
};
};
diff --git a/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi b/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
index 91ae1b1..dc67925 100644
--- a/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-mt7621.dtsi
@@ -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@1E000000/uartlite@c00";
};
/*
@@ -18,33 +14,8 @@
#clock-cells = <1>;
};
- gic: interrupt-controller@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@1E000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {
- /*
- * Mark uartlite as compatible to mtk,ns16550a instead
- * of simply ns16550a so we can autodetect the UART
- * clock
- */
- compatible = "mtk,ns16550a";
- };
+ uartlite@c00 { clock-frequency = <50000000>; };
gpio@600 {
/*
@@ -62,17 +33,17 @@
gpio0: bank@0 {
reg = <0x0 0x100>;
- interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <0 6 4>;
};
gpio1: bank@1 {
reg = <0x0 0x100>;
- interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <0 6 4>;
};
gpio2: bank@2 {
reg = <0x0 0x100>;
- interrupts = <GIC_SHARED 6 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <0 6 4>;
};
};
};
diff --git a/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi b/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
index 42401b5..9595b73 100644
--- a/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-mt7628an.dtsi
@@ -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@10000000/uart2@e00";
};
/*
@@ -19,23 +15,9 @@
};
palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uart2@e00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uart2@e00 {
- /*
- * Mark uartlite as compatible to mtk,ns16550a instead
- * of simply ns16550a so we can autodetect the UART
- * clock
- */
- compatible = "mtk,ns16550a";
- };
+ uartlite@c00 { clock-frequency = <40000000>; };
+ uart1@d00 { clock-frequency = <40000000>; };
+ uart2@e00 { clock-frequency = <40000000>; };
gpio@600 {
/*
@@ -66,9 +48,9 @@
};
};
+ /* Specify the clocks node for the usbphy */
usbphy: usbphy@10120000 {
clocks = <&clkctrl 22 &clkctrl 25>;
- clock-names = "host", "device";
};
pcie@10140000 {
diff --git a/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi b/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
index 96ebafe..264f504 100644
--- a/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-rt2880.dtsi
@@ -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@300000/uartlite@c00";
};
/*
@@ -17,17 +13,4 @@
compatible = "ralink,rt2880-clock";
#clock-cells = <1>;
};
-
- palmbus@300000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
};
diff --git a/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi b/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
index 13eb530..52e1921 100644
--- a/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-rt3050.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,24 +14,10 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the USB PHY */
usbphy: usbphy {
compatible = "ralink,rt3050-usbphy";
resets = <&rstctrl 22>;
- reset-names = "otg";
clocks = <&clkctrl 18>;
- clock-names = "otg";
};
};
diff --git a/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi b/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
index a6a6887..380ec6d 100644
--- a/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-rt3352.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,21 +14,8 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the clocks node for the usbphy */
usbphy {
clocks = <&clkctrl 18 &clkctrl 20>;
- clock-names = "host", "device";
};
};
diff --git a/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi b/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
index 94436f6..d2447b9 100644
--- a/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-rt3883.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,19 +14,7 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the clocks node for the usbphy */
usbphy: usbphy {
clocks = <&clkctrl 22 &clkctrl 25>;
clock-names = "host", "device";
diff --git a/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi b/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi
index 5cc5383..4b6290e 100644
--- a/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi
+++ b/sys/boot/fdt/dts/mips/fbsd-rt5350.dtsi
@@ -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@10000000/uartlite@c00";
};
/*
@@ -18,21 +14,8 @@
#clock-cells = <1>;
};
- palmbus@10000000 {
- /*
- * Make palmbus compatible to our simplebus
- */
- compatible = "simple-bus";
-
- /*
- * Reference uartlite@c00 as uartlite, so we can address it
- * within the chosen node above
- */
- uartlite: uartlite@c00 {};
- };
-
+ /* Specify the clocks node for the USB PHY */
usbphy {
clocks = <&clkctrl 18>;
- clock-names = "host";
};
};
OpenPOWER on IntegriCloud