diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-13 19:10:35 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-13 19:10:35 -0400 |
commit | c77ef898625f558c89c6ca0b27e2032f0fad4196 (patch) | |
tree | 28584a77d2e2d4345f292a31d47bdf2321df697d /arch/arm/mach-exynos/mach-universal_c210.c | |
parent | c454f813501b94cd687bf3c5c0783f815a854905 (diff) | |
parent | bae82bdfb1edb2d709bd4ba0bda1ed0bb474f5e1 (diff) |
Merge branch 'next/board-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/boards
* 'next/board-samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (32 commits)
ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board
ARM: EXYNOS: Register JPEG on nuri
ARM: EXYNOS: Register JPEG on universal_c210
ARM: S5PV210: Enable JPEG on SMDKV210
ARM: S5PV210: Add JPEG board definition
ARM: EXYNOS: Enable JPEG on Origen
ARM: EXYNOS: Enable JPEG on SMDKV310
ARM: EXYNOS: Add __init attribute to universal_camera_init()
ARM: EXYNOS: Add __init attribute to nuri_camera_init()
ARM: S5PV210: Enable FIMC on SMDKC110
ARM: S5PV210: Enable FIMC on SMDKV210
ARM: S5PV210: Enable MFC on SMDKC110
ARM: S5PV210: Enable MFC on SMDKV210
ARM: EXYNOS: Enable G2D on SMDKV310
ARM: S3C64XX: Supply platform data for SPI on Cragganmore
ARM: S3C64XX: Add some more Cragganmore module IDs to the table
ARM: EXYNOS: Add missing FIMC media device to Origen
ARM: EXYNOS: Add missing FIMC media device to SMDKV310
ARM: S5PV210: Add missing FIMC media device to Aquila
ARM: SAMSUNG: Add support for S5K6AAFX camera on Nuri board
...
Diffstat (limited to 'arch/arm/mach-exynos/mach-universal_c210.c')
-rw-r--r-- | arch/arm/mach-exynos/mach-universal_c210.c | 80 |
1 files changed, 75 insertions, 5 deletions
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c index 0fc65ffde8ff..5b79d8be6633 100644 --- a/arch/arm/mach-exynos/mach-universal_c210.c +++ b/arch/arm/mach-exynos/mach-universal_c210.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <media/v4l2-mediabus.h> | 46 | #include <media/v4l2-mediabus.h> |
47 | #include <media/s5p_fimc.h> | 47 | #include <media/s5p_fimc.h> |
48 | #include <media/m5mols.h> | 48 | #include <media/m5mols.h> |
49 | #include <media/s5k6aa.h> | ||
49 | 50 | ||
50 | #include "common.h" | 51 | #include "common.h" |
51 | 52 | ||
@@ -122,8 +123,10 @@ static struct regulator_consumer_supply lp3974_buck1_consumer = | |||
122 | static struct regulator_consumer_supply lp3974_buck2_consumer = | 123 | static struct regulator_consumer_supply lp3974_buck2_consumer = |
123 | REGULATOR_SUPPLY("vddg3d", NULL); | 124 | REGULATOR_SUPPLY("vddg3d", NULL); |
124 | 125 | ||
125 | static struct regulator_consumer_supply lp3974_buck3_consumer = | 126 | static struct regulator_consumer_supply lp3974_buck3_consumer[] = { |
126 | REGULATOR_SUPPLY("vdet", "s5p-sdo"); | 127 | REGULATOR_SUPPLY("vdet", "s5p-sdo"), |
128 | REGULATOR_SUPPLY("vdd_reg", "0-003c"), | ||
129 | }; | ||
127 | 130 | ||
128 | static struct regulator_init_data lp3974_buck1_data = { | 131 | static struct regulator_init_data lp3974_buck1_data = { |
129 | .constraints = { | 132 | .constraints = { |
@@ -168,8 +171,8 @@ static struct regulator_init_data lp3974_buck3_data = { | |||
168 | .enabled = 1, | 171 | .enabled = 1, |
169 | }, | 172 | }, |
170 | }, | 173 | }, |
171 | .num_consumer_supplies = 1, | 174 | .num_consumer_supplies = ARRAY_SIZE(lp3974_buck3_consumer), |
172 | .consumer_supplies = &lp3974_buck3_consumer, | 175 | .consumer_supplies = lp3974_buck3_consumer, |
173 | }; | 176 | }; |
174 | 177 | ||
175 | static struct regulator_init_data lp3974_buck4_data = { | 178 | static struct regulator_init_data lp3974_buck4_data = { |
@@ -302,6 +305,9 @@ static struct regulator_init_data lp3974_ldo8_data = { | |||
302 | .consumer_supplies = lp3974_ldo8_consumer, | 305 | .consumer_supplies = lp3974_ldo8_consumer, |
303 | }; | 306 | }; |
304 | 307 | ||
308 | static struct regulator_consumer_supply lp3974_ldo9_consumer = | ||
309 | REGULATOR_SUPPLY("vddio", "0-003c"); | ||
310 | |||
305 | static struct regulator_init_data lp3974_ldo9_data = { | 311 | static struct regulator_init_data lp3974_ldo9_data = { |
306 | .constraints = { | 312 | .constraints = { |
307 | .name = "VCC_2.8V", | 313 | .name = "VCC_2.8V", |
@@ -313,6 +319,8 @@ static struct regulator_init_data lp3974_ldo9_data = { | |||
313 | .enabled = 1, | 319 | .enabled = 1, |
314 | }, | 320 | }, |
315 | }, | 321 | }, |
322 | .num_consumer_supplies = 1, | ||
323 | .consumer_supplies = &lp3974_ldo9_consumer, | ||
316 | }; | 324 | }; |
317 | 325 | ||
318 | static struct regulator_init_data lp3974_ldo10_data = { | 326 | static struct regulator_init_data lp3974_ldo10_data = { |
@@ -411,6 +419,7 @@ static struct regulator_init_data lp3974_ldo15_data = { | |||
411 | }; | 419 | }; |
412 | 420 | ||
413 | static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { | 421 | static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { |
422 | REGULATOR_SUPPLY("vdda", "0-003c"), | ||
414 | REGULATOR_SUPPLY("a_sensor", "0-001f"), | 423 | REGULATOR_SUPPLY("a_sensor", "0-001f"), |
415 | }; | 424 | }; |
416 | 425 | ||
@@ -817,6 +826,8 @@ static struct s3c_fb_pd_win universal_fb_win0 = { | |||
817 | }, | 826 | }, |
818 | .max_bpp = 32, | 827 | .max_bpp = 32, |
819 | .default_bpp = 16, | 828 | .default_bpp = 16, |
829 | .virtual_x = 480, | ||
830 | .virtual_y = 2 * 800, | ||
820 | }; | 831 | }; |
821 | 832 | ||
822 | static struct s3c_fb_platdata universal_lcd_pdata __initdata = { | 833 | static struct s3c_fb_platdata universal_lcd_pdata __initdata = { |
@@ -828,6 +839,28 @@ static struct s3c_fb_platdata universal_lcd_pdata __initdata = { | |||
828 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | 839 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, |
829 | }; | 840 | }; |
830 | 841 | ||
842 | static struct regulator_consumer_supply cam_vt_dio_supply = | ||
843 | REGULATOR_SUPPLY("vdd_core", "0-003c"); | ||
844 | |||
845 | static struct regulator_init_data cam_vt_dio_reg_init_data = { | ||
846 | .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS }, | ||
847 | .num_consumer_supplies = 1, | ||
848 | .consumer_supplies = &cam_vt_dio_supply, | ||
849 | }; | ||
850 | |||
851 | static struct fixed_voltage_config cam_vt_dio_fixed_voltage_cfg = { | ||
852 | .supply_name = "CAM_VT_D_IO", | ||
853 | .microvolts = 2800000, | ||
854 | .gpio = EXYNOS4_GPE2(1), /* CAM_PWR_EN2 */ | ||
855 | .enable_high = 1, | ||
856 | .init_data = &cam_vt_dio_reg_init_data, | ||
857 | }; | ||
858 | |||
859 | static struct platform_device cam_vt_dio_fixed_reg_dev = { | ||
860 | .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_DIO, | ||
861 | .dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg }, | ||
862 | }; | ||
863 | |||
831 | static struct regulator_consumer_supply cam_i_core_supply = | 864 | static struct regulator_consumer_supply cam_i_core_supply = |
832 | REGULATOR_SUPPLY("core", "0-001f"); | 865 | REGULATOR_SUPPLY("core", "0-001f"); |
833 | 866 | ||
@@ -883,6 +916,28 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = { | |||
883 | #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) | 916 | #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3) |
884 | #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */ | 917 | #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5) /* XEINT_13 */ |
885 | #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5) | 918 | #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5) |
919 | #define GPIO_CAM_VGA_NRST EXYNOS4_GPE4(7) | ||
920 | #define GPIO_CAM_VGA_NSTBY EXYNOS4_GPE4(6) | ||
921 | |||
922 | static int s5k6aa_set_power(int on) | ||
923 | { | ||
924 | gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on); | ||
925 | return 0; | ||
926 | } | ||
927 | |||
928 | static struct s5k6aa_platform_data s5k6aa_platdata = { | ||
929 | .mclk_frequency = 21600000UL, | ||
930 | .gpio_reset = { GPIO_CAM_VGA_NRST, 0 }, | ||
931 | .gpio_stby = { GPIO_CAM_VGA_NSTBY, 0 }, | ||
932 | .bus_type = V4L2_MBUS_PARALLEL, | ||
933 | .horiz_flip = 1, | ||
934 | .set_power = s5k6aa_set_power, | ||
935 | }; | ||
936 | |||
937 | static struct i2c_board_info s5k6aa_board_info = { | ||
938 | I2C_BOARD_INFO("S5K6AA", 0x3C), | ||
939 | .platform_data = &s5k6aa_platdata, | ||
940 | }; | ||
886 | 941 | ||
887 | static int m5mols_set_power(struct device *dev, int on) | 942 | static int m5mols_set_power(struct device *dev, int on) |
888 | { | 943 | { |
@@ -907,6 +962,14 @@ static struct s5p_fimc_isp_info universal_camera_sensors[] = { | |||
907 | .mux_id = 0, | 962 | .mux_id = 0, |
908 | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | | 963 | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | |
909 | V4L2_MBUS_VSYNC_ACTIVE_LOW, | 964 | V4L2_MBUS_VSYNC_ACTIVE_LOW, |
965 | .bus_type = FIMC_ITU_601, | ||
966 | .board_info = &s5k6aa_board_info, | ||
967 | .i2c_bus_num = 0, | ||
968 | .clk_frequency = 24000000UL, | ||
969 | }, { | ||
970 | .mux_id = 0, | ||
971 | .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | | ||
972 | V4L2_MBUS_VSYNC_ACTIVE_LOW, | ||
910 | .bus_type = FIMC_MIPI_CSI2, | 973 | .bus_type = FIMC_MIPI_CSI2, |
911 | .board_info = &m5mols_board_info, | 974 | .board_info = &m5mols_board_info, |
912 | .i2c_bus_num = 0, | 975 | .i2c_bus_num = 0, |
@@ -925,9 +988,11 @@ static struct gpio universal_camera_gpios[] = { | |||
925 | { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" }, | 988 | { GPIO_CAM_LEVEL_EN(2), GPIOF_OUT_INIT_LOW, "CAM_LVL_EN2" }, |
926 | { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, | 989 | { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, |
927 | { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, | 990 | { GPIO_CAM_MEGA_nRST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, |
991 | { GPIO_CAM_VGA_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" }, | ||
992 | { GPIO_CAM_VGA_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" }, | ||
928 | }; | 993 | }; |
929 | 994 | ||
930 | static void universal_camera_init(void) | 995 | static void __init universal_camera_init(void) |
931 | { | 996 | { |
932 | s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), | 997 | s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), |
933 | &s5p_device_mipi_csis0); | 998 | &s5p_device_mipi_csis0); |
@@ -948,6 +1013,8 @@ static void universal_camera_init(void) | |||
948 | /* Free GPIOs controlled directly by the sensor drivers. */ | 1013 | /* Free GPIOs controlled directly by the sensor drivers. */ |
949 | gpio_free(GPIO_CAM_MEGA_nRST); | 1014 | gpio_free(GPIO_CAM_MEGA_nRST); |
950 | gpio_free(GPIO_CAM_8M_ISP_INT); | 1015 | gpio_free(GPIO_CAM_8M_ISP_INT); |
1016 | gpio_free(GPIO_CAM_VGA_NRST); | ||
1017 | gpio_free(GPIO_CAM_VGA_NSTBY); | ||
951 | 1018 | ||
952 | if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) | 1019 | if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) |
953 | pr_err("Camera port A setup failed\n"); | 1020 | pr_err("Camera port A setup failed\n"); |
@@ -960,6 +1027,7 @@ static struct platform_device *universal_devices[] __initdata = { | |||
960 | &s5p_device_fimc1, | 1027 | &s5p_device_fimc1, |
961 | &s5p_device_fimc2, | 1028 | &s5p_device_fimc2, |
962 | &s5p_device_fimc3, | 1029 | &s5p_device_fimc3, |
1030 | &s5p_device_g2d, | ||
963 | &mmc0_fixed_voltage, | 1031 | &mmc0_fixed_voltage, |
964 | &s3c_device_hsmmc0, | 1032 | &s3c_device_hsmmc0, |
965 | &s3c_device_hsmmc2, | 1033 | &s3c_device_hsmmc2, |
@@ -979,12 +1047,14 @@ static struct platform_device *universal_devices[] __initdata = { | |||
979 | &universal_gpio_keys, | 1047 | &universal_gpio_keys, |
980 | &s5p_device_onenand, | 1048 | &s5p_device_onenand, |
981 | &s5p_device_fimd0, | 1049 | &s5p_device_fimd0, |
1050 | &s5p_device_jpeg, | ||
982 | &s5p_device_mfc, | 1051 | &s5p_device_mfc, |
983 | &s5p_device_mfc_l, | 1052 | &s5p_device_mfc_l, |
984 | &s5p_device_mfc_r, | 1053 | &s5p_device_mfc_r, |
985 | &exynos4_device_pd[PD_MFC], | 1054 | &exynos4_device_pd[PD_MFC], |
986 | &exynos4_device_pd[PD_LCD0], | 1055 | &exynos4_device_pd[PD_LCD0], |
987 | &exynos4_device_pd[PD_CAM], | 1056 | &exynos4_device_pd[PD_CAM], |
1057 | &cam_vt_dio_fixed_reg_dev, | ||
988 | &cam_i_core_fixed_reg_dev, | 1058 | &cam_i_core_fixed_reg_dev, |
989 | &cam_s_if_fixed_reg_dev, | 1059 | &cam_s_if_fixed_reg_dev, |
990 | &s5p_device_fimc_md, | 1060 | &s5p_device_fimc_md, |