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 <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
This commit is contained in:
Matt DeVillier 2025-11-23 16:57:31 -08:00
commit 866b79c9fe
2 changed files with 5 additions and 10 deletions

View file

@ -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)

View file

@ -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 */