From 866b79c9fe303db2e67d84bb85159b02df58bc05 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 23 Nov 2025 16:57:31 -0800 Subject: [PATCH] drivers/intel/mipi_camera: Always generate PLD for camera sensors Remove the use_pld and disable_pld_defaults flags and always generate the Physical Location Descriptor (PLD) for camera sensor devices. PLD is required for proper camera enumeration and identification in modern ACPI implementations, so making it optional was incorrect. Changes: - Remove use_pld field: PLD generation is now always enabled - Remove disable_pld_defaults field: PLD defaults are always applied - Always call apply_pld_defaults() and acpigen_write_pld() TEST=tested with rest of patch train Change-Id: Ifd408f32a4feaf9728913dd150d1cb3e7b1c3c60 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90193 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes --- src/drivers/intel/mipi_camera/camera.c | 12 ++++-------- src/drivers/intel/mipi_camera/chip.h | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c index 24a424dba5..1f347e7d88 100644 --- a/src/drivers/intel/mipi_camera/camera.c +++ b/src/drivers/intel/mipi_camera/camera.c @@ -169,15 +169,14 @@ static void apply_pld_defaults(struct drivers_intel_mipi_camera_config *config) /* * PLD_PANEL_TOP has a value of zero, so the following will change any instance of - * PLD_PANEL_TOP to PLD_PANEL_FRONT unless disable_pld_defaults is set. + * PLD_PANEL_TOP to PLD_PANEL_FRONT. */ if (!config->pld.panel) config->pld.panel = PLD_PANEL_FRONT; /* * PLD_HORIZONTAL_POSITION_LEFT has a value of zero, so the following will change any - * instance of that value to PLD_HORIZONTAL_POSITION_CENTER unless disable_pld_defaults - * is set. + * instance of that value to PLD_HORIZONTAL_POSITION_CENTER. */ if (!config->pld.horizontal_position) config->pld.horizontal_position = PLD_HORIZONTAL_POSITION_CENTER; @@ -193,12 +192,9 @@ static void camera_generate_pld(const struct device *dev) { struct drivers_intel_mipi_camera_config *config = dev->chip_info; - if (config->use_pld) { - if (!config->disable_pld_defaults) - apply_pld_defaults(config); + apply_pld_defaults(config); - acpigen_write_pld(&config->pld); - } + acpigen_write_pld(&config->pld); } static uint32_t address_for_dev_type(const struct device *dev, uint8_t dev_type) diff --git a/src/drivers/intel/mipi_camera/chip.h b/src/drivers/intel/mipi_camera/chip.h index 84b7d0431e..85d3ba7188 100644 --- a/src/drivers/intel/mipi_camera/chip.h +++ b/src/drivers/intel/mipi_camera/chip.h @@ -150,8 +150,7 @@ struct drivers_intel_mipi_camera_config { const char *sensor_name; /* default "UNKNOWN" */ const char *remote_name; /* default "\_SB.PCI0.CIO2" */ const char *vcm_name; /* defaults to |vcm_address| device */ - bool use_pld; - bool disable_pld_defaults; + struct acpi_pld pld; uint16_t rom_address; /* I2C to use if ssdb.rom_type != 0 */ uint16_t vcm_address; /* I2C to use if ssdb.vcm_type != 0 */