diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 05:57:34 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-10-04 05:57:34 -0400 |
commit | 7d84b3e93757fe871d57b43c422b81cc8b94057a (patch) | |
tree | efe09f02bd42289324bdeba02896fc9211f80899 /arch | |
parent | 593847964c5b9dce3c7cd0da8928d482c57691f1 (diff) | |
parent | 95727e1fa18432eafcd0e9ba50c58f40d3ae0cea (diff) |
Merge branch 'next/topic-exynos4-devel' into next-samsung-devel
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/exynos4_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/Kconfig | 30 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-nuri.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-origen.c | 679 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-smdkv310.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-exynos4/mach-universal_c210.c | 34 |
7 files changed, 790 insertions, 0 deletions
diff --git a/arch/arm/configs/exynos4_defconfig b/arch/arm/configs/exynos4_defconfig index da53ff3b4d70..cd40bb56e568 100644 --- a/arch/arm/configs/exynos4_defconfig +++ b/arch/arm/configs/exynos4_defconfig | |||
@@ -11,6 +11,7 @@ CONFIG_MACH_SMDKV310=y | |||
11 | CONFIG_MACH_ARMLEX4210=y | 11 | CONFIG_MACH_ARMLEX4210=y |
12 | CONFIG_MACH_UNIVERSAL_C210=y | 12 | CONFIG_MACH_UNIVERSAL_C210=y |
13 | CONFIG_MACH_NURI=y | 13 | CONFIG_MACH_NURI=y |
14 | CONFIG_MACH_ORIGEN=y | ||
14 | CONFIG_NO_HZ=y | 15 | CONFIG_NO_HZ=y |
15 | CONFIG_HIGH_RES_TIMERS=y | 16 | CONFIG_HIGH_RES_TIMERS=y |
16 | CONFIG_SMP=y | 17 | CONFIG_SMP=y |
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index 0c77ab99fa16..95ba0cc9f6e1 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig | |||
@@ -139,6 +139,7 @@ config MACH_SMDKV310 | |||
139 | select S3C_DEV_RTC | 139 | select S3C_DEV_RTC |
140 | select S3C_DEV_WDT | 140 | select S3C_DEV_WDT |
141 | select S3C_DEV_I2C1 | 141 | select S3C_DEV_I2C1 |
142 | select S5P_DEV_MFC | ||
142 | select S3C_DEV_HSMMC | 143 | select S3C_DEV_HSMMC |
143 | select S3C_DEV_HSMMC1 | 144 | select S3C_DEV_HSMMC1 |
144 | select S3C_DEV_HSMMC2 | 145 | select S3C_DEV_HSMMC2 |
@@ -178,6 +179,7 @@ config MACH_UNIVERSAL_C210 | |||
178 | select S5P_DEV_FIMC1 | 179 | select S5P_DEV_FIMC1 |
179 | select S5P_DEV_FIMC2 | 180 | select S5P_DEV_FIMC2 |
180 | select S5P_DEV_FIMC3 | 181 | select S5P_DEV_FIMC3 |
182 | select S5P_DEV_FIMD0 | ||
181 | select S3C_DEV_HSMMC | 183 | select S3C_DEV_HSMMC |
182 | select S3C_DEV_HSMMC2 | 184 | select S3C_DEV_HSMMC2 |
183 | select S3C_DEV_HSMMC3 | 185 | select S3C_DEV_HSMMC3 |
@@ -187,6 +189,7 @@ config MACH_UNIVERSAL_C210 | |||
187 | select S5P_DEV_MFC | 189 | select S5P_DEV_MFC |
188 | select S5P_DEV_ONENAND | 190 | select S5P_DEV_ONENAND |
189 | select EXYNOS4_DEV_PD | 191 | select EXYNOS4_DEV_PD |
192 | select EXYNOS4_SETUP_FIMD0 | ||
190 | select EXYNOS4_SETUP_I2C1 | 193 | select EXYNOS4_SETUP_I2C1 |
191 | select EXYNOS4_SETUP_I2C3 | 194 | select EXYNOS4_SETUP_I2C3 |
192 | select EXYNOS4_SETUP_I2C5 | 195 | select EXYNOS4_SETUP_I2C5 |
@@ -199,6 +202,8 @@ config MACH_NURI | |||
199 | bool "Mobile NURI Board" | 202 | bool "Mobile NURI Board" |
200 | select CPU_EXYNOS4210 | 203 | select CPU_EXYNOS4210 |
201 | select S3C_DEV_WDT | 204 | select S3C_DEV_WDT |
205 | select S3C_DEV_RTC | ||
206 | select S5P_DEV_FIMD0 | ||
202 | select S3C_DEV_HSMMC | 207 | select S3C_DEV_HSMMC |
203 | select S3C_DEV_HSMMC2 | 208 | select S3C_DEV_HSMMC2 |
204 | select S3C_DEV_HSMMC3 | 209 | select S3C_DEV_HSMMC3 |
@@ -208,6 +213,7 @@ config MACH_NURI | |||
208 | select S5P_DEV_MFC | 213 | select S5P_DEV_MFC |
209 | select S5P_DEV_USB_EHCI | 214 | select S5P_DEV_USB_EHCI |
210 | select EXYNOS4_DEV_PD | 215 | select EXYNOS4_DEV_PD |
216 | select EXYNOS4_SETUP_FIMD0 | ||
211 | select EXYNOS4_SETUP_I2C1 | 217 | select EXYNOS4_SETUP_I2C1 |
212 | select EXYNOS4_SETUP_I2C3 | 218 | select EXYNOS4_SETUP_I2C3 |
213 | select EXYNOS4_SETUP_I2C5 | 219 | select EXYNOS4_SETUP_I2C5 |
@@ -218,6 +224,30 @@ config MACH_NURI | |||
218 | help | 224 | help |
219 | Machine support for Samsung Mobile NURI Board. | 225 | Machine support for Samsung Mobile NURI Board. |
220 | 226 | ||
227 | config MACH_ORIGEN | ||
228 | bool "ORIGEN" | ||
229 | select CPU_EXYNOS4210 | ||
230 | select S3C_DEV_RTC | ||
231 | select S3C_DEV_WDT | ||
232 | select S3C_DEV_HSMMC | ||
233 | select S3C_DEV_HSMMC2 | ||
234 | select S5P_DEV_FIMC0 | ||
235 | select S5P_DEV_FIMC1 | ||
236 | select S5P_DEV_FIMC2 | ||
237 | select S5P_DEV_FIMC3 | ||
238 | select S5P_DEV_FIMD0 | ||
239 | select S5P_DEV_I2C_HDMIPHY | ||
240 | select S5P_DEV_TV | ||
241 | select S5P_DEV_USB_EHCI | ||
242 | select EXYNOS4_DEV_PD | ||
243 | select SAMSUNG_DEV_BACKLIGHT | ||
244 | select SAMSUNG_DEV_PWM | ||
245 | select EXYNOS4_SETUP_FIMD0 | ||
246 | select EXYNOS4_SETUP_SDHCI | ||
247 | select EXYNOS4_SETUP_USB_PHY | ||
248 | help | ||
249 | Machine support for ORIGEN based on Samsung EXYNOS4210 | ||
250 | |||
221 | endmenu | 251 | endmenu |
222 | 252 | ||
223 | comment "Configuration for HSMMC bus width" | 253 | comment "Configuration for HSMMC bus width" |
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile index b7fe1d7b0b1f..cbc976701432 100644 --- a/arch/arm/mach-exynos4/Makefile +++ b/arch/arm/mach-exynos4/Makefile | |||
@@ -30,6 +30,7 @@ obj-$(CONFIG_MACH_SMDKV310) += mach-smdkv310.o | |||
30 | obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o | 30 | obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o |
31 | obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o | 31 | obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o |
32 | obj-$(CONFIG_MACH_NURI) += mach-nuri.o | 32 | obj-$(CONFIG_MACH_NURI) += mach-nuri.o |
33 | obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o | ||
33 | 34 | ||
34 | # device support | 35 | # device support |
35 | 36 | ||
diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-nuri.c index 43be71b799cb..bbd13f454151 100644 --- a/arch/arm/mach-exynos4/mach-nuri.c +++ b/arch/arm/mach-exynos4/mach-nuri.c | |||
@@ -32,10 +32,12 @@ | |||
32 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
33 | 33 | ||
34 | #include <plat/adc.h> | 34 | #include <plat/adc.h> |
35 | #include <plat/regs-fb-v4.h> | ||
35 | #include <plat/regs-serial.h> | 36 | #include <plat/regs-serial.h> |
36 | #include <plat/exynos4.h> | 37 | #include <plat/exynos4.h> |
37 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
38 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
40 | #include <plat/fb.h> | ||
39 | #include <plat/sdhci.h> | 41 | #include <plat/sdhci.h> |
40 | #include <plat/ehci.h> | 42 | #include <plat/ehci.h> |
41 | #include <plat/clock.h> | 43 | #include <plat/clock.h> |
@@ -199,6 +201,33 @@ static struct platform_device nuri_gpio_keys = { | |||
199 | }, | 201 | }, |
200 | }; | 202 | }; |
201 | 203 | ||
204 | /* Frame Buffer */ | ||
205 | static struct s3c_fb_pd_win nuri_fb_win0 = { | ||
206 | .win_mode = { | ||
207 | .left_margin = 64, | ||
208 | .right_margin = 16, | ||
209 | .upper_margin = 64, | ||
210 | .lower_margin = 1, | ||
211 | .hsync_len = 48, | ||
212 | .vsync_len = 3, | ||
213 | .xres = 1280, | ||
214 | .yres = 800, | ||
215 | .refresh = 60, | ||
216 | }, | ||
217 | .max_bpp = 24, | ||
218 | .default_bpp = 16, | ||
219 | .virtual_x = 1280, | ||
220 | .virtual_y = 800, | ||
221 | }; | ||
222 | |||
223 | static struct s3c_fb_platdata nuri_fb_pdata __initdata = { | ||
224 | .win[0] = &nuri_fb_win0, | ||
225 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
226 | VIDCON0_CLKSEL_LCD, | ||
227 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
228 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | ||
229 | }; | ||
230 | |||
202 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) | 231 | static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power) |
203 | { | 232 | { |
204 | int gpio = EXYNOS4_GPE1(5); | 233 | int gpio = EXYNOS4_GPE1(5); |
@@ -1092,6 +1121,7 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
1092 | /* Samsung Platform Devices */ | 1121 | /* Samsung Platform Devices */ |
1093 | &s3c_device_i2c5, /* PMIC should initialize first */ | 1122 | &s3c_device_i2c5, /* PMIC should initialize first */ |
1094 | &emmc_fixed_voltage, | 1123 | &emmc_fixed_voltage, |
1124 | &s5p_device_fimd0, | ||
1095 | &s3c_device_hsmmc0, | 1125 | &s3c_device_hsmmc0, |
1096 | &s3c_device_hsmmc2, | 1126 | &s3c_device_hsmmc2, |
1097 | &s3c_device_hsmmc3, | 1127 | &s3c_device_hsmmc3, |
@@ -1106,6 +1136,7 @@ static struct platform_device *nuri_devices[] __initdata = { | |||
1106 | &s5p_device_mfc_l, | 1136 | &s5p_device_mfc_l, |
1107 | &s5p_device_mfc_r, | 1137 | &s5p_device_mfc_r, |
1108 | &exynos4_device_pd[PD_MFC], | 1138 | &exynos4_device_pd[PD_MFC], |
1139 | &exynos4_device_pd[PD_LCD0], | ||
1109 | 1140 | ||
1110 | /* NURI Devices */ | 1141 | /* NURI Devices */ |
1111 | &nuri_gpio_keys, | 1142 | &nuri_gpio_keys, |
@@ -1142,12 +1173,15 @@ static void __init nuri_machine_init(void) | |||
1142 | i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); | 1173 | i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3)); |
1143 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); | 1174 | i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs)); |
1144 | 1175 | ||
1176 | s5p_fimd0_set_platdata(&nuri_fb_pdata); | ||
1177 | |||
1145 | nuri_ehci_init(); | 1178 | nuri_ehci_init(); |
1146 | clk_xusbxti.rate = 24000000; | 1179 | clk_xusbxti.rate = 24000000; |
1147 | 1180 | ||
1148 | /* Last */ | 1181 | /* Last */ |
1149 | platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); | 1182 | platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); |
1150 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; | 1183 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; |
1184 | s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; | ||
1151 | } | 1185 | } |
1152 | 1186 | ||
1153 | MACHINE_START(NURI, "NURI") | 1187 | MACHINE_START(NURI, "NURI") |
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c new file mode 100644 index 000000000000..18909cf6c07d --- /dev/null +++ b/arch/arm/mach-exynos4/mach-origen.c | |||
@@ -0,0 +1,679 @@ | |||
1 | /* linux/arch/arm/mach-exynos4/mach-origen.c | ||
2 | * | ||
3 | * Copyright (c) 2011 Insignal Co., Ltd. | ||
4 | * http://www.insignal.co.kr/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/serial_core.h> | ||
12 | #include <linux/gpio.h> | ||
13 | #include <linux/mmc/host.h> | ||
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/input.h> | ||
17 | #include <linux/pwm_backlight.h> | ||
18 | #include <linux/gpio_keys.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/regulator/machine.h> | ||
21 | #include <linux/mfd/max8997.h> | ||
22 | #include <linux/lcd.h> | ||
23 | |||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | #include <video/platform_lcd.h> | ||
28 | |||
29 | #include <plat/regs-serial.h> | ||
30 | #include <plat/regs-fb-v4.h> | ||
31 | #include <plat/exynos4.h> | ||
32 | #include <plat/cpu.h> | ||
33 | #include <plat/devs.h> | ||
34 | #include <plat/sdhci.h> | ||
35 | #include <plat/iic.h> | ||
36 | #include <plat/ehci.h> | ||
37 | #include <plat/clock.h> | ||
38 | #include <plat/gpio-cfg.h> | ||
39 | #include <plat/backlight.h> | ||
40 | #include <plat/pd.h> | ||
41 | #include <plat/fb.h> | ||
42 | |||
43 | #include <mach/map.h> | ||
44 | |||
45 | /* Following are default values for UCON, ULCON and UFCON UART registers */ | ||
46 | #define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | ||
47 | S3C2410_UCON_RXILEVEL | \ | ||
48 | S3C2410_UCON_TXIRQMODE | \ | ||
49 | S3C2410_UCON_RXIRQMODE | \ | ||
50 | S3C2410_UCON_RXFIFO_TOI | \ | ||
51 | S3C2443_UCON_RXERR_IRQEN) | ||
52 | |||
53 | #define ORIGEN_ULCON_DEFAULT S3C2410_LCON_CS8 | ||
54 | |||
55 | #define ORIGEN_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ | ||
56 | S5PV210_UFCON_TXTRIG4 | \ | ||
57 | S5PV210_UFCON_RXTRIG4) | ||
58 | |||
59 | static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = { | ||
60 | [0] = { | ||
61 | .hwport = 0, | ||
62 | .flags = 0, | ||
63 | .ucon = ORIGEN_UCON_DEFAULT, | ||
64 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
65 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
66 | }, | ||
67 | [1] = { | ||
68 | .hwport = 1, | ||
69 | .flags = 0, | ||
70 | .ucon = ORIGEN_UCON_DEFAULT, | ||
71 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
72 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
73 | }, | ||
74 | [2] = { | ||
75 | .hwport = 2, | ||
76 | .flags = 0, | ||
77 | .ucon = ORIGEN_UCON_DEFAULT, | ||
78 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
79 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
80 | }, | ||
81 | [3] = { | ||
82 | .hwport = 3, | ||
83 | .flags = 0, | ||
84 | .ucon = ORIGEN_UCON_DEFAULT, | ||
85 | .ulcon = ORIGEN_ULCON_DEFAULT, | ||
86 | .ufcon = ORIGEN_UFCON_DEFAULT, | ||
87 | }, | ||
88 | }; | ||
89 | |||
90 | static struct regulator_consumer_supply __initdata ldo3_consumer[] = { | ||
91 | REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */ | ||
92 | }; | ||
93 | static struct regulator_consumer_supply __initdata ldo6_consumer[] = { | ||
94 | REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */ | ||
95 | }; | ||
96 | static struct regulator_consumer_supply __initdata ldo7_consumer[] = { | ||
97 | REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */ | ||
98 | }; | ||
99 | static struct regulator_consumer_supply __initdata ldo8_consumer[] = { | ||
100 | REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */ | ||
101 | }; | ||
102 | static struct regulator_consumer_supply __initdata ldo9_consumer[] = { | ||
103 | REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ | ||
104 | }; | ||
105 | static struct regulator_consumer_supply __initdata ldo11_consumer[] = { | ||
106 | REGULATOR_SUPPLY("dvdd", "alc5625"), /* Realtek ALC5625 */ | ||
107 | }; | ||
108 | static struct regulator_consumer_supply __initdata ldo14_consumer[] = { | ||
109 | REGULATOR_SUPPLY("avdd18", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ | ||
110 | }; | ||
111 | static struct regulator_consumer_supply __initdata ldo17_consumer[] = { | ||
112 | REGULATOR_SUPPLY("vdd33", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ | ||
113 | }; | ||
114 | static struct regulator_consumer_supply __initdata buck1_consumer[] = { | ||
115 | REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */ | ||
116 | }; | ||
117 | static struct regulator_consumer_supply __initdata buck2_consumer[] = { | ||
118 | REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */ | ||
119 | }; | ||
120 | static struct regulator_consumer_supply __initdata buck3_consumer[] = { | ||
121 | REGULATOR_SUPPLY("vdd_g3d", "mali_drm"), /* G3D */ | ||
122 | }; | ||
123 | static struct regulator_consumer_supply __initdata buck7_consumer[] = { | ||
124 | REGULATOR_SUPPLY("vcc", "platform-lcd"), /* LCD */ | ||
125 | }; | ||
126 | |||
127 | static struct regulator_init_data __initdata max8997_ldo1_data = { | ||
128 | .constraints = { | ||
129 | .name = "VDD_ABB_3.3V", | ||
130 | .min_uV = 3300000, | ||
131 | .max_uV = 3300000, | ||
132 | .apply_uV = 1, | ||
133 | .state_mem = { | ||
134 | .disabled = 1, | ||
135 | }, | ||
136 | }, | ||
137 | }; | ||
138 | |||
139 | static struct regulator_init_data __initdata max8997_ldo2_data = { | ||
140 | .constraints = { | ||
141 | .name = "VDD_ALIVE_1.1V", | ||
142 | .min_uV = 1100000, | ||
143 | .max_uV = 1100000, | ||
144 | .apply_uV = 1, | ||
145 | .always_on = 1, | ||
146 | .state_mem = { | ||
147 | .enabled = 1, | ||
148 | }, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | static struct regulator_init_data __initdata max8997_ldo3_data = { | ||
153 | .constraints = { | ||
154 | .name = "VMIPI_1.1V", | ||
155 | .min_uV = 1100000, | ||
156 | .max_uV = 1100000, | ||
157 | .apply_uV = 1, | ||
158 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
159 | .state_mem = { | ||
160 | .disabled = 1, | ||
161 | }, | ||
162 | }, | ||
163 | .num_consumer_supplies = ARRAY_SIZE(ldo3_consumer), | ||
164 | .consumer_supplies = ldo3_consumer, | ||
165 | }; | ||
166 | |||
167 | static struct regulator_init_data __initdata max8997_ldo4_data = { | ||
168 | .constraints = { | ||
169 | .name = "VDD_RTC_1.8V", | ||
170 | .min_uV = 1800000, | ||
171 | .max_uV = 1800000, | ||
172 | .apply_uV = 1, | ||
173 | .always_on = 1, | ||
174 | .state_mem = { | ||
175 | .disabled = 1, | ||
176 | }, | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | static struct regulator_init_data __initdata max8997_ldo6_data = { | ||
181 | .constraints = { | ||
182 | .name = "VMIPI_1.8V", | ||
183 | .min_uV = 1800000, | ||
184 | .max_uV = 1800000, | ||
185 | .apply_uV = 1, | ||
186 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
187 | .state_mem = { | ||
188 | .disabled = 1, | ||
189 | }, | ||
190 | }, | ||
191 | .num_consumer_supplies = ARRAY_SIZE(ldo6_consumer), | ||
192 | .consumer_supplies = ldo6_consumer, | ||
193 | }; | ||
194 | |||
195 | static struct regulator_init_data __initdata max8997_ldo7_data = { | ||
196 | .constraints = { | ||
197 | .name = "VDD_AUD_1.8V", | ||
198 | .min_uV = 1800000, | ||
199 | .max_uV = 1800000, | ||
200 | .apply_uV = 1, | ||
201 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
202 | .state_mem = { | ||
203 | .disabled = 1, | ||
204 | }, | ||
205 | }, | ||
206 | .num_consumer_supplies = ARRAY_SIZE(ldo7_consumer), | ||
207 | .consumer_supplies = ldo7_consumer, | ||
208 | }; | ||
209 | |||
210 | static struct regulator_init_data __initdata max8997_ldo8_data = { | ||
211 | .constraints = { | ||
212 | .name = "VADC_3.3V", | ||
213 | .min_uV = 3300000, | ||
214 | .max_uV = 3300000, | ||
215 | .apply_uV = 1, | ||
216 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
217 | .state_mem = { | ||
218 | .disabled = 1, | ||
219 | }, | ||
220 | }, | ||
221 | .num_consumer_supplies = ARRAY_SIZE(ldo8_consumer), | ||
222 | .consumer_supplies = ldo8_consumer, | ||
223 | }; | ||
224 | |||
225 | static struct regulator_init_data __initdata max8997_ldo9_data = { | ||
226 | .constraints = { | ||
227 | .name = "DVDD_SWB_2.8V", | ||
228 | .min_uV = 2800000, | ||
229 | .max_uV = 2800000, | ||
230 | .apply_uV = 1, | ||
231 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
232 | .state_mem = { | ||
233 | .disabled = 1, | ||
234 | }, | ||
235 | }, | ||
236 | .num_consumer_supplies = ARRAY_SIZE(ldo9_consumer), | ||
237 | .consumer_supplies = ldo9_consumer, | ||
238 | }; | ||
239 | |||
240 | static struct regulator_init_data __initdata max8997_ldo10_data = { | ||
241 | .constraints = { | ||
242 | .name = "VDD_PLL_1.1V", | ||
243 | .min_uV = 1100000, | ||
244 | .max_uV = 1100000, | ||
245 | .apply_uV = 1, | ||
246 | .always_on = 1, | ||
247 | .state_mem = { | ||
248 | .disabled = 1, | ||
249 | }, | ||
250 | }, | ||
251 | }; | ||
252 | |||
253 | static struct regulator_init_data __initdata max8997_ldo11_data = { | ||
254 | .constraints = { | ||
255 | .name = "VDD_AUD_3V", | ||
256 | .min_uV = 3000000, | ||
257 | .max_uV = 3000000, | ||
258 | .apply_uV = 1, | ||
259 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
260 | .state_mem = { | ||
261 | .disabled = 1, | ||
262 | }, | ||
263 | }, | ||
264 | .num_consumer_supplies = ARRAY_SIZE(ldo11_consumer), | ||
265 | .consumer_supplies = ldo11_consumer, | ||
266 | }; | ||
267 | |||
268 | static struct regulator_init_data __initdata max8997_ldo14_data = { | ||
269 | .constraints = { | ||
270 | .name = "AVDD18_SWB_1.8V", | ||
271 | .min_uV = 1800000, | ||
272 | .max_uV = 1800000, | ||
273 | .apply_uV = 1, | ||
274 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
275 | .state_mem = { | ||
276 | .disabled = 1, | ||
277 | }, | ||
278 | }, | ||
279 | .num_consumer_supplies = ARRAY_SIZE(ldo14_consumer), | ||
280 | .consumer_supplies = ldo14_consumer, | ||
281 | }; | ||
282 | |||
283 | static struct regulator_init_data __initdata max8997_ldo17_data = { | ||
284 | .constraints = { | ||
285 | .name = "VDD_SWB_3.3V", | ||
286 | .min_uV = 3300000, | ||
287 | .max_uV = 3300000, | ||
288 | .apply_uV = 1, | ||
289 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
290 | .state_mem = { | ||
291 | .disabled = 1, | ||
292 | }, | ||
293 | }, | ||
294 | .num_consumer_supplies = ARRAY_SIZE(ldo17_consumer), | ||
295 | .consumer_supplies = ldo17_consumer, | ||
296 | }; | ||
297 | |||
298 | static struct regulator_init_data __initdata max8997_ldo21_data = { | ||
299 | .constraints = { | ||
300 | .name = "VDD_MIF_1.2V", | ||
301 | .min_uV = 1200000, | ||
302 | .max_uV = 1200000, | ||
303 | .apply_uV = 1, | ||
304 | .always_on = 1, | ||
305 | .state_mem = { | ||
306 | .disabled = 1, | ||
307 | }, | ||
308 | }, | ||
309 | }; | ||
310 | |||
311 | static struct regulator_init_data __initdata max8997_buck1_data = { | ||
312 | .constraints = { | ||
313 | .name = "VDD_ARM_1.2V", | ||
314 | .min_uV = 950000, | ||
315 | .max_uV = 1350000, | ||
316 | .always_on = 1, | ||
317 | .boot_on = 1, | ||
318 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
319 | .state_mem = { | ||
320 | .disabled = 1, | ||
321 | }, | ||
322 | }, | ||
323 | .num_consumer_supplies = ARRAY_SIZE(buck1_consumer), | ||
324 | .consumer_supplies = buck1_consumer, | ||
325 | }; | ||
326 | |||
327 | static struct regulator_init_data __initdata max8997_buck2_data = { | ||
328 | .constraints = { | ||
329 | .name = "VDD_INT_1.1V", | ||
330 | .min_uV = 900000, | ||
331 | .max_uV = 1100000, | ||
332 | .always_on = 1, | ||
333 | .boot_on = 1, | ||
334 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | ||
335 | .state_mem = { | ||
336 | .disabled = 1, | ||
337 | }, | ||
338 | }, | ||
339 | .num_consumer_supplies = ARRAY_SIZE(buck2_consumer), | ||
340 | .consumer_supplies = buck2_consumer, | ||
341 | }; | ||
342 | |||
343 | static struct regulator_init_data __initdata max8997_buck3_data = { | ||
344 | .constraints = { | ||
345 | .name = "VDD_G3D_1.1V", | ||
346 | .min_uV = 900000, | ||
347 | .max_uV = 1100000, | ||
348 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
349 | REGULATOR_CHANGE_STATUS, | ||
350 | .state_mem = { | ||
351 | .disabled = 1, | ||
352 | }, | ||
353 | }, | ||
354 | .num_consumer_supplies = ARRAY_SIZE(buck3_consumer), | ||
355 | .consumer_supplies = buck3_consumer, | ||
356 | }; | ||
357 | |||
358 | static struct regulator_init_data __initdata max8997_buck5_data = { | ||
359 | .constraints = { | ||
360 | .name = "VDDQ_M1M2_1.2V", | ||
361 | .min_uV = 1200000, | ||
362 | .max_uV = 1200000, | ||
363 | .apply_uV = 1, | ||
364 | .always_on = 1, | ||
365 | .state_mem = { | ||
366 | .disabled = 1, | ||
367 | }, | ||
368 | }, | ||
369 | }; | ||
370 | |||
371 | static struct regulator_init_data __initdata max8997_buck7_data = { | ||
372 | .constraints = { | ||
373 | .name = "VDD_LCD_3.3V", | ||
374 | .min_uV = 3300000, | ||
375 | .max_uV = 3300000, | ||
376 | .boot_on = 1, | ||
377 | .apply_uV = 1, | ||
378 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
379 | .state_mem = { | ||
380 | .disabled = 1 | ||
381 | }, | ||
382 | }, | ||
383 | .num_consumer_supplies = ARRAY_SIZE(buck7_consumer), | ||
384 | .consumer_supplies = buck7_consumer, | ||
385 | }; | ||
386 | |||
387 | static struct max8997_regulator_data __initdata origen_max8997_regulators[] = { | ||
388 | { MAX8997_LDO1, &max8997_ldo1_data }, | ||
389 | { MAX8997_LDO2, &max8997_ldo2_data }, | ||
390 | { MAX8997_LDO3, &max8997_ldo3_data }, | ||
391 | { MAX8997_LDO4, &max8997_ldo4_data }, | ||
392 | { MAX8997_LDO6, &max8997_ldo6_data }, | ||
393 | { MAX8997_LDO7, &max8997_ldo7_data }, | ||
394 | { MAX8997_LDO8, &max8997_ldo8_data }, | ||
395 | { MAX8997_LDO9, &max8997_ldo9_data }, | ||
396 | { MAX8997_LDO10, &max8997_ldo10_data }, | ||
397 | { MAX8997_LDO11, &max8997_ldo11_data }, | ||
398 | { MAX8997_LDO14, &max8997_ldo14_data }, | ||
399 | { MAX8997_LDO17, &max8997_ldo17_data }, | ||
400 | { MAX8997_LDO21, &max8997_ldo21_data }, | ||
401 | { MAX8997_BUCK1, &max8997_buck1_data }, | ||
402 | { MAX8997_BUCK2, &max8997_buck2_data }, | ||
403 | { MAX8997_BUCK3, &max8997_buck3_data }, | ||
404 | { MAX8997_BUCK5, &max8997_buck5_data }, | ||
405 | { MAX8997_BUCK7, &max8997_buck7_data }, | ||
406 | }; | ||
407 | |||
408 | struct max8997_platform_data __initdata origen_max8997_pdata = { | ||
409 | .num_regulators = ARRAY_SIZE(origen_max8997_regulators), | ||
410 | .regulators = origen_max8997_regulators, | ||
411 | |||
412 | .wakeup = true, | ||
413 | .buck1_gpiodvs = false, | ||
414 | .buck2_gpiodvs = false, | ||
415 | .buck5_gpiodvs = false, | ||
416 | .irq_base = IRQ_GPIO_END + 1, | ||
417 | |||
418 | .ignore_gpiodvs_side_effect = true, | ||
419 | .buck125_default_idx = 0x0, | ||
420 | |||
421 | .buck125_gpios[0] = EXYNOS4_GPX0(0), | ||
422 | .buck125_gpios[1] = EXYNOS4_GPX0(1), | ||
423 | .buck125_gpios[2] = EXYNOS4_GPX0(2), | ||
424 | |||
425 | .buck1_voltage[0] = 1350000, | ||
426 | .buck1_voltage[1] = 1300000, | ||
427 | .buck1_voltage[2] = 1250000, | ||
428 | .buck1_voltage[3] = 1200000, | ||
429 | .buck1_voltage[4] = 1150000, | ||
430 | .buck1_voltage[5] = 1100000, | ||
431 | .buck1_voltage[6] = 1000000, | ||
432 | .buck1_voltage[7] = 950000, | ||
433 | |||
434 | .buck2_voltage[0] = 1100000, | ||
435 | .buck2_voltage[1] = 1100000, | ||
436 | .buck2_voltage[2] = 1100000, | ||
437 | .buck2_voltage[3] = 1100000, | ||
438 | .buck2_voltage[4] = 1000000, | ||
439 | .buck2_voltage[5] = 1000000, | ||
440 | .buck2_voltage[6] = 1000000, | ||
441 | .buck2_voltage[7] = 1000000, | ||
442 | |||
443 | .buck5_voltage[0] = 1200000, | ||
444 | .buck5_voltage[1] = 1200000, | ||
445 | .buck5_voltage[2] = 1200000, | ||
446 | .buck5_voltage[3] = 1200000, | ||
447 | .buck5_voltage[4] = 1200000, | ||
448 | .buck5_voltage[5] = 1200000, | ||
449 | .buck5_voltage[6] = 1200000, | ||
450 | .buck5_voltage[7] = 1200000, | ||
451 | }; | ||
452 | |||
453 | /* I2C0 */ | ||
454 | static struct i2c_board_info i2c0_devs[] __initdata = { | ||
455 | { | ||
456 | I2C_BOARD_INFO("max8997", (0xCC >> 1)), | ||
457 | .platform_data = &origen_max8997_pdata, | ||
458 | .irq = IRQ_EINT(4), | ||
459 | }, | ||
460 | }; | ||
461 | |||
462 | static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = { | ||
463 | .cd_type = S3C_SDHCI_CD_INTERNAL, | ||
464 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
465 | }; | ||
466 | |||
467 | static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { | ||
468 | .cd_type = S3C_SDHCI_CD_INTERNAL, | ||
469 | .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, | ||
470 | }; | ||
471 | |||
472 | /* USB EHCI */ | ||
473 | static struct s5p_ehci_platdata origen_ehci_pdata; | ||
474 | |||
475 | static void __init origen_ehci_init(void) | ||
476 | { | ||
477 | struct s5p_ehci_platdata *pdata = &origen_ehci_pdata; | ||
478 | |||
479 | s5p_ehci_set_platdata(pdata); | ||
480 | } | ||
481 | |||
482 | static struct gpio_keys_button origen_gpio_keys_table[] = { | ||
483 | { | ||
484 | .code = KEY_MENU, | ||
485 | .gpio = EXYNOS4_GPX1(5), | ||
486 | .desc = "gpio-keys: KEY_MENU", | ||
487 | .type = EV_KEY, | ||
488 | .active_low = 1, | ||
489 | .wakeup = 1, | ||
490 | .debounce_interval = 1, | ||
491 | }, { | ||
492 | .code = KEY_HOME, | ||
493 | .gpio = EXYNOS4_GPX1(6), | ||
494 | .desc = "gpio-keys: KEY_HOME", | ||
495 | .type = EV_KEY, | ||
496 | .active_low = 1, | ||
497 | .wakeup = 1, | ||
498 | .debounce_interval = 1, | ||
499 | }, { | ||
500 | .code = KEY_BACK, | ||
501 | .gpio = EXYNOS4_GPX1(7), | ||
502 | .desc = "gpio-keys: KEY_BACK", | ||
503 | .type = EV_KEY, | ||
504 | .active_low = 1, | ||
505 | .wakeup = 1, | ||
506 | .debounce_interval = 1, | ||
507 | }, { | ||
508 | .code = KEY_UP, | ||
509 | .gpio = EXYNOS4_GPX2(0), | ||
510 | .desc = "gpio-keys: KEY_UP", | ||
511 | .type = EV_KEY, | ||
512 | .active_low = 1, | ||
513 | .wakeup = 1, | ||
514 | .debounce_interval = 1, | ||
515 | }, { | ||
516 | .code = KEY_DOWN, | ||
517 | .gpio = EXYNOS4_GPX2(1), | ||
518 | .desc = "gpio-keys: KEY_DOWN", | ||
519 | .type = EV_KEY, | ||
520 | .active_low = 1, | ||
521 | .wakeup = 1, | ||
522 | .debounce_interval = 1, | ||
523 | }, | ||
524 | }; | ||
525 | |||
526 | static struct gpio_keys_platform_data origen_gpio_keys_data = { | ||
527 | .buttons = origen_gpio_keys_table, | ||
528 | .nbuttons = ARRAY_SIZE(origen_gpio_keys_table), | ||
529 | }; | ||
530 | |||
531 | static struct platform_device origen_device_gpiokeys = { | ||
532 | .name = "gpio-keys", | ||
533 | .dev = { | ||
534 | .platform_data = &origen_gpio_keys_data, | ||
535 | }, | ||
536 | }; | ||
537 | |||
538 | static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power) | ||
539 | { | ||
540 | int ret; | ||
541 | |||
542 | if (power) | ||
543 | ret = gpio_request_one(EXYNOS4_GPE3(4), | ||
544 | GPIOF_OUT_INIT_HIGH, "GPE3_4"); | ||
545 | else | ||
546 | ret = gpio_request_one(EXYNOS4_GPE3(4), | ||
547 | GPIOF_OUT_INIT_LOW, "GPE3_4"); | ||
548 | |||
549 | gpio_free(EXYNOS4_GPE3(4)); | ||
550 | |||
551 | if (ret) | ||
552 | pr_err("failed to request gpio for LCD power: %d\n", ret); | ||
553 | } | ||
554 | |||
555 | static struct plat_lcd_data origen_lcd_hv070wsa_data = { | ||
556 | .set_power = lcd_hv070wsa_set_power, | ||
557 | }; | ||
558 | |||
559 | static struct platform_device origen_lcd_hv070wsa = { | ||
560 | .name = "platform-lcd", | ||
561 | .dev.parent = &s5p_device_fimd0.dev, | ||
562 | .dev.platform_data = &origen_lcd_hv070wsa_data, | ||
563 | }; | ||
564 | |||
565 | static struct s3c_fb_pd_win origen_fb_win0 = { | ||
566 | .win_mode = { | ||
567 | .left_margin = 64, | ||
568 | .right_margin = 16, | ||
569 | .upper_margin = 64, | ||
570 | .lower_margin = 16, | ||
571 | .hsync_len = 48, | ||
572 | .vsync_len = 3, | ||
573 | .xres = 1024, | ||
574 | .yres = 600, | ||
575 | }, | ||
576 | .max_bpp = 32, | ||
577 | .default_bpp = 24, | ||
578 | }; | ||
579 | |||
580 | static struct s3c_fb_platdata origen_lcd_pdata __initdata = { | ||
581 | .win[0] = &origen_fb_win0, | ||
582 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
583 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
584 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | ||
585 | }; | ||
586 | |||
587 | static struct platform_device *origen_devices[] __initdata = { | ||
588 | &s3c_device_hsmmc2, | ||
589 | &s3c_device_hsmmc0, | ||
590 | &s3c_device_i2c0, | ||
591 | &s3c_device_rtc, | ||
592 | &s3c_device_wdt, | ||
593 | &s5p_device_ehci, | ||
594 | &s5p_device_fimc0, | ||
595 | &s5p_device_fimc1, | ||
596 | &s5p_device_fimc2, | ||
597 | &s5p_device_fimc3, | ||
598 | &s5p_device_fimd0, | ||
599 | &s5p_device_hdmi, | ||
600 | &s5p_device_i2c_hdmiphy, | ||
601 | &s5p_device_mixer, | ||
602 | &exynos4_device_pd[PD_LCD0], | ||
603 | &exynos4_device_pd[PD_TV], | ||
604 | &origen_device_gpiokeys, | ||
605 | &origen_lcd_hv070wsa, | ||
606 | }; | ||
607 | |||
608 | /* LCD Backlight data */ | ||
609 | static struct samsung_bl_gpio_info origen_bl_gpio_info = { | ||
610 | .no = EXYNOS4_GPD0(0), | ||
611 | .func = S3C_GPIO_SFN(2), | ||
612 | }; | ||
613 | |||
614 | static struct platform_pwm_backlight_data origen_bl_data = { | ||
615 | .pwm_id = 0, | ||
616 | .pwm_period_ns = 1000, | ||
617 | }; | ||
618 | |||
619 | static void s5p_tv_setup(void) | ||
620 | { | ||
621 | /* Direct HPD to HDMI chip */ | ||
622 | gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug"); | ||
623 | s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); | ||
624 | s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); | ||
625 | } | ||
626 | |||
627 | static void __init origen_map_io(void) | ||
628 | { | ||
629 | s5p_init_io(NULL, 0, S5P_VA_CHIPID); | ||
630 | s3c24xx_init_clocks(24000000); | ||
631 | s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); | ||
632 | } | ||
633 | |||
634 | static void __init origen_power_init(void) | ||
635 | { | ||
636 | gpio_request(EXYNOS4_GPX0(4), "PMIC_IRQ"); | ||
637 | s3c_gpio_cfgpin(EXYNOS4_GPX0(4), S3C_GPIO_SFN(0xf)); | ||
638 | s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE); | ||
639 | } | ||
640 | |||
641 | static void __init origen_machine_init(void) | ||
642 | { | ||
643 | origen_power_init(); | ||
644 | |||
645 | s3c_i2c0_set_platdata(NULL); | ||
646 | i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); | ||
647 | |||
648 | /* | ||
649 | * Since sdhci instance 2 can contain a bootable media, | ||
650 | * sdhci instance 0 is registered after instance 2. | ||
651 | */ | ||
652 | s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); | ||
653 | s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata); | ||
654 | |||
655 | origen_ehci_init(); | ||
656 | clk_xusbxti.rate = 24000000; | ||
657 | |||
658 | s5p_tv_setup(); | ||
659 | s5p_i2c_hdmiphy_set_platdata(NULL); | ||
660 | |||
661 | s5p_fimd0_set_platdata(&origen_lcd_pdata); | ||
662 | |||
663 | platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); | ||
664 | s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; | ||
665 | |||
666 | s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev; | ||
667 | s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev; | ||
668 | |||
669 | samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); | ||
670 | } | ||
671 | |||
672 | MACHINE_START(ORIGEN, "ORIGEN") | ||
673 | /* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */ | ||
674 | .boot_params = S5P_PA_SDRAM + 0x100, | ||
675 | .init_irq = exynos4_init_irq, | ||
676 | .map_io = origen_map_io, | ||
677 | .init_machine = origen_machine_init, | ||
678 | .timer = &exynos4_timer, | ||
679 | MACHINE_END | ||
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c index ea4149556860..5f62b2b3310d 100644 --- a/arch/arm/mach-exynos4/mach-smdkv310.c +++ b/arch/arm/mach-exynos4/mach-smdkv310.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <plat/pd.h> | 32 | #include <plat/pd.h> |
33 | #include <plat/gpio-cfg.h> | 33 | #include <plat/gpio-cfg.h> |
34 | #include <plat/backlight.h> | 34 | #include <plat/backlight.h> |
35 | #include <plat/mfc.h> | ||
35 | 36 | ||
36 | #include <mach/map.h> | 37 | #include <mach/map.h> |
37 | 38 | ||
@@ -177,6 +178,9 @@ static struct platform_device *smdkv310_devices[] __initdata = { | |||
177 | &exynos4_device_ac97, | 178 | &exynos4_device_ac97, |
178 | &exynos4_device_i2s0, | 179 | &exynos4_device_i2s0, |
179 | &samsung_device_keypad, | 180 | &samsung_device_keypad, |
181 | &s5p_device_mfc, | ||
182 | &s5p_device_mfc_l, | ||
183 | &s5p_device_mfc_r, | ||
180 | &exynos4_device_pd[PD_MFC], | 184 | &exynos4_device_pd[PD_MFC], |
181 | &exynos4_device_pd[PD_G3D], | 185 | &exynos4_device_pd[PD_G3D], |
182 | &exynos4_device_pd[PD_LCD0], | 186 | &exynos4_device_pd[PD_LCD0], |
@@ -233,6 +237,11 @@ static void __init smdkv310_map_io(void) | |||
233 | s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); | 237 | s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs)); |
234 | } | 238 | } |
235 | 239 | ||
240 | static void __init smdkv310_reserve(void) | ||
241 | { | ||
242 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); | ||
243 | } | ||
244 | |||
236 | static void __init smdkv310_machine_init(void) | 245 | static void __init smdkv310_machine_init(void) |
237 | { | 246 | { |
238 | s3c_i2c1_set_platdata(NULL); | 247 | s3c_i2c1_set_platdata(NULL); |
@@ -250,6 +259,7 @@ static void __init smdkv310_machine_init(void) | |||
250 | samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); | 259 | samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); |
251 | 260 | ||
252 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); | 261 | platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); |
262 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; | ||
253 | } | 263 | } |
254 | 264 | ||
255 | MACHINE_START(SMDKV310, "SMDKV310") | 265 | MACHINE_START(SMDKV310, "SMDKV310") |
@@ -260,4 +270,5 @@ MACHINE_START(SMDKV310, "SMDKV310") | |||
260 | .map_io = smdkv310_map_io, | 270 | .map_io = smdkv310_map_io, |
261 | .init_machine = smdkv310_machine_init, | 271 | .init_machine = smdkv310_machine_init, |
262 | .timer = &exynos4_timer, | 272 | .timer = &exynos4_timer, |
273 | .reserve = &smdkv310_reserve, | ||
263 | MACHINE_END | 274 | MACHINE_END |
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-exynos4/mach-universal_c210.c index b3b5d8911004..3ca7f3a8c2c5 100644 --- a/arch/arm/mach-exynos4/mach-universal_c210.c +++ b/arch/arm/mach-exynos4/mach-universal_c210.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/gpio_keys.h> | 14 | #include <linux/gpio_keys.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <linux/fb.h> | ||
16 | #include <linux/mfd/max8998.h> | 17 | #include <linux/mfd/max8998.h> |
17 | #include <linux/regulator/machine.h> | 18 | #include <linux/regulator/machine.h> |
18 | #include <linux/regulator/fixed.h> | 19 | #include <linux/regulator/fixed.h> |
@@ -31,9 +32,11 @@ | |||
31 | #include <plat/devs.h> | 32 | #include <plat/devs.h> |
32 | #include <plat/iic.h> | 33 | #include <plat/iic.h> |
33 | #include <plat/gpio-cfg.h> | 34 | #include <plat/gpio-cfg.h> |
35 | #include <plat/fb.h> | ||
34 | #include <plat/mfc.h> | 36 | #include <plat/mfc.h> |
35 | #include <plat/sdhci.h> | 37 | #include <plat/sdhci.h> |
36 | #include <plat/pd.h> | 38 | #include <plat/pd.h> |
39 | #include <plat/regs-fb-v4.h> | ||
37 | 40 | ||
38 | #include <mach/map.h> | 41 | #include <mach/map.h> |
39 | 42 | ||
@@ -702,6 +705,32 @@ static struct i2c_board_info i2c1_devs[] __initdata = { | |||
702 | /* Gyro, To be updated */ | 705 | /* Gyro, To be updated */ |
703 | }; | 706 | }; |
704 | 707 | ||
708 | /* Frame Buffer */ | ||
709 | static struct s3c_fb_pd_win universal_fb_win0 = { | ||
710 | .win_mode = { | ||
711 | .left_margin = 16, | ||
712 | .right_margin = 16, | ||
713 | .upper_margin = 2, | ||
714 | .lower_margin = 28, | ||
715 | .hsync_len = 2, | ||
716 | .vsync_len = 1, | ||
717 | .xres = 480, | ||
718 | .yres = 800, | ||
719 | .refresh = 55, | ||
720 | }, | ||
721 | .max_bpp = 32, | ||
722 | .default_bpp = 16, | ||
723 | }; | ||
724 | |||
725 | static struct s3c_fb_platdata universal_lcd_pdata __initdata = { | ||
726 | .win[0] = &universal_fb_win0, | ||
727 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB | | ||
728 | VIDCON0_CLKSEL_LCD, | ||
729 | .vidcon1 = VIDCON1_INV_VCLK | VIDCON1_INV_VDEN | ||
730 | | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
731 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, | ||
732 | }; | ||
733 | |||
705 | static struct platform_device *universal_devices[] __initdata = { | 734 | static struct platform_device *universal_devices[] __initdata = { |
706 | /* Samsung Platform Devices */ | 735 | /* Samsung Platform Devices */ |
707 | &s5p_device_fimc0, | 736 | &s5p_device_fimc0, |
@@ -719,10 +748,12 @@ static struct platform_device *universal_devices[] __initdata = { | |||
719 | &i2c_gpio12, | 748 | &i2c_gpio12, |
720 | &universal_gpio_keys, | 749 | &universal_gpio_keys, |
721 | &s5p_device_onenand, | 750 | &s5p_device_onenand, |
751 | &s5p_device_fimd0, | ||
722 | &s5p_device_mfc, | 752 | &s5p_device_mfc, |
723 | &s5p_device_mfc_l, | 753 | &s5p_device_mfc_l, |
724 | &s5p_device_mfc_r, | 754 | &s5p_device_mfc_r, |
725 | &exynos4_device_pd[PD_MFC], | 755 | &exynos4_device_pd[PD_MFC], |
756 | &exynos4_device_pd[PD_LCD0], | ||
726 | }; | 757 | }; |
727 | 758 | ||
728 | static void __init universal_map_io(void) | 759 | static void __init universal_map_io(void) |
@@ -751,6 +782,8 @@ static void __init universal_machine_init(void) | |||
751 | s3c_i2c5_set_platdata(NULL); | 782 | s3c_i2c5_set_platdata(NULL); |
752 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); | 783 | i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs)); |
753 | 784 | ||
785 | s5p_fimd0_set_platdata(&universal_lcd_pdata); | ||
786 | |||
754 | universal_touchkey_init(); | 787 | universal_touchkey_init(); |
755 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, | 788 | i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs, |
756 | ARRAY_SIZE(i2c_gpio12_devs)); | 789 | ARRAY_SIZE(i2c_gpio12_devs)); |
@@ -758,6 +791,7 @@ static void __init universal_machine_init(void) | |||
758 | /* Last */ | 791 | /* Last */ |
759 | platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); | 792 | platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices)); |
760 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; | 793 | s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev; |
794 | s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev; | ||
761 | } | 795 | } |
762 | 796 | ||
763 | MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") | 797 | MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210") |