From: Adam Ford <aford173@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: tharvey@gateworks.com, frieder.schrempf@kontron.de,
linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
aford@beaconembedded.com, cstevens@beaconembedded.com,
jagan@amarulasolutions.com, Adam Ford <aford173@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Lucas Stach <l.stach@pengutronix.de>, Peng Fan <peng.fan@nxp.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH V2 4/5] arm64: dts: imx8mm-beacon: Enable OV5640 Camera
Date: Sat, 6 Nov 2021 10:54:26 -0500 [thread overview]
Message-ID: <20211106155427.753197-4-aford173@gmail.com> (raw)
In-Reply-To: <20211106155427.753197-1-aford173@gmail.com>
The baseboard has support for a TDNext 5640 Camera which
uses an OV5640 connected to a 2-lane CSI2 interface.
With the CSI and mipi_csi2 drivers pointing to an OV5640 camera, the media
pipeline can be configured with the following:
media-ctl --links "'ov5640 1-003c':0->'imx7-mipi-csis.0':0[1]"
The camera and various nodes in the pipeline can be configured for UYVY:
media-ctl -v -V "'ov5640 1-003c':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -v -V "'csi':0 [fmt:UYVY8_1X16/640x480 field:none]"
Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2: No change
.../freescale/imx8mm-beacon-baseboard.dtsi | 58 +++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi
index 6f5e63696ec0..0fb95f4a5e78 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi
@@ -43,6 +43,16 @@ reg_audio: regulator-audio {
enable-active-high;
};
+ reg_camera: regulator-camera {
+ compatible = "regulator-fixed";
+ regulator-name = "mipi_pwr";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ startup-delay-us = <100000>;
+ };
+
reg_usdhc2_vmmc: regulator-usdhc2 {
compatible = "regulator-fixed";
regulator-name = "VSD_3V3";
@@ -67,6 +77,10 @@ sound {
};
};
+&csi {
+ status = "okay";
+};
+
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_espi2>;
@@ -90,6 +104,30 @@ &i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c2>;
status = "okay";
+
+ camera@3c {
+ compatible = "ovti,ov5640";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_ov5640>;
+ reg = <0x3c>;
+ clocks = <&clk IMX8MM_CLK_CLKO1>;
+ clock-names = "xclk";
+ assigned-clocks = <&clk IMX8MM_CLK_CLKO1>;
+ assigned-clock-parents = <&clk IMX8MM_CLK_24M>;
+ assigned-clock-rates = <24000000>;
+ AVDD-supply = <®_camera>; /* 2.8v */
+ powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+ port {
+ /* MIPI CSI-2 bus endpoint */
+ ov5640_to_mipi_csi2: endpoint {
+ remote-endpoint = <&imx8mm_mipi_csi_in>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
};
&i2c4 {
@@ -141,6 +179,18 @@ pca6416_1: gpio@21 {
};
};
+&mipi_csi {
+ status = "okay";
+ ports {
+ port@0 {
+ imx8mm_mipi_csi_in: endpoint {
+ remote-endpoint = <&ov5640_to_mipi_csi2>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
@@ -209,6 +259,14 @@ MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x41
>;
};
+ pinctrl_ov5640: ov5640grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19
+ MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19
+ MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59
+ >;
+ };
+
pinctrl_pcal6414: pcal6414-gpiogrp {
fsl,pins = <
MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19
--
2.32.0
next prev parent reply other threads:[~2021-11-06 15:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 15:54 [PATCH V2 1/5] soc: imx: imx8m-blk-ctrl: Fix imx8mm mipi reset Adam Ford
2021-11-06 15:54 ` [PATCH V2 2/5] arm64: dts: imx8mm: Add CSI nodes Adam Ford
2021-11-07 12:58 ` Fabio Estevam
2021-11-06 15:54 ` [PATCH V2 3/5] arm64: defconfig: Enable VIDEO_IMX_MEDIA Adam Ford
2021-11-07 13:01 ` Fabio Estevam
2021-11-06 15:54 ` Adam Ford [this message]
2021-11-07 13:01 ` [PATCH V2 4/5] arm64: dts: imx8mm-beacon: Enable OV5640 Camera Fabio Estevam
2021-11-21 23:18 ` Laurent Pinchart
2021-11-22 3:07 ` Adam Ford
2021-11-23 0:15 ` Laurent Pinchart
2021-11-23 7:38 ` (EXT) " Alexander Stein
2021-11-23 9:47 ` Laurent Pinchart
2021-11-29 18:56 ` Tim Harvey
2021-11-06 15:54 ` [PATCH V2 5/5] arm64: defconfig: Enable OV5640 Adam Ford
2021-11-07 13:03 ` Fabio Estevam
2021-11-07 12:58 ` [PATCH V2 1/5] soc: imx: imx8m-blk-ctrl: Fix imx8mm mipi reset Fabio Estevam
2021-11-08 8:56 ` Lucas Stach
2021-11-12 6:54 ` Jagan Teki
2021-11-19 23:51 ` Tim Harvey
2021-11-20 18:33 ` Adam Ford
2021-11-21 23:13 ` Laurent Pinchart
2021-11-21 22:25 ` Laurent Pinchart
2021-11-21 22:30 ` Laurent Pinchart
2021-11-23 13:59 ` Adam Ford
2021-11-25 5:42 ` Jagan Teki
2021-11-25 15:18 ` Adam Ford
2021-11-26 0:33 ` Laurent Pinchart
2021-11-27 13:50 ` Adam Ford
2021-11-27 15:02 ` Laurent Pinchart
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=20211106155427.753197-4-aford173@gmail.com \
--to=aford173@gmail.com \
--cc=aford@beaconembedded.com \
--cc=catalin.marinas@arm.com \
--cc=cstevens@beaconembedded.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=jagan@amarulasolutions.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=tharvey@gateworks.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).