All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support
@ 2023-07-15 23:02 Fabio Estevam
  2023-07-15 23:02 ` [PATCH 2/2] arm64: dts: imx8mn-evk: Add camera support Fabio Estevam
  2023-07-19  7:05 ` [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2023-07-15 23:02 UTC (permalink / raw)
  To: shawnguo; +Cc: linux-arm-kernel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

imx8mn-evk has a MIPI DSI port that can be used with a ADV7535 MIPI
DSI to HDMI bridge.

Add support for it.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
index 1443857bfa5f..c374cb4f6f7b 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
@@ -23,6 +23,18 @@ status {
 		};
 	};
 
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		label = "hdmi";
+		type = "a";
+
+		port {
+			hdmi_connector_in: endpoint {
+				remote-endpoint = <&adv7533_out>;
+			};
+		};
+	};
+
 	memory@40000000 {
 		device_type = "memory";
 		reg = <0x0 0x40000000 0 0x80000000>;
@@ -167,6 +179,41 @@ &i2c2 {
 	sda-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
 	status = "okay";
 
+	hdmi@3d {
+		compatible = "adi,adv7535";
+		reg = <0x3d>, <0x3c>, <0x3e>, <0x3f>;
+		reg-names = "main", "cec", "edid", "packet";
+		adi,dsi-lanes = <4>;
+
+		adi,input-depth = <8>;
+		adi,input-colorspace = "rgb";
+		adi,input-clock = "1x";
+		adi,input-style = <1>;
+		adi,input-justification = "evenly";
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				adv7533_in: endpoint {
+					remote-endpoint = <&dsi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				adv7533_out: endpoint {
+					remote-endpoint = <&hdmi_connector_in>;
+				};
+			};
+
+		};
+	};
+
 	ptn5110: tcpc@50 {
 		compatible = "nxp,ptn5110";
 		pinctrl-names = "default";
@@ -214,6 +261,26 @@ pca6416: gpio@20 {
 	};
 };
 
+&lcdif {
+	status = "okay";
+};
+
+&mipi_dsi {
+	samsung,esc-clock-frequency = <10000000>;
+	status = "okay";
+
+	ports {
+		port@1 {
+			reg = <1>;
+
+			dsi_out: endpoint {
+				remote-endpoint = <&adv7533_in>;
+				data-lanes = <1 2 3 4>;
+			};
+		};
+	};
+};
+
 &sai2 {
 	#sound-dai-cells = <0>;
 	pinctrl-names = "default";
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] arm64: dts: imx8mn-evk: Add camera support
  2023-07-15 23:02 [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Fabio Estevam
@ 2023-07-15 23:02 ` Fabio Estevam
  2023-07-19  7:05 ` [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2023-07-15 23:02 UTC (permalink / raw)
  To: shawnguo; +Cc: linux-arm-kernel, Fabio Estevam

From: Fabio Estevam <festevam@denx.de>

Add support for the OV5640 camera.

Tested with the following commands:

media-ctl -l "'ov5640 2-003c':0 -> 'csis-32e30000.mipi-csi':0 [1]"
media-ctl -V "'ov5640 2-003c':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'crossbar':0 [fmt:UYVY8_1X16/640x480 field:none]"
media-ctl -V "'mxc_isi.0':0 [fmt:UYVY8_1X16/640x480 field:none]"
v4l2-ctl --device /dev/video0 --set-fmt-video=width=640,height=480,pixelformat=YUYV
v4l2-ctl --stream-mmap -d /dev/video0;
gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! waylandsink

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
index c374cb4f6f7b..d09d0879dfe2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
@@ -259,6 +259,45 @@ pca6416: gpio@20 {
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	camera@3c {
+		compatible = "ovti,ov5640";
+		reg = <0x3c>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_camera>;
+		clocks = <&clk IMX8MN_CLK_CLKO1>;
+		clock-names = "xclk";
+		assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
+		assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
+		assigned-clock-rates = <24000000>;
+		powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+
+		port {
+			ov5640_to_mipi_csi2: endpoint {
+				remote-endpoint = <&imx8mn_mipi_csi_in>;
+				clock-lanes = <0>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
+};
+
+&isi {
+	status = "okay";
+};
+
+&mipi_csi {
+	status = "okay";
+
+	ports {
+		port@0 {
+			imx8mn_mipi_csi_in: endpoint {
+				remote-endpoint = <&ov5640_to_mipi_csi2>;
+				data-lanes = <1 2>;
+			};
+		};
+	};
 };
 
 &lcdif {
@@ -393,6 +432,14 @@ &wdog1 {
 };
 
 &iomuxc {
+	pinctrl_camera: cameragrp {
+		fsl,pins = <
+			MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6		0x19
+			MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7		0x19
+			MX8MN_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1	0x59
+		>;
+	};
+
 	pinctrl_fec1: fec1grp {
 		fsl,pins = <
 			MX8MN_IOMUXC_ENET_MDC_ENET1_MDC		0x3
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support
  2023-07-15 23:02 [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Fabio Estevam
  2023-07-15 23:02 ` [PATCH 2/2] arm64: dts: imx8mn-evk: Add camera support Fabio Estevam
@ 2023-07-19  7:05 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2023-07-19  7:05 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-arm-kernel, Fabio Estevam

On Sat, Jul 15, 2023 at 08:02:08PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> imx8mn-evk has a MIPI DSI port that can be used with a ADV7535 MIPI
> DSI to HDMI bridge.
> 
> Add support for it.
> Signed-off-by: Fabio Estevam <festevam@denx.de>

Applied both, thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-07-19  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-15 23:02 [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Fabio Estevam
2023-07-15 23:02 ` [PATCH 2/2] arm64: dts: imx8mn-evk: Add camera support Fabio Estevam
2023-07-19  7:05 ` [PATCH 1/2] arm64: dts: imx8mn-evk: Add HDMI support Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.