LF-1909-2: arm64: dts: imx8mp-evk: enable ov5640 for iMX8MP platfrom
authorGuoniu.zhou <guoniu.zhou@nxp.com>
Fri, 31 Jul 2020 09:54:54 +0000 (17:54 +0800)
committerDong Aisheng <aisheng.dong@nxp.com>
Mon, 14 Dec 2020 03:22:57 +0000 (11:22 +0800)
Add ov5640 device node and enable isi, csi for iMX8MP platfrom

Signed-off-by: Guoniu.zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby.Cai <robby.cai@nxp.com>
arch/arm64/boot/dts/freescale/imx8mp-evk.dts

index 3cc6813..c23064c 100644 (file)
                        };
                };
        };
+
+       ov5640_0: ov5640_mipi@3c {
+               compatible = "ovti,ov5640";
+               reg = <0x3c>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>;
+               clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+               clock-names = "xclk";
+               assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+               assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+               assigned-clock-rates = <24000000>;
+               csi_id = <0>;
+               powerdown-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+               mclk = <24000000>;
+               mclk_source = <0>;
+               mipi_csi;
+               status = "okay";
+
+               port {
+                       ov5640_mipi_0_ep: endpoint {
+                               remote-endpoint = <&mipi_csi0_ep>;
+                               data-lanes = <1 2>;
+                               clock-lanes = <0>;
+                       };
+               };
+       };
 };
 
 &i2c3 {
                wlf,gpio-cfg = <1 3>;
                SPKVDD1-supply = <&reg_audio_pwr>;
        };
+
+       ov5640_1: ov5640_mipi@3c {
+               compatible = "ovti,ov5640";
+               reg = <0x3c>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_csi0_pwn>, <&pinctrl_csi0_rst>;
+               clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+               clock-names = "xclk";
+               assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
+               assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
+               assigned-clock-rates = <24000000>;
+               csi_id = <0>;
+               powerdown-gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+               reset-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>;
+               mclk = <24000000>;
+               mclk_source = <0>;
+               mipi_csi;
+               status = "disabled";
+
+               port {
+                       ov5640_mipi_1_ep: endpoint {
+                               remote-endpoint = <&mipi_csi1_ep>;
+                               data-lanes = <1 2>;
+                               clock-lanes = <0>;
+                       };
+               };
+       };
 };
 
 &irqsteer_hdmi {
                        MX8MP_IOMUXC_GPIO1_IO02__WDOG1_WDOG_B   0xc6
                >;
        };
+
+       pinctrl_csi0_pwn: csi0_pwn_grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_SD1_STROBE__GPIO2_IO11     0x19
+               >;
+       };
+
+       pinctrl_csi0_rst: csi0_rst_grp {
+               fsl,pins = <
+                       MX8MP_IOMUXC_GPIO1_IO06__GPIO1_IO06             0x19
+                       MX8MP_IOMUXC_GPIO1_IO15__CCMSRCGPCMIX_CLKO2     0x59
+               >;
+       };
 };
 
 &vpu_g1 {
 &vpu_vc8000e {
        status = "okay";
 };
+
+&mipi_csi_0 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "okay";
+
+       port@0 {
+               reg = <0>;
+               mipi_csi0_ep: endpoint {
+                       remote-endpoint = <&ov5640_mipi_0_ep>;
+                       data-lanes = <2>;
+                       csis-hs-settle = <13>;
+                       csis-clk-settle = <2>;
+                       csis-wclk;
+               };
+       };
+};
+
+&mipi_csi_1 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+       status = "disabled";
+
+       port@1 {
+               reg = <1>;
+               mipi_csi1_ep: endpoint {
+                       remote-endpoint = <&ov5640_mipi_1_ep>;
+                       data-lanes = <2>;
+                       csis-hs-settle = <13>;
+                       csis-clk-settle = <2>;
+                       csis-wclk;
+               };
+       };
+};
+
+&cameradev {
+       status = "okay";
+};
+
+&isi_0 {
+       status = "okay";
+
+       cap_device {
+               status = "okay";
+       };
+};
+
+&isi_1 {
+       status = "disabled";
+
+       cap_device {
+               status = "okay";
+       };
+};