mirror of https://lore.kernel.org/lkml/
 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; 5+ 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	[flat|nested] 5+ 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
  2026-10-16 17:03   ` Stefano Radaelli
  0 siblings, 1 reply; 5+ 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] 5+ messages in thread

* Re: [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
  2026-10-15 18:33 ` Frank Li
@ 2026-10-16 17:03   ` Stefano Radaelli
  2026-10-16 20:20     ` Frank Li
  0 siblings, 1 reply; 5+ messages in thread
From: Stefano Radaelli @ 2026-10-16 17:03 UTC (permalink / raw)
  To: Frank Li
  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 01:33:47PM -0500, Frank Li wrote:
> 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
> 

Hi Frank,

Thanks for your feedback! I looked at the Toradex approach you linked.

In our case, the same connector can also accommodate Basler cameras and
potentially other camera modules in the future, while some of our other
carrier boards use different connectors.

Given these differences, I would prefer to keep the classic approach proposed
in this patch, describing the camera directly in the carrier board DTS.
Do you think we should still use connector bindings in our case?
If so, how would you suggest handling these differences?

Thanks,
Best Regards,
Stefano

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

* Re: [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
  2026-10-16 17:03   ` Stefano Radaelli
@ 2026-10-16 20:20     ` Frank Li
  2026-10-19 10:22       ` Stefano Radaelli
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Li @ 2026-10-16 20:20 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 Fri, Oct 16, 2026 at 07:03:36PM +0200, Stefano Radaelli wrote:
> On Thu, Oct 15, 2026 at 01:33:47PM -0500, Frank Li wrote:
> > 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
> >
>
> Hi Frank,
>
> Thanks for your feedback! I looked at the Toradex approach you linked.
>
> In our case, the same connector can also accommodate Basler cameras and
> potentially other camera modules in the future, while some of our other
> carrier boards use different connectors.
>
> Given these differences, I would prefer to keep the classic approach proposed
> in this patch, describing the camera directly in the carrier board DTS.
> Do you think we should still use connector bindings in our case?
> If so, how would you suggest handling these differences?

Need understand whole board familar, basic Two problem:

 	Does carrier board support difference kinds camera?

	Does carrier board or camera module reused for other boards?

Frank

>
> Thanks,
> Best Regards,
> Stefano

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

* Re: [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
  2026-10-16 20:20     ` Frank Li
@ 2026-10-19 10:22       ` Stefano Radaelli
  0 siblings, 0 replies; 5+ messages in thread
From: Stefano Radaelli @ 2026-10-19 10:22 UTC (permalink / raw)
  To: Frank Li
  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 Fri, Oct 16, 2026 at 03:20:51PM -0500, Frank Li wrote:
> On Fri, Oct 16, 2026 at 07:03:36PM +0200, Stefano Radaelli wrote:
> > On Thu, Oct 15, 2026 at 01:33:47PM -0500, Frank Li wrote:
> > > 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
> > >
> >
> > Hi Frank,
> >
> > Thanks for your feedback! I looked at the Toradex approach you linked.
> >
> > In our case, the same connector can also accommodate Basler cameras and
> > potentially other camera modules in the future, while some of our other
> > carrier boards use different connectors.
> >
> > Given these differences, I would prefer to keep the classic approach proposed
> > in this patch, describing the camera directly in the carrier board DTS.
> > Do you think we should still use connector bindings in our case?
> > If so, how would you suggest handling these differences?
> 
> Need understand whole board familar, basic Two problem:
> 
>  	Does carrier board support difference kinds camera?
> 
> 	Does carrier board or camera module reused for other boards?
> 
> Frank
> 

Hi Frank,

Yes to both:

- The carrier board supports different cameras: we currently support
  OV5640 and Basler modules, and support for another camera is planned.
- The OV5640 module can be used on multiple carrier boards that share
  the same camera connector.
  Other carrier boards in our family use a different connector.

Given these combinations, would you consider reasonable keeping the
camera described directly in the carrier board DTS as proposed in this patch?
This would avoid adding complexity across the different configurations.

If you still recommend connector bindings, how would you suggest
structuring them to handle these differences?

Thank you so much for your help,
Best Regards,
Stefano

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

end of thread, other threads:[~2026-10-19 10:22 UTC | newest]

Thread overview: 5+ 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
2026-10-16 17:03   ` Stefano Radaelli
2026-10-16 20:20     ` Frank Li
2026-10-19 10:22       ` Stefano Radaelli

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

all inboxes | Powered by JetHome®