summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorKane Chen <kane_chen@pegatron.corp-partner.google.com>2020-11-25 22:53:50 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-01-07 08:18:21 +0000
commitb2510f2999559c5fbcbfdb0f85e9c782875b9b74 (patch)
tree7533175c1514bcad77a60c027032f209e8c89f0e /src/mainboard
parentd8be3da579291aac54beb683ba131a9c96124556 (diff)
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>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/zork/variants/shuboz/Makefile.inc1
-rw-r--r--src/mainboard/google/zork/variants/shuboz/overridetree.cb25
-rw-r--r--src/mainboard/google/zork/variants/shuboz/variant.c33
3 files changed, 58 insertions, 1 deletions
diff --git a/src/mainboard/google/zork/variants/shuboz/Makefile.inc b/src/mainboard/google/zork/variants/shuboz/Makefile.inc
index 2a8f0f72ed..e5ec76de14 100644
--- a/src/mainboard/google/zork/variants/shuboz/Makefile.inc
+++ b/src/mainboard/google/zork/variants/shuboz/Makefile.inc
@@ -2,3 +2,4 @@
subdirs-y += ./spd
ramstage-y += gpio.c
+ramstage-y += variant.c
diff --git a/src/mainboard/google/zork/variants/shuboz/overridetree.cb b/src/mainboard/google/zork/variants/shuboz/overridetree.cb
index 1cc2364f5e..e3462ca89a 100644
--- a/src/mainboard/google/zork/variants/shuboz/overridetree.cb
+++ b/src/mainboard/google/zork/variants/shuboz/overridetree.cb
@@ -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
diff --git a/src/mainboard/google/zork/variants/shuboz/variant.c b/src/mainboard/google/zork/variants/shuboz/variant.c
new file mode 100644
index 0000000000..8a84a75f2f
--- /dev/null
+++ b/src/mainboard/google/zork/variants/shuboz/variant.c
@@ -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);
+}