Devicetree
 help / color / mirror / Atom feed
* [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
@ 2026-10-15 16:23 Stefano Radaelli
  2026-10-15 18:33 ` Frank Li
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Radaelli @ 2026-10-15 16:23 UTC (permalink / raw)
  To: Frank Li, linux-kernel, devicetree, imx, linux-arm-kernel
  Cc: pierluigi.p, Stefano Radaelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam

From: Stefano Radaelli <stefano.r@variscite.com>

Add support for the OV5640 camera connected to the Sonata carrier
board's first MIPI CSI port.

Describe the sensor on I2C2, its 24 MHz reference clock, fixed supplies,
and reset and power-down signals controlled by the GPIO expander.
Connect the sensor to the MIPI CSI receiver using two data lanes and
enable the receiver and CSI bridge.

Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
---
 .../dts/freescale/imx8mm-var-dart-sonata.dts  | 66 +++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts b/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
index 57d29a5c3821..427a255fe8ec 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
@@ -75,12 +75,39 @@ clk40m: oscillator {
 		clock-output-names = "can_osc";
 	};
 
+	camera_clk: oscillator-cam {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <24000000>;
+	};
+
 	pcie0_refclk: pcie0-refclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <100000000>;
 	};
 
+	reg_camera_1v5: regulator-camera-1v5 {
+		compatible = "regulator-fixed";
+		regulator-name = "CAM_1V5";
+		regulator-min-microvolt = <1500000>;
+		regulator-max-microvolt = <1500000>;
+	};
+
+	reg_camera_1v8: regulator-camera-1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "CAM_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+	};
+
+	reg_camera_2v8: regulator-camera-2v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "CAM_2V8";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+	};
+
 	reg_usdhc2_vmmc: regulator-vmmc-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
@@ -95,6 +122,10 @@ reg_usdhc2_vmmc: regulator-vmmc-usdhc2 {
 	};
 };
 
+&csi {
+	status = "okay";
+};
+
 &ecspi1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_ecspi1>;
@@ -200,6 +231,26 @@ ft5x06_ts: touchscreen@38 {
 		wakeup-source;
 	};
 
+	ov5640_mipi1: camera@3c {
+		compatible = "ovti,ov5640";
+		reg = <0x3c>;
+		clocks = <&camera_clk>;
+		clock-names = "xclk";
+		AVDD-supply = <&reg_camera_2v8>;
+		DOVDD-supply = <&reg_camera_1v8>;
+		DVDD-supply = <&reg_camera_1v5>;
+		powerdown-gpios = <&pca6408_1 3 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&pca6408_1 1 GPIO_ACTIVE_LOW>;
+
+		port {
+			ov5640_mipi1_ep: endpoint {
+				remote-endpoint = <&mipi1_sensor_ep>;
+				clock-lanes = <0>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+
 	extcon_ptn5150: typec@3d {
 		compatible = "nxp,ptn5150";
 		reg = <0x3d>;
@@ -263,6 +314,21 @@ st33ktpm2xi2c: tpm@2e {
 	};
 };
 
+&mipi_csi {
+	status = "okay";
+
+	ports {
+		port@0 {
+			reg = <0>;
+
+			mipi1_sensor_ep: endpoint {
+				remote-endpoint = <&ov5640_mipi1_ep>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+};
+
 &pcie_phy {
 	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
 	fsl,tx-deemph-gen1 = <0x2d>;
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
  2026-10-15 16:23 [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support Stefano Radaelli
@ 2026-10-15 18:33 ` Frank Li
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Li @ 2026-10-15 18:33 UTC (permalink / raw)
  To: Stefano Radaelli
  Cc: Frank Li, linux-kernel, devicetree, imx, linux-arm-kernel,
	pierluigi.p, Stefano Radaelli, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam

On Thu, Oct 15, 2026 at 06:23:01PM +0200, Stefano Radaelli wrote:
> From: Stefano Radaelli <stefano.r@variscite.com>
>
> Add support for the OV5640 camera connected to the Sonata carrier
> board's first MIPI CSI port.

Does this board only support ov5640 camera? Suppose ov5640 module also use
for other boards.

Can you refer https://lore.kernel.org/imx/20261011-expulsion-frivolous-690de090cf9d@spud/
to define connectors?

Frank

>
> Describe the sensor on I2C2, its 24 MHz reference clock, fixed supplies,
> and reset and power-down signals controlled by the GPIO expander.
> Connect the sensor to the MIPI CSI receiver using two data lanes and
> enable the receiver and CSI bridge.
>
> Signed-off-by: Stefano Radaelli <stefano.r@variscite.com>
> ---
>  .../dts/freescale/imx8mm-var-dart-sonata.dts  | 66 +++++++++++++++++++
>  1 file changed, 66 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts b/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
> index 57d29a5c3821..427a255fe8ec 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-var-dart-sonata.dts
> @@ -75,12 +75,39 @@ clk40m: oscillator {
>  		clock-output-names = "can_osc";
>  	};
>
> +	camera_clk: oscillator-cam {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <24000000>;
> +	};
> +
>  	pcie0_refclk: pcie0-refclk {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;
>  		clock-frequency = <100000000>;
>  	};
>
> +	reg_camera_1v5: regulator-camera-1v5 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "CAM_1V5";
> +		regulator-min-microvolt = <1500000>;
> +		regulator-max-microvolt = <1500000>;
> +	};
> +
> +	reg_camera_1v8: regulator-camera-1v8 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "CAM_1V8";
> +		regulator-min-microvolt = <1800000>;
> +		regulator-max-microvolt = <1800000>;
> +	};
> +
> +	reg_camera_2v8: regulator-camera-2v8 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "CAM_2V8";
> +		regulator-min-microvolt = <2800000>;
> +		regulator-max-microvolt = <2800000>;
> +	};
> +
>  	reg_usdhc2_vmmc: regulator-vmmc-usdhc2 {
>  		compatible = "regulator-fixed";
>  		pinctrl-names = "default";
> @@ -95,6 +122,10 @@ reg_usdhc2_vmmc: regulator-vmmc-usdhc2 {
>  	};
>  };
>
> +&csi {
> +	status = "okay";
> +};
> +
>  &ecspi1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_ecspi1>;
> @@ -200,6 +231,26 @@ ft5x06_ts: touchscreen@38 {
>  		wakeup-source;
>  	};
>
> +	ov5640_mipi1: camera@3c {
> +		compatible = "ovti,ov5640";
> +		reg = <0x3c>;
> +		clocks = <&camera_clk>;
> +		clock-names = "xclk";
> +		AVDD-supply = <&reg_camera_2v8>;
> +		DOVDD-supply = <&reg_camera_1v8>;
> +		DVDD-supply = <&reg_camera_1v5>;
> +		powerdown-gpios = <&pca6408_1 3 GPIO_ACTIVE_HIGH>;
> +		reset-gpios = <&pca6408_1 1 GPIO_ACTIVE_LOW>;
> +
> +		port {
> +			ov5640_mipi1_ep: endpoint {
> +				remote-endpoint = <&mipi1_sensor_ep>;
> +				clock-lanes = <0>;
> +				data-lanes = <1 2>;
> +			};
> +		};
> +	};
> +
>  	extcon_ptn5150: typec@3d {
>  		compatible = "nxp,ptn5150";
>  		reg = <0x3d>;
> @@ -263,6 +314,21 @@ st33ktpm2xi2c: tpm@2e {
>  	};
>  };
>
> +&mipi_csi {
> +	status = "okay";
> +
> +	ports {
> +		port@0 {
> +			reg = <0>;
> +
> +			mipi1_sensor_ep: endpoint {
> +				remote-endpoint = <&ov5640_mipi1_ep>;
> +				data-lanes = <1 2>;
> +			};
> +		};
> +	};
> +};
> +
>  &pcie_phy {
>  	fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>;
>  	fsl,tx-deemph-gen1 = <0x2d>;
> --
> 2.47.3
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-15 18:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 16:23 [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support Stefano Radaelli
2026-10-15 18:33 ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox