summaryrefslogtreecommitdiff
path: root/src/mainboard/sifive/hifive-unleashed
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/sifive/hifive-unleashed')
-rw-r--r--src/mainboard/sifive/hifive-unleashed/Kconfig33
-rw-r--r--src/mainboard/sifive/hifive-unleashed/Kconfig.name2
-rw-r--r--src/mainboard/sifive/hifive-unleashed/Makefile.inc18
-rw-r--r--src/mainboard/sifive/hifive-unleashed/board_info.txt6
-rw-r--r--src/mainboard/sifive/hifive-unleashed/devicetree.cb16
-rw-r--r--src/mainboard/sifive/hifive-unleashed/mainboard.c27
-rw-r--r--src/mainboard/sifive/hifive-unleashed/memlayout.ld16
-rw-r--r--src/mainboard/sifive/hifive-unleashed/romstage.c26
8 files changed, 144 insertions, 0 deletions
diff --git a/src/mainboard/sifive/hifive-unleashed/Kconfig b/src/mainboard/sifive/hifive-unleashed/Kconfig
new file mode 100644
index 0000000000..5e49f19758
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/Kconfig
@@ -0,0 +1,33 @@
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2018 Jonathan Neuschäfer
+#
+# 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; version 2 of the License.
+#
+# 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.
+
+if BOARD_SIFIVE_HIFIVE_UNLEASHED
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+ select SOC_SIFIVE_FU540
+ select BOARD_ROMSIZE_KB_32768
+
+config MAINBOARD_DIR
+ string
+ default sifive/hifive-unleashed
+
+config MAX_CPUS
+ int
+ default 4
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "HiFive Unleashed"
+
+endif
diff --git a/src/mainboard/sifive/hifive-unleashed/Kconfig.name b/src/mainboard/sifive/hifive-unleashed/Kconfig.name
new file mode 100644
index 0000000000..1ee3793974
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_SIFIVE_HIFIVE_UNLEASHED
+ bool "HiFive Unleashed"
diff --git a/src/mainboard/sifive/hifive-unleashed/Makefile.inc b/src/mainboard/sifive/hifive-unleashed/Makefile.inc
new file mode 100644
index 0000000000..27ddcbad87
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/Makefile.inc
@@ -0,0 +1,18 @@
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2018 Jonathan Neuschäfer
+#
+# 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; version 2 of the License.
+#
+# 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.
+
+romstage-y += romstage.c
+
+bootblock-y += memlayout.ld
+romstage-y += memlayout.ld
+ramstage-y += memlayout.ld
diff --git a/src/mainboard/sifive/hifive-unleashed/board_info.txt b/src/mainboard/sifive/hifive-unleashed/board_info.txt
new file mode 100644
index 0000000000..2ad7d59354
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/board_info.txt
@@ -0,0 +1,6 @@
+Category: eval
+ROM package: SOIC-16
+ROM protocol: SPI
+ROM socketed: n
+Flashrom support: n
+Board URL: https://www.crowdsupply.com/sifive/hifive-unleashed
diff --git a/src/mainboard/sifive/hifive-unleashed/devicetree.cb b/src/mainboard/sifive/hifive-unleashed/devicetree.cb
new file mode 100644
index 0000000000..1c9f79ad92
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/devicetree.cb
@@ -0,0 +1,16 @@
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2018 Jonathan Neuschäfer
+#
+# 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; version 2 of the License.
+#
+# 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.
+
+chip soc/sifive/fu540
+ device cpu_cluster 0 on end
+end
diff --git a/src/mainboard/sifive/hifive-unleashed/mainboard.c b/src/mainboard/sifive/hifive-unleashed/mainboard.c
new file mode 100644
index 0000000000..ab4d6aec88
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/mainboard.c
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Jonathan Neuschäfer
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <device/device.h>
+#include <bootblock_common.h>
+#include <timestamp.h>
+
+static void mainboard_enable(device_t dev)
+{
+}
+
+struct chip_operations mainboard_ops = {
+ .name = CONFIG_MAINBOARD_PART_NUMBER,
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/sifive/hifive-unleashed/memlayout.ld b/src/mainboard/sifive/hifive-unleashed/memlayout.ld
new file mode 100644
index 0000000000..d1a6d65a00
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/memlayout.ld
@@ -0,0 +1,16 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Jonathan Neuschäfer
+ *
+ * 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; version 2 of the License.
+ *
+ * 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 <soc/memlayout.ld>
diff --git a/src/mainboard/sifive/hifive-unleashed/romstage.c b/src/mainboard/sifive/hifive-unleashed/romstage.c
new file mode 100644
index 0000000000..b30b73665b
--- /dev/null
+++ b/src/mainboard/sifive/hifive-unleashed/romstage.c
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <console/console.h>
+#include <program_loading.h>
+
+void main(void)
+{
+ console_init();
+
+ /* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */
+
+ run_ramstage();
+}