mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Leonardo Costa <leoreis.costa@gmail.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	Frank.Li@nxp.com, s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, francesco.dolcini@toradex.com,
	leonardo.costa@toradex.com, hvilleneuve@dimonoff.com,
	marex@nabladev.com, stefano.r@variscite.com,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] ARM: dts: imx6q-apalis: Add Toradex OV5640 CSI Cameras
Date: Thu, 1 Oct 2026 11:21:35 -0500	[thread overview]
Message-ID: <ar6Ij7KJEPbIa2uT@SMW015318> (raw)
In-Reply-To: <20261001155412.3177428-8-leoreis.costa@gmail.com>

On Thu, Oct 01, 2026 at 12:52:57PM -0300, Leonardo Costa wrote:
> From: Leonardo Costa <leonardo.costa@toradex.com>
>
> Add device tree overlays for the Toradex OV5640 CSI Camera on Apalis
> iMX6 CSI.
>
> The default overlay describes the current CSI Camera Set 5MP OV5640 with
> a 27 MHz on-board oscillator. Add a separate 24 MHz overlay for the
> legacy camera module.
>
> Remove the ov5640_mipi node from the Apalis iMX6 dtsi, as it is an
> external component that does not exist at the SoM level. The camera
> modules have their own on-board oscillator, so the sensor xclk is now
> described as a fixed clock instead of the SoC CLKO2 output.
>
> The overlay is also combined with the Apalis iMX6 V1.2 Ixora Carrier
> Board V1.2 device tree to provide a ready-to-use DTB.
>
> Link: https://www.toradex.com/accessories/csi-camera-ov5640
> Link: https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam/
> Link: https://developer.toradex.com/hardware/legacy-products/other/csi-camera-module-5mp-ov5640/
> Signed-off-by: Leonardo Costa <leonardo.costa@toradex.com>
> ---
>  arch/arm/boot/dts/nxp/imx/Makefile            | 12 +++
>  .../nxp/imx/imx6q-apalis-ov5640-24mhz.dtso    | 17 +++++
>  .../boot/dts/nxp/imx/imx6q-apalis-ov5640.dtsi | 68 +++++++++++++++++
>  .../boot/dts/nxp/imx/imx6q-apalis-ov5640.dtso | 18 +++++

Please use nexus connector to share one ov5460 for all boards.

https://lore.kernel.org/imx/20261001-verdin-imx8mp-hmp-camera-ready-v2-3-7d1343ecd3ec@toradex.com/

Frank

