diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2022-12-20 00:24:46 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-06-16 17:55:25 +0000 |
commit | 40f0dafd141d7f97c7295c892f10a10967c775aa (patch) | |
tree | b3a209b38356134a614bca72b1ff51350286b5b5 /src | |
parent | aef7007b0c519b48cebbb88cfc1af109031d10f4 (diff) |
google/zork: Convert baseboard directory layout
There are two baseboards within the set of mainboards built
here, with baseboard name appended in the filenames.
Take the style and variable BASEBOARD_DIR from google/brya,
then move and rename the supporting files under separate
directories.
Change-Id: I2046b6f82519540b8596ce925203bd60d1870c1c
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74471
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/zork/Kconfig | 8 | ||||
-rw-r--r-- | src/mainboard/google/zork/Makefile.inc | 3 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/Makefile.inc | 44 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc | 19 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb (renamed from src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb) | 0 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c (renamed from src/mainboard/google/zork/variants/baseboard/fsps_baseboard_dalboz.c) | 0 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c (renamed from src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c) | 0 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc | 20 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb (renamed from src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb) | 0 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c (renamed from src/mainboard/google/zork/variants/baseboard/fsps_baseboard_trembyle.c) | 0 | ||||
-rw-r--r-- | src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c (renamed from src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c) | 0 |
11 files changed, 49 insertions, 45 deletions
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig index 68c5ba1a60..3481810d68 100644 --- a/src/mainboard/google/zork/Kconfig +++ b/src/mainboard/google/zork/Kconfig @@ -88,9 +88,13 @@ config MAINBOARD_PART_NUMBER default "Shuboz" if BOARD_GOOGLE_SHUBOZ default "Gumboz" if BOARD_GOOGLE_GUMBOZ +config BASEBOARD_DIR + string + default "trembyle" if BOARD_GOOGLE_BASEBOARD_TREMBYLE + default "dalboz" if BOARD_GOOGLE_BASEBOARD_DALBOZ + config DEVICETREE - default "variants/baseboard/devicetree_trembyle.cb" if BOARD_GOOGLE_BASEBOARD_TREMBYLE - default "variants/baseboard/devicetree_dalboz.cb" if BOARD_GOOGLE_BASEBOARD_DALBOZ + default "variants/baseboard/\$(CONFIG_BASEBOARD_DIR)/devicetree.cb" config OVERRIDE_DEVICETREE default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb" diff --git a/src/mainboard/google/zork/Makefile.inc b/src/mainboard/google/zork/Makefile.inc index a260b0fd21..df809cb488 100644 --- a/src/mainboard/google/zork/Makefile.inc +++ b/src/mainboard/google/zork/Makefile.inc @@ -13,6 +13,9 @@ ramstage-y += sku_id.c verstage-y += chromeos.c verstage-y += verstage.c +BASEBOARD_DIR:=$(call strip_quotes,$(CONFIG_BASEBOARD_DIR)) + +subdirs-y += variants/baseboard/$(BASEBOARD_DIR) subdirs-y += variants/baseboard subdirs-y += variants/$(VARIANT_DIR)/spd subdirs-y += spd diff --git a/src/mainboard/google/zork/variants/baseboard/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/Makefile.inc index 437ba0b52c..2a35748b03 100644 --- a/src/mainboard/google/zork/variants/baseboard/Makefile.inc +++ b/src/mainboard/google/zork/variants/baseboard/Makefile.inc @@ -1,57 +1,15 @@ # SPDX-License-Identifier: GPL-2.0-or-later -bootblock-y += helpers.c -bootblock-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -bootblock-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c +all-y += helpers.c -verstage-y += helpers.c -verstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -verstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c verstage-y += tpm_tis.c - -romstage-y += helpers.c -romstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -romstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c romstage-y += tpm_tis.c - -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += fsps_baseboard_trembyle.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c -ramstage-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += fsps_baseboard_dalboz.c -ramstage-y += helpers.c ramstage-y += tpm_tis.c ramstage-y += ramstage_common.c -smm-$(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE) += gpio_baseboard_trembyle.c -smm-$(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ) += gpio_baseboard_dalboz.c - # Add OEM ID table ifeq ($(CONFIG_USE_OEM_BIN),y) cbfs-files-y += oem.bin oem.bin-file := $(call strip_quotes,$(CONFIG_OEM_BIN_FILE)) oem.bin-type := raw endif #($(CONFIG_USE_OEM_BIN),y) - -# APCB Board ID GPIO configuration. -# These GPIOs determine which memory SPD will be used during boot. -# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL -# GPIO_NUMBER: FCH GPIO number -# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO -# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO -# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. -# Trembyle based boards select 1 or 2 channels based on AGPIO84 -# Dalboz based boards only support 1 channel -ifeq ($(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE),y) -APCB_BOARD_ID_GPIO0 = 121 1 0 -APCB_BOARD_ID_GPIO1 = 120 1 0 -APCB_BOARD_ID_GPIO2 = 131 3 0 -APCB_BOARD_ID_GPIO3 = 116 1 0 -APCB_POPULATE_2ND_CHANNEL = true -else ifeq ($(CONFIG_BOARD_GOOGLE_BASEBOARD_DALBOZ),y) -APCB_BOARD_ID_GPIO0 = 132 1 0 -APCB_BOARD_ID_GPIO1 = 90 1 0 -APCB_BOARD_ID_GPIO2 = 86 3 0 -APCB_BOARD_ID_GPIO3 = 69 1 0 -else -$(error Undefined APCB selection GPIOS for Zork baseboard) -endif #($(CONFIG_BOARD_GOOGLE_BASEBOARD_TREMBYLE),y) diff --git a/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc new file mode 100644 index 0000000000..66dc17512b --- /dev/null +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/Makefile.inc @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +all-y += gpio.c +smm-y += gpio.c +ramstage-y += fsps.c + +# APCB Board ID GPIO configuration. +# These GPIOs determine which memory SPD will be used during boot. +# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL +# GPIO_NUMBER: FCH GPIO number +# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO +# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO +# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. +# Trembyle based boards select 1 or 2 channels based on AGPIO84 +# Dalboz based boards only support 1 channel +APCB_BOARD_ID_GPIO0 = 132 1 0 +APCB_BOARD_ID_GPIO1 = 90 1 0 +APCB_BOARD_ID_GPIO2 = 86 3 0 +APCB_BOARD_ID_GPIO3 = 69 1 0 diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb b/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb index 68eb6ea588..68eb6ea588 100644 --- a/src/mainboard/google/zork/variants/baseboard/devicetree_dalboz.cb +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/devicetree.cb diff --git a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c index 992d89661f..992d89661f 100644 --- a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_dalboz.c +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/fsps.c diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c b/src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c index 5c5933920b..5c5933920b 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_dalboz.c +++ b/src/mainboard/google/zork/variants/baseboard/dalboz/gpio.c diff --git a/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc b/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc new file mode 100644 index 0000000000..e0c4c90669 --- /dev/null +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/Makefile.inc @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +all-y += gpio.c +smm-y += gpio.c +ramstage-y += fsps.c + +# APCB Board ID GPIO configuration. +# These GPIOs determine which memory SPD will be used during boot. +# APCB_BOARD_ID_GPIO[0-3] = GPIO_NUMBER GPIO_IO_MUX GPIO_BANK_CTL +# GPIO_NUMBER: FCH GPIO number +# GPIO_IO_MUX: Value write to IOMUX to configure this GPIO +# GPIO_BANK_CTL: Value write to GPIOBankCtl[23:16] to configure this GPIO +# APCB_POPULATE_2ND_CHANNEL: Populates 2nd memory channel in APCB when true. +# Trembyle based boards select 1 or 2 channels based on AGPIO84 +# Dalboz based boards only support 1 channel +APCB_BOARD_ID_GPIO0 = 121 1 0 +APCB_BOARD_ID_GPIO1 = 120 1 0 +APCB_BOARD_ID_GPIO2 = 131 3 0 +APCB_BOARD_ID_GPIO3 = 116 1 0 +APCB_POPULATE_2ND_CHANNEL = true diff --git a/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb b/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb index 4bb42dea1c..4bb42dea1c 100644 --- a/src/mainboard/google/zork/variants/baseboard/devicetree_trembyle.cb +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/devicetree.cb diff --git a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c index ae36731c7b..ae36731c7b 100644 --- a/src/mainboard/google/zork/variants/baseboard/fsps_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/fsps.c diff --git a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c b/src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c index c789660b8c..c789660b8c 100644 --- a/src/mainboard/google/zork/variants/baseboard/gpio_baseboard_trembyle.c +++ b/src/mainboard/google/zork/variants/baseboard/trembyle/gpio.c |