aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-03-13 19:10:35 -0400
committerOlof Johansson <olof@lixom.net>2012-03-13 19:10:35 -0400
commitc77ef898625f558c89c6ca0b27e2032f0fad4196 (patch)
tree28584a77d2e2d4345f292a31d47bdf2321df697d /arch/arm/mach-exynos
parentc454f813501b94cd687bf3c5c0783f815a854905 (diff)
parentbae82bdfb1edb2d709bd4ba0bda1ed0bb474f5e1 (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')
-rw-r--r--arch/arm/mach-exynos/Kconfig10
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c80
-rw-r--r--arch/arm/mach-exynos/mach-origen.c37
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c3
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c80
5 files changed, 201 insertions, 9 deletions
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5d602f68a0e..1f81bfa15ff 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -183,7 +183,9 @@ config MACH_SMDKV310
183 select S5P_DEV_FIMC1 183 select S5P_DEV_FIMC1
184 select S5P_DEV_FIMC2 184 select S5P_DEV_FIMC2
185 select S5P_DEV_FIMC3 185 select S5P_DEV_FIMC3
186 select S5P_DEV_G2D
186 select S5P_DEV_I2C_HDMIPHY 187 select S5P_DEV_I2C_HDMIPHY
188 select S5P_DEV_JPEG
187 select S5P_DEV_MFC 189 select S5P_DEV_MFC
188 select S5P_DEV_TV 190 select S5P_DEV_TV
189 select S5P_DEV_USB_EHCI 191 select S5P_DEV_USB_EHCI
@@ -230,7 +232,9 @@ config MACH_UNIVERSAL_C210
230 select S5P_DEV_FIMC1 232 select S5P_DEV_FIMC1
231 select S5P_DEV_FIMC2 233 select S5P_DEV_FIMC2
232 select S5P_DEV_FIMC3 234 select S5P_DEV_FIMC3
235 select S5P_DEV_G2D
233 select S5P_DEV_CSIS0 236 select S5P_DEV_CSIS0
237 select S5P_DEV_JPEG
234 select S5P_DEV_FIMD0 238 select S5P_DEV_FIMD0
235 select S3C_DEV_HSMMC 239 select S3C_DEV_HSMMC
236 select S3C_DEV_HSMMC2 240 select S3C_DEV_HSMMC2
@@ -268,11 +272,14 @@ config MACH_NURI
268 select S3C_DEV_I2C1 272 select S3C_DEV_I2C1
269 select S3C_DEV_I2C3 273 select S3C_DEV_I2C3
270 select S3C_DEV_I2C5 274 select S3C_DEV_I2C5
275 select S3C_DEV_I2C6
271 select S5P_DEV_CSIS0 276 select S5P_DEV_CSIS0
277 select S5P_DEV_JPEG
272 select S5P_DEV_FIMC0 278 select S5P_DEV_FIMC0
273 select S5P_DEV_FIMC1 279 select S5P_DEV_FIMC1
274 select S5P_DEV_FIMC2 280 select S5P_DEV_FIMC2
275 select S5P_DEV_FIMC3 281 select S5P_DEV_FIMC3
282 select S5P_DEV_G2D
276 select S5P_DEV_MFC 283 select S5P_DEV_MFC
277 select S5P_DEV_USB_EHCI 284 select S5P_DEV_USB_EHCI
278 select S5P_SETUP_MIPIPHY 285 select S5P_SETUP_MIPIPHY
@@ -283,6 +290,7 @@ config MACH_NURI
283 select EXYNOS4_SETUP_I2C1 290 select EXYNOS4_SETUP_I2C1
284 select EXYNOS4_SETUP_I2C3 291 select EXYNOS4_SETUP_I2C3
285 select EXYNOS4_SETUP_I2C5 292 select EXYNOS4_SETUP_I2C5
293 select EXYNOS4_SETUP_I2C6
286 select EXYNOS4_SETUP_SDHCI 294 select EXYNOS4_SETUP_SDHCI
287 select EXYNOS4_SETUP_USB_PHY 295 select EXYNOS4_SETUP_USB_PHY
288 select S5P_SETUP_MIPIPHY 296 select S5P_SETUP_MIPIPHY
@@ -303,7 +311,9 @@ config MACH_ORIGEN
303 select S5P_DEV_FIMC2 311 select S5P_DEV_FIMC2
304 select S5P_DEV_FIMC3 312 select S5P_DEV_FIMC3
305 select S5P_DEV_FIMD0 313 select S5P_DEV_FIMD0
314 select S5P_DEV_G2D
306 select S5P_DEV_I2C_HDMIPHY 315 select S5P_DEV_I2C_HDMIPHY
316 select S5P_DEV_JPEG
307 select S5P_DEV_MFC 317 select S5P_DEV_MFC
308 select S5P_DEV_TV 318 select S5P_DEV_TV
309 select S5P_DEV_USB_EHCI 319 select S5P_DEV_USB_EHCI
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 435261f83f4..32bb7b37975 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -28,6 +28,7 @@
28 28
29#include <video/platform_lcd.h> 29#include <video/platform_lcd.h>
30#include <media/m5mols.h> 30#include <media/m5mols.h>
31#include <media/s5k6aa.h>
31#include <media/s5p_fimc.h> 32#include <media/s5p_fimc.h>
32#include <media/v4l2-mediabus.h> 33#include <media/v4l2-mediabus.h>
33 34
@@ -75,6 +76,7 @@ enum fixed_regulator_id {
75 FIXED_REG_ID_MAX8903, 76 FIXED_REG_ID_MAX8903,
76 FIXED_REG_ID_CAM_A28V, 77 FIXED_REG_ID_CAM_A28V,
77 FIXED_REG_ID_CAM_12V, 78 FIXED_REG_ID_CAM_12V,
79 FIXED_REG_ID_CAM_VT_15V,
78}; 80};
79 81
80static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = { 82static struct s3c2410_uartcfg nuri_uartcfgs[] __initdata = {
@@ -399,6 +401,9 @@ static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
399static struct regulator_consumer_supply __initdata max8997_ldo5_[] = { 401static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
400 REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */ 402 REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
401}; 403};
404static struct regulator_consumer_supply nuri_max8997_ldo6_consumer[] = {
405 REGULATOR_SUPPLY("vdd_reg", "6-003c"), /* S5K6AA camera */
406};
402static struct regulator_consumer_supply __initdata max8997_ldo7_[] = { 407static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
403 REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */ 408 REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
404}; 409};
@@ -431,7 +436,7 @@ static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
431 REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */ 436 REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
432}; 437};
433static struct regulator_consumer_supply __initdata max8997_buck2_[] = { 438static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
434 REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */ 439 REGULATOR_SUPPLY("vdd_int", "exynos4210-busfreq.0"), /* CPUFREQ */
435}; 440};
436static struct regulator_consumer_supply __initdata max8997_buck3_[] = { 441static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
437 REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */ 442 REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
@@ -546,6 +551,8 @@ static struct regulator_init_data __initdata max8997_ldo6_data = {
546 .enabled = 1, 551 .enabled = 1,
547 }, 552 },
548 }, 553 },
554 .num_consumer_supplies = ARRAY_SIZE(nuri_max8997_ldo6_consumer),
555 .consumer_supplies = nuri_max8997_ldo6_consumer,
549}; 556};
550 557
551static struct regulator_init_data __initdata max8997_ldo7_data = { 558static struct regulator_init_data __initdata max8997_ldo7_data = {
@@ -742,7 +749,7 @@ static struct regulator_init_data __initdata max8997_buck2_data = {
742 .constraints = { 749 .constraints = {
743 .name = "VINT_1.1V_C210", 750 .name = "VINT_1.1V_C210",
744 .min_uV = 900000, 751 .min_uV = 900000,
745 .max_uV = 1100000, 752 .max_uV = 1200000,
746 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, 753 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
747 .always_on = 1, 754 .always_on = 1,
748 .state_mem = { 755 .state_mem = {
@@ -957,7 +964,6 @@ static struct max8997_platform_data __initdata nuri_max8997_pdata = {
957 .regulators = nuri_max8997_regulators, 964 .regulators = nuri_max8997_regulators,
958 965
959 .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) }, 966 .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
960 .buck2_gpiodvs = true,
961 967
962 .buck1_voltage[0] = 1350000, /* 1.35V */ 968 .buck1_voltage[0] = 1350000, /* 1.35V */
963 .buck1_voltage[1] = 1300000, /* 1.3V */ 969 .buck1_voltage[1] = 1300000, /* 1.3V */
@@ -1116,7 +1122,30 @@ static void __init nuri_ehci_init(void)
1116} 1122}
1117 1123
1118/* CAMERA */ 1124/* CAMERA */
1125static struct regulator_consumer_supply cam_vt_cam15_supply =
1126 REGULATOR_SUPPLY("vdd_core", "6-003c");
1127
1128static struct regulator_init_data cam_vt_cam15_reg_init_data = {
1129 .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
1130 .num_consumer_supplies = 1,
1131 .consumer_supplies = &cam_vt_cam15_supply,
1132};
1133
1134static struct fixed_voltage_config cam_vt_cam15_fixed_voltage_cfg = {
1135 .supply_name = "VT_CAM_1.5V",
1136 .microvolts = 1500000,
1137 .gpio = EXYNOS4_GPE2(2), /* VT_CAM_1.5V_EN */
1138 .enable_high = 1,
1139 .init_data = &cam_vt_cam15_reg_init_data,
1140};
1141
1142static struct platform_device cam_vt_cam15_fixed_rdev = {
1143 .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_15V,
1144 .dev = { .platform_data = &cam_vt_cam15_fixed_voltage_cfg },
1145};
1146
1119static struct regulator_consumer_supply cam_vdda_supply[] = { 1147static struct regulator_consumer_supply cam_vdda_supply[] = {
1148 REGULATOR_SUPPLY("vdda", "6-003c"),
1120 REGULATOR_SUPPLY("a_sensor", "0-001f"), 1149 REGULATOR_SUPPLY("a_sensor", "0-001f"),
1121}; 1150};
1122 1151
@@ -1173,6 +1202,21 @@ static struct s5p_platform_mipi_csis mipi_csis_platdata = {
1173 1202
1174#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */ 1203#define GPIO_CAM_MEGA_RST EXYNOS4_GPY3(7) /* ISP_RESET */
1175#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPL2(5) 1204#define GPIO_CAM_8M_ISP_INT EXYNOS4_GPL2(5)
1205#define GPIO_CAM_VT_NSTBY EXYNOS4_GPL2(0)
1206#define GPIO_CAM_VT_NRST EXYNOS4_GPL2(1)
1207
1208static struct s5k6aa_platform_data s5k6aa_pldata = {
1209 .mclk_frequency = 24000000UL,
1210 .gpio_reset = { GPIO_CAM_VT_NRST, 0 },
1211 .gpio_stby = { GPIO_CAM_VT_NSTBY, 0 },
1212 .bus_type = V4L2_MBUS_PARALLEL,
1213 .horiz_flip = 1,
1214};
1215
1216static struct i2c_board_info s5k6aa_board_info = {
1217 I2C_BOARD_INFO("S5K6AA", 0x3c),
1218 .platform_data = &s5k6aa_pldata,
1219};
1176 1220
1177static struct m5mols_platform_data m5mols_platdata = { 1221static struct m5mols_platform_data m5mols_platdata = {
1178 .gpio_reset = GPIO_CAM_MEGA_RST, 1222 .gpio_reset = GPIO_CAM_MEGA_RST,
@@ -1185,6 +1229,13 @@ static struct i2c_board_info m5mols_board_info = {
1185 1229
1186static struct s5p_fimc_isp_info nuri_camera_sensors[] = { 1230static struct s5p_fimc_isp_info nuri_camera_sensors[] = {
1187 { 1231 {
1232 .flags = V4L2_MBUS_PCLK_SAMPLE_RISING |
1233 V4L2_MBUS_VSYNC_ACTIVE_LOW,
1234 .bus_type = FIMC_ITU_601,
1235 .board_info = &s5k6aa_board_info,
1236 .clk_frequency = 24000000UL,
1237 .i2c_bus_num = 6,
1238 }, {
1188 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | 1239 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
1189 V4L2_MBUS_VSYNC_ACTIVE_LOW, 1240 V4L2_MBUS_VSYNC_ACTIVE_LOW,
1190 .bus_type = FIMC_MIPI_CSI2, 1241 .bus_type = FIMC_MIPI_CSI2,
@@ -1200,11 +1251,13 @@ static struct s5p_platform_fimc fimc_md_platdata = {
1200}; 1251};
1201 1252
1202static struct gpio nuri_camera_gpios[] = { 1253static struct gpio nuri_camera_gpios[] = {
1254 { GPIO_CAM_VT_NSTBY, GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
1255 { GPIO_CAM_VT_NRST, GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST" },
1203 { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" }, 1256 { GPIO_CAM_8M_ISP_INT, GPIOF_IN, "8M_ISP_INT" },
1204 { GPIO_CAM_MEGA_RST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" }, 1257 { GPIO_CAM_MEGA_RST, GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
1205}; 1258};
1206 1259
1207static void nuri_camera_init(void) 1260static void __init nuri_camera_init(void)
1208{ 1261{
1209 s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata), 1262 s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
1210 &s5p_device_mipi_csis0); 1263 &s5p_device_mipi_csis0);
@@ -1224,6 +1277,8 @@ static void nuri_camera_init(void)
1224 pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__); 1277 pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__);
1225 1278
1226 /* Free GPIOs controlled directly by the sensor drivers. */ 1279 /* Free GPIOs controlled directly by the sensor drivers. */
1280 gpio_free(GPIO_CAM_VT_NRST);
1281 gpio_free(GPIO_CAM_VT_NSTBY);
1227 gpio_free(GPIO_CAM_MEGA_RST); 1282 gpio_free(GPIO_CAM_MEGA_RST);
1228 1283
1229 if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) { 1284 if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) {
@@ -1234,15 +1289,27 @@ static void nuri_camera_init(void)
1234 s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4); 1289 s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4);
1235} 1290}
1236 1291
1292static struct s3c2410_platform_i2c nuri_i2c6_platdata __initdata = {
1293 .frequency = 400000U,
1294 .sda_delay = 200,
1295 .bus_num = 6,
1296};
1297
1237static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = { 1298static struct s3c2410_platform_i2c nuri_i2c0_platdata __initdata = {
1238 .frequency = 400000U, 1299 .frequency = 400000U,
1239 .sda_delay = 200, 1300 .sda_delay = 200,
1240}; 1301};
1241 1302
1303/* DEVFREQ controlling memory/bus */
1304static struct platform_device exynos4_bus_devfreq = {
1305 .name = "exynos4210-busfreq",
1306};
1307
1242static struct platform_device *nuri_devices[] __initdata = { 1308static struct platform_device *nuri_devices[] __initdata = {
1243 /* Samsung Platform Devices */ 1309 /* Samsung Platform Devices */
1244 &s3c_device_i2c5, /* PMIC should initialize first */ 1310 &s3c_device_i2c5, /* PMIC should initialize first */
1245 &s3c_device_i2c0, 1311 &s3c_device_i2c0,
1312 &s3c_device_i2c6,
1246 &emmc_fixed_voltage, 1313 &emmc_fixed_voltage,
1247 &s5p_device_mipi_csis0, 1314 &s5p_device_mipi_csis0,
1248 &s5p_device_fimc0, 1315 &s5p_device_fimc0,
@@ -1259,6 +1326,8 @@ static struct platform_device *nuri_devices[] __initdata = {
1259 &s3c_device_i2c3, 1326 &s3c_device_i2c3,
1260 &i2c9_gpio, 1327 &i2c9_gpio,
1261 &s3c_device_adc, 1328 &s3c_device_adc,
1329 &s5p_device_g2d,
1330 &s5p_device_jpeg,
1262 &s3c_device_rtc, 1331 &s3c_device_rtc,
1263 &s5p_device_mfc, 1332 &s5p_device_mfc,
1264 &s5p_device_mfc_l, 1333 &s5p_device_mfc_l,
@@ -1274,8 +1343,10 @@ static struct platform_device *nuri_devices[] __initdata = {
1274 &nuri_backlight_device, 1343 &nuri_backlight_device,
1275 &max8903_fixed_reg_dev, 1344 &max8903_fixed_reg_dev,
1276 &nuri_max8903_device, 1345 &nuri_max8903_device,
1346 &cam_vt_cam15_fixed_rdev,
1277 &cam_vdda_fixed_rdev, 1347 &cam_vdda_fixed_rdev,
1278 &cam_8m_12v_fixed_rdev, 1348 &cam_8m_12v_fixed_rdev,
1349 &exynos4_bus_devfreq,
1279}; 1350};
1280 1351
1281static void __init nuri_map_io(void) 1352static void __init nuri_map_io(void)
@@ -1305,6 +1376,7 @@ static void __init nuri_machine_init(void)
1305 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); 1376 i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
1306 i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); 1377 i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
1307 i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); 1378 i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
1379 s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
1308 1380
1309 s5p_fimd0_set_platdata(&nuri_fb_pdata); 1381 s5p_fimd0_set_platdata(&nuri_fb_pdata);
1310 1382
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 0679b8ad2d1..686d1826c05 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -20,6 +20,7 @@
20#include <linux/regulator/machine.h> 20#include <linux/regulator/machine.h>
21#include <linux/mfd/max8997.h> 21#include <linux/mfd/max8997.h>
22#include <linux/lcd.h> 22#include <linux/lcd.h>
23#include <linux/rfkill-gpio.h>
23 24
24#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
25#include <asm/hardware/gic.h> 26#include <asm/hardware/gic.h>
@@ -235,6 +236,7 @@ static struct regulator_init_data __initdata max8997_ldo9_data = {
235 .min_uV = 2800000, 236 .min_uV = 2800000,
236 .max_uV = 2800000, 237 .max_uV = 2800000,
237 .apply_uV = 1, 238 .apply_uV = 1,
239 .always_on = 1,
238 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 240 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
239 .state_mem = { 241 .state_mem = {
240 .disabled = 1, 242 .disabled = 1,
@@ -278,6 +280,7 @@ static struct regulator_init_data __initdata max8997_ldo14_data = {
278 .min_uV = 1800000, 280 .min_uV = 1800000,
279 .max_uV = 1800000, 281 .max_uV = 1800000,
280 .apply_uV = 1, 282 .apply_uV = 1,
283 .always_on = 1,
281 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 284 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
282 .state_mem = { 285 .state_mem = {
283 .disabled = 1, 286 .disabled = 1,
@@ -293,6 +296,7 @@ static struct regulator_init_data __initdata max8997_ldo17_data = {
293 .min_uV = 3300000, 296 .min_uV = 3300000,
294 .max_uV = 3300000, 297 .max_uV = 3300000,
295 .apply_uV = 1, 298 .apply_uV = 1,
299 .always_on = 1,
296 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 300 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
297 .state_mem = { 301 .state_mem = {
298 .disabled = 1, 302 .disabled = 1,
@@ -602,6 +606,23 @@ static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
602 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, 606 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
603}; 607};
604 608
609/* Bluetooth rfkill gpio platform data */
610struct rfkill_gpio_platform_data origen_bt_pdata = {
611 .reset_gpio = EXYNOS4_GPX2(2),
612 .shutdown_gpio = -1,
613 .type = RFKILL_TYPE_BLUETOOTH,
614 .name = "origen-bt",
615};
616
617/* Bluetooth Platform device */
618static struct platform_device origen_device_bluetooth = {
619 .name = "rfkill_gpio",
620 .id = -1,
621 .dev = {
622 .platform_data = &origen_bt_pdata,
623 },
624};
625
605static struct platform_device *origen_devices[] __initdata = { 626static struct platform_device *origen_devices[] __initdata = {
606 &s3c_device_hsmmc2, 627 &s3c_device_hsmmc2,
607 &s3c_device_hsmmc0, 628 &s3c_device_hsmmc0,
@@ -613,9 +634,12 @@ static struct platform_device *origen_devices[] __initdata = {
613 &s5p_device_fimc1, 634 &s5p_device_fimc1,
614 &s5p_device_fimc2, 635 &s5p_device_fimc2,
615 &s5p_device_fimc3, 636 &s5p_device_fimc3,
637 &s5p_device_fimc_md,
616 &s5p_device_fimd0, 638 &s5p_device_fimd0,
639 &s5p_device_g2d,
617 &s5p_device_hdmi, 640 &s5p_device_hdmi,
618 &s5p_device_i2c_hdmiphy, 641 &s5p_device_i2c_hdmiphy,
642 &s5p_device_jpeg,
619 &s5p_device_mfc, 643 &s5p_device_mfc,
620 &s5p_device_mfc_l, 644 &s5p_device_mfc_l,
621 &s5p_device_mfc_r, 645 &s5p_device_mfc_r,
@@ -630,6 +654,7 @@ static struct platform_device *origen_devices[] __initdata = {
630 &exynos4_device_pd[PD_MFC], 654 &exynos4_device_pd[PD_MFC],
631 &origen_device_gpiokeys, 655 &origen_device_gpiokeys,
632 &origen_lcd_hv070wsa, 656 &origen_lcd_hv070wsa,
657 &origen_device_bluetooth,
633}; 658};
634 659
635/* LCD Backlight data */ 660/* LCD Backlight data */
@@ -643,6 +668,16 @@ static struct platform_pwm_backlight_data origen_bl_data = {
643 .pwm_period_ns = 1000, 668 .pwm_period_ns = 1000,
644}; 669};
645 670
671static void __init origen_bt_setup(void)
672{
673 gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART");
674 /* 4 UART Pins configuration */
675 s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2));
676 /* Setup BT Reset, this gpio will be requesed by rfkill-gpio */
677 s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT);
678 s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
679}
680
646static void s5p_tv_setup(void) 681static void s5p_tv_setup(void)
647{ 682{
648 /* Direct HPD to HDMI chip */ 683 /* Direct HPD to HDMI chip */
@@ -703,6 +738,8 @@ static void __init origen_machine_init(void)
703 s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; 738 s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
704 739
705 samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); 740 samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
741
742 origen_bt_setup();
706} 743}
707 744
708MACHINE_START(ORIGEN, "ORIGEN") 745MACHINE_START(ORIGEN, "ORIGEN")
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index b2c5557f50e..5a2a21e6938 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -270,6 +270,9 @@ static struct platform_device *smdkv310_devices[] __initdata = {
270 &s5p_device_fimc1, 270 &s5p_device_fimc1,
271 &s5p_device_fimc2, 271 &s5p_device_fimc2,
272 &s5p_device_fimc3, 272 &s5p_device_fimc3,
273 &s5p_device_fimc_md,
274 &s5p_device_g2d,
275 &s5p_device_jpeg,
273 &exynos4_device_ac97, 276 &exynos4_device_ac97,
274 &exynos4_device_i2s0, 277 &exynos4_device_i2s0,
275 &exynos4_device_ohci, 278 &exynos4_device_ohci,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 0fc65ffde8f..5b79d8be663 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 =
122static struct regulator_consumer_supply lp3974_buck2_consumer = 123static struct regulator_consumer_supply lp3974_buck2_consumer =
123 REGULATOR_SUPPLY("vddg3d", NULL); 124 REGULATOR_SUPPLY("vddg3d", NULL);
124 125
125static struct regulator_consumer_supply lp3974_buck3_consumer = 126static 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
128static struct regulator_init_data lp3974_buck1_data = { 131static 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
175static struct regulator_init_data lp3974_buck4_data = { 178static 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
308static struct regulator_consumer_supply lp3974_ldo9_consumer =
309 REGULATOR_SUPPLY("vddio", "0-003c");
310
305static struct regulator_init_data lp3974_ldo9_data = { 311static 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
318static struct regulator_init_data lp3974_ldo10_data = { 326static struct regulator_init_data lp3974_ldo10_data = {
@@ -411,6 +419,7 @@ static struct regulator_init_data lp3974_ldo15_data = {
411}; 419};
412 420
413static struct regulator_consumer_supply lp3974_ldo16_consumer[] = { 421static 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
822static struct s3c_fb_platdata universal_lcd_pdata __initdata = { 833static 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
842static struct regulator_consumer_supply cam_vt_dio_supply =
843 REGULATOR_SUPPLY("vdd_core", "0-003c");
844
845static 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
851static 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
859static 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
831static struct regulator_consumer_supply cam_i_core_supply = 864static 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
922static int s5k6aa_set_power(int on)
923{
924 gpio_set_value(GPIO_CAM_LEVEL_EN(2), !!on);
925 return 0;
926}
927
928static 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
937static struct i2c_board_info s5k6aa_board_info = {
938 I2C_BOARD_INFO("S5K6AA", 0x3C),
939 .platform_data = &s5k6aa_platdata,
940};
886 941
887static int m5mols_set_power(struct device *dev, int on) 942static 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
930static void universal_camera_init(void) 995static 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,