[Armadeus-commitlog] SF.net SVN: armadeus:[1208] trunk/buildroot/target/device/armadeus/linux/ ker
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-04-08 13:24:01
|
Revision: 1208
http://armadeus.svn.sourceforge.net/armadeus/?rev=1208&view=rev
Author: artemys
Date: 2009-04-08 13:23:52 +0000 (Wed, 08 Apr 2009)
Log Message:
-----------
[LINUX] Add platform declaration for i.MX27 CSI and OV9653 sensor
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-07 17:05:11 UTC (rev 1207)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-08 13:23:52 UTC (rev 1208)
@@ -4,8 +4,8 @@
Index: linux-2.6.27.13/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-03-20 09:21:52.000000000 +0100
-@@ -0,0 +1,1379 @@
++++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-04-08 11:23:11.000000000 +0200
+@@ -0,0 +1,1462 @@
+ /*
+ * apf27.c
+ *
@@ -71,6 +71,9 @@
+#include <mach/imx_ssi.h>
+#include <mach/imx-alsa.h>
+#endif
++#if defined(CONFIG_VIDEO_MX27_MODULE) || defined(CONFIG_VIDEO_MX27)
++#include <mach/imx_cam.h>
++#endif
+#if defined(CONFIG_CPU_FREQ_IMX27) || defined(CONFIG_CPU_FREQ_IMX27_MODULE)
+#include "cpufreq_imx.h"
+#endif
@@ -92,7 +95,14 @@
+#ifdef CONFIG_VIDEO_AD9889_MODULE
+#define CONFIG_VIDEO_AD9889 1
+#endif
++#ifdef CONFIG_VIDEO_MX27_MODULE
++#define CONFIG_VIDEO_MX27 1
++#endif
++#ifdef CONFIG_VIDEO_OV96xx_MODULE
++#define CONFIG_VIDEO_OV96xx 1
++#endif
+
++
+/*
+ * APF27 has a Micron 128MiB 1,8V NAND flash, 16 bits width
+ */
@@ -154,6 +164,15 @@
+ .platform_data = NULL,
+ .irq = 0
+ },
++#ifdef CONFIG_VIDEO_OV96xx
++ [1] = {
++ .type = "ov96xx",
++ .flags = 0, /* FIXME */
++ .addr = 0x30,
++ .platform_data = NULL,
++ .irq = 0
++ },
++#endif
+};
+
+#ifdef CONFIG_VIDEO_AD9889
@@ -631,7 +650,7 @@
+ .conv = MAX1027_CONV_DEFAULT,
+ .setup = MAX1027_SETUP_DEFAULT,
+ .avg = MAX1027_AVG_DEFAULT,
-+ .cnvst_pin = (int)(MAX1027_CNVST|GPIO_PORTE),
++ .cnvst_pin = (int)(MAX1027_CNVST|GPIO_PORTE),
+ .init = max1027_init,
+ .exit = max1027_exit
+};
@@ -1113,6 +1132,67 @@
+};
+
+
++/* Camera / CSI stuff */
++#ifdef CONFIG_VIDEO_MX27
++
++# ifdef CONFIG_VIDEO_OV96xx
++static int apf27dev_ov9653_ctl_pins[] = {
++ (GPIO_PORTC | 30 | GPIO_OUT | GPIO_GPIO), /* SSI3_TX as POWERDOWN*/
++ (GPIO_PORTC | 31 | GPIO_OUT | GPIO_GPIO), /* SSI3_CLK as RESET */
++};
++# endif
++
++static int mxc_csi_pins[] = {
++ PB10_PF_CSI_D0,
++ PB11_PF_CSI_D1,
++ PB12_PF_CSI_D2,
++ PB13_PF_CSI_D3,
++ PB14_PF_CSI_D4,
++ PB15_PF_CSI_MCLK,
++ PB16_PF_CSI_PIXCLK,
++ PB17_PF_CSI_D5,
++ PB18_PF_CSI_D6,
++ PB19_PF_CSI_D7,
++ PB20_PF_CSI_VSYNC,
++ PB21_PF_CSI_HSYNC
++};
++
++static int apf27_camera_init(struct platform_device *pdev)
++{
++# ifdef CONFIG_VIDEO_OV96xx
++ /* To be put in ov96xx driver init part: */
++ int err;
++
++ err = mxc_gpio_setup_multiple( apf27dev_ov9653_ctl_pins,
++ ARRAY_SIZE(mxc_csi_pins), "CSI");
++ if (err) {
++ printk("Error %s", __func__);
++ }
++ gpio_set_value(GPIO_PORTC | 30, 0);
++ gpio_set_value(GPIO_PORTC | 31, 0);
++# endif
++
++ return mxc_gpio_setup_multiple(mxc_csi_pins,
++ ARRAY_SIZE(mxc_csi_pins), "CSI");
++}
++
++static int apf27_camera_exit(struct platform_device *pdev)
++{
++ mxc_gpio_release_multiple(mxc_csi_pins, ARRAY_SIZE(mxc_csi_pins));
++
++ return 0;
++}
++
++struct mx27_camera_platform_data apf27_camera = {
++ .init = apf27_camera_init,
++ .exit = apf27_camera_exit,
++ .clk = 26600000,
++ .flags = MX27_CAMERA_HSYNC_HIGH | MX27_CAMERA_GATED_CLOCK |
++ MX27_CAMERA_PACK_DIR_MSB,
++};
++#endif /* CONFIG_VIDEO_MX27 */
++
++
+/* APF27 power management stuff */
+
+
@@ -1361,6 +1441,9 @@
+#ifdef CONFIG_MMC_MXC
+ apf27_init_mmc();
+#endif
++#ifdef CONFIG_VIDEO_MX27
++ mxc_register_device(&mx27_camera_device, &apf27_camera);
++#endif
+
+ printk("i.MX27 chip revision: %d\n", mx27_revision() );
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|