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>
diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c
index 67bd4a1..80370ad 100644
--- a/src/drivers/wwan/fm/acpi_fm350gl.c
+++ b/src/drivers/wwan/fm/acpi_fm350gl.c
@@ -184,6 +184,22 @@
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 @@
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 @@
.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)