From dcf045918b8584d23e487f70959ebbb2ef4492b6 Mon Sep 17 00:00:00 2001 From: Sugnan Prabhu S Date: Fri, 3 Dec 2021 19:07:04 +0530 Subject: drivers/intel/mipi_camera: Add ACPI entry to provide silicon type info Add entry in ACPI table under IPU device to provide silicon type information to IPU driver. IPU kernel driver can decide the type of firmware to load based on this information. BUG=b:207721978 BRANCH=none TEST=Check for the ACPI entry in the SSDT after booting to kernel Change-Id: I4e0af1dd50b9c014cae5454fcd4f9f76d0e0a85f Cq-Depend: chromium:3319905 Signed-off-by: Sugnan Prabhu S Reviewed-on: https://review.coreboot.org/c/coreboot/+/59869 Tested-by: build bot (Jenkins) Reviewed-by: Sridhar Siricilla Reviewed-by: Tim Wawrzynczak --- src/drivers/intel/mipi_camera/camera.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/drivers') diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index a9af25cf12..ec7f20bf8d 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -5,7 +5,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -134,6 +136,14 @@ static void camera_fill_cio2(const struct device *dev) snprintf(name, sizeof(name), "port%u", i); port_name[i] = strdup(name); + if (CONFIG(ACPI_ADL_IPU_ES_SUPPORT)) { + u32 cpu_id = cpu_get_cpuid(); + if (cpu_id == CPUID_ALDERLAKE_A0 || cpu_id == CPUID_ALDERLAKE_A1) + acpi_dp_add_integer(dsd, "is_es", 1); + else + acpi_dp_add_integer(dsd, "is_es", 0); + } + acpi_dp_add_child(dsd, port_name[i], port_table); } -- cgit v1.2.3