JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 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> |
Ricardo Salveti de Araujo | 29e7d58 | 2012-07-19 14:46:36 +0900 | [diff] [blame] | 12 | #include <linux/leds.h> |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 13 | #include <linux/gpio.h> |
| 14 | #include <linux/mmc/host.h> |
| 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/io.h> |
| 17 | #include <linux/input.h> |
Tushar Behera | 4d8cc59 | 2012-09-13 15:52:08 +0900 | [diff] [blame] | 18 | #include <linux/pwm.h> |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 19 | #include <linux/pwm_backlight.h> |
Sachin Kamat | c86cfdd | 2011-09-16 21:41:25 +0900 | [diff] [blame] | 20 | #include <linux/gpio_keys.h> |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 21 | #include <linux/i2c.h> |
| 22 | #include <linux/regulator/machine.h> |
| 23 | #include <linux/mfd/max8997.h> |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 24 | #include <linux/lcd.h> |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 25 | #include <linux/rfkill-gpio.h> |
Jingoo Han | f034d85 | 2012-11-07 08:11:30 +0900 | [diff] [blame] | 26 | #include <linux/platform_data/i2c-s3c2410.h> |
Sachin Kamat | 9c278d5 | 2012-05-20 07:46:40 +0900 | [diff] [blame] | 27 | #include <linux/platform_data/s3c-hsotg.h> |
Jingoo Han | f034d85 | 2012-11-07 08:11:30 +0900 | [diff] [blame] | 28 | #include <linux/platform_data/usb-ehci-s5p.h> |
| 29 | #include <linux/platform_data/usb-exynos.h> |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 30 | |
| 31 | #include <asm/mach/arch.h> |
| 32 | #include <asm/mach-types.h> |
| 33 | |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 34 | #include <video/platform_lcd.h> |
Leela Krishna Amudala | 5a213a5 | 2012-08-08 09:44:49 +0900 | [diff] [blame] | 35 | #include <video/samsung_fimd.h> |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 36 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 37 | #include <plat/regs-serial.h> |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 38 | #include <plat/cpu.h> |
| 39 | #include <plat/devs.h> |
| 40 | #include <plat/sdhci.h> |
Sachin Kamat | 24f9e1f | 2011-08-31 15:47:16 +0900 | [diff] [blame] | 41 | #include <plat/clock.h> |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 42 | #include <plat/gpio-cfg.h> |
| 43 | #include <plat/backlight.h> |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 44 | #include <plat/fb.h> |
Sachin Kamat | df74a28 | 2011-10-13 15:38:21 +0900 | [diff] [blame] | 45 | #include <plat/mfc.h> |
Tushar Behera | ccc61fd | 2012-08-08 13:12:19 +0900 | [diff] [blame] | 46 | #include <plat/hdmi.h> |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 47 | |
| 48 | #include <mach/map.h> |
| 49 | |
Sachin Kamat | 84e6aef | 2012-05-12 16:33:46 +0900 | [diff] [blame] | 50 | #include <drm/exynos_drm.h> |
Kukjin Kim | cc511b8 | 2011-12-27 08:18:36 +0100 | [diff] [blame] | 51 | #include "common.h" |
| 52 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 53 | /* Following are default values for UCON, ULCON and UFCON UART registers */ |
| 54 | #define ORIGEN_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
| 55 | S3C2410_UCON_RXILEVEL | \ |
| 56 | S3C2410_UCON_TXIRQMODE | \ |
| 57 | S3C2410_UCON_RXIRQMODE | \ |
| 58 | S3C2410_UCON_RXFIFO_TOI | \ |
| 59 | S3C2443_UCON_RXERR_IRQEN) |
| 60 | |
| 61 | #define ORIGEN_ULCON_DEFAULT S3C2410_LCON_CS8 |
| 62 | |
| 63 | #define ORIGEN_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE | \ |
| 64 | S5PV210_UFCON_TXTRIG4 | \ |
| 65 | S5PV210_UFCON_RXTRIG4) |
| 66 | |
| 67 | static struct s3c2410_uartcfg origen_uartcfgs[] __initdata = { |
| 68 | [0] = { |
| 69 | .hwport = 0, |
| 70 | .flags = 0, |
| 71 | .ucon = ORIGEN_UCON_DEFAULT, |
| 72 | .ulcon = ORIGEN_ULCON_DEFAULT, |
| 73 | .ufcon = ORIGEN_UFCON_DEFAULT, |
| 74 | }, |
| 75 | [1] = { |
| 76 | .hwport = 1, |
| 77 | .flags = 0, |
| 78 | .ucon = ORIGEN_UCON_DEFAULT, |
| 79 | .ulcon = ORIGEN_ULCON_DEFAULT, |
| 80 | .ufcon = ORIGEN_UFCON_DEFAULT, |
| 81 | }, |
| 82 | [2] = { |
| 83 | .hwport = 2, |
| 84 | .flags = 0, |
| 85 | .ucon = ORIGEN_UCON_DEFAULT, |
| 86 | .ulcon = ORIGEN_ULCON_DEFAULT, |
| 87 | .ufcon = ORIGEN_UFCON_DEFAULT, |
| 88 | }, |
| 89 | [3] = { |
| 90 | .hwport = 3, |
| 91 | .flags = 0, |
| 92 | .ucon = ORIGEN_UCON_DEFAULT, |
| 93 | .ulcon = ORIGEN_ULCON_DEFAULT, |
| 94 | .ufcon = ORIGEN_UFCON_DEFAULT, |
| 95 | }, |
| 96 | }; |
| 97 | |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 98 | static struct regulator_consumer_supply __initdata ldo3_consumer[] = { |
Sylwester Nawrocki | c421a1e | 2012-09-17 06:04:12 -0300 | [diff] [blame] | 99 | REGULATOR_SUPPLY("vddcore", "s5p-mipi-csis.0"), /* MIPI */ |
Sachin Kamat | 5dfb1aa | 2011-10-10 19:54:53 +0900 | [diff] [blame] | 100 | REGULATOR_SUPPLY("vdd", "exynos4-hdmi"), /* HDMI */ |
| 101 | REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"), /* HDMI */ |
Tomasz Figa | 75e56c9 | 2012-11-09 15:10:29 +0900 | [diff] [blame] | 102 | REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* OTG */ |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 103 | }; |
| 104 | static struct regulator_consumer_supply __initdata ldo6_consumer[] = { |
Sylwester Nawrocki | c421a1e | 2012-09-17 06:04:12 -0300 | [diff] [blame] | 105 | REGULATOR_SUPPLY("vddio", "s5p-mipi-csis.0"), /* MIPI */ |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 106 | }; |
| 107 | static struct regulator_consumer_supply __initdata ldo7_consumer[] = { |
| 108 | REGULATOR_SUPPLY("avdd", "alc5625"), /* Realtek ALC5625 */ |
| 109 | }; |
| 110 | static struct regulator_consumer_supply __initdata ldo8_consumer[] = { |
| 111 | REGULATOR_SUPPLY("vdd", "s5p-adc"), /* ADC */ |
Sachin Kamat | 5dfb1aa | 2011-10-10 19:54:53 +0900 | [diff] [blame] | 112 | REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"), /* HDMI */ |
Tomasz Figa | 75e56c9 | 2012-11-09 15:10:29 +0900 | [diff] [blame] | 113 | REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* OTG */ |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 114 | }; |
| 115 | static struct regulator_consumer_supply __initdata ldo9_consumer[] = { |
| 116 | REGULATOR_SUPPLY("dvdd", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ |
| 117 | }; |
| 118 | static struct regulator_consumer_supply __initdata ldo11_consumer[] = { |
| 119 | REGULATOR_SUPPLY("dvdd", "alc5625"), /* Realtek ALC5625 */ |
| 120 | }; |
| 121 | static struct regulator_consumer_supply __initdata ldo14_consumer[] = { |
| 122 | REGULATOR_SUPPLY("avdd18", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ |
| 123 | }; |
| 124 | static struct regulator_consumer_supply __initdata ldo17_consumer[] = { |
| 125 | REGULATOR_SUPPLY("vdd33", "swb-a31"), /* AR6003 WLAN & CSR 8810 BT */ |
| 126 | }; |
| 127 | static struct regulator_consumer_supply __initdata buck1_consumer[] = { |
| 128 | REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */ |
| 129 | }; |
| 130 | static struct regulator_consumer_supply __initdata buck2_consumer[] = { |
| 131 | REGULATOR_SUPPLY("vdd_int", NULL), /* CPUFREQ */ |
| 132 | }; |
| 133 | static struct regulator_consumer_supply __initdata buck3_consumer[] = { |
| 134 | REGULATOR_SUPPLY("vdd_g3d", "mali_drm"), /* G3D */ |
| 135 | }; |
| 136 | static struct regulator_consumer_supply __initdata buck7_consumer[] = { |
| 137 | REGULATOR_SUPPLY("vcc", "platform-lcd"), /* LCD */ |
| 138 | }; |
| 139 | |
| 140 | static struct regulator_init_data __initdata max8997_ldo1_data = { |
| 141 | .constraints = { |
| 142 | .name = "VDD_ABB_3.3V", |
| 143 | .min_uV = 3300000, |
| 144 | .max_uV = 3300000, |
| 145 | .apply_uV = 1, |
| 146 | .state_mem = { |
| 147 | .disabled = 1, |
| 148 | }, |
| 149 | }, |
| 150 | }; |
| 151 | |
| 152 | static struct regulator_init_data __initdata max8997_ldo2_data = { |
| 153 | .constraints = { |
| 154 | .name = "VDD_ALIVE_1.1V", |
| 155 | .min_uV = 1100000, |
| 156 | .max_uV = 1100000, |
| 157 | .apply_uV = 1, |
| 158 | .always_on = 1, |
| 159 | .state_mem = { |
| 160 | .enabled = 1, |
| 161 | }, |
| 162 | }, |
| 163 | }; |
| 164 | |
| 165 | static struct regulator_init_data __initdata max8997_ldo3_data = { |
| 166 | .constraints = { |
| 167 | .name = "VMIPI_1.1V", |
| 168 | .min_uV = 1100000, |
| 169 | .max_uV = 1100000, |
| 170 | .apply_uV = 1, |
| 171 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 172 | .state_mem = { |
| 173 | .disabled = 1, |
| 174 | }, |
| 175 | }, |
| 176 | .num_consumer_supplies = ARRAY_SIZE(ldo3_consumer), |
| 177 | .consumer_supplies = ldo3_consumer, |
| 178 | }; |
| 179 | |
| 180 | static struct regulator_init_data __initdata max8997_ldo4_data = { |
| 181 | .constraints = { |
| 182 | .name = "VDD_RTC_1.8V", |
| 183 | .min_uV = 1800000, |
| 184 | .max_uV = 1800000, |
| 185 | .apply_uV = 1, |
| 186 | .always_on = 1, |
| 187 | .state_mem = { |
| 188 | .disabled = 1, |
| 189 | }, |
| 190 | }, |
| 191 | }; |
| 192 | |
| 193 | static struct regulator_init_data __initdata max8997_ldo6_data = { |
| 194 | .constraints = { |
| 195 | .name = "VMIPI_1.8V", |
| 196 | .min_uV = 1800000, |
| 197 | .max_uV = 1800000, |
| 198 | .apply_uV = 1, |
| 199 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 200 | .state_mem = { |
| 201 | .disabled = 1, |
| 202 | }, |
| 203 | }, |
| 204 | .num_consumer_supplies = ARRAY_SIZE(ldo6_consumer), |
| 205 | .consumer_supplies = ldo6_consumer, |
| 206 | }; |
| 207 | |
| 208 | static struct regulator_init_data __initdata max8997_ldo7_data = { |
| 209 | .constraints = { |
| 210 | .name = "VDD_AUD_1.8V", |
| 211 | .min_uV = 1800000, |
| 212 | .max_uV = 1800000, |
| 213 | .apply_uV = 1, |
| 214 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 215 | .state_mem = { |
| 216 | .disabled = 1, |
| 217 | }, |
| 218 | }, |
| 219 | .num_consumer_supplies = ARRAY_SIZE(ldo7_consumer), |
| 220 | .consumer_supplies = ldo7_consumer, |
| 221 | }; |
| 222 | |
| 223 | static struct regulator_init_data __initdata max8997_ldo8_data = { |
| 224 | .constraints = { |
| 225 | .name = "VADC_3.3V", |
| 226 | .min_uV = 3300000, |
| 227 | .max_uV = 3300000, |
| 228 | .apply_uV = 1, |
| 229 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 230 | .state_mem = { |
| 231 | .disabled = 1, |
| 232 | }, |
| 233 | }, |
| 234 | .num_consumer_supplies = ARRAY_SIZE(ldo8_consumer), |
| 235 | .consumer_supplies = ldo8_consumer, |
| 236 | }; |
| 237 | |
| 238 | static struct regulator_init_data __initdata max8997_ldo9_data = { |
| 239 | .constraints = { |
| 240 | .name = "DVDD_SWB_2.8V", |
| 241 | .min_uV = 2800000, |
| 242 | .max_uV = 2800000, |
| 243 | .apply_uV = 1, |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 244 | .always_on = 1, |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 245 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 246 | .state_mem = { |
| 247 | .disabled = 1, |
| 248 | }, |
| 249 | }, |
| 250 | .num_consumer_supplies = ARRAY_SIZE(ldo9_consumer), |
| 251 | .consumer_supplies = ldo9_consumer, |
| 252 | }; |
| 253 | |
| 254 | static struct regulator_init_data __initdata max8997_ldo10_data = { |
| 255 | .constraints = { |
| 256 | .name = "VDD_PLL_1.1V", |
| 257 | .min_uV = 1100000, |
| 258 | .max_uV = 1100000, |
| 259 | .apply_uV = 1, |
| 260 | .always_on = 1, |
| 261 | .state_mem = { |
| 262 | .disabled = 1, |
| 263 | }, |
| 264 | }, |
| 265 | }; |
| 266 | |
| 267 | static struct regulator_init_data __initdata max8997_ldo11_data = { |
| 268 | .constraints = { |
| 269 | .name = "VDD_AUD_3V", |
| 270 | .min_uV = 3000000, |
| 271 | .max_uV = 3000000, |
| 272 | .apply_uV = 1, |
| 273 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 274 | .state_mem = { |
| 275 | .disabled = 1, |
| 276 | }, |
| 277 | }, |
| 278 | .num_consumer_supplies = ARRAY_SIZE(ldo11_consumer), |
| 279 | .consumer_supplies = ldo11_consumer, |
| 280 | }; |
| 281 | |
| 282 | static struct regulator_init_data __initdata max8997_ldo14_data = { |
| 283 | .constraints = { |
| 284 | .name = "AVDD18_SWB_1.8V", |
| 285 | .min_uV = 1800000, |
| 286 | .max_uV = 1800000, |
| 287 | .apply_uV = 1, |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 288 | .always_on = 1, |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 289 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 290 | .state_mem = { |
| 291 | .disabled = 1, |
| 292 | }, |
| 293 | }, |
| 294 | .num_consumer_supplies = ARRAY_SIZE(ldo14_consumer), |
| 295 | .consumer_supplies = ldo14_consumer, |
| 296 | }; |
| 297 | |
| 298 | static struct regulator_init_data __initdata max8997_ldo17_data = { |
| 299 | .constraints = { |
| 300 | .name = "VDD_SWB_3.3V", |
| 301 | .min_uV = 3300000, |
| 302 | .max_uV = 3300000, |
| 303 | .apply_uV = 1, |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 304 | .always_on = 1, |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 305 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 306 | .state_mem = { |
| 307 | .disabled = 1, |
| 308 | }, |
| 309 | }, |
| 310 | .num_consumer_supplies = ARRAY_SIZE(ldo17_consumer), |
| 311 | .consumer_supplies = ldo17_consumer, |
| 312 | }; |
| 313 | |
| 314 | static struct regulator_init_data __initdata max8997_ldo21_data = { |
| 315 | .constraints = { |
| 316 | .name = "VDD_MIF_1.2V", |
| 317 | .min_uV = 1200000, |
| 318 | .max_uV = 1200000, |
| 319 | .apply_uV = 1, |
| 320 | .always_on = 1, |
| 321 | .state_mem = { |
| 322 | .disabled = 1, |
| 323 | }, |
| 324 | }, |
| 325 | }; |
| 326 | |
| 327 | static struct regulator_init_data __initdata max8997_buck1_data = { |
| 328 | .constraints = { |
| 329 | .name = "VDD_ARM_1.2V", |
| 330 | .min_uV = 950000, |
| 331 | .max_uV = 1350000, |
| 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(buck1_consumer), |
| 340 | .consumer_supplies = buck1_consumer, |
| 341 | }; |
| 342 | |
| 343 | static struct regulator_init_data __initdata max8997_buck2_data = { |
| 344 | .constraints = { |
| 345 | .name = "VDD_INT_1.1V", |
| 346 | .min_uV = 900000, |
| 347 | .max_uV = 1100000, |
| 348 | .always_on = 1, |
| 349 | .boot_on = 1, |
| 350 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, |
| 351 | .state_mem = { |
| 352 | .disabled = 1, |
| 353 | }, |
| 354 | }, |
| 355 | .num_consumer_supplies = ARRAY_SIZE(buck2_consumer), |
| 356 | .consumer_supplies = buck2_consumer, |
| 357 | }; |
| 358 | |
| 359 | static struct regulator_init_data __initdata max8997_buck3_data = { |
| 360 | .constraints = { |
| 361 | .name = "VDD_G3D_1.1V", |
| 362 | .min_uV = 900000, |
| 363 | .max_uV = 1100000, |
| 364 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
| 365 | REGULATOR_CHANGE_STATUS, |
| 366 | .state_mem = { |
| 367 | .disabled = 1, |
| 368 | }, |
| 369 | }, |
| 370 | .num_consumer_supplies = ARRAY_SIZE(buck3_consumer), |
| 371 | .consumer_supplies = buck3_consumer, |
| 372 | }; |
| 373 | |
| 374 | static struct regulator_init_data __initdata max8997_buck5_data = { |
| 375 | .constraints = { |
| 376 | .name = "VDDQ_M1M2_1.2V", |
| 377 | .min_uV = 1200000, |
| 378 | .max_uV = 1200000, |
| 379 | .apply_uV = 1, |
| 380 | .always_on = 1, |
| 381 | .state_mem = { |
| 382 | .disabled = 1, |
| 383 | }, |
| 384 | }, |
| 385 | }; |
| 386 | |
| 387 | static struct regulator_init_data __initdata max8997_buck7_data = { |
| 388 | .constraints = { |
| 389 | .name = "VDD_LCD_3.3V", |
| 390 | .min_uV = 3300000, |
| 391 | .max_uV = 3300000, |
| 392 | .boot_on = 1, |
| 393 | .apply_uV = 1, |
| 394 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, |
| 395 | .state_mem = { |
| 396 | .disabled = 1 |
| 397 | }, |
| 398 | }, |
| 399 | .num_consumer_supplies = ARRAY_SIZE(buck7_consumer), |
| 400 | .consumer_supplies = buck7_consumer, |
| 401 | }; |
| 402 | |
| 403 | static struct max8997_regulator_data __initdata origen_max8997_regulators[] = { |
| 404 | { MAX8997_LDO1, &max8997_ldo1_data }, |
| 405 | { MAX8997_LDO2, &max8997_ldo2_data }, |
| 406 | { MAX8997_LDO3, &max8997_ldo3_data }, |
| 407 | { MAX8997_LDO4, &max8997_ldo4_data }, |
| 408 | { MAX8997_LDO6, &max8997_ldo6_data }, |
| 409 | { MAX8997_LDO7, &max8997_ldo7_data }, |
| 410 | { MAX8997_LDO8, &max8997_ldo8_data }, |
| 411 | { MAX8997_LDO9, &max8997_ldo9_data }, |
| 412 | { MAX8997_LDO10, &max8997_ldo10_data }, |
| 413 | { MAX8997_LDO11, &max8997_ldo11_data }, |
| 414 | { MAX8997_LDO14, &max8997_ldo14_data }, |
| 415 | { MAX8997_LDO17, &max8997_ldo17_data }, |
| 416 | { MAX8997_LDO21, &max8997_ldo21_data }, |
| 417 | { MAX8997_BUCK1, &max8997_buck1_data }, |
| 418 | { MAX8997_BUCK2, &max8997_buck2_data }, |
| 419 | { MAX8997_BUCK3, &max8997_buck3_data }, |
| 420 | { MAX8997_BUCK5, &max8997_buck5_data }, |
| 421 | { MAX8997_BUCK7, &max8997_buck7_data }, |
| 422 | }; |
| 423 | |
Kukjin Kim | e745e06 | 2012-01-21 10:47:14 +0900 | [diff] [blame] | 424 | static struct max8997_platform_data __initdata origen_max8997_pdata = { |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 425 | .num_regulators = ARRAY_SIZE(origen_max8997_regulators), |
| 426 | .regulators = origen_max8997_regulators, |
| 427 | |
| 428 | .wakeup = true, |
| 429 | .buck1_gpiodvs = false, |
| 430 | .buck2_gpiodvs = false, |
| 431 | .buck5_gpiodvs = false, |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 432 | |
| 433 | .ignore_gpiodvs_side_effect = true, |
| 434 | .buck125_default_idx = 0x0, |
| 435 | |
| 436 | .buck125_gpios[0] = EXYNOS4_GPX0(0), |
| 437 | .buck125_gpios[1] = EXYNOS4_GPX0(1), |
| 438 | .buck125_gpios[2] = EXYNOS4_GPX0(2), |
| 439 | |
| 440 | .buck1_voltage[0] = 1350000, |
| 441 | .buck1_voltage[1] = 1300000, |
| 442 | .buck1_voltage[2] = 1250000, |
| 443 | .buck1_voltage[3] = 1200000, |
| 444 | .buck1_voltage[4] = 1150000, |
| 445 | .buck1_voltage[5] = 1100000, |
| 446 | .buck1_voltage[6] = 1000000, |
| 447 | .buck1_voltage[7] = 950000, |
| 448 | |
| 449 | .buck2_voltage[0] = 1100000, |
| 450 | .buck2_voltage[1] = 1100000, |
| 451 | .buck2_voltage[2] = 1100000, |
| 452 | .buck2_voltage[3] = 1100000, |
| 453 | .buck2_voltage[4] = 1000000, |
| 454 | .buck2_voltage[5] = 1000000, |
| 455 | .buck2_voltage[6] = 1000000, |
| 456 | .buck2_voltage[7] = 1000000, |
| 457 | |
| 458 | .buck5_voltage[0] = 1200000, |
| 459 | .buck5_voltage[1] = 1200000, |
| 460 | .buck5_voltage[2] = 1200000, |
| 461 | .buck5_voltage[3] = 1200000, |
| 462 | .buck5_voltage[4] = 1200000, |
| 463 | .buck5_voltage[5] = 1200000, |
| 464 | .buck5_voltage[6] = 1200000, |
| 465 | .buck5_voltage[7] = 1200000, |
| 466 | }; |
| 467 | |
| 468 | /* I2C0 */ |
| 469 | static struct i2c_board_info i2c0_devs[] __initdata = { |
| 470 | { |
| 471 | I2C_BOARD_INFO("max8997", (0xCC >> 1)), |
| 472 | .platform_data = &origen_max8997_pdata, |
| 473 | .irq = IRQ_EINT(4), |
| 474 | }, |
| 475 | }; |
| 476 | |
Tushar Behera | cf1dad9 | 2011-08-31 16:57:37 +0900 | [diff] [blame] | 477 | static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = { |
| 478 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
Tushar Behera | cf1dad9 | 2011-08-31 16:57:37 +0900 | [diff] [blame] | 479 | }; |
| 480 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 481 | static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = { |
Tushar Behera | 92e41ef | 2011-08-31 16:01:15 +0900 | [diff] [blame] | 482 | .cd_type = S3C_SDHCI_CD_INTERNAL, |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 483 | }; |
| 484 | |
Sachin Kamat | 24f9e1f | 2011-08-31 15:47:16 +0900 | [diff] [blame] | 485 | /* USB EHCI */ |
| 486 | static struct s5p_ehci_platdata origen_ehci_pdata; |
| 487 | |
| 488 | static void __init origen_ehci_init(void) |
| 489 | { |
| 490 | struct s5p_ehci_platdata *pdata = &origen_ehci_pdata; |
| 491 | |
| 492 | s5p_ehci_set_platdata(pdata); |
| 493 | } |
| 494 | |
Tushar Behera | 95de77d | 2011-12-24 12:09:06 +0900 | [diff] [blame] | 495 | /* USB OHCI */ |
| 496 | static struct exynos4_ohci_platdata origen_ohci_pdata; |
| 497 | |
| 498 | static void __init origen_ohci_init(void) |
| 499 | { |
| 500 | struct exynos4_ohci_platdata *pdata = &origen_ohci_pdata; |
| 501 | |
| 502 | exynos4_ohci_set_platdata(pdata); |
| 503 | } |
| 504 | |
Sachin Kamat | 9c278d5 | 2012-05-20 07:46:40 +0900 | [diff] [blame] | 505 | /* USB OTG */ |
| 506 | static struct s3c_hsotg_plat origen_hsotg_pdata; |
| 507 | |
Ricardo Salveti de Araujo | 29e7d58 | 2012-07-19 14:46:36 +0900 | [diff] [blame] | 508 | static struct gpio_led origen_gpio_leds[] = { |
| 509 | { |
| 510 | .name = "origen::status1", |
| 511 | .default_trigger = "heartbeat", |
| 512 | .gpio = EXYNOS4_GPX1(3), |
| 513 | .active_low = 1, |
| 514 | }, |
| 515 | { |
| 516 | .name = "origen::status2", |
| 517 | .default_trigger = "mmc0", |
| 518 | .gpio = EXYNOS4_GPX1(4), |
| 519 | .active_low = 1, |
| 520 | }, |
| 521 | }; |
| 522 | |
| 523 | static struct gpio_led_platform_data origen_gpio_led_info = { |
| 524 | .leds = origen_gpio_leds, |
| 525 | .num_leds = ARRAY_SIZE(origen_gpio_leds), |
| 526 | }; |
| 527 | |
| 528 | static struct platform_device origen_leds_gpio = { |
| 529 | .name = "leds-gpio", |
| 530 | .id = -1, |
| 531 | .dev = { |
| 532 | .platform_data = &origen_gpio_led_info, |
| 533 | }, |
| 534 | }; |
| 535 | |
Sachin Kamat | c86cfdd | 2011-09-16 21:41:25 +0900 | [diff] [blame] | 536 | static struct gpio_keys_button origen_gpio_keys_table[] = { |
| 537 | { |
| 538 | .code = KEY_MENU, |
| 539 | .gpio = EXYNOS4_GPX1(5), |
| 540 | .desc = "gpio-keys: KEY_MENU", |
| 541 | .type = EV_KEY, |
| 542 | .active_low = 1, |
| 543 | .wakeup = 1, |
| 544 | .debounce_interval = 1, |
| 545 | }, { |
| 546 | .code = KEY_HOME, |
| 547 | .gpio = EXYNOS4_GPX1(6), |
| 548 | .desc = "gpio-keys: KEY_HOME", |
| 549 | .type = EV_KEY, |
| 550 | .active_low = 1, |
| 551 | .wakeup = 1, |
| 552 | .debounce_interval = 1, |
| 553 | }, { |
| 554 | .code = KEY_BACK, |
| 555 | .gpio = EXYNOS4_GPX1(7), |
| 556 | .desc = "gpio-keys: KEY_BACK", |
| 557 | .type = EV_KEY, |
| 558 | .active_low = 1, |
| 559 | .wakeup = 1, |
| 560 | .debounce_interval = 1, |
| 561 | }, { |
| 562 | .code = KEY_UP, |
| 563 | .gpio = EXYNOS4_GPX2(0), |
| 564 | .desc = "gpio-keys: KEY_UP", |
| 565 | .type = EV_KEY, |
| 566 | .active_low = 1, |
| 567 | .wakeup = 1, |
| 568 | .debounce_interval = 1, |
| 569 | }, { |
| 570 | .code = KEY_DOWN, |
| 571 | .gpio = EXYNOS4_GPX2(1), |
| 572 | .desc = "gpio-keys: KEY_DOWN", |
| 573 | .type = EV_KEY, |
| 574 | .active_low = 1, |
| 575 | .wakeup = 1, |
| 576 | .debounce_interval = 1, |
| 577 | }, |
| 578 | }; |
| 579 | |
| 580 | static struct gpio_keys_platform_data origen_gpio_keys_data = { |
| 581 | .buttons = origen_gpio_keys_table, |
| 582 | .nbuttons = ARRAY_SIZE(origen_gpio_keys_table), |
| 583 | }; |
| 584 | |
| 585 | static struct platform_device origen_device_gpiokeys = { |
| 586 | .name = "gpio-keys", |
| 587 | .dev = { |
| 588 | .platform_data = &origen_gpio_keys_data, |
| 589 | }, |
| 590 | }; |
| 591 | |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 592 | static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power) |
| 593 | { |
| 594 | int ret; |
| 595 | |
| 596 | if (power) |
| 597 | ret = gpio_request_one(EXYNOS4_GPE3(4), |
| 598 | GPIOF_OUT_INIT_HIGH, "GPE3_4"); |
| 599 | else |
| 600 | ret = gpio_request_one(EXYNOS4_GPE3(4), |
| 601 | GPIOF_OUT_INIT_LOW, "GPE3_4"); |
| 602 | |
| 603 | gpio_free(EXYNOS4_GPE3(4)); |
| 604 | |
| 605 | if (ret) |
| 606 | pr_err("failed to request gpio for LCD power: %d\n", ret); |
| 607 | } |
| 608 | |
| 609 | static struct plat_lcd_data origen_lcd_hv070wsa_data = { |
| 610 | .set_power = lcd_hv070wsa_set_power, |
| 611 | }; |
| 612 | |
| 613 | static struct platform_device origen_lcd_hv070wsa = { |
| 614 | .name = "platform-lcd", |
| 615 | .dev.parent = &s5p_device_fimd0.dev, |
| 616 | .dev.platform_data = &origen_lcd_hv070wsa_data, |
| 617 | }; |
| 618 | |
Tushar Behera | 4d8cc59 | 2012-09-13 15:52:08 +0900 | [diff] [blame] | 619 | static struct pwm_lookup origen_pwm_lookup[] = { |
| 620 | PWM_LOOKUP("s3c24xx-pwm.0", 0, "pwm-backlight.0", NULL), |
| 621 | }; |
| 622 | |
Sachin Kamat | 479dda2 | 2012-12-18 08:55:12 -0800 | [diff] [blame] | 623 | #ifdef CONFIG_DRM_EXYNOS_FIMD |
Sachin Kamat | 84e6aef | 2012-05-12 16:33:46 +0900 | [diff] [blame] | 624 | static struct exynos_drm_fimd_pdata drm_fimd_pdata = { |
| 625 | .panel = { |
| 626 | .timing = { |
| 627 | .left_margin = 64, |
| 628 | .right_margin = 16, |
| 629 | .upper_margin = 64, |
| 630 | .lower_margin = 16, |
| 631 | .hsync_len = 48, |
| 632 | .vsync_len = 3, |
| 633 | .xres = 1024, |
| 634 | .yres = 600, |
| 635 | }, |
| 636 | }, |
| 637 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, |
| 638 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | |
| 639 | VIDCON1_INV_VCLK, |
| 640 | .default_win = 0, |
| 641 | .bpp = 32, |
| 642 | }; |
| 643 | #else |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 644 | static struct s3c_fb_pd_win origen_fb_win0 = { |
Thomas Abraham | 79d3c41 | 2012-03-24 21:58:48 +0530 | [diff] [blame] | 645 | .xres = 1024, |
| 646 | .yres = 600, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 647 | .max_bpp = 32, |
| 648 | .default_bpp = 24, |
Tushar Behera | 384b104 | 2012-04-21 08:25:57 -0700 | [diff] [blame] | 649 | .virtual_x = 1024, |
| 650 | .virtual_y = 2 * 600, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 651 | }; |
| 652 | |
Thomas Abraham | 79d3c41 | 2012-03-24 21:58:48 +0530 | [diff] [blame] | 653 | static struct fb_videomode origen_lcd_timing = { |
| 654 | .left_margin = 64, |
| 655 | .right_margin = 16, |
| 656 | .upper_margin = 64, |
| 657 | .lower_margin = 16, |
| 658 | .hsync_len = 48, |
| 659 | .vsync_len = 3, |
| 660 | .xres = 1024, |
| 661 | .yres = 600, |
| 662 | }; |
| 663 | |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 664 | static struct s3c_fb_platdata origen_lcd_pdata __initdata = { |
| 665 | .win[0] = &origen_fb_win0, |
Thomas Abraham | 79d3c41 | 2012-03-24 21:58:48 +0530 | [diff] [blame] | 666 | .vtiming = &origen_lcd_timing, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 667 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, |
Tushar Behera | 815ed6f | 2011-12-29 16:48:08 +0900 | [diff] [blame] | 668 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC | |
| 669 | VIDCON1_INV_VCLK, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 670 | .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, |
| 671 | }; |
Sachin Kamat | 84e6aef | 2012-05-12 16:33:46 +0900 | [diff] [blame] | 672 | #endif |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 673 | |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 674 | /* Bluetooth rfkill gpio platform data */ |
Sachin Kamat | 023c9ff | 2012-05-12 16:30:45 +0900 | [diff] [blame] | 675 | static struct rfkill_gpio_platform_data origen_bt_pdata = { |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 676 | .reset_gpio = EXYNOS4_GPX2(2), |
| 677 | .shutdown_gpio = -1, |
| 678 | .type = RFKILL_TYPE_BLUETOOTH, |
| 679 | .name = "origen-bt", |
| 680 | }; |
| 681 | |
| 682 | /* Bluetooth Platform device */ |
| 683 | static struct platform_device origen_device_bluetooth = { |
| 684 | .name = "rfkill_gpio", |
| 685 | .id = -1, |
| 686 | .dev = { |
| 687 | .platform_data = &origen_bt_pdata, |
| 688 | }, |
| 689 | }; |
| 690 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 691 | static struct platform_device *origen_devices[] __initdata = { |
| 692 | &s3c_device_hsmmc2, |
Tushar Behera | cf1dad9 | 2011-08-31 16:57:37 +0900 | [diff] [blame] | 693 | &s3c_device_hsmmc0, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 694 | &s3c_device_i2c0, |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 695 | &s3c_device_rtc, |
Sachin Kamat | 9c278d5 | 2012-05-20 07:46:40 +0900 | [diff] [blame] | 696 | &s3c_device_usb_hsotg, |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 697 | &s3c_device_wdt, |
Sachin Kamat | 24f9e1f | 2011-08-31 15:47:16 +0900 | [diff] [blame] | 698 | &s5p_device_ehci, |
Sachin Kamat | 6f8eb32 | 2011-08-31 15:52:27 +0900 | [diff] [blame] | 699 | &s5p_device_fimc0, |
| 700 | &s5p_device_fimc1, |
| 701 | &s5p_device_fimc2, |
| 702 | &s5p_device_fimc3, |
Sachin Kamat | 26e1451 | 2012-01-31 13:28:59 +0900 | [diff] [blame] | 703 | &s5p_device_fimc_md, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 704 | &s5p_device_fimd0, |
Sachin Kamat | 84207d8 | 2011-12-29 16:46:16 +0900 | [diff] [blame] | 705 | &s5p_device_g2d, |
Sachin Kamat | 6ca3f8b | 2011-09-17 11:42:43 +0900 | [diff] [blame] | 706 | &s5p_device_hdmi, |
| 707 | &s5p_device_i2c_hdmiphy, |
Sachin Kamat | 965a330 | 2012-03-09 08:19:27 -0800 | [diff] [blame] | 708 | &s5p_device_jpeg, |
Sachin Kamat | df74a28 | 2011-10-13 15:38:21 +0900 | [diff] [blame] | 709 | &s5p_device_mfc, |
| 710 | &s5p_device_mfc_l, |
| 711 | &s5p_device_mfc_r, |
Sachin Kamat | 6ca3f8b | 2011-09-17 11:42:43 +0900 | [diff] [blame] | 712 | &s5p_device_mixer, |
Tushar Behera | 95de77d | 2011-12-24 12:09:06 +0900 | [diff] [blame] | 713 | &exynos4_device_ohci, |
Sachin Kamat | c86cfdd | 2011-09-16 21:41:25 +0900 | [diff] [blame] | 714 | &origen_device_gpiokeys, |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 715 | &origen_lcd_hv070wsa, |
Ricardo Salveti de Araujo | 29e7d58 | 2012-07-19 14:46:36 +0900 | [diff] [blame] | 716 | &origen_leds_gpio, |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 717 | &origen_device_bluetooth, |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 718 | }; |
| 719 | |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 720 | /* LCD Backlight data */ |
| 721 | static struct samsung_bl_gpio_info origen_bl_gpio_info = { |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 722 | .no = EXYNOS4_GPD0(0), |
| 723 | .func = S3C_GPIO_SFN(2), |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 724 | }; |
| 725 | |
| 726 | static struct platform_pwm_backlight_data origen_bl_data = { |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 727 | .pwm_id = 0, |
| 728 | .pwm_period_ns = 1000, |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 729 | }; |
| 730 | |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 731 | static void __init origen_bt_setup(void) |
| 732 | { |
| 733 | gpio_request(EXYNOS4_GPA0(0), "GPIO BT_UART"); |
| 734 | /* 4 UART Pins configuration */ |
| 735 | s3c_gpio_cfgrange_nopull(EXYNOS4_GPA0(0), 4, S3C_GPIO_SFN(2)); |
| 736 | /* Setup BT Reset, this gpio will be requesed by rfkill-gpio */ |
| 737 | s3c_gpio_cfgpin(EXYNOS4_GPX2(2), S3C_GPIO_OUTPUT); |
| 738 | s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE); |
| 739 | } |
| 740 | |
Tushar Behera | ccc61fd | 2012-08-08 13:12:19 +0900 | [diff] [blame] | 741 | /* I2C module and id for HDMIPHY */ |
| 742 | static struct i2c_board_info hdmiphy_info = { |
| 743 | I2C_BOARD_INFO("hdmiphy-exynos4210", 0x38), |
| 744 | }; |
| 745 | |
Sachin Kamat | 3c76669 | 2011-10-03 09:16:53 +0900 | [diff] [blame] | 746 | static void s5p_tv_setup(void) |
| 747 | { |
| 748 | /* Direct HPD to HDMI chip */ |
| 749 | gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug"); |
| 750 | s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); |
| 751 | s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); |
| 752 | } |
| 753 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 754 | static void __init origen_map_io(void) |
| 755 | { |
Kukjin Kim | cc511b8 | 2011-12-27 08:18:36 +0100 | [diff] [blame] | 756 | exynos_init_io(NULL, 0); |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 757 | s3c24xx_init_uarts(origen_uartcfgs, ARRAY_SIZE(origen_uartcfgs)); |
Thomas Abraham | 9274427 | 2013-03-09 17:03:33 +0900 | [diff] [blame^] | 758 | xxti_f = 0; |
| 759 | xusbxti_f = 24000000; |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 760 | } |
| 761 | |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 762 | static void __init origen_power_init(void) |
| 763 | { |
| 764 | gpio_request(EXYNOS4_GPX0(4), "PMIC_IRQ"); |
| 765 | s3c_gpio_cfgpin(EXYNOS4_GPX0(4), S3C_GPIO_SFN(0xf)); |
| 766 | s3c_gpio_setpull(EXYNOS4_GPX0(4), S3C_GPIO_PULL_NONE); |
| 767 | } |
| 768 | |
Sachin Kamat | df74a28 | 2011-10-13 15:38:21 +0900 | [diff] [blame] | 769 | static void __init origen_reserve(void) |
| 770 | { |
| 771 | s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20); |
| 772 | } |
| 773 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 774 | static void __init origen_machine_init(void) |
| 775 | { |
Inderpal Singh | 6e01280 | 2011-10-03 08:51:20 +0900 | [diff] [blame] | 776 | origen_power_init(); |
| 777 | |
| 778 | s3c_i2c0_set_platdata(NULL); |
| 779 | i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs)); |
| 780 | |
Tushar Behera | cf1dad9 | 2011-08-31 16:57:37 +0900 | [diff] [blame] | 781 | /* |
| 782 | * Since sdhci instance 2 can contain a bootable media, |
| 783 | * sdhci instance 0 is registered after instance 2. |
| 784 | */ |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 785 | s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata); |
Tushar Behera | cf1dad9 | 2011-08-31 16:57:37 +0900 | [diff] [blame] | 786 | s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata); |
Sachin Kamat | 24f9e1f | 2011-08-31 15:47:16 +0900 | [diff] [blame] | 787 | |
| 788 | origen_ehci_init(); |
Tushar Behera | 95de77d | 2011-12-24 12:09:06 +0900 | [diff] [blame] | 789 | origen_ohci_init(); |
Sachin Kamat | 9c278d5 | 2012-05-20 07:46:40 +0900 | [diff] [blame] | 790 | s3c_hsotg_set_platdata(&origen_hsotg_pdata); |
Sachin Kamat | 24f9e1f | 2011-08-31 15:47:16 +0900 | [diff] [blame] | 791 | |
Sachin Kamat | 3c76669 | 2011-10-03 09:16:53 +0900 | [diff] [blame] | 792 | s5p_tv_setup(); |
Sachin Kamat | 6ca3f8b | 2011-09-17 11:42:43 +0900 | [diff] [blame] | 793 | s5p_i2c_hdmiphy_set_platdata(NULL); |
Tushar Behera | ccc61fd | 2012-08-08 13:12:19 +0900 | [diff] [blame] | 794 | s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0); |
Sachin Kamat | 6ca3f8b | 2011-09-17 11:42:43 +0900 | [diff] [blame] | 795 | |
Sachin Kamat | 479dda2 | 2012-12-18 08:55:12 -0800 | [diff] [blame] | 796 | #ifdef CONFIG_DRM_EXYNOS_FIMD |
Sachin Kamat | 84e6aef | 2012-05-12 16:33:46 +0900 | [diff] [blame] | 797 | s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; |
| 798 | exynos4_fimd0_gpio_setup_24bpp(); |
| 799 | #else |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 800 | s5p_fimd0_set_platdata(&origen_lcd_pdata); |
Sachin Kamat | 84e6aef | 2012-05-12 16:33:46 +0900 | [diff] [blame] | 801 | #endif |
Tushar Behera | 9421a76 | 2011-10-03 09:12:56 +0900 | [diff] [blame] | 802 | |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 803 | platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); |
Sachin Kamat | df74a28 | 2011-10-13 15:38:21 +0900 | [diff] [blame] | 804 | |
Tushar Behera | 4d8cc59 | 2012-09-13 15:52:08 +0900 | [diff] [blame] | 805 | pwm_add_table(origen_pwm_lookup, ARRAY_SIZE(origen_pwm_lookup)); |
Giridhar Maruthy | 9edff0f | 2011-08-31 15:58:52 +0900 | [diff] [blame] | 806 | samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); |
Sangwook Lee | 62d30f8 | 2011-11-03 16:14:14 +0900 | [diff] [blame] | 807 | |
| 808 | origen_bt_setup(); |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 809 | } |
| 810 | |
| 811 | MACHINE_START(ORIGEN, "ORIGEN") |
| 812 | /* Maintainer: JeongHyeon Kim <jhkim@insignal.co.kr> */ |
Tushar Behera | 1abd328 | 2011-09-19 20:09:01 +0900 | [diff] [blame] | 813 | .atag_offset = 0x100, |
Marc Zyngier | 06853ae | 2011-09-08 13:15:22 +0100 | [diff] [blame] | 814 | .smp = smp_ops(exynos_smp_ops), |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 815 | .init_irq = exynos4_init_irq, |
| 816 | .map_io = origen_map_io, |
| 817 | .init_machine = origen_machine_init, |
Shawn Guo | bb13fab | 2012-04-26 10:35:40 +0800 | [diff] [blame] | 818 | .init_late = exynos_init_late, |
Thomas Abraham | 6923ae4 | 2013-03-09 17:03:29 +0900 | [diff] [blame] | 819 | .init_time = exynos_init_time, |
Sachin Kamat | df74a28 | 2011-10-13 15:38:21 +0900 | [diff] [blame] | 820 | .reserve = &origen_reserve, |
Russell King | 9eb4859 | 2012-01-03 11:56:53 +0100 | [diff] [blame] | 821 | .restart = exynos4_restart, |
JeongHyeon Kim | 699efdd | 2011-07-21 16:19:19 +0900 | [diff] [blame] | 822 | MACHINE_END |