Re: [PATCH v1 1/1] arm64: dts: imx8mm-var-dart-sonata: Add OV5640 camera support
From: Frank Li
Date: Thu Oct 15 2026 - 14:34:12 EST
On Thu, Oct 15, 2026 at 06:23:01PM +0200, Stefano Radaelli wrote:
> From: Stefano Radaelli <stefano.r@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxx>
> ---
> .../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 = <®_camera_2v8>;
> + DOVDD-supply = <®_camera_1v8>;
> + DVDD-supply = <®_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
>
>