Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 1 | /* |
Uwe Zeisberger | f30c226 | 2006-10-03 23:01:26 +0200 | [diff] [blame] | 2 | * linux/arch/arm/mach-omap2/board-apollon.c |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright (C) 2005,2006 Samsung Electronics |
| 5 | * Author: Kyungmin Park <kyungmin.park@samsung.com> |
| 6 | * |
| 7 | * Modified from mach-omap/omap2/board-h4.c |
| 8 | * |
| 9 | * Code for apollon OMAP2 board. Should work on many OMAP2 systems where |
| 10 | * the bootloader passes the board-specific data to the kernel. |
| 11 | * Do not put any board specific code to this file; create a new machine |
| 12 | * type if you need custom low-level initializations. |
| 13 | * |
| 14 | * This program is free software; you can redistribute it and/or modify |
| 15 | * it under the terms of the GNU General Public License version 2 as |
| 16 | * published by the Free Software Foundation. |
| 17 | */ |
| 18 | |
| 19 | #include <linux/kernel.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/platform_device.h> |
| 22 | #include <linux/mtd/mtd.h> |
| 23 | #include <linux/mtd/partitions.h> |
| 24 | #include <linux/mtd/onenand.h> |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 25 | #include <linux/delay.h> |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 26 | #include <linux/leds.h> |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 27 | #include <linux/err.h> |
| 28 | #include <linux/clk.h> |
Ladislav Michl | 3bc4801 | 2009-12-11 16:16:33 -0800 | [diff] [blame] | 29 | #include <linux/smc91x.h> |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 30 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 31 | #include <mach/hardware.h> |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 32 | #include <asm/mach-types.h> |
| 33 | #include <asm/mach/arch.h> |
| 34 | #include <asm/mach/flash.h> |
| 35 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 36 | #include <mach/gpio.h> |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 37 | #include <plat/led.h> |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 38 | #include <plat/usb.h> |
| 39 | #include <plat/board.h> |
| 40 | #include <plat/common.h> |
| 41 | #include <plat/gpmc.h> |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 42 | |
Tony Lindgren | b52b14e | 2010-07-05 16:31:37 +0300 | [diff] [blame] | 43 | #include "mux.h" |
Paul Walmsley | 4814ced | 2010-10-08 11:40:20 -0600 | [diff] [blame] | 44 | #include "control.h" |
Tony Lindgren | b52b14e | 2010-07-05 16:31:37 +0300 | [diff] [blame] | 45 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 46 | /* LED & Switch macros */ |
| 47 | #define LED0_GPIO13 13 |
| 48 | #define LED1_GPIO14 14 |
| 49 | #define LED2_GPIO15 15 |
| 50 | #define SW_ENTER_GPIO16 16 |
| 51 | #define SW_UP_GPIO17 17 |
| 52 | #define SW_DOWN_GPIO58 58 |
| 53 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 54 | #define APOLLON_FLASH_CS 0 |
| 55 | #define APOLLON_ETH_CS 1 |
Tony Lindgren | 7055477 | 2009-03-23 18:07:35 -0700 | [diff] [blame] | 56 | #define APOLLON_ETHR_GPIO_IRQ 74 |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 57 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 58 | static struct mtd_partition apollon_partitions[] = { |
| 59 | { |
| 60 | .name = "X-Loader + U-Boot", |
| 61 | .offset = 0, |
| 62 | .size = SZ_128K, |
| 63 | .mask_flags = MTD_WRITEABLE, |
| 64 | }, |
| 65 | { |
| 66 | .name = "params", |
| 67 | .offset = MTDPART_OFS_APPEND, |
| 68 | .size = SZ_128K, |
| 69 | }, |
| 70 | { |
| 71 | .name = "kernel", |
| 72 | .offset = MTDPART_OFS_APPEND, |
| 73 | .size = SZ_2M, |
| 74 | }, |
| 75 | { |
| 76 | .name = "rootfs", |
| 77 | .offset = MTDPART_OFS_APPEND, |
| 78 | .size = SZ_16M, |
| 79 | }, |
| 80 | { |
| 81 | .name = "filesystem00", |
| 82 | .offset = MTDPART_OFS_APPEND, |
| 83 | .size = SZ_32M, |
| 84 | }, |
| 85 | { |
| 86 | .name = "filesystem01", |
| 87 | .offset = MTDPART_OFS_APPEND, |
| 88 | .size = MTDPART_SIZ_FULL, |
| 89 | }, |
| 90 | }; |
| 91 | |
Magnus Damm | 778dbcc | 2009-09-18 12:51:44 -0700 | [diff] [blame] | 92 | static struct onenand_platform_data apollon_flash_data = { |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 93 | .parts = apollon_partitions, |
| 94 | .nr_parts = ARRAY_SIZE(apollon_partitions), |
| 95 | }; |
| 96 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 97 | static struct resource apollon_flash_resource[] = { |
| 98 | [0] = { |
| 99 | .flags = IORESOURCE_MEM, |
| 100 | }, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | static struct platform_device apollon_onenand_device = { |
Magnus Damm | 778dbcc | 2009-09-18 12:51:44 -0700 | [diff] [blame] | 104 | .name = "onenand-flash", |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 105 | .id = -1, |
| 106 | .dev = { |
| 107 | .platform_data = &apollon_flash_data, |
| 108 | }, |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 109 | .num_resources = ARRAY_SIZE(apollon_flash_resource), |
| 110 | .resource = apollon_flash_resource, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 111 | }; |
| 112 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 113 | static void __init apollon_flash_init(void) |
| 114 | { |
| 115 | unsigned long base; |
| 116 | |
| 117 | if (gpmc_cs_request(APOLLON_FLASH_CS, SZ_128K, &base) < 0) { |
| 118 | printk(KERN_ERR "Cannot request OneNAND GPMC CS\n"); |
| 119 | return; |
| 120 | } |
| 121 | apollon_flash_resource[0].start = base; |
| 122 | apollon_flash_resource[0].end = base + SZ_128K - 1; |
| 123 | } |
| 124 | |
Ladislav Michl | 3bc4801 | 2009-12-11 16:16:33 -0800 | [diff] [blame] | 125 | static struct smc91x_platdata appolon_smc91x_info = { |
| 126 | .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT, |
| 127 | .leda = RPC_LED_100_10, |
| 128 | .ledb = RPC_LED_TX_RX, |
| 129 | }; |
| 130 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 131 | static struct resource apollon_smc91x_resources[] = { |
| 132 | [0] = { |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 133 | .flags = IORESOURCE_MEM, |
| 134 | }, |
| 135 | [1] = { |
| 136 | .start = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ), |
| 137 | .end = OMAP_GPIO_IRQ(APOLLON_ETHR_GPIO_IRQ), |
Russell King | e7b3dc7 | 2008-01-14 22:30:10 +0000 | [diff] [blame] | 138 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 139 | }, |
| 140 | }; |
| 141 | |
| 142 | static struct platform_device apollon_smc91x_device = { |
| 143 | .name = "smc91x", |
| 144 | .id = -1, |
Ladislav Michl | 3bc4801 | 2009-12-11 16:16:33 -0800 | [diff] [blame] | 145 | .dev = { |
| 146 | .platform_data = &appolon_smc91x_info, |
| 147 | }, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 148 | .num_resources = ARRAY_SIZE(apollon_smc91x_resources), |
| 149 | .resource = apollon_smc91x_resources, |
| 150 | }; |
| 151 | |
| 152 | static struct platform_device apollon_lcd_device = { |
| 153 | .name = "apollon_lcd", |
| 154 | .id = -1, |
| 155 | }; |
| 156 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 157 | static struct omap_led_config apollon_led_config[] = { |
| 158 | { |
| 159 | .cdev = { |
| 160 | .name = "apollon:led0", |
| 161 | }, |
| 162 | .gpio = LED0_GPIO13, |
| 163 | }, |
| 164 | { |
| 165 | .cdev = { |
| 166 | .name = "apollon:led1", |
| 167 | }, |
| 168 | .gpio = LED1_GPIO14, |
| 169 | }, |
| 170 | { |
| 171 | .cdev = { |
| 172 | .name = "apollon:led2", |
| 173 | }, |
| 174 | .gpio = LED2_GPIO15, |
| 175 | }, |
| 176 | }; |
| 177 | |
| 178 | static struct omap_led_platform_data apollon_led_data = { |
| 179 | .nr_leds = ARRAY_SIZE(apollon_led_config), |
| 180 | .leds = apollon_led_config, |
| 181 | }; |
| 182 | |
| 183 | static struct platform_device apollon_led_device = { |
| 184 | .name = "omap-led", |
| 185 | .id = -1, |
| 186 | .dev = { |
| 187 | .platform_data = &apollon_led_data, |
| 188 | }, |
| 189 | }; |
| 190 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 191 | static struct platform_device *apollon_devices[] __initdata = { |
| 192 | &apollon_onenand_device, |
| 193 | &apollon_smc91x_device, |
| 194 | &apollon_lcd_device, |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 195 | &apollon_led_device, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 196 | }; |
| 197 | |
| 198 | static inline void __init apollon_init_smc91x(void) |
| 199 | { |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 200 | unsigned long base; |
| 201 | |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 202 | unsigned int rate; |
| 203 | struct clk *gpmc_fck; |
| 204 | int eth_cs; |
| 205 | |
| 206 | gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */ |
| 207 | if (IS_ERR(gpmc_fck)) { |
| 208 | WARN_ON(1); |
| 209 | return; |
| 210 | } |
| 211 | |
| 212 | clk_enable(gpmc_fck); |
| 213 | rate = clk_get_rate(gpmc_fck); |
| 214 | |
| 215 | eth_cs = APOLLON_ETH_CS; |
| 216 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 217 | /* Make sure CS1 timings are correct */ |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 218 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1, 0x00011200); |
| 219 | |
| 220 | if (rate >= 160000000) { |
| 221 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01); |
| 222 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803); |
| 223 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a); |
| 224 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); |
| 225 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); |
| 226 | } else if (rate >= 130000000) { |
| 227 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); |
| 228 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); |
| 229 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); |
| 230 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F); |
| 231 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4); |
| 232 | } else {/* rate = 100000000 */ |
| 233 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00); |
| 234 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802); |
| 235 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09); |
| 236 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F); |
| 237 | gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2); |
| 238 | } |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 239 | |
| 240 | if (gpmc_cs_request(APOLLON_ETH_CS, SZ_16M, &base) < 0) { |
| 241 | printk(KERN_ERR "Failed to request GPMC CS for smc91x\n"); |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 242 | goto out; |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 243 | } |
| 244 | apollon_smc91x_resources[0].start = base + 0x300; |
| 245 | apollon_smc91x_resources[0].end = base + 0x30f; |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 246 | udelay(100); |
| 247 | |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 248 | omap_mux_init_gpio(74, 0); |
Jarkko Nikula | f2d18fe | 2008-12-10 17:35:30 -0800 | [diff] [blame] | 249 | if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 250 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", |
| 251 | APOLLON_ETHR_GPIO_IRQ); |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 252 | gpmc_cs_free(APOLLON_ETH_CS); |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 253 | goto out; |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 254 | } |
David Brownell | 40e3925 | 2008-12-10 17:35:26 -0800 | [diff] [blame] | 255 | gpio_direction_input(APOLLON_ETHR_GPIO_IRQ); |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 256 | |
| 257 | out: |
| 258 | clk_disable(gpmc_fck); |
| 259 | clk_put(gpmc_fck); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 260 | } |
| 261 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 262 | static struct omap_usb_config apollon_usb_config __initdata = { |
| 263 | .register_dev = 1, |
| 264 | .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */ |
| 265 | |
| 266 | .pins[0] = 6, |
| 267 | }; |
| 268 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 269 | static struct omap_lcd_config apollon_lcd_config __initdata = { |
| 270 | .ctrl_name = "internal", |
| 271 | }; |
| 272 | |
Bryan Wu | 1a6b592 | 2010-12-08 02:41:25 +0000 | [diff] [blame] | 273 | static struct omap_board_config_kernel apollon_config[] __initdata = { |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 274 | { OMAP_TAG_LCD, &apollon_lcd_config }, |
| 275 | }; |
| 276 | |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 277 | static void __init omap_apollon_init_early(void) |
Paul Walmsley | b3c6df3 | 2009-09-03 20:14:02 +0300 | [diff] [blame] | 278 | { |
| 279 | omap_board_config = apollon_config; |
| 280 | omap_board_config_size = ARRAY_SIZE(apollon_config); |
Paul Walmsley | 4805734 | 2010-12-21 15:25:10 -0700 | [diff] [blame] | 281 | omap2_init_common_infrastructure(); |
| 282 | omap2_init_common_devices(NULL, NULL); |
Paul Walmsley | b3c6df3 | 2009-09-03 20:14:02 +0300 | [diff] [blame] | 283 | } |
| 284 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 285 | static void __init apollon_led_init(void) |
| 286 | { |
| 287 | /* LED0 - AA10 */ |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 288 | omap_mux_init_signal("vlynq_clk.gpio_13", 0); |
Jarkko Nikula | 73069e3 | 2009-01-15 13:09:52 +0200 | [diff] [blame] | 289 | gpio_request(LED0_GPIO13, "LED0"); |
| 290 | gpio_direction_output(LED0_GPIO13, 0); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 291 | /* LED1 - AA6 */ |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 292 | omap_mux_init_signal("vlynq_rx1.gpio_14", 0); |
Jarkko Nikula | 73069e3 | 2009-01-15 13:09:52 +0200 | [diff] [blame] | 293 | gpio_request(LED1_GPIO14, "LED1"); |
| 294 | gpio_direction_output(LED1_GPIO14, 0); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 295 | /* LED2 - AA4 */ |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 296 | omap_mux_init_signal("vlynq_rx0.gpio_15", 0); |
Jarkko Nikula | 73069e3 | 2009-01-15 13:09:52 +0200 | [diff] [blame] | 297 | gpio_request(LED2_GPIO15, "LED2"); |
| 298 | gpio_direction_output(LED2_GPIO15, 0); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 299 | } |
| 300 | |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 301 | static void __init apollon_usb_init(void) |
| 302 | { |
| 303 | /* USB device */ |
| 304 | /* DEVICE_SUSPEND */ |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 305 | omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0); |
Jarkko Nikula | f2d18fe | 2008-12-10 17:35:30 -0800 | [diff] [blame] | 306 | gpio_request(12, "USB suspend"); |
David Brownell | e918edf | 2008-12-10 17:35:26 -0800 | [diff] [blame] | 307 | gpio_direction_output(12, 0); |
Tony Lindgren | b5e8905 | 2010-07-05 16:31:29 +0300 | [diff] [blame] | 308 | omap2_usbfs_init(&apollon_usb_config); |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 309 | } |
| 310 | |
Tony Lindgren | b52b14e | 2010-07-05 16:31:37 +0300 | [diff] [blame] | 311 | #ifdef CONFIG_OMAP_MUX |
| 312 | static struct omap_board_mux board_mux[] __initdata = { |
| 313 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 314 | }; |
Tony Lindgren | b52b14e | 2010-07-05 16:31:37 +0300 | [diff] [blame] | 315 | #endif |
| 316 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 317 | static void __init omap_apollon_init(void) |
| 318 | { |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 319 | u32 v; |
| 320 | |
Tony Lindgren | b52b14e | 2010-07-05 16:31:37 +0300 | [diff] [blame] | 321 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); |
| 322 | |
Tony Lindgren | c2cdaff | 2010-12-07 16:26:55 -0800 | [diff] [blame] | 323 | apollon_init_smc91x(); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 324 | apollon_led_init(); |
Kyungmin Park | f024840 | 2006-12-06 17:13:53 -0800 | [diff] [blame] | 325 | apollon_flash_init(); |
| 326 | apollon_usb_init(); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 327 | |
| 328 | /* REVISIT: where's the correct place */ |
Tony Lindgren | f99bf16 | 2010-07-05 16:31:40 +0300 | [diff] [blame] | 329 | omap_mux_init_signal("sys_nirq", OMAP_PULL_ENA | OMAP_PULL_UP); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 330 | |
Tony Lindgren | 18dbe6c | 2010-07-05 16:31:39 +0300 | [diff] [blame] | 331 | /* LCD PWR_EN */ |
| 332 | omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP); |
| 333 | |
Kyungmin Park | abc45e1 | 2006-09-25 12:41:25 +0300 | [diff] [blame] | 334 | /* Use Interal loop-back in MMC/SDIO Module Input Clock selection */ |
Paul Walmsley | 4459598 | 2008-03-18 10:04:51 +0200 | [diff] [blame] | 335 | v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); |
| 336 | v |= (1 << 24); |
| 337 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); |
Kyungmin Park | abc45e1 | 2006-09-25 12:41:25 +0300 | [diff] [blame] | 338 | |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 339 | /* |
| 340 | * Make sure the serial ports are muxed on at this point. |
| 341 | * You have to mux them off in device drivers later on |
| 342 | * if not needed. |
| 343 | */ |
| 344 | platform_add_devices(apollon_devices, ARRAY_SIZE(apollon_devices)); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 345 | omap_serial_init(); |
| 346 | } |
| 347 | |
| 348 | static void __init omap_apollon_map_io(void) |
| 349 | { |
Paul Walmsley | c8d2eb8 | 2008-05-07 16:55:13 -0700 | [diff] [blame] | 350 | omap2_set_globals_242x(); |
Tony Lindgren | 6fbd55d | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 351 | omap242x_map_common_io(); |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 352 | } |
| 353 | |
| 354 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") |
| 355 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 356 | .boot_params = 0x80000100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 357 | .reserve = omap_reserve, |
Russell King - ARM Linux | 3dc3bad | 2011-02-14 15:40:20 -0800 | [diff] [blame] | 358 | .map_io = omap_apollon_map_io, |
| 359 | .init_early = omap_apollon_init_early, |
| 360 | .init_irq = omap_init_irq, |
Tony Lindgren | 9b6553c | 2006-04-02 17:46:30 +0100 | [diff] [blame] | 361 | .init_machine = omap_apollon_init, |
| 362 | .timer = &omap_timer, |
| 363 | MACHINE_END |