[PATCH v10 09/15] media: intel: ipu-bridge: select OV2740 frequency by IPU ID
From: Maurizio Casciano via B4 Relay
Date: Fri Oct 02 2026 - 05:01:29 EST
From: Maurizio Casciano <mauriziocasciano7@xxxxxxxxx>
The OV2740 connected to the Cherry Trail AtomISP uses a 288 MHz link,
while the generic OVTI2740 configuration uses 360 MHz.
Use the bridge's existing PCI-device matching mechanism to add a
Cherry Trail-specific OVTI2740 entry before the generic fallback. This
keeps the platform distinction in the bridge and avoids adding a second
per-sensor link-frequency override path.
Suggested-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Signed-off-by: Maurizio Casciano <mauriziocasciano7@xxxxxxxxx>
Assisted-by: LLM
---
drivers/media/pci/intel/ipu-bridge.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
index 62852fe1a406..1a133194cbc0 100644
--- a/drivers/media/pci/intel/ipu-bridge.c
+++ b/drivers/media/pci/intel/ipu-bridge.c
@@ -21,6 +21,8 @@
#define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev))
+#define PCI_DEVICE_ID_INTEL_ATOMISP_CHT 0x22b8
+
/*
* 92335fcf-3203-4472-af93-7b4453ac29da
*
@@ -58,6 +60,11 @@ static const u16 ipu6_ov5693_ncont_clk[] = {
0
};
+static const u16 atomisp_cht_pci_ids[] = {
+ PCI_DEVICE_ID_INTEL_ATOMISP_CHT,
+ 0
+};
+
static const struct ipu_sensor_config ipu_supported_sensors[] = {
/* Himax HM1092 */
IPU_SENSOR_CONFIG("HIMX1092", 2, 180000000, 180480000),
@@ -112,6 +119,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = {
/* Omnivision OV2680 */
IPU_SENSOR_CONFIG("OVTI2680", 1, 331200000),
/* Omnivision OV2740 */
+ IPU_SENSOR_CONFIG_MATCH_FL("OVTI2740", atomisp_cht_pci_ids, 0,
+ 1, 288000000),
IPU_SENSOR_CONFIG("OVTI2740", 1, 360000000),
/* Omnivision OV5675 */
IPU_SENSOR_CONFIG("OVTI5675", 1, 450000000),
--
2.53.0