Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46842 )
Change subject: soc/intel/jasperlake: Correct GPIO pad sequence for community pad group
......................................................................
soc/intel/jasperlake: Correct GPIO pad sequence for community pad group
In gpio.c file, we have community group array for each comm,
representing gpio groups within that community. Like there might be
group H,D, VGPIO and C within community 1. Community also may have
some reserved gpio and we also define those in an array which indicates
OS can't use those GPIO (through PAD_BASE_NONE)
Now when we define reserved pads in the middle of actual community
pads, it creates an issue while calculating an offset for GPIO
host own pad register. This is because function actually checks
current gpio index (lets say vgpio_39 in our case) and tries to get
group index from an array which we have defined. If we have defined
reserved gpios in between 2 communities, index calculated will also
account for reserved GPIO and register offset calculation will move
to next set of register (offset 0xC instead of offset 0x8).
Because of this coreboot won't configure HOST_OWN_PAD register correctly
and driver will not be able to get non-SMI interrupts for related gpio.
Align pad group as per EDS and pin-ctrl driver in linux kernel.
Reference: DOC#618876 (EDS volume 2)
BUG=None
BRANCH=None
TEST=VGPIO community index is correctly calculated. Drawlat board
boots fine with this change and warm reset also works.
Change-Id: Id6013914c88c50f4b8c60ca9a9285a8e1b214d11
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46842
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub(a)google.com>
---
M src/soc/intel/jasperlake/gpio.c
1 file changed, 11 insertions(+), 14 deletions(-)
Approvals:
build bot (Jenkins): Verified
Furquan Shaikh: Looks good to me, approved
Karthik Ramasubramanian: Looks good to me, approved
diff --git a/src/soc/intel/jasperlake/gpio.c b/src/soc/intel/jasperlake/gpio.c
index 2f13015..18405fc 100644
--- a/src/soc/intel/jasperlake/gpio.c
+++ b/src/soc/intel/jasperlake/gpio.c
@@ -33,36 +33,33 @@
*/
static const struct pad_group jsl_community0_groups[] = {
- INTEL_GPP_BASE(GPP_F0, GPP_F0, GPP_F19, 0), /* GPP_F */
- INTEL_GPP(GPP_F0, GPIO_SPI0_IO_2, GPIO_SPI0_CLK_LOOPBK),
- INTEL_GPP_BASE(GPP_F0, GPP_B0, GPP_B23, 32), /* GPP_B */
- INTEL_GPP(GPP_F0, GPIO_GSPI0_CLK_LOOPBK, GPIO_GSPI1_CLK_LOOPBK),
- INTEL_GPP_BASE(GPP_F0, GPP_A0, GPIO_ESPI_CLK_LOOPBK, 64), /* GPP_A */
- INTEL_GPP_BASE(GPP_F0, GPP_S0, GPP_S7, 96), /* GPP_S */
- INTEL_GPP_BASE(GPP_F0, GPP_R0, GPP_R7, 128), /* GPP_R */
+ INTEL_GPP_BASE(GPP_F0, GPP_F0, GPP_F19, 320), /* GPP_F */
+ INTEL_GPP(GPP_F0, GPIO_SPI0_IO_2, GPIO_SPI0_CLK_LOOPBK),/* SPI0 */
+ INTEL_GPP_BASE(GPP_F0, GPP_B0, GPIO_GSPI1_CLK_LOOPBK, 32),/* GPP_B */
+ INTEL_GPP_BASE(GPP_F0, GPP_A0, GPIO_ESPI_CLK_LOOPBK, 64),/* GPP_A */
+ INTEL_GPP_BASE(GPP_F0, GPP_S0, GPP_S7, 96), /* GPP_S */
+ INTEL_GPP_BASE(GPP_F0, GPP_R0, GPP_R7, 128), /* GPP_R */
};
static const struct pad_group jsl_community1_groups[] = {
INTEL_GPP_BASE(GPP_H0, GPP_H0, GPP_H23, 160), /* GPP_H */
- INTEL_GPP_BASE(GPP_H0, GPP_D0, GPP_D23, 192), /* GPP_D */
- INTEL_GPP(GPP_H0, GPIO_GSPI2_CLK_LOOPBK, GPIO_SPI1_CLK_LOOPBK),
+ INTEL_GPP_BASE(GPP_H0, GPP_D0, GPIO_SPI1_CLK_LOOPBK, 192),/* GPP_D */
INTEL_GPP_BASE(GPP_H0, VGPIO_0, VGPIO_39, 224), /* VGPIO */
INTEL_GPP_BASE(GPP_H0, GPP_C0, GPP_C23, 256), /* GPP_C */
};
/* This community is not visible to the OS */
static const struct pad_group jsl_community2_groups[] = {
- INTEL_GPP(GPD0, GPD0, GPD10), /* GPD */
- INTEL_GPP(GPD0, GPIO_INPUT3VSEL, GPIO_DRAM_RESETB),
+ INTEL_GPP(GPD0, GPD0, GPIO_DRAM_RESETB), /* GPD */
};
static const struct pad_group jsl_community4_groups[] = {
- INTEL_GPP(GPIO_L_BKLTEN, GPIO_L_BKLTEN, GPIO_MLK_RSTB),
- INTEL_GPP_BASE(GPIO_L_BKLTEN, GPP_E0, GPP_E23, 288), /* GPP_E */
+ INTEL_GPP(GPIO_L_BKLTEN, GPIO_L_BKLTEN, GPIO_MLK_RSTB), /* Reserved */
+ INTEL_GPP_BASE(GPIO_L_BKLTEN, GPP_E0, GPP_E23, 288), /* GPP_E */
};
static const struct pad_group jsl_community5_groups[] = {
- INTEL_GPP_BASE(GPP_G0, GPP_G0, GPP_G7, 320), /* GPP_G */
+ INTEL_GPP_BASE(GPP_G0, GPP_G0, GPP_G7, 0), /* GPP_G */
};
static const struct pad_community jsl_communities[TOTAL_GPIO_COMM] = {
--
To view, visit https://review.coreboot.org/c/coreboot/+/46842
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id6013914c88c50f4b8c60ca9a9285a8e1b214d11
Gerrit-Change-Number: 46842
Gerrit-PatchSet: 12
Gerrit-Owner: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: merged
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