diff mbox series

[4/4] ARM: dts: rockchip: add ov5647 camera module support to tinkerboard

Message ID CAFP0Ok_3yTv9QWAykvBk3yLgbThycVPdx0taU9F1Wo_WTnVjyA@mail.gmail.com
State New
Headers show
Series None | expand

Commit Message

karthik poduval March 31, 2020, 7:57 a.m. UTC
ov5647 is one of the two camera modules as described in
https://tinkerboarding.co.uk/wiki/index.php/CSI-camera

changes ported over from https://github.com/TinkerBoard/debian_kernel.git

Reported-by: Karthik Poduval <karthik.poduval@gmail.com>
Signed-off-by: Karthik Poduval <karthik.poduval@gmail.com>
---
 arch/arm/boot/dts/rk3288-tinker.dtsi | 37 ++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi
b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 312582c1bd37..720dd80ea3aa 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -107,6 +107,13 @@ 
         startup-delay-us = <100000>;
         vin-supply = <&vcc_io>;
     };
+
+    ext_cam_clk: external-camera-clock {
+        compatible = "fixed-clock";
+        clock-frequency = <25000000>;
+        clock-output-names = "CLK_CAMERA_25MHZ";
+        #clock-cells = <0>;
+    };
 };

 &cpu0 {
@@ -345,12 +352,42 @@ 

 &i2c2 {
     status = "okay";
+    camera0: ov5647@36 {
+        compatible = "ovti,ov5647";
+        reg = <0x36>;
+        clocks = <&ext_cam_clk>;
+        status = "okay";
+        enable-gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
+        port {
+            ov5647_out: endpoint {
+                remote-endpoint = <&isp_mipi_in>;
+                data-lanes = <1 2>;
+            };
+        };
+    };
 };

 &i2c5 {
     status = "okay";
 };

+&isp {
+    status = "okay";
+    phys = <&mipi_phy_rx0>;
+    phy-names = "dphy";
+
+    port {
+        isp_mipi_in: endpoint {
+            remote-endpoint = <&ov5647_out>;
+            data-lanes = <1 2>;
+        };
+    };
+};
+
+&mipi_phy_rx0 {
+    status = "okay";
+};
+
 &i2s {
     #sound-dai-cells = <0>;
     status = "okay";