summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorPandya, Varshit B <varshit.b.pandya@intel.com>2020-09-03 20:38:46 +0530
committerPatrick Georgi <pgeorgi@google.com>2020-09-16 07:16:09 +0000
commitcd91db953ca254e0a03640fdc597dae6b616e155 (patch)
tree997da257d6887c11774dcc25494dbe99180750a4 /src/drivers
parentc410542007381ff968ad8af8dca7c369a3c9b938 (diff)
downloadcoreboot-cd91db953ca254e0a03640fdc597dae6b616e155.tar.gz
coreboot-cd91db953ca254e0a03640fdc597dae6b616e155.tar.bz2
coreboot-cd91db953ca254e0a03640fdc597dae6b616e155.zip
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>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/mipi_camera/camera.c9
-rw-r--r--src/drivers/intel/mipi_camera/chip.h1
2 files changed, 7 insertions, 3 deletions
diff --git a/src/drivers/intel/mipi_camera/camera.c b/src/drivers/intel/mipi_camera/camera.c
index 6f237a9ba8d5..fed0ff6cba65 100644
--- a/src/drivers/intel/mipi_camera/camera.c
+++ b/src/drivers/intel/mipi_camera/camera.c
@@ -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);
diff --git a/src/drivers/intel/mipi_camera/chip.h b/src/drivers/intel/mipi_camera/chip.h
index d91e1e749d4f..28f8464ec287 100644
--- a/src/drivers/intel/mipi_camera/chip.h
+++ b/src/drivers/intel/mipi_camera/chip.h
@@ -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;