Merge pull request #1091 from hjc4869/master

Add mainline dt files for NanoPi M4/NEO4
This commit is contained in:
Igor Pečovnik 2018-08-30 18:20:47 +02:00 committed by GitHub
commit 66587fc866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 98 additions and 12 deletions

View File

@ -87,18 +87,17 @@ family_tweaks()
# enable root login via the serial console
echo "ttyS2" >> $SDCARD/etc/securetty
[[ $BOARD == nanopct4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev00.dtb" >> $SDCARD/boot/armbianEnv.txt
[[ $BOARD == nanopim4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev01.dtb" >> $SDCARD/boot/armbianEnv.txt
[[ $BOARD == nanopineo4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev04.dtb" >> $SDCARD/boot/armbianEnv.txt
case $BRANCH in
default)
[[ $BOARD == firefly-rk3399 ]] && echo "fdtfile=rockchip/rk3399-firefly-linux.dtb" >> $SDCARD/boot/armbianEnv.txt
[[ $BOARD == nanopct4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev00.dtb" >> $SDCARD/boot/armbianEnv.txt
[[ $BOARD == nanopim4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev01.dtb" >> $SDCARD/boot/armbianEnv.txt
[[ $BOARD == nanopineo4 ]] && echo "fdtfile=rockchip/rk3399-nanopi4-rev04.dtb" >> $SDCARD/boot/armbianEnv.txt
;;
dev)
if [[ $BOARD == firefly-rk3399 ]]; then
echo "fdtfile=rockchip/rk3399-firefly.dtb" >> $SDCARD/boot/armbianEnv.txt
fi
[[ $BOARD == firefly-rk3399 ]] && echo "fdtfile=rockchip/rk3399-firefly.dtb" >> $SDCARD/boot/armbianEnv.txt
;;
esac
}

View File

@ -1,18 +1,20 @@
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 48a83f88..df754e54 100644
index d08b7eda28d2..cb3105ca4a1c 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
@@ -14,6 +14,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-ficus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-bob.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi4-rev00.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi4-rev01.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi4-rev04.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi
new file mode 100644
index 00000000..9a788722
index 000000000000..9a7887220551
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-common.dtsi
@@ -0,0 +1,903 @@
@ -921,7 +923,7 @@ index 00000000..9a788722
+};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev00.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev00.dts
new file mode 100644
index 00000000..f1ad210b
index 000000000000..f1ad210b2b28
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev00.dts
@@ -0,0 +1,30 @@
@ -955,3 +957,88 @@ index 00000000..f1ad210b
+ hwrev = <0>;
+ model = "NanoPC-T4";
+};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev01.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev01.dts
new file mode 100644
index 000000000000..bb6c9974edd9
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev01.dts
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/dts-v1/;
+#include "rk3399-nanopi4-common.dtsi"
+
+/ {
+ model = "FriendlyElec NanoPi M4";
+ compatible = "friendlyelec,nanopi-m4", "rockchip,rk3399";
+};
+
+&mach {
+ hwrev = <1>;
+ model = "NanoPi M4";
+};
+
+&sdhci {
+ mmc-hs200-1_8v;
+ /delete-property/ mmc-hs400-1_8v;
+ /delete-property/ mmc-hs400-enhanced-strobe;
+};
\ No newline at end of file
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev04.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev04.dts
new file mode 100644
index 000000000000..47c22170bad9
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4-rev04.dts
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/dts-v1/;
+#include "rk3399-nanopi4-common.dtsi"
+
+/ {
+ model = "FriendlyElec NanoPi NEO4";
+ compatible = "friendlyelec,nanopi-neo4", "rockchip,rk3399";
+};
+
+&mach {
+ hwrev = <4>;
+ model = "NanoPi NEO4";
+};
+
+&sdhci {
+ mmc-hs200-1_8v;
+ /delete-property/ mmc-hs400-1_8v;
+ /delete-property/ mmc-hs400-enhanced-strobe;
+};