summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Paulo Gonçalves <joao.goncalves@toradex.com>2024-10-09 15:45:14 -0300
committerJoão Paulo Gonçalves <joao.goncalves@toradex.com>2024-10-11 17:34:46 -0300
commitc22b3c070be57e97b57e6f08aa06af210f45ac1f (patch)
tree153a521e043d478eff05191600ef0e37551cd3e2
parent9ce6adb762b8bac7a920229225b707cb79304683 (diff)
verdin-imx8mm: ov5640: add overlay
Add support for the OV5640 camera to the Verdin-iMX8MM. It's worth noting that in the device tree overlay, there is no pinctrl on the regulator node because the GPIO for power enable is already configured in the SOC pinctrl/GPIO controller nodes in the Toradex device tree for the SOM/Carrier Boards. Related-to: ELB-5968 Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
-rw-r--r--overlays/verdin-imx8mm_ov5640_overlay.dts78
1 files changed, 78 insertions, 0 deletions
diff --git a/overlays/verdin-imx8mm_ov5640_overlay.dts b/overlays/verdin-imx8mm_ov5640_overlay.dts
new file mode 100644
index 0000000..755897d
--- /dev/null
+++ b/overlays/verdin-imx8mm_ov5640_overlay.dts
@@ -0,0 +1,78 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright 2024 Toradex
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/imx8mm-clock.h>
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ compatible = "toradex,verdin-imx8mm";
+};
+
+&{/} {
+ regulator_camera: regulator-camera {
+ compatible = "regulator-fixed";
+ /* Verdin GPIO_8_CSI - Camera Connector 24 */
+ gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ regulator-name = "V_CSI";
+ startup-delay-us = <5000>;
+ };
+};
+
+&csi {
+ status = "okay";
+};
+
+/* Verdin I2C_4_CSI */
+&i2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ camera@3c {
+ compatible = "ovti,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 = <&regulator_camera>;
+ DOVDD-supply = <&regulator_camera>;
+ DVDD-supply = <&regulator_camera>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_gpio5>, <&pinctrl_gpio6>;
+ /* Verdin GPIO6 - Camera Connector 22 */
+ powerdown-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+ /* Verdin GPIO5 - Camera Connector 11 */
+ reset-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
+
+ port {
+ ov5640_to_imx8mm_mipi_csi: endpoint {
+ remote-endpoint = <&imx8mm_mipi_csi_in>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
+&mipi_csi {
+ status = "okay";
+
+ ports {
+ port@0 {
+ reg = <0>;
+
+ imx8mm_mipi_csi_in: endpoint {
+ remote-endpoint = <&ov5640_to_imx8mm_mipi_csi>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};