aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChanghwan Youn <chaos.youn@samsung.com>2011-10-04 04:09:26 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-10-04 05:35:04 -0400
commit31451afd2480caf3ae15da56cf9fc3cb3fb821cb (patch)
tree94fd5c6aca7afe1dde3c44111fc058afa4821931
parentc8987470a3a3e56295ee8c9130f5298e807bf4f7 (diff)
ARM: EXYNOS4: Add support SMDK4412 Board
SMDK4412 board is same as a SMDK4212 board except that it has EXYNOS4412 SoC, thus it can share machine code with SMDK4212. This patch renames mach-smdk4212.c to mach-smdk4x12.c to support both SMDK4212 and SMDK4412 board with one machine file. Signed-off-by: Changhwan Youn <chaos.youn@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
-rw-r--r--arch/arm/mach-exynos4/Kconfig9
-rw-r--r--arch/arm/mach-exynos4/Makefile3
-rw-r--r--arch/arm/mach-exynos4/mach-smdk4x12.c (renamed from arch/arm/mach-exynos4/mach-smdk4212.c)128
3 files changed, 80 insertions, 60 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index c255d6f7ec5f..fec23859388b 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -248,6 +248,15 @@ config MACH_SMDK4212
248 help 248 help
249 Machine support for Samsung SMDK4212 249 Machine support for Samsung SMDK4212
250 250
251comment "EXYNOS4412 Boards"
252
253config MACH_SMDK4412
254 bool "SMDK4412"
255 select SOC_EXYNOS4412
256 select MACH_SMDK4212
257 help
258 Machine support for Samsung SMDK4412
259
251endmenu 260endmenu
252 261
253comment "Configuration for HSMMC bus width" 262comment "Configuration for HSMMC bus width"
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index e19cd12d264e..c9b2e1f97e44 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -34,7 +34,8 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
34obj-$(CONFIG_MACH_NURI) += mach-nuri.o 34obj-$(CONFIG_MACH_NURI) += mach-nuri.o
35obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o 35obj-$(CONFIG_MACH_ORIGEN) += mach-origen.o
36 36
37obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4212.o 37obj-$(CONFIG_MACH_SMDK4212) += mach-smdk4x12.o
38obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o
38 39
39# device support 40# device support
40 41
diff --git a/arch/arm/mach-exynos4/mach-smdk4212.c b/arch/arm/mach-exynos4/mach-smdk4x12.c
index 3479a933a6de..fcf2e0e23d53 100644
--- a/arch/arm/mach-exynos4/mach-smdk4212.c
+++ b/arch/arm/mach-exynos4/mach-smdk4x12.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-exynos4/mach-smdk4212.c 2 * linux/arch/arm/mach-exynos4/mach-smdk4x12.c
3 * 3 *
4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 4 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com 5 * http://www.samsung.com
@@ -37,51 +37,51 @@
37#include <mach/map.h> 37#include <mach/map.h>
38 38
39/* Following are default values for UCON, ULCON and UFCON UART registers */ 39/* Following are default values for UCON, ULCON and UFCON UART registers */
40#define SMDK4212_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 40#define SMDK4X12_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
41 S3C2410_UCON_RXILEVEL | \ 41 S3C2410_UCON_RXILEVEL | \
42 S3C2410_UCON_TXIRQMODE | \ 42 S3C2410_UCON_TXIRQMODE | \
43 S3C2410_UCON_RXIRQMODE | \ 43 S3C2410_UCON_RXIRQMODE | \
44 S3C2410_UCON_RXFIFO_TOI | \ 44 S3C2410_UCON_RXFIFO_TOI | \
45 S3C2443_UCON_RXERR_IRQEN) 45 S3C2443_UCON_RXERR_IRQEN)
46 46
47#define SMDK4212_ULCON_DEFAULT S3C2410_LCON_CS8 47#define SMDK4X12_ULCON_DEFAULT S3C2410_LCON_CS8
48 48
49#define SMDK4212_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ 49#define SMDK4X12_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \
50 S5PV210_UFCON_TXTRIG4 | \ 50 S5PV210_UFCON_TXTRIG4 | \
51 S5PV210_UFCON_RXTRIG4) 51 S5PV210_UFCON_RXTRIG4)
52 52
53static struct s3c2410_uartcfg smdk4212_uartcfgs[] __initdata = { 53static struct s3c2410_uartcfg smdk4x12_uartcfgs[] __initdata = {
54 [0] = { 54 [0] = {
55 .hwport = 0, 55 .hwport = 0,
56 .flags = 0, 56 .flags = 0,
57 .ucon = SMDK4212_UCON_DEFAULT, 57 .ucon = SMDK4X12_UCON_DEFAULT,
58 .ulcon = SMDK4212_ULCON_DEFAULT, 58 .ulcon = SMDK4X12_ULCON_DEFAULT,
59 .ufcon = SMDK4212_UFCON_DEFAULT, 59 .ufcon = SMDK4X12_UFCON_DEFAULT,
60 }, 60 },
61 [1] = { 61 [1] = {
62 .hwport = 1, 62 .hwport = 1,
63 .flags = 0, 63 .flags = 0,
64 .ucon = SMDK4212_UCON_DEFAULT, 64 .ucon = SMDK4X12_UCON_DEFAULT,
65 .ulcon = SMDK4212_ULCON_DEFAULT, 65 .ulcon = SMDK4X12_ULCON_DEFAULT,
66 .ufcon = SMDK4212_UFCON_DEFAULT, 66 .ufcon = SMDK4X12_UFCON_DEFAULT,
67 }, 67 },
68 [2] = { 68 [2] = {
69 .hwport = 2, 69 .hwport = 2,
70 .flags = 0, 70 .flags = 0,
71 .ucon = SMDK4212_UCON_DEFAULT, 71 .ucon = SMDK4X12_UCON_DEFAULT,
72 .ulcon = SMDK4212_ULCON_DEFAULT, 72 .ulcon = SMDK4X12_ULCON_DEFAULT,
73 .ufcon = SMDK4212_UFCON_DEFAULT, 73 .ufcon = SMDK4X12_UFCON_DEFAULT,
74 }, 74 },
75 [3] = { 75 [3] = {
76 .hwport = 3, 76 .hwport = 3,
77 .flags = 0, 77 .flags = 0,
78 .ucon = SMDK4212_UCON_DEFAULT, 78 .ucon = SMDK4X12_UCON_DEFAULT,
79 .ulcon = SMDK4212_ULCON_DEFAULT, 79 .ulcon = SMDK4X12_ULCON_DEFAULT,
80 .ufcon = SMDK4212_UFCON_DEFAULT, 80 .ufcon = SMDK4X12_UFCON_DEFAULT,
81 }, 81 },
82}; 82};
83 83
84static struct s3c_sdhci_platdata smdk4212_hsmmc2_pdata __initdata = { 84static struct s3c_sdhci_platdata smdk4x12_hsmmc2_pdata __initdata = {
85 .cd_type = S3C_SDHCI_CD_INTERNAL, 85 .cd_type = S3C_SDHCI_CD_INTERNAL,
86 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, 86 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
87#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT 87#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
@@ -90,7 +90,7 @@ static struct s3c_sdhci_platdata smdk4212_hsmmc2_pdata __initdata = {
90#endif 90#endif
91}; 91};
92 92
93static struct s3c_sdhci_platdata smdk4212_hsmmc3_pdata __initdata = { 93static struct s3c_sdhci_platdata smdk4x12_hsmmc3_pdata __initdata = {
94 .cd_type = S3C_SDHCI_CD_INTERNAL, 94 .cd_type = S3C_SDHCI_CD_INTERNAL,
95 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, 95 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
96}; 96};
@@ -106,7 +106,7 @@ static struct regulator_consumer_supply max8997_buck3 =
106 106
107static struct regulator_init_data max8997_buck1_data = { 107static struct regulator_init_data max8997_buck1_data = {
108 .constraints = { 108 .constraints = {
109 .name = "VDD_ARM_SMDK4212", 109 .name = "VDD_ARM_SMDK4X12",
110 .min_uV = 925000, 110 .min_uV = 925000,
111 .max_uV = 1350000, 111 .max_uV = 1350000,
112 .always_on = 1, 112 .always_on = 1,
@@ -121,7 +121,7 @@ static struct regulator_init_data max8997_buck1_data = {
121 121
122static struct regulator_init_data max8997_buck2_data = { 122static struct regulator_init_data max8997_buck2_data = {
123 .constraints = { 123 .constraints = {
124 .name = "VDD_INT_SMDK4212", 124 .name = "VDD_INT_SMDK4X12",
125 .min_uV = 950000, 125 .min_uV = 950000,
126 .max_uV = 1150000, 126 .max_uV = 1150000,
127 .always_on = 1, 127 .always_on = 1,
@@ -136,7 +136,7 @@ static struct regulator_init_data max8997_buck2_data = {
136 136
137static struct regulator_init_data max8997_buck3_data = { 137static struct regulator_init_data max8997_buck3_data = {
138 .constraints = { 138 .constraints = {
139 .name = "VDD_G3D_SMDK4212", 139 .name = "VDD_G3D_SMDK4X12",
140 .min_uV = 950000, 140 .min_uV = 950000,
141 .max_uV = 1150000, 141 .max_uV = 1150000,
142 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | 142 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
@@ -149,15 +149,15 @@ static struct regulator_init_data max8997_buck3_data = {
149 .consumer_supplies = &max8997_buck3, 149 .consumer_supplies = &max8997_buck3,
150}; 150};
151 151
152static struct max8997_regulator_data smdk4212_max8997_regulators[] = { 152static struct max8997_regulator_data smdk4x12_max8997_regulators[] = {
153 { MAX8997_BUCK1, &max8997_buck1_data }, 153 { MAX8997_BUCK1, &max8997_buck1_data },
154 { MAX8997_BUCK2, &max8997_buck2_data }, 154 { MAX8997_BUCK2, &max8997_buck2_data },
155 { MAX8997_BUCK3, &max8997_buck3_data }, 155 { MAX8997_BUCK3, &max8997_buck3_data },
156}; 156};
157 157
158static struct max8997_platform_data smdk4212_max8997_pdata = { 158static struct max8997_platform_data smdk4x12_max8997_pdata = {
159 .num_regulators = ARRAY_SIZE(smdk4212_max8997_regulators), 159 .num_regulators = ARRAY_SIZE(smdk4x12_max8997_regulators),
160 .regulators = smdk4212_max8997_regulators, 160 .regulators = smdk4x12_max8997_regulators,
161 161
162 .buck1_voltage[0] = 1100000, /* 1.1V */ 162 .buck1_voltage[0] = 1100000, /* 1.1V */
163 .buck1_voltage[1] = 1100000, /* 1.1V */ 163 .buck1_voltage[1] = 1100000, /* 1.1V */
@@ -187,53 +187,53 @@ static struct max8997_platform_data smdk4212_max8997_pdata = {
187 .buck5_voltage[7] = 1100000, /* 1.1V */ 187 .buck5_voltage[7] = 1100000, /* 1.1V */
188}; 188};
189 189
190static struct i2c_board_info smdk4212_i2c_devs0[] __initdata = { 190static struct i2c_board_info smdk4x12_i2c_devs0[] __initdata = {
191 { 191 {
192 I2C_BOARD_INFO("max8997", 0x66), 192 I2C_BOARD_INFO("max8997", 0x66),
193 .platform_data = &smdk4212_max8997_pdata, 193 .platform_data = &smdk4x12_max8997_pdata,
194 } 194 }
195}; 195};
196 196
197static struct i2c_board_info smdk4212_i2c_devs1[] __initdata = { 197static struct i2c_board_info smdk4x12_i2c_devs1[] __initdata = {
198 { I2C_BOARD_INFO("wm8994", 0x1a), } 198 { I2C_BOARD_INFO("wm8994", 0x1a), }
199}; 199};
200 200
201static struct i2c_board_info smdk4212_i2c_devs3[] __initdata = { 201static struct i2c_board_info smdk4x12_i2c_devs3[] __initdata = {
202 /* nothing here yet */ 202 /* nothing here yet */
203}; 203};
204 204
205static struct i2c_board_info smdk4212_i2c_devs7[] __initdata = { 205static struct i2c_board_info smdk4x12_i2c_devs7[] __initdata = {
206 /* nothing here yet */ 206 /* nothing here yet */
207}; 207};
208 208
209static struct samsung_bl_gpio_info smdk4212_bl_gpio_info = { 209static struct samsung_bl_gpio_info smdk4x12_bl_gpio_info = {
210 .no = EXYNOS4_GPD0(1), 210 .no = EXYNOS4_GPD0(1),
211 .func = S3C_GPIO_SFN(2), 211 .func = S3C_GPIO_SFN(2),
212}; 212};
213 213
214static struct platform_pwm_backlight_data smdk4212_bl_data = { 214static struct platform_pwm_backlight_data smdk4x12_bl_data = {
215 .pwm_id = 1, 215 .pwm_id = 1,
216 .pwm_period_ns = 1000, 216 .pwm_period_ns = 1000,
217}; 217};
218 218
219static uint32_t smdk4212_keymap[] __initdata = { 219static uint32_t smdk4x12_keymap[] __initdata = {
220 /* KEY(row, col, keycode) */ 220 /* KEY(row, col, keycode) */
221 KEY(1, 0, KEY_D), KEY(1, 1, KEY_A), KEY(1, 2, KEY_B), 221 KEY(1, 0, KEY_D), KEY(1, 1, KEY_A), KEY(1, 2, KEY_B),
222 KEY(1, 3, KEY_E), KEY(1, 4, KEY_C) 222 KEY(1, 3, KEY_E), KEY(1, 4, KEY_C)
223}; 223};
224 224
225static struct matrix_keymap_data smdk4212_keymap_data __initdata = { 225static struct matrix_keymap_data smdk4x12_keymap_data __initdata = {
226 .keymap = smdk4212_keymap, 226 .keymap = smdk4x12_keymap,
227 .keymap_size = ARRAY_SIZE(smdk4212_keymap), 227 .keymap_size = ARRAY_SIZE(smdk4x12_keymap),
228}; 228};
229 229
230static struct samsung_keypad_platdata smdk4212_keypad_data __initdata = { 230static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = {
231 .keymap_data = &smdk4212_keymap_data, 231 .keymap_data = &smdk4x12_keymap_data,
232 .rows = 2, 232 .rows = 2,
233 .cols = 5, 233 .cols = 5,
234}; 234};
235 235
236static struct platform_device *smdk4212_devices[] __initdata = { 236static struct platform_device *smdk4x12_devices[] __initdata = {
237 &s3c_device_hsmmc2, 237 &s3c_device_hsmmc2,
238 &s3c_device_hsmmc3, 238 &s3c_device_hsmmc3,
239 &s3c_device_i2c0, 239 &s3c_device_i2c0,
@@ -245,48 +245,58 @@ static struct platform_device *smdk4212_devices[] __initdata = {
245 &samsung_device_keypad, 245 &samsung_device_keypad,
246}; 246};
247 247
248static void __init smdk4212_map_io(void) 248static void __init smdk4x12_map_io(void)
249{ 249{
250 clk_xusbxti.rate = 24000000; 250 clk_xusbxti.rate = 24000000;
251 251
252 s5p_init_io(NULL, 0, S5P_VA_CHIPID); 252 s5p_init_io(NULL, 0, S5P_VA_CHIPID);
253 s3c24xx_init_clocks(clk_xusbxti.rate); 253 s3c24xx_init_clocks(clk_xusbxti.rate);
254 s3c24xx_init_uarts(smdk4212_uartcfgs, ARRAY_SIZE(smdk4212_uartcfgs)); 254 s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs));
255} 255}
256 256
257static void __init smdk4212_machine_init(void) 257static void __init smdk4x12_machine_init(void)
258{ 258{
259 s3c_i2c0_set_platdata(NULL); 259 s3c_i2c0_set_platdata(NULL);
260 i2c_register_board_info(0, smdk4212_i2c_devs0, 260 i2c_register_board_info(0, smdk4x12_i2c_devs0,
261 ARRAY_SIZE(smdk4212_i2c_devs0)); 261 ARRAY_SIZE(smdk4x12_i2c_devs0));
262 262
263 s3c_i2c1_set_platdata(NULL); 263 s3c_i2c1_set_platdata(NULL);
264 i2c_register_board_info(1, smdk4212_i2c_devs1, 264 i2c_register_board_info(1, smdk4x12_i2c_devs1,
265 ARRAY_SIZE(smdk4212_i2c_devs1)); 265 ARRAY_SIZE(smdk4x12_i2c_devs1));
266 266
267 s3c_i2c3_set_platdata(NULL); 267 s3c_i2c3_set_platdata(NULL);
268 i2c_register_board_info(3, smdk4212_i2c_devs3, 268 i2c_register_board_info(3, smdk4x12_i2c_devs3,
269 ARRAY_SIZE(smdk4212_i2c_devs3)); 269 ARRAY_SIZE(smdk4x12_i2c_devs3));
270 270
271 s3c_i2c7_set_platdata(NULL); 271 s3c_i2c7_set_platdata(NULL);
272 i2c_register_board_info(7, smdk4212_i2c_devs7, 272 i2c_register_board_info(7, smdk4x12_i2c_devs7,
273 ARRAY_SIZE(smdk4212_i2c_devs7)); 273 ARRAY_SIZE(smdk4x12_i2c_devs7));
274 274
275 samsung_bl_set(&smdk4212_bl_gpio_info, &smdk4212_bl_data); 275 samsung_bl_set(&smdk4x12_bl_gpio_info, &smdk4x12_bl_data);
276 276
277 samsung_keypad_set_platdata(&smdk4212_keypad_data); 277 samsung_keypad_set_platdata(&smdk4x12_keypad_data);
278 278
279 s3c_sdhci2_set_platdata(&smdk4212_hsmmc2_pdata); 279 s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata);
280 s3c_sdhci3_set_platdata(&smdk4212_hsmmc3_pdata); 280 s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata);
281 281
282 platform_add_devices(smdk4212_devices, ARRAY_SIZE(smdk4212_devices)); 282 platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices));
283} 283}
284 284
285MACHINE_START(SMDK4212, "SMDK4212") 285MACHINE_START(SMDK4212, "SMDK4212")
286 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 286 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
287 .boot_params = S5P_PA_SDRAM + 0x100, 287 .atag_offset = 0x100,
288 .init_irq = exynos4_init_irq, 288 .init_irq = exynos4_init_irq,
289 .map_io = smdk4212_map_io, 289 .map_io = smdk4x12_map_io,
290 .init_machine = smdk4212_machine_init, 290 .init_machine = smdk4x12_machine_init,
291 .timer = &exynos4_timer,
292MACHINE_END
293
294MACHINE_START(SMDK4412, "SMDK4412")
295 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
296 /* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
297 .atag_offset = 0x100,
298 .init_irq = exynos4_init_irq,
299 .map_io = smdk4x12_map_io,
300 .init_machine = smdk4x12_machine_init,
291 .timer = &exynos4_timer, 301 .timer = &exynos4_timer,
292MACHINE_END 302MACHINE_END