From d6f30923b2ee0ff97c552578af122e820696347a Mon Sep 17 00:00:00 2001 From: Jamie Ryu Date: Mon, 11 Sep 2023 15:38:46 -0700 Subject: [PATCH] drivers/intel/mipi_camera: Add DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC This adds DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC to provide the option to load pre-production or production signed IPU FW from IPU kernel driver. BUG=None TEST=Build rex and brya to check if the build passes without an error. Change-Id: Ib507bceb6fd85d8ed764df82db400526a10e4d6e Signed-off-by: Jamie Ryu Reviewed-on: https://review.coreboot.org/c/coreboot/+/77854 Reviewed-by: Kapil Porwal Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/drivers/intel/mipi_camera/Kconfig | 6 ++++++ src/drivers/intel/mipi_camera/camera.c | 12 ++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/drivers/intel/mipi_camera/Kconfig b/src/drivers/intel/mipi_camera/Kconfig index d69a61ebb0..ad1a82ba6f 100644 --- a/src/drivers/intel/mipi_camera/Kconfig +++ b/src/drivers/intel/mipi_camera/Kconfig @@ -5,3 +5,9 @@ config DRIVERS_INTEL_MIPI_CAMERA help MIPI CSI I2C camera SSDT generator. Generates SSDB and PWDB structures which are used by the Intel kernel drivers. + +config DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC + def_bool n + help + Use this config to provide information to IPU kernel driver + if pre-production or production signed IPU FW needs to be loaded. diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index ec89971cbd..00c85a7010 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -5,9 +5,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -136,14 +134,8 @@ 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_J0 || cpu_id == CPUID_ALDERLAKE_Q0) - acpi_dp_add_integer(dsd, "is_es", 1); - else - acpi_dp_add_integer(dsd, "is_es", 0); - } - + acpi_dp_add_integer(dsd, "is_es", + CONFIG(DRIVERS_INTEL_MIPI_SUPPORTS_PRE_PRODUCTION_SOC)); acpi_dp_add_child(dsd, port_name[i], port_table); }