From bfd6521ce71b67a619da221dce7070db3959533b Mon Sep 17 00:00:00 2001 From: Kane Chen Date: Thu, 16 Jul 2020 13:36:20 +0800 Subject: mb/google/zork: Modify Woomax variant Update Woomax configuration including GPIO, memory SPD table, I2C devices and USB type C. BUG=b:158343602 BRANCH=None TEST=emerge-zork coreboot Signed-off-by: Kane Chen Change-Id: I55ba995d9438551d45cb9e17f92b5089ccf4a5fd Reviewed-on: https://review.coreboot.org/c/coreboot/+/43497 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Furquan Shaikh --- .../google/zork/variants/woomax/Makefile.inc | 4 ++- src/mainboard/google/zork/variants/woomax/gpio.c | 31 ++++++++++++++++++++++ .../google/zork/variants/woomax/overridetree.cb | 28 ++++++++++++++++++- .../google/zork/variants/woomax/spd/Makefile.inc | 18 +++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 src/mainboard/google/zork/variants/woomax/gpio.c create mode 100644 src/mainboard/google/zork/variants/woomax/spd/Makefile.inc (limited to 'src/mainboard/google/zork/variants') diff --git a/src/mainboard/google/zork/variants/woomax/Makefile.inc b/src/mainboard/google/zork/variants/woomax/Makefile.inc index 9dc5159c53..57e7136ddc 100644 --- a/src/mainboard/google/zork/variants/woomax/Makefile.inc +++ b/src/mainboard/google/zork/variants/woomax/Makefile.inc @@ -1,3 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-or-later -subdirs-y += ../baseboard/spd +subdirs-y += ./spd + +ramstage-y += gpio.c diff --git a/src/mainboard/google/zork/variants/woomax/gpio.c b/src/mainboard/google/zork/variants/woomax/gpio.c new file mode 100644 index 0000000000..9c779d734d --- /dev/null +++ b/src/mainboard/google/zork/variants/woomax/gpio.c @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include + +static const struct soc_amd_gpio woomax_gpio_set_stage_ram[] = { + /* GPIO_4 NC */ + PAD_NC(GPIO_4), + /* GPIO_5 NC */ + PAD_NC(GPIO_5), + /* GPIO_6 NC */ + PAD_NC(GPIO_6), + /* GPIO_11 NC */ + PAD_NC(GPIO_11), + /* GPIO_32 NC */ + PAD_NC(GPIO_32), + /* GPIO_69 NC */ + PAD_NC(GPIO_69), + /* RAM_ID_4 */ + PAD_NC(GPIO_84), + /* GPIO_141 NC */ + PAD_NC(GPIO_141), + /* GPIO_143 NC */ + PAD_NC(GPIO_143), +}; + +const struct soc_amd_gpio *variant_override_gpio_table(size_t *size) +{ + *size = ARRAY_SIZE(woomax_gpio_set_stage_ram); + return woomax_gpio_set_stage_ram; +} diff --git a/src/mainboard/google/zork/variants/woomax/overridetree.cb b/src/mainboard/google/zork/variants/woomax/overridetree.cb index 077e983f85..78e0523adf 100644 --- a/src/mainboard/google/zork/variants/woomax/overridetree.cb +++ b/src/mainboard/google/zork/variants/woomax/overridetree.cb @@ -41,8 +41,34 @@ chip soc/amd/picasso # See AMD 55570-B1 Table 13: PCI Device ID Assignments. device domain 0 on subsystemid 0x1022 0x1510 inherit + chip drivers/usb/acpi + device usb 2.2 off end + end + chip drivers/usb/acpi + device usb 3.2 off end + end end # domain - device mmio 0xfedc4000 on end + device mmio 0xfedc4000 on + chip drivers/i2c/generic + register "hid" = ""ELAN0000"" + register "desc" = ""ELAN Touchpad"" + register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)" + register "wake" = "GEVENT_22" + register "probed" = "1" + device i2c 15 on end + end + chip drivers/i2c/hid + register "generic.hid" = ""ELAN9008"" + register "generic.desc" = ""ELAN Touchscreen"" + register "generic.probed" = "1" + register "generic.irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_12)" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_140)" + register "generic.reset_delay_ms" = "20" + register "generic.has_power_resource" = "1" + register "hid_desc_reg_offset" = "0x01" + device i2c 10 on end + end + end end # chip soc/amd/picasso diff --git a/src/mainboard/google/zork/variants/woomax/spd/Makefile.inc b/src/mainboard/google/zork/variants/woomax/spd/Makefile.inc new file mode 100644 index 0000000000..8c60fe601d --- /dev/null +++ b/src/mainboard/google/zork/variants/woomax/spd/Makefile.inc @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +APCB_SOURCES = micron-MT40A512M16TB-062E-J_x1 # 0b00000 +APCB_SOURCES += hynix-H5AN8G6NCJR-XNC_x1 # 0b00001 +APCB_SOURCES += micron-MT40A1G16KD-062E-E_x1 # 0b00010 +APCB_SOURCES += samsung-K4AAG165WA-BCWE_x1 # 0b00011 +APCB_SOURCES += empty # 0b00100 +APCB_SOURCES += empty # 0b00101 +APCB_SOURCES += empty # 0b00110 +APCB_SOURCES += empty # 0b00111 +APCB_SOURCES += micron-MT40A512M16TB-062E-J_x2 # 0b01000 +APCB_SOURCES += hynix-H5AN8G6NCJR-XNC_x2 # 0b01001 +APCB_SOURCES += micron-MT40A1G16KD-062E-E_x2 # 0b01010 +APCB_SOURCES += samsung-K4AAG165WA-BCWE_x2 # 0b01011 +APCB_SOURCES += empty # 0b01100 +APCB_SOURCES += empty # 0b01101 +APCB_SOURCES += empty # 0b01110 +APCB_SOURCES += empty # 0b01111 -- cgit v1.2.3