]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00177310-1 i.mx6dl sabresd: add camera support
authorLily Zhang <r58066@freescale.com>
Tue, 13 Mar 2012 10:47:50 +0000 (18:47 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:17 +0000 (14:11 +0200)
Add camera support into i.mx6dl sabreasd board.

Signed-off-by: Lily Zhang <r58066@freescale.com>
arch/arm/mach-mx6/board-mx6q_sabresd.c

index 4df143eac28cb7d400462dfdf9b830077ddea2f5..d2c32ab35cfcffe61ac54dacbbd3a0b6b9830e87 100644 (file)
@@ -378,7 +378,7 @@ static void mx6q_csi0_io_init(void)
 
        /* Camera reset */
        gpio_request(SABRESD_CSI0_RST, "cam-reset");
-       gpio_direction_output(SABRESD_MIPICSI_RST, 1);
+       gpio_direction_output(SABRESD_CSI0_RST, 1);
 
        /* Camera power down */
        gpio_request(SABRESD_CSI0_PWN, "cam-pwdn");
@@ -386,7 +386,8 @@ static void mx6q_csi0_io_init(void)
        msleep(1);
        gpio_set_value(SABRESD_CSI0_PWN, 0);
 
-       /* For MX6Q GPR1 bit19 and bit20 meaning:
+       /* For MX6Q:
+        * GPR1 bit19 and bit20 meaning:
         * Bit19:       0 - Enable mipi to IPU1 CSI0
         *                      virtual channel is fixed to 0
         *              1 - Enable parallel interface to IPU1 CSI0
@@ -397,8 +398,16 @@ static void mx6q_csi0_io_init(void)
         *      virtual channel is fixed to 1
         * IPU2 CSI0 directly connect to mipi csi2,
         *      virtual channel is fixed to 2
+        *
+        * For MX6DL:
+        * GPR13 bit 0-2 IPU_CSI0_MUX
+        *   000 MIPI_CSI0
+        *   100 IPU CSI0
         */
-       mxc_iomux_set_gpr_register(1, 19, 1, 1);
+       if (cpu_is_mx6q())
+               mxc_iomux_set_gpr_register(1, 19, 1, 1);
+       else if (cpu_is_mx6dl())
+               mxc_iomux_set_gpr_register(13, 0, 3, 4);
 }
 
 static struct fsl_mxc_camera_platform_data camera_data = {
@@ -435,7 +444,11 @@ static void mx6q_mipi_sensor_io_init(void)
        msleep(1);
        gpio_set_value(SABRESD_MIPICSI_PWN, 0);
 
-       mxc_iomux_set_gpr_register(1, 19, 1, 0);
+       if (cpu_is_mx6q())
+               mxc_iomux_set_gpr_register(1, 19, 1, 0);
+       if (cpu_is_mx6dl()) {
+               mxc_iomux_set_gpr_register(13, 0, 3, 0);
+       }
 }
 
 static struct fsl_mxc_camera_platform_data mipi_csi2_data = {