11 #include <linux/serial_core.h>
12 #include <linux/input.h>
13 #include <linux/i2c.h>
27 #include <drm/exynos_drm.h>
35 #include <plat/clock.h>
58 #define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
59 S3C2410_UCON_RXILEVEL | \
60 S3C2410_UCON_TXIRQMODE | \
61 S3C2410_UCON_RXIRQMODE | \
62 S3C2410_UCON_RXFIFO_TOI | \
63 S3C2443_UCON_RXERR_IRQEN)
65 #define UNIVERSAL_ULCON_DEFAULT S3C2410_LCON_CS8
67 #define UNIVERSAL_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
68 S5PV210_UFCON_TXTRIG256 | \
69 S5PV210_UFCON_RXTRIG256)
106 .dvs_mode = { 48, 32, 28, 18 },
119 .num_consumer_supplies = 1,
120 .consumer_supplies = &max8952_consumer,
147 .num_consumer_supplies = 1,
148 .consumer_supplies = &lp3974_buck1_consumer,
163 .num_consumer_supplies = 1,
164 .consumer_supplies = &lp3974_buck2_consumer,
178 .num_consumer_supplies =
ARRAY_SIZE(lp3974_buck3_consumer),
179 .consumer_supplies = lp3974_buck3_consumer,
197 .name =
"VALIVE_1.2V",
217 .name =
"VUSB+MIPI_1.1V",
226 .num_consumer_supplies =
ARRAY_SIZE(lp3974_ldo3_consumer),
227 .consumer_supplies = lp3974_ldo3_consumer,
245 .num_consumer_supplies =
ARRAY_SIZE(lp3974_ldo4_consumer),
246 .consumer_supplies = lp3974_ldo4_consumer,
281 .name =
"VLCD+VMIPI_1.8V",
290 .num_consumer_supplies =
ARRAY_SIZE(lp3974_ldo7_consumer),
291 .consumer_supplies = lp3974_ldo7_consumer,
301 .name =
"VUSB+VDAC_3.3V",
310 .num_consumer_supplies =
ARRAY_SIZE(lp3974_ldo8_consumer),
311 .consumer_supplies = lp3974_ldo8_consumer,
328 .num_consumer_supplies = 1,
329 .consumer_supplies = &lp3974_ldo9_consumer,
351 .name =
"CAM_AF_3.3V",
360 .num_consumer_supplies = 1,
361 .consumer_supplies = &lp3974_ldo11_consumer,
395 .name =
"CAM_I_HOST_1.8V",
404 .num_consumer_supplies = 1,
405 .consumer_supplies = &lp3974_ldo14_consumer,
414 .name =
"CAM_S_DIG+FM33_CORE_1.2V",
423 .num_consumer_supplies = 1,
424 .consumer_supplies = &lp3974_ldo15_consumer,
434 .name =
"CAM_S_ANA_2.8V",
443 .num_consumer_supplies =
ARRAY_SIZE(lp3974_ldo16_consumer),
444 .consumer_supplies = lp3974_ldo16_consumer,
449 .name =
"VCC_3.0V_LCD",
542 .num_regulators =
ARRAY_SIZE(lp3974_regulators),
543 .regulators = lp3974_regulators,
544 .buck1_voltage1 = 1100000,
545 .buck1_voltage2 = 1000000,
546 .buck1_voltage3 = 1100000,
547 .buck1_voltage4 = 1000000,
550 .buck2_voltage1 = 1200000,
551 .buck2_voltage2 = 1100000,
552 .buck1_default_idx = 0,
554 .buck2_default_idx = 0,
575 .num_consumer_supplies = 1,
576 .consumer_supplies = &hdmi_fixed_consumer,
580 .supply_name =
"HDMI_EN1",
581 .microvolts = 5000000,
584 .init_data = &hdmi_fixed_voltage_init_data,
588 .name =
"reg-fixed-voltage",
591 .platform_data = &hdmi_fixed_voltage_config,
599 .platform_data = &universal_max8952_pdata,
602 .platform_data = &universal_lp3974_pdata,
622 .platform_data = &qt602240_platform_data,
626 static void __init universal_tsp_init(
void)
633 gpio_export(gpio, 0);
647 static uint32_t touchkey_keymap[] = {
654 .keymap = touchkey_keymap,
660 #define I2C_GPIO_BUS_12 12
670 .platform_data = &i2c_gpio12_data,
677 .platform_data = &touchkey_data,
681 static void __init universal_touchkey_init(
void)
696 .frequency = 300 * 1000,
705 .desc =
"gpio-keys: KEY_VOLUMEUP",
708 .debounce_interval = 1,
712 .desc =
"gpio-keys: KEY_VOLUMEDOWN",
715 .debounce_interval = 1,
719 .desc =
"gpio-keys: KEY_CONFIG",
722 .debounce_interval = 1,
726 .desc =
"gpio-keys: KEY_CAMERA",
729 .debounce_interval = 1,
733 .desc =
"gpio-keys: KEY_OK",
736 .debounce_interval = 1,
741 .buttons = universal_gpio_keys_tables,
742 .nbuttons =
ARRAY_SIZE(universal_gpio_keys_tables),
748 .platform_data = &universal_gpio_keys_data,
767 .name =
"VMEM_VDD_2.8V",
770 .num_consumer_supplies =
ARRAY_SIZE(mmc0_supplies),
771 .consumer_supplies = mmc0_supplies,
775 .supply_name =
"MASSMEMORY_EN",
776 .microvolts = 2800000,
779 .init_data = &mmc0_fixed_voltage_init_data,
783 .name =
"reg-fixed-voltage",
786 .platform_data = &mmc0_fixed_voltage_config,
796 .ext_cd_gpio_invert = 1,
808 static void __init universal_sdhci_init(
void)
820 #ifdef CONFIG_DRM_EXYNOS
850 .virtual_y = 2 * 800,
866 .win[0] = &universal_fb_win0,
867 .vtiming = &universal_lcd_timing,
881 .num_consumer_supplies = 1,
882 .consumer_supplies = &cam_vt_dio_supply,
886 .supply_name =
"CAM_VT_D_IO",
887 .microvolts = 2800000,
890 .init_data = &cam_vt_dio_reg_init_data,
895 .dev = { .platform_data = &cam_vt_dio_fixed_voltage_cfg },
903 .num_consumer_supplies = 1,
904 .consumer_supplies = &cam_i_core_supply,
908 .supply_name =
"CAM_I_CORE_1.2V",
909 .microvolts = 1200000,
912 .init_data = &cam_i_core_reg_init_data,
917 .dev = { .platform_data = &cam_i_core_fixed_voltage_cfg },
925 .num_consumer_supplies = 1,
926 .consumer_supplies = &cam_s_if_supply,
930 .supply_name =
"CAM_S_IF_1.8V",
931 .microvolts = 1800000,
934 .init_data = &cam_s_if_reg_init_data,
939 .dev = { .platform_data = &cam_s_if_fixed_voltage_cfg },
943 .clk_rate = 166000000
UL,
948 #define GPIO_CAM_LEVEL_EN(n) EXYNOS4_GPE4(n + 3)
949 #define GPIO_CAM_8M_ISP_INT EXYNOS4_GPX1(5)
950 #define GPIO_CAM_MEGA_nRST EXYNOS4_GPE2(5)
951 #define GPIO_CAM_VGA_NRST EXYNOS4_GPE4(7)
952 #define GPIO_CAM_VGA_NSTBY EXYNOS4_GPE4(6)
954 static int s5k6aa_set_power(
int on)
961 .mclk_frequency = 21600000
UL,
966 .set_power = s5k6aa_set_power,
971 .platform_data = &s5k6aa_platdata,
974 static int m5mols_set_power(
struct device *
dev,
int on)
984 .set_power = m5mols_set_power,
989 .platform_data = &m5mols_platdata,
998 .board_info = &s5k6aa_board_info,
1000 .clk_frequency = 24000000
UL,
1006 .board_info = &m5mols_board_info,
1008 .clk_frequency = 24000000
UL,
1013 .isp_info = universal_camera_sensors,
1014 .num_clients =
ARRAY_SIZE(universal_camera_sensors),
1017 static struct gpio universal_camera_gpios[] = {
1029 static void __init universal_camera_init(
void)
1032 &s5p_device_mipi_csis0);
1034 &s5p_device_fimc_md);
1038 pr_err(
"%s: GPIO request failed\n", __func__);
1045 pr_err(
"Failed to configure 8M_ISP_INT GPIO\n");
1054 pr_err(
"Camera port A setup failed\n");
1065 &mmc0_fixed_voltage,
1073 &hdmi_fixed_voltage,
1080 &universal_gpio_keys,
1084 #ifdef CONFIG_DRM_EXYNOS
1091 &cam_vt_dio_fixed_reg_dev,
1092 &cam_i_core_fixed_reg_dev,
1093 &cam_s_if_fixed_reg_dev,
1097 static void __init universal_map_io(
void)
1105 static void s5p_tv_setup(
void)
1113 static void __init universal_reserve(
void)
1118 static void __init universal_machine_init(
void)
1120 universal_sdhci_init();
1126 universal_tsp_init();
1134 #ifdef CONFIG_DRM_EXYNOS
1141 universal_touchkey_init();
1146 universal_camera_init();
1154 .atag_offset = 0x100,
1157 .map_io = universal_map_io,
1159 .init_machine = universal_machine_init,
1162 .reserve = &universal_reserve,