mb/google/hatch: Creating skeleton directories and files
Creating skeleton files and directories in mainboard for the new Hatch board. This is to facilitate development for different parties involved. BUG=None BRANCH=None TEST=./util/abuild/abuild -p none -t google/hatch -x -a Change-Id: I5fc60c178f83034abe5d846d0f4169072b66f448 Signed-off-by: Shelley Chen <shchen@google.com> Reviewed-on: https://review.coreboot.org/c/30169 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
This commit is contained in:
82
src/mainboard/google/hatch/Kconfig
Normal file
82
src/mainboard/google/hatch/Kconfig
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
|
||||||
|
config BOARD_GOOGLE_BASEBOARD_HATCH
|
||||||
|
def_bool n
|
||||||
|
select BOARD_ROMSIZE_KB_32768
|
||||||
|
select DRIVERS_I2C_GENERIC
|
||||||
|
select DRIVERS_I2C_HID
|
||||||
|
select DRIVERS_SPI_ACPI
|
||||||
|
select EC_GOOGLE_CHROMEEC
|
||||||
|
select GENERIC_SPD_BIN
|
||||||
|
select HAVE_ACPI_RESUME
|
||||||
|
select HAVE_ACPI_TABLES
|
||||||
|
select MAINBOARD_HAS_CHROMEOS
|
||||||
|
select MAINBOARD_HAS_I2C_TPM_CR50
|
||||||
|
select MAINBOARD_HAS_TPM2
|
||||||
|
select SOC_INTEL_CANNONLAKE_MEMCFG_INIT
|
||||||
|
select SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
||||||
|
select SOC_INTEL_COFFEELAKE
|
||||||
|
select SPD_READ_BY_WORD
|
||||||
|
select SYSTEM_TYPE_LAPTOP
|
||||||
|
select TPM2
|
||||||
|
|
||||||
|
if BOARD_GOOGLE_BASEBOARD_HATCH
|
||||||
|
|
||||||
|
config CHROMEOS
|
||||||
|
bool
|
||||||
|
default y
|
||||||
|
select GBB_FLAG_FORCE_DEV_SWITCH_ON
|
||||||
|
select GBB_FLAG_FORCE_DEV_BOOT_USB
|
||||||
|
select GBB_FLAG_FORCE_DEV_BOOT_LEGACY
|
||||||
|
select GBB_FLAG_FORCE_MANUAL_RECOVERY
|
||||||
|
|
||||||
|
config DIMM_MAX
|
||||||
|
int
|
||||||
|
default 2
|
||||||
|
|
||||||
|
config DIMM_SPD_SIZE
|
||||||
|
int
|
||||||
|
default 512
|
||||||
|
|
||||||
|
config GBB_HWID
|
||||||
|
string
|
||||||
|
depends on CHROMEOS
|
||||||
|
default "HATCH TEST 1823" if BOARD_GOOGLE_HATCH
|
||||||
|
|
||||||
|
config MAINBOARD_DIR
|
||||||
|
string
|
||||||
|
default "google/hatch"
|
||||||
|
|
||||||
|
config MAINBOARD_FAMILY
|
||||||
|
string
|
||||||
|
default "Google_Hatch" if BOARD_GOOGLE_HATCH
|
||||||
|
|
||||||
|
config MAINBOARD_PART_NUMBER
|
||||||
|
string
|
||||||
|
default "Hatch" if BOARD_GOOGLE_HATCH
|
||||||
|
|
||||||
|
config MAINBOARD_VENDOR
|
||||||
|
string
|
||||||
|
default "Google"
|
||||||
|
|
||||||
|
config MAX_CPUS
|
||||||
|
int
|
||||||
|
default 8
|
||||||
|
|
||||||
|
config VARIANT_DIR
|
||||||
|
string
|
||||||
|
default "hatch" if BOARD_GOOGLE_HATCH
|
||||||
|
|
||||||
|
config DEVICETREE
|
||||||
|
string
|
||||||
|
default "variants/baseboard/devicetree.cb"
|
||||||
|
|
||||||
|
config OVERRIDE_DEVICETREE
|
||||||
|
string
|
||||||
|
default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb" if !BOARD_GOOGLE_HATCH
|
||||||
|
|
||||||
|
config VBOOT
|
||||||
|
select HAS_RECOVERY_MRC_CACHE
|
||||||
|
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
|
||||||
|
select VBOOT_LID_SWITCH
|
||||||
|
|
||||||
|
endif # BOARD_GOOGLE_BASEBOARD_HATCH
|
5
src/mainboard/google/hatch/Kconfig.name
Normal file
5
src/mainboard/google/hatch/Kconfig.name
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
comment "Hatch"
|
||||||
|
|
||||||
|
config BOARD_GOOGLE_HATCH
|
||||||
|
bool "-> Hatch"
|
||||||
|
select BOARD_GOOGLE_BASEBOARD_HATCH
|
33
src/mainboard/google/hatch/Makefile.inc
Normal file
33
src/mainboard/google/hatch/Makefile.inc
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
##
|
||||||
|
## This file is part of the coreboot project.
|
||||||
|
##
|
||||||
|
## Copyright 2018 Google LLC
|
||||||
|
##
|
||||||
|
## 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.
|
||||||
|
##
|
||||||
|
|
||||||
|
bootblock-y += bootblock.c
|
||||||
|
bootblock-$(CONFIG_CHROMEOS) += chromeos.c
|
||||||
|
|
||||||
|
ramstage-y += ramstage.c
|
||||||
|
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
|
||||||
|
|
||||||
|
romstage-y += romstage.c
|
||||||
|
romstage-$(CONFIG_CHROMEOS) += chromeos.c
|
||||||
|
|
||||||
|
verstage-$(CONFIG_CHROMEOS) += chromeos.c
|
||||||
|
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
|
||||||
|
|
||||||
|
subdirs-y += variants/baseboard
|
||||||
|
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
|
||||||
|
|
||||||
|
VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR))
|
||||||
|
subdirs-y += variants/$(VARIANT_DIR)
|
||||||
|
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
|
0
src/mainboard/google/hatch/acpi_tables.c
Normal file
0
src/mainboard/google/hatch/acpi_tables.c
Normal file
6
src/mainboard/google/hatch/board_info.txt
Normal file
6
src/mainboard/google/hatch/board_info.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Vendor name: Google
|
||||||
|
Board name: Hatch
|
||||||
|
Category: laptop
|
||||||
|
ROM protocol: SPI
|
||||||
|
ROM socketed: n
|
||||||
|
Flashrom support: y
|
32
src/mainboard/google/hatch/bootblock.c
Normal file
32
src/mainboard/google/hatch/bootblock.c
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <baseboard/variants.h>
|
||||||
|
#include <bootblock_common.h>
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
static void early_config_gpio(void)
|
||||||
|
{
|
||||||
|
const struct pad_config *early_gpio_table;
|
||||||
|
size_t num_gpios = 0;
|
||||||
|
|
||||||
|
early_gpio_table = variant_early_gpio_table(&num_gpios);
|
||||||
|
gpio_configure_pads(early_gpio_table, num_gpios);
|
||||||
|
}
|
||||||
|
|
||||||
|
void bootblock_mainboard_init(void)
|
||||||
|
{
|
||||||
|
early_config_gpio();
|
||||||
|
}
|
80
src/mainboard/google/hatch/chromeos.c
Normal file
80
src/mainboard/google/hatch/chromeos.c
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <arch/acpi.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <boot/coreboot_tables.h>
|
||||||
|
#include <ec/google/chromeec/ec.h>
|
||||||
|
#include <gpio.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
|
|
||||||
|
void fill_lb_gpios(struct lb_gpios *gpios)
|
||||||
|
{
|
||||||
|
struct lb_gpio chromeos_gpios[] = {
|
||||||
|
{-1, ACTIVE_HIGH, get_write_protect_state(), "write protect"},
|
||||||
|
{-1, ACTIVE_HIGH, get_recovery_mode_switch(), "recovery"},
|
||||||
|
{-1, ACTIVE_HIGH, get_lid_switch(), "lid"},
|
||||||
|
{-1, ACTIVE_HIGH, 0, "power"},
|
||||||
|
{-1, ACTIVE_HIGH, gfx_get_init_done(), "oprom"},
|
||||||
|
{-1, ACTIVE_HIGH, 0, "EC in RW"},
|
||||||
|
};
|
||||||
|
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cros_get_gpio_value(int type)
|
||||||
|
{
|
||||||
|
const struct cros_gpio *cros_gpios;
|
||||||
|
size_t i, num_gpios = 0;
|
||||||
|
|
||||||
|
cros_gpios = variant_cros_gpios(&num_gpios);
|
||||||
|
|
||||||
|
for (i = 0; i < num_gpios; i++) {
|
||||||
|
const struct cros_gpio *gpio = &cros_gpios[i];
|
||||||
|
if (gpio->type == type) {
|
||||||
|
int state = gpio_get(gpio->gpio_num);
|
||||||
|
if (gpio->polarity == CROS_GPIO_ACTIVE_LOW)
|
||||||
|
return !state;
|
||||||
|
else
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void mainboard_chromeos_acpi_generate(void)
|
||||||
|
{
|
||||||
|
const struct cros_gpio *cros_gpios;
|
||||||
|
size_t num_gpios = 0;
|
||||||
|
|
||||||
|
cros_gpios = variant_cros_gpios(&num_gpios);
|
||||||
|
|
||||||
|
chromeos_acpi_gpio_generate(cros_gpios, num_gpios);
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_write_protect_state(void)
|
||||||
|
{
|
||||||
|
return cros_get_gpio_value(CROS_GPIO_WP);
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_recovery_mode_switch(void)
|
||||||
|
{
|
||||||
|
return cros_get_gpio_value(CROS_GPIO_REC);
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_lid_switch(void)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
46
src/mainboard/google/hatch/chromeos.fmd
Normal file
46
src/mainboard/google/hatch/chromeos.fmd
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
FLASH@0xfe000000 0x2000000 {
|
||||||
|
SI_ALL@0x0 0x1000000 {
|
||||||
|
SI_DESC@0x0 0x1000
|
||||||
|
SI_EC@0x1000 0x100000
|
||||||
|
SI_GBE@0x101000 0x2000
|
||||||
|
SI_ME@0x103000 0xefd000
|
||||||
|
}
|
||||||
|
SI_BIOS@0x1000000 0x1000000 {
|
||||||
|
RW_SECTION_A@0x0 0x280000 {
|
||||||
|
VBLOCK_A@0x0 0x10000
|
||||||
|
FW_MAIN_A(CBFS)@0x10000 0x26ffc0
|
||||||
|
RW_FWID_A@0x27ffc0 0x40
|
||||||
|
}
|
||||||
|
RW_SECTION_B@0x280000 0x280000 {
|
||||||
|
VBLOCK_B@0x0 0x10000
|
||||||
|
FW_MAIN_B(CBFS)@0x10000 0x26ffc0
|
||||||
|
RW_FWID_B@0x27ffc0 0x40
|
||||||
|
}
|
||||||
|
RW_MISC@0x500000 0x30000 {
|
||||||
|
UNIFIED_MRC_CACHE@0x0 0x20000 {
|
||||||
|
RECOVERY_MRC_CACHE@0x0 0x10000
|
||||||
|
RW_MRC_CACHE@0x10000 0x10000
|
||||||
|
}
|
||||||
|
RW_ELOG@0x20000 0x4000
|
||||||
|
RW_SHARED@0x24000 0x4000 {
|
||||||
|
SHARED_DATA@0x0 0x2000
|
||||||
|
VBLOCK_DEV@0x2000 0x2000
|
||||||
|
}
|
||||||
|
RW_VPD@0x28000 0x2000
|
||||||
|
RW_NVRAM@0x2a000 0x6000
|
||||||
|
}
|
||||||
|
CONSOLE@0x530000 0x20000
|
||||||
|
RW_LEGACY(CBFS)@0x550000 0x6b0000
|
||||||
|
WP_RO@0xc00000 0x400000 {
|
||||||
|
RO_VPD@0x0 0x4000
|
||||||
|
RO_UNUSED@0x4000 0xc000
|
||||||
|
RO_SECTION@0x10000 0x3f0000 {
|
||||||
|
FMAP@0x0 0x800
|
||||||
|
RO_FRID@0x800 0x40
|
||||||
|
RO_FRID_PAD@0x840 0x7c0
|
||||||
|
GBB@0x1000 0xef000
|
||||||
|
COREBOOT(CBFS)@0xf0000 0x300000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
26
src/mainboard/google/hatch/dsdt.asl
Normal file
26
src/mainboard/google/hatch/dsdt.asl
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <arch/acpi.h>
|
||||||
|
DefinitionBlock(
|
||||||
|
"dsdt.aml",
|
||||||
|
"DSDT",
|
||||||
|
0x02, /* DSDT revision: ACPI v2.0 and up */
|
||||||
|
OEM_ID,
|
||||||
|
ACPI_TABLE_CREATOR,
|
||||||
|
0x20110725 /* OEM revision */
|
||||||
|
)
|
||||||
|
{
|
||||||
|
}
|
38
src/mainboard/google/hatch/ramstage.c
Normal file
38
src/mainboard/google/hatch/ramstage.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <arch/acpi.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <soc/ramstage.h>
|
||||||
|
#include <variant/gpio.h>
|
||||||
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
|
|
||||||
|
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
||||||
|
{
|
||||||
|
const struct pad_config *gpio_table;
|
||||||
|
size_t num_gpios;
|
||||||
|
|
||||||
|
gpio_table = variant_base_gpio_table(&num_gpios);
|
||||||
|
gpio_configure_pads(gpio_table, num_gpios);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void mainboard_enable(struct device *dev)
|
||||||
|
{
|
||||||
|
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct chip_operations mainboard_ops = {
|
||||||
|
.enable_dev = mainboard_enable,
|
||||||
|
};
|
20
src/mainboard/google/hatch/romstage.c
Normal file
20
src/mainboard/google/hatch/romstage.c
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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/romstage.h>
|
||||||
|
|
||||||
|
void mainboard_memory_init_params(FSPM_UPD *memupd)
|
||||||
|
{
|
||||||
|
}
|
14
src/mainboard/google/hatch/smihandler.c
Normal file
14
src/mainboard/google/hatch/smihandler.c
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
@@ -0,0 +1,7 @@
|
|||||||
|
bootblock-y += gpio.c
|
||||||
|
|
||||||
|
romstage-y += gpio.c
|
||||||
|
|
||||||
|
ramstage-y += gpio.c
|
||||||
|
|
||||||
|
verstage-y += gpio.c
|
52
src/mainboard/google/hatch/variants/baseboard/devicetree.cb
Normal file
52
src/mainboard/google/hatch/variants/baseboard/devicetree.cb
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
chip soc/intel/cannonlake
|
||||||
|
device domain 0 on
|
||||||
|
device pci 00.0 off end # Host Bridge
|
||||||
|
device pci 02.0 off end # Integrated Graphics Device
|
||||||
|
device pci 04.0 off end # SA Thermal device
|
||||||
|
device pci 12.0 off end # Thermal Subsystem
|
||||||
|
device pci 12.5 off end # UFS SCS
|
||||||
|
device pci 12.6 off end # GSPI #2
|
||||||
|
device pci 14.0 off end # USB xHCI
|
||||||
|
device pci 14.1 off end # USB xDCI (OTG)
|
||||||
|
device pci 14.5 off end # SDCard
|
||||||
|
device pci 15.0 off end # I2C #0
|
||||||
|
device pci 15.1 off end # I2C #1
|
||||||
|
device pci 15.2 off end # I2C #2
|
||||||
|
device pci 15.3 off end # I2C #3
|
||||||
|
device pci 16.0 off end # Management Engine Interface 1
|
||||||
|
device pci 16.1 off end # Management Engine Interface 2
|
||||||
|
device pci 16.2 off end # Management Engine IDE-R
|
||||||
|
device pci 16.3 off end # Management Engine KT Redirection
|
||||||
|
device pci 16.4 off end # Management Engine Interface 3
|
||||||
|
device pci 16.5 off end # Management Engine Interface 4
|
||||||
|
device pci 17.0 off end # SATA
|
||||||
|
device pci 19.0 off end # I2C #4
|
||||||
|
device pci 19.1 off end # I2C #5
|
||||||
|
device pci 19.2 off end # UART #2
|
||||||
|
device pci 1a.0 off end # eMMC
|
||||||
|
device pci 1c.0 off end # PCI Express Port 1 (USB)
|
||||||
|
device pci 1c.1 off end # PCI Express Port 2 (USB)
|
||||||
|
device pci 1c.2 off end # PCI Express Port 3 (USB)
|
||||||
|
device pci 1c.3 off end # PCI Express Port 4 (USB)
|
||||||
|
device pci 1c.4 off end # PCI Express Port 5 (USB)
|
||||||
|
device pci 1c.5 off end # PCI Express Port 6
|
||||||
|
device pci 1c.6 off end # PCI Express Port 7
|
||||||
|
device pci 1c.7 off end # PCI Express Port 8
|
||||||
|
device pci 1d.0 off end # PCI Express Port 9
|
||||||
|
device pci 1d.1 off end # PCI Express Port 10
|
||||||
|
device pci 1d.2 off end # PCI Express Port 11
|
||||||
|
device pci 1d.3 off end # PCI Express Port 12
|
||||||
|
device pci 1d.4 off end # PCI Express Port 13 (x4)
|
||||||
|
device pci 1e.0 off end # UART #0
|
||||||
|
device pci 1e.1 off end # UART #1
|
||||||
|
device pci 1e.2 off end # GSPI #0
|
||||||
|
device pci 1e.3 off end # GSPI #1
|
||||||
|
device pci 1f.0 off end # LPC/eSPI
|
||||||
|
device pci 1f.1 off end # P2SB
|
||||||
|
device pci 1f.2 off end # Power Management Controller
|
||||||
|
device pci 1f.3 off end # Intel HDA
|
||||||
|
device pci 1f.4 off end # SMBus
|
||||||
|
device pci 1f.5 off end # PCH SPI
|
||||||
|
device pci 1f.6 off end # GbE
|
||||||
|
end
|
||||||
|
end
|
54
src/mainboard/google/hatch/variants/baseboard/gpio.c
Normal file
54
src/mainboard/google/hatch/variants/baseboard/gpio.c
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <arch/acpi.h>
|
||||||
|
#include <baseboard/gpio.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <commonlib/helpers.h>
|
||||||
|
|
||||||
|
static const struct pad_config gpio_table[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct pad_config *__weak variant_base_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = ARRAY_SIZE(gpio_table);
|
||||||
|
return gpio_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct pad_config *__weak variant_override_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* GPIOs needed prior to ramstage. */
|
||||||
|
static const struct pad_config early_gpio_table[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct pad_config *__weak
|
||||||
|
variant_early_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = ARRAY_SIZE(early_gpio_table);
|
||||||
|
return early_gpio_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct cros_gpio cros_gpios[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct cros_gpio *__weak variant_cros_gpios(size_t *num)
|
||||||
|
{
|
||||||
|
*num = ARRAY_SIZE(cros_gpios);
|
||||||
|
return cros_gpios;
|
||||||
|
}
|
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BASEBOARD_GPIO_H
|
||||||
|
#define BASEBOARD_GPIO_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
|
#endif /* BASEBOARD_GPIO_H */
|
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BASEBOARD_VARIANTS_H
|
||||||
|
#define BASEBOARD_VARIANTS_H
|
||||||
|
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <vendorcode/google/chromeos/chromeos.h>
|
||||||
|
|
||||||
|
/* The next set of functions return the gpio table and fill in the number of
|
||||||
|
* entries for each table. */
|
||||||
|
const struct pad_config *variant_base_gpio_table(size_t *num);
|
||||||
|
const struct pad_config *variant_override_gpio_table(size_t *num);
|
||||||
|
const struct pad_config *variant_early_gpio_table(size_t *num);
|
||||||
|
const struct pad_config *variant_sleep_gpio_table(size_t *num, int slp_typ);
|
||||||
|
|
||||||
|
/* Return memory SKU for the board. */
|
||||||
|
size_t variant_memory_sku(void);
|
||||||
|
|
||||||
|
/* Return ChromeOS gpio table and fill in number of entries. */
|
||||||
|
const struct cros_gpio *variant_cros_gpios(size_t *num);
|
||||||
|
|
||||||
|
/* Modify devictree settings during ramstage. */
|
||||||
|
struct device;
|
||||||
|
void variant_update_devtree(struct device *dev);
|
||||||
|
|
||||||
|
#endif /* BASEBOARD_VARIANTS_H */
|
17
src/mainboard/google/hatch/variants/hatch/Makefile.inc
Normal file
17
src/mainboard/google/hatch/variants/hatch/Makefile.inc
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
##
|
||||||
|
## This file is part of the coreboot project.
|
||||||
|
##
|
||||||
|
## Copyright 2018 Google LLC
|
||||||
|
##
|
||||||
|
## 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.
|
||||||
|
##
|
||||||
|
|
||||||
|
bootblock-y += gpio.c
|
||||||
|
ramstage-y += gpio.c
|
38
src/mainboard/google/hatch/variants/hatch/gpio.c
Normal file
38
src/mainboard/google/hatch/variants/hatch/gpio.c
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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 <baseboard/gpio.h>
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <commonlib/helpers.h>
|
||||||
|
|
||||||
|
/* Pad configuration in ramstage */
|
||||||
|
static const struct pad_config gpio_table[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Early pad configuration in bootblock */
|
||||||
|
static const struct pad_config early_gpio_table[] = {
|
||||||
|
};
|
||||||
|
|
||||||
|
const struct pad_config *variant_base_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = ARRAY_SIZE(gpio_table);
|
||||||
|
return gpio_table;
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct pad_config *variant_early_gpio_table(size_t *num)
|
||||||
|
{
|
||||||
|
*num = ARRAY_SIZE(early_gpio_table);
|
||||||
|
return early_gpio_table;
|
||||||
|
}
|
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VARIANT_EC_H
|
||||||
|
#define VARIANT_EC_H
|
||||||
|
|
||||||
|
#include <baseboard/ec.h>
|
||||||
|
|
||||||
|
#endif
|
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the coreboot project.
|
||||||
|
*
|
||||||
|
* Copyright 2018 Google LLC
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VARIANT_GPIO_H
|
||||||
|
#define VARIANT_GPIO_H
|
||||||
|
|
||||||
|
#include <baseboard/gpio.h>
|
||||||
|
|
||||||
|
#endif
|
52
src/mainboard/google/hatch/variants/hatch/overridetree.cb
Normal file
52
src/mainboard/google/hatch/variants/hatch/overridetree.cb
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
chip soc/intel/cannonlake
|
||||||
|
device domain 0 on
|
||||||
|
device pci 00.0 off end # Host Bridge
|
||||||
|
device pci 02.0 off end # Integrated Graphics Device
|
||||||
|
device pci 04.0 off end # SA Thermal device
|
||||||
|
device pci 12.0 off end # Thermal Subsystem
|
||||||
|
device pci 12.5 off end # UFS SCS
|
||||||
|
device pci 12.6 off end # GSPI #2
|
||||||
|
device pci 14.0 off end # USB xHCI
|
||||||
|
device pci 14.1 off end # USB xDCI (OTG)
|
||||||
|
device pci 14.5 off end # SDCard
|
||||||
|
device pci 15.0 off end # I2C #0
|
||||||
|
device pci 15.1 off end # I2C #1
|
||||||
|
device pci 15.2 off end # I2C #2
|
||||||
|
device pci 15.3 off end # I2C #3
|
||||||
|
device pci 16.0 off end # Management Engine Interface 1
|
||||||
|
device pci 16.1 off end # Management Engine Interface 2
|
||||||
|
device pci 16.2 off end # Management Engine IDE-R
|
||||||
|
device pci 16.3 off end # Management Engine KT Redirection
|
||||||
|
device pci 16.4 off end # Management Engine Interface 3
|
||||||
|
device pci 16.5 off end # Management Engine Interface 4
|
||||||
|
device pci 17.0 off end # SATA
|
||||||
|
device pci 19.0 off end # I2C #4
|
||||||
|
device pci 19.1 off end # I2C #5
|
||||||
|
device pci 19.2 off end # UART #2
|
||||||
|
device pci 1a.0 off end # eMMC
|
||||||
|
device pci 1c.0 off end # PCI Express Port 1 (USB)
|
||||||
|
device pci 1c.1 off end # PCI Express Port 2 (USB)
|
||||||
|
device pci 1c.2 off end # PCI Express Port 3 (USB)
|
||||||
|
device pci 1c.3 off end # PCI Express Port 4 (USB)
|
||||||
|
device pci 1c.4 off end # PCI Express Port 5 (USB)
|
||||||
|
device pci 1c.5 off end # PCI Express Port 6
|
||||||
|
device pci 1c.6 off end # PCI Express Port 7
|
||||||
|
device pci 1c.7 off end # PCI Express Port 8
|
||||||
|
device pci 1d.0 off end # PCI Express Port 9
|
||||||
|
device pci 1d.1 off end # PCI Express Port 10
|
||||||
|
device pci 1d.2 off end # PCI Express Port 11
|
||||||
|
device pci 1d.3 off end # PCI Express Port 12
|
||||||
|
device pci 1d.4 off end # PCI Express Port 13 (x4)
|
||||||
|
device pci 1e.0 off end # UART #0
|
||||||
|
device pci 1e.1 off end # UART #1
|
||||||
|
device pci 1e.2 off end # GSPI #0
|
||||||
|
device pci 1e.3 off end # GSPI #1
|
||||||
|
device pci 1f.0 off end # LPC/eSPI
|
||||||
|
device pci 1f.1 off end # P2SB
|
||||||
|
device pci 1f.2 off end # Power Management Controller
|
||||||
|
device pci 1f.3 off end # Intel HDA
|
||||||
|
device pci 1f.4 off end # SMBus
|
||||||
|
device pci 1f.5 off end # PCH SPI
|
||||||
|
device pci 1f.6 off end # GbE
|
||||||
|
end
|
||||||
|
end
|
Reference in New Issue
Block a user