aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCliff Huang <cliff.huang@intel.com>2022-02-11 17:46:00 -0800
committerFelix Held <felix-coreboot@felixheld.de>2022-02-28 13:29:02 +0000
commit96bb0ba9e72297e98ecd2c2ce88cb4037d496ee5 (patch)
treeba7a47c9479842f55e29a1a95ef9f4345686ca34
parentf514b8ae82ab73dfc2a7e57f75861c6d9ee2a7eb (diff)
drivers/wwan/fm: Add support for _PTS for Fibocom 5G WWAN
Add DPTS (device prepare to sleep) method that is to be called in mainboard's \_SB.MPTS, which is called in _PTS. Signed-off-by: Cliff Huang <cliff.huang@intel.com> Change-Id: Ie308f74940a33711a398bc11d0550cb06b55cdcf Reviewed-on: https://review.coreboot.org/c/coreboot/+/61886 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
-rw-r--r--src/drivers/wwan/fm/acpi_fm350gl.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c
index 67bd4a14e6..80370ad4ab 100644
--- a/src/drivers/wwan/fm/acpi_fm350gl.c
+++ b/src/drivers/wwan/fm/acpi_fm350gl.c
@@ -184,6 +184,22 @@ static void wwan_fm350gl_acpi_method_mrst_rst(const struct device *parent_dev,
acpigen_write_method_end(); /* Method */
}
+/*
+ * Generate DPTS (Device Prepare To Seep) Method. This is called in
+ * \.SB.MPTS Method.
+ */
+static void wwan_fm350gl_acpi_method_dpts(const struct device *parent_dev,
+ const struct drivers_wwan_fm_config *config)
+{
+ acpigen_write_method_serialized("DPTS", 1);
+ {
+ /* Perform 1st Half of FLDR Flow for cold reset: FHRF (1) */
+ acpigen_emit_namestring("FHRF");
+ acpigen_emit_byte(RESET_TYPE_COLD);
+ }
+ acpigen_write_method_end(); /* Method */
+}
+
static const char *wwan_fm350gl_acpi_name(const struct device *dev)
{
/* Attached device name must be "PXSX" for the Linux Kernel to recognize it. */
@@ -224,6 +240,7 @@ static void wwan_fm350gl_acpi_fill_ssdt(const struct device *dev)
wwan_fm350gl_acpi_method_fhrf(parent, config);
wwan_fm350gl_acpi_method_shrf(parent, config);
wwan_fm350gl_acpi_method_rst(parent, config);
+ wwan_fm350gl_acpi_method_dpts(parent, config);
/* NOTE: the 5G driver will call MRST._RST to trigger a cold reset
* during firmware update.
*/
@@ -243,7 +260,7 @@ static struct device_operations wwan_fm350gl_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_fill_ssdt = wwan_fm350gl_acpi_fill_ssdt,
- .acpi_name = wwan_fm350gl_acpi_name,
+ .acpi_name = wwan_fm350gl_acpi_name
};
static void wwan_fm350gl_acpi_enable(struct device *dev)