Ricardo Ribalda has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46961 )
Change subject: acpi: Add support for privacy_gpio
......................................................................
acpi: Add support for privacy_gpio
Some devices, such as cameras, can implement a physical switch to
disable the input on demand. Think of it like the typical privacy
sticker on the notebooks, but more elegant.
In order to notify the system about the status this feature, a GPIO is
typically used.
The map between a GPIO and the feature is done via ACPI, the same way as
the reset_gpio works.
This patch implements an extra field for the described privacy gpio.
This gpio does not require any extra handling from the power management.
Change-Id: Idcc65c9a13eca6f076ac3c68aaa1bed3c481df3d
Signed-off-by: Ricardo Ribalda <ribalda(a)chromium.org>
---
M src/drivers/usb/acpi/chip.h
M src/drivers/usb/acpi/usb_acpi.c
2 files changed, 18 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/46961/1
diff --git a/src/drivers/usb/acpi/chip.h b/src/drivers/usb/acpi/chip.h
index 8cd9268..4a55cc6 100644
--- a/src/drivers/usb/acpi/chip.h
+++ b/src/drivers/usb/acpi/chip.h
@@ -45,6 +45,7 @@
struct acpi_pld custom_pld;
struct acpi_gpio reset_gpio;
+ struct acpi_gpio privacy_gpio;
};
#endif /* __USB_ACPI_CHIP_H__ */
diff --git a/src/drivers/usb/acpi/usb_acpi.c b/src/drivers/usb/acpi/usb_acpi.c
index d33b7de..9b45483 100644
--- a/src/drivers/usb/acpi/usb_acpi.c
+++ b/src/drivers/usb/acpi/usb_acpi.c
@@ -13,10 +13,13 @@
/*
* Return false if reset GPIO is not provided.
*/
- if (cfg->reset_gpio.pin_count == 0)
- return false;
+ if (cfg->reset_gpio.pin_count)
+ return true;
- return true;
+ if (cfg->privacy_gpio.pin_count)
+ return true;
+
+ return false;
}
static void usb_acpi_fill_ssdt_generator(const struct device *dev)
@@ -49,15 +52,23 @@
/* Resources */
if (usb_acpi_add_gpios_to_crs(config) == true) {
struct acpi_dp *dsd;
+ int idx = 0;
acpigen_write_name("_CRS");
acpigen_write_resourcetemplate_header();
- acpi_device_write_gpio(&config->reset_gpio);
+ if (config->reset_gpio.pin_count)
+ acpi_device_write_gpio(&config->reset_gpio);
+ if (config->privacy_gpio.pin_count)
+ acpi_device_write_gpio(&config->privacy_gpio);
acpigen_write_resourcetemplate_footer();
dsd = acpi_dp_new_table("_DSD");
- acpi_dp_add_gpio(dsd, "reset-gpio", path, 0, 0,
- config->reset_gpio.active_low);
+ if (config->reset_gpio.pin_count)
+ acpi_dp_add_gpio(dsd, "reset-gpio", path, idx++, 0,
+ config->reset_gpio.active_low);
+ if (config->privacy_gpio.pin_count)
+ acpi_dp_add_gpio(dsd, "privacy-gpio", path, idx++, 0,
+ config->privacy_gpio.active_low);
acpi_dp_write(dsd);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/46961
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idcc65c9a13eca6f076ac3c68aaa1bed3c481df3d
Gerrit-Change-Number: 46961
Gerrit-PatchSet: 1
Gerrit-Owner: Ricardo Ribalda <ribalda(a)chromium.org>
Gerrit-MessageType: newchange
Hello Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47358
to look at the new patch set (#2).
Change subject: mb/google/volteer: Create drobit variant
......................................................................
mb/google/volteer: Create drobit variant
Create the drobit variant of the volteer.
BUG=b:
BRANCH=none
TEST=emerge-volteer coreboot
Signed-off-by: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Change-Id: Ib3dca73dea26c0d267d8e0e725d712f750810b06
---
A src/mainboard/google/volteer/variants/drobit/Makefile.inc
A src/mainboard/google/volteer/variants/drobit/gpio.c
A src/mainboard/google/volteer/variants/drobit/include/variant/ec.h
A src/mainboard/google/volteer/variants/drobit/include/variant/gpio.h
A src/mainboard/google/volteer/variants/drobit/memory.c
A src/mainboard/google/volteer/variants/drobit/memory/Makefile.inc
A src/mainboard/google/volteer/variants/drobit/memory/dram_id.generated.txt
A src/mainboard/google/volteer/variants/drobit/memory/mem_list_variant.txt
A src/mainboard/google/volteer/variants/drobit/overridetree.cb
9 files changed, 532 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/47358/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/47358
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib3dca73dea26c0d267d8e0e725d712f750810b06
Gerrit-Change-Number: 47358
Gerrit-PatchSet: 2
Gerrit-Owner: Frank Chu <frank_chu(a)pegatron.corp-partner.google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newpatchset
Sumeet R Pawnikar has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47285 )
Change subject: mb/google/dedede/variants/magolor: Update Power Limit2 minimum value
......................................................................
mb/google/dedede/variants/magolor: Update Power Limit2 minimum value
Update Power Limit2 (PL2) minimum value to the same as maximum value
for magolor board. DTT does not throttle PL2, so this minimum value
change here does not impact any existing behavior on the system.
BUG=b:168353037
BRANCH=None
TEST=Build and test on magolor board
Change-Id: I74e960de506d366cba2c8aefb23f9e69337fd163
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar(a)intel.com>
---
M src/mainboard/google/dedede/variants/magolor/overridetree.cb
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/47285/1
diff --git a/src/mainboard/google/dedede/variants/magolor/overridetree.cb b/src/mainboard/google/dedede/variants/magolor/overridetree.cb
index 625546e..33b89d6 100644
--- a/src/mainboard/google/dedede/variants/magolor/overridetree.cb
+++ b/src/mainboard/google/dedede/variants/magolor/overridetree.cb
@@ -92,7 +92,7 @@
.time_window_max = 1 * MSECS_PER_SEC,
.granularity = 200,}"
register "controls.power_limits.pl2" = "{
- .min_power = 7000,
+ .min_power = 12000,
.max_power = 12000,
.time_window_min = 1 * MSECS_PER_SEC,
.time_window_max = 1 * MSECS_PER_SEC,
--
To view, visit https://review.coreboot.org/c/coreboot/+/47285
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I74e960de506d366cba2c8aefb23f9e69337fd163
Gerrit-Change-Number: 47285
Gerrit-PatchSet: 1
Gerrit-Owner: Sumeet R Pawnikar <sumeet.r.pawnikar(a)intel.com>
Gerrit-MessageType: newchange
Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47260 )
Change subject: device: Add pci_s_dev_is_wake_source function
......................................................................
device: Add pci_s_dev_is_wake_source function
This function is the SIMPLE_DEVICE equivalent of
`pci_dev_is_wake_source`, which is required so that elog can use this
function, which since it runs in SMM as well, it uses the simple device
model.
Signed-off-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Change-Id: Ie5583c04366c9a16bc1b00a6892d39eeafe5da49
---
M src/device/pci_ops.c
M src/include/device/pci_ops.h
2 files changed, 23 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/47260/1
diff --git a/src/device/pci_ops.c b/src/device/pci_ops.c
index 90f45bf..cb833f8 100644
--- a/src/device/pci_ops.c
+++ b/src/device/pci_ops.c
@@ -78,3 +78,18 @@
{
die("PCI: dev is NULL!\n");
}
+
+bool pci_s_dev_is_wake_source(pci_devfn_t dev)
+{
+ unsigned int pm_cap;
+ uint16_t pmcs;
+
+ pm_cap = pci_s_find_capability(dev, PCI_CAP_ID_PM);
+ if (!pm_cap)
+ return false;
+
+ pmcs = pci_s_read_config16(dev, pm_cap + PCI_PM_CTRL);
+
+ /* PCI Device is a wake source if PME_ENABLE and PME_STATUS are set in PMCS register. */
+ return (pmcs & PCI_PM_CTRL_PME_ENABLE) && (pmcs & PCI_PM_CTRL_PME_STATUS);
+}
diff --git a/src/include/device/pci_ops.h b/src/include/device/pci_ops.h
index cdf02d6..1738cd1 100644
--- a/src/include/device/pci_ops.h
+++ b/src/include/device/pci_ops.h
@@ -209,4 +209,12 @@
return pci_s_find_capability(PCI_BDF(dev), cap);
}
+/*
+ * Determine if the given PCI device is the source of wake from sleep by checking PME_STATUS and
+ * PME_ENABLE bits in PM control and status register.
+ *
+ * Returns true if PCI device is wake source, false otherwise.
+ */
+bool pci_s_dev_is_wake_source(pci_devfn_t dev);
+
#endif /* PCI_OPS_H */
--
To view, visit https://review.coreboot.org/c/coreboot/+/47260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie5583c04366c9a16bc1b00a6892d39eeafe5da49
Gerrit-Change-Number: 47260
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/44587 )
Change subject: mb/google/dedede: Add support for variant specific SMI sleep flow
......................................................................
mb/google/dedede: Add support for variant specific SMI sleep flow
This support is required to power off certain components that exist only
in certain variants.
BUG=None
TEST=Build and boot Boten to OS.
Change-Id: Ib43ada784666919a4d26246a683dad7f3546fabb
Signed-off-by: Karthikeyan Ramasubramanian <kramasub(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44587
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Peichao Wang <pwang12(a)lenovo.corp-partner.google.com>
Reviewed-by: Marco Chen <marcochen(a)google.com>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
---
M src/mainboard/google/dedede/smihandler.c
M src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Furquan Shaikh: Looks good to me, approved
Marco Chen: Looks good to me, approved
Peichao Wang: Looks good to me, approved
diff --git a/src/mainboard/google/dedede/smihandler.c b/src/mainboard/google/dedede/smihandler.c
index 20f0207..c50578d 100644
--- a/src/mainboard/google/dedede/smihandler.c
+++ b/src/mainboard/google/dedede/smihandler.c
@@ -21,6 +21,8 @@
pads = variant_sleep_gpio_table(&num);
gpio_configure_pads(pads, num);
+ variant_smi_sleep(slp_typ);
+
chromeec_smi_sleep(slp_typ, MAINBOARD_EC_S3_WAKE_EVENTS,
MAINBOARD_EC_S5_WAKE_EVENTS);
}
@@ -41,3 +43,7 @@
{
chromeec_smi_process_events();
}
+
+void __weak variant_smi_sleep(u8 slp_typ)
+{
+}
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
index bb41e45..e7bfd86 100644
--- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
@@ -36,4 +36,7 @@
*/
bool variant_mem_is_half_populated(void);
+/* Allow each variants to customize SMI sleep flow. */
+void variant_smi_sleep(u8 slp_typ);
+
#endif /*__BASEBOARD_VARIANTS_H__ */
--
To view, visit https://review.coreboot.org/c/coreboot/+/44587
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib43ada784666919a4d26246a683dad7f3546fabb
Gerrit-Change-Number: 44587
Gerrit-PatchSet: 8
Gerrit-Owner: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Henry Sun <henrysun(a)google.com>
Gerrit-Reviewer: Marco Chen <marcochen(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Peichao Wang <pwang12(a)lenovo.corp-partner.google.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Rasheed Hsueh <rasheed.hsueh(a)lcfc.corp-partner.google.com>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-MessageType: merged