mb/google/zork: Modify variant to Shuboz support

1. Add ELAN touchscreen/touchpad to overridetree.cb
2. Follow Dalboz setting to add variant.c

BUG=b:174528384
BRANCH=zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: Ic3193ca7957251841e75a7e5c7a16fc5047919fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48001
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kane Chen 2020-11-25 22:53:50 +08:00 committed by Patrick Georgi
parent d8be3da579
commit b2510f2999
3 changed files with 58 additions and 1 deletions

View file

@ -2,3 +2,4 @@
subdirs-y += ./spd
ramstage-y += gpio.c
ramstage-y += variant.c

View file

@ -22,12 +22,16 @@ chip soc/amd/picasso
register "i2c[2]" = "{
.speed = I2C_SPEED_FAST,
.rise_time_ns = 18, /* 0 to 2.31 (3.3 * .7) */
.fall_time_ns = 57, /* 2.31 to 0 */
}"
# I2C3 for H1
register "i2c[3]" = "{
.speed = I2C_SPEED_FAST,
.rise_time_ns = 184, /* 0 to 1.26v (1.8 * .7) */
.fall_time_ns = 42, /* 1.26v to 0 */
.early_init = true,
}"
@ -37,6 +41,25 @@ chip soc/amd/picasso
end # domain
device mmio 0xfedc4000 on # APU_I2C2_BASE
chip drivers/i2c/generic
register "hid" = ""ELAN0001""
register "desc" = ""ELAN Touchscreen""
register "probed" = "1"
register "irq_gpio" = "ACPI_GPIO_IRQ_LEVEL_LOW(GPIO_12)"
register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_32)"
register "enable_delay_ms" = "1"
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_140)"
register "reset_delay_ms" = "20"
register "has_power_resource" = "1"
device i2c 10 on end
end
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
end # device
end # chip soc/amd/picasso

View file

@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
#include <soc/pci_devs.h>
static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
{ // DDI0, DP0, eDP
.connector_type = EDP,
.aux_index = AUX1,
.hdp_index = HDP1
},
{ // DDI1, DP1, DB OPT2 USB-C1 / DB OPT3 MST hub
.connector_type = DP,
.aux_index = AUX2,
.hdp_index = HDP2
},
{ // DDI2, DP3, USB-C0
.connector_type = DP,
.aux_index = AUX4,
.hdp_index = HDP4,
}
};
void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs,
size_t *dxio_num,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num)
{
*dxio_descs = baseboard_get_dxio_descriptors(dxio_num);
*ddi_descs = &hdmi_ddi_descriptors[0];
*ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors);
}