From b566ce4aea2473274e1e59ac9d25b316080323f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Tue, 15 Sep 2020 17:01:57 +0200 Subject: [PATCH] mb/raptor-cs/talos-2: add basic mainboard structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I0c4f74c7b27c8bb5599d68305adf369ddc6fcc70 Signed-off-by: Michał Żygowski Signed-off-by: Krystian Hebel Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/coreboot/+/67063 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- src/mainboard/raptor-cs/Kconfig | 17 +++++++++ src/mainboard/raptor-cs/Kconfig.name | 4 ++ src/mainboard/raptor-cs/talos-2/Kconfig | 37 +++++++++++++++++++ src/mainboard/raptor-cs/talos-2/Kconfig.name | 4 ++ .../raptor-cs/talos-2/board_info.txt | 2 + src/mainboard/raptor-cs/talos-2/devicetree.cb | 5 +++ src/mainboard/raptor-cs/talos-2/mainboard.c | 14 +++++++ src/mainboard/raptor-cs/talos-2/memlayout.ld | 18 +++++++++ 8 files changed, 101 insertions(+) create mode 100644 src/mainboard/raptor-cs/Kconfig create mode 100644 src/mainboard/raptor-cs/Kconfig.name create mode 100644 src/mainboard/raptor-cs/talos-2/Kconfig create mode 100644 src/mainboard/raptor-cs/talos-2/Kconfig.name create mode 100644 src/mainboard/raptor-cs/talos-2/board_info.txt create mode 100644 src/mainboard/raptor-cs/talos-2/devicetree.cb create mode 100644 src/mainboard/raptor-cs/talos-2/mainboard.c create mode 100644 src/mainboard/raptor-cs/talos-2/memlayout.ld diff --git a/src/mainboard/raptor-cs/Kconfig b/src/mainboard/raptor-cs/Kconfig new file mode 100644 index 0000000000..3e9f7ade62 --- /dev/null +++ b/src/mainboard/raptor-cs/Kconfig @@ -0,0 +1,17 @@ +## SPDX-License-Identifier: GPL-2.0-only + +if VENDOR_RAPTOR_CS + +choice + prompt "Mainboard model" + +source "src/mainboard/raptor-cs/*/Kconfig.name" + +endchoice + +source "src/mainboard/raptor-cs/*/Kconfig" + +config MAINBOARD_VENDOR + default "Raptor Computing Systems" + +endif # VENDOR_RAPTOR_CS diff --git a/src/mainboard/raptor-cs/Kconfig.name b/src/mainboard/raptor-cs/Kconfig.name new file mode 100644 index 0000000000..d1731095dd --- /dev/null +++ b/src/mainboard/raptor-cs/Kconfig.name @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: GPL-2.0-only + +config VENDOR_RAPTOR_CS + bool "Raptor Computing Systems" diff --git a/src/mainboard/raptor-cs/talos-2/Kconfig b/src/mainboard/raptor-cs/talos-2/Kconfig new file mode 100644 index 0000000000..46513945e0 --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/Kconfig @@ -0,0 +1,37 @@ +## SPDX-License-Identifier: GPL-2.0-only + +if BOARD_RAPTOR_CS_TALOS_2 + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select CPU_POWER9 + select SOC_IBM_POWER9 + select BOARD_ROMSIZE_KB_512 + select SUPERIO_ASPEED_AST2400 + select BOOT_DEVICE_NOT_SPI_FLASH + select MISSING_BOARD_RESET + select HAVE_DEBUG_RAM_SETUP + +config MEMLAYOUT_LD_FILE + default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/memlayout.ld" + +config MAINBOARD_DIR + default "raptor-cs/talos-2" + +config MAINBOARD_PART_NUMBER + default "Talos II" + +config DIMM_MAX + default 8 + +config DIMM_SPD_SIZE + default 512 + +config MAX_CPUS + default 1 + +config DRAM_SIZE_MB + int + default 32768 + +endif # BOARD_RAPTOR_CS_TALOS_2 diff --git a/src/mainboard/raptor-cs/talos-2/Kconfig.name b/src/mainboard/raptor-cs/talos-2/Kconfig.name new file mode 100644 index 0000000000..8e4549af11 --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/Kconfig.name @@ -0,0 +1,4 @@ +## SPDX-License-Identifier: GPL-2.0-only + +config BOARD_RAPTOR_CS_TALOS_2 + bool "Talos II" diff --git a/src/mainboard/raptor-cs/talos-2/board_info.txt b/src/mainboard/raptor-cs/talos-2/board_info.txt new file mode 100644 index 0000000000..aa2269185b --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/board_info.txt @@ -0,0 +1,2 @@ +Board name: Raptor CS Talos II +Category: desktop diff --git a/src/mainboard/raptor-cs/talos-2/devicetree.cb b/src/mainboard/raptor-cs/talos-2/devicetree.cb new file mode 100644 index 0000000000..85440064fa --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/devicetree.cb @@ -0,0 +1,5 @@ +## SPDX-License-Identifier: GPL-2.0-only + +chip soc/ibm/power9 + device cpu_cluster 0 on end +end diff --git a/src/mainboard/raptor-cs/talos-2/mainboard.c b/src/mainboard/raptor-cs/talos-2/mainboard.c new file mode 100644 index 0000000000..ef2dbd51bc --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/mainboard.c @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +static void mainboard_enable(struct device *dev) +{ + if (!dev) + die("No dev0; die\n"); +} + +struct chip_operations mainboard_ops = { + .enable_dev = mainboard_enable, +}; diff --git a/src/mainboard/raptor-cs/talos-2/memlayout.ld b/src/mainboard/raptor-cs/talos-2/memlayout.ld new file mode 100644 index 0000000000..c5136b9d14 --- /dev/null +++ b/src/mainboard/raptor-cs/talos-2/memlayout.ld @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +#include + +// TODO: fill in these blanks for Power9. +SECTIONS +{ + DRAM_START(0x0) + BOOTBLOCK(0, 64K) + ROMSTAGE(0x120000, 128K) + STACK(0x140000, 0x3ff00) + PRERAM_CBMEM_CONSOLE(0x180000, 8K) + FMAP_CACHE(0x182000, 2K) + CBFS_MCACHE(0x182800, 8K) + RAMSTAGE(0x200000, 16M) +}