Skip to content

Commit

Permalink
imx: cortexa7: support camera on TechNexion PICO-PI-IMX7D
Browse files Browse the repository at this point in the history
Enable device packages required for camera support and add relevant device
tree nodes.

Signed-off-by: Lech Perczak <[email protected]>
  • Loading branch information
Leo-PL committed Dec 17, 2023
1 parent b9e3c5a commit 81fea07
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/linux/imx/image/cortexa7.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ define Device/technexion_imx7d-pico-pi
DEVICE_PACKAGES := kmod-sound-core kmod-sound-soc-imx kmod-sound-soc-imx-sgtl5000 \
kmod-can kmod-can-flexcan kmod-can-raw kmod-leds-gpio \
kmod-input-touchscreen-edt-ft5x06 kmod-usb-hid kmod-btsdio \
kmod-brcmfmac brcmfmac-firmware-4339-sdio cypress-nvram-4339-sdio
kmod-brcmfmac brcmfmac-firmware-4339-sdio cypress-nvram-4339-sdio \
kmod-video-imx7-csi kmod-video-mux kmod-video-pxp kmod-video-ov5645
FILESYSTEMS := squashfs
IMAGES := combined.bin sysupgrade.bin
IMAGE/combined.bin := append-rootfs | pad-extra 128k | imx-sdcard-raw-uboot
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
From 025161ad967211a2077cbb3a1540cf7c4acbcccf Mon Sep 17 00:00:00 2001
From: Lech Perczak <[email protected]>
Date: Wed, 11 May 2022 21:02:05 +0200
Subject: [PATCH] dts: imx7d-pico-pi: add OV5645 camera support

Signed-off-by: Lech Perczak <[email protected]>
---
arch/arm/boot/dts/imx7d-pico-pi.dts | 58 +++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

--- a/arch/arm/boot/dts/imx7d-pico-pi.dts
+++ b/arch/arm/boot/dts/imx7d-pico-pi.dts
@@ -71,6 +71,33 @@
touchscreen-size-x = <800>;
touchscreen-size-y = <480>;
};
+
+ ov5645_mipi: camera@3c {
+ compatible = "ovti,ov5645";
+ reg = <0x3c>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_mipi_csi>;
+
+ clocks = <&clks IMX7D_CLKO1_ROOT_SRC>;
+ clock-names = "xclk";
+ clock-frequency = <24000000>;
+
+ enable-gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
+
+ vdda-supply = <&reg_2p5v>;
+ vdddo-supply = <&reg_vref_1v8>;
+ vddd-supply = <&reg_vref_1v8>;
+
+ port {
+ ov5645_mipi_ep: endpoint {
+ remote-endpoint = <&mipi_sensor_ep>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
};

&iomuxc {
@@ -101,5 +128,36 @@
MX7D_PAD_EPDC_DATA13__GPIO2_IO13 0x14
>;
};
+};
+
+&iomuxc_lpsr {
+ pinctrl_mipi_csi: mipicsigrp-1 {
+ fsl,pins = <
+ MX7D_PAD_LPSR_GPIO1_IO04__GPIO1_IO4 0x15
+ MX7D_PAD_LPSR_GPIO1_IO05__GPIO1_IO5 0x15
+ MX7D_PAD_LPSR_GPIO1_IO02__CCM_CLKO1 0x7d
+ >;
+ };
+};
+
+&csi {
+ status = "okay";
+};
+
+&mipi_csi {
+ clock-frequency = <24000000>;
+ status = "okay";
+
+ ports {
+ port@0 {
+ mipi_sensor_ep: endpoint1 {
+ remote-endpoint = <&ov5645_mipi_ep>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};

+&video_mux {
+ status = "okay";
};

0 comments on commit 81fea07

Please sign in to comment.