summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeichao Wang <peichao.wang@bitland.corp-partner.google.com>2020-05-28 10:02:40 +0800
committerFurquan Shaikh <furquan@google.com>2020-06-04 18:01:13 +0000
commitc61870108c80ee7173d542d55596d830299fc4f5 (patch)
tree78a0e847ac343bfb5e0898be6c1b47670ce6186c /src
parentdedbf635229a7c4b7958a80ae81870588a0f0280 (diff)
mb/google/zork: create new variant for Vilboz
BUG=b:157499341 BRANCH=NONE TEST=FW_NAME="vilboz" emerge-zork coreboot Signed-off-by: peichao.wang <peichao.wang@bitland.corp-partner.google.com> Change-Id: I28ab3edb130fc7bf8b786141bc088166052d4868 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41801 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Reviewed-by: Kangheui Won <khwon@chromium.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/zork/Kconfig2
-rw-r--r--src/mainboard/google/zork/Kconfig.name4
-rw-r--r--src/mainboard/google/zork/variants/vilboz/Makefile.inc5
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/acpi/audio.asl3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/acpi/mainboard.asl3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/acpi/sleep.asl3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/acpi/thermal.asl3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/ec.h3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/gpio.h3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/include/variant/thermal.h3
-rw-r--r--src/mainboard/google/zork/variants/vilboz/overridetree.cb100
-rw-r--r--src/mainboard/google/zork/variants/vilboz/spd/Makefile.inc11
-rw-r--r--src/mainboard/google/zork/variants/vilboz/variant.c33
13 files changed, 176 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/Kconfig b/src/mainboard/google/zork/Kconfig
index 343b30ba09..9a2e3733ae 100644
--- a/src/mainboard/google/zork/Kconfig
+++ b/src/mainboard/google/zork/Kconfig
@@ -50,6 +50,7 @@ config VARIANT_DIR
default "trembyle" if BOARD_GOOGLE_TREMBYLE
default "dalboz" if BOARD_GOOGLE_DALBOZ
default "berknip" if BOARD_GOOGLE_BERKNIP
+ default "vilboz" if BOARD_GOOGLE_VILBOZ
config MAINBOARD_PART_NUMBER
string
@@ -58,6 +59,7 @@ config MAINBOARD_PART_NUMBER
default "Trembyle" if BOARD_GOOGLE_TREMBYLE
default "Dalboz" if BOARD_GOOGLE_DALBOZ
default "Berknip" if BOARD_GOOGLE_BERKNIP
+ default "Vilboz" if BOARD_GOOGLE_VILBOZ
config DEVICETREE
string
diff --git a/src/mainboard/google/zork/Kconfig.name b/src/mainboard/google/zork/Kconfig.name
index 065f60cb0a..2f721d48b1 100644
--- a/src/mainboard/google/zork/Kconfig.name
+++ b/src/mainboard/google/zork/Kconfig.name
@@ -4,6 +4,10 @@ config BOARD_GOOGLE_DALBOZ
bool "-> Dalboz"
select BOARD_GOOGLE_BASEBOARD_DALBOZ
+config BOARD_GOOGLE_VILBOZ
+ bool "-> Vilboz"
+ select BOARD_GOOGLE_BASEBOARD_DALBOZ
+
config BOARD_GOOGLE_EZKINIL
bool "-> Ezkinil"
select BOARD_GOOGLE_BASEBOARD_TREMBYLE
diff --git a/src/mainboard/google/zork/variants/vilboz/Makefile.inc b/src/mainboard/google/zork/variants/vilboz/Makefile.inc
new file mode 100644
index 0000000000..dc1e4117f9
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/Makefile.inc
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+subdirs-y += ./spd
+
+ramstage-y += variant.c
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/audio.asl b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/audio.asl
new file mode 100644
index 0000000000..900e36f277
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/audio.asl
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/acpi/audio.asl>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/mainboard.asl b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/mainboard.asl
new file mode 100644
index 0000000000..a1161edb5f
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/mainboard.asl
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/acpi/mainboard.asl>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/sleep.asl b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/sleep.asl
new file mode 100644
index 0000000000..8177a9df2a
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/sleep.asl
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/acpi/sleep.asl>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/thermal.asl b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/thermal.asl
new file mode 100644
index 0000000000..7a793d8102
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/acpi/thermal.asl
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/acpi/thermal.asl>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/ec.h b/src/mainboard/google/zork/variants/vilboz/include/variant/ec.h
new file mode 100644
index 0000000000..9e61a440cf
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/ec.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/ec.h>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/gpio.h b/src/mainboard/google/zork/variants/vilboz/include/variant/gpio.h
new file mode 100644
index 0000000000..dfaeec3ae1
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/gpio.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/gpio.h>
diff --git a/src/mainboard/google/zork/variants/vilboz/include/variant/thermal.h b/src/mainboard/google/zork/variants/vilboz/include/variant/thermal.h
new file mode 100644
index 0000000000..2af647973d
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/include/variant/thermal.h
@@ -0,0 +1,3 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#include <baseboard/thermal.h>
diff --git a/src/mainboard/google/zork/variants/vilboz/overridetree.cb b/src/mainboard/google/zork/variants/vilboz/overridetree.cb
new file mode 100644
index 0000000000..79f26f219e
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/overridetree.cb
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+chip soc/amd/picasso
+
+ # Start : OPN Performance Configuration
+ # See devhub #56670 Chapter 5 for documentation
+ # For the below fields, 0 indicates use SOC default
+
+ # System config index
+ register "system_config" = "1"
+
+ # Set STAPM confiuration. All of these fields must be set >0 to take affect
+ register "slow_ppt_limit" = "6000" # mW
+ register "fast_ppt_limit" = "9000" # mW
+ register "slow_ppt_time_constant" = "5" # second
+ register "stapm_time_constant" = "2500" # second
+ register "sustained_power_limit" = "4800" # mW
+
+ # End : OPN Performance Configuration
+
+ # I2C2 for touchscreen and trackpad
+ 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,
+ }"
+
+ # See AMD 55570-B1 Table 13: PCI Device ID Assignments.
+ device domain 0 on
+ subsystemid 0x1022 0x1510 inherit
+ device pci 8.1 on # Internal GPP Bridge 0 to Bus A
+ device pci 0.3 on end # USB 3.1
+ end
+ device pci 14.3 on # - D14F3 bridge
+ chip ec/google/chromeec
+ device pnp 0c09.0 on
+ chip ec/google/chromeec/i2c_tunnel
+ register "uid" = "1"
+ register "remote_bus" = "8"
+ device generic 0.0 on
+ chip drivers/i2c/generic
+ register "hid" = ""10EC1015""
+ register "desc" = ""RT1015 Tweeter Left Speaker Amp""
+ register "uid" = "0"
+ register "name" = ""TL""
+ device i2c 28 on end
+ end
+ chip drivers/i2c/generic
+ register "hid" = ""10EC1015""
+ register "desc" = ""RT1015 Tweeter Right Speaker Amp""
+ register "uid" = "1"
+ register "name" = ""TR""
+ device i2c 29 on end
+ end
+ end
+ end
+ end
+ end
+ end
+ end # domain
+
+ device mmio 0xfedc4000 on # APU_I2C2_BASE
+ chip drivers/i2c/hid
+ register "generic.hid" = ""GDIX0000""
+ register "generic.desc" = ""Goodix Touchscreen""
+ register "generic.irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_12)"
+ register "generic.probed" = "1"
+ register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_140)"
+ register "generic.reset_delay_ms" = "120"
+ register "generic.has_power_resource" = "1"
+ register "hid_desc_reg_offset" = "0x01"
+ device i2c 5d 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" = "7"
+ register "probed" = "1"
+ device i2c 15 on end
+ end
+ chip drivers/i2c/hid
+ register "generic.hid" = ""PNP0C50""
+ register "generic.desc" = ""Synaptics Touchpad""
+ register "generic.irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_9)"
+ register "generic.wake" = "7"
+ register "generic.probed" = "1"
+ register "hid_desc_reg_offset" = "0x20"
+ device i2c 2c on end
+ end
+ end
+end # chip soc/amd/picasso
diff --git a/src/mainboard/google/zork/variants/vilboz/spd/Makefile.inc b/src/mainboard/google/zork/variants/vilboz/spd/Makefile.inc
new file mode 100644
index 0000000000..4494b98a75
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/spd/Makefile.inc
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Ordered List of APCB entries, up to 16.
+# Entries should match this pattern {NAME}_x{1,2}
+# There should be a matching SPD hex file in SPD_SOURCES_DIR
+# matching the pattern {NAME}.spd.hex
+# The _x{1,2} suffix denotes single or dual channel
+# TODO: Remove channel suffix when b:141434940 is fixed
+# Alternatively, generated APCBs stored at
+# CONFIG_APCB_BLOB_DIR/APCB_{NAME}.bin can be included.
+APCB_SOURCES = empty
diff --git a/src/mainboard/google/zork/variants/vilboz/variant.c b/src/mainboard/google/zork/variants/vilboz/variant.c
new file mode 100644
index 0000000000..eb0ded993e
--- /dev/null
+++ b/src/mainboard/google/zork/variants/vilboz/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 picasso_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 = HDMI,
+ .aux_index = AUX2,
+ .hdp_index = HDP2
+ },
+ { // DDI2, DP3, USB-C0
+ .connector_type = DP,
+ .aux_index = AUX4,
+ .hdp_index = HDP4,
+ }
+};
+
+void variant_get_pcie_ddi_descriptors(const picasso_fsp_pcie_descriptor **pcie_descs,
+ size_t *pcie_num,
+ const picasso_fsp_ddi_descriptor **ddi_descs,
+ size_t *ddi_num)
+{
+ *pcie_descs = baseboard_get_pcie_descriptors(pcie_num);
+
+ *ddi_descs = &hdmi_ddi_descriptors[0];
+ *ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors);
+}