mb/sifive: Add HiFive Unleashed mainboard
Change-Id: I52ef2da9148809923c90178a00ba94babba8d2f8 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/25790 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Patrick Georgi
parent
55b46454bc
commit
1c09cfa37b
16
src/mainboard/sifive/Kconfig
Normal file
16
src/mainboard/sifive/Kconfig
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
if VENDOR_SIFIVE
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Mainboard model"
|
||||||
|
|
||||||
|
source "src/mainboard/sifive/*/Kconfig.name"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
source "src/mainboard/sifive/*/Kconfig"
|
||||||
|
|
||||||
|
config MAINBOARD_VENDOR
|
||||||
|
string
|
||||||
|
default "SiFive"
|
||||||
|
|
||||||
|
endif # VENDOR_SIFIVE
|
2
src/mainboard/sifive/Kconfig.name
Normal file
2
src/mainboard/sifive/Kconfig.name
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config VENDOR_SIFIVE
|
||||||
|
bool "SiFive"
|
33
src/mainboard/sifive/hifive-unleashed/Kconfig
Normal file
33
src/mainboard/sifive/hifive-unleashed/Kconfig
Normal file
@@ -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
|
2
src/mainboard/sifive/hifive-unleashed/Kconfig.name
Normal file
2
src/mainboard/sifive/hifive-unleashed/Kconfig.name
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
config BOARD_SIFIVE_HIFIVE_UNLEASHED
|
||||||
|
bool "HiFive Unleashed"
|
18
src/mainboard/sifive/hifive-unleashed/Makefile.inc
Normal file
18
src/mainboard/sifive/hifive-unleashed/Makefile.inc
Normal file
@@ -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
|
6
src/mainboard/sifive/hifive-unleashed/board_info.txt
Normal file
6
src/mainboard/sifive/hifive-unleashed/board_info.txt
Normal file
@@ -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
|
16
src/mainboard/sifive/hifive-unleashed/devicetree.cb
Normal file
16
src/mainboard/sifive/hifive-unleashed/devicetree.cb
Normal file
@@ -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
|
27
src/mainboard/sifive/hifive-unleashed/mainboard.c
Normal file
27
src/mainboard/sifive/hifive-unleashed/mainboard.c
Normal file
@@ -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,
|
||||||
|
};
|
16
src/mainboard/sifive/hifive-unleashed/memlayout.ld
Normal file
16
src/mainboard/sifive/hifive-unleashed/memlayout.ld
Normal file
@@ -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>
|
26
src/mainboard/sifive/hifive-unleashed/romstage.c
Normal file
26
src/mainboard/sifive/hifive-unleashed/romstage.c
Normal file
@@ -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();
|
||||||
|
}
|
Reference in New Issue
Block a user