Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/mach-ep93xx/simone.c |
| 3 | * Simplemachines Sim.One support. |
| 4 | * |
Ryan Mallon | 1c5454e | 2011-06-15 14:45:36 +1000 | [diff] [blame] | 5 | * Copyright (C) 2010 Ryan Mallon |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 6 | * |
| 7 | * Based on the 2.6.24.7 support: |
| 8 | * Copyright (C) 2009 Simplemachines |
| 9 | * MMC support by Peter Ivanov <ivanovp@gmail.com>, 2007 |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License as published by |
| 13 | * the Free Software Foundation; either version 2 of the License, or (at |
| 14 | * your option) any later version. |
| 15 | * |
| 16 | */ |
| 17 | |
| 18 | #include <linux/kernel.h> |
| 19 | #include <linux/init.h> |
| 20 | #include <linux/platform_device.h> |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 21 | #include <linux/i2c.h> |
| 22 | #include <linux/i2c-gpio.h> |
| 23 | |
| 24 | #include <mach/hardware.h> |
Arnd Bergmann | a3b2924 | 2012-08-24 15:12:11 +0200 | [diff] [blame] | 25 | #include <linux/platform_data/video-ep93xx.h> |
Linus Walleij | bd5f12a | 2011-09-22 08:07:00 +0100 | [diff] [blame] | 26 | #include <mach/gpio-ep93xx.h> |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 27 | |
| 28 | #include <asm/mach-types.h> |
| 29 | #include <asm/mach/arch.h> |
| 30 | |
Ryan Mallon | 258249e | 2012-01-11 09:06:08 +1100 | [diff] [blame] | 31 | #include "soc.h" |
| 32 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 33 | static struct ep93xx_eth_data __initdata simone_eth_data = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 34 | .phy_id = 1, |
| 35 | }; |
| 36 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 37 | static struct ep93xxfb_mach_info __initdata simone_fb_info = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 38 | .num_modes = EP93XXFB_USE_MODEDB, |
| 39 | .bpp = 16, |
| 40 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, |
| 41 | }; |
| 42 | |
Hartley Sweeten | b370e08 | 2010-03-18 18:04:06 +0100 | [diff] [blame] | 43 | static struct i2c_gpio_platform_data __initdata simone_i2c_gpio_data = { |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 44 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, |
| 45 | .sda_is_open_drain = 0, |
| 46 | .scl_pin = EP93XX_GPIO_LINE_EECLK, |
| 47 | .scl_is_open_drain = 0, |
| 48 | .udelay = 0, |
| 49 | .timeout = 0, |
| 50 | }; |
| 51 | |
| 52 | static struct i2c_board_info __initdata simone_i2c_board_info[] = { |
| 53 | { |
| 54 | I2C_BOARD_INFO("ds1337", 0x68), |
| 55 | }, |
| 56 | }; |
| 57 | |
Mika Westerberg | e5063fe | 2011-09-11 12:28:53 +0300 | [diff] [blame] | 58 | static struct platform_device simone_audio_device = { |
| 59 | .name = "simone-audio", |
| 60 | .id = -1, |
| 61 | }; |
| 62 | |
| 63 | static void __init simone_register_audio(void) |
| 64 | { |
| 65 | ep93xx_register_ac97(); |
| 66 | platform_device_register(&simone_audio_device); |
| 67 | } |
| 68 | |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 69 | static void __init simone_init_machine(void) |
| 70 | { |
| 71 | ep93xx_init_devices(); |
Hartley Sweeten | 16bcf78 | 2010-06-10 16:19:08 +0100 | [diff] [blame] | 72 | ep93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_8M); |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 73 | ep93xx_register_eth(&simone_eth_data, 1); |
| 74 | ep93xx_register_fb(&simone_fb_info); |
| 75 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, |
| 76 | ARRAY_SIZE(simone_i2c_board_info)); |
Mika Westerberg | e5063fe | 2011-09-11 12:28:53 +0300 | [diff] [blame] | 77 | simone_register_audio(); |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") |
Nicolas Pitre | e562cf1 | 2011-07-05 22:38:11 -0400 | [diff] [blame] | 81 | /* Maintainer: Ryan Mallon */ |
| 82 | .atag_offset = 0x100, |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 83 | .map_io = ep93xx_map_io, |
| 84 | .init_irq = ep93xx_init_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 85 | .init_time = ep93xx_timer_init, |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 86 | .init_machine = simone_init_machine, |
Shawn Guo | c914283 | 2012-04-26 10:05:15 +0800 | [diff] [blame] | 87 | .init_late = ep93xx_init_late, |
Russell King | 3275166 | 2011-11-05 09:54:14 +0000 | [diff] [blame] | 88 | .restart = ep93xx_restart, |
Ryan Mallon | a3662f6 | 2010-01-22 01:42:02 +0100 | [diff] [blame] | 89 | MACHINE_END |