From 503d93d870585bbd5233d6bc00ceb0d7d51e5434 Mon Sep 17 00:00:00 2001 From: Sunwei Li Date: Wed, 28 Jul 2021 09:55:00 +0800 Subject: mb/google/dedede/var/cappy2: Add camera support Add camera support in devicetree and associated GPIO configuration. BUG=b:193397569 BRANCH=dedede TEST=Camera function is OK Signed-off-by: Sunwei Li Change-Id: I3275ab408f6a03735a35eaa8025c36df09c9898c Reviewed-on: https://review.coreboot.org/c/coreboot/+/56647 Tested-by: build bot (Jenkins) Reviewed-by: Karthik Ramasubramanian --- .../google/dedede/variants/cappy2/Makefile.inc | 3 +++ src/mainboard/google/dedede/variants/cappy2/gpio.c | 16 ++++++++++++++++ .../google/dedede/variants/cappy2/overridetree.cb | 17 +++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 src/mainboard/google/dedede/variants/cappy2/Makefile.inc create mode 100644 src/mainboard/google/dedede/variants/cappy2/gpio.c (limited to 'src') diff --git a/src/mainboard/google/dedede/variants/cappy2/Makefile.inc b/src/mainboard/google/dedede/variants/cappy2/Makefile.inc new file mode 100644 index 0000000000..eb2c9bc021 --- /dev/null +++ b/src/mainboard/google/dedede/variants/cappy2/Makefile.inc @@ -0,0 +1,3 @@ +## SPDX-License-Identifier: GPL-2.0-or-later + +ramstage-y += gpio.c diff --git a/src/mainboard/google/dedede/variants/cappy2/gpio.c b/src/mainboard/google/dedede/variants/cappy2/gpio.c new file mode 100644 index 0000000000..3ac420c261 --- /dev/null +++ b/src/mainboard/google/dedede/variants/cappy2/gpio.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include + +/* Pad configuration in ramstage */ +static const struct pad_config gpio_table[] = { + /* D15 : EN_PP3300_CAMERA */ + PAD_CFG_GPO(GPP_D15, 1, PLTRST), +}; + +const struct pad_config *variant_override_gpio_table(size_t *num) +{ + *num = ARRAY_SIZE(gpio_table); + return gpio_table; +} diff --git a/src/mainboard/google/dedede/variants/cappy2/overridetree.cb b/src/mainboard/google/dedede/variants/cappy2/overridetree.cb index 88b27f9396..41d1660c53 100644 --- a/src/mainboard/google/dedede/variants/cappy2/overridetree.cb +++ b/src/mainboard/google/dedede/variants/cappy2/overridetree.cb @@ -30,7 +30,24 @@ chip soc/intel/jasperlake register "disable_external_bypass_vr" = "1" # Does not support external vnn power rail + # USB Port Configuration + register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Camera + device domain 0 on + device pci 14.0 on + chip drivers/usb/acpi + device usb 0.0 on + chip drivers/usb/acpi + register "desc" = ""UFCamera"" + register "type" = "UPC_TYPE_INTERNAL" + register "has_power_resource" = "1" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D15)" + register "enable_delay_ms" = "20" + device usb 2.5 on end + end + end + end + end # USB xHCI device pci 15.0 on chip drivers/i2c/hid register "generic.hid" = ""SYNA0A00"" -- cgit v1.2.3