From a859057db8d2eaf59a7575e303d7af35979d12d7 Mon Sep 17 00:00:00 2001 From: Jon Murphy Date: Thu, 23 Feb 2023 13:42:52 -0700 Subject: [PATCH] mb/google/myst: Add new mainboard Myst is a new Google mainboard with an AMD Phoenix SOC. BUG=b:270596106 TEST=util/abuild/abuild -t GOOGLE_MYST --clean Signed-off-by: Jon Murphy Change-Id: Id7d731ce4d6cb6d4e9041f46eb5a799865bb0b9a Reviewed-on: https://review.coreboot.org/c/coreboot/+/74093 Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) Reviewed-by: Fred Reitberger --- src/mainboard/google/myst/Kconfig | 29 ++++++++++++++ src/mainboard/google/myst/Kconfig.name | 5 +++ src/mainboard/google/myst/Makefile.inc | 12 ++++++ src/mainboard/google/myst/board_info.txt | 6 +++ src/mainboard/google/myst/bootblock.c | 9 +++++ src/mainboard/google/myst/chromeos.fmd | 39 +++++++++++++++++++ src/mainboard/google/myst/dsdt.asl | 16 ++++++++ src/mainboard/google/myst/mainboard.c | 30 ++++++++++++++ src/mainboard/google/myst/port_descriptors.c | 11 ++++++ .../myst/variants/baseboard/devicetree.cb | 4 ++ .../baseboard/include/baseboard/variants.h | 6 +++ 11 files changed, 167 insertions(+) create mode 100644 src/mainboard/google/myst/Kconfig create mode 100644 src/mainboard/google/myst/Kconfig.name create mode 100644 src/mainboard/google/myst/Makefile.inc create mode 100644 src/mainboard/google/myst/board_info.txt create mode 100644 src/mainboard/google/myst/bootblock.c create mode 100644 src/mainboard/google/myst/chromeos.fmd create mode 100644 src/mainboard/google/myst/dsdt.asl create mode 100644 src/mainboard/google/myst/mainboard.c create mode 100644 src/mainboard/google/myst/port_descriptors.c create mode 100644 src/mainboard/google/myst/variants/baseboard/devicetree.cb create mode 100644 src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h diff --git a/src/mainboard/google/myst/Kconfig b/src/mainboard/google/myst/Kconfig new file mode 100644 index 0000000000..d8be3b8c71 --- /dev/null +++ b/src/mainboard/google/myst/Kconfig @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +config BOARD_GOOGLE_BASEBOARD_MYST + def_bool n + +if BOARD_GOOGLE_BASEBOARD_MYST + +config BOARD_SPECIFIC_OPTIONS + def_bool y + select BOARD_ROMSIZE_KB_16384 + select SOC_AMD_PHOENIX + +config DEVICETREE + default "variants/baseboard/devicetree.cb" + +config FMDFILE + default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/chromeos.fmd" + +config MAINBOARD_DIR + default "google/myst" + +config MAINBOARD_FAMILY + string + default "Google_Myst" + +config MAINBOARD_PART_NUMBER + default "Myst" if BOARD_GOOGLE_MYST + +endif # BOARD_GOOGLE_BASEBOARD_MYST diff --git a/src/mainboard/google/myst/Kconfig.name b/src/mainboard/google/myst/Kconfig.name new file mode 100644 index 0000000000..ab0e71c6f5 --- /dev/null +++ b/src/mainboard/google/myst/Kconfig.name @@ -0,0 +1,5 @@ +comment "Myst" + +config BOARD_GOOGLE_MYST + bool "-> Myst" + select BOARD_GOOGLE_BASEBOARD_MYST diff --git a/src/mainboard/google/myst/Makefile.inc b/src/mainboard/google/myst/Makefile.inc new file mode 100644 index 0000000000..0315ba9a18 --- /dev/null +++ b/src/mainboard/google/myst/Makefile.inc @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +bootblock-y += bootblock.c + +romstage-y += port_descriptors.c + +ramstage-y += mainboard.c +ramstage-y += port_descriptors.c + +subdirs-y += variants/baseboard + +CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include diff --git a/src/mainboard/google/myst/board_info.txt b/src/mainboard/google/myst/board_info.txt new file mode 100644 index 0000000000..2969e6ece8 --- /dev/null +++ b/src/mainboard/google/myst/board_info.txt @@ -0,0 +1,6 @@ +Vendor name: Google +Board name: Myst +Category: laptop +ROM protocol: SPI +ROM socketed: n +Flashrom support: y diff --git a/src/mainboard/google/myst/bootblock.c b/src/mainboard/google/myst/bootblock.c new file mode 100644 index 0000000000..90789c65d5 --- /dev/null +++ b/src/mainboard/google/myst/bootblock.c @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +void bootblock_mainboard_early_init(void) +{ + /* TODO(b/275959717): Perform mainboard initialization */ +} diff --git a/src/mainboard/google/myst/chromeos.fmd b/src/mainboard/google/myst/chromeos.fmd new file mode 100644 index 0000000000..56a163d24b --- /dev/null +++ b/src/mainboard/google/myst/chromeos.fmd @@ -0,0 +1,39 @@ +# TODO(b/276944900): Update for 32 MB support, evaluate WP_RO size +FLASH@0xFF000000 16M { + SI_BIOS { + WP_RO 8M { + RO_GSCVD 8K + RO_VPD(PRESERVE) 16K + RO_SECTION { + FMAP 2K + RO_FRID 64 + COREBOOT(CBFS) + GBB 12K + } + } + RW_SECTION_A 3M { + VBLOCK_A 8K + FW_MAIN_A(CBFS) + SIGNED_AMDFW_A 1536K + RW_FWID_A 256 + } + RW_SECTION_B 3M { + VBLOCK_B 8K + FW_MAIN_B(CBFS) + SIGNED_AMDFW_B 1536K + RW_FWID_B 256 + } + RW_ELOG(PRESERVE) 4K + RW_SHARED 16K { + SHARED_DATA 8K + VBLOCK_DEV 8K + } + RW_VPD(PRESERVE) 8K + RW_NVRAM(PRESERVE) 20K + SMMSTORE(PRESERVE) 64K + RW_LEGACY(CBFS) + RW_VBIOS_CACHE 64K + RW_MRC_CACHE(PRESERVE) 256K + RECOVERY_MRC_CACHE(PRESERVE) 256K + } +} diff --git a/src/mainboard/google/myst/dsdt.asl b/src/mainboard/google/myst/dsdt.asl new file mode 100644 index 0000000000..80a9c1f17e --- /dev/null +++ b/src/mainboard/google/myst/dsdt.asl @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include + +DefinitionBlock ( + "dsdt.aml", + "DSDT", + ACPI_DSDT_REV_2, + OEM_ID, + ACPI_TABLE_CREATOR, + 0x00010001 /* OEM Revision */ + ) +{ + #include + #include +} diff --git a/src/mainboard/google/myst/mainboard.c b/src/mainboard/google/myst/mainboard.c new file mode 100644 index 0000000000..09118d4186 --- /dev/null +++ b/src/mainboard/google/myst/mainboard.c @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include + +static const struct fch_irq_routing fch_irq_map[] = { + { 0, 0x00, 0x00 }, +}; + +const struct fch_irq_routing *mb_get_fch_irq_mapping(size_t *length) +{ + *length = ARRAY_SIZE(fch_irq_map); + return fch_irq_map; +} + +static void mainboard_init(void *chip_info) +{ + /* TODO(b/270596581): Perform mainboard initialization */ +} + +static void mainboard_enable(struct device *dev) +{ + /* TODO(b/270618107): Enable mainboard */ +} + +struct chip_operations mainboard_ops = { + .init = mainboard_init, + .enable_dev = mainboard_enable, +}; diff --git a/src/mainboard/google/myst/port_descriptors.c b/src/mainboard/google/myst/port_descriptors.c new file mode 100644 index 0000000000..9d3b15ba31 --- /dev/null +++ b/src/mainboard/google/myst/port_descriptors.c @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include + +void mainboard_get_dxio_ddi_descriptors( + const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, + const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) +{ + /* TODO(b/276744321): Initialize DXIO and DDI descriptors */ +} diff --git a/src/mainboard/google/myst/variants/baseboard/devicetree.cb b/src/mainboard/google/myst/variants/baseboard/devicetree.cb new file mode 100644 index 0000000000..164a47ad7f --- /dev/null +++ b/src/mainboard/google/myst/variants/baseboard/devicetree.cb @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +chip soc/amd/phoenix + device domain 0 on end # domain +end # chip soc/amd/phoenix diff --git a/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h new file mode 100644 index 0000000000..927af2f913 --- /dev/null +++ b/src/mainboard/google/myst/variants/baseboard/include/baseboard/variants.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __BASEBOARD_VARIANTS_H__ +#define __BASEBOARD_VARIANTS_H__ + +#endif /* __BASEBOARD_VARIANTS_H__ */