From a26f3713cbc0d76a87ed2fbb57e62515f0636f76 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 21 Jul 2010 12:12:55 +0200 Subject: linux-omap-psp 2.6.32: add patches to make the VGA and 3MP cameras work on the beagelboard xM --- .../beagleboard/configs/cpuidle | 10 +- .../linux-omap-psp-2.6.32/beagleboard/defconfig | 16 +- ...st-stab-at-merging-sensor-driver-based-on.patch | 2 +- .../0002-mt9t111-Fix-all-checkpatch-errors.patch | 2 +- .../0003-mt9t111-Pass-v4l2_int_device-data.patch | 2 +- .../cam/0004-omap3beagle-Add-camera-support.patch | 2 +- ...005-TEMP-omap3beagle-camera-Add-defconfig.patch | 2 +- ...3beagle-camera-Add-support-for-regulators.patch | 2 +- ...0007-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch | 2 +- ...eagle-camera-Fix-null-pointer-dereference.patch | 2 +- ...vert-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch | 2 +- ...p3beagle-camera-Change-arch-late_initcall.patch | 2 +- ...-camera-Move-i2c-registration-to-the-main.patch | 2 +- ...ake-camera-code-build-if-MT9T111-is-built.patch | 2 +- ...ap3beagle-camera-Force-mode0-in-cam_xclka.patch | 2 +- ...-Add-capability-to-change-rate-of-dpll4_m.patch | 2 +- ...G-omap3beagle-camera-Force-mode0-in-cam_x.patch | 2 +- ...p3beagle-camera-Fix-wrong-XCLKA-selection.patch | 2 +- ...t-CAM_MCLK-to-172.8-MHz-allows-exact-9.6-.patch | 2 +- ...-Fix-Moved-MCLK-setting-to-the-board-file.patch | 2 +- ...019-omap3isp-core-Do-smarter-MCLK-setting.patch | 2 +- ...0-omap3beagle-camera-set-mclk-for-mt9t111.patch | 2 +- .../cam/0021-mt9t111-Fix-max-supported-xclk.patch | 2 +- ...ap3beagle-camera-Clarify-regulators-names.patch | 2 +- ...3-omap3beagle-camera-Fix-powerup-sequence.patch | 2 +- ...4-omap3beagle-camera-Change-vaux4-to-1.8v.patch | 2 +- ...-camera-Rename-regulators-to-match-actual.patch | 2 +- ...-camera-Complement-remainig-sensor-hw-con.patch | 2 +- ...-detect-function-retval-and-cleanup-print.patch | 2 +- ...e-camera-Set-padconf-settings-in-cam-init.patch | 2 +- ...-camera-only-register-camera-driver-for-3.patch | 31 + ...11-Work-in-progress-for-camera-enablement.patch | 53 + ...XM-Cam-Add-support-for-MT9V113-VGA-Sensor.patch | 2441 ++++++++++++++++++++ ...MT9V113-Fixed-sensor-nitialization-issues.patch | 294 +++ .../cam/0033-mt9v113-Fix-wrong-active-widths.patch | 29 + ...x-Wrong-check-on-non-interlaced-sensor-on.patch | 34 + ...-Fix-bad-YUV_BT-checks-in-datapath_config.patch | 45 + ...p-Set-vd_pol-to-0-by-default-on-all-cases.patch | 35 + ...isp-ccdc-Set-datalines-to-10-for-YUV_SYNC.patch | 29 + ...p3beagle-camera-Fix-parallel-i-f-settings.patch | 43 + ...-camera-Clean-up-Remove-unneccessary-code.patch | 118 + ...-Clean-Up-Remove-unneccessary-code-printf.patch | 390 ++++ ...Min-Max-clk-input-changed-as-per-the-spec.patch | 54 + ...-omap3beagle-camera-Further-clode-cleanup.patch | 237 ++ ...Settings-from-Aptima-used-to-increase-FPS.patch | 135 ++ ...44-mt9v113-AE-param-tuned-to-get-28-30FPS.patch | 33 + ...5-omap3beagle-camera-Cleanup-of-boardfile.patch | 161 ++ ...map3beagle-camera-Cleanup-regulator-usage.patch | 172 ++ ...3beagle-camera-Bring-back-mt9t111-support.patch | 251 ++ ...-REMOVE-v4l2-Delete-MT9T111-sensor-driver.patch | 2402 +++++++++++++++++++ ...3670-soc-camera-Add-mt9t112-camera-driver.patch | 1285 +++++++++++ ...mt9t112-modify-exiting-conditions-from-st.patch | 31 + ...igrate-from-soc_camera-to-v4l2-int-device.patch | 934 ++++++++ ...52-mt9t112-Add-more-info-to-public-header.patch | 29 + .../0053-mt9t112-Fix-null-pointer-kernel-bug.patch | 84 + ...EBUG-omap3beagle-Add-MT9T112-to-defconfig.patch | 26 + ...-camera-Change-MT9T111-references-to-new-.patch | 207 ++ ...4xxcam-Fix-multi-pixel-format-negotiation.patch | 26 + ...3beagle-camera-Bring-back-mt9t111-support.patch | 43 + ...0058-mt9t112-Do-init_camera-every-powerup.patch | 57 + ...agle-camera-Switch-flag-for-no-sensor-ISP.patch | 26 + .../cam/0060-mt9t112-Add-back-3MP-basesize.patch | 37 + ...9t112-Prepare-for-24MHz-EXTCLK-and-30-fps.patch | 63 + ...gle-camera-Prepare-24MHz-xclk-for-mt9t112.patch | 62 + ...rect-register-settings-for-mt9t111-sensor.patch | 109 + .../0064-mt9t112-Remove-smart-size-selection.patch | 188 ++ ...emove-bogus-Kconfig-depend-on-PCI-and-add.patch | 38 + ...12-Add-Context-selection-to-configuration.patch | 96 + .../0067-mt9t112-Disable-JPEG-in-Context-B.patch | 32 + ...12-Make-context-B-stream-unlimited-frames.patch | 30 + ...69-mt9t112-Fix-pll-p-dividers-abstraction.patch | 58 + ...t9t112-Adjust-50-60Hz-flickering-settings.patch | 51 + ...gger-autofocus-at-the-end-of-context-swit.patch | 35 + recipes/linux/linux-omap-psp_2.6.32.bb | 49 +- 74 files changed, 10622 insertions(+), 43 deletions(-) create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0029-omap3beagle-camera-only-register-camera-driver-for-3.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0030-WIP-mt9t111-Work-in-progress-for-camera-enablement.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0031-BeagleXM-Cam-Add-support-for-MT9V113-VGA-Sensor.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0032-MT9V113-Fixed-sensor-nitialization-issues.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0033-mt9v113-Fix-wrong-active-widths.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0034-omap3isp-Fix-Wrong-check-on-non-interlaced-sensor-on.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0035-omap3isp-Fix-bad-YUV_BT-checks-in-datapath_config.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0036-omap3isp-Set-vd_pol-to-0-by-default-on-all-cases.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0037-omap3isp-ccdc-Set-datalines-to-10-for-YUV_SYNC.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0038-omap3beagle-camera-Fix-parallel-i-f-settings.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0039-omap3beagle-camera-Clean-up-Remove-unneccessary-code.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0040-mt9v113-Clean-Up-Remove-unneccessary-code-printf.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0041-MT9V113-Min-Max-clk-input-changed-as-per-the-spec.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0042-omap3beagle-camera-Further-clode-cleanup.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0043-mt9v113-Settings-from-Aptima-used-to-increase-FPS.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0044-mt9v113-AE-param-tuned-to-get-28-30FPS.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0045-omap3beagle-camera-Cleanup-of-boardfile.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0046-omap3beagle-camera-Cleanup-regulator-usage.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0047-omap3beagle-camera-Bring-back-mt9t111-support.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0048-REMOVE-v4l2-Delete-MT9T111-sensor-driver.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0049-V4L-DVB-13670-soc-camera-Add-mt9t112-camera-driver.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0050-soc-camera-mt9t112-modify-exiting-conditions-from-st.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0051-mt9t112-Migrate-from-soc_camera-to-v4l2-int-device.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0052-mt9t112-Add-more-info-to-public-header.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0053-mt9t112-Fix-null-pointer-kernel-bug.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0054-DEBUG-omap3beagle-Add-MT9T112-to-defconfig.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0055-omap3beagle-camera-Change-MT9T111-references-to-new-.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0056-omap34xxcam-Fix-multi-pixel-format-negotiation.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0057-SQUASH-omap3beagle-camera-Bring-back-mt9t111-support.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0058-mt9t112-Do-init_camera-every-powerup.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0059-omap3beagle-camera-Switch-flag-for-no-sensor-ISP.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0060-mt9t112-Add-back-3MP-basesize.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0061-mt9t112-Prepare-for-24MHz-EXTCLK-and-30-fps.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0062-omap3beagle-camera-Prepare-24MHz-xclk-for-mt9t112.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0063-mt9t112-Correct-register-settings-for-mt9t111-sensor.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0064-mt9t112-Remove-smart-size-selection.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0065-rtl8192su-remove-bogus-Kconfig-depend-on-PCI-and-add.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0066-mt9t112-Add-Context-selection-to-configuration.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0067-mt9t112-Disable-JPEG-in-Context-B.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0068-mt9t112-Make-context-B-stream-unlimited-frames.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0069-mt9t112-Fix-pll-p-dividers-abstraction.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0070-mt9t112-Adjust-50-60Hz-flickering-settings.patch create mode 100644 recipes/linux/linux-omap-psp-2.6.32/cam/0071-mt9t112-Trigger-autofocus-at-the-end-of-context-swit.patch (limited to 'recipes/linux') diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/configs/cpuidle b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/configs/cpuidle index 8b44e79c59..678585c870 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/configs/cpuidle +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/configs/cpuidle @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32 -# Mon Jun 7 09:45:30 2010 +# Sun Jul 18 00:26:08 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -382,8 +382,8 @@ CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y @@ -1736,9 +1736,10 @@ CONFIG_VIDEO_WM8775=m # CONFIG_VIDEO_KS0127 is not set # CONFIG_VIDEO_OV7670 is not set CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V113=m # CONFIG_VIDEO_TCM825X is not set CONFIG_VIDEO_MT9P012=m -# CONFIG_VIDEO_MT9T111 is not set +CONFIG_VIDEO_MT9T112=m # CONFIG_VIDEO_DW9710 is not set # CONFIG_VIDEO_OV3640 is not set # CONFIG_VIDEO_IMX046 is not set @@ -2510,6 +2511,7 @@ CONFIG_ECHO=m CONFIG_OTUS=m # CONFIG_COMEDI is not set # CONFIG_ASUS_OLED is not set +CONFIG_RTL8192SU=m # CONFIG_INPUT_MIMIO is not set # CONFIG_TRANZPORT is not set diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig index 0841f486d0..92237f2fda 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32 -# Tue Apr 6 12:00:09 2010 +# Wed Jul 21 12:01:38 2010 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -267,8 +267,7 @@ CONFIG_OMAP_PACKAGE_CBB=y CONFIG_MACH_OMAP3_BEAGLE=y # CONFIG_MACH_OMAP_LDP is not set # CONFIG_MACH_OVERO is not set -CONFIG_MACH_OMAP3EVM=n -CONFIG_PMIC_TWL4030=y +# CONFIG_MACH_OMAP3EVM is not set # CONFIG_MACH_OMAP3517EVM is not set # CONFIG_MACH_OMAP3_PANDORA is not set # CONFIG_MACH_OMAP3_TOUCHBOOK is not set @@ -311,7 +310,7 @@ CONFIG_HAS_TLS_REG=y CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_USER_L2_PLE=y CONFIG_USER_PMON=y -# CONFIG_ARM_ERRATA_430973 is not set +CONFIG_ARM_ERRATA_430973=y # CONFIG_ARM_ERRATA_458693 is not set # CONFIG_ARM_ERRATA_460075 is not set CONFIG_COMMON_CLKDEV=y @@ -381,7 +380,7 @@ CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set @@ -1250,7 +1249,7 @@ CONFIG_USB_RTL8150=y CONFIG_USB_USBNET=y CONFIG_USB_NET_AX8817X=y CONFIG_USB_NET_CDCETHER=y -CONFIG_USB_NET_CDC_EEM=n +# CONFIG_USB_NET_CDC_EEM is not set CONFIG_USB_NET_DM9601=y CONFIG_USB_NET_SMSC95XX=y CONFIG_USB_NET_GL620A=y @@ -1735,9 +1734,10 @@ CONFIG_VIDEO_WM8775=m # CONFIG_VIDEO_KS0127 is not set # CONFIG_VIDEO_OV7670 is not set CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V113=m # CONFIG_VIDEO_TCM825X is not set CONFIG_VIDEO_MT9P012=m -# CONFIG_VIDEO_MT9T111 is not set +CONFIG_VIDEO_MT9T112=m # CONFIG_VIDEO_DW9710 is not set # CONFIG_VIDEO_OV3640 is not set # CONFIG_VIDEO_IMX046 is not set @@ -2090,7 +2090,6 @@ CONFIG_SND_USB_CAIAQ_INPUT=y CONFIG_SND_SOC=y CONFIG_SND_OMAP_SOC=y CONFIG_SND_OMAP_SOC_MCBSP=y -# CONFIG_SND_OMAP_SOC_OMAP3EVM is not set CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y CONFIG_SND_SOC_I2C_AND_SPI=y # CONFIG_SND_SOC_ALL_CODECS is not set @@ -2510,6 +2509,7 @@ CONFIG_ECHO=m CONFIG_OTUS=m # CONFIG_COMEDI is not set # CONFIG_ASUS_OLED is not set +CONFIG_RTL8192SU=m # CONFIG_INPUT_MIMIO is not set # CONFIG_TRANZPORT is not set diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch index 00dc101add..75d781a75a 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch @@ -1,7 +1,7 @@ From 4a505672e75774854a02bf5c2a6c17f0789b1c93 Mon Sep 17 00:00:00 2001 From: OpenEmbedded User Date: Tue, 9 Feb 2010 17:16:13 +0100 -Subject: [PATCH 01/28] mt9t111: first stab at merging sensor driver based on a patch by Leopard Imaging +Subject: [PATCH 01/71] mt9t111: first stab at merging sensor driver based on a patch by Leopard Imaging --- drivers/media/video/Kconfig | 8 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0002-mt9t111-Fix-all-checkpatch-errors.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0002-mt9t111-Fix-all-checkpatch-errors.patch index f9b1ecff6f..49185d7dd3 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0002-mt9t111-Fix-all-checkpatch-errors.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0002-mt9t111-Fix-all-checkpatch-errors.patch @@ -1,7 +1,7 @@ From 5b1011bc9c2172027f3c84fa56b9f0e090e85193 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 13:51:49 -0500 -Subject: [PATCH 02/28] mt9t111: Fix all checkpatch errors +Subject: [PATCH 02/71] mt9t111: Fix all checkpatch errors The code was plagued with checkpatch errors. Fix them! diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0003-mt9t111-Pass-v4l2_int_device-data.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0003-mt9t111-Pass-v4l2_int_device-data.patch index bf3d9c84a7..d95c3c2f7c 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0003-mt9t111-Pass-v4l2_int_device-data.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0003-mt9t111-Pass-v4l2_int_device-data.patch @@ -1,7 +1,7 @@ From e8188ea4c58ddf1b7006703b9caca3554fec68d7 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 16:17:56 -0500 -Subject: [PATCH 03/28] mt9t111: Pass v4l2_int_device data +Subject: [PATCH 03/71] mt9t111: Pass v4l2_int_device data Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0004-omap3beagle-Add-camera-support.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0004-omap3beagle-Add-camera-support.patch index a4fd1ecb79..f64479ce66 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0004-omap3beagle-Add-camera-support.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0004-omap3beagle-Add-camera-support.patch @@ -1,7 +1,7 @@ From 06ff02b8346c0ed77fabba84a1b984f53bfaecb6 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 16:15:58 -0500 -Subject: [PATCH 04/28] omap3beagle: Add camera support +Subject: [PATCH 04/71] omap3beagle: Add camera support This is tested with the xM + Leopard imaging module camera, which has a MT9T111. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0005-TEMP-omap3beagle-camera-Add-defconfig.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0005-TEMP-omap3beagle-camera-Add-defconfig.patch index d30a21a0b8..aa255ba3a5 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0005-TEMP-omap3beagle-camera-Add-defconfig.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0005-TEMP-omap3beagle-camera-Add-defconfig.patch @@ -1,7 +1,7 @@ From e09768af6603baf2c692567f8651576152f021fe Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 16:18:30 -0500 -Subject: [PATCH 05/28] TEMP: omap3beagle: camera: Add defconfig +Subject: [PATCH 05/71] TEMP: omap3beagle: camera: Add defconfig Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0006-omap3beagle-camera-Add-support-for-regulators.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0006-omap3beagle-camera-Add-support-for-regulators.patch index 11e03e2ced..673a3ce03a 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0006-omap3beagle-camera-Add-support-for-regulators.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0006-omap3beagle-camera-Add-support-for-regulators.patch @@ -1,7 +1,7 @@ From f99548efe1161c4f5418dcacb598b1c9637ca7d5 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 16:50:39 -0500 -Subject: [PATCH 06/28] omap3beagle: camera: Add support for regulators +Subject: [PATCH 06/71] omap3beagle: camera: Add support for regulators Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0007-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0007-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch index c479f30e47..0d6da92632 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0007-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0007-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch @@ -1,7 +1,7 @@ From 7d5f49845f06feadb9bc97d458d1ce03814ff5f4 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 16:52:25 -0500 -Subject: [PATCH 07/28] TEMP: omap3beagle: cam: Enable OMAP_MUX +Subject: [PATCH 07/71] TEMP: omap3beagle: cam: Enable OMAP_MUX Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0008-omap3beagle-camera-Fix-null-pointer-dereference.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0008-omap3beagle-camera-Fix-null-pointer-dereference.patch index 0c01030d0b..121d6ebe96 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0008-omap3beagle-camera-Fix-null-pointer-dereference.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0008-omap3beagle-camera-Fix-null-pointer-dereference.patch @@ -1,7 +1,7 @@ From 74fef5ae63ecf623ea3accdff05b092699437b11 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 11 Jun 2010 17:53:50 -0500 -Subject: [PATCH 08/28] omap3beagle: camera: Fix null pointer dereference +Subject: [PATCH 08/71] omap3beagle: camera: Fix null pointer dereference Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0009-Revert-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0009-Revert-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch index d8f4d080b3..62c49f1660 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0009-Revert-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0009-Revert-TEMP-omap3beagle-cam-Enable-OMAP_MUX.patch @@ -1,7 +1,7 @@ From 6d9afea5e436a57e66efd2784aa299e1baf3fe3a Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Wed, 16 Jun 2010 03:23:57 +0300 -Subject: [PATCH 09/28] Revert "TEMP: omap3beagle: cam: Enable OMAP_MUX" +Subject: [PATCH 09/71] Revert "TEMP: omap3beagle: cam: Enable OMAP_MUX" This reverts commit 7d5f49845f06feadb9bc97d458d1ce03814ff5f4. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0010-omap3beagle-camera-Change-arch-late_initcall.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0010-omap3beagle-camera-Change-arch-late_initcall.patch index 12b25a04c8..da9fb7ee94 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0010-omap3beagle-camera-Change-arch-late_initcall.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0010-omap3beagle-camera-Change-arch-late_initcall.patch @@ -1,7 +1,7 @@ From 9ff295528695c3a1b0a369e989f556db02ddf6b9 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Wed, 16 Jun 2010 04:28:06 +0300 -Subject: [PATCH 10/28] omap3beagle: camera: Change arch -> late_initcall +Subject: [PATCH 10/71] omap3beagle: camera: Change arch -> late_initcall This is for ensuring that the regulators are initialized already. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0011-omap3beagle-camera-Move-i2c-registration-to-the-main.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0011-omap3beagle-camera-Move-i2c-registration-to-the-main.patch index 3f83ed8e29..beb3b6e6f2 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0011-omap3beagle-camera-Move-i2c-registration-to-the-main.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0011-omap3beagle-camera-Move-i2c-registration-to-the-main.patch @@ -1,7 +1,7 @@ From 4855949888a0ad8aca69c1ca3eefc7fbc8dad6f9 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Wed, 16 Jun 2010 04:58:46 +0300 -Subject: [PATCH 11/28] omap3beagle: camera: Move i2c registration to the main board +Subject: [PATCH 11/71] omap3beagle: camera: Move i2c registration to the main board This is because the board-omap3beagle-camera.c file now is late_initcall, and the i2c bus registration needed to be before diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0012-ARM-OMAP3-make-camera-code-build-if-MT9T111-is-built.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0012-ARM-OMAP3-make-camera-code-build-if-MT9T111-is-built.patch index 8b7e2cf2bd..1adace2e05 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0012-ARM-OMAP3-make-camera-code-build-if-MT9T111-is-built.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0012-ARM-OMAP3-make-camera-code-build-if-MT9T111-is-built.patch @@ -1,7 +1,7 @@ From e37a8b39623910576c5784ccc10229fabe51b4c3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 16 Jun 2010 09:45:46 +0200 -Subject: [PATCH 12/28] ARM: OMAP3: make camera code build if MT9T111 is built as module or disabled +Subject: [PATCH 12/71] ARM: OMAP3: make camera code build if MT9T111 is built as module or disabled --- arch/arm/mach-omap2/board-omap3beagle.c | 4 +++- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0013-DEBUG-omap3beagle-camera-Force-mode0-in-cam_xclka.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0013-DEBUG-omap3beagle-camera-Force-mode0-in-cam_xclka.patch index c697de3c5c..7cd9bfa7ef 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0013-DEBUG-omap3beagle-camera-Force-mode0-in-cam_xclka.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0013-DEBUG-omap3beagle-camera-Force-mode0-in-cam_xclka.patch @@ -1,7 +1,7 @@ From cc677d0cce4b39b7091e1e8c5675e98518968d3e Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Wed, 23 Jun 2010 15:03:24 -0500 -Subject: [PATCH 13/28] DEBUG: omap3beagle: camera: Force mode0 in cam_xclka +Subject: [PATCH 13/71] DEBUG: omap3beagle: camera: Force mode0 in cam_xclka Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0014-OMAP3-CLOCK-Add-capability-to-change-rate-of-dpll4_m.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0014-OMAP3-CLOCK-Add-capability-to-change-rate-of-dpll4_m.patch index 3cfeea6c0f..d7457ef070 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0014-OMAP3-CLOCK-Add-capability-to-change-rate-of-dpll4_m.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0014-OMAP3-CLOCK-Add-capability-to-change-rate-of-dpll4_m.patch @@ -1,7 +1,7 @@ From 62155e17564a986215d61697c6b8a20cc0b4e07f Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 4 Feb 2010 18:12:37 -0600 -Subject: [PATCH 14/28] OMAP3: CLOCK: Add capability to change rate of dpll4_m5_ck_3630 +Subject: [PATCH 14/71] OMAP3: CLOCK: Add capability to change rate of dpll4_m5_ck_3630 Add necessary clk_sel definitions to clock framework to allow changing dpll4_m5_ck_3630 rate. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0015-Revert-DEBUG-omap3beagle-camera-Force-mode0-in-cam_x.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0015-Revert-DEBUG-omap3beagle-camera-Force-mode0-in-cam_x.patch index 76903bddcb..79d0696dfb 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0015-Revert-DEBUG-omap3beagle-camera-Force-mode0-in-cam_x.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0015-Revert-DEBUG-omap3beagle-camera-Force-mode0-in-cam_x.patch @@ -1,7 +1,7 @@ From 2cda8f55cb01496f88ba9ad15a276f84eaa02870 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 14:27:39 -0500 -Subject: [PATCH 15/28] Revert "DEBUG: omap3beagle: camera: Force mode0 in cam_xclka" +Subject: [PATCH 15/71] Revert "DEBUG: omap3beagle: camera: Force mode0 in cam_xclka" This reverts commit 158e14b3d449dde2c6aa9f8cddb86fbbee2d2cd7. --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0016-omap3beagle-camera-Fix-wrong-XCLKA-selection.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0016-omap3beagle-camera-Fix-wrong-XCLKA-selection.patch index 4b7990ef5b..e4b756f533 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0016-omap3beagle-camera-Fix-wrong-XCLKA-selection.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0016-omap3beagle-camera-Fix-wrong-XCLKA-selection.patch @@ -1,7 +1,7 @@ From 6add1bee85d7cbe5c89650b1325ee345aba904cd Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 17:31:49 -0500 -Subject: [PATCH 16/28] omap3beagle: camera: Fix wrong XCLKA selection +Subject: [PATCH 16/71] omap3beagle: camera: Fix wrong XCLKA selection The CAM_USE_XCLKA should have been 0 instead of 1. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0017-omap3isp-set-CAM_MCLK-to-172.8-MHz-allows-exact-9.6-.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0017-omap3isp-set-CAM_MCLK-to-172.8-MHz-allows-exact-9.6-.patch index 6975aae2bc..77e5c1515d 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0017-omap3isp-set-CAM_MCLK-to-172.8-MHz-allows-exact-9.6-.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0017-omap3isp-set-CAM_MCLK-to-172.8-MHz-allows-exact-9.6-.patch @@ -1,7 +1,7 @@ From da7a0c9d99ac42332cab5fcc961006a56531e1c4 Mon Sep 17 00:00:00 2001 From: Tuukka Toivonen Date: Thu, 2 Jul 2009 16:17:55 +0200 -Subject: [PATCH 17/28] omap3isp: set CAM_MCLK to 172.8 MHz, allows exact 9.6 MHz for camera xclka/b +Subject: [PATCH 17/71] omap3isp: set CAM_MCLK to 172.8 MHz, allows exact 9.6 MHz for camera xclka/b Camera cam_xclka and cam_xclkb clocks are generated by dividing CAM_MCLK with an integer. We want to use 9.6 MHz for cameras, diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0018-Fix-Moved-MCLK-setting-to-the-board-file.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0018-Fix-Moved-MCLK-setting-to-the-board-file.patch index 95b3fcdd64..ffd3320976 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0018-Fix-Moved-MCLK-setting-to-the-board-file.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0018-Fix-Moved-MCLK-setting-to-the-board-file.patch @@ -1,7 +1,7 @@ From fc51d55718e20246c18c45c9e5545a0ef31d8b05 Mon Sep 17 00:00:00 2001 From: Penda, Naveen Date: Thu, 22 Oct 2009 06:07:01 +0530 -Subject: [PATCH 18/28] Fix: Moved MCLK setting to the board file +Subject: [PATCH 18/71] Fix: Moved MCLK setting to the board file This patch provides the flexibility to set the MCLK frequency from the board file diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch index 769ad6a5d7..dbd5dd6a3e 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch @@ -1,7 +1,7 @@ From 4f010e99c75490daf2f89cf5aed95ea5cd1f3fad Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Wed, 25 Nov 2009 12:30:46 -0600 -Subject: [PATCH 19/28] omap3isp: core: Do smarter MCLK setting +Subject: [PATCH 19/71] omap3isp: core: Do smarter MCLK setting Since the ratio between MCLK and DPLL4_M5 could not be 1:1 (i.e. on 3430 its 2:1), it's necessary to check ratio diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0020-omap3beagle-camera-set-mclk-for-mt9t111.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0020-omap3beagle-camera-set-mclk-for-mt9t111.patch index 6420443fb0..a87563edd1 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0020-omap3beagle-camera-set-mclk-for-mt9t111.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0020-omap3beagle-camera-set-mclk-for-mt9t111.patch @@ -1,7 +1,7 @@ From 140f36e6a0a01ccef5a13ff2a1a466bd38fa3b2d Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 16:34:13 -0500 -Subject: [PATCH 20/28] omap3beagle: camera: set mclk for mt9t111 +Subject: [PATCH 20/71] omap3beagle: camera: set mclk for mt9t111 Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0021-mt9t111-Fix-max-supported-xclk.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0021-mt9t111-Fix-max-supported-xclk.patch index e63f5d9073..41b1c49b1b 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0021-mt9t111-Fix-max-supported-xclk.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0021-mt9t111-Fix-max-supported-xclk.patch @@ -1,7 +1,7 @@ From 04f40f398ac899504e4836e78f8e791f98200cf2 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 17:43:23 -0500 -Subject: [PATCH 21/28] mt9t111: Fix max supported xclk +Subject: [PATCH 21/71] mt9t111: Fix max supported xclk According to Aptina documentation, the max should be 54 MHz, not 75 MHz. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0022-omap3beagle-camera-Clarify-regulators-names.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0022-omap3beagle-camera-Clarify-regulators-names.patch index 310c47a046..016b573cef 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0022-omap3beagle-camera-Clarify-regulators-names.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0022-omap3beagle-camera-Clarify-regulators-names.patch @@ -1,7 +1,7 @@ From 769bd80474aeb9951046336c4332f1cee3d27619 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 17:53:55 -0500 -Subject: [PATCH 22/28] omap3beagle: camera: Clarify regulators names +Subject: [PATCH 22/71] omap3beagle: camera: Clarify regulators names Changed: - beagle_mt9t111_reg1 -> beagle_mt9t111_1_8v diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0023-omap3beagle-camera-Fix-powerup-sequence.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0023-omap3beagle-camera-Fix-powerup-sequence.patch index fb424eedcb..56a5e6ee03 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0023-omap3beagle-camera-Fix-powerup-sequence.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0023-omap3beagle-camera-Fix-powerup-sequence.patch @@ -1,7 +1,7 @@ From 1f300b7451ed1aef6f9b9902f2070b7340cb4d0a Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Thu, 24 Jun 2010 18:21:52 -0500 -Subject: [PATCH 23/28] omap3beagle: camera: Fix powerup sequence +Subject: [PATCH 23/71] omap3beagle: camera: Fix powerup sequence The powerup sequence was very incomplete. After revisiting the Aptina developer's guide, the resulting powerup sequence is followed. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0024-omap3beagle-camera-Change-vaux4-to-1.8v.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0024-omap3beagle-camera-Change-vaux4-to-1.8v.patch index 93916e51a7..571ab2a122 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0024-omap3beagle-camera-Change-vaux4-to-1.8v.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0024-omap3beagle-camera-Change-vaux4-to-1.8v.patch @@ -1,7 +1,7 @@ From 838274e9850c8dfbb723c892604b017ebf5f0528 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 25 Jun 2010 11:24:07 -0500 -Subject: [PATCH 24/28] omap3beagle: camera: Change vaux4 to 1.8v +Subject: [PATCH 24/71] omap3beagle: camera: Change vaux4 to 1.8v Both voltage sources seem to need 1.8v. diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch index 3d9914894a..bfb5ad10a4 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0025-omap3beagle-camera-Rename-regulators-to-match-actual.patch @@ -1,7 +1,7 @@ From b8f60d7198d5df18336cb0151ac593cfa422f83a Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 25 Jun 2010 12:03:59 -0500 -Subject: [PATCH 25/28] omap3beagle: camera: Rename regulators to match actual voltage levels +Subject: [PATCH 25/71] omap3beagle: camera: Rename regulators to match actual voltage levels Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0026-omap3beagle-camera-Complement-remainig-sensor-hw-con.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0026-omap3beagle-camera-Complement-remainig-sensor-hw-con.patch index 943510910a..827ef36540 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0026-omap3beagle-camera-Complement-remainig-sensor-hw-con.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0026-omap3beagle-camera-Complement-remainig-sensor-hw-con.patch @@ -1,7 +1,7 @@ From f01fb232e43dcbc8f61c2ed29d8eb865ebb386b7 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 25 Jun 2010 12:04:48 -0500 -Subject: [PATCH 26/28] omap3beagle: camera: Complement remainig sensor hw config settings +Subject: [PATCH 26/71] omap3beagle: camera: Complement remainig sensor hw config settings Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0027-mt9t111-Fix-detect-function-retval-and-cleanup-print.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0027-mt9t111-Fix-detect-function-retval-and-cleanup-print.patch index 6eb26a2129..59d13f553a 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0027-mt9t111-Fix-detect-function-retval-and-cleanup-print.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0027-mt9t111-Fix-detect-function-retval-and-cleanup-print.patch @@ -1,7 +1,7 @@ From 5c343b5261a3a7382cb9aa414be9f1b57acb3056 Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 25 Jun 2010 13:43:54 -0500 -Subject: [PATCH 27/28] mt9t111: Fix detect function retval and cleanup prints +Subject: [PATCH 27/71] mt9t111: Fix detect function retval and cleanup prints Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0028-omap3beagle-camera-Set-padconf-settings-in-cam-init.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0028-omap3beagle-camera-Set-padconf-settings-in-cam-init.patch index 25e157d65e..1a5b8b9b78 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/cam/0028-omap3beagle-camera-Set-padconf-settings-in-cam-init.patch +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0028-omap3beagle-camera-Set-padconf-settings-in-cam-init.patch @@ -1,7 +1,7 @@ From 8ece4d6cbc52b7a41d1feb411d62c84cebc1e9fe Mon Sep 17 00:00:00 2001 From: Sergio Aguirre Date: Fri, 25 Jun 2010 16:01:00 -0500 -Subject: [PATCH 28/28] omap3beagle: camera: Set padconf settings in cam init +Subject: [PATCH 28/71] omap3beagle: camera: Set padconf settings in cam init Signed-off-by: Sergio Aguirre --- diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0029-omap3beagle-camera-only-register-camera-driver-for-3.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0029-omap3beagle-camera-only-register-camera-driver-for-3.patch new file mode 100644 index 0000000000..169fe982f9 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0029-omap3beagle-camera-only-register-camera-driver-for-3.patch @@ -0,0 +1,31 @@ +From 0e5fd12767472b52744c5dce43c77451aa89ba3d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 27 Jun 2010 16:11:39 +0200 +Subject: [PATCH 29/71] omap3beagle: camera: only register camera driver for 36xx based SoCs + +This is a workaround for the bootcrash when used on 35xx based beagleboards. + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle-camera.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c +index 75471f2..8faa437 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c ++++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c +@@ -355,7 +355,9 @@ static struct platform_driver beagle_cam_driver = { + */ + int __init omap3beaglelmb_init(void) + { +- platform_driver_register(&beagle_cam_driver); +- return 0; ++ if (cpu_is_omap3630()) { ++ platform_driver_register(&beagle_cam_driver); ++ } ++ return 0; + } + late_initcall(omap3beaglelmb_init); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0030-WIP-mt9t111-Work-in-progress-for-camera-enablement.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0030-WIP-mt9t111-Work-in-progress-for-camera-enablement.patch new file mode 100644 index 0000000000..f204aca384 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0030-WIP-mt9t111-Work-in-progress-for-camera-enablement.patch @@ -0,0 +1,53 @@ +From 250e5bf211583993d5e56cb5fc736a07945fa496 Mon Sep 17 00:00:00 2001 +From: Sergio Aguirre +Date: Fri, 25 Jun 2010 16:01:47 -0500 +Subject: [PATCH 30/71] WIP: mt9t111: Work in progress for camera enablement + +This is changing so far: +- Remove useless printk's in enum_frameinterval calls. +- Call mt9t111_loaddefault instead of mt9t111_configure dummy function. + +Signed-off-by: Sergio Aguirre +--- + drivers/media/video/mt9t111.c | 11 +---------- + 1 files changed, 1 insertions(+), 10 deletions(-) + +diff --git a/drivers/media/video/mt9t111.c b/drivers/media/video/mt9t111.c +index 08122ff..10080af 100644 +--- a/drivers/media/video/mt9t111.c ++++ b/drivers/media/video/mt9t111.c +@@ -288,14 +288,6 @@ static int ioctl_enum_frameintervals(struct v4l2_int_device *s, + { + int ifmt; + +- printk(KERN_INFO "entering ioctl_enum_frameintervals\n"); +- printk(KERN_INFO "index = %d, pixel_format = 0x%x," +- " width = %d, height = %d\n", +- frmi->index, frmi->pixel_format, +- frmi->width, frmi->height); +- printk(KERN_INFO "mt9t111 format = 0x%x\n", +- mt9t111_formats[0].pixelformat); +- + if (frmi->index >= NUM_CAPTURE_FRAMEINTERVALS) + return -EINVAL; + +@@ -379,7 +371,7 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on) + } + + if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_DETECTED)) +- mt9t111_configure(s); ++ mt9t111_loaddefault(c); + + if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_NOT_DETECTED)) { + rval = mt9t111_detect(c); +@@ -392,7 +384,6 @@ static int ioctl_s_power(struct v4l2_int_device *s, enum v4l2_power on) + dev_info(&c->dev, "chip version 0x%02x detected\n", rval); + sensor->state = SENSOR_DETECTED; + sensor->ver = rval; +- mt9t111_loaddefault(c); + } + return 0; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/0031-BeagleXM-Cam-Add-support-for-MT9V113-VGA-Sensor.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/0031-BeagleXM-Cam-Add-support-for-MT9V113-VGA-Sensor.patch new file mode 100644 index 0000000000..ccec95ce3e --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/0031-BeagleXM-Cam-Add-support-for-MT9V113-VGA-Sensor.patch @@ -0,0 +1,2441 @@ +From eed14c95dbe46b0e34b489ad5e0452654e0f1661 Mon Sep 17 00:00:00 2001 +From: Vaibhav Hiremath +Date: Wed, 7 Jul 2010 11:55:43 +0530 +Subject: [PATCH 31/71] BeagleXM:Cam: Add support for MT9V113 VGA Sensor + +This patch replaces the MT9T111 to MT9V113 sensor. +--- + arch/arm/mach-omap2/board-omap3beagle-camera.c | 132 ++- + arch/arm/mach-omap2/board-omap3beagle.c | 32 +- + drivers/media/video/Kconfig | 10 + + drivers/media/video/Makefile | 1 + + drivers/media/video/mt9v113.c | 1522 ++++++++++++++++++++++++ + drivers/media/video/mt9v113_regs.h | 294 +++++ + include/media/mt9v113.h | 83 ++ + include/media/v4l2-int-device.h | 27 + + 8 files changed, 2023 insertions(+), 78 deletions(-) + create mode 100644 drivers/media/video/mt9v113.c + create mode 100644 drivers/media/video/mt9v113_regs.h + create mode 100644 include/media/mt9v113.h + +diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c +index 8faa437..6c06265 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c ++++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c +@@ -37,7 +37,7 @@ + #include + + #include +-#include ++#include + + /* Include V4L2 ISP-Camera driver related header file */ + #include <../drivers/media/video/omap34xxcam.h> +@@ -50,99 +50,99 @@ + + #define CAM_USE_XCLKA 0 + +-#define ISP_MT9T111_MCLK 216000000 ++#define ISP_MT9V113_MCLK 216000000 + + #define LEOPARD_RESET_GPIO 98 + +-static struct regulator *beagle_mt9t111_1_8v1; +-static struct regulator *beagle_mt9t111_1_8v2; ++static struct regulator *beagle_mt9v113_1_8v1; ++static struct regulator *beagle_mt9v113_1_8v2; + +-#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) ++#if defined(CONFIG_VIDEO_MT9V113) || defined(CONFIG_VIDEO_MT9V113_MODULE) + + /* Arbitrary memory handling limit */ +-#define MT9T111_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN(2048 * 1536 * 4) ++#define MT9V113_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN(2048 * 1536 * 4) + +-static struct isp_interface_config mt9t111_if_config = { +- .ccdc_par_ser = ISP_PARLL, ++static struct isp_interface_config mt9v113_if_config = { ++ .ccdc_par_ser = ISP_PARLL, + .dataline_shift = 0x0, + .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE, + .strobe = 0x0, + .prestrobe = 0x0, + .shutter = 0x0, +- .cam_mclk = ISP_MT9T111_MCLK, ++ .cam_mclk = ISP_MT9V113_MCLK, + .wenlog = ISPCCDC_CFG_WENLOG_AND, + .wait_hs_vs = 2, + .u.par.par_bridge = 0x1, + .u.par.par_clk_pol = 0x0, + }; + +-static struct v4l2_ifparm mt9t111_ifparm_s = { ++static struct v4l2_ifparm mt9v113_ifparm_s = { + #if 1 +- .if_type = V4L2_IF_TYPE_RAW, ++ .if_type = V4L2_IF_TYPE_RAW, + .u = { +- .raw = { ++ .raw = { + .frame_start_on_rising_vs = 1, + .bt_sync_correct = 0, + .swap = 0, + .latch_clk_inv = 0, + .nobt_hs_inv = 0, /* active high */ + .nobt_vs_inv = 0, /* active high */ +- .clock_min = MT9T111_CLK_MIN, +- .clock_max = MT9T111_CLK_MAX, ++ .clock_min = MT9V113_CLK_MIN, ++ .clock_max = MT9V113_CLK_MAX, + }, + }, +-#else +- .if_type = V4L2_IF_TYPE_YCbCr, ++#else ++ .if_type = V4L2_IF_TYPE_YCbCr, + .u = { +- .ycbcr = { ++ .ycbcr = { + .frame_start_on_rising_vs = 1, + .bt_sync_correct = 0, + .swap = 0, + .latch_clk_inv = 0, + .nobt_hs_inv = 0, /* active high */ + .nobt_vs_inv = 0, /* active high */ +- .clock_min = MT9T111_CLK_MIN, +- .clock_max = MT9T111_CLK_MAX, ++ .clock_min = MT9V113_CLK_MIN, ++ .clock_max = MT9V113_CLK_MAX, + }, + }, + #endif + }; + + /** +- * @brief mt9t111_ifparm - Returns the mt9t111 interface parameters ++ * @brief mt9v113_ifparm - Returns the mt9v113 interface parameters + * + * @param p - pointer to v4l2_ifparm structure + * + * @return result of operation - 0 is success + */ +-static int mt9t111_ifparm(struct v4l2_ifparm *p) ++static int mt9v113_ifparm(struct v4l2_ifparm *p) + { + if (p == NULL) + return -EINVAL; + +- *p = mt9t111_ifparm_s; ++ *p = mt9v113_ifparm_s; + return 0; + } + + #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) +-static struct omap34xxcam_hw_config mt9t111_hwc = { ++static struct omap34xxcam_hw_config mt9v113_hwc = { + .dev_index = 0, + .dev_minor = 0, + .dev_type = OMAP34XXCAM_SLAVE_SENSOR, + .u.sensor.sensor_isp = 1, +- .u.sensor.capture_mem = MT9T111_BIGGEST_FRAME_BYTE_SIZE * 2, ++ .u.sensor.capture_mem = MT9V113_BIGGEST_FRAME_BYTE_SIZE * 2, + .u.sensor.ival_default = { 1, 10 }, + }; + #endif + + /** +- * @brief mt9t111_set_prv_data - Returns mt9t111 omap34xx driver private data ++ * @brief mt9v113_set_prv_data - Returns mt9v113 omap34xx driver private data + * + * @param priv - pointer to omap34xxcam_hw_config structure + * + * @return result of operation - 0 is success + */ +-static int mt9t111_set_prv_data(void *priv) ++static int mt9v113_set_prv_data(void *priv) + { + #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) + struct omap34xxcam_hw_config *hwc = priv; +@@ -150,10 +150,10 @@ static int mt9t111_set_prv_data(void *priv) + if (priv == NULL) + return -EINVAL; + +- hwc->u.sensor = mt9t111_hwc.u.sensor; +- hwc->dev_index = mt9t111_hwc.dev_index; +- hwc->dev_minor = mt9t111_hwc.dev_minor; +- hwc->dev_type = mt9t111_hwc.dev_type; ++ hwc->u.sensor = mt9v113_hwc.u.sensor; ++ hwc->dev_index = mt9v113_hwc.dev_index; ++ hwc->dev_minor = mt9v113_hwc.dev_minor; ++ hwc->dev_type = mt9v113_hwc.dev_type; + return 0; + #else + return -EINVAL; +@@ -161,13 +161,13 @@ static int mt9t111_set_prv_data(void *priv) + } + + /** +- * @brief mt9t111_power_set - Power-on or power-off TVP5146 device ++ * @brief mt9v113_power_set - Power-on or power-off TVP5146 device + * + * @param power - enum, Power on/off, resume/standby + * + * @return result of operation - 0 is success + */ +-static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) ++static int mt9v113_power_set(struct v4l2_int_device *s, enum v4l2_power power) + { + struct omap34xxcam_videodev *vdev = s->u.slave->master->priv; + +@@ -176,32 +176,32 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) + case V4L2_POWER_STANDBY: + isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA); + +- if (regulator_is_enabled(beagle_mt9t111_1_8v1)) +- regulator_disable(beagle_mt9t111_1_8v1); +- if (regulator_is_enabled(beagle_mt9t111_1_8v2)) +- regulator_disable(beagle_mt9t111_1_8v2); ++ if (regulator_is_enabled(beagle_mt9v113_1_8v1)) ++ regulator_disable(beagle_mt9v113_1_8v1); ++ if (regulator_is_enabled(beagle_mt9v113_1_8v2)) ++ regulator_disable(beagle_mt9v113_1_8v2); + break; + + case V4L2_POWER_ON: + #if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) +- isp_configure_interface(vdev->cam->isp, &mt9t111_if_config); ++ isp_configure_interface(vdev->cam->isp, &mt9v113_if_config); + #endif + + /* Set RESET_BAR to 0 */ + gpio_set_value(LEOPARD_RESET_GPIO, 0); + + /* turn on VDD */ +- regulator_enable(beagle_mt9t111_1_8v1); ++ regulator_enable(beagle_mt9v113_1_8v1); + + mdelay(1); + + /* turn on VDD_IO */ +- regulator_enable(beagle_mt9t111_1_8v2); ++ regulator_enable(beagle_mt9v113_1_8v2); + + mdelay(50); + + /* Enable EXTCLK */ +- isp_set_xclk(vdev->cam->isp, MT9T111_CLK_MIN, CAM_USE_XCLKA); ++ isp_set_xclk(vdev->cam->isp, MT9V113_CLK_MIN, CAM_USE_XCLKA); + + /* + * Wait at least 70 CLK cycles (w/EXTCLK = 6MHz, or CLK_MIN): +@@ -229,44 +229,48 @@ static int mt9t111_power_set(struct v4l2_int_device *s, enum v4l2_power power) + return 0; + } + +-struct mt9t111_platform_data mt9t111_pdata = { ++struct mt9v113_platform_data mt9v113_pdata = { + .master = "omap34xxcam", +- .power_set = mt9t111_power_set, +- .priv_data_set = mt9t111_set_prv_data, +- .ifparm = mt9t111_ifparm, ++ .power_set = mt9v113_power_set, ++ .priv_data_set = mt9v113_set_prv_data, ++ .ifparm = mt9v113_ifparm, + /* Some interface dependent params */ + .clk_polarity = 0, /* data clocked out on falling edge */ + .hs_polarity = 1, /* 0 - Active low, 1- Active high */ + .vs_polarity = 1, /* 0 - Active low, 1- Active high */ + }; + +-#endif /* #ifdef CONFIG_VIDEO_MT9T111 */ ++#endif /* #ifdef CONFIG_VIDEO_MT9V113 */ + + + static int beagle_cam_probe(struct platform_device *pdev) + { + int err; + +- beagle_mt9t111_1_8v1 = regulator_get(&pdev->dev, "vaux3_1"); +- if (IS_ERR(beagle_mt9t111_1_8v1)) { ++ printk("%s:%d\n", __func__, __LINE__); ++ beagle_mt9v113_1_8v1 = regulator_get(&pdev->dev, "vaux3_1"); ++ if (IS_ERR(beagle_mt9v113_1_8v1)) { + dev_err(&pdev->dev, "vaux3_1 regulator missing\n"); +- return PTR_ERR(beagle_mt9t111_1_8v1); ++ return PTR_ERR(beagle_mt9v113_1_8v1); + } +- beagle_mt9t111_1_8v2 = regulator_get(&pdev->dev, "vaux4_1"); +- if (IS_ERR(beagle_mt9t111_1_8v2)) { ++ printk("%s:%d\n", __func__, __LINE__); ++ beagle_mt9v113_1_8v2 = regulator_get(&pdev->dev, "vaux4_1"); ++ if (IS_ERR(beagle_mt9v113_1_8v2)) { + dev_err(&pdev->dev, "vaux4_1 regulator missing\n"); +- regulator_put(beagle_mt9t111_1_8v1); +- return PTR_ERR(beagle_mt9t111_1_8v2); ++ regulator_put(beagle_mt9v113_1_8v1); ++ return PTR_ERR(beagle_mt9v113_1_8v2); + } + ++ printk("%s:%d\n", __func__, __LINE__); + if (gpio_request(LEOPARD_RESET_GPIO, "cam_rst") != 0) { + dev_err(&pdev->dev, "Could not request GPIO %d", + LEOPARD_RESET_GPIO); +- regulator_put(beagle_mt9t111_1_8v2); +- regulator_put(beagle_mt9t111_1_8v1); ++ regulator_put(beagle_mt9v113_1_8v2); ++ regulator_put(beagle_mt9v113_1_8v1); + return -ENODEV; + } + ++ printk("%s:%d\n", __func__, __LINE__); + /* set to output mode, default value 0 */ + gpio_direction_output(LEOPARD_RESET_GPIO, 0); + +@@ -277,12 +281,13 @@ static int beagle_cam_probe(struct platform_device *pdev) + + static int beagle_cam_remove(struct platform_device *pdev) + { +- if (regulator_is_enabled(beagle_mt9t111_1_8v1)) +- regulator_disable(beagle_mt9t111_1_8v1); +- regulator_put(beagle_mt9t111_1_8v1); +- if (regulator_is_enabled(beagle_mt9t111_1_8v2)) +- regulator_disable(beagle_mt9t111_1_8v2); +- regulator_put(beagle_mt9t111_1_8v2); ++ printk("%s:%d\n", __func__, __LINE__); ++ if (regulator_is_enabled(beagle_mt9v113_1_8v1)) ++ regulator_disable(beagle_mt9v113_1_8v1); ++ regulator_put(beagle_mt9v113_1_8v1); ++ if (regulator_is_enabled(beagle_mt9v113_1_8v2)) ++ regulator_disable(beagle_mt9v113_1_8v2); ++ regulator_put(beagle_mt9v113_1_8v2); + + gpio_free(LEOPARD_RESET_GPIO); + +@@ -355,9 +360,12 @@ static struct platform_driver beagle_cam_driver = { + */ + int __init omap3beaglelmb_init(void) + { ++ printk("%s:%d\n", __func__, __LINE__); + if (cpu_is_omap3630()) { +- platform_driver_register(&beagle_cam_driver); ++ printk("%s:%d\n", __func__, __LINE__); ++ platform_driver_register(&beagle_cam_driver); + } +- return 0; ++ printk("%s:%d\n", __func__, __LINE__); ++ return 0; + } + late_initcall(omap3beaglelmb_init); +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index af9b818..d4b0b0a 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -71,10 +71,10 @@ static struct omap_opp * _omap35x_l3_rate_table = NULL; + static struct omap_opp * _omap37x_l3_rate_table = NULL; + #endif /* CONFIG_PM */ + +-#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) ++#if defined(CONFIG_VIDEO_MT9V113) || defined(CONFIG_VIDEO_MT9V113_MODULE) + #include +-#include +-extern struct mt9t111_platform_data mt9t111_pdata; ++#include ++extern struct mt9v113_platform_data mt9v113_pdata; + #endif + + #define GPMC_CS0_BASE 0x60 +@@ -159,7 +159,7 @@ static void __init omap3beagle_ks8851_init(void) + printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n"); + return; + } +- ++ + spi_register_board_info(omap3beagle_zippy2_spi_board_info, + ARRAY_SIZE(omap3beagle_zippy2_spi_board_info)); + } +@@ -369,9 +369,9 @@ static int beagle_twl_gpio_setup(struct device *dev, + */ + + if (cpu_is_omap3630()) { +- /* Power on DVI, Serial and PWR led */ ++ /* Power on DVI, Serial and PWR led */ + gpio_request(gpio + 1, "nDVI_PWR_EN"); +- gpio_direction_output(gpio + 1, 0); ++ gpio_direction_output(gpio + 1, 0); + + /* Power on camera interface */ + gpio_request(gpio + 2, "CAM_EN"); +@@ -560,7 +560,7 @@ static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { + }, + }; + +- ++ + #if defined(CONFIG_EEPROM_AT24) || defined(CONFIG_EEPROM_AT24_MODULE) + #include + +@@ -594,10 +594,10 @@ static struct i2c_board_info __initdata beagle_zippy_i2c2_boardinfo[] = {}; + #endif + + static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { +-#if defined(CONFIG_VIDEO_MT9T111) || defined(CONFIG_VIDEO_MT9T111_MODULE) ++#if defined(CONFIG_VIDEO_MT9V113) || defined(CONFIG_VIDEO_MT9V113_MODULE) + { +- I2C_BOARD_INFO("mt9t111", MT9T111_I2C_ADDR), +- .platform_data = &mt9t111_pdata, ++ I2C_BOARD_INFO("mt9v113", MT9V113_I2C_ADDR), ++ .platform_data = &mt9v113_pdata, + }, + #endif + }; +@@ -606,7 +606,7 @@ static int __init omap3_beagle_i2c_init(void) + { + omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, + ARRAY_SIZE(beagle_i2c1_boardinfo)); +- if(!strcmp(expansionboard_name, "zippy") || !strcmp(expansionboard_name, "zippy2")) ++ if(!strcmp(expansionboard_name, "zippy") || !strcmp(expansionboard_name, "zippy2")) + { + printk(KERN_INFO "Beagle expansionboard: registering i2c2 bus for zippy/zippy2\n"); + omap_register_i2c_bus(2, 400, beagle_zippy_i2c2_boardinfo, +@@ -681,7 +681,7 @@ static struct spi_board_info beaglefpga_mcspi_board_info[] = { + .modalias = "spidev", + .max_speed_hz = 48000000, //48 Mbps + .bus_num = 4, +- .chip_select = 0, ++ .chip_select = 0, + .mode = SPI_MODE_1, + }, + }; +@@ -830,7 +830,7 @@ static void __init omap3_beagle_init(void) + /* REVISIT leave DVI powered down until it's needed ... */ + gpio_direction_output(170, true); + +- if(!strcmp(expansionboard_name, "zippy")) ++ if(!strcmp(expansionboard_name, "zippy")) + { + printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); + omap3beagle_enc28j60_init(); +@@ -838,8 +838,8 @@ static void __init omap3_beagle_init(void) + mmc[1].gpio_wp = 141; + mmc[1].gpio_cd = 162; + } +- +- if(!strcmp(expansionboard_name, "zippy2")) ++ ++ if(!strcmp(expansionboard_name, "zippy2")) + { + printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); + omap3beagle_ks8851_init(); +@@ -880,7 +880,7 @@ static void __init omap3_beagle_init(void) + } + + if(!strcmp(expansionboard_name, "beaglefpga")) +- { ++ { + printk(KERN_INFO "Beagle expansionboard: Using McSPI for SPI\n"); + beaglefpga_init_spi(); + } +diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig +index f67ed46..c14d758 100644 +--- a/drivers/media/video/Kconfig ++++ b/drivers/media/video/Kconfig +@@ -329,6 +329,16 @@ config VIDEO_MT9V011 + mt0v011 1.3 Mpixel camera. It currently only works with the + em28xx driver. + ++config VIDEO_MT9V113 ++ tristate "Aptina MT9V113 VGA CMOS IMAGE SENSOR" ++ depends on VIDEO_V4L2 && I2C ++ ---help--- ++ This is a Video4Linux2 sensor-level driver for the Aptina MT9V113 ++ image sensor. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called mt9v113. ++ + config VIDEO_TCM825X + tristate "TCM825x camera sensor support" + depends on I2C && VIDEO_V4L2 +diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile +index 31688bf..763c157 100644 +--- a/drivers/media/video/Makefile ++++ b/drivers/media/video/Makefile +@@ -75,6 +75,7 @@ obj-$(CONFIG_VIDEO_OV7670) += ov7670.o + obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o + obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o + obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o ++obj-$(CONFIG_VIDEO_MT9V113) += mt9v113.o + + obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o + obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o +diff --git a/drivers/media/video/mt9v113.c b/drivers/media/video/mt9v113.c +new file mode 100644 +index 0000000..755a88a +--- /dev/null ++++ b/drivers/media/video/mt9v113.c +@@ -0,0 +1,1522 @@ ++/* ++ * drivers/media/video/mt9v113.c ++ * ++ * Based on TI TVP5146/47 decoder driver ++ * ++ * ++ * This package is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "mt9v113_regs.h" ++ ++/* Module Name */ ++#define MT9V113_MODULE_NAME "mt9v113" ++ ++/* Private macros for TVP */ ++#define I2C_RETRY_COUNT (5) ++#define LOCK_RETRY_COUNT (5) ++#define LOCK_RETRY_DELAY (200) ++ ++/* Debug functions */ ++static int debug = 1; ++module_param(debug, bool, 0644); ++MODULE_PARM_DESC(debug, "Debug level (0-1)"); ++ ++#define dump_reg(client, reg, val) \ ++ do { \ ++ val = mt9v113_read_reg(client, reg); \ ++ v4l_info(client, "Reg(0x%.2X): 0x%.2X\n", reg, val); \ ++ } while (0) ++ ++/** ++ * enum mt9v113_std - enum for supported standards ++ */ ++enum mt9v113_std { ++ MT9V113_STD_VGA = 0, ++ MT9V113_STD_QVGA, ++ MT9V113_STD_INVALID ++}; ++ ++/** ++ * enum mt9v113_state - enum for different decoder states ++ */ ++enum mt9v113_state { ++ STATE_NOT_DETECTED, ++ STATE_DETECTED ++}; ++ ++/** ++ * struct mt9v113_std_info - Structure to store standard informations ++ * @width: Line width in pixels ++ * @height:Number of active lines ++ * @video_std: Value to write in REG_VIDEO_STD register ++ * @standard: v4l2 standard structure information ++ */ ++struct mt9v113_std_info { ++ unsigned long width; ++ unsigned long height; ++ u8 video_std; ++ struct v4l2_standard standard; ++}; ++ ++/** ++ * struct mt9v113_decoded - decoder object ++ * @v4l2_int_device: Slave handle ++ * @pdata: Board specific ++ * @client: I2C client data ++ * @id: Entry from I2C table ++ * @ver: Chip version ++ * @state: decoder state - detected or not-detected ++ * @pix: Current pixel format ++ * @num_fmts: Number of formats ++ * @fmt_list: Format list ++ * @current_std: Current standard ++ * @num_stds: Number of standards ++ * @std_list: Standards list ++ * @route: input and output routing at chip level ++ */ ++struct mt9v113_decoder { ++ struct v4l2_int_device *v4l2_int_device; ++ const struct mt9v113_platform_data *pdata; ++ struct i2c_client *client; ++ ++ struct i2c_device_id *id; ++ ++ int ver; ++ enum mt9v113_state state; ++ ++ struct v4l2_pix_format pix; ++ int num_fmts; ++ const struct v4l2_fmtdesc *fmt_list; ++ ++ enum mt9v113_std current_std; ++ int num_stds; ++ struct mt9v113_std_info *std_list; ++ ++ struct v4l2_routing route; ++}; ++ ++/* MT9V113 register set for VGA mode */ ++static struct mt9v113_reg mt9v113_vga_reg[] = { ++ {TOK_WRITE, 0x098C, 0x2739}, ++ {TOK_WRITE, 0x0990, 0x0000}, ++ {TOK_WRITE, 0x098C, 0x273B}, ++ {TOK_WRITE, 0x0990, 0x027F}, ++ {TOK_WRITE, 0x098C, 0x273D}, ++ {TOK_WRITE, 0x0990, 0x0000}, ++ {TOK_WRITE, 0x098C, 0x273F}, ++ {TOK_WRITE, 0x0990, 0x01DF}, ++ {TOK_WRITE, 0x098C, 0x2703}, ++ {TOK_WRITE, 0x0990, 0x0280}, ++ {TOK_WRITE, 0x098C, 0x2705}, ++ {TOK_WRITE, 0x0990, 0x01E0}, ++ {TOK_WRITE, 0x098C, 0xA103}, ++ {TOK_WRITE, 0x0990, 0x0005}, ++ {TOK_DELAY, 0, 100}, ++ {TOK_TERM, 0, 0}, ++}; ++ ++/* MT9V113 default register values */ ++static struct mt9v113_reg mt9v113_reg_list[] = { ++ {TOK_WRITE, 0x0018, 0x4028}, ++ {TOK_DELAY, 0, 100}, ++ {TOK_WRITE, 0x001A, 0x0011}, ++ {TOK_WRITE, 0x001A, 0x0010}, ++ {TOK_WRITE, 0x0018, 0x4028}, ++ {TOK_DELAY, 0, 100}, ++ {TOK_WRITE, 0x098C, 0x02F0}, ++ {TOK_WRITE, 0x0990, 0x0000}, ++ {TOK_WRITE, 0x098C, 0x02F2}, ++ {TOK_WRITE, 0x0990, 0x0210}, ++ {TOK_WRITE, 0x098C, 0x02F4}, ++ {TOK_WRITE, 0x0990, 0x001A}, ++ {TOK_WRITE, 0x098C, 0x2145}, ++ {TOK_WRITE, 0x0990, 0x02F4}, ++ {TOK_WRITE, 0x098C, 0xA134}, ++ {TOK_WRITE, 0x0990, 0x0001}, ++ {TOK_WRITE, 0x31E0, 0x0001}, ++ {TOK_WRITE, 0x001A, 0x0210}, ++ {TOK_WRITE, 0x001E, 0x0777}, ++ {TOK_WRITE, 0x0016, 0x42DF}, ++ {TOK_WRITE, 0x0014, 0x2145}, ++ {TOK_WRITE, 0x0014, 0x2145}, ++ {TOK_WRITE, 0x0010, 0x0431}, ++ {TOK_WRITE, 0x0012, 0x0000}, ++ {TOK_WRITE, 0x0014, 0x244B}, ++ {TOK_WRITE, 0x0014, 0x304B}, ++ {TOK_DELAY, 0, 100}, ++ {TOK_WRITE, 0x0014, 0xB04A}, ++ {TOK_WRITE, 0x098C, 0xAB1F}, ++ {TOK_WRITE, 0x0990, 0x00C7}, ++ {TOK_WRITE, 0x098C, 0xAB31}, ++ {TOK_WRITE, 0x0990, 0x001E}, ++ {TOK_WRITE, 0x098C, 0x274F}, ++ {TOK_WRITE, 0x0990, 0x0004}, ++ {TOK_WRITE, 0x098C, 0x2741}, ++ {TOK_WRITE, 0x0990, 0x0004}, ++ {TOK_WRITE, 0x098C, 0xAB20}, ++ {TOK_WRITE, 0x0990, 0x0054}, ++ {TOK_WRITE, 0x098C, 0xAB21}, ++ {TOK_WRITE, 0x0990, 0x0046}, ++ {TOK_WRITE, 0x098C, 0xAB22}, ++ {TOK_WRITE, 0x0990, 0x0002}, ++ {TOK_WRITE, 0x098C, 0xAB24}, ++ {TOK_WRITE, 0x0990, 0x0005}, ++ {TOK_WRITE, 0x098C, 0x2B28}, ++ {TOK_WRITE, 0x0990, 0x170C}, ++ {TOK_WRITE, 0x098C, 0x2B2A}, ++ {TOK_WRITE, 0x0990, 0x3E80}, ++ {TOK_WRITE, 0x3210, 0x09A8}, ++ {TOK_WRITE, 0x098C, 0x2306}, ++ {TOK_WRITE, 0x0990, 0x0315}, ++ {TOK_WRITE, 0x098C, 0x2308}, ++ {TOK_WRITE, 0x0990, 0xFDDC}, ++ {TOK_WRITE, 0x098C, 0x230A}, ++ {TOK_WRITE, 0x0990, 0x003A}, ++ {TOK_WRITE, 0x098C, 0x230C}, ++ {TOK_WRITE, 0x0990, 0xFF58}, ++ {TOK_WRITE, 0x098C, 0x230E}, ++ {TOK_WRITE, 0x0990, 0x02B7}, ++ {TOK_WRITE, 0x098C, 0x2310}, ++ {TOK_WRITE, 0x0990, 0xFF31}, ++ {TOK_WRITE, 0x098C, 0x2312}, ++ {TOK_WRITE, 0x0990, 0xFF4C}, ++ {TOK_WRITE, 0x098C, 0x2314}, ++ {TOK_WRITE, 0x0990, 0xFE4C}, ++ {TOK_WRITE, 0x098C, 0x2316}, ++ {TOK_WRITE, 0x0990, 0x039E}, ++ {TOK_WRITE, 0x098C, 0x2318}, ++ {TOK_WRITE, 0x0990, 0x001C}, ++ {TOK_WRITE, 0x098C, 0x231A}, ++ {TOK_WRITE, 0x0990, 0x0039}, ++ {TOK_WRITE, 0x098C, 0x231C}, ++ {TOK_WRITE, 0x0990, 0x007F}, ++ {TOK_WRITE, 0x098C, 0x231E}, ++ {TOK_WRITE, 0x0990, 0xFF77}, ++ {TOK_WRITE, 0x098C, 0x2320}, ++ {TOK_WRITE, 0x0990, 0x000A}, ++ {TOK_WRITE, 0x098C, 0x2322}, ++ {TOK_WRITE, 0x0990, 0x0020}, ++ {TOK_WRITE, 0x098C, 0x2324}, ++ {TOK_WRITE, 0x0990, 0x001B}, ++ {TOK_WRITE, 0x098C, 0x2326}, ++ {TOK_WRITE, 0x0990, 0xFFC6}, ++ {TOK_WRITE, 0x098C, 0x2328}, ++ {TOK_WRITE, 0x0990, 0x0086}, ++ {TOK_WRITE, 0x098C, 0x232A}, ++ {TOK_WRITE, 0x0990, 0x00B5}, ++ {TOK_WRITE, 0x098C, 0x232C}, ++ {TOK_WRITE, 0x0990, 0xFEC3}, ++ {TOK_WRITE, 0x098C, 0x232E}, ++ {TOK_WRITE, 0x0990, 0x0001}, ++ {TOK_WRITE, 0x098C, 0x2330}, ++ {TOK_WRITE, 0x0990, 0xFFEF}, ++ {TOK_WRITE, 0x098C, 0xA348}, ++ {TOK_WRITE, 0x0990, 0x0008}, ++ {TOK_WRITE,