drivers/intel/mipi_camera: Add compatible field for NVM

Add compatible field for NVM
Make PRP0001 as default HID if device type is INTEL_ACPI_CAMERA_NVM

Signed-off-by: Pandya, Varshit B <varshit.b.pandya@intel.com>
Change-Id: Iad7afa7b3170982eb5d6215e766f3e98f7a89213
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45091
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
This commit is contained in:
Pandya, Varshit B 2020-09-03 20:38:46 +05:30 committed by Patrick Georgi
parent c410542007
commit cd91db953c
2 changed files with 7 additions and 3 deletions

View File

@ -454,6 +454,9 @@ static void camera_fill_nvm(const struct device *dev)
struct drivers_intel_mipi_camera_config *config = dev->chip_info;
struct acpi_dp *dsd = acpi_dp_new_table("_DSD");
if (!config->nvm_compat)
return;
/* It might be possible to default size or width based on type. */
if (!config->disable_nvm_defaults && !config->nvm_pagesize)
config->nvm_pagesize = 1;
@ -473,6 +476,7 @@ static void camera_fill_nvm(const struct device *dev)
if (config->nvm_width)
acpi_dp_add_integer(dsd, "address-width", config->nvm_width);
acpi_dp_add_string(dsd, "compatible", config->nvm_compat);
acpi_dp_write(dsd);
}
@ -822,10 +826,9 @@ static void write_i2c_camera_device(const struct device *dev, const char *scope)
if (config->acpi_hid)
acpigen_write_name_string("_HID", config->acpi_hid);
else if (config->device_type == INTEL_ACPI_CAMERA_VCM)
else if (config->device_type == INTEL_ACPI_CAMERA_VCM ||
config->device_type == INTEL_ACPI_CAMERA_NVM)
acpigen_write_name_string("_HID", ACPI_DT_NAMESPACE_HID);
else if (config->device_type == INTEL_ACPI_CAMERA_NVM)
acpigen_write_name_string("_HID", "INT3499");
acpigen_write_name_integer("_UID", config->acpi_uid);
acpigen_write_name_string("_DDN", config->chip_name);

View File

@ -241,6 +241,7 @@ struct drivers_intel_mipi_camera_config {
uint32_t nvm_pagesize;
uint32_t nvm_readonly;
uint32_t nvm_width;
const char *nvm_compat;
/* Settings specific to vcm */
const char *vcm_compat;