[coreboot-gerrit] Change in ...coreboot[master]: mb/google/hatch: Fixes to initial hatch mainboard checkin
Shelley Chen (Code Review)
gerrit at coreboot.org
Tue Dec 18 22:14:51 CET 2018
Shelley Chen has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30296
Change subject: mb/google/hatch: Fixes to initial hatch mainboard checkin
......................................................................
mb/google/hatch: Fixes to initial hatch mainboard checkin
Incorporating some feedback to initial hatch mainboard checking
(CL:30169) that came in after the CL merged.
BUG=b:20914069
BRANCH=None
TEST=./util/abuild/abuild -p none -t google/hatch -x -a -v
Change-Id: I4e311c68873f10f71314e44d3a714639a06dbee8
Signed-off-by: Shelley Chen <shchen at google.com>
---
M src/mainboard/google/hatch/Kconfig
M src/mainboard/google/hatch/chromeos.c
M src/mainboard/google/hatch/chromeos.fmd
M src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h
D src/mainboard/google/hatch/variants/hatch/overridetree.cb
5 files changed, 11 insertions(+), 95 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/30296/1
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 19230f7..cb36adf 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -2,9 +2,6 @@
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 HAVE_ACPI_RESUME
select HAVE_ACPI_TABLES
@@ -23,6 +20,10 @@
select GBB_FLAG_FORCE_DEV_BOOT_USB
select GBB_FLAG_FORCE_DEV_BOOT_LEGACY
select GBB_FLAG_FORCE_MANUAL_RECOVERY
+ select EC_GOOGLE_CHROMEEC_SWITCHES
+ select HAS_RECOVERY_MRC_CACHE
+ select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
+ select VBOOT_LID_SWITCH
config DEVICETREE
string
@@ -71,10 +72,6 @@
int
default 8
-config OVERRIDE_DEVICETREE
- string
- default "variants/$(CONFIG_VARIANT_DIR)/overridetree.cb" if !BOARD_GOOGLE_HATCH
-
config TPM_TIS_ACPI_INTERRUPT
int
default 53 # GPE0_DW1_21 (GPP_C21)
diff --git a/src/mainboard/google/hatch/chromeos.c b/src/mainboard/google/hatch/chromeos.c
index 36fba45..fa54148 100644
--- a/src/mainboard/google/hatch/chromeos.c
+++ b/src/mainboard/google/hatch/chromeos.c
@@ -29,29 +29,15 @@
{-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"},
+ {GPIO_EC_IN_RW, ACTIVE_HIGH, gpio_get(GPIO_EC_IN_RW),
+ "EC in RW"},
};
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}
-static int cros_get_gpio_value(int type)
+int get_write_protect_state(void)
{
- 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;
+ return gpio_get(GPIO_PCH_WP);
}
void mainboard_chromeos_acpi_generate(void)
@@ -63,18 +49,3 @@
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;
-}
diff --git a/src/mainboard/google/hatch/chromeos.fmd b/src/mainboard/google/hatch/chromeos.fmd
index 6631769..9c7cc40 100644
--- a/src/mainboard/google/hatch/chromeos.fmd
+++ b/src/mainboard/google/hatch/chromeos.fmd
@@ -1,8 +1,6 @@
FLASH at 0xfe000000 0x2000000 {
SI_ALL at 0x0 0x1000000 {
SI_DESC at 0x0 0x1000
- SI_EC at 0x1000 0x100000
- SI_GBE at 0x101000 0x2000
SI_ME at 0x103000 0xefd000
}
SI_BIOS at 0x1000000 0x1000000 {
@@ -29,7 +27,6 @@
RW_VPD at 0x28000 0x2000
RW_NVRAM at 0x2a000 0x6000
}
- CONSOLE at 0x530000 0x20000
RW_LEGACY(CBFS)@0x550000 0x6b0000
WP_RO at 0xc00000 0x400000 {
RO_VPD at 0x0 0x4000
diff --git a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h
index 3878029..92501be 100644
--- a/src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h
+++ b/src/mainboard/google/hatch/variants/baseboard/include/baseboard/gpio.h
@@ -24,6 +24,9 @@
#define GPIO_MEM_CONFIG_2 GPP_F11
#define GPIO_MEM_CONFIG_3 GPP_F22
+#define GPIO_EC_IN_RW GPP_C22
+
+#define GPIO_PCH_WP GPP_C20
/* EC wake is LAN_WAKE# which is a special DeepSX wake pin */
#define GPE_EC_WAKE GPE0_LAN_WAK
diff --git a/src/mainboard/google/hatch/variants/hatch/overridetree.cb b/src/mainboard/google/hatch/variants/hatch/overridetree.cb
deleted file mode 100644
index 88df092..0000000
--- a/src/mainboard/google/hatch/variants/hatch/overridetree.cb
+++ /dev/null
@@ -1,52 +0,0 @@
-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
--
To view, visit https://review.coreboot.org/c/coreboot/+/30296
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I4e311c68873f10f71314e44d3a714639a06dbee8
Gerrit-Change-Number: 30296
Gerrit-PatchSet: 1
Gerrit-Owner: Shelley Chen <shchen at google.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181218/88d2d721/attachment-0001.html>
More information about the coreboot-gerrit
mailing list