From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v2 3/3] ARM: mvebu: Add initial support for Turris Omnia
Date: Thu, 15 Jun 2017 09:59:16 +0200 [thread overview]
Message-ID: <20170615075916.5356-1-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20170614215010.11886-3-u.kleine-koenig@pengutronix.de>
Up to now only 2nd stage booting is tested and boots up to a prompt.
i2c and spi are working, ethernet, usb and sata don't.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Changes since (implicit) v1:
- fix copyright stuff
- drop some debug remains
- fix kwboot.cfg
arch/arm/boards/Makefile | 1 +
arch/arm/boards/turris-omnia/Makefile | 2 ++
arch/arm/boards/turris-omnia/board.c | 1 +
arch/arm/boards/turris-omnia/kwbimage.cfg | 7 ++++++
arch/arm/boards/turris-omnia/lowlevel.c | 33 +++++++++++++++++++++++++++++
arch/arm/dts/Makefile | 1 +
arch/arm/dts/armada-385-turris-omnia-bb.dts | 7 ++++++
arch/arm/mach-mvebu/Kconfig | 10 +++++++++
images/Makefile.mvebu | 8 +++++++
9 files changed, 70 insertions(+)
create mode 100644 arch/arm/boards/turris-omnia/Makefile
create mode 100644 arch/arm/boards/turris-omnia/board.c
create mode 100644 arch/arm/boards/turris-omnia/kwbimage.cfg
create mode 100644 arch/arm/boards/turris-omnia/lowlevel.c
create mode 100644 arch/arm/dts/armada-385-turris-omnia-bb.dts
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 0ecfb3e4b398..896a3f5cbab5 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -124,6 +124,7 @@ obj-$(CONFIG_MACH_TORADEX_COLIBRI_T20) += toradex-colibri-t20/
obj-$(CONFIG_MACH_TOSHIBA_AC100) += toshiba-ac100/
obj-$(CONFIG_MACH_TQMA53) += tqma53/
obj-$(CONFIG_MACH_TQMA6X) += tqma6x/
+obj-$(CONFIG_MACH_TURRIS_OMNIA) += turris-omnia/
obj-$(CONFIG_MACH_TX25) += karo-tx25/
obj-$(CONFIG_MACH_TX28) += karo-tx28/
obj-$(CONFIG_MACH_TX51) += karo-tx51/
diff --git a/arch/arm/boards/turris-omnia/Makefile b/arch/arm/boards/turris-omnia/Makefile
new file mode 100644
index 000000000000..01c7a259e9a5
--- /dev/null
+++ b/arch/arm/boards/turris-omnia/Makefile
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/turris-omnia/board.c b/arch/arm/boards/turris-omnia/board.c
new file mode 100644
index 000000000000..40a8c178f10d
--- /dev/null
+++ b/arch/arm/boards/turris-omnia/board.c
@@ -0,0 +1 @@
+/* empty */
diff --git a/arch/arm/boards/turris-omnia/kwbimage.cfg b/arch/arm/boards/turris-omnia/kwbimage.cfg
new file mode 100644
index 000000000000..789ee5df17de
--- /dev/null
+++ b/arch/arm/boards/turris-omnia/kwbimage.cfg
@@ -0,0 +1,7 @@
+VERSION 1
+BOOT_FROM spi
+DESTADDR 00800000
+EXECADDR 00800000
+NAND_BLKSZ 00000000
+NAND_BADBLK_LOCATION 00
+BINARY binary.0 0000005b 00000068
diff --git a/arch/arm/boards/turris-omnia/lowlevel.c b/arch/arm/boards/turris-omnia/lowlevel.c
new file mode 100644
index 000000000000..3f20908ff7fd
--- /dev/null
+++ b/arch/arm/boards/turris-omnia/lowlevel.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2017 Pengutronix, Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2, as published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <asm/barebox-arm.h>
+#include <asm/barebox-arm-head.h>
+#include <mach/lowlevel.h>
+
+#include <asm/io.h>
+
+extern char __dtb_armada_385_turris_omnia_bb_start[];
+
+ENTRY_FUNCTION(start_turris_omnia, r0, r1, r2)
+{
+ void *fdt;
+
+ arm_cpu_lowlevel_init();
+
+ fdt = __dtb_armada_385_turris_omnia_bb_start -
+ get_runtime_offset();
+
+ armada_370_xp_barebox_entry(fdt);
+}
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 2342d35a4bd1..c81e6e0e492c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -81,6 +81,7 @@ pbl-dtb-$(CONFIG_MACH_TQMA6X) += imx6dl-mba6x.dtb.o imx6q-mba6x.dtb.o
pbl-dtb-$(CONFIG_MACH_TX25) += imx25-karo-tx25.dtb.o
pbl-dtb-$(CONFIG_MACH_TX6X) += imx6dl-tx6u.dtb.o
pbl-dtb-$(CONFIG_MACH_TX6X) += imx6q-tx6q.dtb.o
+pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o
pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o
pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o
diff --git a/arch/arm/dts/armada-385-turris-omnia-bb.dts b/arch/arm/dts/armada-385-turris-omnia-bb.dts
new file mode 100644
index 000000000000..53bef01af758
--- /dev/null
+++ b/arch/arm/dts/armada-385-turris-omnia-bb.dts
@@ -0,0 +1,7 @@
+#include "arm/armada-385-turris-omnia.dts"
+
+/ {
+ chosen {
+ stdout-path = "/soc/internal-regs/serial@12000";
+ };
+};
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 827967eea380..ad97e83701e7 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -69,6 +69,16 @@ config MACH_PLATHOME_OPENBLOCKS_AX3
select ARCH_ARMADA_XP
#
+# Armada 38x SoC boards
+#
+
+comment "Armada 38x based boards"
+
+config MACH_TURRIS_OMNIA
+ bool "Turris Omnia"
+ select ARCH_ARMADA_38X
+
+#
# Dove 88AP510 SoC boards
#
diff --git a/images/Makefile.mvebu b/images/Makefile.mvebu
index b57291cbafe2..17fa0616b2fe 100644
--- a/images/Makefile.mvebu
+++ b/images/Makefile.mvebu
@@ -51,6 +51,14 @@ pblx-$(CONFIG_MACH_NETGEAR_RN2120) += start_netgear_rn2120
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120.img
image-$(CONFIG_MACH_NETGEAR_RN2120) += barebox-netgear-rn2120-2nd.img
+# ----------------------- Armada 38x based boards ---------------------------
+TURRIS_OMNIA_KWBOPTS = ${KWBOPTS} -i $(board)/turris-omnia/kwbimage.cfg
+OPTS_start_turris_omnia.pblx.kwbimg = $(TURRIS_OMNIA_KWBOPTS)
+FILE_barebox-turris-omnia.img = start_turris_omnia.pblx.kwbimg
+FILE_barebox-turris-omnia-2nd.img = start_turris_omnia.pblx
+pblx-$(CONFIG_MACH_TURRIS_OMNIA) += start_turris_omnia
+image-$(CONFIG_MACH_TURRIS_OMNIA) += barebox-turris-omnia.img
+
PLATHOME_OPENBLOCKS_AX3_KWBOPTS = ${KWBOPTS} -i $(board)/plathome-openblocks-ax3/kwbimage.cfg
OPTS_start_plathome_openblocks_ax3.pblx.kwbimg = $(PLATHOME_OPENBLOCKS_AX3_KWBOPTS)
FILE_barebox-plathome-openblocks-ax3.img = start_plathome_openblocks_ax3.pblx.kwbimg
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-06-15 7:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 21:50 [PATCH 1/3] ARM: mvebu: initial support for Armada 38x Uwe Kleine-König
2017-06-14 21:50 ` [PATCH 2/3] clk: mvebu: Add support for Armada 38x's coreclk Uwe Kleine-König
2017-06-14 21:50 ` [PATCH 3/3] ARM: mvebu: Add initial support for Turris Omnia Uwe Kleine-König
2017-06-15 7:59 ` Uwe Kleine-König [this message]
2017-06-19 6:24 ` [PATCH 1/3] ARM: mvebu: initial support for Armada 38x Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170615075916.5356-1-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox