summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2008-11-15 16:09:54 +0100
committerEric Miao <eric.miao@marvell.com>2008-12-02 14:43:48 +0800
commit8e7ccddf0fd22617a3edc28ab2ce2fac0fb94823 (patch)
tree21630b016bb9e1164494cf32be65168a1582e060
parent0bcd30ec8deff327ae0becffb0fc7ee9dc90db82 (diff)
downloadtalos-obmc-linux-8e7ccddf0fd22617a3edc28ab2ce2fac0fb94823.tar.gz
talos-obmc-linux-8e7ccddf0fd22617a3edc28ab2ce2fac0fb94823.zip
[ARM] pxa/MioA701: add camera support for Mio A701 board.
Add GPIO configuration and platform specific declarations to make Mitac Mio A701 camera chip work. The chip is a Micron MT9M111 CMOS sensor, based on PXA QIF interface and I2C bus for sensor control. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r--arch/arm/mach-pxa/mioa701.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 0842c531ee4d..3fe95a04b196 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -46,6 +46,9 @@
#include <mach/mmc.h>
#include <mach/udc.h>
#include <mach/pxa27x-udc.h>
+#include <mach/i2c.h>
+#include <mach/camera.h>
+#include <media/soc_camera.h>
#include <mach/mioa701.h>
@@ -98,6 +101,20 @@ static unsigned long mioa701_pin_config[] = {
GPIO75_LCD_LCLK,
GPIO76_LCD_PCLK,
+ /* QCI */
+ GPIO12_CIF_DD_7,
+ GPIO17_CIF_DD_6,
+ GPIO50_CIF_DD_3,
+ GPIO51_CIF_DD_2,
+ GPIO52_CIF_DD_4,
+ GPIO53_CIF_MCLK,
+ GPIO54_CIF_PCLK,
+ GPIO55_CIF_DD_1,
+ GPIO81_CIF_DD_0,
+ GPIO82_CIF_DD_5,
+ GPIO84_CIF_FV,
+ GPIO85_CIF_LV,
+
/* Bluetooth */
GPIO44_BTUART_CTS,
GPIO42_BTUART_RXD,
@@ -151,6 +168,10 @@ static unsigned long mioa701_pin_config[] = {
GPIO104_KP_MKOUT_1,
GPIO105_KP_MKOUT_2,
+ /* I2C */
+ GPIO117_I2C_SCL,
+ GPIO118_I2C_SDA,
+
/* Unknown */
MFP_CFG_IN(GPIO14, AF0),
MFP_CFG_IN(GPIO20, AF0),
@@ -807,6 +828,32 @@ static int __init mioa701_battery_init(void)
#endif
/*
+ * Camera interface
+ */
+struct pxacamera_platform_data mioa701_pxacamera_platform_data = {
+ .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 |
+ PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN,
+ .mclk_10khz = 5000,
+};
+
+static struct soc_camera_link iclink = {
+ .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */
+};
+
+/* Board I2C devices. */
+static struct i2c_board_info __initdata mioa701_i2c_devices[] = {
+ {
+ /* Must initialize before the camera(s) */
+ I2C_BOARD_INFO("mt9m111", 0x5d),
+ .platform_data = &iclink,
+ },
+};
+
+struct i2c_pxa_platform_data i2c_pdata = {
+ .fast_mode = 1,
+};
+
+/*
* Mio global
*/
@@ -885,6 +932,10 @@ static void __init mioa701_machine_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
gsm_init();
mioa701_battery_init();
+
+ pxa_set_i2c_info(&i2c_pdata);
+ pxa_set_camera_info(&mioa701_pxacamera_platform_data);
+ i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices));
}
static void mioa701_machine_exit(void)
OpenPOWER on IntegriCloud