Set the camera I2C to 100kHz, re-enable mode check

- Configure the device tree to give us a 100kHz clock rate on the
camera's I2C bus, to match the Enterprise behavior. This fixes
autofocus, as well.
- At 100kHz I2C speeds, the unconditional mode switch seems to be no
longer required on every stream start, so re-add it.

Change-Id: I7568a11a7b180cc82b959ecaa3b9f3073a078997
diff --git a/arch/arm64/boot/dts/mediatek/mt8167-coral.dts b/arch/arm64/boot/dts/mediatek/mt8167-coral.dts
index 31d27ec..c87f9ec 100644
--- a/arch/arm64/boot/dts/mediatek/mt8167-coral.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8167-coral.dts
@@ -553,7 +553,8 @@
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0_pins_a>;
-	clock-div = <2>;
+	clock-div = <1>;
+	clock-frequency = <100000>;
 
 	ov5645: ov5645@3c {
 		compatible = "ovti,ov5645_mipi";
diff --git a/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c b/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
index 497fd28..d771fc26 100644
--- a/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
+++ b/drivers/media/platform/mxc/capture/ov5645_mipi_v2.c
@@ -3152,8 +3152,11 @@
 		}
 
 		orig_mode = ov5645_data.loaded_mode;
-		ret = ov5645_init_mode(frame_rate,
-				ov5645_data.streamcap.capturemode, orig_mode);
+		if ((orig_mode != ov5645_data.streamcap.capturemode) ||
+			(frame_rate != ov5645_data.loaded_fps)) {
+			ret = ov5645_init_mode(frame_rate,
+					ov5645_data.streamcap.capturemode, orig_mode);
+		}
 		if (ret < 0)
 			return ret;