aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2011-09-26 18:18:55 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-04 05:58:40 -0400
commit39aefabbc8b3fbe2e339b97c8dac73a895077661 (patch)
treeb0e26bd226d984ffcd5552e2fd6d9c8af8148a90
parentb74f2fb5147baea65f554afcc73e3688e49b8112 (diff)
ARM: S5PV210: Add support for NOON010PC30 sensor on GONI board
Add platform data for CIF camera sensor and FIMC platform data entries for it. Add platform device for s5p-fimc media device driver and the camera port A I/O pins initialization. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-s5pv210/Kconfig1
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c53
2 files changed, 54 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 18f3a6815e54..e2d1d9e9a498 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -100,6 +100,7 @@ config MACH_GONI
100 select S5PV210_SETUP_I2C2 100 select S5PV210_SETUP_I2C2
101 select S5PV210_SETUP_KEYPAD 101 select S5PV210_SETUP_KEYPAD
102 select S5PV210_SETUP_SDHCI 102 select S5PV210_SETUP_SDHCI
103 select S5PV210_SETUP_FIMC
103 help 104 help
104 Machine support for Samsung GONI board 105 Machine support for Samsung GONI board
105 S5PC110(MCP) is one of package option of S5PV210 106 S5PC110(MCP) is one of package option of S5PV210
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 14578f567c83..01e4867e25ad 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -48,6 +48,11 @@
48#include <plat/s5p-time.h> 48#include <plat/s5p-time.h>
49#include <plat/mfc.h> 49#include <plat/mfc.h>
50#include <plat/regs-fb-v4.h> 50#include <plat/regs-fb-v4.h>
51#include <plat/camport.h>
52
53#include <media/v4l2-mediabus.h>
54#include <media/s5p_fimc.h>
55#include <media/noon010pc30.h>
51 56
52/* Following are default values for UCON, ULCON and UFCON UART registers */ 57/* Following are default values for UCON, ULCON and UFCON UART registers */
53#define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 58#define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -272,6 +277,14 @@ static void __init goni_tsp_init(void)
272 i2c2_devs[0].irq = gpio_to_irq(gpio); 277 i2c2_devs[0].irq = gpio_to_irq(gpio);
273} 278}
274 279
280static void goni_camera_init(void)
281{
282 s5pv210_fimc_setup_gpio(S5P_CAMPORT_A);
283
284 /* Set max driver strength on CAM_A_CLKOUT pin. */
285 s5p_gpio_set_drvstr(S5PV210_GPE1(3), S5P_GPIO_DRVSTR_LV4);
286}
287
275/* MAX8998 regulators */ 288/* MAX8998 regulators */
276#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) 289#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
277 290
@@ -808,6 +821,39 @@ static void goni_setup_sdhci(void)
808 s3c_sdhci2_set_platdata(&goni_hsmmc2_data); 821 s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
809}; 822};
810 823
824static struct noon010pc30_platform_data noon010pc30_pldata = {
825 .clk_rate = 16000000UL,
826 .gpio_nreset = S5PV210_GPB(2), /* CAM_CIF_NRST */
827 .gpio_nstby = S5PV210_GPB(0), /* CAM_CIF_NSTBY */
828};
829
830static struct i2c_board_info noon010pc30_board_info = {
831 I2C_BOARD_INFO("NOON010PC30", 0x60 >> 1),
832 .platform_data = &noon010pc30_pldata,
833};
834
835static struct s5p_fimc_isp_info goni_camera_sensors[] = {
836 {
837 .mux_id = 0,
838 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
839 V4L2_MBUS_VSYNC_ACTIVE_LOW,
840 .bus_type = FIMC_ITU_601,
841 .board_info = &noon010pc30_board_info,
842 .i2c_bus_num = 0,
843 .clk_frequency = 16000000UL,
844 },
845};
846
847struct s5p_platform_fimc goni_fimc_md_platdata __initdata = {
848 .isp_info = goni_camera_sensors,
849 .num_clients = ARRAY_SIZE(goni_camera_sensors),
850};
851
852struct platform_device s5p_device_fimc_md = {
853 .name = "s5p-fimc-md",
854 .id = -1,
855};
856
811static struct platform_device *goni_devices[] __initdata = { 857static struct platform_device *goni_devices[] __initdata = {
812 &s3c_device_fb, 858 &s3c_device_fb,
813 &s5p_device_onenand, 859 &s5p_device_onenand,
@@ -825,6 +871,7 @@ static struct platform_device *goni_devices[] __initdata = {
825 &s5p_device_fimc0, 871 &s5p_device_fimc0,
826 &s5p_device_fimc1, 872 &s5p_device_fimc1,
827 &s5p_device_fimc2, 873 &s5p_device_fimc2,
874 &s5p_device_fimc_md,
828 &s3c_device_hsmmc0, 875 &s3c_device_hsmmc0,
829 &s3c_device_hsmmc1, 876 &s3c_device_hsmmc1,
830 &s3c_device_hsmmc2, 877 &s3c_device_hsmmc2,
@@ -893,6 +940,12 @@ static void __init goni_machine_init(void)
893 /* FB */ 940 /* FB */
894 s3c_fb_set_platdata(&goni_lcd_pdata); 941 s3c_fb_set_platdata(&goni_lcd_pdata);
895 942
943 /* FIMC */
944 s3c_set_platdata(&goni_fimc_md_platdata, sizeof(goni_fimc_md_platdata),
945 &s5p_device_fimc_md);
946
947 goni_camera_init();
948
896 /* SPI */ 949 /* SPI */
897 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); 950 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
898 951