Sunwei Li has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/56647 )
Change subject: mb/google/dedede/var/cappy2: Add camera support ......................................................................
mb/google/dedede/var/cappy2: Add camera support
Add camera support in devicetree and associated GPIO configuration.
BUG=None BRANCH=dedede TEST=Camera function is OK
Signed-off-by: Sunwei Li lisunwei@huaqin.corp-partner.google.com Change-Id: I3275ab408f6a03735a35eaa8025c36df09c9898c --- A src/mainboard/google/dedede/variants/cappy2/Makefile.inc A src/mainboard/google/dedede/variants/cappy2/gpio.c M src/mainboard/google/dedede/variants/cappy2/overridetree.cb 3 files changed, 34 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/56647/1
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 0000000..eb2c9bc --- /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 0000000..3ac420c --- /dev/null +++ b/src/mainboard/google/dedede/variants/cappy2/gpio.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <baseboard/gpio.h> +#include <baseboard/variants.h> + +/* 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 eb8e2dd..5786b05 100644 --- a/src/mainboard/google/dedede/variants/cappy2/overridetree.cb +++ b/src/mainboard/google/dedede/variants/cappy2/overridetree.cb @@ -61,7 +61,22 @@ .pre_emp_bias = USB2_BIAS_28P15MV, .pre_emp_bit = USB2_HALF_BIT_PRE_EMP, }" # 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""