drivers/generic/max98357a: Allow custom _HID from config
Add HID field in max98357a_config and allow mainboards to set it. Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Change-Id: I22d2d078a9a4eb6ab330da8439737ff5133086d4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39286 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
12b835050f
commit
a1c82c5ebe
|
@ -14,6 +14,10 @@
|
|||
#include <arch/acpi_device.h>
|
||||
|
||||
struct drivers_generic_max98357a_config {
|
||||
|
||||
/* ACPI _HID */
|
||||
const char *hid;
|
||||
|
||||
/* SDMODE GPIO */
|
||||
struct acpi_gpio sdmode_gpio;
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#if CONFIG(HAVE_ACPI_TABLES)
|
||||
|
||||
#define MAX98357A_ACPI_NAME "MAXM"
|
||||
#define MAX98357A_ACPI_HID "MX98357A"
|
||||
|
||||
static void max98357a_fill_ssdt(struct device *dev)
|
||||
{
|
||||
|
@ -42,7 +41,13 @@ static void max98357a_fill_ssdt(struct device *dev)
|
|||
/* Device */
|
||||
acpigen_write_scope(scope);
|
||||
acpigen_write_device(name);
|
||||
acpigen_write_name_string("_HID", MAX98357A_ACPI_HID);
|
||||
|
||||
if (!config->hid) {
|
||||
printk(BIOS_ERR, "%s: ERROR: _HID required\n", dev_path(dev));
|
||||
return;
|
||||
}
|
||||
|
||||
acpigen_write_name_string("_HID", config->hid);
|
||||
acpigen_write_name_integer("_UID", 0);
|
||||
acpigen_write_name_string("_DDN", dev->chip_ops->name);
|
||||
acpigen_write_STA(acpi_device_status(dev));
|
||||
|
|
|
@ -58,6 +58,7 @@ chip soc/intel/skylake
|
|||
end # USB xHCI
|
||||
device pci 19.1 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A23)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -269,6 +269,7 @@ chip soc/intel/skylake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -284,6 +284,7 @@ chip soc/intel/skylake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -267,6 +267,7 @@ chip soc/intel/skylake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_B2)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -290,6 +290,7 @@ chip soc/intel/skylake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)"
|
||||
register "device_present_gpio" = "GPP_E3"
|
||||
register "device_present_gpio_invert" = "1"
|
||||
|
|
|
@ -236,6 +236,7 @@ chip soc/intel/cannonlake
|
|||
device pci 1e.3 off end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -170,6 +170,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -178,6 +178,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -207,6 +207,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -178,6 +178,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -199,6 +199,7 @@ chip soc/intel/cannonlake
|
|||
device pci 1e.3 off end # GSPI #1 unused
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -261,6 +261,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -193,6 +193,7 @@ chip soc/intel/cannonlake
|
|||
end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -255,6 +255,7 @@ chip soc/intel/cannonlake
|
|||
device pci 1e.3 off end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -183,6 +183,7 @@ chip soc/intel/cannonlake
|
|||
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -212,6 +212,7 @@ chip soc/intel/cannonlake
|
|||
device pci 1e.3 off end # GSPI #1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H3)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -118,6 +118,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -119,6 +119,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -118,6 +118,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -118,6 +118,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -121,6 +121,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -121,6 +121,7 @@ chip soc/amd/stoneyridge
|
|||
device i2c 1a on end
|
||||
end
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_119)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0.1 on end
|
||||
|
|
|
@ -122,6 +122,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_91)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -401,6 +401,7 @@ chip soc/intel/skylake
|
|||
end # I2C #2
|
||||
device pci 15.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A23)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -365,6 +365,7 @@ chip soc/intel/skylake
|
|||
device pci 19.0 on end # UART #2
|
||||
device pci 19.1 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A23)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -131,6 +131,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -131,6 +131,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -140,6 +140,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -127,6 +127,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -136,6 +136,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_76)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -363,6 +363,7 @@ chip soc/intel/tigerlake
|
|||
device pci 1f.2 on end # PMC 0xA0A1
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A10)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -166,6 +166,7 @@ chip soc/intel/cannonlake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D16)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -112,6 +112,7 @@ chip soc/intel/apollolake
|
|||
device pci 0d.3 on end # - Shared SRAM
|
||||
device pci 0e.0 on # - Audio
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_160)"
|
||||
register "sdmode_delay" = "5"
|
||||
device generic 0 on end
|
||||
|
|
|
@ -289,6 +289,7 @@ chip soc/intel/skylake
|
|||
device pci 1f.2 on end # Power Management Controller
|
||||
device pci 1f.3 on
|
||||
chip drivers/generic/max98357a
|
||||
register "hid" = ""MX98357A""
|
||||
register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E3)"
|
||||
register "device_present_gpio" = "GPP_E3"
|
||||
register "device_present_gpio_invert" = "1"
|
||||
|
|
Loading…
Reference in New Issue