Josie Nordrum has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46671 )
Change subject: mb/google/zork: Generate acpi methods in mainboard.c ......................................................................
mb/google/zork: Generate acpi methods in mainboard.c
Generate acpi methods which enable and disable backlight during _INI, _WAK, and _PTS.
BUG=b:158087989 BRANCH=Zork EST=check backlight during reboot and suspend
Signed-off-by: Josie Nordrum JosieNordrum@google.com Change-Id: I2f3434dc92de1f697693ff69ca15bd76647b89a2 --- M src/mainboard/google/zork/mainboard.c 1 file changed, 47 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/46671/1
diff --git a/src/mainboard/google/zork/mainboard.c b/src/mainboard/google/zork/mainboard.c index f0d9a28..1049d6b 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -6,6 +6,7 @@ #include <device/device.h> #include <device/mmio.h> #include <acpi/acpi.h> +#include <acpi/acpigen.h> #include <acpi/acpi_gnvs.h> #include <amdblocks/amd_pci_util.h> #include <amdblocks/gpio_banks.h> @@ -175,6 +176,50 @@ variant_get_dxio_ddi_descriptors(dxio_descs, dxio_num, ddi_descs, ddi_num); }
+static void mainboard_write_blken(void) +{ + acpigen_write_method("\_SB.BKEN", 0); + acpigen_soc_clear_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_blkdis(void) +{ + acpigen_write_method("\_SB.BKDS", 0); + acpigen_soc_set_tx_gpio(GPIO_85); + acpigen_pop_len(); +} + +static void mainboard_write_mini(void) +{ + acpigen_write_method("\_SB.MINI", 0); + acpigen_emit_namestring("\_SB.BKEN"); + acpigen_pop_len(); +} + +static void mainboard_write_mwak(void) +{ + acpigen_write_method("\_SB.MWAK", 0); + acpigen_emit_namestring("\_SB.BKEN"); + acpigen_pop_len(); +} + +static void mainboard_write_mpts(void) +{ + acpigen_write_method("\_SB.MPTS", 0); + acpigen_emit_namestring("\_SB.BKDS"); + acpigen_pop_len(); +} + +static void mainboard_fill_ssdt(const struct device *dev) +{ + mainboard_write_blken(); + mainboard_write_blkdis(); + mainboard_write_mini(); + mainboard_write_mpts(); + mainboard_write_mwak(); +} + /************************************************* * Dedicated mainboard function *************************************************/ @@ -186,6 +231,8 @@ pirq_setup();
dev->ops->acpi_inject_dsdt = chromeos_dsdt_generator; + dev->ops->acpi_fill_ssdt = mainboard_fill_ssdt; + }
static void mainboard_final(void *chip_info)