Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 1 | /* |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 2 | * Copyright (c) 2006-2009 Victor Chukhantsev, Denis Grigoriev, |
| 3 | * Copyright (c) 2007-2010 Vasily Khoruzhick |
| 4 | * |
| 5 | * based on smdk2440 written by Ben Dooks |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/types.h> |
| 15 | #include <linux/interrupt.h> |
| 16 | #include <linux/list.h> |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 17 | #include <linux/memblock.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 18 | #include <linux/delay.h> |
| 19 | #include <linux/timer.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/gpio.h> |
| 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/serial_core.h> |
Tushar Behera | 334a1c7 | 2014-02-14 10:32:45 +0900 | [diff] [blame] | 24 | #include <linux/serial_s3c.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 25 | #include <linux/input.h> |
| 26 | #include <linux/gpio_keys.h> |
Kay Sievers | edbaa60 | 2011-12-21 16:26:03 -0800 | [diff] [blame] | 27 | #include <linux/device.h> |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 28 | #include <linux/pda_power.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 29 | #include <linux/pwm_backlight.h> |
| 30 | #include <linux/pwm.h> |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 31 | #include <linux/s3c_adc_battery.h> |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 32 | #include <linux/leds.h> |
Vasily Khoruzhick | 2cc857f | 2010-09-07 17:32:26 +0300 | [diff] [blame] | 33 | #include <linux/i2c.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 34 | |
| 35 | #include <linux/mtd/mtd.h> |
| 36 | #include <linux/mtd/partitions.h> |
| 37 | |
| 38 | #include <linux/mmc/host.h> |
| 39 | |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 40 | #include <asm/mach-types.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 41 | #include <asm/mach/arch.h> |
| 42 | #include <asm/mach/map.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 43 | |
Arnd Bergmann | 436d42c | 2012-08-24 15:22:12 +0200 | [diff] [blame] | 44 | #include <linux/platform_data/i2c-s3c2410.h> |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 45 | #include <linux/platform_data/mmc-s3cmci.h> |
| 46 | #include <linux/platform_data/mtd-nand-s3c2410.h> |
Arnd Bergmann | 436d42c | 2012-08-24 15:22:12 +0200 | [diff] [blame] | 47 | #include <linux/platform_data/touchscreen-s3c2410.h> |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 48 | #include <linux/platform_data/usb-s3c2410_udc.h> |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 49 | |
Vasily Khoruzhick | 2cc857f | 2010-09-07 17:32:26 +0300 | [diff] [blame] | 50 | #include <sound/uda1380.h> |
| 51 | |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 52 | #include <mach/fb.h> |
| 53 | #include <mach/regs-gpio.h> |
| 54 | #include <mach/regs-lcd.h> |
Linus Walleij | b0161ca | 2014-01-14 14:24:24 +0100 | [diff] [blame] | 55 | #include <mach/gpio-samsung.h> |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 56 | |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 57 | #include <plat/cpu.h> |
| 58 | #include <plat/devs.h> |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 59 | #include <plat/pm.h> |
Romain Naour | 7f78b6e | 2013-01-09 18:47:04 -0800 | [diff] [blame] | 60 | #include <plat/samsung-time.h> |
Linus Walleij | 3643741 | 2014-01-14 15:05:22 +0100 | [diff] [blame] | 61 | #include <plat/gpio-cfg.h> |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 62 | |
Kukjin Kim | b27b072 | 2012-01-03 14:02:03 +0100 | [diff] [blame] | 63 | #include "common.h" |
Kukjin Kim | 232910d | 2013-01-02 10:18:58 -0800 | [diff] [blame] | 64 | #include "h1940.h" |
Kukjin Kim | b27b072 | 2012-01-03 14:02:03 +0100 | [diff] [blame] | 65 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 66 | #define LCD_PWM_PERIOD 192960 |
| 67 | #define LCD_PWM_DUTY 127353 |
| 68 | |
| 69 | static struct map_desc rx1950_iodesc[] __initdata = { |
| 70 | }; |
| 71 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 72 | static struct s3c2410_uartcfg rx1950_uartcfgs[] __initdata = { |
| 73 | [0] = { |
| 74 | .hwport = 0, |
| 75 | .flags = 0, |
| 76 | .ucon = 0x3c5, |
| 77 | .ulcon = 0x03, |
| 78 | .ufcon = 0x51, |
Thomas Abraham | afba7f9 | 2011-10-24 11:47:51 +0200 | [diff] [blame] | 79 | .clk_sel = S3C2410_UCON_CLKSEL3, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 80 | }, |
| 81 | [1] = { |
| 82 | .hwport = 1, |
| 83 | .flags = 0, |
| 84 | .ucon = 0x3c5, |
| 85 | .ulcon = 0x03, |
| 86 | .ufcon = 0x51, |
Thomas Abraham | afba7f9 | 2011-10-24 11:47:51 +0200 | [diff] [blame] | 87 | .clk_sel = S3C2410_UCON_CLKSEL3, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 88 | }, |
| 89 | /* IR port */ |
| 90 | [2] = { |
| 91 | .hwport = 2, |
| 92 | .flags = 0, |
| 93 | .ucon = 0x3c5, |
| 94 | .ulcon = 0x43, |
| 95 | .ufcon = 0xf1, |
Thomas Abraham | afba7f9 | 2011-10-24 11:47:51 +0200 | [diff] [blame] | 96 | .clk_sel = S3C2410_UCON_CLKSEL3, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 97 | }, |
| 98 | }; |
| 99 | |
| 100 | static struct s3c2410fb_display rx1950_display = { |
| 101 | .type = S3C2410_LCDCON1_TFT, |
| 102 | .width = 240, |
| 103 | .height = 320, |
| 104 | .xres = 240, |
| 105 | .yres = 320, |
| 106 | .bpp = 16, |
| 107 | |
| 108 | .pixclock = 260000, |
| 109 | .left_margin = 10, |
| 110 | .right_margin = 20, |
| 111 | .hsync_len = 10, |
| 112 | .upper_margin = 2, |
| 113 | .lower_margin = 2, |
| 114 | .vsync_len = 2, |
| 115 | |
| 116 | .lcdcon5 = S3C2410_LCDCON5_FRM565 | |
| 117 | S3C2410_LCDCON5_INVVCLK | |
| 118 | S3C2410_LCDCON5_INVVLINE | |
| 119 | S3C2410_LCDCON5_INVVFRAME | |
| 120 | S3C2410_LCDCON5_HWSWP | |
| 121 | (0x02 << 13) | |
| 122 | (0x02 << 15), |
| 123 | |
| 124 | }; |
| 125 | |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 126 | static int power_supply_init(struct device *dev) |
| 127 | { |
| 128 | return gpio_request(S3C2410_GPF(2), "cable plugged"); |
| 129 | } |
| 130 | |
| 131 | static int rx1950_is_ac_online(void) |
| 132 | { |
| 133 | return !gpio_get_value(S3C2410_GPF(2)); |
| 134 | } |
| 135 | |
| 136 | static void power_supply_exit(struct device *dev) |
| 137 | { |
| 138 | gpio_free(S3C2410_GPF(2)); |
| 139 | } |
| 140 | |
| 141 | static char *rx1950_supplicants[] = { |
| 142 | "main-battery" |
| 143 | }; |
| 144 | |
| 145 | static struct pda_power_pdata power_supply_info = { |
| 146 | .init = power_supply_init, |
| 147 | .is_ac_online = rx1950_is_ac_online, |
| 148 | .exit = power_supply_exit, |
| 149 | .supplied_to = rx1950_supplicants, |
| 150 | .num_supplicants = ARRAY_SIZE(rx1950_supplicants), |
| 151 | }; |
| 152 | |
| 153 | static struct resource power_supply_resources[] = { |
Tushar Behera | 5f3b90d | 2012-05-12 16:12:25 +0900 | [diff] [blame] | 154 | [0] = DEFINE_RES_NAMED(IRQ_EINT2, 1, "ac", IORESOURCE_IRQ \ |
| 155 | | IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE), |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 156 | }; |
| 157 | |
| 158 | static struct platform_device power_supply = { |
| 159 | .name = "pda-power", |
| 160 | .id = -1, |
| 161 | .dev = { |
| 162 | .platform_data = |
| 163 | &power_supply_info, |
| 164 | }, |
| 165 | .resource = power_supply_resources, |
| 166 | .num_resources = ARRAY_SIZE(power_supply_resources), |
| 167 | }; |
| 168 | |
| 169 | static const struct s3c_adc_bat_thresh bat_lut_noac[] = { |
| 170 | { .volt = 4100, .cur = 156, .level = 100}, |
| 171 | { .volt = 4050, .cur = 156, .level = 95}, |
| 172 | { .volt = 4025, .cur = 141, .level = 90}, |
| 173 | { .volt = 3995, .cur = 144, .level = 85}, |
| 174 | { .volt = 3957, .cur = 162, .level = 80}, |
| 175 | { .volt = 3931, .cur = 147, .level = 75}, |
| 176 | { .volt = 3902, .cur = 147, .level = 70}, |
| 177 | { .volt = 3863, .cur = 153, .level = 65}, |
| 178 | { .volt = 3838, .cur = 150, .level = 60}, |
| 179 | { .volt = 3800, .cur = 153, .level = 55}, |
| 180 | { .volt = 3765, .cur = 153, .level = 50}, |
| 181 | { .volt = 3748, .cur = 172, .level = 45}, |
| 182 | { .volt = 3740, .cur = 153, .level = 40}, |
| 183 | { .volt = 3714, .cur = 175, .level = 35}, |
| 184 | { .volt = 3710, .cur = 156, .level = 30}, |
| 185 | { .volt = 3963, .cur = 156, .level = 25}, |
| 186 | { .volt = 3672, .cur = 178, .level = 20}, |
| 187 | { .volt = 3651, .cur = 178, .level = 15}, |
| 188 | { .volt = 3629, .cur = 178, .level = 10}, |
| 189 | { .volt = 3612, .cur = 162, .level = 5}, |
| 190 | { .volt = 3605, .cur = 162, .level = 0}, |
| 191 | }; |
| 192 | |
| 193 | static const struct s3c_adc_bat_thresh bat_lut_acin[] = { |
| 194 | { .volt = 4200, .cur = 0, .level = 100}, |
| 195 | { .volt = 4190, .cur = 0, .level = 99}, |
| 196 | { .volt = 4178, .cur = 0, .level = 95}, |
| 197 | { .volt = 4110, .cur = 0, .level = 70}, |
| 198 | { .volt = 4076, .cur = 0, .level = 65}, |
| 199 | { .volt = 4046, .cur = 0, .level = 60}, |
| 200 | { .volt = 4021, .cur = 0, .level = 55}, |
| 201 | { .volt = 3999, .cur = 0, .level = 50}, |
| 202 | { .volt = 3982, .cur = 0, .level = 45}, |
| 203 | { .volt = 3965, .cur = 0, .level = 40}, |
| 204 | { .volt = 3957, .cur = 0, .level = 35}, |
| 205 | { .volt = 3948, .cur = 0, .level = 30}, |
| 206 | { .volt = 3936, .cur = 0, .level = 25}, |
| 207 | { .volt = 3927, .cur = 0, .level = 20}, |
| 208 | { .volt = 3906, .cur = 0, .level = 15}, |
| 209 | { .volt = 3880, .cur = 0, .level = 10}, |
| 210 | { .volt = 3829, .cur = 0, .level = 5}, |
| 211 | { .volt = 3820, .cur = 0, .level = 0}, |
| 212 | }; |
| 213 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 214 | static int rx1950_bat_init(void) |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 215 | { |
| 216 | int ret; |
| 217 | |
| 218 | ret = gpio_request(S3C2410_GPJ(2), "rx1950-charger-enable-1"); |
| 219 | if (ret) |
| 220 | goto err_gpio1; |
| 221 | ret = gpio_request(S3C2410_GPJ(3), "rx1950-charger-enable-2"); |
| 222 | if (ret) |
| 223 | goto err_gpio2; |
| 224 | |
| 225 | return 0; |
| 226 | |
| 227 | err_gpio2: |
| 228 | gpio_free(S3C2410_GPJ(2)); |
| 229 | err_gpio1: |
| 230 | return ret; |
| 231 | } |
| 232 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 233 | static void rx1950_bat_exit(void) |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 234 | { |
| 235 | gpio_free(S3C2410_GPJ(2)); |
| 236 | gpio_free(S3C2410_GPJ(3)); |
| 237 | } |
| 238 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 239 | static void rx1950_enable_charger(void) |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 240 | { |
| 241 | gpio_direction_output(S3C2410_GPJ(2), 1); |
| 242 | gpio_direction_output(S3C2410_GPJ(3), 1); |
| 243 | } |
| 244 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 245 | static void rx1950_disable_charger(void) |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 246 | { |
| 247 | gpio_direction_output(S3C2410_GPJ(2), 0); |
| 248 | gpio_direction_output(S3C2410_GPJ(3), 0); |
| 249 | } |
| 250 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 251 | static DEFINE_SPINLOCK(rx1950_blink_spin); |
Vasily Khoruzhick | 62235dc | 2011-01-06 21:52:52 +0200 | [diff] [blame] | 252 | |
| 253 | static int rx1950_led_blink_set(unsigned gpio, int state, |
| 254 | unsigned long *delay_on, unsigned long *delay_off) |
| 255 | { |
| 256 | int blink_gpio, check_gpio; |
| 257 | |
| 258 | switch (gpio) { |
| 259 | case S3C2410_GPA(6): |
| 260 | blink_gpio = S3C2410_GPA(4); |
| 261 | check_gpio = S3C2410_GPA(3); |
| 262 | break; |
| 263 | case S3C2410_GPA(7): |
| 264 | blink_gpio = S3C2410_GPA(3); |
| 265 | check_gpio = S3C2410_GPA(4); |
| 266 | break; |
| 267 | default: |
| 268 | return -EINVAL; |
| 269 | break; |
| 270 | } |
| 271 | |
| 272 | if (delay_on && delay_off && !*delay_on && !*delay_off) |
| 273 | *delay_on = *delay_off = 500; |
| 274 | |
| 275 | spin_lock(&rx1950_blink_spin); |
| 276 | |
| 277 | switch (state) { |
| 278 | case GPIO_LED_NO_BLINK_LOW: |
| 279 | case GPIO_LED_NO_BLINK_HIGH: |
| 280 | if (!gpio_get_value(check_gpio)) |
| 281 | gpio_set_value(S3C2410_GPJ(6), 0); |
| 282 | gpio_set_value(blink_gpio, 0); |
| 283 | gpio_set_value(gpio, state); |
| 284 | break; |
| 285 | case GPIO_LED_BLINK: |
| 286 | gpio_set_value(gpio, 0); |
| 287 | gpio_set_value(S3C2410_GPJ(6), 1); |
| 288 | gpio_set_value(blink_gpio, 1); |
| 289 | break; |
| 290 | } |
| 291 | |
| 292 | spin_unlock(&rx1950_blink_spin); |
| 293 | |
| 294 | return 0; |
| 295 | } |
| 296 | |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 297 | static struct gpio_led rx1950_leds_desc[] = { |
| 298 | { |
Vasily Khoruzhick | 9edb240 | 2011-03-17 20:04:57 +0200 | [diff] [blame] | 299 | .name = "Green", |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 300 | .default_trigger = "main-battery-full", |
Vasily Khoruzhick | 9edb240 | 2011-03-17 20:04:57 +0200 | [diff] [blame] | 301 | .gpio = S3C2410_GPA(6), |
| 302 | .retain_state_suspended = 1, |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 303 | }, |
| 304 | { |
Vasily Khoruzhick | 9edb240 | 2011-03-17 20:04:57 +0200 | [diff] [blame] | 305 | .name = "Red", |
| 306 | .default_trigger |
| 307 | = "main-battery-charging-blink-full-solid", |
| 308 | .gpio = S3C2410_GPA(7), |
| 309 | .retain_state_suspended = 1, |
| 310 | }, |
| 311 | { |
| 312 | .name = "Blue", |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 313 | .default_trigger = "rx1950-acx-mem", |
Vasily Khoruzhick | 9edb240 | 2011-03-17 20:04:57 +0200 | [diff] [blame] | 314 | .gpio = S3C2410_GPA(11), |
| 315 | .retain_state_suspended = 1, |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 316 | }, |
| 317 | }; |
| 318 | |
| 319 | static struct gpio_led_platform_data rx1950_leds_pdata = { |
| 320 | .num_leds = ARRAY_SIZE(rx1950_leds_desc), |
| 321 | .leds = rx1950_leds_desc, |
Vasily Khoruzhick | 62235dc | 2011-01-06 21:52:52 +0200 | [diff] [blame] | 322 | .gpio_blink_set = rx1950_led_blink_set, |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 323 | }; |
| 324 | |
| 325 | static struct platform_device rx1950_leds = { |
| 326 | .name = "leds-gpio", |
| 327 | .id = -1, |
| 328 | .dev = { |
| 329 | .platform_data = &rx1950_leds_pdata, |
| 330 | }, |
| 331 | }; |
| 332 | |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 333 | static struct s3c_adc_bat_pdata rx1950_bat_cfg = { |
| 334 | .init = rx1950_bat_init, |
| 335 | .exit = rx1950_bat_exit, |
| 336 | .enable_charger = rx1950_enable_charger, |
| 337 | .disable_charger = rx1950_disable_charger, |
| 338 | .gpio_charge_finished = S3C2410_GPF(3), |
| 339 | .lut_noac = bat_lut_noac, |
| 340 | .lut_noac_cnt = ARRAY_SIZE(bat_lut_noac), |
| 341 | .lut_acin = bat_lut_acin, |
| 342 | .lut_acin_cnt = ARRAY_SIZE(bat_lut_acin), |
| 343 | .volt_channel = 0, |
| 344 | .current_channel = 1, |
| 345 | .volt_mult = 4235, |
| 346 | .current_mult = 2900, |
| 347 | .internal_impedance = 200, |
| 348 | }; |
| 349 | |
| 350 | static struct platform_device rx1950_battery = { |
| 351 | .name = "s3c-adc-battery", |
| 352 | .id = -1, |
| 353 | .dev = { |
| 354 | .parent = &s3c_device_adc.dev, |
| 355 | .platform_data = &rx1950_bat_cfg, |
| 356 | }, |
| 357 | }; |
| 358 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 359 | static struct s3c2410fb_mach_info rx1950_lcd_cfg = { |
| 360 | .displays = &rx1950_display, |
| 361 | .num_displays = 1, |
| 362 | .default_display = 0, |
| 363 | |
| 364 | .lpcsel = 0x02, |
| 365 | .gpccon = 0xaa9556a9, |
| 366 | .gpccon_mask = 0xffc003fc, |
| 367 | .gpcup = 0x0000ffff, |
| 368 | .gpcup_mask = 0xffffffff, |
| 369 | |
| 370 | .gpdcon = 0xaa90aaa1, |
| 371 | .gpdcon_mask = 0xffc0fff0, |
| 372 | .gpdup = 0x0000fcfd, |
| 373 | .gpdup_mask = 0xffffffff, |
| 374 | |
| 375 | }; |
| 376 | |
| 377 | static struct pwm_device *lcd_pwm; |
| 378 | |
Kukjin Kim | 4cfb7b7 | 2012-01-21 11:46:41 +0900 | [diff] [blame] | 379 | static void rx1950_lcd_power(int enable) |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 380 | { |
| 381 | int i; |
| 382 | static int enabled; |
| 383 | if (enabled == enable) |
| 384 | return; |
| 385 | if (!enable) { |
| 386 | |
| 387 | /* GPC11-GPC15->OUTPUT */ |
| 388 | for (i = 11; i < 16; i++) |
| 389 | gpio_direction_output(S3C2410_GPC(i), 1); |
| 390 | |
| 391 | /* Wait a bit here... */ |
| 392 | mdelay(100); |
| 393 | |
| 394 | /* GPD2-GPD7->OUTPUT */ |
| 395 | /* GPD11-GPD15->OUTPUT */ |
| 396 | /* GPD2-GPD7->1, GPD11-GPD15->1 */ |
| 397 | for (i = 2; i < 8; i++) |
| 398 | gpio_direction_output(S3C2410_GPD(i), 1); |
| 399 | for (i = 11; i < 16; i++) |
| 400 | gpio_direction_output(S3C2410_GPD(i), 1); |
| 401 | |
| 402 | /* Wait a bit here...*/ |
| 403 | mdelay(100); |
| 404 | |
| 405 | /* GPB0->OUTPUT, GPB0->0 */ |
| 406 | gpio_direction_output(S3C2410_GPB(0), 0); |
| 407 | |
| 408 | /* GPC1-GPC4->OUTPUT, GPC1-4->0 */ |
| 409 | for (i = 1; i < 5; i++) |
| 410 | gpio_direction_output(S3C2410_GPC(i), 0); |
| 411 | |
| 412 | /* GPC15-GPC11->0 */ |
| 413 | for (i = 11; i < 16; i++) |
| 414 | gpio_direction_output(S3C2410_GPC(i), 0); |
| 415 | |
| 416 | /* GPD15-GPD11->0, GPD2->GPD7->0 */ |
| 417 | for (i = 11; i < 16; i++) |
| 418 | gpio_direction_output(S3C2410_GPD(i), 0); |
| 419 | |
| 420 | for (i = 2; i < 8; i++) |
| 421 | gpio_direction_output(S3C2410_GPD(i), 0); |
| 422 | |
| 423 | /* GPC6->0, GPC7->0, GPC5->0 */ |
| 424 | gpio_direction_output(S3C2410_GPC(6), 0); |
| 425 | gpio_direction_output(S3C2410_GPC(7), 0); |
| 426 | gpio_direction_output(S3C2410_GPC(5), 0); |
| 427 | |
| 428 | /* GPB1->OUTPUT, GPB1->0 */ |
| 429 | gpio_direction_output(S3C2410_GPB(1), 0); |
| 430 | pwm_config(lcd_pwm, 0, LCD_PWM_PERIOD); |
| 431 | pwm_disable(lcd_pwm); |
| 432 | |
| 433 | /* GPC0->0, GPC10->0 */ |
| 434 | gpio_direction_output(S3C2410_GPC(0), 0); |
| 435 | gpio_direction_output(S3C2410_GPC(10), 0); |
| 436 | } else { |
| 437 | pwm_config(lcd_pwm, LCD_PWM_DUTY, LCD_PWM_PERIOD); |
| 438 | pwm_enable(lcd_pwm); |
| 439 | |
| 440 | gpio_direction_output(S3C2410_GPC(0), 1); |
| 441 | gpio_direction_output(S3C2410_GPC(5), 1); |
| 442 | |
| 443 | s3c_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPB1_TOUT1); |
| 444 | gpio_direction_output(S3C2410_GPC(7), 1); |
| 445 | |
| 446 | for (i = 1; i < 5; i++) |
| 447 | s3c_gpio_cfgpin(S3C2410_GPC(i), S3C_GPIO_SFN(2)); |
| 448 | |
| 449 | for (i = 11; i < 16; i++) |
| 450 | s3c_gpio_cfgpin(S3C2410_GPC(i), S3C_GPIO_SFN(2)); |
| 451 | |
| 452 | for (i = 2; i < 8; i++) |
| 453 | s3c_gpio_cfgpin(S3C2410_GPD(i), S3C_GPIO_SFN(2)); |
| 454 | |
| 455 | for (i = 11; i < 16; i++) |
| 456 | s3c_gpio_cfgpin(S3C2410_GPD(i), S3C_GPIO_SFN(2)); |
| 457 | |
| 458 | gpio_direction_output(S3C2410_GPC(10), 1); |
| 459 | gpio_direction_output(S3C2410_GPC(6), 1); |
| 460 | } |
| 461 | enabled = enable; |
| 462 | } |
| 463 | |
| 464 | static void rx1950_bl_power(int enable) |
| 465 | { |
| 466 | static int enabled; |
| 467 | if (enabled == enable) |
| 468 | return; |
| 469 | if (!enable) { |
| 470 | gpio_direction_output(S3C2410_GPB(0), 0); |
| 471 | } else { |
| 472 | /* LED driver need a "push" to power on */ |
| 473 | gpio_direction_output(S3C2410_GPB(0), 1); |
| 474 | /* Warm up backlight for one period of PWM. |
| 475 | * Without this trick its almost impossible to |
| 476 | * enable backlight with low brightness value |
| 477 | */ |
| 478 | ndelay(48000); |
| 479 | s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); |
| 480 | } |
| 481 | enabled = enable; |
| 482 | } |
| 483 | |
| 484 | static int rx1950_backlight_init(struct device *dev) |
| 485 | { |
| 486 | WARN_ON(gpio_request(S3C2410_GPB(0), "Backlight")); |
| 487 | lcd_pwm = pwm_request(1, "RX1950 LCD"); |
| 488 | if (IS_ERR(lcd_pwm)) { |
| 489 | dev_err(dev, "Unable to request PWM for LCD power!\n"); |
| 490 | return PTR_ERR(lcd_pwm); |
| 491 | } |
| 492 | |
| 493 | rx1950_lcd_power(1); |
| 494 | rx1950_bl_power(1); |
| 495 | |
| 496 | return 0; |
| 497 | } |
| 498 | |
| 499 | static void rx1950_backlight_exit(struct device *dev) |
| 500 | { |
| 501 | rx1950_bl_power(0); |
| 502 | rx1950_lcd_power(0); |
| 503 | |
| 504 | pwm_free(lcd_pwm); |
| 505 | gpio_free(S3C2410_GPB(0)); |
| 506 | } |
| 507 | |
| 508 | |
| 509 | static int rx1950_backlight_notify(struct device *dev, int brightness) |
| 510 | { |
| 511 | if (!brightness) { |
| 512 | rx1950_bl_power(0); |
| 513 | rx1950_lcd_power(0); |
| 514 | } else { |
| 515 | rx1950_lcd_power(1); |
| 516 | rx1950_bl_power(1); |
| 517 | } |
| 518 | return brightness; |
| 519 | } |
| 520 | |
| 521 | static struct platform_pwm_backlight_data rx1950_backlight_data = { |
| 522 | .pwm_id = 0, |
| 523 | .max_brightness = 24, |
| 524 | .dft_brightness = 4, |
| 525 | .pwm_period_ns = 48000, |
Thierry Reding | a63652f | 2013-08-30 12:19:52 +0200 | [diff] [blame] | 526 | .enable_gpio = -1, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 527 | .init = rx1950_backlight_init, |
| 528 | .notify = rx1950_backlight_notify, |
| 529 | .exit = rx1950_backlight_exit, |
| 530 | }; |
| 531 | |
| 532 | static struct platform_device rx1950_backlight = { |
| 533 | .name = "pwm-backlight", |
| 534 | .dev = { |
Tomasz Figa | 7fa33bd | 2013-03-09 15:37:53 +0100 | [diff] [blame] | 535 | .parent = &samsung_device_pwm.dev, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 536 | .platform_data = &rx1950_backlight_data, |
| 537 | }, |
| 538 | }; |
| 539 | |
| 540 | static void rx1950_set_mmc_power(unsigned char power_mode, unsigned short vdd) |
| 541 | { |
| 542 | switch (power_mode) { |
| 543 | case MMC_POWER_OFF: |
| 544 | gpio_direction_output(S3C2410_GPJ(1), 0); |
| 545 | break; |
| 546 | case MMC_POWER_UP: |
| 547 | case MMC_POWER_ON: |
| 548 | gpio_direction_output(S3C2410_GPJ(1), 1); |
| 549 | break; |
| 550 | default: |
| 551 | break; |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | static struct s3c24xx_mci_pdata rx1950_mmc_cfg __initdata = { |
| 556 | .gpio_detect = S3C2410_GPF(5), |
| 557 | .gpio_wprotect = S3C2410_GPH(8), |
| 558 | .set_power = rx1950_set_mmc_power, |
| 559 | .ocr_avail = MMC_VDD_32_33, |
| 560 | }; |
| 561 | |
| 562 | static struct mtd_partition rx1950_nand_part[] = { |
| 563 | [0] = { |
| 564 | .name = "Boot0", |
| 565 | .offset = 0, |
| 566 | .size = 0x4000, |
| 567 | .mask_flags = MTD_WRITEABLE, |
| 568 | }, |
| 569 | [1] = { |
| 570 | .name = "Boot1", |
| 571 | .offset = MTDPART_OFS_APPEND, |
| 572 | .size = 0x40000, |
| 573 | .mask_flags = MTD_WRITEABLE, |
| 574 | }, |
| 575 | [2] = { |
| 576 | .name = "Kernel", |
| 577 | .offset = MTDPART_OFS_APPEND, |
| 578 | .size = 0x300000, |
| 579 | .mask_flags = 0, |
| 580 | }, |
| 581 | [3] = { |
| 582 | .name = "Filesystem", |
| 583 | .offset = MTDPART_OFS_APPEND, |
| 584 | .size = MTDPART_SIZ_FULL, |
| 585 | .mask_flags = 0, |
| 586 | }, |
| 587 | }; |
| 588 | |
| 589 | static struct s3c2410_nand_set rx1950_nand_sets[] = { |
| 590 | [0] = { |
| 591 | .name = "Internal", |
| 592 | .nr_chips = 1, |
| 593 | .nr_partitions = ARRAY_SIZE(rx1950_nand_part), |
| 594 | .partitions = rx1950_nand_part, |
| 595 | }, |
| 596 | }; |
| 597 | |
| 598 | static struct s3c2410_platform_nand rx1950_nand_info = { |
| 599 | .tacls = 25, |
| 600 | .twrph0 = 50, |
| 601 | .twrph1 = 15, |
| 602 | .nr_sets = ARRAY_SIZE(rx1950_nand_sets), |
| 603 | .sets = rx1950_nand_sets, |
| 604 | }; |
| 605 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 606 | static struct s3c2410_udc_mach_info rx1950_udc_cfg __initdata = { |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 607 | .vbus_pin = S3C2410_GPG(5), |
| 608 | .vbus_pin_inverted = 1, |
Lars-Peter Clausen | e27c3c5 | 2011-03-07 08:42:00 +0100 | [diff] [blame] | 609 | .pullup_pin = S3C2410_GPJ(5), |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 610 | }; |
| 611 | |
| 612 | static struct s3c2410_ts_mach_info rx1950_ts_cfg __initdata = { |
| 613 | .delay = 10000, |
| 614 | .presc = 49, |
| 615 | .oversampling_shift = 3, |
| 616 | }; |
| 617 | |
| 618 | static struct gpio_keys_button rx1950_gpio_keys_table[] = { |
| 619 | { |
| 620 | .code = KEY_POWER, |
| 621 | .gpio = S3C2410_GPF(0), |
| 622 | .active_low = 1, |
| 623 | .desc = "Power button", |
| 624 | .wakeup = 1, |
| 625 | }, |
| 626 | { |
| 627 | .code = KEY_F5, |
| 628 | .gpio = S3C2410_GPF(7), |
| 629 | .active_low = 1, |
| 630 | .desc = "Record button", |
| 631 | }, |
| 632 | { |
| 633 | .code = KEY_F1, |
| 634 | .gpio = S3C2410_GPG(0), |
| 635 | .active_low = 1, |
| 636 | .desc = "Calendar button", |
| 637 | }, |
| 638 | { |
| 639 | .code = KEY_F2, |
| 640 | .gpio = S3C2410_GPG(2), |
| 641 | .active_low = 1, |
| 642 | .desc = "Contacts button", |
| 643 | }, |
| 644 | { |
| 645 | .code = KEY_F3, |
| 646 | .gpio = S3C2410_GPG(3), |
| 647 | .active_low = 1, |
| 648 | .desc = "Mail button", |
| 649 | }, |
| 650 | { |
| 651 | .code = KEY_F4, |
| 652 | .gpio = S3C2410_GPG(7), |
| 653 | .active_low = 1, |
| 654 | .desc = "WLAN button", |
| 655 | }, |
| 656 | { |
| 657 | .code = KEY_LEFT, |
| 658 | .gpio = S3C2410_GPG(10), |
| 659 | .active_low = 1, |
| 660 | .desc = "Left button", |
| 661 | }, |
| 662 | { |
| 663 | .code = KEY_RIGHT, |
| 664 | .gpio = S3C2410_GPG(11), |
| 665 | .active_low = 1, |
| 666 | .desc = "Right button", |
| 667 | }, |
| 668 | { |
| 669 | .code = KEY_UP, |
| 670 | .gpio = S3C2410_GPG(4), |
| 671 | .active_low = 1, |
| 672 | .desc = "Up button", |
| 673 | }, |
| 674 | { |
| 675 | .code = KEY_DOWN, |
| 676 | .gpio = S3C2410_GPG(6), |
| 677 | .active_low = 1, |
| 678 | .desc = "Down button", |
| 679 | }, |
| 680 | { |
| 681 | .code = KEY_ENTER, |
| 682 | .gpio = S3C2410_GPG(9), |
| 683 | .active_low = 1, |
| 684 | .desc = "Ok button" |
| 685 | }, |
| 686 | }; |
| 687 | |
| 688 | static struct gpio_keys_platform_data rx1950_gpio_keys_data = { |
| 689 | .buttons = rx1950_gpio_keys_table, |
| 690 | .nbuttons = ARRAY_SIZE(rx1950_gpio_keys_table), |
| 691 | }; |
| 692 | |
| 693 | static struct platform_device rx1950_device_gpiokeys = { |
| 694 | .name = "gpio-keys", |
| 695 | .dev.platform_data = &rx1950_gpio_keys_data, |
| 696 | }; |
| 697 | |
Vasily Khoruzhick | 2cc857f | 2010-09-07 17:32:26 +0300 | [diff] [blame] | 698 | static struct uda1380_platform_data uda1380_info = { |
| 699 | .gpio_power = S3C2410_GPJ(0), |
| 700 | .gpio_reset = S3C2410_GPD(0), |
| 701 | .dac_clk = UDA1380_DAC_CLK_SYSCLK, |
| 702 | }; |
| 703 | |
| 704 | static struct i2c_board_info rx1950_i2c_devices[] = { |
| 705 | { |
| 706 | I2C_BOARD_INFO("uda1380", 0x1a), |
| 707 | .platform_data = &uda1380_info, |
| 708 | }, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 709 | }; |
| 710 | |
| 711 | static struct platform_device *rx1950_devices[] __initdata = { |
Heiko Stuebner | 51cb128 | 2014-05-09 05:48:57 +0900 | [diff] [blame] | 712 | &s3c2410_device_dclk, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 713 | &s3c_device_lcd, |
| 714 | &s3c_device_wdt, |
| 715 | &s3c_device_i2c0, |
| 716 | &s3c_device_iis, |
| 717 | &s3c_device_usbgadget, |
| 718 | &s3c_device_rtc, |
| 719 | &s3c_device_nand, |
| 720 | &s3c_device_sdi, |
| 721 | &s3c_device_adc, |
| 722 | &s3c_device_ts, |
Tomasz Figa | 7fa33bd | 2013-03-09 15:37:53 +0100 | [diff] [blame] | 723 | &samsung_device_pwm, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 724 | &rx1950_backlight, |
| 725 | &rx1950_device_gpiokeys, |
Vasily Khoruzhick | ecab01d | 2010-09-27 00:17:48 +0300 | [diff] [blame] | 726 | &power_supply, |
| 727 | &rx1950_battery, |
Vasily Khoruzhick | 9c1a47c | 2010-09-07 17:32:25 +0300 | [diff] [blame] | 728 | &rx1950_leds, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 729 | }; |
| 730 | |
Heiko Stuebner | 51cb128 | 2014-05-09 05:48:57 +0900 | [diff] [blame] | 731 | #ifdef CONFIG_SAMSUNG_CLOCK |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 732 | static struct clk *rx1950_clocks[] __initdata = { |
| 733 | &s3c24xx_clkout0, |
| 734 | &s3c24xx_clkout1, |
| 735 | }; |
Heiko Stuebner | 51cb128 | 2014-05-09 05:48:57 +0900 | [diff] [blame] | 736 | #endif |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 737 | |
| 738 | static void __init rx1950_map_io(void) |
| 739 | { |
Heiko Stuebner | 51cb128 | 2014-05-09 05:48:57 +0900 | [diff] [blame] | 740 | #ifdef CONFIG_SAMSUNG_CLOCK |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 741 | s3c24xx_clkout0.parent = &clk_h; |
| 742 | s3c24xx_clkout1.parent = &clk_f; |
| 743 | |
| 744 | s3c24xx_register_clocks(rx1950_clocks, ARRAY_SIZE(rx1950_clocks)); |
Heiko Stuebner | 51cb128 | 2014-05-09 05:48:57 +0900 | [diff] [blame] | 745 | #endif |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 746 | |
| 747 | s3c24xx_init_io(rx1950_iodesc, ARRAY_SIZE(rx1950_iodesc)); |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 748 | s3c24xx_init_uarts(rx1950_uartcfgs, ARRAY_SIZE(rx1950_uartcfgs)); |
Romain Naour | 7f78b6e | 2013-01-09 18:47:04 -0800 | [diff] [blame] | 749 | samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 750 | |
| 751 | /* setup PM */ |
| 752 | |
| 753 | #ifdef CONFIG_PM_H1940 |
| 754 | memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 8); |
| 755 | #endif |
| 756 | |
| 757 | s3c_pm_init(); |
| 758 | } |
| 759 | |
Heiko Stuebner | a28d618 | 2014-05-09 05:49:19 +0900 | [diff] [blame] | 760 | static void __init rx1950_init_time(void) |
| 761 | { |
| 762 | s3c2442_init_clocks(16934000); |
| 763 | samsung_timer_init(); |
| 764 | } |
| 765 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 766 | static void __init rx1950_init_machine(void) |
| 767 | { |
| 768 | int i; |
| 769 | |
| 770 | s3c24xx_fb_set_platdata(&rx1950_lcd_cfg); |
| 771 | s3c24xx_udc_set_platdata(&rx1950_udc_cfg); |
| 772 | s3c24xx_ts_set_platdata(&rx1950_ts_cfg); |
| 773 | s3c24xx_mci_set_platdata(&rx1950_mmc_cfg); |
Vasily Khoruzhick | 2cc857f | 2010-09-07 17:32:26 +0300 | [diff] [blame] | 774 | s3c_i2c0_set_platdata(NULL); |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 775 | s3c_nand_set_platdata(&rx1950_nand_info); |
| 776 | |
| 777 | /* Turn off suspend on both USB ports, and switch the |
| 778 | * selectable USB port to USB device mode. */ |
| 779 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | |
| 780 | S3C2410_MISCCR_USBSUSPND0 | |
| 781 | S3C2410_MISCCR_USBSUSPND1, 0x0); |
| 782 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 783 | /* mmc power is disabled by default */ |
| 784 | WARN_ON(gpio_request(S3C2410_GPJ(1), "MMC power")); |
| 785 | gpio_direction_output(S3C2410_GPJ(1), 0); |
| 786 | |
| 787 | for (i = 0; i < 8; i++) |
| 788 | WARN_ON(gpio_request(S3C2410_GPC(i), "LCD power")); |
| 789 | |
| 790 | for (i = 10; i < 16; i++) |
| 791 | WARN_ON(gpio_request(S3C2410_GPC(i), "LCD power")); |
| 792 | |
| 793 | for (i = 2; i < 8; i++) |
| 794 | WARN_ON(gpio_request(S3C2410_GPD(i), "LCD power")); |
| 795 | |
| 796 | for (i = 11; i < 16; i++) |
| 797 | WARN_ON(gpio_request(S3C2410_GPD(i), "LCD power")); |
| 798 | |
| 799 | WARN_ON(gpio_request(S3C2410_GPB(1), "LCD power")); |
| 800 | |
Vasily Khoruzhick | 62235dc | 2011-01-06 21:52:52 +0200 | [diff] [blame] | 801 | WARN_ON(gpio_request(S3C2410_GPA(3), "Red blink")); |
| 802 | WARN_ON(gpio_request(S3C2410_GPA(4), "Green blink")); |
| 803 | WARN_ON(gpio_request(S3C2410_GPJ(6), "LED blink")); |
| 804 | gpio_direction_output(S3C2410_GPA(3), 0); |
| 805 | gpio_direction_output(S3C2410_GPA(4), 0); |
| 806 | gpio_direction_output(S3C2410_GPJ(6), 0); |
| 807 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 808 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); |
Vasily Khoruzhick | 2cc857f | 2010-09-07 17:32:26 +0300 | [diff] [blame] | 809 | |
| 810 | i2c_register_board_info(0, rx1950_i2c_devices, |
| 811 | ARRAY_SIZE(rx1950_i2c_devices)); |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 812 | } |
| 813 | |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 814 | /* H1940 and RX3715 need to reserve this for suspend */ |
| 815 | static void __init rx1950_reserve(void) |
| 816 | { |
Russell King | 8d717a5 | 2010-05-22 19:47:18 +0100 | [diff] [blame] | 817 | memblock_reserve(0x30003000, 0x1000); |
| 818 | memblock_reserve(0x30081000, 0x1000); |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 819 | } |
| 820 | |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 821 | MACHINE_START(RX1950, "HP iPAQ RX1950") |
| 822 | /* Maintainers: Vasily Khoruzhick */ |
Nicolas Pitre | 69d5071 | 2011-07-05 22:38:17 -0400 | [diff] [blame] | 823 | .atag_offset = 0x100, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 824 | .map_io = rx1950_map_io, |
Russell King | 98c672c | 2010-05-22 18:18:57 +0100 | [diff] [blame] | 825 | .reserve = rx1950_reserve, |
Heiko Stuebner | ce6c164 | 2013-02-12 09:59:20 -0800 | [diff] [blame] | 826 | .init_irq = s3c2442_init_irq, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 827 | .init_machine = rx1950_init_machine, |
Heiko Stuebner | a28d618 | 2014-05-09 05:49:19 +0900 | [diff] [blame] | 828 | .init_time = rx1950_init_time, |
Heiko Stuebner | c1ba544 | 2012-03-01 13:23:32 +0900 | [diff] [blame] | 829 | .restart = s3c244x_restart, |
Vasily Khoruzhick | c394f17 | 2010-05-11 09:55:07 +0300 | [diff] [blame] | 830 | MACHINE_END |