>  arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi | 73 -------------------
>  5 files changed, 115 insertions(+), 73 deletions(-)
>  create mode 100644 arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640-24mhz.dtso
>  create mode 100644 arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtsi
>  create mode 100644 arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtso
>
> diff --git a/arch/arm/boot/dts/nxp/imx/Makefile b/arch/arm/boot/dts/nxp/imx/Makefile
> index cb2ad0756e7fe..9bb3bd9756d11 100644
> --- a/arch/arm/boot/dts/nxp/imx/Makefile
> +++ b/arch/arm/boot/dts/nxp/imx/Makefile
> @@ -103,6 +103,14 @@ imx6q-apalis-v1.2-ixora-v1.2-hdmi-dtbs := \
>  	imx6q-apalis-v1.2-ixora-v1.2.dtb \
>  	imx6q-apalis-hdmi.dtbo
>
> +imx6q-apalis-v1.2-ixora-v1.2-ov5640-dtbs := \
> +	imx6q-apalis-v1.2-ixora-v1.2.dtb \
> +	imx6q-apalis-ov5640.dtbo
> +
> +imx6q-apalis-v1.2-ixora-v1.2-ov5640-24mhz-dtbs := \
> +	imx6q-apalis-v1.2-ixora-v1.2.dtb \
> +	imx6q-apalis-ov5640-24mhz.dtbo
> +
>  imx6q-apalis-v1.2-ixora-v1.2-panel-cap-touch-10inch-lvds-dtbs := \
>  	imx6q-apalis-v1.2-ixora-v1.2.dtb \
>  	imx6q-apalis-panel-cap-touch-10inch-lvds.dtbo
> @@ -250,6 +258,8 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
>  	imx6q-apalis-ixora-v1.1-hdmi.dtb \
>  	imx6q-apalis-ixora-v1.2.dtb \
>  	imx6q-apalis-ixora-v1.2-hdmi.dtb \
> +	imx6q-apalis-ov5640.dtbo \
> +	imx6q-apalis-ov5640-24mhz.dtbo \
>  	imx6q-apalis-panel-cap-touch-10inch-lvds.dtbo \
>  	imx6q-apalis-panel-cap-touch-7inch-parallel.dtbo \
>  	imx6q-apalis-panel-res-touch-7inch-parallel.dtbo \
> @@ -264,6 +274,8 @@ dtb-$(CONFIG_SOC_IMX6Q) += \
>  	imx6q-apalis-v1.2-ixora-v1.1-hdmi.dtb \
>  	imx6q-apalis-v1.2-ixora-v1.2.dtb \
>  	imx6q-apalis-v1.2-ixora-v1.2-hdmi.dtb \
> +	imx6q-apalis-v1.2-ixora-v1.2-ov5640.dtb \
> +	imx6q-apalis-v1.2-ixora-v1.2-ov5640-24mhz.dtb \
>  	imx6q-apalis-v1.2-ixora-v1.2-panel-cap-touch-10inch-lvds.dtb \
>  	imx6q-apalis-v1.2-ixora-v1.2-panel-cap-touch-7inch-parallel.dtb \
>  	imx6q-apalis-v1.2-ixora-v1.2-panel-res-touch-7inch-parallel.dtb \
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640-24mhz.dtso b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640-24mhz.dtso
> new file mode 100644
> index 0000000000000..3e4bbb11ce203
> --- /dev/null
> +++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640-24mhz.dtso
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +/*
> + * Copyright (c) Toradex
> + *
> + * Legacy Toradex CSI Camera Module 5MP OV5640 on Apalis iMX6 CSI.
> + *
> + * https://developer.toradex.com/hardware/legacy-products/other/csi-camera-module-5mp-ov5640
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include "imx6q-apalis-ov5640.dtsi"
> +
> +&clock_camera {
> +	clock-frequency = <24000000>;
> +};
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtsi b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtsi
> new file mode 100644
> index 0000000000000..302f1ceb6a102
> --- /dev/null
> +++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtsi
> @@ -0,0 +1,68 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +/*
> + * Copyright (c) Toradex
> + *
> + * Common device tree include for Toradex OV5640 CSI camera on Apalis iMX6 CSI.
> + */
> +
> +#include <dt-bindings/gpio/gpio.h>
> +
> +&{/} {
> +	clock_camera: clock-camera {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +	};
> +
> +	regulator_camera: regulator-camera {
> +		compatible = "regulator-fixed";
> +		/* Apalis GPIO4 - CSI Camera Connector pin 24 */
> +		gpio = <&gpio2 7 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +		regulator-name = "V_CSI";
> +		startup-delay-us = <5000>;
> +	};
> +};
> +
> +&i2c3 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
> +	camera@3c {
> +		compatible = "ovti,ov5640";
> +		reg = <0x3c>;
> +		clocks = <&clock_camera>;
> +		clock-names = "xclk";
> +		AVDD-supply = <&regulator_camera>;
> +		DOVDD-supply = <&regulator_camera>;
> +		DVDD-supply = <&regulator_camera>;
> +		/* Apalis GPIO2 - CSI Camera Connector pin 22 */
> +		powerdown-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
> +		/* Apalis GPIO1 - CSI Camera Connector pin 11 */
> +		reset-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
> +
> +		port {
> +			ov5640_to_mipi_csi2: endpoint {
> +				clock-lanes = <0>;
> +				data-lanes = <1 2>;
> +				remote-endpoint = <&imx6q_mipi_csi_in>;
> +			};
> +		};
> +	};
> +};
> +
> +&mipi_csi {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +
> +	status = "okay";
> +
> +	port@0 {
> +		reg = <0>;
> +
> +		imx6q_mipi_csi_in: endpoint {
> +			clock-lanes = <0>;
> +			data-lanes = <1 2>;
> +			remote-endpoint = <&ov5640_to_mipi_csi2>;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtso b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtso
> new file mode 100644
> index 0000000000000..9cf7587c263bf
> --- /dev/null
> +++ b/arch/arm/boot/dts/nxp/imx/imx6q-apalis-ov5640.dtso
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +/*
> + * Copyright (c) Toradex
> + *
> + * Toradex CSI Camera Set 5MP OV5640 on Apalis iMX6 CSI.
> + *
> + * https://developer.toradex.com/hardware/accessories/cameras/csi-camera-module-5mp-ov5640-arducam
> + * https://www.toradex.com/accessories/csi-camera-ov5640
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +#include "imx6q-apalis-ov5640.dtsi"
> +
> +&clock_camera {
> +	clock-frequency = <27000000>;
> +};
> diff --git a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
> index e52b55a386f7a..ce160fad5ee06 100644
> --- a/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
> +++ b/arch/arm/boot/dts/nxp/imx/imx6qdl-apalis.dtsi
> @@ -36,12 +36,6 @@ backlight: backlight {
>  		status = "disabled";
>  	};
>
> -	clk_ov5640_osc: clk-ov5640-osc {
> -		compatible = "fixed-clock";
> -		#clock-cells = <0>;
> -		clock-frequency = <24000000>;
> -	};
> -
>  	gpio-keys {
>  		compatible = "gpio-keys";
>  		pinctrl-names = "default";
> @@ -116,26 +110,6 @@ reg_module_3v3_audio: regulator-module-3v3-audio {
>  		regulator-name = "+V3.3_AUDIO";
>  	};
>
> -	reg_ov5640_1v8_d_o_vdd: regulator-ov5640-1v8-d-o-vdd {
> -		compatible = "regulator-fixed";
> -		regulator-always-on;
> -		regulator-max-microvolt = <1800000>;
> -		regulator-min-microvolt = <1800000>;
> -		regulator-name = "DOVDD/DVDD_1.8V";
> -		/* Note: The CSI module uses on-board 3.3V_SW supply */
> -		vin-supply = <&reg_module_3v3>;
> -	};
> -
> -	reg_ov5640_2v8_a_vdd: regulator-ov5640-2v8-a-vdd {
> -		compatible = "regulator-fixed";
> -		regulator-always-on;
> -		regulator-max-microvolt = <2800000>;
> -		regulator-min-microvolt = <2800000>;
> -		regulator-name = "AVDD/AFVDD_2.8V";
> -		/* Note: The CSI module uses on-board 3.3V_SW supply */
> -		vin-supply = <&reg_module_3v3>;
> -	};
> -
>  	reg_usb_otg_vbus: regulator-usb-otg-vbus {
>  		compatible = "regulator-fixed";
>  		enable-active-high;
> @@ -690,30 +664,6 @@ adv7280_to_ipu1_csi0_mux: endpoint {
>  			};
>  		};
>  	};
> -
> -	ov5640_csi_cam: ov5640_mipi@3c {
> -		compatible = "ovti,ov5640";
> -		AVDD-supply = <&reg_ov5640_2v8_a_vdd>;
> -		DOVDD-supply = <&reg_ov5640_1v8_d_o_vdd>;
> -		DVDD-supply = <&reg_ov5640_1v8_d_o_vdd>;
> -		clock-names = "xclk";
> -		clocks = <&clks IMX6QDL_CLK_CKO2>;
> -		pinctrl-names = "default";
> -		pinctrl-0 = <&pinctrl_cam_mclk>;
> -		/* These GPIOs are muxed with the iomuxc node */
> -		powerdown-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
> -		reg = <0x3c>;
> -		reset-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
> -		status = "disabled";
> -
> -		port {
> -			ov5640_to_mipi_csi2: endpoint {
> -				clock-lanes = <0>;
> -				data-lanes = <1 2>;
> -				remote-endpoint = <&mipi_csi_from_ov5640>;
> -			};
> -		};
> -	};
>  };
>
>  &ipu1_di1_disp1 {
> @@ -743,22 +693,6 @@ lvds1_out: endpoint {
>  	};
>  };
>
> -&mipi_csi {
> -	#address-cells = <1>;
> -	#size-cells = <0>;
> -	status = "disabled";
> -
> -	port@0 {
> -		reg = <0>;
> -
> -		mipi_csi_from_ov5640: endpoint {
> -			clock-lanes = <0>;
> -			data-lanes = <1 2>;
> -			remote-endpoint = <&ov5640_to_mipi_csi2>;
> -		};
> -	};
> -};
> -
>  &pwm1 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_pwm1>;
> @@ -933,13 +867,6 @@ MX6QDL_PAD_DISP0_DAT23__AUD4_RXD	0x130b0
>  		>;
>  	};
>
> -	pinctrl_cam_mclk: cammclkgrp {
> -		fsl,pins = <
> -			/* CAM sys_mclk */
> -			MX6QDL_PAD_NANDF_CS2__CCM_CLKO2 0x00b0
> -		>;
> -	};
> -
>  	pinctrl_ecspi1: ecspi1grp {
>  		fsl,pins = <
>  			MX6QDL_PAD_CSI0_DAT6__ECSPI1_MISO 0x100b1
>

      reply	other threads:[~2026-10-01 16:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 15:52 [PATCH 0/7] ARM: dts: Add Apalis iMX6 overlays Leonardo Costa
2026-10-01 15:52 ` [PATCH 1/7] ARM: dts: imx6q-apalis: Add HDMI Overlay Leonardo Costa
2026-10-01 16:11   ` Frank Li
2026-10-01 15:52 ` [PATCH 2/7] ARM: dts: imx6q-apalis-ixora: Add 3.3V_SW power regulator Leonardo Costa
2026-10-01 15:52 ` [PATCH 3/7] ARM: dts: imx6q-apalis: Add Toradex Capacitive Touch Display 10.1" LVDS Leonardo Costa
2026-10-01 16:26   ` Frank Li
2026-10-01 15:52 ` [PATCH 4/7] ARM: dts: imx6q-apalis: Add Toradex Capacitive Touch Display 7" Parallel Leonardo Costa
2026-10-01 15:52 ` [PATCH 5/7] ARM: dts: imx6q-apalis: Add Toradex Resistive " Leonardo Costa
2026-10-01 16:19   ` Frank Li
2026-10-01 15:52 ` [PATCH 6/7] ARM: dts: imx6q-apalis: Add NAU8822 Bridge Tied Load Leonardo Costa
2026-10-01 15:52 ` [PATCH 7/7] ARM: dts: imx6q-apalis: Add Toradex OV5640 CSI Cameras Leonardo Costa
2026-10-01 16:21   ` Frank Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ar6Ij7KJEPbIa2uT@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=hvilleneuve@dimonoff.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=leonardo.costa@toradex.com \
    --cc=leoreis.costa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@nabladev.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stefano.r@variscite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®