diff options
author | Ivy Jian <ivy.jian@quanta.corp-partner.google.com> | 2023-03-16 17:18:35 +0800 |
---|---|---|
committer | Eric Lai <eric_lai@quanta.corp-partner.google.com> | 2023-03-20 01:23:30 +0000 |
commit | 665c58b77a6cab398d600a612d1c14d56a01fd9b (patch) | |
tree | 48948163f0f381fdb203b17a5e64a8f0f9926360 /src/mainboard/google/rex/variants | |
parent | fc484bf2ae4df9c4ce49610821fe06b9e0a9f3b7 (diff) |
mb/google/rex: Enable USB camera power
Add enable_gpio for USB power resource
BUG=b:273891168
TEST=Able to detect USB CAM
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Change-Id: I08ebe560c8b75c8b590c889b7b90dbe678318d2a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/mainboard/google/rex/variants')
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/overridetree.cb | 2 | ||||
-rw-r--r-- | src/mainboard/google/rex/variants/rex0/variant.c | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/mainboard/google/rex/variants/rex0/overridetree.cb b/src/mainboard/google/rex/variants/rex0/overridetree.cb index bad123be54..d35eb36656 100644 --- a/src/mainboard/google/rex/variants/rex0/overridetree.cb +++ b/src/mainboard/google/rex/variants/rex0/overridetree.cb @@ -194,6 +194,8 @@ chip soc/intel/meteorlake chip drivers/usb/acpi register "desc" = ""USB2 Camera"" register "type" = "UPC_TYPE_INTERNAL" + register "has_power_resource" = "1" + register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B09)" device ref usb2_port6 on probe UFC UFC_USB end diff --git a/src/mainboard/google/rex/variants/rex0/variant.c b/src/mainboard/google/rex/variants/rex0/variant.c index 6a79780f6e..3aec24b165 100644 --- a/src/mainboard/google/rex/variants/rex0/variant.c +++ b/src/mainboard/google/rex/variants/rex0/variant.c @@ -1,8 +1,23 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include <acpi/acpigen.h> +#include <baseboard/variants.h> +#include <fw_config.h> #include <sar.h> +#include <variant/gpio.h> const char *get_wifi_sar_cbfs_filename(void) { return "wifi_sar_0.hex"; } + +void variant_generate_s0ix_hook(enum s0ix_entry entry) +{ + if (entry == S0IX_ENTRY) { + if (fw_config_probe(FW_CONFIG(UFC, UFC_USB))) + acpigen_soc_clear_tx_gpio(GPP_B09); + } else if (entry == S0IX_EXIT) { + if (fw_config_probe(FW_CONFIG(UFC, UFC_USB))) + acpigen_soc_set_tx_gpio(GPP_B09); + } +} |